"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1255],{37054:function(e,t,n){n.r(t),n.d(t,{Autocomplete:function(){return Cn},BicyclingLayer:function(){return Y},BicyclingLayerF:function(){return K},Circle:function(){return Ot},CircleF:function(){return It},Data:function(){return Tt},DataF:function(){return Bt},DirectionsRenderer:function(){return hn},DirectionsService:function(){return cn},DistanceMatrixService:function(){return mn},DrawingManager:function(){return te},DrawingManagerF:function(){return ee},FLOAT_PANE:function(){return Ht},GoogleMap:function(){return E},GoogleMapsMarkerClusterer:function(){return at},GoogleMarkerClusterer:function(){return lt},GroundOverlay:function(){return tn},GroundOverlayF:function(){return en},HeatmapLayer:function(){return rn},HeatmapLayerF:function(){return sn},InfoBox:function(){return Ee},InfoBoxF:function(){return Me},InfoWindow:function(){return dt},InfoWindowF:function(){return ct},KmlLayer:function(){return zt},LoadScript:function(){return B},LoadScriptNext:function(){return U},MAP_PANE:function(){return Ft},MARKER_LAYER:function(){return Gt},MapContext:function(){return h},Marker:function(){return re},MarkerClusterer:function(){return fe},MarkerClustererF:function(){return me},MarkerF:function(){return ie},OVERLAY_LAYER:function(){return $t},OVERLAY_MOUSE_TARGET:function(){return Kt},OverlayView:function(){return qt},OverlayViewF:function(){return Yt},Polygon:function(){return Ct},PolygonF:function(){return bt},Polyline:function(){return vt},PolylineF:function(){return ft},Rectangle:function(){return kt},RectangleF:function(){return xt},StandaloneSearchBox:function(){return yn},StreetViewPanorama:function(){return un},StreetViewService:function(){return pn},TrafficLayer:function(){return $},TrafficLayerF:function(){return G},TransitLayer:function(){return J},TransitLayerF:function(){return q},useGoogleMap:function(){return m},useJsApiLoader:function(){return N},useLoadScript:function(){return T}});var o=n(85893),s=n(67294),i=n(73935),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&s[s.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},t.injectScript=function(){t.props.preventGoogleFontsLoading&&S(),g(!!t.props.id,'LoadScript requires "id" prop to be a string: %s',t.props.id),k({id:t.props.id,nonce:t.props.nonce,url:P(t.props)}).then((function(){t.props.onLoad&&t.props.onLoad(),t.setState((function(){return{loaded:!0}}))})).catch((function(e){t.props.onError&&t.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(t.props.googleMapsApiKey||"-",") or Client ID (").concat(t.props.googleMapsClientId||"-",") to \n Otherwise it is a Network issue.\n "))}))},t}return a(t,e),t.prototype.componentDidMount=function(){if(x){if(window.google&&window.google.maps&&!I)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}},t.prototype.componentDidUpdate=function(e){this.props.libraries!==e.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"),x&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))},t.prototype.componentWillUnmount=function(){var e=this;if(x){this.cleanup();window.setTimeout((function(){e.check.current||(delete window.google,I=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}},t.prototype.render=function(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||(0,o.jsx)(O,{})]})},t.defaultProps=_,t}(s.PureComponent);function T(e){var t=e.id,n=void 0===t?_.id:t,o=e.version,i=void 0===o?_.version:o,r=e.nonce,a=e.googleMapsApiKey,l=e.googleMapsClientId,u=e.language,p=e.region,c=e.libraries,d=e.preventGoogleFontsLoading,h=e.channel,m=e.mapIds,f=e.authReferrerPolicy,v=(0,s.useRef)(!1),y=(0,s.useState)(!1),L=y[0],b=y[1],C=(0,s.useState)(void 0),M=C[0],E=C[1];(0,s.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]),(0,s.useEffect)((function(){x&&d&&S()}),[d]),(0,s.useEffect)((function(){L&&g(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[L]);var w=P({version:i,googleMapsApiKey:a,googleMapsClientId:l,language:u,region:p,libraries:c,channel:h,mapIds:m,authReferrerPolicy:f});(0,s.useEffect)((function(){function e(){v.current&&(b(!0),D=w)}x&&(window.google&&window.google.maps&&D===w?e():k({id:n,url:w,nonce:r}).then(e).catch((function(e){v.current&&E(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(a||"-",") or Client ID (").concat(l||"-",")\n Otherwise it is a Network issue.\n ")),console.error(e)})))}),[n,w,r]);var I=(0,s.useRef)();return(0,s.useEffect)((function(){I.current&&c!==I.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"),I.current=c}),[c]),{isLoaded:L,loadError:M,url:w}}var R=(0,o.jsx)(O,{});var U=(0,s.memo)((function(e){var t=e.loadingElement,n=e.onLoad,o=e.onError,i=e.onUnmount,r=e.children,a=T(u(e,["loadingElement","onLoad","onError","onUnmount","children"])),l=a.isLoaded,p=a.loadError;return(0,s.useEffect)((function(){l&&"function"===typeof n&&n()}),[l,n]),(0,s.useEffect)((function(){p&&"function"===typeof o&&o(p)}),[p,o]),(0,s.useEffect)((function(){return function(){i&&i()}}),[i]),l?r:t||R}));function z(e,t,n,o){return new(n||(n=Promise))((function(s,i){function r(e){try{l(o.next(e))}catch(t){i(t)}}function a(e){try{l(o.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}l((o=o.apply(e,t||[])).next())}))}var A=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,s,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(s=o;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=o;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=o;0!==s--;){var r=i[s];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n};const j="__googleMapsScriptId";var Z;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(Z||(Z={}));class V{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:o,id:s=j,language:i,libraries:r=[],mapIds:a,nonce:l,region:u,retries:p=3,url:c="https://maps.googleapis.com/maps/api/js",version:d}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=o,this.id=s||j,this.language=i,this.libraries=r,this.mapIds=a,this.nonce=l,this.region=u,this.retries=p,this.url=c,this.version=d,V.instance){if(!A(this.options,V.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(V.instance.options)}`);return V.instance}V.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Z.FAILURE:this.done?Z.SUCCESS:this.loading?Z.LOADING:Z.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,n,o,s="The Google Maps JavaScript API",i="google",r="importLibrary",a="__ib__",l=document,u=window;u=u[i]||(u[i]={});const p=u.maps||(u.maps={}),c=new Set,d=new URLSearchParams,g=()=>t||(t=new Promise(((r,u)=>z(this,void 0,void 0,(function*(){var g;for(o in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...c]+""),e)d.set(o.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[o]);d.set("callback",i+".maps."+a),n.src=this.url+"?"+d,p[a]=r,n.onerror=()=>t=u(Error(s+" could not load.")),n.nonce=this.nonce||(null===(g=l.querySelector("script[nonce]"))||void 0===g?void 0:g.nonce)||"",l.head.append(n)})))));p[r]?console.warn(s+" only loads once. Ignoring:",e):p[r]=(e,...t)=>c.add(e)&&g().then((()=>p[r](e,...t)))})(n);const o=this.libraries.map((e=>this.importLibrary(e)));o.length||o.push(this.importLibrary("core")),Promise.all(o).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}var W=["maps"];function N(e){var t=e.id,n=void 0===t?_.id:t,o=e.version,i=void 0===o?_.version:o,r=e.nonce,a=e.googleMapsApiKey,l=e.language,u=e.region,p=e.libraries,c=void 0===p?W:p,d=e.preventGoogleFontsLoading,g=e.mapIds,h=e.authReferrerPolicy,m=(0,s.useRef)(!1),f=(0,s.useState)(!1),v=f[0],y=f[1],L=(0,s.useState)(void 0),b=L[0],C=L[1];(0,s.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var M=(0,s.useMemo)((function(){return new V({id:n,apiKey:a,version:i,libraries:c,language:l||"en",region:u||"US",mapIds:g||[],nonce:r||"",authReferrerPolicy:h||"origin"})}),[n,a,i,c,l,u,g,r,h]);(0,s.useEffect)((function(){v||M.load().then((function(){m.current&&y(!0)})).catch((function(e){C(e)}))}),[]),(0,s.useEffect)((function(){x&&d&&S()}),[d]);var E=(0,s.useRef)();return(0,s.useEffect)((function(){E.current&&c!==E.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"),E.current=c}),[c]),{isLoaded:v,loadError:b}}var H={},F={options:function(e,t){e.setOptions(t)}};var G=(0,s.memo)((function(e){var t=e.options,n=e.onLoad,o=e.onUnmount,i=(0,s.useContext)(h),r=(0,s.useState)(null),a=r[0],u=r[1];return(0,s.useEffect)((function(){null!==a&&a.setMap(i)}),[i]),(0,s.useEffect)((function(){t&&null!==a&&a.setOptions(t)}),[a,t]),(0,s.useEffect)((function(){var e=new google.maps.TrafficLayer(l(l({},t||{}),{map:i}));return u(e),n&&n(e),function(){null!==a&&(o&&o(a),a.setMap(null))}}),[]),null})),$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.TrafficLayer(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:F,eventMap:H,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:F,eventMap:H,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},t.prototype.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),L(this.registeredEvents),this.state.trafficLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent);var K=(0,s.memo)((function(e){var t=e.onLoad,n=e.onUnmount,o=(0,s.useContext)(h),i=(0,s.useState)(null),r=i[0],a=i[1];return(0,s.useEffect)((function(){null!==r&&r.setMap(o)}),[o]),(0,s.useEffect)((function(){var e=new google.maps.BicyclingLayer;return a(e),e.setMap(o),t&&t(e),function(){null!==e&&(n&&n(e),e.setMap(null))}}),[]),null})),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState((function(){return{bicyclingLayer:e}}),this.setBicyclingLayerCallback)},t.prototype.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent);var q=(0,s.memo)((function(e){var t=e.onLoad,n=e.onUnmount,o=(0,s.useContext)(h),i=(0,s.useState)(null),r=i[0],a=i[1];return(0,s.useEffect)((function(){null!==r&&r.setMap(o)}),[o]),(0,s.useEffect)((function(){var e=new google.maps.TransitLayer;return a(e),e.setMap(o),t&&t(e),function(){null!==r&&(n&&n(r),r.setMap(null))}}),[]),null})),J=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={transitLayer:null},t.setTransitLayerCallback=function(){null!==t.state.transitLayer&&(t.state.transitLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.transitLayer))},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)},t.prototype.componentWillUnmount=function(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),X={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Q={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}};var ee=(0,s.memo)((function(e){var t=e.options,n=e.drawingMode,o=e.onCircleComplete,i=e.onMarkerComplete,r=e.onOverlayComplete,a=e.onPolygonComplete,u=e.onPolylineComplete,p=e.onRectangleComplete,c=e.onLoad,d=e.onUnmount,m=(0,s.useContext)(h),f=(0,s.useState)(null),v=f[0],y=f[1],L=(0,s.useState)(null),b=L[0],C=L[1],M=(0,s.useState)(null),E=M[0],x=M[1],k=(0,s.useState)(null),w=k[0],S=k[1],P=(0,s.useState)(null),I=P[0],O=P[1],D=(0,s.useState)(null),_=D[0],B=D[1],T=(0,s.useState)(null),R=T[0],U=T[1];return(0,s.useEffect)((function(){null!==v&&v.setMap(m)}),[m]),(0,s.useEffect)((function(){t&&null!==v&&v.setOptions(t)}),[v,t]),(0,s.useEffect)((function(){n&&null!==v&&v.setDrawingMode(n)}),[v,n]),(0,s.useEffect)((function(){v&&o&&(null!==b&&google.maps.event.removeListener(b),C(google.maps.event.addListener(v,"circlecomplete",o)))}),[v,o]),(0,s.useEffect)((function(){v&&i&&(null!==E&&google.maps.event.removeListener(E),x(google.maps.event.addListener(v,"markercomplete",i)))}),[v,i]),(0,s.useEffect)((function(){v&&r&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(v,"overlaycomplete",r)))}),[v,r]),(0,s.useEffect)((function(){v&&a&&(null!==I&&google.maps.event.removeListener(I),O(google.maps.event.addListener(v,"polygoncomplete",a)))}),[v,a]),(0,s.useEffect)((function(){v&&u&&(null!==_&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"polylinecomplete",u)))}),[v,u]),(0,s.useEffect)((function(){v&&p&&(null!==R&&google.maps.event.removeListener(R),U(google.maps.event.addListener(v,"rectanglecomplete",p)))}),[v,p]),(0,s.useEffect)((function(){g(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var e=new google.maps.drawing.DrawingManager(l(l({},t||{}),{map:m}));return n&&e.setDrawingMode(n),o&&C(google.maps.event.addListener(e,"circlecomplete",o)),i&&x(google.maps.event.addListener(e,"markercomplete",i)),r&&S(google.maps.event.addListener(e,"overlaycomplete",r)),a&&O(google.maps.event.addListener(e,"polygoncomplete",a)),u&&B(google.maps.event.addListener(e,"polylinecomplete",u)),p&&U(google.maps.event.addListener(e,"rectanglecomplete",p)),y(e),c&&c(e),function(){null!==v&&(b&&google.maps.event.removeListener(b),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),I&&google.maps.event.removeListener(I),_&&google.maps.event.removeListener(_),R&&google.maps.event.removeListener(R),d&&d(v),v.setMap(null))}}),[]),null})),te=function(e){function t(t){var n=e.call(this,t)||this;return n.registeredEvents=[],n.state={drawingManager:null},n.setDrawingManagerCallback=function(){null!==n.state.drawingManager&&n.props.onLoad&&n.props.onLoad(n.state.drawingManager)},g(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),n}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:Q,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.drawingManager&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:Q,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},t.prototype.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),L(this.registeredEvents),this.state.drawingManager.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),ne={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"},oe={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},se={};var ie=(0,s.memo)((function(e){var t=e.position,n=e.options,i=e.clusterer,r=e.noClustererRedraw,a=e.children,u=e.draggable,p=e.visible,c=e.animation,d=e.clickable,g=e.cursor,m=e.icon,f=e.label,v=e.opacity,y=e.shape,L=e.title,b=e.zIndex,C=e.onClick,M=e.onDblClick,E=e.onDrag,x=e.onDragEnd,k=e.onDragStart,w=e.onMouseOut,S=e.onMouseOver,P=e.onMouseUp,I=e.onMouseDown,O=e.onRightClick,D=e.onClickableChanged,_=e.onCursorChanged,B=e.onAnimationChanged,T=e.onDraggableChanged,R=e.onFlatChanged,U=e.onIconChanged,z=e.onPositionChanged,A=e.onShapeChanged,j=e.onTitleChanged,Z=e.onVisibleChanged,V=e.onZindexChanged,W=e.onLoad,N=e.onUnmount,H=(0,s.useContext)(h),F=(0,s.useState)(null),G=F[0],$=F[1],K=(0,s.useState)(null),Y=K[0],q=K[1],J=(0,s.useState)(null),X=J[0],Q=J[1],ee=(0,s.useState)(null),te=ee[0],ne=ee[1],oe=(0,s.useState)(null),ie=oe[0],re=oe[1],ae=(0,s.useState)(null),le=ae[0],ue=ae[1],pe=(0,s.useState)(null),ce=pe[0],de=pe[1],ge=(0,s.useState)(null),he=ge[0],me=ge[1],fe=(0,s.useState)(null),ve=fe[0],ye=fe[1],Le=(0,s.useState)(null),be=Le[0],Ce=Le[1],Me=(0,s.useState)(null),Ee=Me[0],xe=Me[1],ke=(0,s.useState)(null),we=ke[0],Se=ke[1],Pe=(0,s.useState)(null),Ie=Pe[0],Oe=Pe[1],De=(0,s.useState)(null),_e=De[0],Be=De[1],Te=(0,s.useState)(null),Re=Te[0],Ue=Te[1],ze=(0,s.useState)(null),Ae=ze[0],je=ze[1],Ze=(0,s.useState)(null),Ve=Ze[0],We=Ze[1],Ne=(0,s.useState)(null),He=Ne[0],Fe=Ne[1],Ge=(0,s.useState)(null),$e=Ge[0],Ke=Ge[1],Ye=(0,s.useState)(null),qe=Ye[0],Je=Ye[1],Xe=(0,s.useState)(null),Qe=Xe[0],et=Xe[1],tt=(0,s.useState)(null),nt=tt[0],ot=tt[1];(0,s.useEffect)((function(){null!==G&&G.setMap(H)}),[H]),(0,s.useEffect)((function(){"undefined"!==typeof n&&null!==G&&G.setOptions(n)}),[G,n]),(0,s.useEffect)((function(){"undefined"!==typeof u&&null!==G&&G.setDraggable(u)}),[G,u]),(0,s.useEffect)((function(){t&&null!==G&&G.setPosition(t)}),[G,t]),(0,s.useEffect)((function(){"undefined"!==typeof p&&null!==G&&G.setVisible(p)}),[G,p]),(0,s.useEffect)((function(){null===G||void 0===G||G.setAnimation(c)}),[G,c]),(0,s.useEffect)((function(){G&&M&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(G,"dblclick",M)))}),[M]),(0,s.useEffect)((function(){G&&x&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(G,"dragend",x)))}),[x]),(0,s.useEffect)((function(){G&&k&&(null!==te&&google.maps.event.removeListener(te),ne(google.maps.event.addListener(G,"dragstart",k)))}),[k]),(0,s.useEffect)((function(){G&&I&&(null!==ie&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(G,"mousedown",I)))}),[I]),(0,s.useEffect)((function(){G&&w&&(null!==le&&google.maps.event.removeListener(le),ue(google.maps.event.addListener(G,"mouseout",w)))}),[w]),(0,s.useEffect)((function(){G&&S&&(null!==ce&&google.maps.event.removeListener(ce),de(google.maps.event.addListener(G,"mouseover",S)))}),[S]),(0,s.useEffect)((function(){G&&P&&(null!==he&&google.maps.event.removeListener(he),me(google.maps.event.addListener(G,"mouseup",P)))}),[P]),(0,s.useEffect)((function(){G&&O&&(null!==ve&&google.maps.event.removeListener(ve),ye(google.maps.event.addListener(G,"rightclick",O)))}),[O]),(0,s.useEffect)((function(){G&&C&&(null!==be&&google.maps.event.removeListener(be),Ce(google.maps.event.addListener(G,"click",C)))}),[C]),(0,s.useEffect)((function(){G&&E&&(null!==Ee&&google.maps.event.removeListener(Ee),xe(google.maps.event.addListener(G,"drag",E)))}),[E]),(0,s.useEffect)((function(){G&&D&&(null!==we&&google.maps.event.removeListener(we),Se(google.maps.event.addListener(G,"clickable_changed",D)))}),[D]),(0,s.useEffect)((function(){G&&_&&(null!==Ie&&google.maps.event.removeListener(Ie),Oe(google.maps.event.addListener(G,"cursor_changed",_)))}),[_]),(0,s.useEffect)((function(){G&&B&&(null!==_e&&google.maps.event.removeListener(_e),Be(google.maps.event.addListener(G,"animation_changed",B)))}),[B]),(0,s.useEffect)((function(){G&&T&&(null!==Re&&google.maps.event.removeListener(Re),Ue(google.maps.event.addListener(G,"draggable_changed",T)))}),[T]),(0,s.useEffect)((function(){G&&R&&(null!==Ae&&google.maps.event.removeListener(Ae),je(google.maps.event.addListener(G,"flat_changed",R)))}),[R]),(0,s.useEffect)((function(){G&&U&&(null!==Ve&&google.maps.event.removeListener(Ve),We(google.maps.event.addListener(G,"icon_changed",U)))}),[U]),(0,s.useEffect)((function(){G&&z&&(null!==He&&google.maps.event.removeListener(He),Fe(google.maps.event.addListener(G,"position_changed",z)))}),[z]),(0,s.useEffect)((function(){G&&A&&(null!==$e&&google.maps.event.removeListener($e),Ke(google.maps.event.addListener(G,"shape_changed",A)))}),[A]),(0,s.useEffect)((function(){G&&j&&(null!==qe&&google.maps.event.removeListener(qe),Je(google.maps.event.addListener(G,"title_changed",j)))}),[j]),(0,s.useEffect)((function(){G&&Z&&(null!==Qe&&google.maps.event.removeListener(Qe),et(google.maps.event.addListener(G,"visible_changed",Z)))}),[Z]),(0,s.useEffect)((function(){G&&V&&(null!==nt&&google.maps.event.removeListener(nt),ot(google.maps.event.addListener(G,"zindex_changed",V)))}),[V]),(0,s.useEffect)((function(){var e=l(l(l({},n||se),i?se:{map:H}),{position:t}),o=new google.maps.Marker(e);return i?i.addMarker(o,!!r):o.setMap(H),t&&o.setPosition(t),"undefined"!==typeof p&&o.setVisible(p),"undefined"!==typeof u&&o.setDraggable(u),"undefined"!==typeof d&&o.setClickable(d),"string"===typeof g&&o.setCursor(g),m&&o.setIcon(m),"undefined"!==typeof f&&o.setLabel(f),"undefined"!==typeof v&&o.setOpacity(v),y&&o.setShape(y),"string"===typeof L&&o.setTitle(L),"number"===typeof b&&o.setZIndex(b),M&&q(google.maps.event.addListener(o,"dblclick",M)),x&&Q(google.maps.event.addListener(o,"dragend",x)),k&&ne(google.maps.event.addListener(o,"dragstart",k)),I&&re(google.maps.event.addListener(o,"mousedown",I)),w&&ue(google.maps.event.addListener(o,"mouseout",w)),S&&de(google.maps.event.addListener(o,"mouseover",S)),P&&me(google.maps.event.addListener(o,"mouseup",P)),O&&ye(google.maps.event.addListener(o,"rightclick",O)),C&&Ce(google.maps.event.addListener(o,"click",C)),E&&xe(google.maps.event.addListener(o,"drag",E)),D&&Se(google.maps.event.addListener(o,"clickable_changed",D)),_&&Oe(google.maps.event.addListener(o,"cursor_changed",_)),B&&Be(google.maps.event.addListener(o,"animation_changed",B)),T&&Ue(google.maps.event.addListener(o,"draggable_changed",T)),R&&je(google.maps.event.addListener(o,"flat_changed",R)),U&&We(google.maps.event.addListener(o,"icon_changed",U)),z&&Fe(google.maps.event.addListener(o,"position_changed",z)),A&&Ke(google.maps.event.addListener(o,"shape_changed",A)),j&&Je(google.maps.event.addListener(o,"title_changed",j)),Z&&et(google.maps.event.addListener(o,"visible_changed",Z)),V&&ot(google.maps.event.addListener(o,"zindex_changed",V)),$(o),W&&W(o),function(){null!==Y&&google.maps.event.removeListener(Y),null!==X&&google.maps.event.removeListener(X),null!==te&&google.maps.event.removeListener(te),null!==ie&&google.maps.event.removeListener(ie),null!==le&&google.maps.event.removeListener(le),null!==ce&&google.maps.event.removeListener(ce),null!==he&&google.maps.event.removeListener(he),null!==ve&&google.maps.event.removeListener(ve),null!==be&&google.maps.event.removeListener(be),null!==we&&google.maps.event.removeListener(we),null!==Ie&&google.maps.event.removeListener(Ie),null!==_e&&google.maps.event.removeListener(_e),null!==Re&&google.maps.event.removeListener(Re),null!==Ae&&google.maps.event.removeListener(Ae),null!==Ve&&google.maps.event.removeListener(Ve),null!==He&&google.maps.event.removeListener(He),null!==qe&&google.maps.event.removeListener(qe),null!==Qe&&google.maps.event.removeListener(Qe),null!==nt&&google.maps.event.removeListener(nt),N&&N(o),i?i.removeMarker(o,!!r):o&&o.setMap(null)}}),[]);var st=(0,s.useMemo)((function(){return a?s.Children.map(a,(function(e){if(!(0,s.isValidElement)(e))return e;var t=e;return(0,s.cloneElement)(t,{anchor:G})})):null}),[a,G]);return(0,o.jsx)(o.Fragment,{children:st})||null})),re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t}return a(t,e),t.prototype.componentDidMount=function(){var e=l(l(l({},this.props.options||se),this.props.clusterer?se:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(e),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=b({updaterMap:oe,eventMap:ne,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},t.prototype.componentDidUpdate=function(e){this.marker&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:oe,eventMap:ne,prevProps:e,nextProps:this.props,instance:this.marker}))},t.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),L(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},t.prototype.render=function(){var e=this,t=null;return this.props.children&&(t=s.Children.map(this.props.children,(function(t){if(!(0,s.isValidElement)(t))return t;var n=t;return(0,s.cloneElement)(n,{anchor:e.marker})}))),t||null},t.contextType=h,t}(s.PureComponent),ae=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,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(t.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 e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var t=this.cluster.getClusterer();if(google.maps.event.trigger(t,"click",this.cluster),google.maps.event.trigger(t,"clusterclick",this.cluster),t.getZoomOnClick()){var n=t.getMaxZoom(),o=this.cluster.getBounds(),s=t.getMap();null!==s&&"fitBounds"in s&&s.fitBounds(o),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(o);var s=e.getZoom()||0;null!==n&&s>n&&e.setZoom(n+1)}}),100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(e=this.getPanes())||void 0===e||e.overlayMouseTarget.appendChild(this.div);var t=this.getMap();null!==t&&(this.boundsChangedListener=google.maps.event.addListener(t,"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))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&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),null!==this.timeOut&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=null!==e?"".concat(e.y,"px"):"0",this.div.style.left=null!==e?"".concat(e.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e,t,n,o,s,i;if(this.div&&this.center){var r=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,a=this.backgroundPosition.split(" "),l=parseInt((null===(e=a[0])||void 0===e?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),u=parseInt((null===(t=a[1])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==p?"".concat(p.y,"px"):"0","; left: ").concat(null!==p?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var c=document.createElement("img");c.alt=r,c.src=this.url,c.width=this.width,c.height=this.height,c.setAttribute("style","position: absolute; top: ".concat(u,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(c.style.clip="rect(-".concat(u,"px, -").concat(l+this.width,"px, -").concat(u+this.height,", -").concat(l,")"));var d=document.createElement("div");d.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")),(null===(n=this.sums)||void 0===n?void 0:n.text)&&(d.innerText="".concat(null===(o=this.sums)||void 0===o?void 0:o.text)),(null===(s=this.sums)||void 0===s?void 0:s.html)&&(d.innerHTML="".concat(null===(i=this.sums)||void 0===i?void 0:i.html)),this.div.innerHTML="",this.div.appendChild(c),this.div.appendChild(d),this.div.title=r,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return null!==t&&(t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0]),t},e}(),le=function(){function e(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 ae(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 e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=0,n=this.getMarkers();ti)e.getMap()!==this.map&&e.setMap(this.map);else if(sn||t0))for(var e=0;e3?new google.maps.LatLngBounds(null===o||void 0===o?void 0:o.getSouthWest(),null===o||void 0===o?void 0:o.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),i=this.getExtendedBounds(s),r=Math.min(e+this.batchSize,this.markers.length),a=e;athis.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=0,s=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];or&&(n=h.x+p+l+d-r),this.alignBottom?h.y<-u+g+c?o=h.y+u-g-c:h.y+u+g>a&&(o=h.y+u+g-a):h.y<-u+g?o=h.y+u-g:h.y+c+u+g>a&&(o=h.y+c+u+g-a)),0===n&&0===o||t.panBy(n,o)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var o=this.div.currentStyle;o&&(e.top=parseInt(o.borderTopWidth||"",10)||0,e.bottom=parseInt(o.borderBottomWidth||"",10)||0,e.left=parseInt(o.borderLeftWidth||"",10)||0,e.right=parseInt(o.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.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=""),"string"===typeof e?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","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,t=this.eventListeners;e."),v&&v(r)}return function(){null!==C&&(x&&google.maps.event.removeListener(x),O&&google.maps.event.removeListener(O),S&&google.maps.event.removeListener(S),B&&google.maps.event.removeListener(B),U&&google.maps.event.removeListener(U),y&&y(C),C.close())}}),[]),A.current?(0,i.createPortal)(s.Children.only(t),A.current):null})),Ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.containerElement=null,t.state={infoBox:null},t.open=function(e,n){n?null!==t.context&&e.open(t.context,n):e.getPosition()?null!==t.context&&e.open(t.context):g(!1,"You must provide either an anchor or a position prop for .")},t.setInfoBoxCallback=function(){null!==t.state.infoBox&&null!==t.containerElement&&(t.state.infoBox.setContent(t.containerElement),t.open(t.state.infoBox,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoBox))},t}return a(t,e),t.prototype.componentDidMount=function(){var e,t=this.props.options||{},n=t.position,o=u(t,["position"]);!n||n instanceof google.maps.LatLng||(e=new google.maps.LatLng(n.lat,n.lng));var s=new ye(l(l({},o),e?{position:e}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=b({updaterMap:be,eventMap:Le,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},t.prototype.componentDidUpdate=function(e){var t=this.state.infoBox;null!==t&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:be,eventMap:Le,prevProps:e,nextProps:this.props,instance:t}))},t.prototype.componentWillUnmount=function(){var e=this.props.onUnmount,t=this.state.infoBox;null!==t&&(e&&e(t),L(this.registeredEvents),t.close())},t.prototype.render=function(){return this.containerElement?(0,i.createPortal)(s.Children.only(this.props.children),this.containerElement):null},t.contextType=h,t}(s.PureComponent),xe=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,s,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(s=o;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=o;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=o;0!==s--;){var r=i[s];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n},ke=d(xe);const we=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Se{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const s=we[15&n];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[r]=new Uint32Array(e,4,1);return new Se(r,i,s,e)}constructor(e,t=64,n=Float64Array,o){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=we.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-r%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+r+a),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+r+a,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+s]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Pe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:r}=this,a=[0,s.length-1,0],l=[];for(;a.length;){const u=a.pop()||0,p=a.pop()||0,c=a.pop()||0;if(p-c<=r){for(let r=c;r<=p;r++){const a=i[2*r],u=i[2*r+1];a>=e&&a<=n&&u>=t&&u<=o&&l.push(s[r])}continue}const d=c+p>>1,g=i[2*d],h=i[2*d+1];g>=e&&g<=n&&h>=t&&h<=o&&l.push(s[d]),(0===u?e<=g:t<=h)&&(a.push(c),a.push(d-1),a.push(1-u)),(0===u?n>=g:o>=h)&&(a.push(d+1),a.push(p),a.push(1-u))}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,r=[0,o.length-1,0],a=[],l=n*n;for(;r.length;){const u=r.pop()||0,p=r.pop()||0,c=r.pop()||0;if(p-c<=i){for(let n=c;n<=p;n++)_e(s[2*n],s[2*n+1],e,t)<=l&&a.push(o[n]);continue}const d=c+p>>1,g=s[2*d],h=s[2*d+1];_e(g,h,e,t)<=l&&a.push(o[d]),(0===u?e-n<=g:t-n<=h)&&(r.push(c),r.push(d-1),r.push(1-u)),(0===u?e+n>=g:t+n>=h)&&(r.push(d+1),r.push(p),r.push(1-u))}return a}}function Pe(e,t,n,o,s,i){if(s-o<=n)return;const r=o+s>>1;Ie(e,t,r,o,s,i),Pe(e,t,n,o,r-1,1-i),Pe(e,t,n,r+1,s,1-i)}function Ie(e,t,n,o,s,i){for(;s>o;){if(s-o>600){const r=s-o+1,a=n-o+1,l=Math.log(r),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(r-u)/r)*(a-r/2<0?-1:1);Ie(e,t,n,Math.max(o,Math.floor(n-a*u/r+p)),Math.min(s,Math.floor(n+(r-a)*u/r+p)),i)}const r=t[2*n+i];let a=o,l=s;for(Oe(e,t,o,n),t[2*s+i]>r&&Oe(e,t,o,s);ar;)l--}t[2*o+i]===r?Oe(e,t,o,l):(l++,Oe(e,t,l,s)),l<=n&&(o=l+1),n<=l&&(s=l-1)}}function Oe(e,t,n,o){De(e,n,o),De(t,2*n,2*o),De(t,2*n+1,2*o+1)}function De(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function _e(e,t,n,o){const s=e-n,i=t-o;return s*s+i*i}const Be={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Te=Math.fround||(Re=new Float32Array(1),e=>(Re[0]=+e,Re[0]));var Re;class Ue{constructor(e){this.options=Object.assign(Object.create(Be),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const i=[];for(let a=0;a=n;a--){const e=+Date.now();r=this.trees[a]=this._createTree(this._cluster(r,a)),t&&console.log("z%d: %d clusters in %dms",a,r.numItems,+Date.now()-e)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=180===e[2]?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const e=this.getClusters([n,o,180,i],t),r=this.getClusters([-180,o,s,i],t);return e.concat(r)}const r=this.trees[this._limitZoom(t)],a=r.range(je(n),Ze(i),je(s),Ze(o)),l=r.data,u=[];for(const p of a){const e=this.stride*p;u.push(l[e+5]>1?ze(l,e,this.clusterProps):this.points[l[e+3]])}return u}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(t*this.stride>=i.length)throw new Error(o);const r=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],l=i[t*this.stride+1],u=s.within(a,l,r),p=[];for(const c of u){const t=c*this.stride;i[t+4]===e&&p.push(i[t+5]>1?ze(i,t,this.clusterProps):this.points[i[t+3]])}if(0===p.length)throw new Error(o);return p}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:r}=this.options,a=r/i,l=(n-a)/s,u=(n+1+a)/s,p={features:[]};return this._addTileFeatures(o.range((t-a)/s,l,(t+1+a)/s,u),o.data,t,n,s,p),0===t&&this._addTileFeatures(o.range(1-a/s,l,1,u),o.data,s,n,s,p),t===s-1&&this._addTileFeatures(o.range(0,l,a/s,u),o.data,-1,n,s,p),p.features.length?p:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,s){const i=this.getChildren(t);for(const r of i){const t=r.properties;if(t&&t.cluster?s+t.point_count<=o?s+=t.point_count:s=this._appendLeaves(e,t.cluster_id,n,o,s):s1;let l,u,p;if(a)l=Ae(t,e,this.clusterProps),u=t[e],p=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[o,s]=n.geometry.coordinates;u=je(o),p=Ze(s)}const c={type:1,geometry:[[Math.round(this.options.extent*(u*s-n)),Math.round(this.options.extent*(p*s-o))]],tags:l};let d;d=a||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==d&&(c.id=d),i.features.push(c)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,r=n/(o*Math.pow(2,t)),a=e.data,l=[],u=this.stride;for(let p=0;pt&&(g+=a[n+5])}if(g>d&&g>=i){let e,i=n*d,r=o*d,h=-1;const m=((p/u|0)<<5)+(t+1)+this.points.length;for(const n of c){const o=n*u;if(a[o+2]<=t)continue;a[o+2]=t;const l=a[o+5];i+=a[o]*l,r+=a[o+1]*l,a[o+4]=m,s&&(e||(e=this._map(a,p,!0),h=this.clusterProps.length,this.clusterProps.push(e)),s(e,this._map(a,o)))}a[p+4]=m,l.push(i/g,r/g,1/0,m,-1,g),s&&l.push(h)}else{for(let e=0;e1)for(const e of c){const n=e*u;if(!(a[n+2]<=t)){a[n+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const o=this.clusterProps[e[t+6]];return n?Object.assign({},o):o}const o=this.points[e[t+3]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function ze(e,t,n){return{type:"Feature",id:e[t+3],properties:Ae(e,t,n),geometry:{type:"Point",coordinates:[(o=e[t],360*(o-.5)),Ve(e[t+1])]}};var o}function Ae(e,t,n){const o=e[t+5],s=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,i=e[t+6],r=-1===i?{}:Object.assign({},n[i]);return Object.assign(r,{cluster:!0,cluster_id:e[t+3],point_count:o,point_count_abbreviated:s})}function je(e){return e/360+.5}function Ze(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Ve(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function We(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);sNe.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(Ne.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const Fe=(e,t,n,o)=>{const s=Ge(e.getBounds(),t,o);return n.filter((e=>s.contains(Ne.getPosition(e))))},Ge=(e,t,n)=>{const{northEast:o,southWest:s}=Ke(e,t),i=Ye({northEast:o,southWest:s},n);return qe(i,t)},$e=(e,t)=>{const n=(t.lat-e.lat)*Math.PI/180,o=(t.lng-e.lng)*Math.PI/180,s=Math.sin(n/2),i=Math.sin(o/2),r=s*s+Math.cos(e.lat*Math.PI/180)*Math.cos(t.lat*Math.PI/180)*i*i;return 6371*(2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r)))},Ke=(e,t)=>({northEast:t.fromLatLngToDivPixel(e.getNorthEast()),southWest:t.fromLatLngToDivPixel(e.getSouthWest())}),Ye=({northEast:e,southWest:t},n)=>(e.x+=n,e.y-=n,t.x-=n,t.y+=n,{northEast:e,southWest:t}),qe=({northEast:e,southWest:t},n)=>{const o=n.fromDivPixelToLatLng(t),s=n.fromDivPixelToLatLng(e);return new google.maps.LatLngBounds(o,s)};class Je{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Qe(e)}}class Xe extends Je{constructor(e){var{viewportPadding:t=60}=e;super(We(e,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:n}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:Fe(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}}const Qe=e=>e.map((e=>new He({position:Ne.getPosition(e),markers:[e]})));class et extends Je{constructor(e){var{maxZoom:t,radius:n=60}=e,o=We(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Ue(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1;const n={zoom:e.map.getZoom()};if(!ke(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>{const t=Ne.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!ke(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new He({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const o=n.marker;return new He({markers:[o],position:Ne.getPosition(o)})}}class tt{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),o=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class nt{render({count:e,position:t},n,o){const s=`\n\n\n\n${e}\n`,i=`Cluster of ${e} markers`,r=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ne.isAdvancedMarkerAvailable(o)){const e=document.createElement("div");e.innerHTML=s;const n=e.firstElementChild;n.setAttribute("transform","translate(0 25)");const a={map:o,position:t,zIndex:r,title:i,content:n};return new google.maps.marker.AdvancedMarkerElement(a)}const a={position:t,zIndex:r,title:i,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}class ot{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(ot,google.maps.OverlayView)}}var st;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(st||(st={}));const it=(e,t,n)=>{n.fitBounds(t.bounds)};class rt extends ot{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:o=new et(n),renderer:s=new nt,onClusterClick:i=it}){super(),this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(Ne.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}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,st.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||void 0==n){const e=new Set;for(const o of t)1==o.markers.length&&e.add(o.markers[0]);const n=[];for(const t of this.clusters)null!=t.marker&&(1==t.markers.length?e.has(t.marker)||Ne.setMap(t.marker,null):n.push(t.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame((()=>n.forEach((e=>Ne.setMap(e,null)))))}google.maps.event.trigger(this,st.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=>Ne.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new tt(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>Ne.setMap(e,null))),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,st.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),Ne.setMap(n.marker,t)}))}}var at=Object.freeze({__proto__:null,AbstractAlgorithm:Je,AbstractViewportAlgorithm:Xe,Cluster:He,ClusterStats:tt,DefaultRenderer:nt,GridAlgorithm:class extends Xe{constructor(e){var{maxDistance:t=4e4,gridSize:n=40}=e;super(We(e,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=t,this.gridSize=n}calculate({markers:e,map:t,mapCanvasProjection:n}){const o={zoom:t.getZoom()};let s=!1;return this.state.zoom>=this.maxZoom&&o.zoom>=this.maxZoom||(s=!ke(this.state,o)),this.state=o,t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:s}:{clusters:this.cluster({markers:Fe(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}cluster({markers:e,map:t,mapCanvasProjection:n}){return this.clusters=[],e.forEach((e=>{this.addToClosestCluster(e,t,n)})),this.clusters}addToClosestCluster(e,t,n){let o=this.maxDistance,s=null;for(let i=0;i) or a position props for ."),f&&f(e),function(){E&&google.maps.event.removeListener(E),I&&google.maps.event.removeListener(I),w&&google.maps.event.removeListener(w),_&&google.maps.event.removeListener(_),R&&google.maps.event.removeListener(R),v&&v(e),e.close()}}),[]),z.current?(0,i.createPortal)(s.Children.only(t),z.current):null})),dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.containerElement=null,t.state={infoWindow:null},t.open=function(e,n){n?e.open(t.context,n):e.getPosition()?e.open(t.context):g(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")},t.setInfoWindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.InfoWindow(l({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=b({updaterMap:pt,eventMap:ut,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{infoWindow:e}}),this.setInfoWindowCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.infoWindow&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:pt,eventMap:ut,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},t.prototype.componentWillUnmount=function(){null!==this.state.infoWindow&&(L(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},t.prototype.render=function(){return this.containerElement?(0,i.createPortal)(s.Children.only(this.props.children),this.containerElement):null},t.contextType=h,t}(s.PureComponent),gt={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ht={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},mt={};var ft=(0,s.memo)((function(e){var t=e.options,n=e.draggable,o=e.editable,i=e.visible,r=e.path,a=e.onDblClick,u=e.onDragEnd,p=e.onDragStart,c=e.onMouseDown,d=e.onMouseMove,g=e.onMouseOut,m=e.onMouseOver,f=e.onMouseUp,v=e.onRightClick,y=e.onClick,L=e.onDrag,b=e.onLoad,C=e.onUnmount,M=(0,s.useContext)(h),E=(0,s.useState)(null),x=E[0],k=E[1],w=(0,s.useState)(null),S=w[0],P=w[1],I=(0,s.useState)(null),O=I[0],D=I[1],_=(0,s.useState)(null),B=_[0],T=_[1],R=(0,s.useState)(null),U=R[0],z=R[1],A=(0,s.useState)(null),j=A[0],Z=A[1],V=(0,s.useState)(null),W=V[0],N=V[1],H=(0,s.useState)(null),F=H[0],G=H[1],$=(0,s.useState)(null),K=$[0],Y=$[1],q=(0,s.useState)(null),J=q[0],X=q[1],Q=(0,s.useState)(null),ee=Q[0],te=Q[1],ne=(0,s.useState)(null),oe=ne[0],se=ne[1];return(0,s.useEffect)((function(){null!==x&&x.setMap(M)}),[M]),(0,s.useEffect)((function(){"undefined"!==typeof t&&null!==x&&x.setOptions(t)}),[x,t]),(0,s.useEffect)((function(){"undefined"!==typeof n&&null!==x&&x.setDraggable(n)}),[x,n]),(0,s.useEffect)((function(){"undefined"!==typeof o&&null!==x&&x.setEditable(o)}),[x,o]),(0,s.useEffect)((function(){"undefined"!==typeof i&&null!==x&&x.setVisible(i)}),[x,i]),(0,s.useEffect)((function(){"undefined"!==typeof r&&null!==x&&x.setPath(r)}),[x,r]),(0,s.useEffect)((function(){x&&a&&(null!==S&&google.maps.event.removeListener(S),P(google.maps.event.addListener(x,"dblclick",a)))}),[a]),(0,s.useEffect)((function(){x&&u&&(null!==O&&google.maps.event.removeListener(O),D(google.maps.event.addListener(x,"dragend",u)))}),[u]),(0,s.useEffect)((function(){x&&p&&(null!==B&&google.maps.event.removeListener(B),T(google.maps.event.addListener(x,"dragstart",p)))}),[p]),(0,s.useEffect)((function(){x&&c&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(x,"mousedown",c)))}),[c]),(0,s.useEffect)((function(){x&&d&&(null!==j&&google.maps.event.removeListener(j),Z(google.maps.event.addListener(x,"mousemove",d)))}),[d]),(0,s.useEffect)((function(){x&&g&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(x,"mouseout",g)))}),[g]),(0,s.useEffect)((function(){x&&m&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(x,"mouseover",m)))}),[m]),(0,s.useEffect)((function(){x&&f&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(x,"mouseup",f)))}),[f]),(0,s.useEffect)((function(){x&&v&&(null!==J&&google.maps.event.removeListener(J),X(google.maps.event.addListener(x,"rightclick",v)))}),[v]),(0,s.useEffect)((function(){x&&y&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(x,"click",y)))}),[y]),(0,s.useEffect)((function(){x&&L&&(null!==oe&&google.maps.event.removeListener(oe),se(google.maps.event.addListener(x,"drag",L)))}),[L]),(0,s.useEffect)((function(){var e=new google.maps.Polyline(l(l({},t||mt),{map:M}));return r&&e.setPath(r),"undefined"!==typeof i&&e.setVisible(i),"undefined"!==typeof o&&e.setEditable(o),"undefined"!==typeof n&&e.setDraggable(n),a&&P(google.maps.event.addListener(e,"dblclick",a)),u&&D(google.maps.event.addListener(e,"dragend",u)),p&&T(google.maps.event.addListener(e,"dragstart",p)),c&&z(google.maps.event.addListener(e,"mousedown",c)),d&&Z(google.maps.event.addListener(e,"mousemove",d)),g&&N(google.maps.event.addListener(e,"mouseout",g)),m&&G(google.maps.event.addListener(e,"mouseover",m)),f&&Y(google.maps.event.addListener(e,"mouseup",f)),v&&X(google.maps.event.addListener(e,"rightclick",v)),y&&te(google.maps.event.addListener(e,"click",y)),L&&se(google.maps.event.addListener(e,"drag",L)),k(e),b&&b(e),function(){null!==S&&google.maps.event.removeListener(S),null!==O&&google.maps.event.removeListener(O),null!==B&&google.maps.event.removeListener(B),null!==U&&google.maps.event.removeListener(U),null!==j&&google.maps.event.removeListener(j),null!==W&&google.maps.event.removeListener(W),null!==F&&google.maps.event.removeListener(F),null!==K&&google.maps.event.removeListener(K),null!==J&&google.maps.event.removeListener(J),null!==ee&&google.maps.event.removeListener(ee),C&&C(e),e.setMap(null)}}),[]),null})),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.Polyline(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:ht,eventMap:gt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.polyline&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:ht,eventMap:gt,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},t.prototype.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),L(this.registeredEvents),this.state.polyline.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),yt={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Lt={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}};var bt=(0,s.memo)((function(e){var t=e.options,n=e.draggable,o=e.editable,i=e.visible,r=e.path,a=e.paths,u=e.onDblClick,p=e.onDragEnd,c=e.onDragStart,d=e.onMouseDown,g=e.onMouseMove,m=e.onMouseOut,f=e.onMouseOver,v=e.onMouseUp,y=e.onRightClick,L=e.onClick,b=e.onDrag,C=e.onLoad,M=e.onUnmount,E=(0,s.useContext)(h),x=(0,s.useState)(null),k=x[0],w=x[1],S=(0,s.useState)(null),P=S[0],I=S[1],O=(0,s.useState)(null),D=O[0],_=O[1],B=(0,s.useState)(null),T=B[0],R=B[1],U=(0,s.useState)(null),z=U[0],A=U[1],j=(0,s.useState)(null),Z=j[0],V=j[1],W=(0,s.useState)(null),N=W[0],H=W[1],F=(0,s.useState)(null),G=F[0],$=F[1],K=(0,s.useState)(null),Y=K[0],q=K[1],J=(0,s.useState)(null),X=J[0],Q=J[1],ee=(0,s.useState)(null),te=ee[0],ne=ee[1],oe=(0,s.useState)(null),se=oe[0],ie=oe[1];return(0,s.useEffect)((function(){null!==k&&k.setMap(E)}),[E]),(0,s.useEffect)((function(){"undefined"!==typeof t&&null!==k&&k.setOptions(t)}),[k,t]),(0,s.useEffect)((function(){"undefined"!==typeof n&&null!==k&&k.setDraggable(n)}),[k,n]),(0,s.useEffect)((function(){"undefined"!==typeof o&&null!==k&&k.setEditable(o)}),[k,o]),(0,s.useEffect)((function(){"undefined"!==typeof i&&null!==k&&k.setVisible(i)}),[k,i]),(0,s.useEffect)((function(){"undefined"!==typeof r&&null!==k&&k.setPath(r)}),[k,r]),(0,s.useEffect)((function(){"undefined"!==typeof a&&null!==k&&k.setPaths(a)}),[k,a]),(0,s.useEffect)((function(){k&&u&&(null!==P&&google.maps.event.removeListener(P),I(google.maps.event.addListener(k,"dblclick",u)))}),[u]),(0,s.useEffect)((function(){k&&p&&(null!==D&&google.maps.event.removeListener(D),_(google.maps.event.addListener(k,"dragend",p)))}),[p]),(0,s.useEffect)((function(){k&&c&&(null!==T&&google.maps.event.removeListener(T),R(google.maps.event.addListener(k,"dragstart",c)))}),[c]),(0,s.useEffect)((function(){k&&d&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(k,"mousedown",d)))}),[d]),(0,s.useEffect)((function(){k&&g&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(k,"mousemove",g)))}),[g]),(0,s.useEffect)((function(){k&&m&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(k,"mouseout",m)))}),[m]),(0,s.useEffect)((function(){k&&f&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(k,"mouseover",f)))}),[f]),(0,s.useEffect)((function(){k&&v&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(k,"mouseup",v)))}),[v]),(0,s.useEffect)((function(){k&&y&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(k,"rightclick",y)))}),[y]),(0,s.useEffect)((function(){k&&L&&(null!==te&&google.maps.event.removeListener(te),ne(google.maps.event.addListener(k,"click",L)))}),[L]),(0,s.useEffect)((function(){k&&b&&(null!==se&&google.maps.event.removeListener(se),ie(google.maps.event.addListener(k,"drag",b)))}),[b]),(0,s.useEffect)((function(){var e=new google.maps.Polygon(l(l({},t||{}),{map:E}));return r&&e.setPath(r),a&&e.setPaths(a),"undefined"!==typeof i&&e.setVisible(i),"undefined"!==typeof o&&e.setEditable(o),"undefined"!==typeof n&&e.setDraggable(n),u&&I(google.maps.event.addListener(e,"dblclick",u)),p&&_(google.maps.event.addListener(e,"dragend",p)),c&&R(google.maps.event.addListener(e,"dragstart",c)),d&&A(google.maps.event.addListener(e,"mousedown",d)),g&&V(google.maps.event.addListener(e,"mousemove",g)),m&&H(google.maps.event.addListener(e,"mouseout",m)),f&&$(google.maps.event.addListener(e,"mouseover",f)),v&&q(google.maps.event.addListener(e,"mouseup",v)),y&&Q(google.maps.event.addListener(e,"rightclick",y)),L&&ne(google.maps.event.addListener(e,"click",L)),b&&ie(google.maps.event.addListener(e,"drag",b)),w(e),C&&C(e),function(){null!==P&&google.maps.event.removeListener(P),null!==D&&google.maps.event.removeListener(D),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==N&&google.maps.event.removeListener(N),null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==X&&google.maps.event.removeListener(X),null!==te&&google.maps.event.removeListener(te),M&&M(e),e.setMap(null)}}),[]),null})),Ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.Polygon(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:Lt,eventMap:yt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polygon:e}}),this.setPolygonCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.polygon&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:Lt,eventMap:yt,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},t.prototype.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),L(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),Mt={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"},Et={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}};var xt=(0,s.memo)((function(e){var t=e.options,n=e.bounds,o=e.draggable,i=e.editable,r=e.visible,a=e.onDblClick,u=e.onDragEnd,p=e.onDragStart,c=e.onMouseDown,d=e.onMouseMove,g=e.onMouseOut,m=e.onMouseOver,f=e.onMouseUp,v=e.onRightClick,y=e.onClick,L=e.onDrag,b=e.onBoundsChanged,C=e.onLoad,M=e.onUnmount,E=(0,s.useContext)(h),x=(0,s.useState)(null),k=x[0],w=x[1],S=(0,s.useState)(null),P=S[0],I=S[1],O=(0,s.useState)(null),D=O[0],_=O[1],B=(0,s.useState)(null),T=B[0],R=B[1],U=(0,s.useState)(null),z=U[0],A=U[1],j=(0,s.useState)(null),Z=j[0],V=j[1],W=(0,s.useState)(null),N=W[0],H=W[1],F=(0,s.useState)(null),G=F[0],$=F[1],K=(0,s.useState)(null),Y=K[0],q=K[1],J=(0,s.useState)(null),X=J[0],Q=J[1],ee=(0,s.useState)(null),te=ee[0],ne=ee[1],oe=(0,s.useState)(null),se=oe[0],ie=oe[1],re=(0,s.useState)(null),ae=re[0],le=re[1];return(0,s.useEffect)((function(){null!==k&&k.setMap(E)}),[E]),(0,s.useEffect)((function(){"undefined"!==typeof t&&null!==k&&k.setOptions(t)}),[k,t]),(0,s.useEffect)((function(){"undefined"!==typeof o&&null!==k&&k.setDraggable(o)}),[k,o]),(0,s.useEffect)((function(){"undefined"!==typeof i&&null!==k&&k.setEditable(i)}),[k,i]),(0,s.useEffect)((function(){"undefined"!==typeof r&&null!==k&&k.setVisible(r)}),[k,r]),(0,s.useEffect)((function(){"undefined"!==typeof n&&null!==k&&k.setBounds(n)}),[k,n]),(0,s.useEffect)((function(){k&&a&&(null!==P&&google.maps.event.removeListener(P),I(google.maps.event.addListener(k,"dblclick",a)))}),[a]),(0,s.useEffect)((function(){k&&u&&(null!==D&&google.maps.event.removeListener(D),_(google.maps.event.addListener(k,"dragend",u)))}),[u]),(0,s.useEffect)((function(){k&&p&&(null!==T&&google.maps.event.removeListener(T),R(google.maps.event.addListener(k,"dragstart",p)))}),[p]),(0,s.useEffect)((function(){k&&c&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(k,"mousedown",c)))}),[c]),(0,s.useEffect)((function(){k&&d&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(k,"mousemove",d)))}),[d]),(0,s.useEffect)((function(){k&&g&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(k,"mouseout",g)))}),[g]),(0,s.useEffect)((function(){k&&m&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(k,"mouseover",m)))}),[m]),(0,s.useEffect)((function(){k&&f&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(k,"mouseup",f)))}),[f]),(0,s.useEffect)((function(){k&&v&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(k,"rightclick",v)))}),[v]),(0,s.useEffect)((function(){k&&y&&(null!==te&&google.maps.event.removeListener(te),ne(google.maps.event.addListener(k,"click",y)))}),[y]),(0,s.useEffect)((function(){k&&L&&(null!==se&&google.maps.event.removeListener(se),ie(google.maps.event.addListener(k,"drag",L)))}),[L]),(0,s.useEffect)((function(){k&&b&&(null!==ae&&google.maps.event.removeListener(ae),le(google.maps.event.addListener(k,"bounds_changed",b)))}),[b]),(0,s.useEffect)((function(){var e=new google.maps.Rectangle(l(l({},t||{}),{map:E}));return"undefined"!==typeof r&&e.setVisible(r),"undefined"!==typeof i&&e.setEditable(i),"undefined"!==typeof o&&e.setDraggable(o),"undefined"!==typeof n&&e.setBounds(n),a&&I(google.maps.event.addListener(e,"dblclick",a)),u&&_(google.maps.event.addListener(e,"dragend",u)),p&&R(google.maps.event.addListener(e,"dragstart",p)),c&&A(google.maps.event.addListener(e,"mousedown",c)),d&&V(google.maps.event.addListener(e,"mousemove",d)),g&&H(google.maps.event.addListener(e,"mouseout",g)),m&&$(google.maps.event.addListener(e,"mouseover",m)),f&&q(google.maps.event.addListener(e,"mouseup",f)),v&&Q(google.maps.event.addListener(e,"rightclick",v)),y&&ne(google.maps.event.addListener(e,"click",y)),L&&ie(google.maps.event.addListener(e,"drag",L)),b&&le(google.maps.event.addListener(e,"bounds_changed",b)),w(e),C&&C(e),function(){null!==P&&google.maps.event.removeListener(P),null!==D&&google.maps.event.removeListener(D),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==N&&google.maps.event.removeListener(N),null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==X&&google.maps.event.removeListener(X),null!==te&&google.maps.event.removeListener(te),null!==se&&google.maps.event.removeListener(se),null!==ae&&google.maps.event.removeListener(ae),M&&M(e),e.setMap(null)}}),[]),null})),kt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.Rectangle(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:Et,eventMap:Mt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.rectangle&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:Et,eventMap:Mt,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},t.prototype.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),L(this.registeredEvents),this.state.rectangle.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),wt={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"},St={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},Pt={};var It=(0,s.memo)((function(e){var t=e.options,n=e.center,o=e.radius,i=e.draggable,r=e.editable,a=e.visible,u=e.onDblClick,p=e.onDragEnd,c=e.onDragStart,d=e.onMouseDown,g=e.onMouseMove,m=e.onMouseOut,f=e.onMouseOver,v=e.onMouseUp,y=e.onRightClick,L=e.onClick,b=e.onDrag,C=e.onCenterChanged,M=e.onRadiusChanged,E=e.onLoad,x=e.onUnmount,k=(0,s.useContext)(h),w=(0,s.useState)(null),S=w[0],P=w[1],I=(0,s.useState)(null),O=I[0],D=I[1],_=(0,s.useState)(null),B=_[0],T=_[1],R=(0,s.useState)(null),U=R[0],z=R[1],A=(0,s.useState)(null),j=A[0],Z=A[1],V=(0,s.useState)(null),W=V[0],N=V[1],H=(0,s.useState)(null),F=H[0],G=H[1],$=(0,s.useState)(null),K=$[0],Y=$[1],q=(0,s.useState)(null),J=q[0],X=q[1],Q=(0,s.useState)(null),ee=Q[0],te=Q[1],ne=(0,s.useState)(null),oe=ne[0],se=ne[1],ie=(0,s.useState)(null),re=ie[0],ae=ie[1],le=(0,s.useState)(null),ue=le[0],pe=le[1],ce=(0,s.useState)(null),de=ce[0],ge=ce[1];return(0,s.useEffect)((function(){null!==S&&S.setMap(k)}),[k]),(0,s.useEffect)((function(){"undefined"!==typeof t&&null!==S&&S.setOptions(t)}),[S,t]),(0,s.useEffect)((function(){"undefined"!==typeof i&&null!==S&&S.setDraggable(i)}),[S,i]),(0,s.useEffect)((function(){"undefined"!==typeof r&&null!==S&&S.setEditable(r)}),[S,r]),(0,s.useEffect)((function(){"undefined"!==typeof a&&null!==S&&S.setVisible(a)}),[S,a]),(0,s.useEffect)((function(){"number"===typeof o&&null!==S&&S.setRadius(o)}),[S,o]),(0,s.useEffect)((function(){"undefined"!==typeof n&&null!==S&&S.setCenter(n)}),[S,n]),(0,s.useEffect)((function(){S&&u&&(null!==O&&google.maps.event.removeListener(O),D(google.maps.event.addListener(S,"dblclick",u)))}),[u]),(0,s.useEffect)((function(){S&&p&&(null!==B&&google.maps.event.removeListener(B),T(google.maps.event.addListener(S,"dragend",p)))}),[p]),(0,s.useEffect)((function(){S&&c&&(null!==U&&google.maps.event.removeListener(U),z(google.maps.event.addListener(S,"dragstart",c)))}),[c]),(0,s.useEffect)((function(){S&&d&&(null!==j&&google.maps.event.removeListener(j),Z(google.maps.event.addListener(S,"mousedown",d)))}),[d]),(0,s.useEffect)((function(){S&&g&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(S,"mousemove",g)))}),[g]),(0,s.useEffect)((function(){S&&m&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(S,"mouseout",m)))}),[m]),(0,s.useEffect)((function(){S&&f&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(S,"mouseover",f)))}),[f]),(0,s.useEffect)((function(){S&&v&&(null!==J&&google.maps.event.removeListener(J),X(google.maps.event.addListener(S,"mouseup",v)))}),[v]),(0,s.useEffect)((function(){S&&y&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(S,"rightclick",y)))}),[y]),(0,s.useEffect)((function(){S&&L&&(null!==oe&&google.maps.event.removeListener(oe),se(google.maps.event.addListener(S,"click",L)))}),[L]),(0,s.useEffect)((function(){S&&b&&(null!==re&&google.maps.event.removeListener(re),ae(google.maps.event.addListener(S,"drag",b)))}),[b]),(0,s.useEffect)((function(){S&&C&&(null!==ue&&google.maps.event.removeListener(ue),pe(google.maps.event.addListener(S,"center_changed",C)))}),[L]),(0,s.useEffect)((function(){S&&M&&(null!==de&&google.maps.event.removeListener(de),ge(google.maps.event.addListener(S,"radius_changed",M)))}),[M]),(0,s.useEffect)((function(){var e=new google.maps.Circle(l(l({},t||Pt),{map:k}));return"number"===typeof o&&e.setRadius(o),"undefined"!==typeof n&&e.setCenter(n),"number"===typeof o&&e.setRadius(o),"undefined"!==typeof a&&e.setVisible(a),"undefined"!==typeof r&&e.setEditable(r),"undefined"!==typeof i&&e.setDraggable(i),u&&D(google.maps.event.addListener(e,"dblclick",u)),p&&T(google.maps.event.addListener(e,"dragend",p)),c&&z(google.maps.event.addListener(e,"dragstart",c)),d&&Z(google.maps.event.addListener(e,"mousedown",d)),g&&N(google.maps.event.addListener(e,"mousemove",g)),m&&G(google.maps.event.addListener(e,"mouseout",m)),f&&Y(google.maps.event.addListener(e,"mouseover",f)),v&&X(google.maps.event.addListener(e,"mouseup",v)),y&&te(google.maps.event.addListener(e,"rightclick",y)),L&&se(google.maps.event.addListener(e,"click",L)),b&&ae(google.maps.event.addListener(e,"drag",b)),C&&pe(google.maps.event.addListener(e,"center_changed",C)),M&&ge(google.maps.event.addListener(e,"radius_changed",M)),P(e),E&&E(e),function(){null!==O&&google.maps.event.removeListener(O),null!==B&&google.maps.event.removeListener(B),null!==U&&google.maps.event.removeListener(U),null!==j&&google.maps.event.removeListener(j),null!==W&&google.maps.event.removeListener(W),null!==F&&google.maps.event.removeListener(F),null!==K&&google.maps.event.removeListener(K),null!==J&&google.maps.event.removeListener(J),null!==ee&&google.maps.event.removeListener(ee),null!==oe&&google.maps.event.removeListener(oe),null!==ue&&google.maps.event.removeListener(ue),null!==de&&google.maps.event.removeListener(de),x&&x(e),e.setMap(null)}}),[]),null})),Ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={circle:null},t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.Circle(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:St,eventMap:wt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.circle&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:St,eventMap:wt,prevProps:e,nextProps:this.props,instance:this.state.circle}))},t.prototype.componentWillUnmount=function(){var e;null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),L(this.registeredEvents),null===(e=this.state.circle)||void 0===e||e.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),Dt={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},_t={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,o){e.loadGeoJson(t,n,o)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}};var Bt=(0,s.memo)((function(e){var t=e.options,n=e.onClick,o=e.onDblClick,i=e.onMouseDown,r=e.onMouseMove,a=e.onMouseOut,u=e.onMouseOver,p=e.onMouseUp,c=e.onRightClick,d=e.onAddFeature,g=e.onRemoveFeature,m=e.onRemoveProperty,f=e.onSetGeometry,v=e.onSetProperty,y=e.onLoad,L=e.onUnmount,b=(0,s.useContext)(h),C=(0,s.useState)(null),M=C[0],E=C[1],x=(0,s.useState)(null),k=x[0],w=x[1],S=(0,s.useState)(null),P=S[0],I=S[1],O=(0,s.useState)(null),D=O[0],_=O[1],B=(0,s.useState)(null),T=B[0],R=B[1],U=(0,s.useState)(null),z=U[0],A=U[1],j=(0,s.useState)(null),Z=j[0],V=j[1],W=(0,s.useState)(null),N=W[0],H=W[1],F=(0,s.useState)(null),G=F[0],$=F[1],K=(0,s.useState)(null),Y=K[0],q=K[1],J=(0,s.useState)(null),X=J[0],Q=J[1],ee=(0,s.useState)(null),te=ee[0],ne=ee[1],oe=(0,s.useState)(null),se=oe[0],ie=oe[1],re=(0,s.useState)(null),ae=re[0],le=re[1];return(0,s.useEffect)((function(){null!==M&&M.setMap(b)}),[b]),(0,s.useEffect)((function(){M&&o&&(null!==k&&google.maps.event.removeListener(k),w(google.maps.event.addListener(M,"dblclick",o)))}),[o]),(0,s.useEffect)((function(){M&&i&&(null!==P&&google.maps.event.removeListener(P),I(google.maps.event.addListener(M,"mousedown",i)))}),[i]),(0,s.useEffect)((function(){M&&r&&(null!==D&&google.maps.event.removeListener(D),_(google.maps.event.addListener(M,"mousemove",r)))}),[r]),(0,s.useEffect)((function(){M&&a&&(null!==T&&google.maps.event.removeListener(T),R(google.maps.event.addListener(M,"mouseout",a)))}),[a]),(0,s.useEffect)((function(){M&&u&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(M,"mouseover",u)))}),[u]),(0,s.useEffect)((function(){M&&p&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(M,"mouseup",p)))}),[p]),(0,s.useEffect)((function(){M&&c&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(M,"rightclick",c)))}),[c]),(0,s.useEffect)((function(){M&&n&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(M,"click",n)))}),[n]),(0,s.useEffect)((function(){M&&d&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(M,"addfeature",d)))}),[d]),(0,s.useEffect)((function(){M&&g&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(M,"removefeature",g)))}),[g]),(0,s.useEffect)((function(){M&&m&&(null!==te&&google.maps.event.removeListener(te),ne(google.maps.event.addListener(M,"removeproperty",m)))}),[m]),(0,s.useEffect)((function(){M&&f&&(null!==se&&google.maps.event.removeListener(se),ie(google.maps.event.addListener(M,"setgeometry",f)))}),[f]),(0,s.useEffect)((function(){M&&v&&(null!==ae&&google.maps.event.removeListener(ae),le(google.maps.event.addListener(M,"setproperty",v)))}),[v]),(0,s.useEffect)((function(){if(null!==b){var e=new google.maps.Data(l(l({},t||{}),{map:b}));o&&w(google.maps.event.addListener(e,"dblclick",o)),i&&I(google.maps.event.addListener(e,"mousedown",i)),r&&_(google.maps.event.addListener(e,"mousemove",r)),a&&R(google.maps.event.addListener(e,"mouseout",a)),u&&A(google.maps.event.addListener(e,"mouseover",u)),p&&V(google.maps.event.addListener(e,"mouseup",p)),c&&H(google.maps.event.addListener(e,"rightclick",c)),n&&$(google.maps.event.addListener(e,"click",n)),d&&q(google.maps.event.addListener(e,"addfeature",d)),g&&Q(google.maps.event.addListener(e,"removefeature",g)),m&&ne(google.maps.event.addListener(e,"removeproperty",m)),f&&ie(google.maps.event.addListener(e,"setgeometry",f)),v&&le(google.maps.event.addListener(e,"setproperty",v)),E(e),y&&y(e)}return function(){M&&(null!==k&&google.maps.event.removeListener(k),null!==P&&google.maps.event.removeListener(P),null!==D&&google.maps.event.removeListener(D),null!==T&&google.maps.event.removeListener(T),null!==z&&google.maps.event.removeListener(z),null!==Z&&google.maps.event.removeListener(Z),null!==N&&google.maps.event.removeListener(N),null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==X&&google.maps.event.removeListener(X),null!==te&&google.maps.event.removeListener(te),null!==se&&google.maps.event.removeListener(se),null!==ae&&google.maps.event.removeListener(ae),L&&L(M),M.setMap(null))}}),[]),null})),Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}return a(t,e),t.prototype.componentDidMount=function(){if(null!==this.context){var e=new google.maps.Data(l(l({},this.props.options||{}),{map:this.context}));this.registeredEvents=b({updaterMap:_t,eventMap:Dt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{data:e}}),this.setDataCallback)}},t.prototype.componentDidUpdate=function(e){null!==this.state.data&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:_t,eventMap:Dt,prevProps:e,nextProps:this.props,instance:this.state.data}))},t.prototype.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),L(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),Rt={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Ut={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.KmlLayer(l(l({},this.props.options),{map:this.context}));this.registeredEvents=b({updaterMap:Ut,eventMap:Rt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:Ut,eventMap:Rt,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},t.prototype.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),L(this.registeredEvents),this.state.kmlLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent);function At(e,t){return"function"===typeof t?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function jt(e,t){return new t(e.lat,e.lng)}function Zt(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Vt(e,t,n,o){return void 0!==n?function(e,t,n){var o=e&&e.fromLatLngToDivPixel(n.getNorthEast()),s=e&&e.fromLatLngToDivPixel(n.getSouthWest());return o&&s?{left:"".concat(s.x+t.x,"px"),top:"".concat(o.y+t.y,"px"),width:"".concat(o.x-s.x-t.x,"px"),height:"".concat(s.y-o.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}(e,t,(s=n,i=google.maps.LatLngBounds,r=Zt,s instanceof i?s:r(s,i))):function(e,t,n){var o=e&&e.fromLatLngToDivPixel(n);if(o){var s=o.x,i=o.y;return{left:"".concat(s+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(o,google.maps.LatLng,jt));var s,i,r}function Wt(e){return e?(e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))+"":""}function Nt(e){return e?(e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west)))+"":""}var Ht="floatPane",Ft="mapPane",Gt="markerLayer",$t="overlayLayer",Kt="overlayMouseTarget";var Yt=(0,s.memo)((function(e){var t=e.position,n=e.bounds,o=e.mapPaneName,r=e.zIndex,u=e.onLoad,p=e.onUnmount,c=e.getPixelPositionOffset,d=e.children,g=(0,s.useContext)(h),m=(0,s.useMemo)((function(){var e=document.createElement("div");return e.style.position="absolute",e}),[]),f=(0,s.useMemo)((function(){return function(e,t,n,o,s){var i=function(e){function t(t,n,o,s){var i=e.call(this)||this;return i.container=t,i.pane=n,i.position=o,i.bounds=s,i}return a(t,e),t.prototype.onAdd=function(){var e,t=null===(e=this.getPanes())||void 0===e?void 0:e[this.pane];null===t||void 0===t||t.appendChild(this.container)},t.prototype.draw=function(){for(var e=Vt(this.getProjection(),l({},this.container?At(this.container,s):{x:0,y:0}),this.bounds,this.position),t=0,n=Object.entries(e);t? %s',google.maps.visualization),g(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(l(l({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=b({updaterMap:on,eventMap:nn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)},t.prototype.componentDidUpdate=function(e){L(this.registeredEvents),this.registeredEvents=b({updaterMap:on,eventMap:nn,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},t.prototype.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),L(this.registeredEvents),this.state.heatmapLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),an={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},ln={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},un=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}return a(t,e),t.prototype.componentDidMount=function(){var e,t,n=null!==(t=null===(e=this.context)||void 0===e?void 0:e.getStreetView())&&void 0!==t?t:null;this.registeredEvents=b({updaterMap:ln,eventMap:an,prevProps:{},nextProps:this.props,instance:n}),this.setState((function(){return{streetViewPanorama:n}}),this.setStreetViewPanoramaCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:ln,eventMap:an,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},t.prototype.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),L(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),pn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)},t.prototype.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},t.prototype.render=function(){return null},t.contextType=h,t}(s.PureComponent),cn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={directionsService:null},t.setDirectionsServiceCallback=function(){null!==t.state.directionsService&&t.props.onLoad&&t.props.onLoad(t.state.directionsService)},t}return a(t,e),t.prototype.componentDidMount=function(){g(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var e=new google.maps.DirectionsService;this.setState((function(){return{directionsService:e}}),this.setDirectionsServiceCallback)},t.prototype.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},t.prototype.render=function(){return null},t}(s.PureComponent),dn={onDirectionsChanged:"directions_changed"},gn={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},hn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}return a(t,e),t.prototype.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=b({updaterMap:gn,eventMap:dn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:gn,eventMap:dn,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},t.prototype.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),L(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},t.prototype.render=function(){return(0,o.jsx)(o.Fragment,{})},t.contextType=h,t}(s.PureComponent),mn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={distanceMatrixService:null},t.setDistanceMatrixServiceCallback=function(){null!==t.state.distanceMatrixService&&t.props.onLoad&&t.props.onLoad(t.state.distanceMatrixService)},t}return a(t,e),t.prototype.componentDidMount=function(){g(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var e=new google.maps.DistanceMatrixService;this.setState((function(){return{distanceMatrixService:e}}),this.setDistanceMatrixServiceCallback)},t.prototype.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},t.prototype.render=function(){return null},t}(s.PureComponent),fn={onPlacesChanged:"places_changed"},vn={bounds:function(e,t){e.setBounds(t)}},yn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.containerElement=(0,s.createRef)(),t.state={searchBox:null},t.setSearchBoxCallback=function(){null!==t.state.searchBox&&t.props.onLoad&&t.props.onLoad(t.state.searchBox)},t}return a(t,e),t.prototype.componentDidMount=function(){if(g(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(null!==e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=b({updaterMap:vn,eventMap:fn,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}},t.prototype.componentDidUpdate=function(e){null!==this.state.searchBox&&(L(this.registeredEvents),this.registeredEvents=b({updaterMap:vn,eventMap:fn,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},t.prototype.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),L(this.registeredEvents))},t.prototype.render=function(){return(0,o.jsx)("div",{ref:this.containerElement,children:s.Children.only(this.props.children)})},t.contextType=h,t}(s.PureComponent),Ln={onPlaceChanged:"place_changed"},bn={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Cn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registeredEvents=[],t.containerElement=(0,s.createRef)(),t.state={autocomplete:null},t.setAutocompleteCallback=function(){null!==t.state.autocomplete&&t.props.onLoad&&t.props.onLoad(t.state.autocomplete)},t}return a(t,e),t.prototype.componentDidMount=function(){var e;g(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);var t=null===(e=this.containerElement.current)||void 0===e?void 0:e.querySelector("input");if(t){var n=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=b({updaterMap:bn,eventMap:Ln,prevProps:{},nextProps:this.props,instance:n}),this.setState((function(){return{autocomplete:n}}),this.setAutocompleteCallback)}},t.prototype.componentDidUpdate=function(e){L(this.registeredEvents),this.registeredEvents=b({updaterMap:bn,eventMap:Ln,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},t.prototype.componentWillUnmount=function(){null!==this.state.autocomplete&&L(this.registeredEvents)},t.prototype.render=function(){return(0,o.jsx)("div",{ref:this.containerElement,className:this.props.className,children:s.Children.only(this.props.children)})},t.defaultProps={className:""},t.contextType=h,t}(s.PureComponent)}}]);