"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[255],{7054:function(t,e,s){s.d(e,{b6:function(){return E},nx:function(){return se},KJ:function(){return j},Jx:function(){return X},XL:function(){return rt}});var n=s(7294),o=s(3935),i=("undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof s.g?s.g:"undefined"!==typeof self&&self,{exports:{}}),r={},a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;function h(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},s=0;s<10;s++)e["_"+String.fromCharCode(s)]=s;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}})()&&Object.assign;var c=n,u=60103;if(r.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var d=Symbol.for;u=d("react.element"),r.Fragment=d("react.fragment")}var g=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m=Object.prototype.hasOwnProperty,f={key:!0,ref:!0,__self:!0,__source:!0};function v(t,e,s){var n,o={},i=null,r=null;for(n in void 0!==s&&(i=""+s),void 0!==e.key&&(i=""+e.key),void 0!==e.ref&&(r=e.ref),e)m.call(e,n)&&!f.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===o[n]&&(o[n]=e[n]);return{$$typeof:u,type:t,key:i,ref:r,props:o,_owner:g.current}}r.jsx=v,r.jsxs=v;i.exports=r;var y=function(t,e,s,n,o,i,r,a){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[s,n,o,i,r,a],h=0;(l=new Error(e.replace(/%s/g,(function(){return p[h++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}};const x=(0,n.createContext)(null);function C(t,e,s,n){const o={};var i,r;return i=t,r=(t,i)=>{const r=s[i];r!==e[i]&&(o[i]=r,t(n,r))},Object.keys(i).forEach((t=>r(i[t],t))),o}function M(t,e,s){var n,o,i;return n=s,o=function(s,n,o){return"function"===typeof t[o]&&s.push(google.maps.event.addListener(e,n,t[o])),s},i=[],Object.keys(n).reduce((function(t,e){return o(t,n[e],e)}),i)}function b(t){google.maps.event.removeListener(t)}function k(t=[]){t.forEach(b)}function w({updaterMap:t,eventMap:e,prevProps:s,nextProps:n,instance:o}){const i=M(n,o,e);return C(t,s,n,o),i}const L={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},P={extraMapTypes(t,e){e.forEach((function(e,s){t.mapTypes.set(String(s),e)}))},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};class E extends n.PureComponent{constructor(){super(...arguments),this.state={map:null},this.registeredEvents=[],this.mapRef=null,this.getInstance=()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options),this.panTo=t=>{const e=this.getInstance();e&&e.panTo(t)},this.setMapCallback=()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)},this.getRef=t=>{this.mapRef=t}}componentDidMount(){const t=this.getInstance();this.registeredEvents=w({updaterMap:P,eventMap:L,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{map:t}}),this.setMapCallback)}componentDidUpdate(t){null!==this.state.map&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:P,eventMap:L,prevProps:t,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),k(this.registeredEvents))}render(){return i.exports.jsx("div",Object.assign({id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},{children:i.exports.jsx(x.Provider,Object.assign({value:this.state.map},{children:null!==this.state.map?this.props.children:i.exports.jsx(i.exports.Fragment,{})}))}))}}function S(t,e){var s={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(s[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o{throw console.error("injectScript error: ",t),t})):Promise.reject(new Error("document is undefined"))}function T(t){return!(!t.href||0!==t.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))||("style"===t.tagName.toLowerCase()&&t.styleSheet&&t.styleSheet.cssText&&0===t.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(t.styleSheet.cssText="",!0):"style"===t.tagName.toLowerCase()&&t.innerHTML&&0===t.innerHTML.replace("\r\n","").indexOf(".gm-style")?(t.innerHTML="",!0):"style"===t.tagName.toLowerCase()&&!t.styleSheet&&!t.innerHTML)}function B(){const t=document.getElementsByTagName("head")[0],e=t.insertBefore.bind(t);t.insertBefore=function(s,n){T(s)||Reflect.apply(e,t,[s,n])};const s=t.appendChild.bind(t);t.appendChild=function(e){T(e)||Reflect.apply(s,t,[e])}}function z({googleMapsApiKey:t,googleMapsClientId:e,version:s="weekly",language:n,region:o,libraries:i,channel:r,mapIds:a}){const l=[];return y(t&&e||!(t&&e),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),t?l.push(`key=${t}`):e&&l.push(`client=${e}`),s&&l.push(`v=${s}`),n&&l.push(`language=${n}`),o&&l.push(`region=${o}`),i&&i.length&&l.push(`libraries=${i.sort().join(",")}`),r&&l.push(`channel=${r}`),a&&a.length&&l.push(`map_ids=${a.join(",")}`),l.push("callback=initMap"),`https://maps.googleapis.com/maps/api/js?${l.join("&")}`}let U=!1;function _(){return i.exports.jsx("div",{children:"Loading..."})}const R={id:"script-loader",version:"weekly"};class j extends n.PureComponent{constructor(){super(...arguments),this.check=(0,n.createRef)(),this.state={loaded:!1},this.cleanupCallback=()=>{delete window.google.maps,this.injectScript()},this.isCleaningUp=()=>O(this,void 0,void 0,(function*(){return new Promise((function(t){if(U){if(I){const e=window.setInterval((function(){U||(window.clearInterval(e),t())}),1)}}else t()}))})),this.cleanup=()=>{U=!0;const t=document.getElementById(this.props.id);t&&t.parentNode&&t.parentNode.removeChild(t),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(t){return"string"===typeof t.src&&t.src.includes("maps.googleapis")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(t){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===t.href})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(t){return void 0!==t.innerText&&t.innerText.length>0&&t.innerText.includes(".gm-")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))},this.injectScript=()=>{this.props.preventGoogleFontsLoading&&B(),y(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);D({id:this.props.id,nonce:this.props.nonce,url:z(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((t=>{this.props.onError&&this.props.onError(t),console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey||"-"}) or Client ID (${this.props.googleMapsClientId||"-"}) to \n Otherwise it is a Network issue.\n `)}))}}componentDidMount(){if(I){if(window.google&&window.google.maps&&!U)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(t){console.error("Error at injecting script after cleaning up: ",t)}))}}componentDidUpdate(t){this.props.libraries!==t.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"),I&&t.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(I){this.cleanup();const t=()=>{this.check.current||(delete window.google,U=!1)};window.setTimeout(t,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return i.exports.jsxs(i.exports.Fragment,{children:[i.exports.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||i.exports.jsx(_,{})]})}}let A;j.defaultProps=R;const W=i.exports.jsx(_,{});(0,n.memo)((function(t){var{loadingElement:e,onLoad:s,onError:o,onUnmount:i,children:r}=t,a=S(t,["loadingElement","onLoad","onError","onUnmount","children"]);const{isLoaded:l,loadError:p}=function({id:t=R.id,version:e=R.version,nonce:s,googleMapsApiKey:o,googleMapsClientId:i,language:r,region:a,libraries:l,preventGoogleFontsLoading:p,channel:h,mapIds:c}){const u=(0,n.useRef)(!1),[d,g]=(0,n.useState)(!1),[m,f]=(0,n.useState)(void 0);(0,n.useEffect)((function(){return u.current=!0,()=>{u.current=!1}}),[]),(0,n.useEffect)((function(){I&&p&&B()}),[p]),(0,n.useEffect)((function(){d&&y(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[d]);const v=z({version:e,googleMapsApiKey:o,googleMapsClientId:i,language:r,region:a,libraries:l,channel:h,mapIds:c});(0,n.useEffect)((function(){function e(){u.current&&(g(!0),A=v)}I&&(window.google&&window.google.maps&&A===v?e():D({id:t,url:v,nonce:s}).then(e).catch((function(t){u.current&&f(t),console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${o||"-"}) or Client ID (${i||"-"})\n Otherwise it is a Network issue.\n `),console.error(t)})))}),[t,v,s]);const x=(0,n.useRef)();return(0,n.useEffect)((function(){x.current&&l!==x.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"),x.current=l}),[l]),{isLoaded:d,loadError:m,url:v}}(a);return(0,n.useEffect)((function(){l&&"function"===typeof s&&s()}),[l,s]),(0,n.useEffect)((function(){p&&"function"===typeof o&&o(p)}),[p,o]),(0,n.useEffect)((function(){return()=>{i&&i()}}),[i]),l?r:e||W}));var N;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(N||(N={}));const Z={},V={options(t,e){t.setOptions(e)}};class H extends n.PureComponent{constructor(){super(...arguments),this.state={trafficLayer:null},this.setTrafficLayerCallback=()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)},this.registeredEvents=[]}componentDidMount(){const t=new google.maps.TrafficLayer(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:V,eventMap:Z,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{trafficLayer:t}}),this.setTrafficLayerCallback)}componentDidUpdate(t){null!==this.state.trafficLayer&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:V,eventMap:Z,prevProps:t,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),k(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}H.contextType=x;class F extends n.PureComponent{constructor(){super(...arguments),this.state={bicyclingLayer:null},this.setBicyclingLayerCallback=()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}}componentDidMount(){const t=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:t})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}F.contextType=x;class G extends n.PureComponent{constructor(){super(...arguments),this.state={transitLayer:null},this.setTransitLayerCallback=()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}}componentDidMount(){const t=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:t}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}G.contextType=x;const $={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Y={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};class K extends n.PureComponent{constructor(t){super(t),this.registeredEvents=[],this.state={drawingManager:null},this.setDrawingManagerCallback=()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)},y(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){const t=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:Y,eventMap:$,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{drawingManager:t}}),this.setDrawingManagerCallback)}componentDidUpdate(t){null!==this.state.drawingManager&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:Y,eventMap:$,prevProps:t,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),k(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}K.contextType=x;const q={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"},J={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}};class X extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[]}componentDidMount(){const t=Object.assign(Object.assign(Object.assign({},this.props.options||{}),this.props.clusterer?{}:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(t),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=w({updaterMap:J,eventMap:q,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)}componentDidUpdate(t){this.marker&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:J,eventMap:q,prevProps:t,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),k(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){let t=null;return this.props.children&&(t=n.Children.map(this.props.children,(t=>{if(!(0,n.isValidElement)(t))return t;let e=t;return(0,n.cloneElement)(e,{anchor:this.marker})}))),t||null}}X.contextType=x;var Q=function(){function t(e,s){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=s,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.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,s=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(n){if(t=!1,!e){var o=s.cluster.getClusterer();if(google.maps.event.trigger(o,"click",s.cluster),google.maps.event.trigger(o,"clusterclick",s.cluster),o.getZoomOnClick()){var i=o.getMaxZoom(),r=s.cluster.getBounds();o.getMap().fitBounds(r),setTimeout((function(){o.getMap().fitBounds(r),null!==i&&o.getMap().getZoom()>i&&o.getMap().setZoom(i+1)}),100)}n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(s.cluster.getClusterer(),"mouseover",s.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(s.cluster.getClusterer(),"mouseout",s.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,s=t.y;this.div.style.top=s+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",s=this.backgroundPosition.split(" "),n=parseInt(s[0].replace(/^\s+|\s+$/g,""),10),o=parseInt(s[1].replace(/^\s+|\s+$/g,""),10),i=this.getPosFromLatLng(this.center);e=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(i.y,"px"),this.div.style.left="".concat(i.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var r=document.createElement("img");r.alt=e,r.src=this.url,r.style.position="absolute",r.style.top="".concat(o,"px"),r.style.left="".concat(n,"px"),this.cluster.getClusterer().enableRetinaIcons||(r.style.clip="rect(-".concat(o,"px, -").concat(n+this.width,"px, -").concat(o+this.height,", -").concat(n,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(r),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),s=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=s.url,this.height=s.height,this.width=s.width,s.className&&(this.className="".concat(this.clusterClassName," ").concat(s.className)),this.anchorText=s.anchorText||[0,0],this.anchorIcon=s.anchorIcon||[this.height/2,this.width/2],this.textColor=s.textColor||"black",this.textSize=s.textSize||11,this.textDecoration=s.textDecoration||"none",this.fontWeight=s.fontWeight||"bold",this.fontStyle=s.fontStyle||"normal",this.fontFamily=s.fontFamily||"Arial,sans-serif",this.backgroundPosition=s.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),tt=function(){function t(t){this.markerClusterer=t,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 Q(this,this.markerClusterer.getStyles())}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),s=0;so)t.getMap()!==this.map&&t.setMap(this.map);else if(ne||t0))for(var t=0;t3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),n=this.getExtendedBounds(s),o=Math.min(t+this.batchSize,this.markers.length),i=t;i{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}}componentDidMount(){if(this.context){const t=new nt(this.context,[],this.props.options);this.registeredEvents=w({updaterMap:it,eventMap:ot,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{markerClusterer:t}}),this.setClustererCallback)}}componentDidUpdate(t){this.state.markerClusterer&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:it,eventMap:ot,prevProps:t,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),k(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}rt.contextType=x;var at=function(){function t(e){void 0===e&&(e={}),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===e.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof e.visible&&("undefined"===typeof e.isHidden?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var t=this;function e(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}if(!this.div){if(this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content)),this.getPanes()[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var s=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-s.left-s.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var n=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0;or&&(s=g.x+h+l+u-r),this.alignBottom?g.y<-p+d+c?n=g.y+p-d-c:g.y+p+d>a&&(n=g.y+p+d-a):g.y<-p+d?n=g.y+p-d:g.y+c+p+d>a&&(n=g.y+c+p+d-a)),0===s&&0===n||e.panBy(s,n)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var t=this.boxStyle;for(var e in t)t.hasOwnProperty(e)&&(this.div.style[e]=t[e]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var s=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*s+')"',this.div.style.filter="alpha(opacity="+100*s+")"}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")}},t.prototype.getBoxWidths=function(){var t={top:0,bottom:0,left:0,right:0};if(!this.div)return t;if(document.defaultView){var e=this.div.ownerDocument,s=e&&e.defaultView?e.defaultView.getComputedStyle(this.div,""):null;s&&(t.top=parseInt(s.borderTopWidth||"",10)||0,t.bottom=parseInt(s.borderBottomWidth||"",10)||0,t.left=parseInt(s.borderLeftWidth||"",10)||0,t.right=parseInt(s.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var n=this.div.currentStyle;n&&(t.top=parseInt(n.borderTopWidth||"",10)||0,t.bottom=parseInt(n.borderBottomWidth||"",10)||0,t.left=parseInt(n.borderLeftWidth||"",10)||0,t.right=parseInt(n.borderRightWidth||"",10)||0)}return t},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var t=this.getProjection().fromLatLngToDivPixel(this.position);null!==t&&(this.div.style.left=t.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(t.y+this.pixelOffset.height)+"px":this.div.style.top=t.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(t){void 0===t&&(t={}),"undefined"!==typeof t.boxClass&&(this.boxClass=t.boxClass,this.setBoxStyle()),"undefined"!==typeof t.boxStyle&&(this.boxStyle=t.boxStyle,this.setBoxStyle()),"undefined"!==typeof t.content&&this.setContent(t.content),"undefined"!==typeof t.disableAutoPan&&(this.disableAutoPan=t.disableAutoPan),"undefined"!==typeof t.maxWidth&&(this.maxWidth=t.maxWidth),"undefined"!==typeof t.pixelOffset&&(this.pixelOffset=t.pixelOffset),"undefined"!==typeof t.alignBottom&&(this.alignBottom=t.alignBottom),"undefined"!==typeof t.position&&this.setPosition(t.position),"undefined"!==typeof t.zIndex&&this.setZIndex(t.zIndex),"undefined"!==typeof t.closeBoxMargin&&(this.closeBoxMargin=t.closeBoxMargin),"undefined"!==typeof t.closeBoxURL&&(this.closeBoxURL=t.closeBoxURL),"undefined"!==typeof t.infoBoxClearance&&(this.infoBoxClearance=t.infoBoxClearance),"undefined"!==typeof t.isHidden&&(this.isHidden=t.isHidden),"undefined"!==typeof t.visible&&(this.isHidden=!t.visible),"undefined"!==typeof t.enableEventPropagation&&(this.enableEventPropagation=t.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(t){this.content=t,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof t?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof t?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(t){this.position=t,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(t){this.isHidden=!t,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(t){this.zIndex=t,this.div&&(this.div.style.zIndex=t+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var t=this.getMap();return"undefined"!==typeof t&&null!==t&&!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(t,e){var s=this;e&&(this.position=e.getPosition(),this.moveListener=google.maps.event.addListener(e,"position_changed",(function(){var t=e.getPosition();s.setPosition(t)})),this.mapListener=google.maps.event.addListener(e,"map_changed",(function(){s.setMap(e.map)}))),this.setMap(t),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var t=0;t{e?t.open(this.context,e):t.getPosition()?t.open(this.context):y(!1,"You must provide either an anchor or a position prop for .")},this.setInfoBoxCallback=()=>{const{anchor:t,onLoad:e}=this.props,{infoBox:s}=this.state;null!==s&&null!==this.containerElement&&(s.setContent(this.containerElement),this.open(s,t),e&&e(s))}}componentDidMount(){const{options:t}=this.props,e=t||{},{position:s}=e,n=S(e,["position"]);let o;!s||s instanceof google.maps.LatLng||(o=new google.maps.LatLng(s.lat,s.lng));const i=new at(Object.assign(Object.assign({},n),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=w({updaterMap:pt,eventMap:lt,prevProps:{},nextProps:this.props,instance:i}),this.setState({infoBox:i},this.setInfoBoxCallback)}componentDidUpdate(t){const{infoBox:e}=this.state;null!==e&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:pt,eventMap:lt,prevProps:t,nextProps:this.props,instance:e}))}componentWillUnmount(){const{onUnmount:t}=this.props,{infoBox:e}=this.state;null!==e&&(t&&t(e),k(this.registeredEvents),e.close())}render(){return this.containerElement?(0,o.createPortal)(n.Children.only(this.props.children),this.containerElement):null}}ht.contextType=x;var ct={exports:{}};ct.exports=function(){function t(s,n,o,i,r,a){if(!(r-i<=o)){var l=i+r>>1;e(s,n,l,i,r,a%2),t(s,n,o,i,l-1,a+1),t(s,n,o,l+1,r,a+1)}}function e(t,n,o,i,r,a){for(;r>i;){if(r-i>600){var l=r-i+1,p=o-i+1,h=Math.log(l),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(l-c)/l)*(p-l/2<0?-1:1);e(t,n,o,Math.max(i,Math.floor(o-p*c/l+u)),Math.min(r,Math.floor(o+(l-p)*c/l+u)),a)}var d=n[2*o+a],g=i,m=r;for(s(t,n,i,o),n[2*r+a]>d&&s(t,n,i,r);gd;)m--}n[2*i+a]===d?s(t,n,i,m):s(t,n,++m,r),m<=o&&(i=m+1),o<=m&&(r=m-1)}}function s(t,e,s,o){n(t,s,o),n(e,2*s,2*o),n(e,2*s+1,2*o+1)}function n(t,e,s){var n=t[e];t[e]=t[s],t[s]=n}function o(t,e,s,n,o,i,r){for(var a,l,p=[0,t.length-1,0],h=[];p.length;){var c=p.pop(),u=p.pop(),d=p.pop();if(u-d<=r)for(var g=d;g<=u;g++)a=e[2*g],l=e[2*g+1],a>=s&&a<=o&&l>=n&&l<=i&&h.push(t[g]);else{var m=Math.floor((d+u)/2);a=e[2*m],l=e[2*m+1],a>=s&&a<=o&&l>=n&&l<=i&&h.push(t[m]);var f=(c+1)%2;(0===c?s<=a:n<=l)&&(p.push(d),p.push(m-1),p.push(f)),(0===c?o>=a:i>=l)&&(p.push(m+1),p.push(u),p.push(f))}}return h}function i(t,e,s,n,o,i){for(var a=[0,t.length-1,0],l=[],p=o*o;a.length;){var h=a.pop(),c=a.pop(),u=a.pop();if(c-u<=i)for(var d=u;d<=c;d++)r(e[2*d],e[2*d+1],s,n)<=p&&l.push(t[d]);else{var g=Math.floor((u+c)/2),m=e[2*g],f=e[2*g+1];r(m,f,s,n)<=p&&l.push(t[g]);var v=(h+1)%2;(0===h?s-o<=m:n-o<=f)&&(a.push(u),a.push(g-1),a.push(v)),(0===h?s+o>=m:n+o>=f)&&(a.push(g+1),a.push(c),a.push(v))}}return l}function r(t,e,s,n){var o=t-s,i=e-n;return o*o+i*i}var a=function(t){return t[0]},l=function(t){return t[1]},p=function(e,s,n,o,i){void 0===s&&(s=a),void 0===n&&(n=l),void 0===o&&(o=64),void 0===i&&(i=Float64Array),this.nodeSize=o,this.points=e;for(var r=e.length<65536?Uint16Array:Uint32Array,p=this.ids=new r(e.length),h=this.coords=new i(2*e.length),c=0;ct},gt=Math.fround||(mt=new Float32Array(1),t=>(mt[0]=+t,mt[0]));var mt;class ft{constructor(t){this.options=wt(Object.create(dt),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:s,maxZoom:n,nodeSize:o}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;let r=[];for(let a=0;a=s;a--){const t=+Date.now();r=this._cluster(r,a),this.trees[a]=new ut(r,Lt,Pt,o,Float32Array),e&&console.log("z%d: %d clusters in %dms",a,r.length,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,o=180;else if(s>o){const t=this.getClusters([s,n,180,i],e),r=this.getClusters([-180,n,o,i],e);return t.concat(r)}const r=this.trees[this._limitZoom(e)],a=r.range(Mt(s),bt(i),Mt(o),bt(n)),l=[];for(const p of a){const t=r.points[p];l.push(t.numPoints?xt(t):this.points[t.index])}return l}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(n);const i=o.points[e];if(!i)throw new Error(n);const r=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=o.within(i.x,i.y,r),l=[];for(const p of a){const e=o.points[p];e.parentId===t&&l.push(e.numPoints?xt(e):this.points[e.index])}if(0===l.length)throw new Error(n);return l}getLeaves(t,e,s){e=e||10,s=s||0;const n=[];return this._appendLeaves(n,t,e,s,0),n}getTile(t,e,s){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:r}=this.options,a=r/i,l=(s-a)/o,p=(s+1+a)/o,h={features:[]};return this._addTileFeatures(n.range((e-a)/o,l,(e+1+a)/o,p),n.points,e,s,o,h),0===e&&this._addTileFeatures(n.range(1-a/o,l,1,p),n.points,o,s,o,h),e===o-1&&this._addTileFeatures(n.range(0,l,a/o,p),n.points,-1,s,o,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,n,o){const i=this.getChildren(e);for(const r of i){const e=r.properties;if(e&&e.cluster?o+e.point_count<=n?o+=e.point_count:o=this._appendLeaves(t,e.cluster_id,s,n,o):oe&&(c+=s.numPoints||1)}if(c>h&&c>=r){let t=n.x*h,r=n.y*h,a=i&&h>1?this._map(n,!0):null;const u=(l<<5)+(e+1)+this.points.length;for(const s of p){const l=o.points[s];if(l.zoom<=e)continue;l.zoom=e;const p=l.numPoints||1;t+=l.x*p,r+=l.y*p,l.parentId=u,i&&(a||(a=this._map(n,!0)),i(a,this._map(l)))}n.parentId=u,s.push(vt(t/c,r/c,u,c,a))}else if(s.push(n),c>1)for(const t of p){const n=o.points[t];n.zoom<=e||(n.zoom=e,s.push(n))}}return s}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?wt({},t.properties):t.properties;const s=this.points[t.index].properties,n=this.options.map(s);return e&&n===s?wt({},n):n}}function vt(t,e,s,n,o){return{x:gt(t),y:gt(e),zoom:1/0,id:s,parentId:-1,numPoints:n,properties:o}}function yt(t,e){const[s,n]=t.geometry.coordinates;return{x:gt(Mt(s)),y:gt(bt(n)),zoom:1/0,index:e,parentId:-1}}function xt(t){return{type:"Feature",id:t.id,properties:Ct(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),kt(t.y)]}};var e}function Ct(t){const e=t.numPoints,s=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return wt(wt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:s})}function Mt(t){return t/360+.5}function bt(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function kt(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function wt(t,e){for(const s in e)t[s]=e[s];return t}function Lt(t){return t.x}function Pt(t){return t.y}var Et="function"===typeof WeakSet,St=Object.keys;function Ot(t,e){return t===e||t!==t&&e!==e}function It(t){return t.constructor===Object||null==t.constructor}function Dt(t){return!!t&&"function"===typeof t.then}function Tt(t){return!(!t||!t.$$typeof)}function Bt(){var t=[];return{add:function(e){t.push(e)},has:function(e){return-1!==t.indexOf(e)}}}var zt=Et?function(){return new WeakSet}:Bt;function Ut(t){return function(e){var s=t||e;return function(t,e,n,o,i,r,a){void 0===a&&(a=zt());var l=!!t&&"object"===typeof t,p=!!e&&"object"===typeof e;if(l||p){var h=l&&a.has(t),c=p&&a.has(e);if(h||c)return h&&c;l&&a.add(t),p&&a.add(e)}return s(t,e,a)}}}var _t=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function Rt(t,e,s,n){var o=St(t),i=o.length;if(St(e).length!==i)return!1;if(i)for(var r=void 0;i-- >0;){if("_owner"===(r=o[i])){var a=Tt(t),l=Tt(e);if((a||l)&&a!==l)return!1}if(!_t(e,r)||!s(t[r],e[r],r,r,t,e,n))return!1}return!0}var jt="function"===typeof Map,At="function"===typeof Set;function Wt(t){var e="function"===typeof t?t(s):function(t,e,n,o,i,r,a){return s(t,e,a)};function s(t,s,n){if(t===s)return!0;if(t&&s&&"object"===typeof t&&"object"===typeof s){if(It(t)&&It(s))return Rt(t,s,e,n);var o=Array.isArray(t),i=Array.isArray(s);return o||i?o===i&&function(t,e,s,n){var o=t.length;if(e.length!==o)return!1;for(;o-- >0;)if(!s(t[o],e[o],o,o,t,e,n))return!1;return!0}(t,s,e,n):(o=t instanceof Date,i=s instanceof Date,o||i?o===i&&Ot(t.getTime(),s.getTime()):(o=t instanceof RegExp,i=s instanceof RegExp,o||i?o===i&&function(t,e){return t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.unicode===e.unicode&&t.sticky===e.sticky&&t.lastIndex===e.lastIndex}(t,s):Dt(t)||Dt(s)?t===s:jt&&(o=t instanceof Map,i=s instanceof Map,o||i)?o===i&&function(t,e,s,n){var o=t.size===e.size;if(o&&t.size){var i={},r=0;t.forEach((function(a,l){if(o){var p=!1,h=0;e.forEach((function(o,c){p||i[h]||(p=s(l,c,r,h,t,e,n)&&s(a,o,l,c,t,e,n))&&(i[h]=!0),h++})),r++,o=p}}))}return o}(t,s,e,n):At&&(o=t instanceof Set,i=s instanceof Set,o||i)?o===i&&function(t,e,s,n){var o=t.size===e.size;if(o&&t.size){var i={};t.forEach((function(r,a){if(o){var l=!1,p=0;e.forEach((function(o,h){l||i[p]||(l=s(r,o,a,h,t,e,n))&&(i[p]=!0),p++})),o=l}}))}return o}(t,s,e,n):Rt(t,s,e,n)))}return t!==t&&s!==s}return s}var Nt=Wt();function Zt(t,e){var s={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(s[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);ot.extend(e.getPosition())),new google.maps.LatLngBounds(this._position,this._position))}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>t.getVisible())).length}push(t){this.markers.push(t)}delete(){this.marker&&(this.marker.setMap(null),delete this.marker),this.markers.length=0}}class Ht{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return Ft(t)}}const Ft=t=>t.map((t=>new Vt({position:t.getPosition(),markers:[t]})));class Gt extends Ht{constructor(t){var{maxZoom:e,radius:s=60}=t,n=Zt(t,["maxZoom","radius"]);super({maxZoom:e}),this.superCluster=new ft(Object.assign({maxZoom:this.maxZoom,radius:s},n)),this.state={zoom:null}}calculate(t){let e=!1;if(!Nt(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const s=this.markers.map((t=>({type:"Feature",geometry:{type:"Point",coordinates:[t.getPosition().lng(),t.getPosition().lat()]},properties:{marker:t}})));this.superCluster.load(s)}const s={zoom:t.map.getZoom()};return e||this.state.zoom>this.maxZoom&&s.zoom>this.maxZoom||(e=e||!Nt(this.state,s)),this.state=s,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map(this.transformCluster.bind(this))}transformCluster({geometry:{coordinates:[t,e]},properties:s}){if(s.cluster)return new Vt({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map((t=>t.properties.marker)),position:new google.maps.LatLng({lat:e,lng:t})});{const t=s.marker;return new Vt({markers:[t],position:t.getPosition()})}}}class $t{constructor(t,e){this.markers={sum:t.length};const s=e.map((t=>t.count)),n=s.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...s),max:Math.max(...s)}}}}class Yt{render({count:t,position:e},s){const n=t>Math.max(10,s.clusters.markers.mean)?"#ff0000":"#0000ff",o=window.btoa(`\n \n \n \n \n `);return new google.maps.Marker({position:e,icon:{url:`data:image/svg+xml;base64,${o}`,scaledSize:new google.maps.Size(45,45)},label:{text:String(t),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${t} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+t})}}class Kt{constructor(){!function(t,e){for(let s in e.prototype)t.prototype[s]=e.prototype[s]}(Kt,google.maps.OverlayView)}}var qt;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(qt||(qt={}));const Jt=(t,e,s)=>{s.fitBounds(e.bounds)};class Xt extends Kt{constructor({map:t,markers:e=[],algorithm:s=new Gt({}),renderer:n=new Yt,onClusterClick:o=Jt}){super(),this.markers=[...e],this.clusters=[],this.algorithm=s,this.renderer=n,this.onClusterClick=o,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const s=this.markers.indexOf(t);return-1!==s&&(t.setMap(null),this.markers.splice(s,1),e||this.render(),!0)}removeMarkers(t,e){let s=!1;return t.forEach((t=>{s=this.removeMarker(t,!0)||s})),s&&!e&&this.render(),s}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,qt.CLUSTERING_BEGIN,this);const{clusters:e,changed:s}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});(s||void 0==s)&&(this.reset(),this.clusters=e,this.renderClusters()),google.maps.event.trigger(this,qt.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((t=>t.setMap(null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new $t(this.markers,this.clusters),e=this.getMap();this.clusters.forEach((s=>{1===s.markers.length?s.marker=s.markers[0]:(s.marker=this.renderer.render(s,t),this.onClusterClick&&s.marker.addListener("click",(t=>{google.maps.event.trigger(this,qt.CLUSTER_CLICK,s),this.onClusterClick(t,s,e)}))),s.marker.setMap(e)}))}}const Qt=t=>{const e=function(){y(!!n.useContext,"useGoogleMap is React hook and requires React version 16.8+");const t=(0,n.useContext)(x);return y(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}(),[s,o]=(0,n.useState)(null);return(0,n.useEffect)((()=>{if(e&&null===s){const s=new Xt(Object.assign(Object.assign({},t),{map:e}));o(s)}}),[e]),s};(0,n.memo)((function({children:t,options:e}){const s=Qt(e);return null!==s?t(s):null}));const te={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ee={options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},zIndex(t,e){t.setZIndex(e)}};class se extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=null,this.state={infoWindow:null},this.open=(t,e)=>{e?t.open(this.context,e):t.getPosition()?t.open(this.context):y(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")},this.setInfoWindowCallback=()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}}componentDidMount(){const t=new google.maps.InfoWindow(Object.assign({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=w({updaterMap:ee,eventMap:te,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({infoWindow:t})),this.setInfoWindowCallback)}componentDidUpdate(t){null!==this.state.infoWindow&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:ee,eventMap:te,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(k(this.registeredEvents),this.state.infoWindow.close())}render(){return this.containerElement?o.createPortal(n.Children.only(this.props.children),this.containerElement):null}}se.contextType=x;const ne={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},oe={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},visible(t,e){t.setVisible(e)}};class ie extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polyline:null},this.setPolylineCallback=()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}}componentDidMount(){const t=new google.maps.Polyline(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:oe,eventMap:ne,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polyline:t}}),this.setPolylineCallback)}componentDidUpdate(t){null!==this.state.polyline&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:oe,eventMap:ne,prevProps:t,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),k(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}ie.contextType=x;const re={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ae={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},paths(t,e){t.setPaths(e)},visible(t,e){t.setVisible(e)}};class le extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polygon:null},this.setPolygonCallback=()=>{null!==this.state.polygon&&this.props.onLoad&&this.props.onLoad(this.state.polygon)}}componentDidMount(){const t=new google.maps.Polygon(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:ae,eventMap:re,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polygon:t}}),this.setPolygonCallback)}componentDidUpdate(t){null!==this.state.polygon&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:ae,eventMap:re,prevProps:t,nextProps:this.props,instance:this.state.polygon}))}componentWillUnmount(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),k(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))}render(){return null}}le.contextType=x;const pe={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"},he={bounds(t,e){t.setBounds(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},visible(t,e){t.setVisible(e)}};class ce extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={rectangle:null},this.setRectangleCallback=()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}}componentDidMount(){const t=new google.maps.Rectangle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:he,eventMap:pe,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{rectangle:t}}),this.setRectangleCallback)}componentDidUpdate(t){null!==this.state.rectangle&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:he,eventMap:pe,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),k(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}ce.contextType=x;const ue={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},de={center(t,e){t.setCenter(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},radius(t,e){t.setRadius(e)},visible(t,e){t.setVisible(e)}};class ge extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={circle:null},this.setCircleCallback=()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}}componentDidMount(){const t=new google.maps.Circle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:de,eventMap:ue,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{circle:t}}),this.setCircleCallback)}componentDidUpdate(t){null!==this.state.circle&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:de,eventMap:ue,prevProps:t,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),k(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))}render(){return null}}ge.contextType=x;const me={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},fe={add(t,e){t.add(e)},addgeojson(t,e,s){t.addGeoJson(e,s)},contains(t,e){t.contains(e)},foreach(t,e){t.forEach(e)},loadgeojson(t,e,s,n){t.loadGeoJson(e,s,n)},overridestyle(t,e,s){t.overrideStyle(e,s)},remove(t,e){t.remove(e)},revertstyle(t,e){t.revertStyle(e)},controlposition(t,e){t.setControlPosition(e)},controls(t,e){t.setControls(e)},drawingmode(t,e){t.setDrawingMode(e)},map(t,e){t.setMap(e)},style(t,e){t.setStyle(e)},togeojson(t,e){t.toGeoJson(e)}};class ve extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={data:null},this.setDataCallback=()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}}componentDidMount(){const t=new google.maps.Data(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=w({updaterMap:fe,eventMap:me,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({data:t})),this.setDataCallback)}componentDidUpdate(t){null!==this.state.data&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:fe,eventMap:me,prevProps:t,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),k(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}ve.contextType=x;const ye={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},xe={options(t,e){t.setOptions(e)},url(t,e){t.setUrl(e)},zIndex(t,e){t.setZIndex(e)}};class Ce extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={kmlLayer:null},this.setKmlLayerCallback=()=>{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}}componentDidMount(){const t=new google.maps.KmlLayer(Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=w({updaterMap:xe,eventMap:ye,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{kmlLayer:t}}),this.setKmlLayerCallback)}componentDidUpdate(t){null!==this.state.kmlLayer&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:xe,eventMap:ye,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),k(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function Me(t,e){return new e(t.lat,t.lng)}function be(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function ke(t){if(!t)return"";return(t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng))+""}function we(t){if(!t)return"";return(t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west)))+""}Ce.contextType=x;class Le extends n.PureComponent{constructor(t){super(t),this.state={paneEl:null,containerStyle:{position:"absolute"}},this.updatePane=()=>{const t=this.props.mapPaneName,e=this.overlayView.getPanes();y(!!t,"OverlayView requires props.mapPaneName but got %s",t),e?this.setState({paneEl:e[t]}):this.setState({paneEl:null})},this.onAdd=()=>{var t,e;this.updatePane(),null===(e=(t=this.props).onLoad)||void 0===e||e.call(t,this.overlayView)},this.onPositionElement=()=>{var t,e;const s=function(t,e,s,n){return void 0!==s?function(t,e,s){const n=t&&t.fromLatLngToDivPixel(s.getNorthEast()),o=t&&t.fromLatLngToDivPixel(s.getSouthWest());return n&&o?{left:`${o.x+e.x}px`,top:`${n.y+e.y}px`,width:n.x-o.x-e.x+"px",height:o.y-n.y-e.y+"px"}:{left:"-9999px",top:"-9999px"}}(t,e,(o=s,i=google.maps.LatLngBounds,r=be,o instanceof i?o:r(o,i))):function(t,e,s){const n=t&&t.fromLatLngToDivPixel(s);if(n){const{x:t,y:s}=n;return{left:`${t+e.x}px`,top:`${s+e.y}px`}}return{left:"-9999px",top:"-9999px"}}(t,e,function(t,e,s){return t instanceof e?t:s(t,e)}(n,google.maps.LatLng,Me));var o,i,r}(this.overlayView.getProjection(),Object.assign({x:0,y:0},this.containerRef.current?(t=this.containerRef.current,"function"===typeof(e=this.props.getPixelPositionOffset)?e(t.offsetWidth,t.offsetHeight):{}):{}),this.props.bounds,this.props.position),{left:n,top:o,width:i,height:r}=this.state.containerStyle;var a,l;l={left:n,top:o,width:i,height:r},((a=s).left!==l.left||a.top!==l.top||a.width!==l.height||a.height!==l.height)&&this.setState({containerStyle:Object.assign(Object.assign({},s),{position:"absolute"})})},this.draw=()=>{this.onPositionElement()},this.onRemove=()=>{var t,e;this.setState((()=>({paneEl:null}))),null===(e=(t=this.props).onUnmount)||void 0===e||e.call(t,this.overlayView)},this.containerRef=n.createRef();const e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,this.overlayView=e}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(t){const e=ke(t.position),s=ke(this.props.position),n=we(t.bounds),o=we(this.props.bounds);e===s&&n===o||this.overlayView.draw(),t.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){const t=this.state.paneEl;return t?o.createPortal(i.exports.jsx("div",Object.assign({ref:this.containerRef,style:this.state.containerStyle},{children:n.Children.only(this.props.children)})),t):null}}Le.FLOAT_PANE="floatPane",Le.MAP_PANE="mapPane",Le.MARKER_LAYER="markerLayer",Le.OVERLAY_LAYER="overlayLayer",Le.OVERLAY_MOUSE_TARGET="overlayMouseTarget",Le.contextType=x;const Pe={onDblClick:"dblclick",onClick:"click"},Ee={opacity(t,e){t.setOpacity(e)}};class Se extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={groundOverlay:null},this.setGroundOverlayCallback=()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}}componentDidMount(){y(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");const t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=w({updaterMap:Ee,eventMap:Pe,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{groundOverlay:t}}),this.setGroundOverlayCallback)}componentDidUpdate(t){null!==this.state.groundOverlay&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:Ee,eventMap:Pe,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}Se.defaultProps={onLoad:function(){}},Se.contextType=x;const Oe={},Ie={data(t,e){t.setData(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)}};class De extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={heatmapLayer:null},this.setHeatmapLayerCallback=()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}}componentDidMount(){y(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to ? %s',google.maps.visualization),y(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);const t=new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=w({updaterMap:Ie,eventMap:Oe,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{heatmapLayer:t}}),this.setHeatmapLayerCallback)}componentDidUpdate(t){k(this.registeredEvents),this.registeredEvents=w({updaterMap:Ie,eventMap:Oe,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),k(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}De.contextType=x;const Te={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Be={register(t,e,s){t.registerPanoProvider(e,s)},links(t,e){t.setLinks(e)},motionTracking(t,e){t.setMotionTracking(e)},options(t,e){t.setOptions(e)},pano(t,e){t.setPano(e)},position(t,e){t.setPosition(e)},pov(t,e){t.setPov(e)},visible(t,e){t.setVisible(e)},zoom(t,e){t.setZoom(e)}};class ze extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={streetViewPanorama:null},this.setStreetViewPanoramaCallback=()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}}componentDidMount(){const t=this.context.getStreetView();this.registeredEvents=w({updaterMap:Be,eventMap:Te,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({streetViewPanorama:t})),this.setStreetViewPanoramaCallback)}componentDidUpdate(t){null!==this.state.streetViewPanorama&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:Be,eventMap:Te,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),k(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}ze.contextType=x;class Ue extends n.PureComponent{constructor(){super(...arguments),this.state={streetViewService:null},this.setStreetViewServiceCallback=()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}}componentDidMount(){const t=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:t}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}Ue.contextType=x;n.PureComponent;const _e={onDirectionsChanged:"directions_changed"},Re={directions(t,e){t.setDirections(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},panel(t,e){t.setPanel(e)},routeIndex(t,e){t.setRouteIndex(e)}};class je extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={directionsRenderer:null},this.setDirectionsRendererCallback=()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}}componentDidMount(){const t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=w({updaterMap:Re,eventMap:_e,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{directionsRenderer:t}}),this.setDirectionsRendererCallback)}componentDidUpdate(t){null!==this.state.directionsRenderer&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:Re,eventMap:_e,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),k(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return i.exports.jsx(i.exports.Fragment,{})}}je.contextType=x;n.PureComponent;const Ae={onPlacesChanged:"places_changed"},We={bounds(t,e){t.setBounds(e)}};class Ne extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=(0,n.createRef)(),this.state={searchBox:null},this.setSearchBoxCallback=()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}}componentDidMount(){if(y(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){const t=this.containerElement.current.querySelector("input");if(null!==t){const e=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=w({updaterMap:We,eventMap:Ae,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{searchBox:e}}),this.setSearchBoxCallback)}}}componentDidUpdate(t){null!==this.state.searchBox&&(k(this.registeredEvents),this.registeredEvents=w({updaterMap:We,eventMap:Ae,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),k(this.registeredEvents))}render(){return i.exports.jsx("div",Object.assign({ref:this.containerElement},{children:n.Children.only(this.props.children)}))}}Ne.contextType=x;const Ze={onPlaceChanged:"place_changed"},Ve={bounds(t,e){t.setBounds(e)},restrictions(t,e){t.setComponentRestrictions(e)},fields(t,e){t.setFields(e)},options(t,e){t.setOptions(e)},types(t,e){t.setTypes(e)}};class He extends n.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=(0,n.createRef)(),this.state={autocomplete:null},this.setAutocompleteCallback=()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}}componentDidMount(){y(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);const t=this.containerElement.current.querySelector("input");if(t){const e=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=w({updaterMap:Ve,eventMap:Ze,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{autocomplete:e}}),this.setAutocompleteCallback)}}componentDidUpdate(t){k(this.registeredEvents),this.registeredEvents=w({updaterMap:Ve,eventMap:Ze,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&k(this.registeredEvents)}render(){return i.exports.jsx("div",Object.assign({ref:this.containerElement,className:this.props.className||""},{children:n.Children.only(this.props.children)}))}}He.contextType=x}}]);