UNPKG

@selfcommunity/react-core

Version:

React Core Components useful for integrating UI Community components (react-ui).

2 lines • 272 kB
/*! For license information please see 258.js.LICENSE.txt */ (self.webpackChunkSelfCommunityReactCore=self.webpackChunkSelfCommunityReactCore||[]).push([[258],{7871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Autocomplete:()=>wn,BicyclingLayer:()=>G,BicyclingLayerF:()=>F,Circle:()=>Mt,CircleF:()=>xt,Data:()=>Rt,DataF:()=>Ot,DirectionsRenderer:()=>dn,DirectionsService:()=>cn,DistanceMatrixService:()=>hn,DrawingManager:()=>X,DrawingManagerF:()=>Y,FLOAT_PANE:()=>Nt,GoogleMap:()=>E,GoogleMapsMarkerClusterer:()=>it,GoogleMarkerClusterer:()=>st,GroundOverlay:()=>Qt,GroundOverlayF:()=>Xt,HeatmapLayer:()=>on,HeatmapLayerF:()=>nn,InfoBox:()=>be,InfoBoxF:()=>we,InfoWindow:()=>ut,InfoWindowF:()=>ct,KmlLayer:()=>Dt,LoadScript:()=>O,LoadScriptNext:()=>I,MAP_PANE:()=>zt,MARKER_LAYER:()=>Jt,MapContext:()=>f,Marker:()=>oe,MarkerClusterer:()=>he,MarkerClustererF:()=>de,MarkerF:()=>ne,OVERLAY_LAYER:()=>Ft,OVERLAY_MOUSE_TARGET:()=>Gt,OverlayView:()=>$t,OverlayViewF:()=>Vt,Polygon:()=>wt,PolygonF:()=>yt,Polyline:()=>gt,PolylineF:()=>ft,Rectangle:()=>Ct,RectangleF:()=>St,StandaloneSearchBox:()=>mn,StreetViewPanorama:()=>an,StreetViewService:()=>ln,TrafficLayer:()=>J,TrafficLayerF:()=>z,TransitLayer:()=>$,TransitLayerF:()=>V,useGoogleMap:()=>g,useJsApiLoader:()=>j,useLoadScript:()=>R});var o=n(5276),r=n(8156),i=n(7111),s=function(e,t){return s=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])},s(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}s(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;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};function c(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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function u(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))}function p(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h=d((function(e,t,n,o,r,i,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,r,i,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}})),f=(0,r.createContext)(null);function g(){h(!!r.useContext,"useGoogleMap is React hook and requires React version 16.8+");var e=(0,r.useContext)(f);return h(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}function m(e){google.maps.event.removeListener(e)}function v(e){void 0===e&&(e=[]),e.forEach(m)}function y(e){var t=e.updaterMap,n=e.eventMap,o=e.prevProps,r=e.nextProps,i=e.instance,s=function(e,t,n){var o,r,i,s=(o=n,r=function(n,o,r){return"function"==typeof e[r]&&n.push(google.maps.event.addListener(t,o,e[r])),n},i=[],Object.keys(o).reduce((function(e,t){return r(e,o[t],t)}),i));return s}(r,i,n);return function(e,t,n,o){var r,i,s={};r=e,i=function(e,r){var i=n[r];i!==t[r]&&(s[r]=i,e(o,i))},Object.keys(r).forEach((function(e){return i(r[e],e)}))}(t,o,r,i),s}var w={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"},b={extraMapTypes:function(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}};(0,r.memo)((function(e){var t=e.children,n=e.options,i=e.id,s=e.mapContainerStyle,a=e.mapContainerClassName,l=e.center,c=e.onClick,u=e.onDblClick,p=e.onDrag,d=e.onDragEnd,h=e.onDragStart,g=e.onMouseMove,m=e.onMouseOut,v=e.onMouseOver,y=e.onMouseDown,w=e.onMouseUp,b=e.onRightClick,E=e.onCenterChanged,S=e.onLoad,C=e.onUnmount,L=(0,r.useState)(null),k=L[0],P=L[1],x=(0,r.useRef)(null),M=(0,r.useState)(null),A=M[0],_=M[1],O=(0,r.useState)(null),R=O[0],T=O[1],I=(0,r.useState)(null),D=I[0],H=I[1],U=(0,r.useState)(null),B=U[0],W=U[1],j=(0,r.useState)(null),K=j[0],N=j[1],z=(0,r.useState)(null),J=z[0],F=z[1],G=(0,r.useState)(null),V=G[0],$=G[1],Z=(0,r.useState)(null),q=Z[0],Y=Z[1],X=(0,r.useState)(null),Q=X[0],ee=X[1],te=(0,r.useState)(null),ne=te[0],oe=te[1],re=(0,r.useState)(null),ie=re[0],se=re[1],ae=(0,r.useState)(null),le=ae[0],ce=ae[1];return(0,r.useEffect)((function(){n&&null!==k&&k.setOptions(n)}),[k,n]),(0,r.useEffect)((function(){null!==k&&void 0!==l&&k.setCenter(l)}),[k,l]),(0,r.useEffect)((function(){k&&u&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(k,"dblclick",u)))}),[u]),(0,r.useEffect)((function(){k&&d&&(null!==D&&google.maps.event.removeListener(D),H(google.maps.event.addListener(k,"dragend",d)))}),[d]),(0,r.useEffect)((function(){k&&h&&(null!==B&&google.maps.event.removeListener(B),W(google.maps.event.addListener(k,"dragstart",h)))}),[h]),(0,r.useEffect)((function(){k&&y&&(null!==K&&google.maps.event.removeListener(K),N(google.maps.event.addListener(k,"mousedown",y)))}),[y]),(0,r.useEffect)((function(){k&&g&&(null!==J&&google.maps.event.removeListener(J),F(google.maps.event.addListener(k,"mousemove",g)))}),[g]),(0,r.useEffect)((function(){k&&m&&(null!==V&&google.maps.event.removeListener(V),$(google.maps.event.addListener(k,"mouseout",m)))}),[m]),(0,r.useEffect)((function(){k&&v&&(null!==q&&google.maps.event.removeListener(q),Y(google.maps.event.addListener(k,"mouseover",v)))}),[v]),(0,r.useEffect)((function(){k&&w&&(null!==Q&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(k,"mouseup",w)))}),[w]),(0,r.useEffect)((function(){k&&b&&(null!==ne&&google.maps.event.removeListener(ne),oe(google.maps.event.addListener(k,"rightclick",b)))}),[b]),(0,r.useEffect)((function(){k&&c&&(null!==ie&&google.maps.event.removeListener(ie),se(google.maps.event.addListener(k,"click",c)))}),[c]),(0,r.useEffect)((function(){k&&p&&(null!==le&&google.maps.event.removeListener(le),ce(google.maps.event.addListener(k,"drag",p)))}),[p]),(0,r.useEffect)((function(){k&&E&&(null!==A&&google.maps.event.removeListener(A),_(google.maps.event.addListener(k,"center_changed",E)))}),[c]),(0,r.useEffect)((function(){var e=null===x.current?null:new google.maps.Map(x.current,n);return P(e),null!==e&&S&&S(e),function(){null!==e&&C&&C(e)}}),[]),(0,o.jsx)("div",{id:i,ref:x,style:s,className:a,children:(0,o.jsx)(f.Provider,{value:k,children:null!==k?t:null})})}));var E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return null===t.mapRef?null:new google.maps.Map(t.mapRef,t.props.options)},t.panTo=function(e){var n=t.getInstance();n&&n.panTo(e)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}return a(t,e),t.prototype.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=y({updaterMap:b,eventMap:w,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.map&&(v(this.registeredEvents),this.registeredEvents=y({updaterMap:b,eventMap:w,prevProps:e,nextProps:this.props,instance:this.state.map}))},t.prototype.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),v(this.registeredEvents))},t.prototype.render=function(){return(0,o.jsx)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:(0,o.jsx)(f.Provider,{value:this.state.map,children:null!==this.state.map?this.props.children:null})})},t}(r.PureComponent),S="undefined"!=typeof document;function C(e){var t=e.url,n=e.id,o=e.nonce;return S?new Promise((function(e,r){var i=document.getElementById(n),s=window;if(i){var a=i.getAttribute("data-state");if(i.src===t&&"error"!==a){if("ready"===a)return e(n);var l=s.initMap,c=i.onerror;return s.initMap=function(){l&&l(),e(n)},void(i.onerror=function(e){c&&c(e),r(e)})}i.remove()}var u=document.createElement("script");u.type="text/javascript",u.src=t,u.id=n,u.async=!0,u.nonce=o||"",u.onerror=function(e){u.setAttribute("data-state","error"),r(e)},s.initMap=function(){u.setAttribute("data-state","ready"),e(n)},document.head.appendChild(u)})).catch((function(e){throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function L(e){var t=e.href;return!((!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))}function k(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(n,o){return L(n)||Reflect.apply(t,e,[n,o]),n};var n=e.appendChild.bind(e);e.appendChild=function(t){return L(t)||Reflect.apply(n,e,[t]),t}}}function P(e){var t=e.googleMapsApiKey,n=e.googleMapsClientId,o=e.version,r=void 0===o?"weekly":o,i=e.language,s=e.region,a=e.libraries,l=e.channel,c=e.mapIds,u=e.authReferrerPolicy,p=[];return h(t&&n||!(t&&n),"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?p.push("key=".concat(t)):n&&p.push("client=".concat(n)),r&&p.push("v=".concat(r)),i&&p.push("language=".concat(i)),s&&p.push("region=".concat(s)),a&&a.length&&p.push("libraries=".concat(a.sort().join(","))),l&&p.push("channel=".concat(l)),c&&c.length&&p.push("map_ids=".concat(c.join(","))),u&&p.push("auth_referrer_policy=".concat(u)),p.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(p.join("&"))}var x=!1;function M(){return(0,o.jsx)("div",{children:"Loading..."})}var A,_={id:"script-loader",version:"weekly"},O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.check=(0,r.createRef)(),t.state={loaded:!1},t.cleanupCallback=function(){delete window.google.maps,t.injectScript()},t.isCleaningUp=function(){return u(t,void 0,void 0,(function(){function e(e){if(x){if(S)var t=window.setInterval((function(){x||(window.clearInterval(t),e())}),1)}else e()}return p(this,(function(t){return[2,new Promise(e)]}))}))},t.cleanup=function(){x=!0;var e=document.getElementById(t.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"==typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},t.injectScript=function(){t.props.preventGoogleFontsLoading&&k(),h(!!t.props.id,'LoadScript requires "id" prop to be a string: %s',t.props.id),C({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 <LoadScript />\n Otherwise it is a Network issue.\n "))}))},t}return a(t,e),t.prototype.componentDidMount=function(){if(S){if(window.google&&window.google.maps&&!x)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"),S&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))},t.prototype.componentWillUnmount=function(){var e=this;S&&(this.cleanup(),window.setTimeout((function(){e.check.current||(delete window.google,x=!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)(M,{})]})},t.defaultProps=_,t}(r.PureComponent);function R(e){var t=e.id,n=void 0===t?_.id:t,o=e.version,i=void 0===o?_.version:o,s=e.nonce,a=e.googleMapsApiKey,l=e.googleMapsClientId,c=e.language,u=e.region,p=e.libraries,d=e.preventGoogleFontsLoading,f=e.channel,g=e.mapIds,m=e.authReferrerPolicy,v=(0,r.useRef)(!1),y=(0,r.useState)(!1),w=y[0],b=y[1],E=(0,r.useState)(void 0),L=E[0],x=E[1];(0,r.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]),(0,r.useEffect)((function(){S&&d&&k()}),[d]),(0,r.useEffect)((function(){w&&h(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[w]);var M=P({version:i,googleMapsApiKey:a,googleMapsClientId:l,language:c,region:u,libraries:p,channel:f,mapIds:g,authReferrerPolicy:m});(0,r.useEffect)((function(){function e(){v.current&&(b(!0),A=M)}S&&(window.google&&window.google.maps&&A===M?e():C({id:n,url:M,nonce:s}).then(e).catch((function(e){v.current&&x(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,M,s]);var O=(0,r.useRef)();return(0,r.useEffect)((function(){O.current&&p!==O.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"),O.current=p}),[p]),{isLoaded:w,loadError:L,url:M}}var T=(0,o.jsx)(M,{}),I=(0,r.memo)((function(e){var t=e.loadingElement,n=e.onLoad,o=e.onError,i=e.onUnmount,s=e.children,a=R(c(e,["loadingElement","onLoad","onError","onUnmount","children"])),l=a.isLoaded,u=a.loadError;return(0,r.useEffect)((function(){l&&"function"==typeof n&&n()}),[l,n]),(0,r.useEffect)((function(){u&&"function"==typeof o&&o(u)}),[u,o]),(0,r.useEffect)((function(){return function(){i&&i()}}),[i]),l?s:t||T}));var D=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,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))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(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n};const H="__googleMapsScriptId";var U;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(U||(U={}));class B{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:o,id:r=H,language:i,libraries:s=[],mapIds:a,nonce:l,region:c,retries:u=3,url:p="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=r||H,this.language=i,this.libraries=s,this.mapIds=a,this.nonce=l,this.region=c,this.retries=u,this.url=p,this.version=d,B.instance){if(!D(this.options,B.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(B.instance.options)}`);return B.instance}B.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?U.FAILURE:this.done?U.SUCCESS:this.loading?U.LOADING:U.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+=`&region=${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,r="The Google Maps JavaScript API",i="google",s="importLibrary",a="__ib__",l=document,c=window;c=c[i]||(c[i]={});const u=c.maps||(c.maps={}),p=new Set,d=new URLSearchParams,h=()=>t||(t=new Promise(((s,c)=>{return h=this,f=void 0,m=function*(){var h;for(o in yield n=l.createElement("script"),n.id=this.id,d.set("libraries",[...p]+""),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,u[a]=s,n.onerror=()=>t=c(Error(r+" could not load.")),n.nonce=this.nonce||(null===(h=l.querySelector("script[nonce]"))||void 0===h?void 0:h.nonce)||"",l.head.append(n)},new((g=void 0)||(g=Promise))((function(e,t){function n(e){try{r(m.next(e))}catch(e){t(e)}}function o(e){try{r(m.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof g?r:new g((function(e){e(r)}))).then(n,o)}r((m=m.apply(h,f||[])).next())}));var h,f,g,m})));u[s]?console.warn(r+" only loads once. Ignoring:",e):u[s]=(e,...t)=>p.add(e)&&h().then((()=>u[s](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 j(e){var t=e.id,n=void 0===t?_.id:t,o=e.version,i=void 0===o?_.version:o,s=e.nonce,a=e.googleMapsApiKey,l=e.language,c=e.region,u=e.libraries,p=void 0===u?W:u,d=e.preventGoogleFontsLoading,h=e.mapIds,f=e.authReferrerPolicy,g=(0,r.useRef)(!1),m=(0,r.useState)(!1),v=m[0],y=m[1],w=(0,r.useState)(void 0),b=w[0],E=w[1];(0,r.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]);var C=(0,r.useMemo)((function(){return new B({id:n,apiKey:a,version:i,libraries:p,language:l||"en",region:c||"US",mapIds:h||[],nonce:s||"",authReferrerPolicy:f||"origin"})}),[n,a,i,p,l,c,h,s,f]);(0,r.useEffect)((function(){v||C.load().then((function(){g.current&&y(!0)})).catch((function(e){E(e)}))}),[]),(0,r.useEffect)((function(){S&&d&&k()}),[d]);var L=(0,r.useRef)();return(0,r.useEffect)((function(){L.current&&p!==L.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"),L.current=p}),[p]),{isLoaded:v,loadError:b}}var K={},N={options:function(e,t){e.setOptions(t)}},z=(0,r.memo)((function(e){var t=e.options,n=e.onLoad,o=e.onUnmount,i=(0,r.useContext)(f),s=(0,r.useState)(null),a=s[0],c=s[1];return(0,r.useEffect)((function(){null!==a&&a.setMap(i)}),[i]),(0,r.useEffect)((function(){t&&null!==a&&a.setOptions(t)}),[a,t]),(0,r.useEffect)((function(){var e=new google.maps.TrafficLayer(l(l({},t||{}),{map:i}));return c(e),n&&n(e),function(){null!==a&&(o&&o(a),a.setMap(null))}}),[]),null})),J=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=y({updaterMap:N,eventMap:K,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(v(this.registeredEvents),this.registeredEvents=y({updaterMap:N,eventMap:K,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),v(this.registeredEvents),this.state.trafficLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=f,t}(r.PureComponent),F=(0,r.memo)((function(e){var t=e.onLoad,n=e.onUnmount,o=(0,r.useContext)(f),i=(0,r.useState)(null),s=i[0],a=i[1];return(0,r.useEffect)((function(){null!==s&&s.setMap(o)}),[o]),(0,r.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})),G=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=f,t}(r.PureComponent),V=(0,r.memo)((function(e){var t=e.onLoad,n=e.onUnmount,o=(0,r.useContext)(f),i=(0,r.useState)(null),s=i[0],a=i[1];return(0,r.useEffect)((function(){null!==s&&s.setMap(o)}),[o]),(0,r.useEffect)((function(){var e=new google.maps.TransitLayer;return a(e),e.setMap(o),t&&t(e),function(){null!==s&&(n&&n(s),s.setMap(null))}}),[]),null})),$=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=f,t}(r.PureComponent),Z={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)}},Y=(0,r.memo)((function(e){var t=e.options,n=e.drawingMode,o=e.onCircleComplete,i=e.onMarkerComplete,s=e.onOverlayComplete,a=e.onPolygonComplete,c=e.onPolylineComplete,u=e.onRectangleComplete,p=e.onLoad,d=e.onUnmount,g=(0,r.useContext)(f),m=(0,r.useState)(null),v=m[0],y=m[1],w=(0,r.useState)(null),b=w[0],E=w[1],S=(0,r.useState)(null),C=S[0],L=S[1],k=(0,r.useState)(null),P=k[0],x=k[1],M=(0,r.useState)(null),A=M[0],_=M[1],O=(0,r.useState)(null),R=O[0],T=O[1],I=(0,r.useState)(null),D=I[0],H=I[1];return(0,r.useEffect)((function(){null!==v&&v.setMap(g)}),[g]),(0,r.useEffect)((function(){t&&null!==v&&v.setOptions(t)}),[v,t]),(0,r.useEffect)((function(){null!==v&&v.setDrawingMode(null!=n?n:null)}),[v,n]),(0,r.useEffect)((function(){v&&o&&(null!==b&&google.maps.event.removeListener(b),E(google.maps.event.addListener(v,"circlecomplete",o)))}),[v,o]),(0,r.useEffect)((function(){v&&i&&(null!==C&&google.maps.event.removeListener(C),L(google.maps.event.addListener(v,"markercomplete",i)))}),[v,i]),(0,r.useEffect)((function(){v&&s&&(null!==P&&google.maps.event.removeListener(P),x(google.maps.event.addListener(v,"overlaycomplete",s)))}),[v,s]),(0,r.useEffect)((function(){v&&a&&(null!==A&&google.maps.event.removeListener(A),_(google.maps.event.addListener(v,"polygoncomplete",a)))}),[v,a]),(0,r.useEffect)((function(){v&&c&&(null!==R&&google.maps.event.removeListener(R),T(google.maps.event.addListener(v,"polylinecomplete",c)))}),[v,c]),(0,r.useEffect)((function(){v&&u&&(null!==D&&google.maps.event.removeListener(D),H(google.maps.event.addListener(v,"rectanglecomplete",u)))}),[v,u]),(0,r.useEffect)((function(){h(!!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:g}));return n&&e.setDrawingMode(n),o&&E(google.maps.event.addListener(e,"circlecomplete",o)),i&&L(google.maps.event.addListener(e,"markercomplete",i)),s&&x(google.maps.event.addListener(e,"overlaycomplete",s)),a&&_(google.maps.event.addListener(e,"polygoncomplete",a)),c&&T(google.maps.event.addListener(e,"polylinecomplete",c)),u&&H(google.maps.event.addListener(e,"rectanglecomplete",u)),y(e),p&&p(e),function(){null!==v&&(b&&google.maps.event.removeListener(b),C&&google.maps.event.removeListener(C),P&&google.maps.event.removeListener(P),A&&google.maps.event.removeListener(A),R&&google.maps.event.removeListener(R),D&&google.maps.event.removeListener(D),d&&d(v),v.setMap(null))}}),[]),null})),X=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)},h(!!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=y({updaterMap:q,eventMap:Z,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)},t.prototype.componentDidUpdate=function(e){null!==this.state.drawingManager&&(v(this.registeredEvents),this.registeredEvents=y({updaterMap:q,eventMap:Z,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),v(this.registeredEvents),this.state.drawingManager.setMap(null))},t.prototype.render=function(){return null},t.contextType=f,t}(r.PureComponent),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"},ee={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)}},te={},ne=(0,r.memo)((function(e){var t=e.position,n=e.options,i=e.clusterer,s=e.noClustererRedraw,a=e.children,c=e.draggable,u=e.visible,p=e.animation,d=e.clickable,h=e.cursor,g=e.icon,m=e.label,v=e.opacity,y=e.shape,w=e.title,b=e.zIndex,E=e.onClick,S=e.onDblClick,C=e.onDrag,L=e.onDragEnd,k=e.onDragStart,P=e.onMouseOut,x=e.onMouseOver,M=e.onMouseUp,A=e.onMouseDown,_=e.onRightClick,O=e.onClickableChanged,R=e.onCursorChanged,T=e.onAnimationChanged,I=e.onDraggableChanged,D=e.onFlatChanged,H=e.onIconChanged,U=e.onPositionChanged,B=e.onShapeChanged,W=e.onTitleChanged,j=e.onVisibleChanged,K=e.onZindexChanged,N=e.onLoad,z=e.onUnmount,J=(0,r.useContext)(f),F=(0,r.useState)(null),G=F[0],V=F[1],$=(0,r.useState)(null),Z=$[0],q=$[1],Y=(0,r.useState)(null),X=Y[0],Q=Y[1],ee=(0,r.useState)(null),ne=ee[0],oe=ee[1],re=(0,r.useState)(null),ie=re[0],se=re[1],ae=(0,r.useState)(null),le=ae[0],ce=ae[1],ue=(0,r.useState)(null),pe=ue[0],de=ue[1],he=(0,r.useState)(null),fe=he[0],ge=he[1],me=(0,r.useState)(null),ve=me[0],ye=me[1],we=(0,r.useState)(null),be=we[0],Ee=we[1],Se=(0,r.useState)(null),Ce=Se[0],Le=Se[1],ke=(0,r.useState)(null),Pe=ke[0],xe=ke[1],Me=(0,r.useState)(null),Ae=Me[0],_e=Me[1],Oe=(0,r.useState)(null),Re=Oe[0],Te=Oe[1],Ie=(0,r.useState)(null),De=Ie[0],He=Ie[1],Ue=(0,r.useState)(null),Be=Ue[0],We=Ue[1],je=(0,r.useState)(null),Ke=je[0],Ne=je[1],ze=(0,r.useState)(null),Je=ze[0],Fe=ze[1],Ge=(0,r.useState)(null),Ve=Ge[0],$e=Ge[1],Ze=(0,r.useState)(null),qe=Ze[0],Ye=Ze[1],Xe=(0,r.useState)(null),Qe=Xe[0],et=Xe[1],tt=(0,r.useState)(null),nt=tt[0],ot=tt[1];(0,r.useEffect)((function(){null!==G&&G.setMap(J)}),[J]),(0,r.useEffect)((function(){void 0!==n&&null!==G&&G.setOptions(n)}),[G,n]),(0,r.useEffect)((function(){void 0!==c&&null!==G&&G.setDraggable(c)}),[G,c]),(0,r.useEffect)((function(){t&&null!==G&&G.setPosition(t)}),[G,t]),(0,r.useEffect)((function(){void 0!==u&&null!==G&&G.setVisible(u)}),[G,u]),(0,r.useEffect)((function(){null==G||G.setAnimation(p)}),[G,p]),(0,r.useEffect)((function(){G&&void 0!==d&&G.setClickable(d)}),[G,d]),(0,r.useEffect)((function(){G&&void 0!==h&&G.setCursor(h)}),[G,h]),(0,r.useEffect)((function(){G&&void 0!==g&&G.setIcon(g)}),[G,g]),(0,r.useEffect)((function(){G&&void 0!==m&&G.setLabel(m)}),[G,m]),(0,r.useEffect)((function(){G&&void 0!==v&&G.setOpacity(v)}),[G,v]),(0,r.useEffect)((function(){G&&void 0!==y&&G.setShape(y)}),[G,y]),(0,r.useEffect)((function(){G&&void 0!==w&&G.setTitle(w)}),[G,w]),(0,r.useEffect)((function(){G&&void 0!==b&&G.setZIndex(b)}),[G,b]),(0,r.useEffect)((function(){G&&S&&(null!==Z&&google.maps.event.removeListener(Z),q(google.maps.event.addListener(G,"dblclick",S)))}),[S]),(0,r.useEffect)((function(){G&&L&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(G,"dragend",L)))}),[L]),(0,r.useEffect)((function(){G&&k&&(null!==ne&&google.maps.event.removeListener(ne),oe(google.maps.event.addListener(G,"dragstart",k)))}),[k]),(0,r.useEffect)((function(){G&&A&&(null!==ie&&google.maps.event.removeListener(ie),se(google.maps.event.addListener(G,"mousedown",A)))}),[A]),(0,r.useEffect)((function(){G&&P&&(null!==le&&google.maps.event.removeListener(le),ce(google.maps.event.addListener(G,"mouseout",P)))}),[P]),(0,r.useEffect)((function(){G&&x&&(null!==pe&&google.maps.event.removeListener(pe),de(google.maps.event.addListener(G,"mouseover",x)))}),[x]),(0,r.useEffect)((function(){G&&M&&(null!==fe&&google.maps.event.removeListener(fe),ge(google.maps.event.addListener(G,"mouseup",M)))}),[M]),(0,r.useEffect)((function(){G&&_&&(null!==ve&&google.maps.event.removeListener(ve),ye(google.maps.event.addListener(G,"rightclick",_)))}),[_]),(0,r.useEffect)((function(){G&&E&&(null!==be&&google.maps.event.removeListener(be),Ee(google.maps.event.addListener(G,"click",E)))}),[E]),(0,r.useEffect)((function(){G&&C&&(null!==Ce&&google.maps.event.removeListener(Ce),Le(google.maps.event.addListener(G,"drag",C)))}),[C]),(0,r.useEffect)((function(){G&&O&&(null!==Pe&&google.maps.event.removeListener(Pe),xe(google.maps.event.addListener(G,"clickable_changed",O)))}),[O]),(0,r.useEffect)((function(){G&&R&&(null!==Ae&&google.maps.event.removeListener(Ae),_e(google.maps.event.addListener(G,"cursor_changed",R)))}),[R]),(0,r.useEffect)((function(){G&&T&&(null!==Re&&google.maps.event.removeListener(Re),Te(google.maps.event.addListener(G,"animation_changed",T)))}),[T]),(0,r.useEffect)((function(){G&&I&&(null!==De&&google.maps.event.removeListener(De),He(google.maps.event.addListener(G,"draggable_changed",I)))}),[I]),(0,r.useEffect)((function(){G&&D&&(null!==Be&&google.maps.event.removeListener(Be),We(google.maps.event.addListener(G,"flat_changed",D)))}),[D]),(0,r.useEffect)((function(){G&&H&&(null!==Ke&&google.maps.event.removeListener(Ke),Ne(google.maps.event.addListener(G,"icon_changed",H)))}),[H]),(0,r.useEffect)((function(){G&&U&&(null!==Je&&google.maps.event.removeListener(Je),Fe(google.maps.event.addListener(G,"position_changed",U)))}),[U]),(0,r.useEffect)((function(){G&&B&&(null!==Ve&&google.maps.event.removeListener(Ve),$e(google.maps.event.addListener(G,"shape_changed",B)))}),[B]),(0,r.useEffect)((function(){G&&W&&(null!==qe&&google.maps.event.removeListener(qe),Ye(google.maps.event.addListener(G,"title_changed",W)))}),[W]),(0,r.useEffect)((function(){G&&j&&(null!==Qe&&google.maps.event.removeListener(Qe),et(google.maps.event.addListener(G,"visible_changed",j)))}),[j]),(0,r.useEffect)((function(){G&&K&&(null!==nt&&google.maps.event.removeListener(nt),ot(google.maps.event.addListener(G,"zindex_changed",K)))}),[K]),(0,r.useEffect)((function(){var e=l(l(l({},n||te),i?te:{map:J}),{position:t}),o=new google.maps.Marker(e);return i?i.addMarker(o,!!s):o.setMap(J),t&&o.setPosition(t),void 0!==u&&o.setVisible(u),void 0!==c&&o.setDraggable(c),void 0!==d&&o.setClickable(d),"string"==typeof h&&o.setCursor(h),g&&o.setIcon(g),void 0!==m&&o.setLabel(m),void 0!==v&&o.setOpacity(v),y&&o.setShape(y),"string"==typeof w&&o.setTitle(w),"number"==typeof b&&o.setZIndex(b),S&&q(google.maps.event.addListener(o,"dblclick",S)),L&&Q(google.maps.event.addListener(o,"dragend",L)),k&&oe(google.maps.event.addListener(o,"dragstart",k)),A&&se(google.maps.event.addListener(o,"mousedown",A)),P&&ce(google.maps.event.addListener(o,"mouseout",P)),x&&de(google.maps.event.addListener(o,"mouseover",x)),M&&ge(google.maps.event.addListener(o,"mouseup",M)),_&&ye(google.maps.event.addListener(o,"rightclick",_)),E&&Ee(google.maps.event.addListener(o,"click",E)),C&&Le(google.maps.event.addListener(o,"drag",C)),O&&xe(google.maps.event.addListener(o,"clickable_changed",O)),R&&_e(google.maps.event.addListener(o,"cursor_changed",R)),T&&Te(google.maps.event.addListener(o,"animation_changed",T)),I&&He(google.maps.event.addListener(o,"draggable_changed",I)),D&&We(google.maps.event.addListener(o,"flat_changed",D)),H&&Ne(google.maps.event.addListener(o,"icon_changed",H)),U&&Fe(google.maps.event.addListener(o,"position_changed",U)),B&&$e(google.maps.event.addListener(o,"shape_changed",B)),W&&Ye(google.maps.event.addListener(o,"title_changed",W)),j&&et(google.maps.event.addListener(o,"visible_changed",j)),K&&ot(google.maps.event.addListener(o,"zindex_changed",K)),V(o),N&&N(o),function(){null!==Z&&google.maps.event.removeListener(Z),null!==X&&google.maps.event.removeListener(X),null!==ne&&google.maps.event.removeListener(ne),null!==ie&&google.maps.event.removeListener(ie),null!==le&&google.maps.event.removeListener(le),null!==pe&&google.maps.event.removeListener(pe),null!==fe&&google.maps.event.removeListener(fe),null!==ve&&google.maps.event.removeListener(ve),null!==be&&google.maps.event.removeListener(be),null!==Pe&&google.maps.event.removeListener(Pe),null!==Ae&&google.maps.event.removeListener(Ae),null!==Re&&google.maps.event.removeListener(Re),null!==De&&google.maps.event.removeListener(De),null!==Be&&google.maps.event.removeListener(Be),null!==Ke&&google.maps.event.removeListener(Ke),null!==Je&&google.maps.event.removeListener(Je),null!==qe&&google.maps.event.removeListener(qe),null!==Qe&&google.maps.event.removeListener(Qe),null!==nt&&google.maps.event.removeListener(nt),z&&z(o),i?i.removeMarker(o,!!s):o&&o.setMap(null)}}),[]);var rt=(0,r.useMemo)((function(){return a?r.Children.map(a,(function(e){if(!(0,r.isValidElement)(e))return e;var t=e;return(0,r.cloneElement)(t,{anchor:G})})):null}),[a,G]);return(0,o.jsx)(o.Fragment,{children:rt})||null})),oe=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||te),this.props.clusterer?te:{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=y({updaterMap:ee,eventMap:Q,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},t.prototype.componentDidUpdate=function(e){this.marker&&(v(this.registeredEvents),this.registeredEvents=y({updaterMap:ee,eventMap:Q,prevProps:e,nextProps:this.props,instance:this.marker}))},t.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),v(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=r.Children.map(this.props.children,(function(t){if(!(0,r.isValidElement)(t))return t;var n=t;return(0,r.cloneElement)(n,{anchor:e.marker})}))),t||null},t.contextType=f,t}(r.PureComponent),re=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(),r=t.getMap();null!==r&&"fitBounds"in r&&r.fitBounds(o),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(o);var r=e.getZoom()||0;null!==n&&r>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,r,i;if(this.div&&this.center){var s=null===this.sums||void 0===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),c=parseInt((null===(t=a[1])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),u=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==u?"".concat(u.y,"px"):"0","; left: ").concat(null!==u?"".concat(u.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(c,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(c,"px, -").concat(l+this.width,"px, -").concat(c+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===(r=this.sums)||void 0===r?void 0:r.html)&&(d.innerHTML="".concat(null===(i=this.sums)||void 0===i?void 0:i.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(d),this.div.title=s,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}(),ie=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 re(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCen