@omnic/widget-locations 1.1.64 → 1.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/widget.cjs.js +3 -3
- package/dist/lib/widget.esm.js +37 -28
- package/package.json +2 -2
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -242,7 +242,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
242
242
|
`))})},n}return e.prototype.componentDidMount=function(){if(tr){if(window.google&&window.google.maps&&!mi){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),tr&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(tr){this.cleanup();var r=function(){n.check.current||(delete window.google,mi=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||S.jsx(ap,{})]})},e.defaultProps=vl,e})(c.PureComponent);var Oc;function lp(t){var e=t.id,n=e===void 0?vl.id:e,r=t.version,i=r===void 0?vl.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,l=t.language,u=t.region,f=t.libraries,d=t.preventGoogleFontsLoading,h=t.channel,v=t.mapIds,y=t.authReferrerPolicy,g=c.useRef(!1),w=c.useState(!1),C=w[0],E=w[1],m=c.useState(void 0),_=m[0],x=m[1];c.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),c.useEffect(function(){tr&&d&&op()},[d]),c.useEffect(function(){C&&Xe(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[C]);var p=sp({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:u,libraries:f,channel:h,mapIds:v,authReferrerPolicy:y});c.useEffect(function(){if(!tr)return;function P(){g.current&&(E(!0),Oc=p)}if(window.google&&window.google.maps&&Oc===p){P();return}ip({id:n,url:p,nonce:o}).then(P).catch(function(T){g.current&&x(T),console.warn(`
|
|
243
243
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
|
244
244
|
Otherwise it is a Network issue.
|
|
245
|
-
`)),console.error(T)})},[n,p,o]);var b=c.useRef();return c.useEffect(function(){b.current&&f!==b.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),b.current=f},[f]),{isLoaded:C,loadError:_,url:p}}var D4=S.jsx(ap,{});function A4(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=ql(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=lp(s),l=a.isLoaded,u=a.loadError;return c.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),c.useEffect(function(){u&&typeof r=="function"&&r(u)},[u,r]),c.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||D4}c.memo(A4);var Pc;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Pc||(Pc={}));var kc={},Tc={options:function(t,e){t.setOptions(e)}};function I4(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(le),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(function(){var l=new google.maps.TrafficLayer(K(K({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(I4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),he(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function j4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(j4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function N4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}c.memo(N4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Rc={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Dc={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function B4(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,u=t.onLoad,f=t.onUnmount,d=c.useContext(le),h=c.useState(null),v=h[0],y=h[1],g=c.useState(null),w=g[0],C=g[1],E=c.useState(null),m=E[0],_=E[1],x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(w!==null&&google.maps.event.removeListener(w),C(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),c.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),c.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),c.useEffect(function(){Xe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(K(K({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&C(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&O(google.maps.event.addListener(N,"polygoncomplete",s)),a&&R(google.maps.event.addListener(N,"polylinecomplete",a)),l&&V(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),u&&u(N),function(){v!==null&&(w&&google.maps.event.removeListener(w),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),P&&google.maps.event.removeListener(P),M&&google.maps.event.removeListener(M),B&&google.maps.event.removeListener(B),f&&f(v),v.setMap(null))}},[]),null}c.memo(B4);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Xe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),he(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Ac={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ic={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ws={};function F4(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,u=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,g=t.title,w=t.zIndex,C=t.onClick,E=t.onDblClick,m=t.onDrag,_=t.onDragEnd,x=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,L=t.onMouseUp,P=t.onMouseDown,O=t.onRightClick,T=t.onClickableChanged,M=t.onCursorChanged,R=t.onAnimationChanged,A=t.onDraggableChanged,B=t.onFlatChanged,V=t.onIconChanged,N=t.onPositionChanged,z=t.onShapeChanged,Y=t.onTitleChanged,W=t.onVisibleChanged,H=t.onZindexChanged,Q=t.onLoad,oe=t.onUnmount,te=c.useContext(le),ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),Ge=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],We=tt[1],ze=c.useState(null),Ct=ze[0],ut=ze[1],se=c.useState(null),Hn=se[0],co=se[1],Ut=c.useState(null),un=Ut[0],fo=Ut[1],j=c.useState(null),X=j[0],G=j[1],fe=c.useState(null),Ne=fe[0],Le=fe[1],Be=c.useState(null),Te=Be[0],He=Be[1],ae=c.useState(null),me=ae[0],gt=ae[1],cn=c.useState(null),ct=cn[0],et=cn[1],wt=c.useState(null),St=wt[0],nt=wt[1],Kt=c.useState(null),Vt=Kt[0],Lt=Kt[1],wn=c.useState(null),fn=wn[0],ii=wn[1],oi=c.useState(null),vr=oi[0],si=oi[1],mr=c.useState(null),$n=mr[0],ai=mr[1],Sn=c.useState(null),Gn=Sn[0],Wn=Sn[1],Zn=c.useState(null),qn=Zn[0],li=Zn[1];c.useEffect(function(){D!==null&&D.setMap(te)},[te]),c.useEffect(function(){typeof n<"u"&&D!==null&&D.setOptions(n)},[D,n]),c.useEffect(function(){typeof s<"u"&&D!==null&&D.setDraggable(s)},[D,s]),c.useEffect(function(){e&&D!==null&&D.setPosition(e)},[D,e]),c.useEffect(function(){typeof a<"u"&&D!==null&&D.setVisible(a)},[D,a]),c.useEffect(function(){D==null||D.setAnimation(l)},[D,l]),c.useEffect(function(){D&&u!==void 0&&D.setClickable(u)},[D,u]),c.useEffect(function(){D&&f!==void 0&&D.setCursor(f)},[D,f]),c.useEffect(function(){D&&d!==void 0&&D.setIcon(d)},[D,d]),c.useEffect(function(){D&&h!==void 0&&D.setLabel(h)},[D,h]),c.useEffect(function(){D&&v!==void 0&&D.setOpacity(v)},[D,v]),c.useEffect(function(){D&&y!==void 0&&D.setShape(y)},[D,y]),c.useEffect(function(){D&&g!==void 0&&D.setTitle(g)},[D,g]),c.useEffect(function(){D&&w!==void 0&&D.setZIndex(w)},[D,w]),c.useEffect(function(){D&&E&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(D,"dblclick",E)))},[E]),c.useEffect(function(){D&&_&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(D,"dragend",_)))},[_]),c.useEffect(function(){D&&x&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(D,"dragstart",x)))},[x]),c.useEffect(function(){D&&P&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(D,"mousedown",P)))},[P]),c.useEffect(function(){D&&p&&(Ge!==null&&google.maps.event.removeListener(Ge),re(google.maps.event.addListener(D,"mouseout",p)))},[p]),c.useEffect(function(){D&&b&&(q!==null&&google.maps.event.removeListener(q),We(google.maps.event.addListener(D,"mouseover",b)))},[b]),c.useEffect(function(){D&&L&&(Ct!==null&&google.maps.event.removeListener(Ct),ut(google.maps.event.addListener(D,"mouseup",L)))},[L]),c.useEffect(function(){D&&O&&(Hn!==null&&google.maps.event.removeListener(Hn),co(google.maps.event.addListener(D,"rightclick",O)))},[O]),c.useEffect(function(){D&&C&&(un!==null&&google.maps.event.removeListener(un),fo(google.maps.event.addListener(D,"click",C)))},[C]),c.useEffect(function(){D&&m&&(X!==null&&google.maps.event.removeListener(X),G(google.maps.event.addListener(D,"drag",m)))},[m]),c.useEffect(function(){D&&T&&(Ne!==null&&google.maps.event.removeListener(Ne),Le(google.maps.event.addListener(D,"clickable_changed",T)))},[T]),c.useEffect(function(){D&&M&&(Te!==null&&google.maps.event.removeListener(Te),He(google.maps.event.addListener(D,"cursor_changed",M)))},[M]),c.useEffect(function(){D&&R&&(me!==null&&google.maps.event.removeListener(me),gt(google.maps.event.addListener(D,"animation_changed",R)))},[R]),c.useEffect(function(){D&&A&&(ct!==null&&google.maps.event.removeListener(ct),et(google.maps.event.addListener(D,"draggable_changed",A)))},[A]),c.useEffect(function(){D&&B&&(St!==null&&google.maps.event.removeListener(St),nt(google.maps.event.addListener(D,"flat_changed",B)))},[B]),c.useEffect(function(){D&&V&&(Vt!==null&&google.maps.event.removeListener(Vt),Lt(google.maps.event.addListener(D,"icon_changed",V)))},[V]),c.useEffect(function(){D&&N&&(fn!==null&&google.maps.event.removeListener(fn),ii(google.maps.event.addListener(D,"position_changed",N)))},[N]),c.useEffect(function(){D&&z&&(vr!==null&&google.maps.event.removeListener(vr),si(google.maps.event.addListener(D,"shape_changed",z)))},[z]),c.useEffect(function(){D&&Y&&($n!==null&&google.maps.event.removeListener($n),ai(google.maps.event.addListener(D,"title_changed",Y)))},[Y]),c.useEffect(function(){D&&W&&(Gn!==null&&google.maps.event.removeListener(Gn),Wn(google.maps.event.addListener(D,"visible_changed",W)))},[W]),c.useEffect(function(){D&&H&&(qn!==null&&google.maps.event.removeListener(qn),li(google.maps.event.addListener(D,"zindex_changed",H)))},[H]),c.useEffect(function(){var Ln=K(K(K({},n||ws),r?ws:{map:te}),{position:e}),ne=new google.maps.Marker(Ln);return r?r.addMarker(ne,!!i):ne.setMap(te),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof u<"u"&&ne.setClickable(u),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof g=="string"&&ne.setTitle(g),typeof w=="number"&&ne.setZIndex(w),E&&De(google.maps.event.addListener(ne,"dblclick",E)),_&&_e(google.maps.event.addListener(ne,"dragend",_)),x&&Me(google.maps.event.addListener(ne,"dragstart",x)),P&&je(google.maps.event.addListener(ne,"mousedown",P)),p&&re(google.maps.event.addListener(ne,"mouseout",p)),b&&We(google.maps.event.addListener(ne,"mouseover",b)),L&&ut(google.maps.event.addListener(ne,"mouseup",L)),O&&co(google.maps.event.addListener(ne,"rightclick",O)),C&&fo(google.maps.event.addListener(ne,"click",C)),m&&G(google.maps.event.addListener(ne,"drag",m)),T&&Le(google.maps.event.addListener(ne,"clickable_changed",T)),M&&He(google.maps.event.addListener(ne,"cursor_changed",M)),R&>(google.maps.event.addListener(ne,"animation_changed",R)),A&&et(google.maps.event.addListener(ne,"draggable_changed",A)),B&&nt(google.maps.event.addListener(ne,"flat_changed",B)),V&&Lt(google.maps.event.addListener(ne,"icon_changed",V)),N&&ii(google.maps.event.addListener(ne,"position_changed",N)),z&&si(google.maps.event.addListener(ne,"shape_changed",z)),Y&&ai(google.maps.event.addListener(ne,"title_changed",Y)),W&&Wn(google.maps.event.addListener(ne,"visible_changed",W)),H&&li(google.maps.event.addListener(ne,"zindex_changed",H)),ve(ne),Q&&Q(ne),function(){Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),ke!==null&&google.maps.event.removeListener(ke),Ge!==null&&google.maps.event.removeListener(Ge),q!==null&&google.maps.event.removeListener(q),Ct!==null&&google.maps.event.removeListener(Ct),Hn!==null&&google.maps.event.removeListener(Hn),un!==null&&google.maps.event.removeListener(un),Ne!==null&&google.maps.event.removeListener(Ne),Te!==null&&google.maps.event.removeListener(Te),me!==null&&google.maps.event.removeListener(me),ct!==null&&google.maps.event.removeListener(ct),St!==null&&google.maps.event.removeListener(St),Vt!==null&&google.maps.event.removeListener(Vt),fn!==null&&google.maps.event.removeListener(fn),$n!==null&&google.maps.event.removeListener($n),Gn!==null&&google.maps.event.removeListener(Gn),qn!==null&&google.maps.event.removeListener(qn),oe&&oe(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var ui=c.useMemo(function(){return o?c.Children.map(o,function(Ln){if(!c.isValidElement(Ln))return Ln;var ne=Ln;return c.cloneElement(ne,{anchor:D})}):null},[o,D]);return S.jsx(S.Fragment,{children:ui})||null}c.memo(F4);var up=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=K(K(K({},this.props.options||ws),this.props.clusterer?ws:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=ce({updaterMap:Ic,eventMap:Ac,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ic,eventMap:Ac,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),he(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(c.PureComponent),U4=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),u=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(u,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(u+this.width,"px, -").concat(f+this.height,", -").concat(u,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),V4=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new U4(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,u=this.markers;l<u.length;l++){var f=u[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function z4(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var H4=2e3,$4=500,G4="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",W4="png",Z4=[53,56,66,78,90],q4="cluster",cp=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||G4,this.imageExtension=r.imageExtension||W4,this.imageSizes=r.imageSizes||Z4,this.calculator=r.calculator||z4,this.batchSize=r.batchSize||H4,this.batchSizeIE=r.batchSizeIE||$4,this.clusterClass=r.clusterClass||q4,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var u=l[a];google.maps.event.removeListener(u)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),u=e.getPosition();if(l&&u){var f=this.distanceBetweenPoints(l,u);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new V4(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),u=e;u<l;u++){var f=this.markers[u];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),Dt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ee={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},K4={};function Q4(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,u=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,g=t.styles,w=t.title,C=t.zoomOnClick,E=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,x=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,L=t.onUnmount,P=c.useState(null),O=P[0],T=P[1],M=c.useContext(le),R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1];return c.useEffect(function(){O&&p&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(O,Dt.onMouseOut,p)))},[p]),c.useEffect(function(){O&&x&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(O,Dt.onMouseOver,x)))},[x]),c.useEffect(function(){O&&E&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(O,Dt.onClick,E)))},[E]),c.useEffect(function(){O&&m&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(O,Dt.onClusteringBegin,m)))},[m]),c.useEffect(function(){O&&_&&(W!==null&&google.maps.event.removeListener(W),z(google.maps.event.addListener(O,Dt.onClusteringEnd,_)))},[_]),c.useEffect(function(){typeof r<"u"&&O!==null&&Ee.averageCenter(O,r)},[O,r]),c.useEffect(function(){typeof i<"u"&&O!==null&&Ee.batchSizeIE(O,i)},[O,i]),c.useEffect(function(){typeof o<"u"&&O!==null&&Ee.calculator(O,o)},[O,o]),c.useEffect(function(){typeof s<"u"&&O!==null&&Ee.clusterClass(O,s)},[O,s]),c.useEffect(function(){typeof a<"u"&&O!==null&&Ee.enableRetinaIcons(O,a)},[O,a]),c.useEffect(function(){typeof l<"u"&&O!==null&&Ee.gridSize(O,l)},[O,l]),c.useEffect(function(){typeof u<"u"&&O!==null&&Ee.ignoreHidden(O,u)},[O,u]),c.useEffect(function(){typeof f<"u"&&O!==null&&Ee.imageExtension(O,f)},[O,f]),c.useEffect(function(){typeof d<"u"&&O!==null&&Ee.imagePath(O,d)},[O,d]),c.useEffect(function(){typeof h<"u"&&O!==null&&Ee.imageSizes(O,h)},[O,h]),c.useEffect(function(){typeof v<"u"&&O!==null&&Ee.maxZoom(O,v)},[O,v]),c.useEffect(function(){typeof y<"u"&&O!==null&&Ee.minimumClusterSize(O,y)},[O,y]),c.useEffect(function(){typeof g<"u"&&O!==null&&Ee.styles(O,g)},[O,g]),c.useEffect(function(){typeof w<"u"&&O!==null&&Ee.title(O,w)},[O,w]),c.useEffect(function(){typeof C<"u"&&O!==null&&Ee.zoomOnClick(O,C)},[O,C]),c.useEffect(function(){if(M){var Pe=K({},n||K4),Z=new cp(M,[],Pe);return r&&Ee.averageCenter(Z,r),i&&Ee.batchSizeIE(Z,i),o&&Ee.calculator(Z,o),s&&Ee.clusterClass(Z,s),a&&Ee.enableRetinaIcons(Z,a),l&&Ee.gridSize(Z,l),u&&Ee.ignoreHidden(Z,u),f&&Ee.imageExtension(Z,f),d&&Ee.imagePath(Z,d),h&&Ee.imageSizes(Z,h),v&&Ee.maxZoom(Z,v),y&&Ee.minimumClusterSize(Z,y),g&&Ee.styles(Z,g),w&&Ee.title(Z,w),C&&Ee.zoomOnClick(Z,C),p&&te(google.maps.event.addListener(Z,Dt.onMouseOut,p)),x&&ve(google.maps.event.addListener(Z,Dt.onMouseOver,x)),E&&B(google.maps.event.addListener(Z,Dt.onClick,E)),m&&z(google.maps.event.addListener(Z,Dt.onClusteringBegin,m)),_&&H(google.maps.event.addListener(Z,Dt.onClusteringEnd,_)),T(Z),b&&b(Z),function(){oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),L&&L(Z)}}},[]),O!==null&&e(O)||null}c.memo(Q4);var J4=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new cp(this.context,[],this.props.options);this.registeredEvents=ce({updaterMap:Ee,eventMap:Dt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ee,eventMap:Dt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),he(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(c.PureComponent);function jc(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var fp=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(u){u.returnValue=!1,u.preventDefault&&u.preventDefault(),e.enableEventPropagation||jc(u)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,jc))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,u=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,g=this.getProjection(),w=g.fromLatLngToContainerPixel(this.position);w!==null&&(w.x<-u+v?r=w.x+u-v:w.x+d+u+v>a&&(r=w.x+d+u+v-a),this.alignBottom?w.y<-f+y+h?i=w.y+f-y-h:w.y+f+y>l&&(i=w.y+f+y-l):w.y<-f+y?i=w.y+f-y:w.y+h+f+y>l&&(i=w.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),Nc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Bc={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Y4={};function X4(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),E=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var N=r||Y4,z=N.position,Y=ql(N,["position"]),W=void 0;z&&!(z instanceof google.maps.LatLng)&&(W=new google.maps.LatLng(z.lat,z.lng));var H=new fp(K(K({},Y),W?{position:W}:{}));V.current=document.createElement("div"),w(H),s&&m(google.maps.event.addListener(H,"closeclick",s)),a&&p(google.maps.event.addListener(H,"domready",a)),l&&P(google.maps.event.addListener(H,"content_changed",l)),u&&M(google.maps.event.addListener(H,"position_changed",u)),f&&B(google.maps.event.addListener(H,"zindex_changed",f)),H.setContent(V.current),n?H.open(v,n):H.getPosition()?H.open(v):Xe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(H)}return function(){g!==null&&(E&&google.maps.event.removeListener(E),L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(g),g.close())}},[]),V.current?ei.createPortal(c.Children.only(e),V.current):null}c.memo(X4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Xe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ql(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new fp(K(K({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Bc,eventMap:Nc,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Bc,eventMap:Nc,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),he(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ei.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(c.PureComponent);var e5=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},Fc=rp(e5);const Uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ca=1,yi=8;class Kl{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==ca)throw new Error(`Got v${i} data when expected v${ca}.`);const o=Uc[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Kl(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Uc.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,yi,e),this.coords=new this.ArrayType(this.data,yi+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(yi+s+a+l),this.ids=new this.IndexArrayType(this.data,yi,e),this.coords=new this.ArrayType(this.data,yi+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ca<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ml(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],u=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const C=s[2*w],E=s[2*w+1];C>=e&&C<=r&&E>=n&&E<=i&&u.push(o[w])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&u.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(l.push(v+1),l.push(d),l.push(1-f))}return u}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],u=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let w=h;w<=d;w++)Vc(o[2*w],o[2*w+1],e,n)<=u&&l.push(i[w]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Vc(y,g,e,n)<=u&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function ml(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;dp(t,e,s,r,i,o),ml(t,e,n,r,s-1,1-o),ml(t,e,n,s+1,i,1-o)}function dp(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const u=i-r+1,f=n-r+1,d=Math.log(u),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/u+v)),g=Math.min(i,Math.floor(n+(u-f)*h/u+v));dp(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(bi(t,e,r,n),e[2*i+o]>s&&bi(t,e,r,i);a<l;){for(bi(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?bi(t,e,r,l):(l++,bi(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function bi(t,e,n,r){fa(t,n,r),fa(e,2*n,2*r),fa(e,2*n+1,2*r+1)}function fa(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Vc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const t5={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},zc=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Qn=2,Pn=3,da=4,Mn=5,hp=6;class n5{constructor(e){this.options=Object.assign(Object.create(t5),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const u=e[l];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,h=zc(Bo(f)),v=zc(Fo(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(Bo(r),Fo(s),Bo(o),Fo(i)),u=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(u[h+Mn]>1?Hc(u,h,this.clusterProps):this.points[u[h+Pn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=o.within(l,u,a),d=[];for(const h of f){const v=h*this.stride;s[v+da]===e&&d.push(s[v+Mn]>1?Hc(s,v,this.clusterProps):this.points[s[v+Pn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,u=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,u,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,u,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,u,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Kl(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,u=n[l+Mn]>1;let f,d,h;if(u)f=pp(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+Pn]];f=g.properties;const[w,C]=g.geometry.coordinates;d=Bo(w),h=Fo(C)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;u||this.options.generateId?y=n[l+Pn]:y=this.points[n[l+Pn]].id,y!==void 0&&(v.id=y),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,u=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Qn]<=n)continue;l[d+Qn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Mn];let w=g;for(const C of y){const E=C*f;l[E+Qn]>n&&(w+=l[E+Mn])}if(w>g&&w>=s){let C=h*g,E=v*g,m,_=-1;const x=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+Qn]<=n)continue;l[b+Qn]=n;const L=l[b+Mn];C+=l[b]*L,E+=l[b+1]*L,l[b+da]=x,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+da]=x,u.push(C/w,E/w,1/0,x,-1,w),o&&u.push(_)}else{for(let C=0;C<f;C++)u.push(l[d+C]);if(w>1)for(const C of y){const E=C*f;if(!(l[E+Qn]<=n)){l[E+Qn]=n;for(let m=0;m<f;m++)u.push(l[E+m])}}}}return u}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Mn]>1){const s=this.clusterProps[e[n+hp]];return r?Object.assign({},s):s}const i=this.points[e[n+Pn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Hc(t,e,n){return{type:"Feature",id:t[e+Pn],properties:pp(t,e,n),geometry:{type:"Point",coordinates:[r5(t[e]),i5(t[e+1])]}}}function pp(t,e,n){const r=t[e+Mn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+hp],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Pn],point_count:r,point_count_abbreviated:i})}function Bo(t){return t/360+.5}function Fo(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function r5(t){return(t-.5)*360}function i5(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
245
|
+
`)),console.error(T)})},[n,p,o]);var b=c.useRef();return c.useEffect(function(){b.current&&f!==b.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),b.current=f},[f]),{isLoaded:C,loadError:_,url:p}}var D4=S.jsx(ap,{});function A4(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=ql(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=lp(s),l=a.isLoaded,u=a.loadError;return c.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),c.useEffect(function(){u&&typeof r=="function"&&r(u)},[u,r]),c.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||D4}c.memo(A4);var Pc;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Pc||(Pc={}));var kc={},Tc={options:function(t,e){t.setOptions(e)}};function I4(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(le),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(function(){var l=new google.maps.TrafficLayer(K(K({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(I4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Tc,eventMap:kc,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),he(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function j4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(j4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function N4(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(le),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}c.memo(N4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Rc={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Dc={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function B4(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,u=t.onLoad,f=t.onUnmount,d=c.useContext(le),h=c.useState(null),v=h[0],y=h[1],g=c.useState(null),w=g[0],C=g[1],E=c.useState(null),m=E[0],_=E[1],x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(w!==null&&google.maps.event.removeListener(w),C(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),c.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),c.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),c.useEffect(function(){Xe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(K(K({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&C(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&O(google.maps.event.addListener(N,"polygoncomplete",s)),a&&R(google.maps.event.addListener(N,"polylinecomplete",a)),l&&V(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),u&&u(N),function(){v!==null&&(w&&google.maps.event.removeListener(w),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),P&&google.maps.event.removeListener(P),M&&google.maps.event.removeListener(M),B&&google.maps.event.removeListener(B),f&&f(v),v.setMap(null))}},[]),null}c.memo(B4);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Xe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Dc,eventMap:Rc,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),he(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Ac={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ic={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ws={};function F4(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,u=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,g=t.title,w=t.zIndex,C=t.onClick,E=t.onDblClick,m=t.onDrag,_=t.onDragEnd,x=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,L=t.onMouseUp,P=t.onMouseDown,O=t.onRightClick,T=t.onClickableChanged,M=t.onCursorChanged,R=t.onAnimationChanged,A=t.onDraggableChanged,B=t.onFlatChanged,V=t.onIconChanged,N=t.onPositionChanged,z=t.onShapeChanged,Y=t.onTitleChanged,W=t.onVisibleChanged,H=t.onZindexChanged,Q=t.onLoad,oe=t.onUnmount,te=c.useContext(le),ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),Ge=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],We=tt[1],ze=c.useState(null),Ct=ze[0],ut=ze[1],se=c.useState(null),Hn=se[0],co=se[1],Ut=c.useState(null),un=Ut[0],fo=Ut[1],j=c.useState(null),X=j[0],G=j[1],fe=c.useState(null),Ne=fe[0],Le=fe[1],Be=c.useState(null),Te=Be[0],He=Be[1],ae=c.useState(null),me=ae[0],gt=ae[1],cn=c.useState(null),ct=cn[0],et=cn[1],wt=c.useState(null),St=wt[0],nt=wt[1],Kt=c.useState(null),Vt=Kt[0],Lt=Kt[1],wn=c.useState(null),fn=wn[0],ii=wn[1],oi=c.useState(null),vr=oi[0],si=oi[1],mr=c.useState(null),$n=mr[0],ai=mr[1],Sn=c.useState(null),Gn=Sn[0],Wn=Sn[1],Zn=c.useState(null),qn=Zn[0],li=Zn[1];c.useEffect(function(){D!==null&&D.setMap(te)},[te]),c.useEffect(function(){typeof n<"u"&&D!==null&&D.setOptions(n)},[D,n]),c.useEffect(function(){typeof s<"u"&&D!==null&&D.setDraggable(s)},[D,s]),c.useEffect(function(){e&&D!==null&&D.setPosition(e)},[D,e]),c.useEffect(function(){typeof a<"u"&&D!==null&&D.setVisible(a)},[D,a]),c.useEffect(function(){D==null||D.setAnimation(l)},[D,l]),c.useEffect(function(){D&&u!==void 0&&D.setClickable(u)},[D,u]),c.useEffect(function(){D&&f!==void 0&&D.setCursor(f)},[D,f]),c.useEffect(function(){D&&d!==void 0&&D.setIcon(d)},[D,d]),c.useEffect(function(){D&&h!==void 0&&D.setLabel(h)},[D,h]),c.useEffect(function(){D&&v!==void 0&&D.setOpacity(v)},[D,v]),c.useEffect(function(){D&&y!==void 0&&D.setShape(y)},[D,y]),c.useEffect(function(){D&&g!==void 0&&D.setTitle(g)},[D,g]),c.useEffect(function(){D&&w!==void 0&&D.setZIndex(w)},[D,w]),c.useEffect(function(){D&&E&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(D,"dblclick",E)))},[E]),c.useEffect(function(){D&&_&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(D,"dragend",_)))},[_]),c.useEffect(function(){D&&x&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(D,"dragstart",x)))},[x]),c.useEffect(function(){D&&P&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(D,"mousedown",P)))},[P]),c.useEffect(function(){D&&p&&(Ge!==null&&google.maps.event.removeListener(Ge),re(google.maps.event.addListener(D,"mouseout",p)))},[p]),c.useEffect(function(){D&&b&&(q!==null&&google.maps.event.removeListener(q),We(google.maps.event.addListener(D,"mouseover",b)))},[b]),c.useEffect(function(){D&&L&&(Ct!==null&&google.maps.event.removeListener(Ct),ut(google.maps.event.addListener(D,"mouseup",L)))},[L]),c.useEffect(function(){D&&O&&(Hn!==null&&google.maps.event.removeListener(Hn),co(google.maps.event.addListener(D,"rightclick",O)))},[O]),c.useEffect(function(){D&&C&&(un!==null&&google.maps.event.removeListener(un),fo(google.maps.event.addListener(D,"click",C)))},[C]),c.useEffect(function(){D&&m&&(X!==null&&google.maps.event.removeListener(X),G(google.maps.event.addListener(D,"drag",m)))},[m]),c.useEffect(function(){D&&T&&(Ne!==null&&google.maps.event.removeListener(Ne),Le(google.maps.event.addListener(D,"clickable_changed",T)))},[T]),c.useEffect(function(){D&&M&&(Te!==null&&google.maps.event.removeListener(Te),He(google.maps.event.addListener(D,"cursor_changed",M)))},[M]),c.useEffect(function(){D&&R&&(me!==null&&google.maps.event.removeListener(me),gt(google.maps.event.addListener(D,"animation_changed",R)))},[R]),c.useEffect(function(){D&&A&&(ct!==null&&google.maps.event.removeListener(ct),et(google.maps.event.addListener(D,"draggable_changed",A)))},[A]),c.useEffect(function(){D&&B&&(St!==null&&google.maps.event.removeListener(St),nt(google.maps.event.addListener(D,"flat_changed",B)))},[B]),c.useEffect(function(){D&&V&&(Vt!==null&&google.maps.event.removeListener(Vt),Lt(google.maps.event.addListener(D,"icon_changed",V)))},[V]),c.useEffect(function(){D&&N&&(fn!==null&&google.maps.event.removeListener(fn),ii(google.maps.event.addListener(D,"position_changed",N)))},[N]),c.useEffect(function(){D&&z&&(vr!==null&&google.maps.event.removeListener(vr),si(google.maps.event.addListener(D,"shape_changed",z)))},[z]),c.useEffect(function(){D&&Y&&($n!==null&&google.maps.event.removeListener($n),ai(google.maps.event.addListener(D,"title_changed",Y)))},[Y]),c.useEffect(function(){D&&W&&(Gn!==null&&google.maps.event.removeListener(Gn),Wn(google.maps.event.addListener(D,"visible_changed",W)))},[W]),c.useEffect(function(){D&&H&&(qn!==null&&google.maps.event.removeListener(qn),li(google.maps.event.addListener(D,"zindex_changed",H)))},[H]),c.useEffect(function(){var Ln=K(K(K({},n||ws),r?ws:{map:te}),{position:e}),ne=new google.maps.Marker(Ln);return r?r.addMarker(ne,!!i):ne.setMap(te),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof u<"u"&&ne.setClickable(u),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof g=="string"&&ne.setTitle(g),typeof w=="number"&&ne.setZIndex(w),E&&De(google.maps.event.addListener(ne,"dblclick",E)),_&&_e(google.maps.event.addListener(ne,"dragend",_)),x&&Me(google.maps.event.addListener(ne,"dragstart",x)),P&&je(google.maps.event.addListener(ne,"mousedown",P)),p&&re(google.maps.event.addListener(ne,"mouseout",p)),b&&We(google.maps.event.addListener(ne,"mouseover",b)),L&&ut(google.maps.event.addListener(ne,"mouseup",L)),O&&co(google.maps.event.addListener(ne,"rightclick",O)),C&&fo(google.maps.event.addListener(ne,"click",C)),m&&G(google.maps.event.addListener(ne,"drag",m)),T&&Le(google.maps.event.addListener(ne,"clickable_changed",T)),M&&He(google.maps.event.addListener(ne,"cursor_changed",M)),R&>(google.maps.event.addListener(ne,"animation_changed",R)),A&&et(google.maps.event.addListener(ne,"draggable_changed",A)),B&&nt(google.maps.event.addListener(ne,"flat_changed",B)),V&&Lt(google.maps.event.addListener(ne,"icon_changed",V)),N&&ii(google.maps.event.addListener(ne,"position_changed",N)),z&&si(google.maps.event.addListener(ne,"shape_changed",z)),Y&&ai(google.maps.event.addListener(ne,"title_changed",Y)),W&&Wn(google.maps.event.addListener(ne,"visible_changed",W)),H&&li(google.maps.event.addListener(ne,"zindex_changed",H)),ve(ne),Q&&Q(ne),function(){Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),ke!==null&&google.maps.event.removeListener(ke),Ge!==null&&google.maps.event.removeListener(Ge),q!==null&&google.maps.event.removeListener(q),Ct!==null&&google.maps.event.removeListener(Ct),Hn!==null&&google.maps.event.removeListener(Hn),un!==null&&google.maps.event.removeListener(un),Ne!==null&&google.maps.event.removeListener(Ne),Te!==null&&google.maps.event.removeListener(Te),me!==null&&google.maps.event.removeListener(me),ct!==null&&google.maps.event.removeListener(ct),St!==null&&google.maps.event.removeListener(St),Vt!==null&&google.maps.event.removeListener(Vt),fn!==null&&google.maps.event.removeListener(fn),$n!==null&&google.maps.event.removeListener($n),Gn!==null&&google.maps.event.removeListener(Gn),qn!==null&&google.maps.event.removeListener(qn),oe&&oe(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var ui=c.useMemo(function(){return o?c.Children.map(o,function(Ln){if(!c.isValidElement(Ln))return Ln;var ne=Ln;return c.cloneElement(ne,{anchor:D})}):null},[o,D]);return S.jsx(S.Fragment,{children:ui})||null}c.memo(F4);var up=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=K(K(K({},this.props.options||ws),this.props.clusterer?ws:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=ce({updaterMap:Ic,eventMap:Ac,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ic,eventMap:Ac,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),he(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(c.PureComponent),U4=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),u=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(u,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(u+this.width,"px, -").concat(f+this.height,", -").concat(u,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),V4=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new U4(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,u=this.markers;l<u.length;l++){var f=u[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function z4(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var H4=2e3,$4=500,G4="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",W4="png",Z4=[53,56,66,78,90],q4="cluster",cp=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||G4,this.imageExtension=r.imageExtension||W4,this.imageSizes=r.imageSizes||Z4,this.calculator=r.calculator||z4,this.batchSize=r.batchSize||H4,this.batchSizeIE=r.batchSizeIE||$4,this.clusterClass=r.clusterClass||q4,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var u=l[a];google.maps.event.removeListener(u)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),u=e.getPosition();if(l&&u){var f=this.distanceBetweenPoints(l,u);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new V4(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),u=e;u<l;u++){var f=this.markers[u];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),Dt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ee={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},K4={};function Q4(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,u=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,g=t.styles,w=t.title,C=t.zoomOnClick,E=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,x=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,L=t.onUnmount,P=c.useState(null),O=P[0],T=P[1],M=c.useContext(le),R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1];return c.useEffect(function(){O&&p&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(O,Dt.onMouseOut,p)))},[p]),c.useEffect(function(){O&&x&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(O,Dt.onMouseOver,x)))},[x]),c.useEffect(function(){O&&E&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(O,Dt.onClick,E)))},[E]),c.useEffect(function(){O&&m&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(O,Dt.onClusteringBegin,m)))},[m]),c.useEffect(function(){O&&_&&(W!==null&&google.maps.event.removeListener(W),z(google.maps.event.addListener(O,Dt.onClusteringEnd,_)))},[_]),c.useEffect(function(){typeof r<"u"&&O!==null&&Ee.averageCenter(O,r)},[O,r]),c.useEffect(function(){typeof i<"u"&&O!==null&&Ee.batchSizeIE(O,i)},[O,i]),c.useEffect(function(){typeof o<"u"&&O!==null&&Ee.calculator(O,o)},[O,o]),c.useEffect(function(){typeof s<"u"&&O!==null&&Ee.clusterClass(O,s)},[O,s]),c.useEffect(function(){typeof a<"u"&&O!==null&&Ee.enableRetinaIcons(O,a)},[O,a]),c.useEffect(function(){typeof l<"u"&&O!==null&&Ee.gridSize(O,l)},[O,l]),c.useEffect(function(){typeof u<"u"&&O!==null&&Ee.ignoreHidden(O,u)},[O,u]),c.useEffect(function(){typeof f<"u"&&O!==null&&Ee.imageExtension(O,f)},[O,f]),c.useEffect(function(){typeof d<"u"&&O!==null&&Ee.imagePath(O,d)},[O,d]),c.useEffect(function(){typeof h<"u"&&O!==null&&Ee.imageSizes(O,h)},[O,h]),c.useEffect(function(){typeof v<"u"&&O!==null&&Ee.maxZoom(O,v)},[O,v]),c.useEffect(function(){typeof y<"u"&&O!==null&&Ee.minimumClusterSize(O,y)},[O,y]),c.useEffect(function(){typeof g<"u"&&O!==null&&Ee.styles(O,g)},[O,g]),c.useEffect(function(){typeof w<"u"&&O!==null&&Ee.title(O,w)},[O,w]),c.useEffect(function(){typeof C<"u"&&O!==null&&Ee.zoomOnClick(O,C)},[O,C]),c.useEffect(function(){if(M){var Pe=K({},n||K4),Z=new cp(M,[],Pe);return r&&Ee.averageCenter(Z,r),i&&Ee.batchSizeIE(Z,i),o&&Ee.calculator(Z,o),s&&Ee.clusterClass(Z,s),a&&Ee.enableRetinaIcons(Z,a),l&&Ee.gridSize(Z,l),u&&Ee.ignoreHidden(Z,u),f&&Ee.imageExtension(Z,f),d&&Ee.imagePath(Z,d),h&&Ee.imageSizes(Z,h),v&&Ee.maxZoom(Z,v),y&&Ee.minimumClusterSize(Z,y),g&&Ee.styles(Z,g),w&&Ee.title(Z,w),C&&Ee.zoomOnClick(Z,C),p&&te(google.maps.event.addListener(Z,Dt.onMouseOut,p)),x&&ve(google.maps.event.addListener(Z,Dt.onMouseOver,x)),E&&B(google.maps.event.addListener(Z,Dt.onClick,E)),m&&z(google.maps.event.addListener(Z,Dt.onClusteringBegin,m)),_&&H(google.maps.event.addListener(Z,Dt.onClusteringEnd,_)),T(Z),b&&b(Z),function(){oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),L&&L(Z)}}},[]),O!==null&&e(O)||null}c.memo(Q4);var J4=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new cp(this.context,[],this.props.options);this.registeredEvents=ce({updaterMap:Ee,eventMap:Dt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Ee,eventMap:Dt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),he(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(c.PureComponent);function jc(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var fp=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(u){u.returnValue=!1,u.preventDefault&&u.preventDefault(),e.enableEventPropagation||jc(u)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,jc))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,u=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,g=this.getProjection(),w=g.fromLatLngToContainerPixel(this.position);w!==null&&(w.x<-u+v?r=w.x+u-v:w.x+d+u+v>a&&(r=w.x+d+u+v-a),this.alignBottom?w.y<-f+y+h?i=w.y+f-y-h:w.y+f+y>l&&(i=w.y+f+y-l):w.y<-f+y?i=w.y+f-y:w.y+h+f+y>l&&(i=w.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),Nc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Bc={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Y4={};function X4(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),E=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var N=r||Y4,z=N.position,Y=ql(N,["position"]),W=void 0;z&&!(z instanceof google.maps.LatLng)&&(W=new google.maps.LatLng(z.lat,z.lng));var H=new fp(K(K({},Y),W?{position:W}:{}));V.current=document.createElement("div"),w(H),s&&m(google.maps.event.addListener(H,"closeclick",s)),a&&p(google.maps.event.addListener(H,"domready",a)),l&&P(google.maps.event.addListener(H,"content_changed",l)),u&&M(google.maps.event.addListener(H,"position_changed",u)),f&&B(google.maps.event.addListener(H,"zindex_changed",f)),H.setContent(V.current),n?H.open(v,n):H.getPosition()?H.open(v):Xe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(H)}return function(){g!==null&&(E&&google.maps.event.removeListener(E),L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(g),g.close())}},[]),V.current?ei.createPortal(c.Children.only(e),V.current):null}c.memo(X4);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Xe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ql(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new fp(K(K({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Bc,eventMap:Nc,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Bc,eventMap:Nc,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),he(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ei.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(c.PureComponent);var eC=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},Fc=rp(eC);const Uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ca=1,yi=8;class Kl{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==ca)throw new Error(`Got v${i} data when expected v${ca}.`);const o=Uc[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Kl(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Uc.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,yi,e),this.coords=new this.ArrayType(this.data,yi+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(yi+s+a+l),this.ids=new this.IndexArrayType(this.data,yi,e),this.coords=new this.ArrayType(this.data,yi+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ca<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ml(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],u=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let w=h;w<=d;w++){const C=s[2*w],E=s[2*w+1];C>=e&&C<=r&&E>=n&&E<=i&&u.push(o[w])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&u.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(l.push(v+1),l.push(d),l.push(1-f))}return u}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],u=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let w=h;w<=d;w++)Vc(o[2*w],o[2*w+1],e,n)<=u&&l.push(i[w]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Vc(y,g,e,n)<=u&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function ml(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;dp(t,e,s,r,i,o),ml(t,e,n,r,s-1,1-o),ml(t,e,n,s+1,i,1-o)}function dp(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const u=i-r+1,f=n-r+1,d=Math.log(u),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/u+v)),g=Math.min(i,Math.floor(n+(u-f)*h/u+v));dp(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(bi(t,e,r,n),e[2*i+o]>s&&bi(t,e,r,i);a<l;){for(bi(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?bi(t,e,r,l):(l++,bi(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function bi(t,e,n,r){fa(t,n,r),fa(e,2*n,2*r),fa(e,2*n+1,2*r+1)}function fa(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Vc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const tC={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},zc=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Qn=2,Pn=3,da=4,Mn=5,hp=6;class nC{constructor(e){this.options=Object.assign(Object.create(tC),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const u=e[l];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,h=zc(Bo(f)),v=zc(Fo(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(Bo(r),Fo(s),Bo(o),Fo(i)),u=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(u[h+Mn]>1?Hc(u,h,this.clusterProps):this.points[u[h+Pn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=o.within(l,u,a),d=[];for(const h of f){const v=h*this.stride;s[v+da]===e&&d.push(s[v+Mn]>1?Hc(s,v,this.clusterProps):this.points[s[v+Pn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,u=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,u,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,u,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,u,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Kl(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,u=n[l+Mn]>1;let f,d,h;if(u)f=pp(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+Pn]];f=g.properties;const[w,C]=g.geometry.coordinates;d=Bo(w),h=Fo(C)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;u||this.options.generateId?y=n[l+Pn]:y=this.points[n[l+Pn]].id,y!==void 0&&(v.id=y),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,u=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Qn]<=n)continue;l[d+Qn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Mn];let w=g;for(const C of y){const E=C*f;l[E+Qn]>n&&(w+=l[E+Mn])}if(w>g&&w>=s){let C=h*g,E=v*g,m,_=-1;const x=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+Qn]<=n)continue;l[b+Qn]=n;const L=l[b+Mn];C+=l[b]*L,E+=l[b+1]*L,l[b+da]=x,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+da]=x,u.push(C/w,E/w,1/0,x,-1,w),o&&u.push(_)}else{for(let C=0;C<f;C++)u.push(l[d+C]);if(w>1)for(const C of y){const E=C*f;if(!(l[E+Qn]<=n)){l[E+Qn]=n;for(let m=0;m<f;m++)u.push(l[E+m])}}}}return u}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Mn]>1){const s=this.clusterProps[e[n+hp]];return r?Object.assign({},s):s}const i=this.points[e[n+Pn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Hc(t,e,n){return{type:"Feature",id:t[e+Pn],properties:pp(t,e,n),geometry:{type:"Point",coordinates:[rC(t[e]),iC(t[e+1])]}}}function pp(t,e,n){const r=t[e+Mn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+hp],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Pn],point_count:r,point_count_abbreviated:i})}function Bo(t){return t/360+.5}function Fo(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function rC(t){return(t-.5)*360}function iC(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
246
246
|
Copyright (c) Microsoft Corporation.
|
|
247
247
|
|
|
248
248
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -255,9 +255,9 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
255
255
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
256
256
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
257
257
|
PERFORMANCE OF THIS SOFTWARE.
|
|
258
|
-
***************************************************************************** */function
|
|
258
|
+
***************************************************************************** */function oC(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class Tt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class yl{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(Tt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>Tt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(Tt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class sC{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return aC(e)}}const aC=t=>t.map(n=>new yl({position:Tt.getPosition(n),markers:[n]}));class lC extends sC{constructor(e){var{maxZoom:n,radius:r=60}=e,i=oC(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new nC(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!Fc(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=Tt.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:o}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!Fc(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new yl({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new yl({markers:[i],position:Tt.getPosition(i)})}}class uC{constructor(e,n){this.markers={sum:e.length};const r=n.map(o=>o.count),i=r.reduce((o,s)=>o+s,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class cC{render({count:e,position:n},r,i){const s=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
259
259
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
260
260
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
261
261
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
262
262
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
|
263
|
-
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function f5(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ql{constructor(){f5(Ql,google.maps.OverlayView)}}var Bi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Bi||(Bi={}));const d5=(t,e,n)=>{n.fitBounds(e.bounds)};class h5 extends Ql{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new l5(r),renderer:o=new c5,onClusterClick:s=d5}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(Tt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Bi.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Bi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new u5(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Bi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function p5(t){var e=x4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new h5(K(K({},t),{map:e}));i(o)}},[e]),r}function g5(t){var e=t.children,n=t.options,r=p5(n);return r!==null?e(r):null}c.memo(g5);var $c={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Gc={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function v5(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),E=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&P(google.maps.event.addListener(N,"content_changed",l)),u&&M(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Xe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){E&&google.maps.event.removeListener(E),L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(N),N.close()}},[]),V.current?ei.createPortal(c.Children.only(e),V.current):null}c.memo(v5);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Xe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Gc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Gc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ei.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),Wc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},m5={};function y5(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,E=t.onUnmount,m=c.useContext(le),_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){x!==null&&x.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setDraggable(n)},[x,n]),c.useEffect(function(){typeof r<"u"&&x!==null&&x.setEditable(r)},[x,r]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setPath(o)},[x,o]),c.useEffect(function(){x&&s&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(x,"dblclick",s)))},[s]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(x,"dragend",a)))},[a]),c.useEffect(function(){x&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(x,"dragstart",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"mousedown",u)))},[u]),c.useEffect(function(){x&&f&&(W!==null&&google.maps.event.removeListener(W),H(google.maps.event.addListener(x,"mousemove",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mouseout",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(x,"mouseover",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseup",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"rightclick",y)))},[y]),c.useEffect(function(){x&&g&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(x,"click",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||m5),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&P(google.maps.event.addListener(ie,"dblclick",s)),a&&M(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&ve(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){L!==null&&google.maps.event.removeListener(L),T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),E&&E(ie),ie.setMap(null)}},[]),null}c.memo(y5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Zc,eventMap:Wc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Zc,eventMap:Wc,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var qc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Kc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function b5(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,E=t.onLoad,m=t.onUnmount,_=t.onEdit,x=c.useContext(le),p=c.useState(null),b=p[0],L=p[1],P=c.useState(null),O=P[0],T=P[1],M=c.useState(null),R=M[0],A=M[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],W=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],ve=c.useState(null),Pe=ve[0],Z=ve[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],we=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],Ge=je[1];return c.useEffect(function(){b!==null&&b.setMap(x)},[x]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),W(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),we(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),Ge(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:x}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&A(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&W(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&we(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&Ge(google.maps.event.addListener(re,"drag",C)),L(re),E&&E(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(b5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Qc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function C5(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,E=t.onLoad,m=t.onUnmount,_=c.useContext(le),x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],W=c.useState(null),H=W[0],Q=W[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),ve=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],we=c.useState(null),Me=we[0],Ie=we[1],ke=c.useState(null),je=ke[0],ie=ke[1],Ge=c.useState(null),re=Ge[0],tt=Ge[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(ve!==null&&google.maps.event.removeListener(ve),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),E&&E(q),function(){P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(C5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Yc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Xc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},w5={};function S5(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,E=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,x=t.onUnmount,p=c.useContext(le),b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),Ge=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],We=tt[1],ze=c.useState(null),Ct=ze[0],ut=ze[1];return c.useEffect(function(){L!==null&&L.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&L!==null&&L.setOptions(e)},[L,e]),c.useEffect(function(){typeof i<"u"&&L!==null&&L.setDraggable(i)},[L,i]),c.useEffect(function(){typeof o<"u"&&L!==null&&L.setEditable(o)},[L,o]),c.useEffect(function(){typeof s<"u"&&L!==null&&L.setVisible(s)},[L,s]),c.useEffect(function(){typeof r=="number"&&L!==null&&L.setRadius(r)},[L,r]),c.useEffect(function(){typeof n<"u"&&L!==null&&L.setCenter(n)},[L,n]),c.useEffect(function(){L&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(L,"dblclick",a)))},[a]),c.useEffect(function(){L&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(L,"dragend",l)))},[l]),c.useEffect(function(){L&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(L,"dragstart",u)))},[u]),c.useEffect(function(){L&&f&&(W!==null&&google.maps.event.removeListener(W),H(google.maps.event.addListener(L,"mousedown",f)))},[f]),c.useEffect(function(){L&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(L,"mousemove",d)))},[d]),c.useEffect(function(){L&&h&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(L,"mouseout",h)))},[h]),c.useEffect(function(){L&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(L,"mouseover",v)))},[v]),c.useEffect(function(){L&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(L,"mouseup",y)))},[y]),c.useEffect(function(){L&&g&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(L,"rightclick",g)))},[g]),c.useEffect(function(){L&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(L,"click",w)))},[w]),c.useEffect(function(){L&&C&&(Ge!==null&&google.maps.event.removeListener(Ge),re(google.maps.event.addListener(L,"drag",C)))},[C]),c.useEffect(function(){L&&E&&(q!==null&&google.maps.event.removeListener(q),We(google.maps.event.addListener(L,"center_changed",E)))},[w]),c.useEffect(function(){L&&m&&(Ct!==null&&google.maps.event.removeListener(Ct),ut(google.maps.event.addListener(L,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||w5),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&M(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&ve(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),E&&We(google.maps.event.addListener(se,"center_changed",E)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),P(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),Ct!==null&&google.maps.event.removeListener(Ct),x&&x(se),se.setMap(null)}},[]),null}c.memo(S5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ef={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},tf={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function L5(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),E=c.useState(null),m=E[0],_=E[1],x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],W=c.useState(null),H=W[0],Q=W[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),ve=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],we=c.useState(null),Me=we[0],Ie=we[1],ke=c.useState(null),je=ke[0],ie=ke[1],Ge=c.useState(null),re=Ge[0],tt=Ge[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(ve!==null&&google.maps.event.removeListener(ve),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(L5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var nf={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},rf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:rf,eventMap:nf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:rf,eventMap:nf,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function E5(t,e){return new e(t.lat,t.lng)}function x5(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function _5(t,e,n){return t instanceof e?t:n(t,e)}function M5(t,e,n){return t instanceof e?t:n(t,e)}function O5(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function P5(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?O5(t,e,M5(n,google.maps.LatLngBounds,x5)):P5(t,e,_5(r,google.maps.LatLng,E5))}function k5(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function T5(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function of(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function sf(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function R5(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return T5(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),jf.createPortal(l,f)}c.memo(R5);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Xe(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;k5(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=of(n.position),i=of(this.props.position),o=sf(n.bounds),s=sf(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?jf.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function D5(){}var af={onDblClick:"dblclick",onClick:"click"},lf={opacity:function(t,e){t.setOpacity(e)}};function A5(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(A5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:D5},e.contextType=le,e})(c.PureComponent);var uf={},cf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function I5(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Xe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Xe(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(I5);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Xe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Xe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ff={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},df={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var hf={onDirectionsChanged:"directions_changed"},pf={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var gf={onPlacesChanged:"places_changed"},vf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Xe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var mf={onPlaceChanged:"place_changed"},yf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Xe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:yf,eventMap:mf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:yf,eventMap:mf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const j5="LocationBalloon-module__root__GtUl6q",N5="LocationBalloon-module__submit__lNcF4k",B5="LocationBalloon-module__details__--VOKk",F5="LocationBalloon-module__icon__X7DOVA",U5="LocationBalloon-module__header__5VQJDW",V5="LocationBalloon-module__titleContainer__BAO73U",z5="LocationBalloon-module__title__bX9pf8",H5="LocationBalloon-module__description__htav7b",$5="LocationBalloon-module__actions__c8dlOR",G5="LocationBalloon-module__close__7Ujvya",Jt={root:j5,submit:N5,details:B5,icon:F5,header:U5,titleContainer:V5,title:z5,description:H5,actions:$5,close:G5},W5={default:Od,llama:Pd},Z5=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Je(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=W5[u];return S.jsxs("div",{className:ge(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(Mt,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(Mt,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ni,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(Mt,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(Mt,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(Mt,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Ft,{id:Qp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(mn,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Ft,{id:Uf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(mn,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},q5=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function K5(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const Q5={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},J5=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Je(),{closeSamePoints:d}=sn(),h=Rt(L=>L.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=gr("screenSm"),{isIdle:E}=pe(),m=Dl({isSelectedPoint:w}),_=E&&w&&m&&g,x=c.useMemo(()=>{let L;if(o.type===30)switch(u){case"omni-llama":{w?L=kt.PinLlamaSelected:L=kt.PinLlama;break}case"we-chip":{w?L=kt.PinWeChipSelected:L=kt.PinWeChip;break}default:{w?L=kt.PinOmnicSelected:L=Or(y,v);break}}else w?L=Or(kt.PinPvz,"--owl-color-black"):L=Or(kt.PinPvz,"--owl-color-grey-80");return on(L,"Icon url is not defined"),{url:Tl(L)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:x,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(Z5,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},Y5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Je();return S.jsx(J4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",Ma,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",Ma)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(J5,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},X5=c.memo(Y5),eC=t=>{var s;const{locale:e}=Je(),n=c.useId(),r=sn(cm),i=(s=Rt.getState().location)==null?void 0:s.uid,o=JSON.stringify([r.length,e,i,n]);return S.jsx(X5,{points:r,...t},o)},tC=c.memo(eC),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),nC="DeliveryBalloon-module__root__Nu90iy",rC="DeliveryBalloon-module__details__eqUTaI",iC="DeliveryBalloon-module__wh__1lJtLN",oC="DeliveryBalloon-module__header__JVdyxN",sC="DeliveryBalloon-module__title__-zKKCt",aC="DeliveryBalloon-module__description__no5-ki",lC="DeliveryBalloon-module__actions__C-N0H-",uC="DeliveryBalloon-module__errorVariant__e6uhZl",cC="DeliveryBalloon-module__logo__62gC5h",pn={root:nC,details:rC,wh:iC,header:oC,title:sC,description:aC,actions:lC,errorVariant:uC,logo:cC},fC=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const{onWarehouseSelect:l,warehouseSelection:u}=Je(),f=pt(m=>m.warehousePoint),d=a==="error",h=a==="default",v=function(){return u?t?"{ courier_balloon.warehouse_title }":S.jsx(mn,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":S.jsx(mn,{keyName:"title",ns:"courier_balloon"})}(),y=t?"{ courier_balloon.error_title }":S.jsx(mn,{keyName:"error_title",ns:"courier_balloon"}),g=t?"{ courier_balloon.error_description }":S.jsx(mn,{keyName:"error_description",ns:"courier_balloon"});function w(){f&&(l==null||l(f))}const{label:C,onClick:E}=u?{onClick:w,label:t?"{ select }":S.jsx(mn,{keyName:"select",ns:"common"})}:{onClick:s,label:t?"{ details }":S.jsx(mn,{keyName:"details",ns:"common"})};return S.jsxs("div",{className:ge(pn.root,n,pn[`${a}Variant`]),children:[S.jsxs("div",{className:pn.header,children:[S.jsx(bp,{className:pn.logo}),S.jsx("span",{className:pn.title,children:d?y:v}),r&&S.jsx(ni,{onClick:o})]}),S.jsx("div",{className:pn.description,children:d?g:e||"{{ properties.address }}"}),h&&(!i||u)&&S.jsx("div",{className:pn.actions,children:S.jsx(Ft,{id:Uf,as:"button",variant:"primary",className:ge(pn.details,u?pn.wh:""),onClick:E,children:C})})]})},dC="Chip-module__root__zsoSyP",hC="Chip-module__active__BlTSFB",bf={root:dC,active:hC},Cf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:ge(bf.root,n,{[bf.active]:t}),children:e}),pC="TextArea-module__root__8YFknR",gC={root:pC},wf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:ge(gC.root,t),onBlur:n,onFocus:i,onChange:r})}),vC=({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},mC="DeliveryDetailsView-module__title__azeoUr",yC="DeliveryDetailsView-module__logo__4zZtpM",bC="DeliveryDetailsView-module__header__oDE9He",CC="DeliveryDetailsView-module__content__6P27SY",wC="DeliveryDetailsView-module__section__2M3Qip",SC="DeliveryDetailsView-module__chips__KmYgha",LC="DeliveryDetailsView-module__actions__43XZ-V",EC="DeliveryDetailsView-module__submit__58LKBw",xC="DeliveryDetailsView-module__actionsHidden__SW-67b",_C="DeliveryDetailsView-module__commentSection__GlX1A2",MC="DeliveryDetailsView-module__comment__2pGG6h",Et={title:mC,logo:yC,header:bC,content:CC,section:wC,chips:SC,actions:LC,submit:EC,actionsHidden:xC,commentSection:_C,comment:MC},OC=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Je(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>vC({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{on(n.address,"Address is required");const b=await Bp({address:n.address,algorithm:10,service:10,language:u||Vf});if(!md(b))return;const L=b==null?void 0:b.data.data,P={...y,address:L};return o==null||o(P),P}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},E=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),x=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:ge(Et.header,t==null?void 0:t.header),children:[S.jsx(ni,{onClick:i}),S.jsxs("div",{className:Et.title,children:[S.jsx(bp,{className:Et.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:ge(Et.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Et.chips,children:[S.jsx(Cf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(Cf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(wf,{..._,rows:1,onChange:E})]}),S.jsxs("section",{className:ge(Et.section,Et.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(wf,{...x,className:Et.comment,onChange:m})]})]}),S.jsx("div",{className:ge(Et.actions,{[Et.actionsHidden]:e}),children:S.jsx(Ft,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Et.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(OC),PC={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},kC=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Dl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=gr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},E=c.useMemo(()=>({url:Tl(Or(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Jp)}),[]),m=async()=>{var b;try{u(!0);const L=await((b=a.current)==null?void 0:b.submit());if(!L)return;n==null||n(L),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(fC,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:E,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:PC,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&x&&S.jsx(gp,{onCloseClick:C,children:_})]})},TC={place:null,mapKey:""},RC=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"))},uo=Cn((t,e)=>({...TC,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var l,u,f,d,h,v;const{map:o}=pe.getState();let s,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),Oa(n)){const y=await Pa(n,e().mapKey,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(u=y==null?void 0:y.results)==null?void 0:u.find(g=>{var w;return(w=g.types)==null?void 0:w.includes(i)}))}else if(s=n,s!=null&&s.place_id){const{results:y}=await Pa(s.place_id,e().mapKey);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),on(s,"Place is not defined"),t({place:s}),s},async setPlaceAndPoint(n,r){var u;const i=r==null?void 0:r.types,o=Oa(n)?await e().setPlace(n,i):await e().setPlace(n),s=(u=o.geometry)==null?void 0:u.location;on(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&pt.getState().setWarehousePoint({...o,coords:{lat:s.lat(),lng:s.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&pt.getState().setDeliverPoint(l),o},setPlaceSimple(n,r){var i,o;if(r!=null&&r.withNavigation){const{map:s}=pe.getState();on(s,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(o=n==null?void 0:n.geometry)!=null&&o.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(s.fitBounds(a),s.setZoom(12))}t({place:n})}})),DC=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s,warehouseSelection:a}=Je(),l=s==null?void 0:s.primary;function u(){switch(o){case"omnic":return q5;case"omnic-light":return K5(l);default:return}}const f=u(),d=c.useMemo(()=>{var v,y;return{lat:((v=i==null?void 0:i.center)==null?void 0:v[0])??ba[0],lng:((y=i==null?void 0:i.center)==null?void 0:y[1])??ba[1]}},[i==null?void 0:i.center]),h=c.useCallback(async v=>{const{latLng:y}=v;if(!y||r&&!a)return;pe.getState().setDetailsOpen(!1),Rt.getState().setSelectedLocation(null);const g=[y.lat(),y.lng()];console.debug("[OmnicLocationsWidget::mapClick]",g);try{await uo.getState().setPlaceAndPoint(g,{warehouseSelection:a})}catch{pt.getState().setDeliverPoint({address:null,coords:g})}},[r,a]);return S.jsx(R4,{zoom:i==null?void 0:i.initialZoom,center:d,mapContainerClassName:ge(ot.root,e),options:{styles:f,...Q5},onClick:h,...n,children:t})},AC=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),IC=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},jC=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=Vp.renderToString(S.jsx(AC,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{kl()})},NC=({className:t})=>{const e=Vn(),n=pe(Og),r=pe(Dg),i=sn(bd),o=pt(Sl),{lmsData:s}=Ts(),{cityName:a,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:f,hideDetails:d,hideMapControls:h,onPointClick:v,regionName:y,skipPointInfo:g}=Je(),w=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),pe.getState().setMap(M),pe.getState().setLoaded(),h||(IC(M),u||jC(M))},[u,h]),C=c.useCallback(M=>{const R=s==null?void 0:s.location.what3words,A=R!=null&&R.id?R:void 0;v==null||v(M,A)},[v,s]),E=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),pe.getState().setMap(null)},[]),m=c.useCallback(()=>{if(pe.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext({bounds:[[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],filter:e,city_name:a,country_abbreviation:l,region_name:y}))},[a,l,e,n,y]),_=c.useCallback(async M=>{pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(M)},[]),x=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),p=pe.getState().setDetailsOpen,{getLMSData:b}=C4(),L=M=>{if(b(M.code),g){C(M);return}p(!1),_(M)},P=()=>{p(!1),_(null)},O=M=>{p(!0),_(M)},T=M=>{C(M),p(!1),_(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:ge(ot.mapContainer,t),children:[S.jsxs(DC,{onIdle:m,onLoad:w,onUnmount:E,onTilesLoaded:x,onBoundsChanged:()=>{pe.getState().setIdle(!1)},children:[o&&S.jsx(kC,{hideDeliveryTime:f,hideDetails:d,point:o,setOpenDetails:pe.getState().setDetailsOpen,setDeliveryPoint:pt.getState().setDeliverPoint,onPointClick:C}),S.jsx(tC,{handleCloseClick:P,handleDetailsClick:O,handlePointClick:L,handleSubmitClick:T})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(B3,{handleDetailsClick:O,handlePointClick:L}),S.jsx(d3,{handleCloseClick:P,handleSubmitClick:T})]})},BC=c.memo(NC),FC=t=>({google:BC})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},UC=()=>{throw new Error("useMediaQuery is a client-only hook")};function VC(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,UC)}const zC="768px",HC="1024px",$C="1280px",GC="1536px",WC={screenSm:zC,screenMd:HC,screenLg:$C,screenXl:GC};function gr(t){return VC(`(max-width: calc(${WC[t]} - 1px))`)}const Sp=x0().use(d0()).use(r0()).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"}),ZC=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},qC=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&oo(`--owl-color-${n}`,r)}}},[t])},KC=t=>{c.useEffect(()=>{t&&t!==void 0&&oo("--owl-button-radius",`${t}px`)},[t])},QC=t=>{c.useEffect(()=>{t&&t!==void 0&&oo("--owl-font",t)},[t])},JC={open:!1},YC=t=>t.open,er=Cn(t=>({...JC,toggle(e){t(n=>({open:e??!n.open}))}})),XC=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&oo("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Je();return QC(n),ZC(r),qC(i),KC(o),XC(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Je(),[r,i]=c.useState(e),{loaded:o}=pe();return on(n==null?void 0:n.center,"Map center is required"),on(n==null?void 0:n.initialZoom,"Map initial zoom is required"),c.useEffect(()=>{!o||e||r||kl({success:()=>{i(!0),Rt.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,o]),t},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),ow=()=>{er.getState().toggle(!0),pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=uo(RC),{location:r}=Rt(),o=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return S.jsxs("div",{role:"presentation",className:ge(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsx("span",{className:ha.text,children:o})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),U.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),U.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),U.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),U.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),U.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),U.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",_i={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Je();if(t)return null;const n=gw[e];return S.jsx("div",{className:_i.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Je(),r=pe(Pg),i=pt(Sl);c.useEffect(()=>{i?pe.getState().setMode("location_delivery"):pe.getState().setMode("self_pickup")},[i]);const o=()=>{pt.getState().setDeliverPoint(null),pe.getState().setMode("self_pickup")},s=()=>{pt.getState().setDeliverPoint(null),pe.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:ge(_i.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:_i.nav,children:[!n&&S.jsx(Ft,{as:"link",className:_i.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Ft,{as:"link",className:_i.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Yr=Cn(t=>({...bw,toggle(e){pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},Ew=({children:t})=>{const{hideFilters:e,hideHeader:n}=Je(),r=Yr(i=>i.open);return S.jsx("div",{className:ge(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),xw=({children:t})=>{const e=sn(fm);return sn(bd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var Ep={},Bs={},xp={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};xp.exports=Pw();var kw=xp.exports,Fs={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.loadGoogleMapScript=Xr.isBrowser=void 0;var Op=typeof window<"u"&&window.document;Xr.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};Xr.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var xt=Aw(c),pa=Xr,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Lf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,E=t.language,m=(0,xt.useRef)(null),_=(0,xt.useRef)(null),x=(0,xt.useRef)(null),p=(0,xt.useRef)(null),b=E?"&language=".concat(E):"",L="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,xt.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,L)},[C,L]);return(0,xt.useEffect)(function(){var O=Lf(Lf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(x.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(m.current,O),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),m.current,x.current)}))};return r?P().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,xt.useEffect)(function(){var O;!(xt.default!==null&&xt.default!==void 0&&(O=xt.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,xt.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,xt.useEffect)(function(){x.current&&x.current.setBounds(y)},[y]),(0,xt.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,xt.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:m,autocompleteRef:x}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var bl=Uw(c),Ye=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return bl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Ye.default.string,libraries:Ye.default.arrayOf(Ye.default.string),ref:Ye.default.oneOfType([Ye.default.func,Ye.default.shape({current:Ye.default.any})]),googleMapsScriptBaseUrl:Ye.default.string,onPlaceSelected:Ye.default.func,inputAutocompleteValue:Ye.default.string,options:Ye.default.shape({componentRestrictions:Ye.default.object,bounds:Ye.default.object,location:Ye.default.object,offset:Ye.default.number,origin:Ye.default.object,radius:Ye.default.number,sessionToken:Ye.default.object,types:Ye.default.arrayOf(Ye.default.string)}),language:Ye.default.string};var Hw=(0,bl.forwardRef)(function(t,e){return bl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(Ep);var Dp=Ep;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Gw(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Ww=({children:t})=>{const{gMapKey:e}=Je(),{data:n,isFetching:r}=Gw(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:ge(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",xr={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},Cl=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:ge(xr.locationSearchRoot,t),children:[r&&S.jsx("span",{className:xr.label,children:r}),S.jsxs("div",{className:xr.inputContainer,children:[s&&S.jsx("div",{className:xr.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:xr.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:xr.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(YC),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Je(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=m=>{er.getState().toggle(!1),uo.getState().setPlaceSimple(m,{withNavigation:!0}),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),E=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ni,{position:"relative",onClick:y})]}),S.jsx(Cl,{...E,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Je(),{mapKey:n}=Ip(),{setMapKey:r}=uo();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:Xp,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},Ef=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),p6="LocationSelector-module__option__WoAxrr",g6="LocationSelector-module__address__huDzWo",v6="LocationSelector-module__icon__90zfxv",m6="LocationSelector-module__inputGoogle__jtuw-y",y6={option:p6,address:g6,icon:v6,inputGoogle:m6},b6=({className:t})=>{const[e,n]=c.useState(""),{t:r}=ln("location_selector"),{country:i,inputs:o,onLocationSelect:s}=Je(),[a,l]=c.useState(""),u=[],f=c.useRef(null),d=i?{componentRestrictions:{country:i},types:u}:{types:u},h=m=>{uo.getState().setPlaceSimple(m,{withNavigation:!0}),s==null||s(m),l(""),n("")},{ref:v}=Dp.usePlacesWidget({libraries:["places"],options:d,onPlaceSelected:h,inputAutocompleteValue:a});c.useEffect(()=>{const m=v.current;if(!m||!e)return;const _=setTimeout(()=>{var b;const x=(b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:b.set;x==null||x.call(m,e),l(e);const p=new Event("input",{bubbles:!0});m.dispatchEvent(p),m.focus()},500);return()=>clearTimeout(_)},[e,v]);const y=()=>{a&&pe.getState().setBlurred(!0),pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null)},g=()=>{pe.getState().setBlurred(!1)},w=m=>{m.preventDefault(),l(e)},C=m=>{var _;(_=f.current)==null||_.focus(),f.current&&m.key!=="Enter"&&f.current.dispatchEvent(new KeyboardEvent("keydown",{key:m.key}))},E=Ss(o==null?void 0:o.address);return S.jsxs(S.Fragment,{children:[S.jsx(Cl,{...E,value:a,className:ge(t,y6.inputGoogle),endAdornment:S.jsx(Ef,{}),placeholder:r("placeholder"),inputRef:v,onChange:w,onFocus:y,onBlur:g,onKeyDown:C}),S.jsx(Cl,{inputRef:f,className:t,endAdornment:S.jsx(Ef,{}),placeholder:r("placeholder"),value:e,onChange:m=>n(m.currentTarget.value)})]})},C6=({className:t})=>pe(Rg)?S.jsx(b6,{className:t}):null,w6=c.memo(C6),S6="DeliveryDetailsModal-module__root__qwKnjX",L6={root:S6},E6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:ge(L6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),x6="LocationDetailsModal-module__root__PyRnLM",_6={root:x6},M6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:ge(_6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},O6="MapContainer-module__root__1Os6Q-",P6="MapContainer-module__mapWrapper__Cwe7qC",k6="MapContainer-module__wrapperBlurred__04NN2L",T6="MapContainer-module__locationSelector__Pr1zS-",R6="MapContainer-module__filterButton__CW3Qv7",D6="MapContainer-module__sidebarOpen__lGMVrJ",A6="MapContainer-module__filterIcon__T01XsJ",I6="MapContainer-module__details__gM8LWX",rn={root:O6,mapWrapper:P6,wrapperBlurred:k6,locationSelector:T6,filterButton:R6,sidebarOpen:D6,filterIcon:A6,details:I6},j6=()=>{const{onPointClick:t}=Je(),e=pe(Ll),n=Rt(Ig),r=pt(Sl),i=c.useCallback(()=>{pe.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),pe.getState().setDetailsOpen(!1),Rt.getState().setSelectedLocation(null),pt.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(E6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(M6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},N6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),B6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),F6=()=>{const t=Yr(i=>i.open),e=Yr(i=>i.toggle),n=gr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:ge(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(B6,{className:rn.filterIcon,onClick:r}):S.jsx(N6,{className:rn.filterIcon})]})},U6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Je(),i=pe(Tg),o=pe(Ll);return S.jsxs("div",{className:ge(rn.root,e),children:[!r&&!o&&S.jsx(w6,{className:rn.locationSelector}),!n&&S.jsx(F6,{}),S.jsx("div",{className:ge(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(j6,{})]})},V6=c.memo(U6),z6="Separator-module__root__eQtZey",H6={root:z6},ga=({className:t,...e})=>S.jsx("hr",{className:ge(H6.root,t),...e}),$6="Sidebar-module__root__4j1MA3",G6="Sidebar-module__closeButton__HLXy1c",W6="Sidebar-module__open__mqQXF6",Z6="Sidebar-module__header__Afp6uz",q6="Sidebar-module__typeFilter__GN46u9",K6="Sidebar-module__separator__6I4QoJ",Q6="Sidebar-module__withRightPadding__2u1Ina",J6="Sidebar-module__sheetContent__SaoncI",Y6="Sidebar-module__doneButton__4aeaSD",yn={root:$6,closeButton:G6,open:W6,header:Z6,typeFilter:q6,separator:K6,withRightPadding:Q6,sheetContent:J6,doneButton:Y6},X6=()=>{const{t}=ln("common"),e=gr("screenSm"),n=Yr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:yn.header,children:[e&&S.jsx("div",{role:"presentation",className:yn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ni,{className:yn.closeButton,onClick:r})]})},eS="Radio-module__root__7ElY2W",tS="Radio-module__label__c-sYW3",xf={root:eS,label:tS},nS=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:ge(xf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:ge(xf.root,t),...r}),e]})},Dr=t=>S.jsx(nS,{...t,type:"checkbox"}),rS="RadioGroup-module__root__ewZw-x",iS="RadioGroup-module__body__k8BJAs",oS="RadioGroup-module__legend__tcfV7q",va={root:rS,body:iS,legend:oS},jp=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:ge(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),sS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(jp,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Dr,{name:"receive",value:Zt.DressingRoom,label:n("dressing_room")}),S.jsx(Dr,{name:"receive",value:Zt.CheckOrder,label:n("check_order")}),S.jsx(Dr,{name:"receive",value:Zt.PayByCash,label:n("pay_by_cash")})]})},aS=c.memo(sS),lS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(jp,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Dr,{name:"send",value:qt.Return,label:n("sending_returns")}),S.jsx(Dr,{name:"send",value:qt.Shipping,label:n("shipping")}),S.jsx(Dr,{name:"send",value:qt.Payment,label:n("payment")})]})},uS=c.memo(lS),cS="TypeFilter-module__root__WH5EQV",fS="TypeFilter-module__button__f0mSfo",Ho={root:cS,button:fS},dS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:ge(Ho.root,t),children:[S.jsx(Ft,{className:Ho.button,variant:n===vn.All?"primary":"secondary",onClick:i(vn.All),children:r("all")}),S.jsx(Ft,{className:Ho.button,variant:n===vn.PostOffice?"primary":"secondary",onClick:i(vn.PostOffice),children:r("post_office")}),S.jsx(Ft,{className:Ho.button,variant:n===vn.PickPoint?"primary":"secondary",onClick:i(vn.PickPoint),children:r("pick_point")})]})},hS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(dS,{value:n,className:t,onChange:e})},pS=c.memo(hS),gS=({className:t})=>{const e=gr("screenSm"),n=Yr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Yr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(X6,{}),S.jsxs("div",{className:yn.withRightPadding,children:[S.jsx(pS,{className:yn.typeFilter,onChange:r}),S.jsx(ga,{className:yn.separator}),S.jsx(aS,{onChange:o}),S.jsx(ga,{}),S.jsx(uS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:yn.sheetContent,children:a})}):S.jsx("div",{className:ge(yn.root,t,{[yn.open]:n}),children:a})},vS="App-module__map__Kf-2JS",mS="App-module__sidebar__ORIzGk",yS="App-module__header__bgP9DA",ma={map:vS,sidebar:mS,header:yS},bS=new e4,Np=({config:t,options:e})=>{const n=_m(t),{INN:r,cityName:i,countryAbbreviation:o,hideFilters:s,hideHeader:a,locale:l,map:u,regionName:f}=n;on(r,"INN is required"),Mm(r,e),on(u==null?void 0:u.provider,"Map provider is required");const d=FC(u.provider);dm({cityName:i,countryAbbreviation:o,regionName:f});const h=ew({locale:l});return S.jsx(Hp,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(o4,{client:bS,children:S.jsx(zf.Provider,{value:n,children:S.jsx(Ww,{children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(M0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:h&&S.jsx(h6,{children:S.jsx(xw,{children:S.jsxs(Ew,{children:[!a&&S.jsx(yw,{className:ma.header}),!s&&S.jsx(gS,{className:ma.sidebar}),S.jsx(V6,{className:ma.map,children:S.jsx(d,{})}),S.jsx(d6,{})]})})})})})})})})})})},Bp=async t=>Ui.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Fp=c.createContext(null);let ya=!1;const CS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),o=c.useRef(null),s=c.useRef(null),a=c.useCallback(u=>{if(ya){console.warn("Widget already launched");return}ya=!0,n(u)},[]);c.useEffect(()=>()=>{ya=!1},[]);const l=c.useMemo(()=>({widgetOutHolderRef:o,widgetLocationsRef:s,launchWidget:a,setDynamicConfig:i}),[a]);return S.jsxs(Fp.Provider,{value:l,children:[S.jsx("div",{ref:o,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:s,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Np,{options:e.options,config:{...e.config,...r}})})}),t]})};function Up(){const t=c.useContext(Fp);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const wS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Up(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Zt;exports.ESendFilter=qt;exports.ETypeFilter=vn;exports.MapPlaceholder=wS;exports.Widget=Np;exports.WidgetLocationsProvider=CS;exports.createPointsIterator=_a;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Pa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=kl;exports.getNormalizedAddress=Bp;exports.getPropertyValue=yd;exports.isCoordinates=Oa;exports.isDeliveryPoint=lm;exports.isHttpSuccess=md;exports.isPlaceId=vd;exports.replaceSvgCurrentColor=Or;exports.setWidgetCSSProperty=oo;exports.stopImmediatePropagation=Ma;exports.svgStringToBase64URL=Tl;exports.useWidgetLocationsContext=Up;
|
|
263
|
+
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function fC(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ql{constructor(){fC(Ql,google.maps.OverlayView)}}var Bi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Bi||(Bi={}));const dC=(t,e,n)=>{n.fitBounds(e.bounds)};class hC extends Ql{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new lC(r),renderer:o=new cC,onClusterClick:s=dC}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(Tt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Bi.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Bi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new uC(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Bi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function pC(t){var e=x4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new hC(K(K({},t),{map:e}));i(o)}},[e]),r}function gC(t){var e=t.children,n=t.options,r=pC(n);return r!==null?e(r):null}c.memo(gC);var $c={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Gc={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function vC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),E=C[0],m=C[1],_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(x!==null&&google.maps.event.removeListener(x),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&P(google.maps.event.addListener(N,"content_changed",l)),u&&M(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Xe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){E&&google.maps.event.removeListener(E),L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),A&&google.maps.event.removeListener(A),h&&h(N),N.close()}},[]),V.current?ei.createPortal(c.Children.only(e),V.current):null}c.memo(vC);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Xe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Gc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Gc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ei.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),Wc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},mC={};function yC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,E=t.onUnmount,m=c.useContext(le),_=c.useState(null),x=_[0],p=_[1],b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){x!==null&&x.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setDraggable(n)},[x,n]),c.useEffect(function(){typeof r<"u"&&x!==null&&x.setEditable(r)},[x,r]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setPath(o)},[x,o]),c.useEffect(function(){x&&s&&(L!==null&&google.maps.event.removeListener(L),P(google.maps.event.addListener(x,"dblclick",s)))},[s]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(x,"dragend",a)))},[a]),c.useEffect(function(){x&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(x,"dragstart",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"mousedown",u)))},[u]),c.useEffect(function(){x&&f&&(W!==null&&google.maps.event.removeListener(W),H(google.maps.event.addListener(x,"mousemove",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mouseout",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(x,"mouseover",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseup",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"rightclick",y)))},[y]),c.useEffect(function(){x&&g&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(x,"click",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||mC),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&P(google.maps.event.addListener(ie,"dblclick",s)),a&&M(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&ve(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){L!==null&&google.maps.event.removeListener(L),T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),E&&E(ie),ie.setMap(null)}},[]),null}c.memo(yC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Zc,eventMap:Wc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Zc,eventMap:Wc,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var qc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Kc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function bC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,E=t.onLoad,m=t.onUnmount,_=t.onEdit,x=c.useContext(le),p=c.useState(null),b=p[0],L=p[1],P=c.useState(null),O=P[0],T=P[1],M=c.useState(null),R=M[0],A=M[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],W=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],ve=c.useState(null),Pe=ve[0],Z=ve[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],we=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],Ge=je[1];return c.useEffect(function(){b!==null&&b.setMap(x)},[x]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),W(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),we(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),Ge(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:x}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&A(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&W(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&we(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&Ge(google.maps.event.addListener(re,"drag",C)),L(re),E&&E(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(bC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Qc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function CC(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,E=t.onLoad,m=t.onUnmount,_=c.useContext(le),x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],W=c.useState(null),H=W[0],Q=W[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),ve=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],we=c.useState(null),Me=we[0],Ie=we[1],ke=c.useState(null),je=ke[0],ie=ke[1],Ge=c.useState(null),re=Ge[0],tt=Ge[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(ve!==null&&google.maps.event.removeListener(ve),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),E&&E(q),function(){P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(CC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Yc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Xc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},wC={};function SC(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,E=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,x=t.onUnmount,p=c.useContext(le),b=c.useState(null),L=b[0],P=b[1],O=c.useState(null),T=O[0],M=O[1],R=c.useState(null),A=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),W=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],ve=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),we=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),Ge=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],We=tt[1],ze=c.useState(null),Ct=ze[0],ut=ze[1];return c.useEffect(function(){L!==null&&L.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&L!==null&&L.setOptions(e)},[L,e]),c.useEffect(function(){typeof i<"u"&&L!==null&&L.setDraggable(i)},[L,i]),c.useEffect(function(){typeof o<"u"&&L!==null&&L.setEditable(o)},[L,o]),c.useEffect(function(){typeof s<"u"&&L!==null&&L.setVisible(s)},[L,s]),c.useEffect(function(){typeof r=="number"&&L!==null&&L.setRadius(r)},[L,r]),c.useEffect(function(){typeof n<"u"&&L!==null&&L.setCenter(n)},[L,n]),c.useEffect(function(){L&&a&&(T!==null&&google.maps.event.removeListener(T),M(google.maps.event.addListener(L,"dblclick",a)))},[a]),c.useEffect(function(){L&&l&&(A!==null&&google.maps.event.removeListener(A),B(google.maps.event.addListener(L,"dragend",l)))},[l]),c.useEffect(function(){L&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(L,"dragstart",u)))},[u]),c.useEffect(function(){L&&f&&(W!==null&&google.maps.event.removeListener(W),H(google.maps.event.addListener(L,"mousedown",f)))},[f]),c.useEffect(function(){L&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(L,"mousemove",d)))},[d]),c.useEffect(function(){L&&h&&(D!==null&&google.maps.event.removeListener(D),ve(google.maps.event.addListener(L,"mouseout",h)))},[h]),c.useEffect(function(){L&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(L,"mouseover",v)))},[v]),c.useEffect(function(){L&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(L,"mouseup",y)))},[y]),c.useEffect(function(){L&&g&&(we!==null&&google.maps.event.removeListener(we),Me(google.maps.event.addListener(L,"rightclick",g)))},[g]),c.useEffect(function(){L&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(L,"click",w)))},[w]),c.useEffect(function(){L&&C&&(Ge!==null&&google.maps.event.removeListener(Ge),re(google.maps.event.addListener(L,"drag",C)))},[C]),c.useEffect(function(){L&&E&&(q!==null&&google.maps.event.removeListener(q),We(google.maps.event.addListener(L,"center_changed",E)))},[w]),c.useEffect(function(){L&&m&&(Ct!==null&&google.maps.event.removeListener(Ct),ut(google.maps.event.addListener(L,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||wC),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&M(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&ve(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),E&&We(google.maps.event.addListener(se,"center_changed",E)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),P(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),Ct!==null&&google.maps.event.removeListener(Ct),x&&x(se),se.setMap(null)}},[]),null}c.memo(SC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ef={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},tf={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function LC(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),E=c.useState(null),m=E[0],_=E[1],x=c.useState(null),p=x[0],b=x[1],L=c.useState(null),P=L[0],O=L[1],T=c.useState(null),M=T[0],R=T[1],A=c.useState(null),B=A[0],V=A[1],N=c.useState(null),z=N[0],Y=N[1],W=c.useState(null),H=W[0],Q=W[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),ve=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],we=c.useState(null),Me=we[0],Ie=we[1],ke=c.useState(null),je=ke[0],ie=ke[1],Ge=c.useState(null),re=Ge[0],tt=Ge[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(M!==null&&google.maps.event.removeListener(M),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(ve!==null&&google.maps.event.removeListener(ve),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),P!==null&&google.maps.event.removeListener(P),M!==null&&google.maps.event.removeListener(M),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(LC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var nf={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},rf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:rf,eventMap:nf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:rf,eventMap:nf,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function EC(t,e){return new e(t.lat,t.lng)}function xC(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function _C(t,e,n){return t instanceof e?t:n(t,e)}function MC(t,e,n){return t instanceof e?t:n(t,e)}function OC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function PC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?OC(t,e,MC(n,google.maps.LatLngBounds,xC)):PC(t,e,_C(r,google.maps.LatLng,EC))}function kC(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function TC(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function of(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function sf(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function RC(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return TC(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),jf.createPortal(l,f)}c.memo(RC);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Xe(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;kC(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=of(n.position),i=of(this.props.position),o=sf(n.bounds),s=sf(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?jf.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function DC(){}var af={onDblClick:"dblclick",onClick:"click"},lf={opacity:function(t,e){t.setOpacity(e)}};function AC(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(AC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:DC},e.contextType=le,e})(c.PureComponent);var uf={},cf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function IC(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Xe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Xe(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(IC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Xe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Xe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ff={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},df={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var hf={onDirectionsChanged:"directions_changed"},pf={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Xe(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var gf={onPlacesChanged:"places_changed"},vf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Xe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var mf={onPlaceChanged:"place_changed"},yf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Xe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:yf,eventMap:mf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:yf,eventMap:mf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const jC="LocationBalloon-module__root__GtUl6q",NC="LocationBalloon-module__submit__lNcF4k",BC="LocationBalloon-module__details__--VOKk",FC="LocationBalloon-module__icon__X7DOVA",UC="LocationBalloon-module__header__5VQJDW",VC="LocationBalloon-module__titleContainer__BAO73U",zC="LocationBalloon-module__title__bX9pf8",HC="LocationBalloon-module__description__htav7b",$C="LocationBalloon-module__actions__c8dlOR",GC="LocationBalloon-module__close__7Ujvya",Jt={root:jC,submit:NC,details:BC,icon:FC,header:UC,titleContainer:VC,title:zC,description:HC,actions:$C,close:GC},WC={default:Od,llama:Pd},ZC=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Je(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=WC[u];return S.jsxs("div",{className:ge(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(Mt,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(Mt,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ni,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(Mt,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(Mt,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(Mt,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Ft,{id:Qp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(mn,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Ft,{id:Uf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(mn,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},qC=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function KC(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const QC={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},JC=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Je(),{closeSamePoints:d}=sn(),h=Rt(L=>L.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=gr("screenSm"),{isIdle:E}=pe(),m=Dl({isSelectedPoint:w}),_=E&&w&&m&&g,x=c.useMemo(()=>{let L;if(o.type===30)switch(u){case"omni-llama":{w?L=kt.PinLlamaSelected:L=kt.PinLlama;break}case"we-chip":{w?L=kt.PinWeChipSelected:L=kt.PinWeChip;break}default:{w?L=kt.PinOmnicSelected:L=Or(y,v);break}}else w?L=Or(kt.PinPvz,"--owl-color-black"):L=Or(kt.PinPvz,"--owl-color-grey-80");return on(L,"Icon url is not defined"),{url:Tl(L)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:x,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(ZC,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},YC=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Je();return S.jsx(J4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",Ma,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",Ma)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(JC,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},XC=c.memo(YC),e5=t=>{var s;const{locale:e}=Je(),n=c.useId(),r=sn(cm),i=(s=Rt.getState().location)==null?void 0:s.uid,o=JSON.stringify([r.length,e,i,n]);return S.jsx(XC,{points:r,...t},o)},t5=c.memo(e5),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),n5="DeliveryBalloon-module__root__Nu90iy",r5="DeliveryBalloon-module__details__eqUTaI",i5="DeliveryBalloon-module__wh__1lJtLN",o5="DeliveryBalloon-module__header__JVdyxN",s5="DeliveryBalloon-module__title__-zKKCt",a5="DeliveryBalloon-module__description__no5-ki",l5="DeliveryBalloon-module__actions__C-N0H-",u5="DeliveryBalloon-module__errorVariant__e6uhZl",c5="DeliveryBalloon-module__logo__62gC5h",pn={root:n5,details:r5,wh:i5,header:o5,title:s5,description:a5,actions:l5,errorVariant:u5,logo:c5},f5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const{onWarehouseSelect:l,warehouseSelection:u}=Je(),f=pt(m=>m.warehousePoint),d=a==="error",h=a==="default",v=function(){return u?t?"{ courier_balloon.warehouse_title }":S.jsx(mn,{keyName:"warehouse_title",ns:"courier_balloon"}):t?"{ courier_balloon.title }":S.jsx(mn,{keyName:"title",ns:"courier_balloon"})}(),y=t?"{ courier_balloon.error_title }":S.jsx(mn,{keyName:"error_title",ns:"courier_balloon"}),g=t?"{ courier_balloon.error_description }":S.jsx(mn,{keyName:"error_description",ns:"courier_balloon"});function w(){f&&(l==null||l(f))}const{label:C,onClick:E}=u?{onClick:w,label:t?"{ select }":S.jsx(mn,{keyName:"select",ns:"common"})}:{onClick:s,label:t?"{ details }":S.jsx(mn,{keyName:"details",ns:"common"})};return S.jsxs("div",{className:ge(pn.root,n,pn[`${a}Variant`]),children:[S.jsxs("div",{className:pn.header,children:[S.jsx(bp,{className:pn.logo}),S.jsx("span",{className:pn.title,children:d?y:v}),r&&S.jsx(ni,{onClick:o})]}),S.jsx("div",{className:pn.description,children:d?g:e||"{{ properties.address }}"}),h&&(!i||u)&&S.jsx("div",{className:pn.actions,children:S.jsx(Ft,{id:Uf,as:"button",variant:"primary",className:ge(pn.details,u?pn.wh:""),onClick:E,children:C})})]})},d5="Chip-module__root__zsoSyP",h5="Chip-module__active__BlTSFB",bf={root:d5,active:h5},Cf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:ge(bf.root,n,{[bf.active]:t}),children:e}),p5="TextArea-module__root__8YFknR",g5={root:p5},wf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:ge(g5.root,t),onBlur:n,onFocus:i,onChange:r})}),v5=({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},m5="DeliveryDetailsView-module__title__azeoUr",y5="DeliveryDetailsView-module__logo__4zZtpM",b5="DeliveryDetailsView-module__header__oDE9He",C5="DeliveryDetailsView-module__content__6P27SY",w5="DeliveryDetailsView-module__section__2M3Qip",S5="DeliveryDetailsView-module__chips__KmYgha",L5="DeliveryDetailsView-module__actions__43XZ-V",E5="DeliveryDetailsView-module__submit__58LKBw",x5="DeliveryDetailsView-module__actionsHidden__SW-67b",_5="DeliveryDetailsView-module__commentSection__GlX1A2",M5="DeliveryDetailsView-module__comment__2pGG6h",Et={title:m5,logo:y5,header:b5,content:C5,section:w5,chips:S5,actions:L5,submit:E5,actionsHidden:x5,commentSection:_5,comment:M5},O5=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Je(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>v5({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{on(n.address,"Address is required");const b=await Bp({address:n.address,algorithm:10,service:10,language:u||Vf});if(!md(b))return;const L=b==null?void 0:b.data.data,P={...y,address:L};return o==null||o(P),P}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},E=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),x=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:ge(Et.header,t==null?void 0:t.header),children:[S.jsx(ni,{onClick:i}),S.jsxs("div",{className:Et.title,children:[S.jsx(bp,{className:Et.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:ge(Et.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Et.chips,children:[S.jsx(Cf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(Cf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Et.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(wf,{..._,rows:1,onChange:E})]}),S.jsxs("section",{className:ge(Et.section,Et.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(wf,{...x,className:Et.comment,onChange:m})]})]}),S.jsx("div",{className:ge(Et.actions,{[Et.actionsHidden]:e}),children:S.jsx(Ft,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Et.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(O5),P5={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},k5=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Dl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=gr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},E=c.useMemo(()=>({url:Tl(Or(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Jp)}),[]),m=async()=>{var b;try{u(!0);const L=await((b=a.current)==null?void 0:b.submit());if(!L)return;n==null||n(L),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(f5,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:E,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:P5,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&x&&S.jsx(gp,{onCloseClick:C,children:_})]})},T5={place:null,mapKey:""},R5=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"))},uo=Cn((t,e)=>({...T5,setMapKey(n){t({mapKey:n})},async setPlace(n,r,i){var l,u,f,d,h,v;const{map:o}=pe.getState();let s,a;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),Oa(n)){const y=await Pa(n,e().mapKey,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(u=y==null?void 0:y.results)==null?void 0:u.find(g=>{var w;return(w=g.types)==null?void 0:w.includes(i)}))}else if(s=n,s!=null&&s.place_id){const{results:y}=await Pa(s.place_id,e().mapKey);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),on(s,"Place is not defined"),t({place:s}),s},async setPlaceAndPoint(n,r){var u;const i=r==null?void 0:r.types,o=Oa(n)?await e().setPlace(n,i):await e().setPlace(n),s=(u=o.geometry)==null?void 0:u.location;on(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.warehouseSelection&&pt.getState().setWarehousePoint({...o,coords:{lat:s.lat(),lng:s.lng()}}),(!(r!=null&&r.ignoreSelection)||r!=null&&r.warehouseSelection)&&pt.getState().setDeliverPoint(l),o},setPlaceSimple(n,r){var i,o;if(r!=null&&r.withNavigation){const{map:s}=pe.getState();on(s,"Map is not defined");let a;(i=n==null?void 0:n.geometry)!=null&&i.viewport?a=n.geometry.viewport:(o=n==null?void 0:n.geometry)!=null&&o.location&&(a=new google.maps.LatLngBounds,a.extend(n.geometry.location)),a&&(s.fitBounds(a),s.setZoom(12))}t({place:n})}})),D5=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s,warehouseSelection:a}=Je(),l=s==null?void 0:s.primary;function u(){switch(o){case"omnic":return qC;case"omnic-light":return KC(l);default:return}}const f=u(),d=c.useMemo(()=>{var v,y;return{lat:((v=i==null?void 0:i.center)==null?void 0:v[0])??ba[0],lng:((y=i==null?void 0:i.center)==null?void 0:y[1])??ba[1]}},[i==null?void 0:i.center]),h=c.useCallback(async v=>{const{latLng:y}=v;if(!y||r&&!a)return;pe.getState().setDetailsOpen(!1),Rt.getState().setSelectedLocation(null);const g=[y.lat(),y.lng()];console.debug("[OmnicLocationsWidget::mapClick]",g);try{await uo.getState().setPlaceAndPoint(g,{warehouseSelection:a})}catch{pt.getState().setDeliverPoint({address:null,coords:g})}},[r,a]);return S.jsx(R4,{zoom:i==null?void 0:i.initialZoom,center:d,mapContainerClassName:ge(ot.root,e),options:{styles:f,...QC},onClick:h,...n,children:t})},A5=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),I5=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},j5=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=Vp.renderToString(S.jsx(A5,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{kl()})},N5=({className:t})=>{const e=Vn(),n=pe(Og),r=pe(Dg),i=sn(bd),o=pt(Sl),{lmsData:s}=Ts(),{cityName:a,countryAbbreviation:l,disableGeolocation:u,hideDeliveryTime:f,hideDetails:d,hideMapControls:h,onPointClick:v,regionName:y,skipPointInfo:g}=Je(),w=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),pe.getState().setMap(M),pe.getState().setLoaded(),h||(I5(M),u||j5(M))},[u,h]),C=c.useCallback(M=>{const R=s==null?void 0:s.location.what3words,A=R!=null&&R.id?R:void 0;v==null||v(M,A)},[v,s]),E=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),pe.getState().setMap(null)},[]),m=c.useCallback(()=>{if(pe.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext({bounds:[[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],filter:e,city_name:a,country_abbreviation:l,region_name:y}))},[a,l,e,n,y]),_=c.useCallback(async M=>{pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(M)},[]),x=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),p=pe.getState().setDetailsOpen,{getLMSData:b}=C4(),L=M=>{if(b(M.code),g){C(M);return}p(!1),_(M)},P=()=>{p(!1),_(null)},O=M=>{p(!0),_(M)},T=M=>{C(M),p(!1),_(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:ge(ot.mapContainer,t),children:[S.jsxs(D5,{onIdle:m,onLoad:w,onUnmount:E,onTilesLoaded:x,onBoundsChanged:()=>{pe.getState().setIdle(!1)},children:[o&&S.jsx(k5,{hideDeliveryTime:f,hideDetails:d,point:o,setOpenDetails:pe.getState().setDetailsOpen,setDeliveryPoint:pt.getState().setDeliverPoint,onPointClick:C}),S.jsx(t5,{handleCloseClick:P,handleDetailsClick:O,handlePointClick:L,handleSubmitClick:T})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(B3,{handleDetailsClick:O,handlePointClick:L}),S.jsx(d3,{handleCloseClick:P,handleSubmitClick:T})]})},B5=c.memo(N5),F5=t=>({google:B5})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},U5=()=>{throw new Error("useMediaQuery is a client-only hook")};function V5(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,U5)}const z5="768px",H5="1024px",$5="1280px",G5="1536px",W5={screenSm:z5,screenMd:H5,screenLg:$5,screenXl:G5};function gr(t){return V5(`(max-width: calc(${W5[t]} - 1px))`)}const Sp=x0().use(d0()).use(r0()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),Z5=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},q5=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&oo(`--owl-color-${n}`,r)}}},[t])},K5=t=>{c.useEffect(()=>{t&&t!==void 0&&oo("--owl-button-radius",`${t}px`)},[t])},Q5=t=>{c.useEffect(()=>{t&&t!==void 0&&oo("--owl-font",t)},[t])},J5={open:!1},Y5=t=>t.open,er=Cn(t=>({...J5,toggle(e){t(n=>({open:e??!n.open}))}})),X5=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&oo("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Je();return Q5(n),Z5(r),q5(i),K5(o),X5(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Je(),[r,i]=c.useState(e),{loaded:o}=pe();return on(n==null?void 0:n.center,"Map center is required"),on(n==null?void 0:n.initialZoom,"Map initial zoom is required"),c.useEffect(()=>{!o||e||r||kl({success:()=>{i(!0),Rt.getState().setIsTrackingEnabled(!0)},error:()=>{i(!0)}})},[e,r,o]),t},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),ow=()=>{er.getState().toggle(!0),pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=uo(R5),{location:r}=Rt(),o=(r==null?void 0:r.location.full_address)??(n==null?void 0:n.long_name)??e("choose_from_map");return S.jsxs("div",{role:"presentation",className:ge(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsx("span",{className:ha.text,children:o})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),U.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),U.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),U.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),U.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),U.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),U.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",_i={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Je();if(t)return null;const n=gw[e];return S.jsx("div",{className:_i.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Je(),r=pe(Pg),i=pt(Sl);c.useEffect(()=>{i?pe.getState().setMode("location_delivery"):pe.getState().setMode("self_pickup")},[i]);const o=()=>{pt.getState().setDeliverPoint(null),pe.getState().setMode("self_pickup")},s=()=>{pt.getState().setDeliverPoint(null),pe.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:ge(_i.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:_i.nav,children:[!n&&S.jsx(Ft,{as:"link",className:_i.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Ft,{as:"link",className:_i.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Yr=Cn(t=>({...bw,toggle(e){pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},Ew=({children:t})=>{const{hideFilters:e,hideHeader:n}=Je(),r=Yr(i=>i.open);return S.jsx("div",{className:ge(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),xw=({children:t})=>{const e=sn(fm);return sn(bd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var Ep={},Bs={},xp={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};xp.exports=Pw();var kw=xp.exports,Fs={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.loadGoogleMapScript=Xr.isBrowser=void 0;var Op=typeof window<"u"&&window.document;Xr.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};Xr.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var xt=Aw(c),pa=Xr,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Lf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,E=t.language,m=(0,xt.useRef)(null),_=(0,xt.useRef)(null),x=(0,xt.useRef)(null),p=(0,xt.useRef)(null),b=E?"&language=".concat(E):"",L="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,xt.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,L)},[C,L]);return(0,xt.useEffect)(function(){var O=Lf(Lf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(x.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(m.current,O),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),m.current,x.current)}))};return r?P().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,xt.useEffect)(function(){var O;!(xt.default!==null&&xt.default!==void 0&&(O=xt.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,xt.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,xt.useEffect)(function(){x.current&&x.current.setBounds(y)},[y]),(0,xt.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,xt.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:m,autocompleteRef:x}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var bl=Uw(c),Ye=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return bl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Ye.default.string,libraries:Ye.default.arrayOf(Ye.default.string),ref:Ye.default.oneOfType([Ye.default.func,Ye.default.shape({current:Ye.default.any})]),googleMapsScriptBaseUrl:Ye.default.string,onPlaceSelected:Ye.default.func,inputAutocompleteValue:Ye.default.string,options:Ye.default.shape({componentRestrictions:Ye.default.object,bounds:Ye.default.object,location:Ye.default.object,offset:Ye.default.number,origin:Ye.default.object,radius:Ye.default.number,sessionToken:Ye.default.object,types:Ye.default.arrayOf(Ye.default.string)}),language:Ye.default.string};var Hw=(0,bl.forwardRef)(function(t,e){return bl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(Ep);var Dp=Ep;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Gw(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Ww=({children:t})=>{const{gMapKey:e}=Je(),{data:n,isFetching:r}=Gw(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:ge(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",xr={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},Cl=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:ge(xr.locationSearchRoot,t),children:[r&&S.jsx("span",{className:xr.label,children:r}),S.jsxs("div",{className:xr.inputContainer,children:[s&&S.jsx("div",{className:xr.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:xr.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:xr.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(Y5),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Je(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=m=>{er.getState().toggle(!1),uo.getState().setPlaceSimple(m,{withNavigation:!0}),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),E=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ni,{position:"relative",onClick:y})]}),S.jsx(Cl,{...E,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Je(),{mapKey:n}=Ip(),{setMapKey:r}=uo();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:Xp,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},Ef=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),p6="LocationSelector-module__option__WoAxrr",g6="LocationSelector-module__address__huDzWo",v6="LocationSelector-module__icon__90zfxv",m6="LocationSelector-module__inputGoogle__jtuw-y",y6={option:p6,address:g6,icon:v6,inputGoogle:m6},b6=({className:t})=>{const[e,n]=c.useState(""),{t:r}=ln("location_selector"),{country:i,inputs:o,onLocationSelect:s}=Je(),[a,l]=c.useState(""),u=[],f=c.useRef(null),d=i?{componentRestrictions:{country:i},types:u}:{types:u},h=m=>{uo.getState().setPlaceSimple(m,{withNavigation:!0}),s==null||s(m),l(""),n("")},{ref:v}=Dp.usePlacesWidget({libraries:["places"],options:d,onPlaceSelected:h,inputAutocompleteValue:a});c.useEffect(()=>{const m=v.current;if(!m||!e)return;const _=setTimeout(()=>{var b;const x=(b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:b.set;x==null||x.call(m,e),l(e);const p=new Event("input",{bubbles:!0});m.dispatchEvent(p),m.focus()},500);return()=>clearTimeout(_)},[e,v]);const y=()=>{a&&pe.getState().setBlurred(!0),pe.getState().setDetailsOpen(!1),pt.getState().setDeliverPoint(null),Rt.getState().setSelectedLocation(null)},g=()=>{pe.getState().setBlurred(!1)},w=m=>{m.preventDefault(),l(e)},C=m=>{var _;(_=f.current)==null||_.focus(),f.current&&m.key!=="Enter"&&f.current.dispatchEvent(new KeyboardEvent("keydown",{key:m.key}))},E=Ss(o==null?void 0:o.address);return S.jsxs(S.Fragment,{children:[S.jsx(Cl,{...E,value:a,className:ge(t,y6.inputGoogle),endAdornment:S.jsx(Ef,{}),placeholder:r("placeholder"),inputRef:v,onChange:w,onFocus:y,onBlur:g,onKeyDown:C}),S.jsx(Cl,{inputRef:f,className:t,endAdornment:S.jsx(Ef,{}),placeholder:r("placeholder"),value:e,onChange:m=>n(m.currentTarget.value)})]})},C6=({className:t})=>pe(Rg)?S.jsx(b6,{className:t}):null,w6=c.memo(C6),S6="DeliveryDetailsModal-module__root__qwKnjX",L6={root:S6},E6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:ge(L6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),x6="LocationDetailsModal-module__root__PyRnLM",_6={root:x6},M6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:ge(_6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},O6="MapContainer-module__root__1Os6Q-",P6="MapContainer-module__mapWrapper__Cwe7qC",k6="MapContainer-module__wrapperBlurred__04NN2L",T6="MapContainer-module__locationSelector__Pr1zS-",R6="MapContainer-module__filterButton__CW3Qv7",D6="MapContainer-module__sidebarOpen__lGMVrJ",A6="MapContainer-module__filterIcon__T01XsJ",I6="MapContainer-module__details__gM8LWX",rn={root:O6,mapWrapper:P6,wrapperBlurred:k6,locationSelector:T6,filterButton:R6,sidebarOpen:D6,filterIcon:A6,details:I6},j6=()=>{const{onPointClick:t}=Je(),e=pe(Ll),n=Rt(Ig),r=pt(Sl),i=c.useCallback(()=>{pe.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),pe.getState().setDetailsOpen(!1),Rt.getState().setSelectedLocation(null),pt.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(E6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(M6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},N6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),B6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),F6=()=>{const t=Yr(i=>i.open),e=Yr(i=>i.toggle),n=gr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:ge(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(B6,{className:rn.filterIcon,onClick:r}):S.jsx(N6,{className:rn.filterIcon})]})},U6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Je(),i=pe(Tg),o=pe(Ll);return S.jsxs("div",{className:ge(rn.root,e),children:[!r&&!o&&S.jsx(w6,{className:rn.locationSelector}),!n&&S.jsx(F6,{}),S.jsx("div",{className:ge(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(j6,{})]})},V6=c.memo(U6),z6="Separator-module__root__eQtZey",H6={root:z6},ga=({className:t,...e})=>S.jsx("hr",{className:ge(H6.root,t),...e}),$6="Sidebar-module__root__4j1MA3",G6="Sidebar-module__closeButton__HLXy1c",W6="Sidebar-module__open__mqQXF6",Z6="Sidebar-module__header__Afp6uz",q6="Sidebar-module__typeFilter__GN46u9",K6="Sidebar-module__separator__6I4QoJ",Q6="Sidebar-module__withRightPadding__2u1Ina",J6="Sidebar-module__sheetContent__SaoncI",Y6="Sidebar-module__doneButton__4aeaSD",yn={root:$6,closeButton:G6,open:W6,header:Z6,typeFilter:q6,separator:K6,withRightPadding:Q6,sheetContent:J6,doneButton:Y6},X6=()=>{const{t}=ln("common"),e=gr("screenSm"),n=Yr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:yn.header,children:[e&&S.jsx("div",{role:"presentation",className:yn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ni,{className:yn.closeButton,onClick:r})]})},eS="Radio-module__root__7ElY2W",tS="Radio-module__label__c-sYW3",xf={root:eS,label:tS},nS=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:ge(xf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:ge(xf.root,t),...r}),e]})},Dr=t=>S.jsx(nS,{...t,type:"checkbox"}),rS="RadioGroup-module__root__ewZw-x",iS="RadioGroup-module__body__k8BJAs",oS="RadioGroup-module__legend__tcfV7q",va={root:rS,body:iS,legend:oS},jp=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:ge(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),sS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(jp,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Dr,{name:"receive",value:Zt.DressingRoom,label:n("dressing_room")}),S.jsx(Dr,{name:"receive",value:Zt.CheckOrder,label:n("check_order")}),S.jsx(Dr,{name:"receive",value:Zt.PayByCash,label:n("pay_by_cash")})]})},aS=c.memo(sS),lS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(jp,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Dr,{name:"send",value:qt.Return,label:n("sending_returns")}),S.jsx(Dr,{name:"send",value:qt.Shipping,label:n("shipping")}),S.jsx(Dr,{name:"send",value:qt.Payment,label:n("payment")})]})},uS=c.memo(lS),cS="TypeFilter-module__root__WH5EQV",fS="TypeFilter-module__button__f0mSfo",Ho={root:cS,button:fS},dS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:ge(Ho.root,t),children:[S.jsx(Ft,{className:Ho.button,variant:n===vn.All?"primary":"secondary",onClick:i(vn.All),children:r("all")}),S.jsx(Ft,{className:Ho.button,variant:n===vn.PostOffice?"primary":"secondary",onClick:i(vn.PostOffice),children:r("post_office")}),S.jsx(Ft,{className:Ho.button,variant:n===vn.PickPoint?"primary":"secondary",onClick:i(vn.PickPoint),children:r("pick_point")})]})},hS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(dS,{value:n,className:t,onChange:e})},pS=c.memo(hS),gS=({className:t})=>{const e=gr("screenSm"),n=Yr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Yr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(X6,{}),S.jsxs("div",{className:yn.withRightPadding,children:[S.jsx(pS,{className:yn.typeFilter,onChange:r}),S.jsx(ga,{className:yn.separator}),S.jsx(aS,{onChange:o}),S.jsx(ga,{}),S.jsx(uS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:yn.sheetContent,children:a})}):S.jsx("div",{className:ge(yn.root,t,{[yn.open]:n}),children:a})},vS="App-module__map__Kf-2JS",mS="App-module__sidebar__ORIzGk",yS="App-module__header__bgP9DA",ma={map:vS,sidebar:mS,header:yS},bS=new e4,Np=({config:t,options:e})=>{const n=_m(t),{INN:r,cityName:i,countryAbbreviation:o,hideFilters:s,hideHeader:a,locale:l,map:u,regionName:f}=n;on(r,"INN is required"),Mm(r,e),on(u==null?void 0:u.provider,"Map provider is required");const d=F5(u.provider);dm({cityName:i,countryAbbreviation:o,regionName:f});const h=ew({locale:l});return S.jsx(Hp,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(o4,{client:bS,children:S.jsx(zf.Provider,{value:n,children:S.jsx(Ww,{children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(M0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:h&&S.jsx(h6,{children:S.jsx(xw,{children:S.jsxs(Ew,{children:[!a&&S.jsx(yw,{className:ma.header}),!s&&S.jsx(gS,{className:ma.sidebar}),S.jsx(V6,{className:ma.map,children:S.jsx(d,{})}),S.jsx(d6,{})]})})})})})})})})})})},Bp=async t=>Ui.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Fp=c.createContext(null),CS=500;let ya=!1;const wS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),[o,s]=c.useState(),a=c.useRef(null),l=c.useRef(null),u=c.useCallback(d=>{if(ya){console.warn("Widget already launched");return}ya=!0,n(d)},[]);c.useEffect(()=>()=>{ya=!1},[]),c.useEffect(()=>{if(!r)return;const d=setTimeout(()=>{s(r)},CS);return()=>{clearTimeout(d)}},[r]);const f=c.useMemo(()=>({widgetOutHolderRef:a,widgetLocationsRef:l,launchWidget:u,setDynamicConfig:i}),[u]);return S.jsxs(Fp.Provider,{value:f,children:[S.jsx("div",{ref:a,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:l,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Np,{options:e.options,config:{...e.config,...o}})})}),t]})};function Up(){const t=c.useContext(Fp);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const SS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Up(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Zt;exports.ESendFilter=qt;exports.ETypeFilter=vn;exports.MapPlaceholder=SS;exports.Widget=Np;exports.WidgetLocationsProvider=wS;exports.createPointsIterator=_a;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Pa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=kl;exports.getNormalizedAddress=Bp;exports.getPropertyValue=yd;exports.isCoordinates=Oa;exports.isDeliveryPoint=lm;exports.isHttpSuccess=md;exports.isPlaceId=vd;exports.replaceSvgCurrentColor=Or;exports.setWidgetCSSProperty=oo;exports.stopImmediatePropagation=Ma;exports.svgStringToBase64URL=Tl;exports.useWidgetLocationsContext=Up;
|
package/dist/lib/widget.esm.js
CHANGED
|
@@ -327,13 +327,13 @@ const fc = (t) => {
|
|
|
327
327
|
setFilter(e) {
|
|
328
328
|
be.getState().setDetailsOpen(!1), St.getState().setDeliverPoint(null), jt.getState().setSelectedLocation(null), t(e);
|
|
329
329
|
}
|
|
330
|
-
})),
|
|
330
|
+
})), GL = (t) => {
|
|
331
331
|
const [e, n] = t.split(":");
|
|
332
332
|
return Number(e) * 60 + Number(n);
|
|
333
|
-
},
|
|
333
|
+
}, WL = (t) => {
|
|
334
334
|
const e = Math.floor(t / 60), n = t % 60;
|
|
335
335
|
return `${e < 10 ? `0${e}` : e}:${n < 10 ? `0${n}` : n}`;
|
|
336
|
-
},
|
|
336
|
+
}, ZL = (t, e) => [
|
|
337
337
|
[t[0] - e, t[0] + e],
|
|
338
338
|
[t[1] - e, t[1] + e]
|
|
339
339
|
];
|
|
@@ -2034,7 +2034,7 @@ const Df = (t) => {
|
|
|
2034
2034
|
let n = t;
|
|
2035
2035
|
const r = (e.includes("--owl") ? Em(e) : e) || "";
|
|
2036
2036
|
return n = n.replaceAll("currentColor", r), n;
|
|
2037
|
-
},
|
|
2037
|
+
}, qL = (t) => "comment" in t && "address" in t && "apartment_number" in t && "delivery_time" in t, xm = {
|
|
2038
2038
|
points: [],
|
|
2039
2039
|
samePoints: [],
|
|
2040
2040
|
error: !1,
|
|
@@ -18763,30 +18763,39 @@ const Qp = Fs(null), l6 = ({ children: t }) => {
|
|
|
18763
18763
|
data: t,
|
|
18764
18764
|
// TODO: move to env
|
|
18765
18765
|
headers: { Authorization: "Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9" }
|
|
18766
|
-
}), Xp = Fs(null);
|
|
18766
|
+
}), Xp = Fs(null), FL = 500;
|
|
18767
18767
|
let Aa = !1;
|
|
18768
|
-
const
|
|
18769
|
-
const [e, n] = R(), [r, i] = R(), o = ne(null),
|
|
18768
|
+
const JL = ({ children: t }) => {
|
|
18769
|
+
const [e, n] = R(), [r, i] = R(), [o, s] = R(), a = ne(null), l = ne(null), c = ee((d) => {
|
|
18770
18770
|
if (Aa) {
|
|
18771
18771
|
console.warn("Widget already launched");
|
|
18772
18772
|
return;
|
|
18773
18773
|
}
|
|
18774
|
-
Aa = !0, n(
|
|
18774
|
+
Aa = !0, n(d);
|
|
18775
18775
|
}, []);
|
|
18776
18776
|
E(() => () => {
|
|
18777
18777
|
Aa = !1;
|
|
18778
|
-
}, [])
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18778
|
+
}, []), E(() => {
|
|
18779
|
+
if (!r)
|
|
18780
|
+
return;
|
|
18781
|
+
const d = setTimeout(() => {
|
|
18782
|
+
s(r);
|
|
18783
|
+
}, FL);
|
|
18784
|
+
return () => {
|
|
18785
|
+
clearTimeout(d);
|
|
18786
|
+
};
|
|
18787
|
+
}, [r]);
|
|
18788
|
+
const u = mt(() => ({
|
|
18789
|
+
widgetOutHolderRef: a,
|
|
18790
|
+
widgetLocationsRef: l,
|
|
18791
|
+
launchWidget: c,
|
|
18783
18792
|
setDynamicConfig: i
|
|
18784
|
-
}), [
|
|
18785
|
-
return /* @__PURE__ */ z(Xp.Provider, { value:
|
|
18786
|
-
/* @__PURE__ */ M("div", { ref:
|
|
18793
|
+
}), [c]);
|
|
18794
|
+
return /* @__PURE__ */ z(Xp.Provider, { value: u, children: [
|
|
18795
|
+
/* @__PURE__ */ M("div", { ref: a, style: { position: "fixed", left: "-9999px", top: "-9999px" }, children: /* @__PURE__ */ M(
|
|
18787
18796
|
"div",
|
|
18788
18797
|
{
|
|
18789
|
-
ref:
|
|
18798
|
+
ref: l,
|
|
18790
18799
|
id: "@omnic/widget-locations",
|
|
18791
18800
|
style: {
|
|
18792
18801
|
height: "100%",
|
|
@@ -18798,7 +18807,7 @@ const QL = ({ children: t }) => {
|
|
|
18798
18807
|
options: e.options,
|
|
18799
18808
|
config: {
|
|
18800
18809
|
...e.config,
|
|
18801
|
-
...
|
|
18810
|
+
...o
|
|
18802
18811
|
}
|
|
18803
18812
|
}
|
|
18804
18813
|
)
|
|
@@ -18807,14 +18816,14 @@ const QL = ({ children: t }) => {
|
|
|
18807
18816
|
t
|
|
18808
18817
|
] });
|
|
18809
18818
|
};
|
|
18810
|
-
function
|
|
18819
|
+
function UL() {
|
|
18811
18820
|
const t = rt(Xp);
|
|
18812
18821
|
if (!t)
|
|
18813
18822
|
throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");
|
|
18814
18823
|
return t;
|
|
18815
18824
|
}
|
|
18816
|
-
const
|
|
18817
|
-
const { setDynamicConfig: e, widgetLocationsRef: n, widgetOutHolderRef: r } =
|
|
18825
|
+
const YL = (t) => {
|
|
18826
|
+
const { setDynamicConfig: e, widgetLocationsRef: n, widgetOutHolderRef: r } = UL(), i = ne(null);
|
|
18818
18827
|
return E(() => {
|
|
18819
18828
|
t && e(t);
|
|
18820
18829
|
}, [t, e]), E(() => {
|
|
@@ -18828,25 +18837,25 @@ export {
|
|
|
18828
18837
|
pn as EReceiveFilter,
|
|
18829
18838
|
gn as ESendFilter,
|
|
18830
18839
|
Un as ETypeFilter,
|
|
18831
|
-
|
|
18840
|
+
YL as MapPlaceholder,
|
|
18832
18841
|
NL as Widget,
|
|
18833
|
-
|
|
18842
|
+
JL as WidgetLocationsProvider,
|
|
18834
18843
|
_c as createPointsIterator,
|
|
18835
18844
|
Ec as fetchPointsRequest,
|
|
18836
|
-
|
|
18837
|
-
|
|
18845
|
+
GL as fromHoursMinutesToMinutes,
|
|
18846
|
+
WL as fromMinutesToHoursMinutes,
|
|
18838
18847
|
Pc as getAddressFormGeocode,
|
|
18839
|
-
|
|
18848
|
+
ZL as getBoundsFromPoint,
|
|
18840
18849
|
Df as getCurrentPosition,
|
|
18841
18850
|
BL as getNormalizedAddress,
|
|
18842
18851
|
Em as getPropertyValue,
|
|
18843
18852
|
Mc as isCoordinates,
|
|
18844
|
-
|
|
18853
|
+
qL as isDeliveryPoint,
|
|
18845
18854
|
Sm as isHttpSuccess,
|
|
18846
18855
|
Lm as isPlaceId,
|
|
18847
18856
|
Ui as replaceSvgCurrentColor,
|
|
18848
18857
|
Ws as setWidgetCSSProperty,
|
|
18849
18858
|
Oc as stopImmediatePropagation,
|
|
18850
18859
|
Af as svgStringToBase64URL,
|
|
18851
|
-
|
|
18860
|
+
UL as useWidgetLocationsContext
|
|
18852
18861
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnic/widget-locations",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.65",
|
|
4
4
|
"description": "Simple map widget for Omnic Delivery applications",
|
|
5
5
|
"files": [
|
|
6
6
|
"@types",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"lerna": "8.1.2",
|
|
74
74
|
"sass": "1.72.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "e5bfbace1dadce408b57f253f27bcb135ab1bdc6"
|
|
77
77
|
}
|