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A/BF,EAAQz4C,MAAM04C,cAAyBD,EAAQt9C,MAAMoF,QACvDk4C,EAAQt9C,MAAMoF,OAAOk4C,EAAQz4C,MAAM04C,eAIhCD,EAyDT,OAtDA,OAAaH,EAAc,CAAC,CAC1Bx9C,IAAK,oBACL7D,MAAO,WACLmC,IAAcsC,OAAOC,KAAK47C,OAAQ,iFAAkF77C,OAAOC,KAAK47C,QAIhI,IAAIjX,EAAQznC,KAAKmuB,iBAAiB/e,QAAQuvC,cAAc,SAExD,GAAIlX,EAAO,CACT,IAAIoY,EAAe,IAAIh9C,OAAOC,KAAK47C,OAAOe,aAAahY,EAAOznC,KAAKsC,MAAM6D,SACzEnG,KAAK0D,iBAAmBF,EAAsC,CAC5D7B,WAAYA,GACZY,SAAUA,GACVX,UAAW,GACXC,UAAW7B,KAAKsC,MAChBR,SAAU+9C,IAEZ7/C,KAAK6H,UAAS,WACZ,MAAO,CACLg4C,aAAcA,KAEf7/C,KAAK8/C,4BAGX,CACD79C,IAAK,qBACL7D,MAAO,SAA4BwD,GACjC0B,EAAiBtD,KAAK0D,kBACtB1D,KAAK0D,iBAAmBF,EAAsC,CAC5D7B,WAAYA,GACZY,SAAUA,GACVX,UAAWA,EACXC,UAAW7B,KAAKsC,MAChBR,SAAU9B,KAAKmH,MAAM04C,iBAGxB,CACD59C,IAAK,uBACL7D,MAAO,WAC2B,OAA5B4B,KAAKmH,MAAM04C,cACbv8C,EAAiBtD,KAAK0D,oBAGzB,CACDzB,IAAK,SACL7D,MAAO,WACL,OAAO,gBAAoB,MAAO,CAChCwJ,IAAK5H,KAAKmuB,iBACVjmB,UAAWlI,KAAKsC,MAAM4F,WAAa,IAClC,gBAAoBlI,KAAKsC,MAAM+F,eAI/Bo3C,EAhFuB,CAiF9B,iBAEFA,GAAa3qC,YAAczT","sources":["webpack://local-demo/../../node_modules/@react-google-maps/api/dist/esm.js"],"sourcesContent":["import _toConsumableArray from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nimport _assertThisInitialized from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _classCallCheck from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"/opt/buildhome/repo/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport _regeneratorRuntime from \"/opt/buildhome/repo/node_modules/@babel/runtime/regenerator\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport \"core-js/modules/esnext.global-this.js\";\nimport * as React from 'react';\nimport { createContext, useContext, PureComponent, useState, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = process.env.NODE_ENV;\n\nvar invariant = function invariant(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n\n throw error;\n }\n};\n\nvar invariant_1 = invariant;\nvar MapContext = createContext(null);\n\nfunction useGoogleMap() {\n invariant_1(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+');\n var map = useContext(MapContext);\n invariant_1(!!map, 'useGoogleMap needs a GoogleMap available up in the tree');\n return map;\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nvar reduce = function reduce(obj, fn, acc) {\n return Object.keys(obj).reduce(function reducer(newAcc, key) {\n return fn(newAcc, obj[key], key);\n }, acc);\n}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction forEach(obj, fn) {\n Object.keys(obj).forEach(function iterator(key) {\n return fn(obj[key], key);\n });\n}\n/* global google */\n\n\nvar applyUpdaterToNextProps = function applyUpdaterToNextProps( // eslint-disable-next-line @typescript-eslint/no-explicit-any\nupdaterMap, // eslint-disable-next-line @typescript-eslint/no-explicit-any\nprevProps, // eslint-disable-next-line @typescript-eslint/no-explicit-any\nnextProps, // eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var map = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var iter = function iter(fn, key) {\n var nextValue = nextProps[key];\n\n if (nextValue !== prevProps[key]) {\n map[key] = nextValue;\n fn(instance, nextValue);\n }\n };\n\n forEach(updaterMap, iter);\n return map;\n};\n\nfunction registerEvents( // eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, // eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance, eventMap) {\n var registeredList = reduce(eventMap, function reducer(acc, googleEventName, // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onEventName) {\n if (typeof props[onEventName] === 'function') {\n acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName]));\n }\n\n return acc;\n }, []);\n return registeredList;\n}\n\nfunction unregisterEvent(registered) {\n google.maps.event.removeListener(registered);\n}\n\nfunction unregisterEvents() {\n var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n events.forEach(unregisterEvent);\n}\n\nfunction applyUpdatersToPropsAndRegisterEvents(_ref) {\n var updaterMap = _ref.updaterMap,\n eventMap = _ref.eventMap,\n prevProps = _ref.prevProps,\n nextProps = _ref.nextProps,\n instance = _ref.instance;\n var registeredEvents = registerEvents(nextProps, instance, eventMap);\n applyUpdaterToNextProps(updaterMap, prevProps, nextProps, instance);\n return registeredEvents;\n}\n\nvar eventMap$i = {\n onDblClick: 'dblclick',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onTilesLoaded: 'tilesloaded',\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDrag: 'drag',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onProjectionChanged: 'projection_changed',\n onResize: 'resize',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed'\n};\nvar updaterMap$i = {\n extraMapTypes: function extraMapTypes(map, extra) {\n extra.forEach(function forEachExtra(it, i) {\n map.mapTypes.set(String(i), it);\n });\n },\n center: function center(map, _center) {\n map.setCenter(_center);\n },\n clickableIcons: function clickableIcons(map, clickable) {\n map.setClickableIcons(clickable);\n },\n heading: function heading(map, _heading) {\n map.setHeading(_heading);\n },\n mapTypeId: function mapTypeId(map, _mapTypeId) {\n map.setMapTypeId(_mapTypeId);\n },\n options: function options(map, _options) {\n map.setOptions(_options);\n },\n streetView: function streetView(map, _streetView) {\n map.setStreetView(_streetView);\n },\n tilt: function tilt(map, _tilt) {\n map.setTilt(_tilt);\n },\n zoom: function zoom(map, _zoom) {\n map.setZoom(_zoom);\n }\n}; // function GoogleMapFunctional({ children, options, id, mapContainerStyle, center, clickableIcons, extraMapTypes, heading, mapContainerClassName, mapTypeId, onBoundsChanged, onCenterChanged, onClick, onDblClick, onDrag, onDragEnd, onDragStart, onHeadingChanged, onIdle, onProjectionChanged, onResize, onTiltChanged, onLoad }: GoogleMapProps): JSX.Element {\n// const [map, setMap] = React.useState(null)\n// const ref = React.useRef(null)\n// const getInstance = React.useCallback(() => {\n// if (ref.current === null) {\n// return null\n// }\n// return new google.maps.Map(ref.current, options)\n// }, [options])\n// React.useEffect(() => {\n// }, [])\n// const panTo = React.useCallback((latLng: google.maps.LatLng | google.maps.LatLngLiteral): void => {\n// const map = getInstance()\n// if (map) {\n// map.panTo(latLng)\n// }\n// }, [])\n// React.useEffect(() => {\n// const map = getInstance()\n// }, [])\n// return (\n// \n// \n// {map !== null ? children : <>}\n// \n// \n// )\n// }\n\nvar GoogleMap = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(GoogleMap, _React$PureComponent);\n\n var _super = _createSuper(GoogleMap);\n\n function GoogleMap() {\n var _this2;\n\n _classCallCheck(this, GoogleMap);\n\n _this2 = _super.apply(this, arguments);\n _this2.state = {\n map: null\n };\n _this2.registeredEvents = [];\n _this2.mapRef = null;\n\n _this2.getInstance = function () {\n if (_this2.mapRef === null) {\n return null;\n }\n\n return new google.maps.Map(_this2.mapRef, _this2.props.options);\n };\n\n _this2.panTo = function (latLng) {\n var map = _this2.getInstance();\n\n if (map) {\n map.panTo(latLng);\n }\n };\n\n _this2.setMapCallback = function () {\n if (_this2.state.map !== null) {\n if (_this2.props.onLoad) {\n _this2.props.onLoad(_this2.state.map);\n }\n }\n };\n\n _this2.getRef = function (ref) {\n _this2.mapRef = ref;\n };\n\n return _this2;\n }\n\n _createClass(GoogleMap, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var map = this.getInstance();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: {},\n nextProps: this.props,\n instance: map\n });\n this.setState(function setMap() {\n return {\n map: map\n };\n }, this.setMapCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.map !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.map\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.map !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.map);\n }\n\n unregisterEvents(this.registeredEvents);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(\"div\", {\n id: this.props.id,\n ref: this.getRef,\n style: this.props.mapContainerStyle,\n className: this.props.mapContainerClassName\n }, React.createElement(MapContext.Provider, {\n value: this.state.map\n }, this.state.map !== null ? this.props.children : React.createElement(React.Fragment, null)));\n }\n }]);\n\n return GoogleMap;\n}(React.PureComponent);\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n\nfunction __rest$1(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nvar isBrowser = typeof document !== 'undefined';\n\nvar injectScript = function injectScript(_ref2) {\n var url = _ref2.url,\n id = _ref2.id,\n nonce = _ref2.nonce;\n\n if (!isBrowser) {\n return Promise.reject(new Error('document is undefined'));\n }\n\n return new Promise(function injectScriptCallback(resolve, reject) {\n var existingScript = document.getElementById(id);\n var windowWithGoogleMap = window;\n\n if (existingScript) {\n // Same script id/url: keep same script\n var dataStateAttribute = existingScript.getAttribute('data-state');\n\n if (existingScript.src === url && dataStateAttribute !== 'error') {\n if (dataStateAttribute === 'ready') {\n return resolve(id);\n } else {\n var originalInitMap = windowWithGoogleMap.initMap;\n var originalErrorCallback = existingScript.onerror;\n\n windowWithGoogleMap.initMap = function initMap() {\n if (originalInitMap) {\n originalInitMap();\n }\n\n resolve(id);\n };\n\n existingScript.onerror = function (err) {\n if (originalErrorCallback) {\n originalErrorCallback(err);\n }\n\n reject(err);\n };\n\n return;\n }\n } // Same script id, but either\n // 1. requested URL is different\n // 2. script failed to load\n else {\n existingScript.remove();\n }\n }\n\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n script.id = id;\n script.async = true;\n script.nonce = nonce;\n\n script.onerror = function onerror(err) {\n script.setAttribute('data-state', 'error');\n reject(err);\n };\n\n windowWithGoogleMap.initMap = function onload() {\n script.setAttribute('data-state', 'ready');\n resolve(id);\n };\n\n document.head.appendChild(script);\n }).catch(function (err) {\n console.error('injectScript error: ', err);\n throw err;\n });\n};\n\nvar isRobotoStyle = function isRobotoStyle(element) {\n // roboto font download\n if (element.href && element.href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === 0) {\n return true;\n } // roboto style elements\n\n\n if (element.tagName.toLowerCase() === 'style' && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText = '';\n return true;\n } // roboto style elements for other browsers\n\n\n if (element.tagName.toLowerCase() === 'style' && element.innerHTML && element.innerHTML.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n element.innerHTML = '';\n return true;\n } // when google tries to add empty style\n\n\n if (element.tagName.toLowerCase() === 'style' && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n !element.styleSheet && !element.innerHTML) {\n return true;\n }\n\n return false;\n}; // Preventing the Google Maps library from downloading an extra font\n\n\nvar preventGoogleFonts = function preventGoogleFonts() {\n // we override these methods only for one particular head element\n // default methods for other elements are not affected\n var head = document.getElementsByTagName('head')[0];\n var trueInsertBefore = head.insertBefore.bind(head); // TODO: adding return before reflect solves the TS issue\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n head.insertBefore = function insertBefore(newElement, referenceElement) {\n if (!isRobotoStyle(newElement)) {\n Reflect.apply(trueInsertBefore, head, [newElement, referenceElement]);\n }\n };\n\n var trueAppend = head.appendChild.bind(head); // TODO: adding return before reflect solves the TS issue\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n head.appendChild = function appendChild(textNode) {\n if (!isRobotoStyle(textNode)) {\n Reflect.apply(trueAppend, head, [textNode]);\n }\n };\n};\n\nfunction makeLoadScriptUrl(_ref3) {\n var googleMapsApiKey = _ref3.googleMapsApiKey,\n googleMapsClientId = _ref3.googleMapsClientId,\n _ref3$version = _ref3.version,\n version = _ref3$version === void 0 ? 'weekly' : _ref3$version,\n language = _ref3.language,\n region = _ref3.region,\n libraries = _ref3.libraries,\n channel = _ref3.channel,\n mapIds = _ref3.mapIds;\n var params = [];\n invariant_1(googleMapsApiKey && googleMapsClientId || !(googleMapsApiKey && googleMapsClientId), '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.');\n\n if (googleMapsApiKey) {\n params.push(\"key=\".concat(googleMapsApiKey));\n } else if (googleMapsClientId) {\n params.push(\"client=\".concat(googleMapsClientId));\n }\n\n if (version) {\n params.push(\"v=\".concat(version));\n }\n\n if (language) {\n params.push(\"language=\".concat(language));\n }\n\n if (region) {\n params.push(\"region=\".concat(region));\n }\n\n if (libraries && libraries.length) {\n params.push(\"libraries=\".concat(libraries.sort().join(',')));\n }\n\n if (channel) {\n params.push(\"channel=\".concat(channel));\n }\n\n if (mapIds && mapIds.length) {\n params.push(\"map_ids=\".concat(mapIds.join(',')));\n }\n\n params.push('callback=initMap');\n return \"https://maps.googleapis.com/maps/api/js?\".concat(params.join('&'));\n}\n\nvar cleaningUp = false;\n\nfunction DefaultLoadingElement() {\n return React.createElement(\"div\", null, \"Loading...\");\n}\n\nvar defaultLoadScriptProps = {\n id: 'script-loader',\n version: 'weekly'\n};\n\nvar LoadScript = /*#__PURE__*/function (_React$PureComponent2) {\n _inherits(LoadScript, _React$PureComponent2);\n\n var _super2 = _createSuper(LoadScript);\n\n function LoadScript() {\n var _this3;\n\n _classCallCheck(this, LoadScript);\n\n _this3 = _super2.apply(this, arguments);\n _this3.check = React.createRef();\n _this3.state = {\n loaded: false\n };\n\n _this3.cleanupCallback = function () {\n // @ts-ignore\n delete window.google.maps;\n\n _this3.injectScript();\n };\n\n _this3.isCleaningUp = function () {\n return __awaiter(_assertThisInitialized(_this3), void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var promiseCallback;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n promiseCallback = function _promiseCallback(resolve) {\n if (!cleaningUp) {\n resolve();\n } else {\n if (isBrowser) {\n var timer = window.setInterval(function interval() {\n if (!cleaningUp) {\n window.clearInterval(timer);\n resolve();\n }\n }, 1);\n }\n }\n\n return;\n };\n\n return _context.abrupt(\"return\", new Promise(promiseCallback));\n\n case 2:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n };\n\n _this3.cleanup = function () {\n cleaningUp = true;\n var script = document.getElementById(_this3.props.id);\n\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n\n Array.prototype.slice.call(document.getElementsByTagName('script')).filter(function filter(script) {\n return typeof script.src === 'string' && script.src.includes('maps.googleapis');\n }).forEach(function forEach(script) {\n if (script.parentNode) {\n script.parentNode.removeChild(script);\n }\n });\n Array.prototype.slice.call(document.getElementsByTagName('link')).filter(function filter(link) {\n return link.href === 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans';\n }).forEach(function forEach(link) {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n });\n Array.prototype.slice.call(document.getElementsByTagName('style')).filter(function filter(style) {\n return style.innerText !== undefined && style.innerText.length > 0 && style.innerText.includes('.gm-');\n }).forEach(function forEach(style) {\n if (style.parentNode) {\n style.parentNode.removeChild(style);\n }\n });\n };\n\n _this3.injectScript = function () {\n if (_this3.props.preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n\n invariant_1(!!_this3.props.id, 'LoadScript requires \"id\" prop to be a string: %s', _this3.props.id);\n var injectScriptOptions = {\n id: _this3.props.id,\n nonce: _this3.props.nonce,\n url: makeLoadScriptUrl(_this3.props)\n };\n injectScript(injectScriptOptions).then(function () {\n if (_this3.props.onLoad) {\n _this3.props.onLoad();\n }\n\n _this3.setState(function setLoaded() {\n return {\n loaded: true\n };\n });\n\n return;\n }).catch(function (err) {\n if (_this3.props.onError) {\n _this3.props.onError(err);\n }\n\n console.error(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(_this3.props.googleMapsApiKey || '-', \") or Client ID (\").concat(_this3.props.googleMapsClientId || '-', \") to \\n Otherwise it is a Network issue.\\n \"));\n });\n };\n\n return _this3;\n }\n\n _createClass(LoadScript, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (isBrowser) {\n if (window.google && window.google.maps && !cleaningUp) {\n console.error('google api is already presented');\n return;\n }\n\n this.isCleaningUp().then(this.injectScript).catch(function error(err) {\n console.error('Error at injecting script after cleaning up: ', err);\n });\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.props.libraries !== prevProps.libraries) {\n 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');\n }\n\n if (isBrowser && prevProps.language !== this.props.language) {\n this.cleanup(); // TODO: refactor to use gDSFP maybe... wait for hooks refactoring.\n // eslint-disable-next-line react/no-did-update-set-state\n\n this.setState(function setLoaded() {\n return {\n loaded: false\n };\n }, this.cleanupCallback);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this4 = this;\n\n if (isBrowser) {\n this.cleanup();\n\n var timeoutCallback = function timeoutCallback() {\n if (!_this4.check.current) {\n // @ts-ignore\n delete window.google;\n cleaningUp = false;\n }\n };\n\n window.setTimeout(timeoutCallback, 1);\n\n if (this.props.onUnmount) {\n this.props.onUnmount();\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n ref: this.check\n }), this.state.loaded ? this.props.children : this.props.loadingElement || React.createElement(DefaultLoadingElement, null));\n }\n }]);\n\n return LoadScript;\n}(React.PureComponent);\n\nLoadScript.defaultProps = defaultLoadScriptProps;\n/* eslint-disable filenames/match-regex */\n\nvar previouslyLoadedUrl;\n\nfunction useLoadScript(_ref4) {\n var _ref4$id = _ref4.id,\n id = _ref4$id === void 0 ? defaultLoadScriptProps.id : _ref4$id,\n _ref4$version = _ref4.version,\n version = _ref4$version === void 0 ? defaultLoadScriptProps.version : _ref4$version,\n nonce = _ref4.nonce,\n googleMapsApiKey = _ref4.googleMapsApiKey,\n googleMapsClientId = _ref4.googleMapsClientId,\n language = _ref4.language,\n region = _ref4.region,\n libraries = _ref4.libraries,\n preventGoogleFontsLoading = _ref4.preventGoogleFontsLoading,\n channel = _ref4.channel,\n mapIds = _ref4.mapIds;\n var isMounted = React.useRef(false);\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isLoaded = _React$useState2[0],\n setLoaded = _React$useState2[1];\n\n var _React$useState3 = React.useState(undefined),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n loadError = _React$useState4[0],\n setLoadError = _React$useState4[1];\n\n React.useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n React.useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n React.useEffect(function validateLoadedState() {\n if (isLoaded) {\n invariant_1(!!window.google, 'useLoadScript was marked as loaded, but window.google is not present. Something went wrong.');\n }\n }, [isLoaded]);\n var url = makeLoadScriptUrl({\n version: version,\n googleMapsApiKey: googleMapsApiKey,\n googleMapsClientId: googleMapsClientId,\n language: language,\n region: region,\n libraries: libraries,\n channel: channel,\n mapIds: mapIds\n });\n React.useEffect(function loadScriptAndModifyLoadedState() {\n if (!isBrowser) {\n return;\n }\n\n function setLoadedIfMounted() {\n if (isMounted.current) {\n setLoaded(true);\n previouslyLoadedUrl = url;\n }\n }\n\n if (window.google && window.google.maps && previouslyLoadedUrl === url) {\n setLoadedIfMounted();\n return;\n }\n\n injectScript({\n id: id,\n url: url,\n nonce: nonce\n }).then(setLoadedIfMounted).catch(function handleInjectError(err) {\n if (isMounted.current) {\n setLoadError(err);\n }\n\n console.warn(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(googleMapsApiKey || '-', \") or Client ID (\").concat(googleMapsClientId || '-', \")\\n Otherwise it is a Network issue.\\n \"));\n console.error(err);\n });\n }, [id, url, nonce]);\n var prevLibraries = React.useRef();\n React.useEffect(function checkPerformance() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n\n prevLibraries.current = libraries;\n }, [libraries]);\n return {\n isLoaded: isLoaded,\n loadError: loadError,\n url: url\n };\n}\n\nvar defaultLoadingElement = React.createElement(DefaultLoadingElement, null);\n\nfunction LoadScriptNext(_a) {\n var loadingElement = _a.loadingElement,\n onLoad = _a.onLoad,\n onError = _a.onError,\n onUnmount = _a.onUnmount,\n children = _a.children,\n hookOptions = __rest$1(_a, [\"loadingElement\", \"onLoad\", \"onError\", \"onUnmount\", \"children\"]);\n\n var _useLoadScript = useLoadScript(hookOptions),\n isLoaded = _useLoadScript.isLoaded,\n loadError = _useLoadScript.loadError;\n\n React.useEffect(function handleOnLoad() {\n if (isLoaded && typeof onLoad === 'function') {\n onLoad();\n }\n }, [isLoaded, onLoad]);\n React.useEffect(function handleOnError() {\n if (loadError && typeof onError === 'function') {\n onError(loadError);\n }\n }, [loadError, onError]);\n React.useEffect(function handleOnUnmount() {\n return function () {\n if (onUnmount) {\n onUnmount();\n }\n };\n }, [onUnmount]);\n return isLoaded ? children : loadingElement || defaultLoadingElement;\n}\n\nvar LoadScriptNext$1 = React.memo(LoadScriptNext); // do not edit .js files directly - edit src/index.jst\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n }\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n } // true if both NaN, false otherwise\n\n\n return a !== a && b !== b;\n};\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at.\r\n *\r\n * Http://www.apache.org/licenses/LICENSE-2.0.\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar DEFAULT_ID = \"__googleMapsScriptId\";\n/**\r\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\r\n * dynamically using\r\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\r\n * It works by dynamically creating and appending a script node to the the\r\n * document head and wrapping the callback function so as to return a promise.\r\n *\r\n * ```\r\n * const loader = new Loader({\r\n * apiKey: \"\",\r\n * version: \"weekly\",\r\n * libraries: [\"places\"]\r\n * });\r\n *\r\n * loader.load().then((google) => {\r\n * const map = new google.maps.Map(...)\r\n * })\r\n * ```\r\n */\n\nvar Loader = /*#__PURE__*/function () {\n /**\r\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\r\n * using this library, instead the defaults are set by the Google Maps\r\n * JavaScript API server.\r\n *\r\n * ```\r\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\r\n * ```\r\n */\n function Loader(_ref5) {\n var apiKey = _ref5.apiKey,\n channel = _ref5.channel,\n client = _ref5.client,\n _ref5$id = _ref5.id,\n id = _ref5$id === void 0 ? DEFAULT_ID : _ref5$id,\n _ref5$libraries = _ref5.libraries,\n libraries = _ref5$libraries === void 0 ? [] : _ref5$libraries,\n language = _ref5.language,\n region = _ref5.region,\n version = _ref5.version,\n mapIds = _ref5.mapIds,\n nonce = _ref5.nonce,\n _ref5$retries = _ref5.retries,\n retries = _ref5$retries === void 0 ? 3 : _ref5$retries,\n _ref5$url = _ref5.url,\n url = _ref5$url === void 0 ? \"https://maps.googleapis.com/maps/api/js\" : _ref5$url;\n\n _classCallCheck(this, Loader);\n\n this.CALLBACK = \"__googleMapsCallback\";\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.version = version;\n this.apiKey = apiKey;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n\n this.libraries = libraries;\n this.language = language;\n this.region = region;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.retries = retries;\n this.url = url;\n\n if (Loader.instance) {\n if (!fastDeepEqual(this.options, Loader.instance.options)) {\n throw new Error(\"Loader must not be called again with different options. \".concat(JSON.stringify(this.options), \" !== \").concat(JSON.stringify(Loader.instance.options)));\n }\n\n return Loader.instance;\n }\n\n Loader.instance = this;\n }\n\n _createClass(Loader, [{\n key: \"options\",\n get: function get() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url\n };\n }\n }, {\n key: \"failed\",\n get: function get() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\r\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\r\n *\r\n * @ignore\r\n */\n\n }, {\n key: \"createUrl\",\n value: function createUrl() {\n var url = this.url;\n url += \"?callback=\".concat(this.CALLBACK);\n\n if (this.apiKey) {\n url += \"&key=\".concat(this.apiKey);\n }\n\n if (this.channel) {\n url += \"&channel=\".concat(this.channel);\n }\n\n if (this.client) {\n url += \"&client=\".concat(this.client);\n }\n\n if (this.libraries.length > 0) {\n url += \"&libraries=\".concat(this.libraries.join(\",\"));\n }\n\n if (this.language) {\n url += \"&language=\".concat(this.language);\n }\n\n if (this.region) {\n url += \"®ion=\".concat(this.region);\n }\n\n if (this.version) {\n url += \"&v=\".concat(this.version);\n }\n\n if (this.mapIds) {\n url += \"&map_ids=\".concat(this.mapIds.join(\",\"));\n }\n\n return url;\n }\n }, {\n key: \"deleteScript\",\n value: function deleteScript() {\n var script = document.getElementById(this.id);\n\n if (script) {\n script.remove();\n }\n }\n /**\r\n * Load the Google Maps JavaScript API script and return a Promise.\r\n */\n\n }, {\n key: \"load\",\n value: function load() {\n return this.loadPromise();\n }\n /**\r\n * Load the Google Maps JavaScript API script and return a Promise.\r\n *\r\n * @ignore\r\n */\n\n }, {\n key: \"loadPromise\",\n value: function loadPromise() {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.loadCallback(function (err) {\n if (!err) {\n resolve(window.google);\n } else {\n reject(err.error);\n }\n });\n });\n }\n /**\r\n * Load the Google Maps JavaScript API script with a callback.\r\n */\n\n }, {\n key: \"loadCallback\",\n value: function loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\r\n * Set the script on document.\r\n */\n\n }, {\n key: \"setScript\",\n value: function setScript() {\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n\n var url = this.createUrl();\n var script = document.createElement(\"script\");\n script.id = this.id;\n script.type = \"text/javascript\";\n script.src = url;\n script.onerror = this.loadErrorCallback.bind(this);\n script.defer = true;\n script.async = true;\n\n if (this.nonce) {\n script.nonce = this.nonce;\n }\n\n document.head.appendChild(script);\n }\n /**\r\n * Reset the loader state.\r\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n }, {\n key: \"resetIfRetryingFailed\",\n value: function resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n }, {\n key: \"loadErrorCallback\",\n value: function loadErrorCallback(e) {\n var _this6 = this;\n\n this.errors.push(e);\n\n if (this.errors.length <= this.retries) {\n var delay = this.errors.length * Math.pow(2, this.errors.length);\n console.log(\"Failed to load Google Maps script, retrying in \".concat(delay, \" ms.\"));\n setTimeout(function () {\n _this6.deleteScript();\n\n _this6.setScript();\n }, delay);\n } else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n }, {\n key: \"setCallback\",\n value: function setCallback() {\n window.__googleMapsCallback = this.callback.bind(this);\n }\n }, {\n key: \"callback\",\n value: function callback() {\n var _this7 = this;\n\n this.done = true;\n this.loading = false;\n this.callbacks.forEach(function (cb) {\n cb(_this7.onerrorEvent);\n });\n this.callbacks = [];\n }\n }, {\n key: \"execute\",\n value: function execute() {\n this.resetIfRetryingFailed();\n\n if (this.done) {\n this.callback();\n } else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n 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.\");\n this.callback();\n return;\n }\n\n if (this.loading) ;else {\n this.loading = true;\n this.setCallback();\n this.setScript();\n }\n }\n }\n }]);\n\n return Loader;\n}();\n/* eslint-disable filenames/match-regex */\n\n\nfunction useJsApiLoader(_ref6) {\n var _ref6$id = _ref6.id,\n id = _ref6$id === void 0 ? defaultLoadScriptProps.id : _ref6$id,\n _ref6$version = _ref6.version,\n version = _ref6$version === void 0 ? defaultLoadScriptProps.version : _ref6$version,\n nonce = _ref6.nonce,\n googleMapsApiKey = _ref6.googleMapsApiKey,\n language = _ref6.language,\n region = _ref6.region,\n libraries = _ref6.libraries,\n preventGoogleFontsLoading = _ref6.preventGoogleFontsLoading,\n mapIds = _ref6.mapIds;\n var isMounted = React.useRef(false);\n\n var _React$useState5 = React.useState(false),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n isLoaded = _React$useState6[0],\n setLoaded = _React$useState6[1];\n\n var _React$useState7 = React.useState(undefined),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n loadError = _React$useState8[0],\n setLoadError = _React$useState8[1];\n\n React.useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n var loader = React.useMemo(function memo() {\n return new Loader({\n id: id,\n apiKey: googleMapsApiKey,\n version: version,\n libraries: libraries,\n language: language,\n region: region,\n mapIds: mapIds,\n nonce: nonce\n });\n }, [id, googleMapsApiKey, version, libraries, language, region, mapIds, nonce]);\n React.useEffect(function effect() {\n if (isLoaded) {\n return;\n } else {\n loader.load().then(function then() {\n if (isMounted.current) setLoaded(true);\n }).catch(function onrejected(error) {\n setLoadError(error);\n });\n }\n }, []);\n React.useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n var prevLibraries = React.useRef();\n React.useEffect(function effect() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n\n prevLibraries.current = libraries;\n }, [libraries]);\n return {\n isLoaded: isLoaded,\n loadError: loadError\n };\n}\n\nvar eventMap$h = {};\nvar updaterMap$h = {\n options: function options(instance, _options2) {\n instance.setOptions(_options2);\n }\n};\n\nvar TrafficLayer = /*#__PURE__*/function (_PureComponent) {\n _inherits(TrafficLayer, _PureComponent);\n\n var _super3 = _createSuper(TrafficLayer);\n\n function TrafficLayer() {\n var _this8;\n\n _classCallCheck(this, TrafficLayer);\n\n _this8 = _super3.apply(this, arguments);\n _this8.state = {\n trafficLayer: null\n };\n\n _this8.setTrafficLayerCallback = function () {\n if (_this8.state.trafficLayer !== null) {\n if (_this8.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this8.props.onLoad(_this8.state.trafficLayer);\n }\n }\n };\n\n _this8.registeredEvents = [];\n return _this8;\n }\n\n _createClass(TrafficLayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var trafficLayer = new google.maps.TrafficLayer(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: {},\n nextProps: this.props,\n instance: trafficLayer\n });\n this.setState(function setTrafficLayer() {\n return {\n trafficLayer: trafficLayer\n };\n }, this.setTrafficLayerCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.trafficLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.trafficLayer\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.trafficLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.trafficLayer);\n }\n\n unregisterEvents(this.registeredEvents); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.state.trafficLayer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return TrafficLayer;\n}(PureComponent);\n\nTrafficLayer.contextType = MapContext;\n\nvar BicyclingLayer = /*#__PURE__*/function (_React$PureComponent3) {\n _inherits(BicyclingLayer, _React$PureComponent3);\n\n var _super4 = _createSuper(BicyclingLayer);\n\n function BicyclingLayer() {\n var _this9;\n\n _classCallCheck(this, BicyclingLayer);\n\n _this9 = _super4.apply(this, arguments);\n _this9.state = {\n bicyclingLayer: null\n };\n\n _this9.setBicyclingLayerCallback = function () {\n if (_this9.state.bicyclingLayer !== null) {\n // TODO: how is this possibly null if we're doing a null check\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this9.state.bicyclingLayer.setMap(_this9.context);\n\n if (_this9.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this9.props.onLoad(_this9.state.bicyclingLayer);\n }\n }\n };\n\n return _this9;\n }\n\n _createClass(BicyclingLayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var bicyclingLayer = new google.maps.BicyclingLayer();\n this.setState(function setBicyclingLayer() {\n return {\n bicyclingLayer: bicyclingLayer\n };\n }, this.setBicyclingLayerCallback);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.bicyclingLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.bicyclingLayer);\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.state.bicyclingLayer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return BicyclingLayer;\n}(React.PureComponent);\n\nBicyclingLayer.contextType = MapContext;\n\nvar TransitLayer = /*#__PURE__*/function (_React$PureComponent4) {\n _inherits(TransitLayer, _React$PureComponent4);\n\n var _super5 = _createSuper(TransitLayer);\n\n function TransitLayer() {\n var _this10;\n\n _classCallCheck(this, TransitLayer);\n\n _this10 = _super5.apply(this, arguments);\n _this10.state = {\n transitLayer: null\n };\n\n _this10.setTransitLayerCallback = function () {\n if (_this10.state.transitLayer !== null) {\n // TODO: how is this possibly null if we're doing a null check\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this10.state.transitLayer.setMap(_this10.context);\n\n if (_this10.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this10.props.onLoad(_this10.state.transitLayer);\n }\n }\n };\n\n return _this10;\n }\n\n _createClass(TransitLayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var transitLayer = new google.maps.TransitLayer();\n this.setState(function setTransitLayer() {\n return {\n transitLayer: transitLayer\n };\n }, this.setTransitLayerCallback);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.transitLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.transitLayer);\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.state.transitLayer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return TransitLayer;\n}(React.PureComponent);\n\nTransitLayer.contextType = MapContext;\n/* globals google */\n\nvar eventMap$g = {\n onCircleComplete: 'circlecomplete',\n onMarkerComplete: 'markercomplete',\n onOverlayComplete: 'overlaycomplete',\n onPolygonComplete: 'polygoncomplete',\n onPolylineComplete: 'polylinecomplete',\n onRectangleComplete: 'rectanglecomplete'\n};\nvar updaterMap$g = {\n drawingMode: function drawingMode(instance, _drawingMode) {\n instance.setDrawingMode(_drawingMode);\n },\n options: function options(instance, _options3) {\n instance.setOptions(_options3);\n }\n};\n\nvar DrawingManager = /*#__PURE__*/function (_React$PureComponent5) {\n _inherits(DrawingManager, _React$PureComponent5);\n\n var _super6 = _createSuper(DrawingManager);\n\n function DrawingManager(props) {\n var _this11;\n\n _classCallCheck(this, DrawingManager);\n\n _this11 = _super6.call(this, props);\n _this11.registeredEvents = [];\n _this11.state = {\n drawingManager: null\n };\n\n _this11.setDrawingManagerCallback = function () {\n if (_this11.state.drawingManager !== null && _this11.props.onLoad) {\n _this11.props.onLoad(_this11.state.drawingManager);\n }\n };\n\n invariant_1(!!google.maps.drawing, \"Did you include prop libraries={['drawing']} in the URL? %s\", google.maps.drawing);\n return _this11;\n }\n\n _createClass(DrawingManager, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var drawingManager = new google.maps.drawing.DrawingManager(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: {},\n nextProps: this.props,\n instance: drawingManager\n });\n this.setState(function setDrawingManager() {\n return {\n drawingManager: drawingManager\n };\n }, this.setDrawingManagerCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.drawingManager !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.drawingManager\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.drawingManager !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.drawingManager);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.drawingManager.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return DrawingManager;\n}(React.PureComponent);\n\nDrawingManager.contextType = MapContext;\nvar eventMap$f = {\n onAnimationChanged: 'animation_changed',\n onClick: 'click',\n onClickableChanged: 'clickable_changed',\n onCursorChanged: 'cursor_changed',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDraggableChanged: 'draggable_changed',\n onDragStart: 'dragstart',\n onFlatChanged: 'flat_changed',\n onIconChanged: 'icon_changed',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onPositionChanged: 'position_changed',\n onRightClick: 'rightclick',\n onShapeChanged: 'shape_changed',\n onTitleChanged: 'title_changed',\n onVisibleChanged: 'visible_changed',\n onZindexChanged: 'zindex_changed'\n};\nvar updaterMap$f = {\n animation: function animation(instance, _animation) {\n instance.setAnimation(_animation);\n },\n clickable: function clickable(instance, _clickable) {\n instance.setClickable(_clickable);\n },\n cursor: function cursor(instance, _cursor) {\n instance.setCursor(_cursor);\n },\n draggable: function draggable(instance, _draggable) {\n instance.setDraggable(_draggable);\n },\n icon: function icon(instance, _icon) {\n instance.setIcon(_icon);\n },\n label: function label(instance, _label) {\n instance.setLabel(_label);\n },\n map: function map(instance, _map2) {\n instance.setMap(_map2);\n },\n opacity: function opacity(instance, _opacity) {\n instance.setOpacity(_opacity);\n },\n options: function options(instance, _options4) {\n instance.setOptions(_options4);\n },\n position: function position(instance, _position) {\n instance.setPosition(_position);\n },\n shape: function shape(instance, _shape) {\n instance.setShape(_shape);\n },\n title: function title(instance, _title) {\n instance.setTitle(_title);\n },\n visible: function visible(instance, _visible) {\n instance.setVisible(_visible);\n },\n zIndex: function zIndex(instance, _zIndex) {\n instance.setZIndex(_zIndex);\n }\n};\n\nvar Marker = /*#__PURE__*/function (_React$PureComponent6) {\n _inherits(Marker, _React$PureComponent6);\n\n var _super7 = _createSuper(Marker);\n\n function Marker() {\n var _this12;\n\n _classCallCheck(this, Marker);\n\n _this12 = _super7.apply(this, arguments);\n _this12.registeredEvents = [];\n return _this12;\n }\n\n _createClass(Marker, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var markerOptions = Object.assign(Object.assign(Object.assign({}, this.props.options || {}), this.props.clusterer ? {} : {\n map: this.context\n }), {\n position: this.props.position\n }); // Unfortunately we can't just do this in the contstructor, because the\n // `MapContext` might not be filled in yet.\n\n this.marker = new google.maps.Marker(markerOptions);\n\n if (this.props.clusterer) {\n this.props.clusterer.addMarker(this.marker, !!this.props.noClustererRedraw);\n } else {\n this.marker.setMap(this.context);\n }\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: {},\n nextProps: this.props,\n instance: this.marker\n });\n\n if (this.props.onLoad) {\n this.props.onLoad(this.marker);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.marker) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.marker\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.marker) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.marker);\n }\n\n unregisterEvents(this.registeredEvents);\n\n if (this.props.clusterer) {\n this.props.clusterer.removeMarker(this.marker, !!this.props.noClustererRedraw);\n } else {\n this.marker && this.marker.setMap(null);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this13 = this;\n\n var children = null;\n\n if (this.props.children) {\n children = React.Children.map(this.props.children, function (child) {\n if (!React.isValidElement(child)) {\n return child;\n }\n\n var elementChild = child;\n return React.cloneElement(elementChild, {\n anchor: _this13.marker\n });\n });\n }\n\n return children || null;\n }\n }]);\n\n return Marker;\n}(React.PureComponent);\n\nMarker.contextType = MapContext;\n\nvar ClusterIcon =\n/** @class */\nfunction () {\n function ClusterIcon(cluster, styles) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);\n this.cluster = cluster;\n this.clusterClassName = this.cluster.getClusterer().getClusterClass();\n this.className = this.clusterClassName;\n this.styles = styles;\n this.center = undefined;\n this.div = null;\n this.sums = null;\n this.visible = false;\n this.boundsChangedListener = null;\n this.url = '';\n this.height = 0;\n this.width = 0;\n this.anchorText = [0, 0];\n this.anchorIcon = [0, 0];\n this.textColor = 'black';\n this.textSize = 11;\n this.textDecoration = 'none';\n this.fontWeight = 'bold';\n this.fontStyle = 'normal';\n this.fontFamily = 'Arial,sans-serif';\n this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.setMap(cluster.getMap()); // Note: this causes onAdd to be called\n }\n\n ClusterIcon.prototype.onAdd = function () {\n var _this = this;\n\n var cMouseDownInCluster;\n var cDraggingMapByCluster;\n this.div = document.createElement('div');\n this.div.className = this.className;\n\n if (this.visible) {\n this.show();\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.getPanes().overlayMouseTarget.appendChild(this.div); // Fix for Issue 157\n\n this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(), 'boundschanged', function boundsChanged() {\n cDraggingMapByCluster = cMouseDownInCluster;\n });\n google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {\n cMouseDownInCluster = true;\n cDraggingMapByCluster = false;\n }); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n\n google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function (event) {\n cMouseDownInCluster = false;\n\n if (!cDraggingMapByCluster) {\n var markerClusterer_1 = _this.cluster.getClusterer();\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n\n\n google.maps.event.trigger(markerClusterer_1, 'click', _this.cluster);\n google.maps.event.trigger(markerClusterer_1, 'clusterclick', _this.cluster); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n\n if (markerClusterer_1.getZoomOnClick()) {\n // Zoom into the cluster.\n var maxZoom_1 = markerClusterer_1.getMaxZoom();\n\n var bounds_1 = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n markerClusterer_1.getMap().fitBounds(bounds_1); // There is a fix for Issue 170 here:\n\n setTimeout(function timeout() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer_1.getMap().fitBounds(bounds_1); // Don't zoom beyond the max zoom level\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n if (maxZoom_1 !== null && markerClusterer_1.getMap().getZoom() > maxZoom_1) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer_1.getMap().setZoom(maxZoom_1 + 1);\n }\n }, 100);\n } // Prevent event propagation to the map:\n\n\n event.cancelBubble = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n }\n });\n google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);\n }); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n\n google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseout', _this.cluster);\n });\n };\n\n ClusterIcon.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.hide();\n\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener);\n }\n\n google.maps.event.clearInstanceListeners(this.div);\n this.div.parentNode.removeChild(this.div);\n this.div = null;\n }\n };\n\n ClusterIcon.prototype.draw = function () {\n if (this.visible && this.div !== null && this.center) {\n var _a = this.getPosFromLatLng(this.center),\n x = _a.x,\n y = _a.y;\n\n this.div.style.top = y + 'px';\n this.div.style.left = x + 'px';\n }\n };\n\n ClusterIcon.prototype.hide = function () {\n if (this.div) {\n this.div.style.display = 'none';\n }\n\n this.visible = false;\n };\n\n ClusterIcon.prototype.show = function () {\n if (this.div && this.center) {\n var img = '',\n divTitle = ''; // NOTE: values must be specified in px units\n\n var bp = this.backgroundPosition.split(' ');\n var spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, ''), 10);\n var spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, ''), 10);\n var pos = this.getPosFromLatLng(this.center);\n\n if (this.sums === null || typeof this.sums.title === 'undefined' || this.sums.title === '') {\n divTitle = this.cluster.getClusterer().getTitle();\n } else {\n divTitle = this.sums.title;\n }\n\n this.div.style.cssText = this.createCss(pos);\n img = \"\" + divTitle + \"\";\n this.div.innerHTML = img + \"
\" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.sums.text + '
';\n this.div.title = divTitle;\n this.div.style.display = '';\n }\n\n this.visible = true;\n };\n\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums = sums;\n var styles = this.cluster.getClusterer().getStyles();\n var style = styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))];\n this.url = style.url;\n this.height = style.height;\n this.width = style.width;\n if (style.className) this.className = this.clusterClassName + \" \" + style.className;\n this.anchorText = style.anchorText || [0, 0];\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2];\n this.textColor = style.textColor || 'black';\n this.textSize = style.textSize || 11;\n this.textDecoration = style.textDecoration || 'none';\n this.fontWeight = style.fontWeight || 'bold';\n this.fontStyle = style.fontStyle || 'normal';\n this.fontFamily = style.fontFamily || 'Arial,sans-serif';\n this.backgroundPosition = style.backgroundPosition || '0 0';\n };\n\n ClusterIcon.prototype.setCenter = function (center) {\n this.center = center;\n };\n\n ClusterIcon.prototype.createCss = function (pos) {\n var style = [];\n style.push('cursor: pointer;');\n style.push('position: absolute; top: ' + pos.y + 'px; left: ' + pos.x + 'px;');\n style.push('width: ' + this.width + 'px; height: ' + this.height + 'px;');\n return style.join('');\n };\n\n ClusterIcon.prototype.getPosFromLatLng = function (latlng) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n pos.x -= this.anchorIcon[1];\n pos.y -= this.anchorIcon[0]; // pos.x = pos.x\n // pos.y = pos.y\n\n return pos;\n };\n\n return ClusterIcon;\n}();\n\nvar Cluster$1 =\n/** @class */\nfunction () {\n function Cluster(markerClusterer) {\n this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.map = this.markerClusterer.getMap();\n this.gridSize = this.markerClusterer.getGridSize();\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize();\n this.averageCenter = this.markerClusterer.getAverageCenter();\n this.markers = [];\n this.center = undefined;\n this.bounds = null;\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles());\n }\n\n Cluster.prototype.getSize = function () {\n return this.markers.length;\n };\n\n Cluster.prototype.getMarkers = function () {\n return this.markers;\n };\n\n Cluster.prototype.getCenter = function () {\n return this.center;\n };\n\n Cluster.prototype.getMap = function () {\n return this.map;\n };\n\n Cluster.prototype.getClusterer = function () {\n return this.markerClusterer;\n };\n\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center, this.center);\n var markers = this.getMarkers();\n\n for (var i = 0; i < markers.length; i++) {\n var position = markers[i].getPosition();\n\n if (position) {\n bounds.extend(position);\n }\n }\n\n return bounds;\n };\n\n Cluster.prototype.remove = function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.clusterIcon.setMap(null);\n this.markers = []; // @ts-ignore\n\n delete this.markers;\n };\n\n Cluster.prototype.addMarker = function (marker) {\n if (this.isMarkerAlreadyAdded(marker)) {\n return false;\n }\n\n if (!this.center) {\n var position = marker.getPosition();\n\n if (position) {\n this.center = position;\n this.calculateBounds();\n }\n } else {\n if (this.averageCenter) {\n var position = marker.getPosition();\n\n if (position) {\n var length_1 = this.markers.length + 1;\n this.center = new google.maps.LatLng((this.center.lat() * (length_1 - 1) + position.lat()) / length_1, (this.center.lng() * (length_1 - 1) + position.lng()) / length_1);\n this.calculateBounds();\n }\n }\n }\n\n marker.isAdded = true;\n this.markers.push(marker);\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = this.map.getZoom();\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n } else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n } else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (var i = 0; i < mCount; i++) {\n this.markers[i].setMap(null);\n }\n } else {\n marker.setMap(null);\n }\n\n return true;\n };\n\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n if (this.bounds !== null) {\n var position = marker.getPosition();\n\n if (position) {\n return this.bounds.contains(position);\n }\n }\n\n return false;\n };\n\n Cluster.prototype.calculateBounds = function () {\n this.bounds = this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center, this.center));\n };\n\n Cluster.prototype.updateIcon = function () {\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = this.map.getZoom();\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide();\n return;\n }\n\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide();\n return;\n }\n\n if (this.center) {\n this.clusterIcon.setCenter(this.center);\n }\n\n this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length));\n this.clusterIcon.show();\n };\n\n Cluster.prototype.isMarkerAlreadyAdded = function (marker) {\n if (this.markers.includes) {\n return this.markers.includes(marker);\n } else {\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true;\n }\n }\n }\n\n return false;\n };\n\n return Cluster;\n}();\n/* global google */\n\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\n\n\nvar CALCULATOR = function CALCULATOR(markers, numStyles) {\n var count = markers.length;\n var numberOfDigits = count.toString().length;\n var index = Math.min(numberOfDigits, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: ''\n };\n};\n\nvar BATCH_SIZE = 2000;\nvar BATCH_SIZE_IE = 500;\nvar IMAGE_PATH = 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';\nvar IMAGE_EXTENSION = 'png';\nvar IMAGE_SIZES = [53, 56, 66, 78, 90];\nvar CLUSTERER_CLASS = 'cluster';\n\nvar Clusterer =\n/** @class */\nfunction () {\n function Clusterer(map, optMarkers, optOptions) {\n if (optMarkers === void 0) {\n optMarkers = [];\n }\n\n if (optOptions === void 0) {\n optOptions = {};\n }\n\n this.extend(Clusterer, google.maps.OverlayView);\n this.markers = [];\n this.clusters = [];\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n this.gridSize = optOptions.gridSize || 60;\n this.minClusterSize = optOptions.minimumClusterSize || 2;\n this.maxZoom = optOptions.maxZoom || null;\n this.styles = optOptions.styles || [];\n this.title = optOptions.title || '';\n this.zoomOnClick = true;\n\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick;\n }\n\n this.averageCenter = false;\n\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter;\n }\n\n this.ignoreHidden = false;\n\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden;\n }\n\n this.enableRetinaIcons = false;\n\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons;\n }\n\n this.imagePath = optOptions.imagePath || IMAGE_PATH;\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION;\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES;\n this.calculator = optOptions.calculator || CALCULATOR;\n this.batchSize = optOptions.batchSize || BATCH_SIZE;\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE;\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS;\n\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE;\n }\n\n this.timerRefStatic = null;\n this.setupStyles();\n this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.setMap(map); // Note: this causes onAdd to be called\n }\n\n Clusterer.prototype.onAdd = function () {\n var _this = this; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.activeMap = this.getMap();\n this.ready = true;\n this.repaint(); // Add the map event listeners\n\n this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n _this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n\n\n if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this.getMap().getZoom() === _this.get('maxZoom')) {\n google.maps.event.trigger(_this, 'idle');\n }\n }), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n _this.redraw();\n })];\n }; // eslint-disable-next-line @getify/proper-arrows/this\n\n\n Clusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var i = 0; i < this.markers.length; i++) {\n if (this.markers[i].getMap() !== this.activeMap) {\n this.markers[i].setMap(this.activeMap);\n }\n } // Remove all clusters:\n\n\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove();\n }\n\n this.clusters = []; // Remove map event listeners:\n\n for (var i = 0; i < this.listeners.length; i++) {\n google.maps.event.removeListener(this.listeners[i]);\n }\n\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n }; // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n\n Clusterer.prototype.draw = function () {};\n\n Clusterer.prototype.setupStyles = function () {\n if (this.styles.length > 0) {\n return;\n }\n\n for (var i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: this.imagePath + (i + 1) + '.' + this.imageExtension,\n height: this.imageSizes[i],\n width: this.imageSizes[i]\n });\n }\n };\n\n Clusterer.prototype.fitMapToMarkers = function () {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n\n for (var i = 0; i < markers.length; i++) {\n var position = markers[i].getPosition();\n\n if (position) {\n bounds.extend(position);\n }\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.getMap().fitBounds(bounds);\n };\n\n Clusterer.prototype.getGridSize = function () {\n return this.gridSize;\n };\n\n Clusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize = gridSize;\n };\n\n Clusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize;\n };\n\n Clusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize = minimumClusterSize;\n };\n\n Clusterer.prototype.getMaxZoom = function () {\n return this.maxZoom;\n };\n\n Clusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom = maxZoom;\n };\n\n Clusterer.prototype.getStyles = function () {\n return this.styles;\n };\n\n Clusterer.prototype.setStyles = function (styles) {\n this.styles = styles;\n };\n\n Clusterer.prototype.getTitle = function () {\n return this.title;\n };\n\n Clusterer.prototype.setTitle = function (title) {\n this.title = title;\n };\n\n Clusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick;\n };\n\n Clusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick = zoomOnClick;\n };\n\n Clusterer.prototype.getAverageCenter = function () {\n return this.averageCenter;\n };\n\n Clusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter = averageCenter;\n };\n\n Clusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden;\n };\n\n Clusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden = ignoreHidden;\n };\n\n Clusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons;\n };\n\n Clusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons = enableRetinaIcons;\n };\n\n Clusterer.prototype.getImageExtension = function () {\n return this.imageExtension;\n };\n\n Clusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension = imageExtension;\n };\n\n Clusterer.prototype.getImagePath = function () {\n return this.imagePath;\n };\n\n Clusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath = imagePath;\n };\n\n Clusterer.prototype.getImageSizes = function () {\n return this.imageSizes;\n };\n\n Clusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes = imageSizes;\n };\n\n Clusterer.prototype.getCalculator = function () {\n return this.calculator;\n };\n\n Clusterer.prototype.setCalculator = function (calculator) {\n this.calculator = calculator;\n };\n\n Clusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE;\n };\n\n Clusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE = batchSizeIE;\n };\n\n Clusterer.prototype.getClusterClass = function () {\n return this.clusterClass;\n };\n\n Clusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass = clusterClass;\n };\n\n Clusterer.prototype.getMarkers = function () {\n return this.markers;\n };\n\n Clusterer.prototype.getTotalMarkers = function () {\n return this.markers.length;\n };\n\n Clusterer.prototype.getClusters = function () {\n return this.clusters;\n };\n\n Clusterer.prototype.getTotalClusters = function () {\n return this.clusters.length;\n };\n\n Clusterer.prototype.addMarker = function (marker, optNoDraw) {\n this.pushMarkerTo(marker);\n\n if (!optNoDraw) {\n this.redraw();\n }\n };\n\n Clusterer.prototype.addMarkers = function (markers, optNoDraw) {\n for (var key in markers) {\n if (markers.hasOwnProperty(key)) {\n this.pushMarkerTo(markers[key]);\n }\n }\n\n if (!optNoDraw) {\n this.redraw();\n }\n };\n\n Clusterer.prototype.pushMarkerTo = function (marker) {\n var _this = this; // If the marker is draggable add a listener so we can update the clusters on the dragend:\n\n\n if (marker.getDraggable()) {\n // eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this\n google.maps.event.addListener(marker, 'dragend', function () {\n if (_this.ready) {\n marker.isAdded = false;\n\n _this.repaint();\n }\n });\n }\n\n marker.isAdded = false;\n this.markers.push(marker);\n };\n\n Clusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker);\n } else {\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i;\n break;\n }\n }\n }\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n\n return true;\n };\n\n Clusterer.prototype.removeMarker = function (marker, optNoDraw) {\n var removed = this.removeMarker_(marker);\n\n if (!optNoDraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n\n Clusterer.prototype.removeMarkers = function (markers, optNoDraw) {\n var removed = false;\n\n for (var i = 0; i < markers.length; i++) {\n removed = removed || this.removeMarker_(markers[i]);\n }\n\n if (!optNoDraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n\n Clusterer.prototype.clearMarkers = function () {\n this.resetViewport(true);\n this.markers = [];\n };\n\n Clusterer.prototype.repaint = function () {\n var oldClusters = this.clusters.slice();\n this.clusters = [];\n this.resetViewport(false);\n this.redraw(); // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n\n setTimeout(function timeout() {\n for (var i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove();\n }\n }, 0);\n };\n\n Clusterer.prototype.getExtendedBounds = function (bounds) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.\n\n var trPix = projection.fromLatLngToDivPixel( // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()));\n trPix.x += this.gridSize;\n trPix.y -= this.gridSize;\n var blPix = projection.fromLatLngToDivPixel( // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()));\n blPix.x -= this.gridSize;\n blPix.y += this.gridSize; // Extend the bounds to contain the new bounds.\n\n bounds.extend( // Convert the pixel points back to LatLng nw\n projection.fromDivPixelToLatLng(trPix));\n bounds.extend( // Convert the pixel points back to LatLng sw\n projection.fromDivPixelToLatLng(blPix));\n return bounds;\n };\n\n Clusterer.prototype.redraw = function () {\n // Redraws all the clusters.\n this.createClusters(0);\n };\n\n Clusterer.prototype.resetViewport = function (optHide) {\n // Remove all the clusters\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove();\n }\n\n this.clusters = []; // Reset the markers to not be added and to be removed from the map.\n\n for (var i = 0; i < this.markers.length; i++) {\n var marker = this.markers[i];\n marker.isAdded = false;\n\n if (optHide) {\n marker.setMap(null);\n }\n }\n };\n\n Clusterer.prototype.distanceBetweenPoints = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)));\n };\n\n Clusterer.prototype.isMarkerInBounds = function (marker, bounds) {\n var position = marker.getPosition();\n\n if (position) {\n return bounds.contains(position);\n }\n\n return false;\n };\n\n Clusterer.prototype.addToClosestCluster = function (marker) {\n var cluster;\n var distance = 40000; // Some large number\n\n var clusterToAddTo = null;\n\n for (var i = 0; i < this.clusters.length; i++) {\n cluster = this.clusters[i];\n var center = cluster.getCenter();\n var position = marker.getPosition();\n\n if (center && position) {\n var d = this.distanceBetweenPoints(center, position);\n\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n } else {\n cluster = new Cluster$1(this);\n cluster.addMarker(marker);\n this.clusters.push(cluster);\n }\n };\n\n Clusterer.prototype.createClusters = function (iFirst) {\n var _this = this;\n\n if (!this.ready) {\n return;\n } // Cancel previous batch processing if we're working on the first batch:\n\n\n if (iFirst === 0) {\n /**\n * This event is fired when the Clusterer begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic); // @ts-ignore\n\n delete this.timerRefStatic;\n }\n } // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n\n\n var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n 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 var bounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize, this.markers.length);\n\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers[i];\n\n if (!marker.isAdded && this.isMarkerInBounds(marker, bounds)) {\n if (!this.ignoreHidden || this.ignoreHidden && marker.getVisible()) {\n this.addToClosestCluster(marker);\n }\n }\n }\n\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n _this.createClusters(iLast);\n }, 0);\n } else {\n this.timerRefStatic = null;\n /**\n * This event is fired when the Clusterer stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n\n google.maps.event.trigger(this, 'clusteringend', this);\n\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].updateIcon();\n }\n }\n };\n\n Clusterer.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n // eslint-disable-next-line guard-for-in\n for (var property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n return this;\n }.apply(obj1, [obj2]);\n };\n\n return Clusterer;\n}();\n/* eslint-disable filenames/match-exported */\n\n\nvar eventMap$e = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover'\n};\nvar updaterMap$e = {\n averageCenter: function averageCenter(instance, _averageCenter) {\n instance.setAverageCenter(_averageCenter);\n },\n batchSizeIE: function batchSizeIE(instance, _batchSizeIE) {\n instance.setBatchSizeIE(_batchSizeIE);\n },\n calculator: function calculator(instance, _calculator) {\n instance.setCalculator(_calculator);\n },\n clusterClass: function clusterClass(instance, _clusterClass) {\n instance.setClusterClass(_clusterClass);\n },\n enableRetinaIcons: function enableRetinaIcons(instance, _enableRetinaIcons) {\n instance.setEnableRetinaIcons(_enableRetinaIcons);\n },\n gridSize: function gridSize(instance, _gridSize) {\n instance.setGridSize(_gridSize);\n },\n ignoreHidden: function ignoreHidden(instance, _ignoreHidden) {\n instance.setIgnoreHidden(_ignoreHidden);\n },\n imageExtension: function imageExtension(instance, _imageExtension) {\n instance.setImageExtension(_imageExtension);\n },\n imagePath: function imagePath(instance, _imagePath) {\n instance.setImagePath(_imagePath);\n },\n imageSizes: function imageSizes(instance, _imageSizes) {\n instance.setImageSizes(_imageSizes);\n },\n maxZoom: function maxZoom(instance, _maxZoom) {\n instance.setMaxZoom(_maxZoom);\n },\n minimumClusterSize: function minimumClusterSize(instance, _minimumClusterSize) {\n instance.setMinimumClusterSize(_minimumClusterSize);\n },\n styles: function styles(instance, _styles) {\n instance.setStyles(_styles);\n },\n title: function title(instance, _title2) {\n instance.setTitle(_title2);\n },\n zoomOnClick: function zoomOnClick(instance, _zoomOnClick) {\n instance.setZoomOnClick(_zoomOnClick);\n }\n};\n\nvar ClustererComponent = /*#__PURE__*/function (_React$PureComponent7) {\n _inherits(ClustererComponent, _React$PureComponent7);\n\n var _super8 = _createSuper(ClustererComponent);\n\n function ClustererComponent() {\n var _this14;\n\n _classCallCheck(this, ClustererComponent);\n\n _this14 = _super8.apply(this, arguments);\n _this14.registeredEvents = [];\n _this14.state = {\n markerClusterer: null\n };\n\n _this14.setClustererCallback = function () {\n if (_this14.state.markerClusterer !== null && _this14.props.onLoad) {\n _this14.props.onLoad(_this14.state.markerClusterer);\n }\n };\n\n return _this14;\n }\n\n _createClass(ClustererComponent, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.context) {\n var markerClusterer = new Clusterer(this.context, [], this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer\n });\n this.setState(function setClusterer() {\n return {\n markerClusterer: markerClusterer\n };\n }, this.setClustererCallback);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer);\n }\n\n unregisterEvents(this.registeredEvents); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.state.markerClusterer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.state.markerClusterer !== null ? this.props.children(this.state.markerClusterer) : null;\n }\n }]);\n\n return ClustererComponent;\n}(React.PureComponent);\n\nClustererComponent.contextType = MapContext;\n\nvar InfoBox =\n/** @class */\nfunction () {\n function InfoBox(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.extend(InfoBox, google.maps.OverlayView); // Standard options (in common with google.maps.InfoWindow):\n\n this.content = options.content || '';\n this.disableAutoPan = options.disableAutoPan || false;\n this.maxWidth = options.maxWidth || 0;\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0);\n this.position = options.position || new google.maps.LatLng(0, 0);\n this.zIndex = options.zIndex || null; // Additional options (unique to InfoBox):\n\n this.boxClass = options.boxClass || 'infoBox';\n this.boxStyle = options.boxStyle || {};\n this.closeBoxMargin = options.closeBoxMargin || '2px';\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif';\n\n if (options.closeBoxURL === '') {\n this.closeBoxURL = '';\n }\n\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1);\n\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true;\n } else {\n options.visible = !options.isHidden;\n }\n }\n\n this.isHidden = !options.visible;\n this.alignBottom = options.alignBottom || false;\n this.pane = options.pane || 'floatPane';\n this.enableEventPropagation = options.enableEventPropagation || false;\n this.div = null;\n this.closeListener = null;\n this.moveListener = null;\n this.mapListener = null;\n this.contextListener = null;\n this.eventListeners = null;\n this.fixedWidthSet = null;\n }\n\n InfoBox.prototype.createInfoBoxDiv = function () {\n var _this = this; // This handler prevents an event in the InfoBox from being passed on to the map.\n\n\n function cancelHandler(event) {\n event.cancelBubble = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n } // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n // eslint-disable-next-line @getify/proper-arrows/this\n\n\n var ignoreHandler = function ignoreHandler(event) {\n event.returnValue = false;\n\n if (event.preventDefault) {\n event.preventDefault();\n }\n\n if (!_this.enableEventPropagation) {\n cancelHandler(event);\n }\n };\n\n if (!this.div) {\n this.div = document.createElement('div');\n this.setBoxStyle();\n\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content;\n } else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(this.content);\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n var panes = this.getPanes();\n panes[this.pane].appendChild(this.div); // Add the InfoBox div to the DOM\n\n this.addClickHandler();\n\n if (this.div.style.width) {\n this.fixedWidthSet = true;\n } else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px';\n this.fixedWidthSet = true;\n } else {\n // The following code is needed to overcome problems with MSIE\n var bw = this.getBoxWidths();\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px';\n this.fixedWidthSet = false;\n }\n }\n\n this.panBox(this.disableAutoPan);\n\n if (!this.enableEventPropagation) {\n this.eventListeners = []; // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n\n var events = ['mousedown', 'mouseover', 'mouseout', 'mouseup', 'click', 'dblclick', 'touchstart', 'touchend', 'touchmove'];\n\n for (var i = 0; i < events.length; i++) {\n this.eventListeners.push(google.maps.event.addDomListener(this.div, events[i], cancelHandler));\n } // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n\n\n this.eventListeners.push(google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n if (_this.div) {\n _this.div.style.cursor = 'default';\n }\n }));\n }\n\n this.contextListener = google.maps.event.addDomListener(this.div, 'contextmenu', ignoreHandler);\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n\n google.maps.event.trigger(this, 'domready');\n }\n };\n\n InfoBox.prototype.getCloseBoxImg = function () {\n var img = '';\n\n if (this.closeBoxURL !== '') {\n img = '\"\"';\n\";\n }\n\n return img;\n };\n\n InfoBox.prototype.addClickHandler = function () {\n if (this.div && this.div.firstChild && this.closeBoxURL !== '') {\n var closeBox = this.div.firstChild;\n this.closeListener = google.maps.event.addDomListener(closeBox, 'click', this.getCloseClickHandler());\n } else {\n this.closeListener = null;\n }\n };\n\n InfoBox.prototype.getCloseClickHandler = function () {\n var _this = this; // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n\n\n return function (event) {\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n event.cancelBubble = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n\n\n google.maps.event.trigger(_this, 'closeclick');\n\n _this.close();\n };\n };\n\n InfoBox.prototype.panBox = function (disablePan) {\n if (this.div && !disablePan) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var map = this.getMap(); // Only pan if attached to map, not panorama\n\n if (map instanceof google.maps.Map) {\n var xOffset = 0;\n var yOffset = 0;\n var bounds = map.getBounds();\n\n if (bounds && !bounds.contains(this.position)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position);\n }\n\n var mapDiv = map.getDiv(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n var mapWidth = mapDiv.offsetWidth; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n var mapHeight = mapDiv.offsetHeight;\n var iwOffsetX = this.pixelOffset.width;\n var iwOffsetY = this.pixelOffset.height;\n var iwWidth = this.div.offsetWidth;\n var iwHeight = this.div.offsetHeight;\n var padX = this.infoBoxClearance.width;\n var padY = this.infoBoxClearance.height; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToContainerPixel(this.position);\n\n if (pixPosition !== null) {\n if (pixPosition.x < -iwOffsetX + padX) {\n xOffset = pixPosition.x + iwOffsetX - padX;\n } else if (pixPosition.x + iwWidth + iwOffsetX + padX > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth;\n }\n\n if (this.alignBottom) {\n if (pixPosition.y < -iwOffsetY + padY + iwHeight) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight;\n } else if (pixPosition.y + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight;\n }\n } else {\n if (pixPosition.y < -iwOffsetY + padY) {\n yOffset = pixPosition.y + iwOffsetY - padY;\n } else if (pixPosition.y + iwHeight + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight;\n }\n }\n }\n\n if (!(xOffset === 0 && yOffset === 0)) {\n // Move the map to the shifted center.\n map.panBy(xOffset, yOffset);\n }\n }\n }\n };\n\n InfoBox.prototype.setBoxStyle = function () {\n if (this.div) {\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div.className = this.boxClass; // Clear existing inline style values:\n\n this.div.style.cssText = ''; // Apply style values defined in the boxStyle parameter:\n\n var boxStyle = this.boxStyle;\n\n for (var i in boxStyle) {\n if (boxStyle.hasOwnProperty(i)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.div.style[i] = boxStyle[i];\n }\n } // Fix for iOS disappearing InfoBox problem\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n\n\n this.div.style.webkitTransform = 'translateZ(0)'; // Fix up opacity style for benefit of MSIE\n\n if (typeof this.div.style.opacity !== 'undefined' && this.div.style.opacity !== '') {\n // See http://www.quirksmode.org/css/opacity.html\n var opacity = parseFloat(this.div.style.opacity || ''); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n this.div.style.msFilter = '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')\"';\n this.div.style.filter = 'alpha(opacity=' + opacity * 100 + ')';\n } // Apply required styles\n\n\n this.div.style.position = 'absolute';\n this.div.style.visibility = 'hidden';\n\n if (this.zIndex !== null) {\n this.div.style.zIndex = this.zIndex + '';\n }\n\n if (!this.div.style.overflow) {\n this.div.style.overflow = 'auto';\n }\n }\n };\n\n InfoBox.prototype.getBoxWidths = function () {\n var bw = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n\n if (!this.div) {\n return bw;\n }\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n var ownerDocument = this.div.ownerDocument;\n var computedStyle = ownerDocument && ownerDocument.defaultView ? ownerDocument.defaultView.getComputedStyle(this.div, '') : null;\n\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth || '', 10) || 0;\n }\n } else if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n document.documentElement.currentStyle // MSIE\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var currentStyle = this.div.currentStyle;\n\n if (currentStyle) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(currentStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(currentStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(currentStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(currentStyle.borderRightWidth || '', 10) || 0;\n }\n }\n\n return bw;\n };\n\n InfoBox.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.div.parentNode.removeChild(this.div);\n this.div = null;\n }\n };\n\n InfoBox.prototype.draw = function () {\n this.createInfoBoxDiv();\n\n if (this.div) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToDivPixel(this.position);\n\n if (pixPosition !== null) {\n this.div.style.left = pixPosition.x + this.pixelOffset.width + 'px';\n\n if (this.alignBottom) {\n this.div.style.bottom = -(pixPosition.y + this.pixelOffset.height) + 'px';\n } else {\n this.div.style.top = pixPosition.y + this.pixelOffset.height + 'px';\n }\n }\n\n if (this.isHidden) {\n this.div.style.visibility = 'hidden';\n } else {\n this.div.style.visibility = 'visible';\n }\n }\n };\n\n InfoBox.prototype.setOptions = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options.boxClass !== 'undefined') {\n // Must be first\n this.boxClass = options.boxClass;\n this.setBoxStyle();\n }\n\n if (typeof options.boxStyle !== 'undefined') {\n // Must be second\n this.boxStyle = options.boxStyle;\n this.setBoxStyle();\n }\n\n if (typeof options.content !== 'undefined') {\n this.setContent(options.content);\n }\n\n if (typeof options.disableAutoPan !== 'undefined') {\n this.disableAutoPan = options.disableAutoPan;\n }\n\n if (typeof options.maxWidth !== 'undefined') {\n this.maxWidth = options.maxWidth;\n }\n\n if (typeof options.pixelOffset !== 'undefined') {\n this.pixelOffset = options.pixelOffset;\n }\n\n if (typeof options.alignBottom !== 'undefined') {\n this.alignBottom = options.alignBottom;\n }\n\n if (typeof options.position !== 'undefined') {\n this.setPosition(options.position);\n }\n\n if (typeof options.zIndex !== 'undefined') {\n this.setZIndex(options.zIndex);\n }\n\n if (typeof options.closeBoxMargin !== 'undefined') {\n this.closeBoxMargin = options.closeBoxMargin;\n }\n\n if (typeof options.closeBoxURL !== 'undefined') {\n this.closeBoxURL = options.closeBoxURL;\n }\n\n if (typeof options.infoBoxClearance !== 'undefined') {\n this.infoBoxClearance = options.infoBoxClearance;\n }\n\n if (typeof options.isHidden !== 'undefined') {\n this.isHidden = options.isHidden;\n }\n\n if (typeof options.visible !== 'undefined') {\n this.isHidden = !options.visible;\n }\n\n if (typeof options.enableEventPropagation !== 'undefined') {\n this.enableEventPropagation = options.enableEventPropagation;\n }\n\n if (this.div) {\n this.draw();\n }\n };\n\n InfoBox.prototype.setContent = function (content) {\n this.content = content;\n\n if (this.div) {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n } // Odd code required to make things work with MSIE.\n\n\n if (!this.fixedWidthSet) {\n this.div.style.width = '';\n }\n\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n } else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n } // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n\n\n if (!this.fixedWidthSet) {\n this.div.style.width = this.div.offsetWidth + 'px';\n\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n } else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n }\n\n this.addClickHandler();\n }\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n\n\n google.maps.event.trigger(this, 'content_changed');\n };\n\n InfoBox.prototype.setPosition = function (latLng) {\n this.position = latLng;\n\n if (this.div) {\n this.draw();\n }\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n\n\n google.maps.event.trigger(this, 'position_changed');\n };\n\n InfoBox.prototype.setVisible = function (isVisible) {\n this.isHidden = !isVisible;\n\n if (this.div) {\n this.div.style.visibility = this.isHidden ? 'hidden' : 'visible';\n }\n };\n\n InfoBox.prototype.setZIndex = function (index) {\n this.zIndex = index;\n\n if (this.div) {\n this.div.style.zIndex = index + '';\n }\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n\n\n google.maps.event.trigger(this, 'zindex_changed');\n };\n\n InfoBox.prototype.getContent = function () {\n return this.content;\n };\n\n InfoBox.prototype.getPosition = function () {\n return this.position;\n };\n\n InfoBox.prototype.getZIndex = function () {\n return this.zIndex;\n };\n\n InfoBox.prototype.getVisible = function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var map = this.getMap();\n var isVisible;\n\n if (typeof map === 'undefined' || map === null) {\n isVisible = false;\n } else {\n isVisible = !this.isHidden;\n }\n\n return isVisible;\n };\n\n InfoBox.prototype.show = function () {\n this.isHidden = false;\n\n if (this.div) {\n this.div.style.visibility = 'visible';\n }\n };\n\n InfoBox.prototype.hide = function () {\n this.isHidden = true;\n\n if (this.div) {\n this.div.style.visibility = 'hidden';\n }\n };\n\n InfoBox.prototype.open = function (map, anchor) {\n var _this = this;\n\n if (anchor) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.position = anchor.getPosition();\n this.moveListener = google.maps.event.addListener(anchor, 'position_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n var position = anchor.getPosition();\n\n _this.setPosition(position);\n });\n this.mapListener = google.maps.event.addListener(anchor, 'map_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n _this.setMap(anchor.map);\n });\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.setMap(map);\n\n if (this.div) {\n this.panBox();\n }\n };\n\n InfoBox.prototype.close = function () {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n\n if (this.eventListeners) {\n for (var i = 0; i < this.eventListeners.length; i++) {\n google.maps.event.removeListener(this.eventListeners[i]);\n }\n\n this.eventListeners = null;\n }\n\n if (this.moveListener) {\n google.maps.event.removeListener(this.moveListener);\n this.moveListener = null;\n }\n\n if (this.mapListener) {\n google.maps.event.removeListener(this.mapListener);\n this.mapListener = null;\n }\n\n if (this.contextListener) {\n google.maps.event.removeListener(this.contextListener);\n this.contextListener = null;\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n this.setMap(null);\n };\n\n InfoBox.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n // eslint-disable-next-line guard-for-in\n for (var property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n if (!this.prototype.hasOwnProperty(property)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n }\n } // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n\n return this;\n }.apply(obj1, [obj2]);\n };\n\n return InfoBox;\n}();\n\nvar eventMap$d = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed'\n};\nvar updaterMap$d = {\n options: function options(instance, _options5) {\n instance.setOptions(_options5);\n },\n position: function position(instance, _position2) {\n if (_position2 instanceof google.maps.LatLng) {\n instance.setPosition(_position2);\n } else {\n instance.setPosition(new google.maps.LatLng(_position2.lat, _position2.lng));\n }\n },\n visible: function visible(instance, _visible2) {\n instance.setVisible(_visible2);\n },\n zIndex: function zIndex(instance, _zIndex2) {\n instance.setZIndex(_zIndex2);\n }\n};\n\nvar InfoBoxComponent = /*#__PURE__*/function (_React$PureComponent8) {\n _inherits(InfoBoxComponent, _React$PureComponent8);\n\n var _super9 = _createSuper(InfoBoxComponent);\n\n function InfoBoxComponent() {\n var _this15;\n\n _classCallCheck(this, InfoBoxComponent);\n\n _this15 = _super9.apply(this, arguments);\n _this15.registeredEvents = [];\n _this15.containerElement = null;\n _this15.state = {\n infoBox: null\n };\n\n _this15.open = function (infoBox, anchor) {\n if (anchor) {\n infoBox.open(_this15.context, anchor);\n } else if (infoBox.getPosition()) {\n infoBox.open(_this15.context);\n } else {\n invariant_1(false, 'You must provide either an anchor or a position prop for .');\n }\n };\n\n _this15.setInfoBoxCallback = function () {\n var _this15$props = _this15.props,\n anchor = _this15$props.anchor,\n onLoad = _this15$props.onLoad;\n var infoBox = _this15.state.infoBox;\n\n if (infoBox !== null && _this15.containerElement !== null) {\n infoBox.setContent(_this15.containerElement);\n\n _this15.open(infoBox, anchor);\n\n if (onLoad) {\n onLoad(infoBox);\n }\n }\n };\n\n return _this15;\n }\n\n _createClass(InfoBoxComponent, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var options = this.props.options;\n\n var _a = options || {},\n position = _a.position,\n infoBoxOptions = __rest$1(_a, [\"position\"]);\n\n var positionLatLng;\n\n if (position && !(position instanceof google.maps.LatLng)) {\n positionLatLng = new google.maps.LatLng(position.lat, position.lng);\n }\n\n var infoBox = new InfoBox(Object.assign(Object.assign({}, infoBoxOptions), positionLatLng ? {\n position: positionLatLng\n } : {}));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: {},\n nextProps: this.props,\n instance: infoBox\n });\n this.setState({\n infoBox: infoBox\n }, this.setInfoBoxCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var infoBox = this.state.infoBox;\n\n if (infoBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: prevProps,\n nextProps: this.props,\n instance: infoBox\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var onUnmount = this.props.onUnmount;\n var infoBox = this.state.infoBox;\n\n if (infoBox !== null) {\n if (onUnmount) {\n onUnmount(infoBox);\n }\n\n unregisterEvents(this.registeredEvents);\n infoBox.close();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.containerElement) {\n return null;\n }\n\n return ReactDOM.createPortal(React.Children.only(this.props.children), this.containerElement);\n }\n }]);\n\n return InfoBoxComponent;\n}(React.PureComponent);\n\nInfoBoxComponent.contextType = MapContext;\n/**\n * @module helpers\n */\n\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\n\nvar earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\n\nvar factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\n\nfunction feature(geom, properties, options) {\n if (options === void 0) {\n options = {};\n }\n\n var feat = {\n type: \"Feature\"\n };\n\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\n\n\nfunction point(coordinates, properties, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n\n var geom = {\n type: \"Point\",\n coordinates: coordinates\n };\n return feature(geom, properties, options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\n\n\nfunction featureCollection(features, options) {\n if (options === void 0) {\n options = {};\n }\n\n var fc = {\n type: \"FeatureCollection\"\n };\n\n if (options.id) {\n fc.id = options.id;\n }\n\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n\n fc.features = features;\n return fc;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\n\n\nfunction radiansToLength(radians, units) {\n if (units === void 0) {\n units = \"kilometers\";\n }\n\n var factor = factors[units];\n\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\n\n\nfunction lengthToRadians(distance, units) {\n if (units === void 0) {\n units = \"kilometers\";\n }\n\n var factor = factors[units];\n\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n\n return distance / factor;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\n\n\nfunction degreesToRadians(degrees) {\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\n\n\nfunction convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) {\n originalUnit = \"kilometers\";\n }\n\n if (finalUnit === void 0) {\n finalUnit = \"kilometers\";\n }\n\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\n\n\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.\n *\n * @name clone\n * @param {GeoJSON} geojson GeoJSON Object\n * @returns {GeoJSON} cloned GeoJSON Object\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n *\n * var lineCloned = turf.clone(line);\n */\n\n\nfunction clone(geojson) {\n if (!geojson) {\n throw new Error(\"geojson is required\");\n }\n\n switch (geojson.type) {\n case \"Feature\":\n return cloneFeature(geojson);\n\n case \"FeatureCollection\":\n return cloneFeatureCollection(geojson);\n\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n case \"MultiPoint\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n case \"GeometryCollection\":\n return cloneGeometry(geojson);\n\n default:\n throw new Error(\"unknown GeoJSON type\");\n }\n}\n/**\n * Clone Feature\n *\n * @private\n * @param {Feature} geojson GeoJSON Feature\n * @returns {Feature} cloned Feature\n */\n\n\nfunction cloneFeature(geojson) {\n var cloned = {\n type: \"Feature\"\n }; // Preserve Foreign Members\n\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"properties\":\n case \"geometry\":\n return;\n\n default:\n cloned[key] = geojson[key];\n }\n }); // Add properties & geometry last\n\n cloned.properties = cloneProperties(geojson.properties);\n cloned.geometry = cloneGeometry(geojson.geometry);\n return cloned;\n}\n/**\n * Clone Properties\n *\n * @private\n * @param {Object} properties GeoJSON Properties\n * @returns {Object} cloned Properties\n */\n\n\nfunction cloneProperties(properties) {\n var cloned = {};\n\n if (!properties) {\n return cloned;\n }\n\n Object.keys(properties).forEach(function (key) {\n var value = properties[key];\n\n if (typeof value === \"object\") {\n if (value === null) {\n // handle null\n cloned[key] = null;\n } else if (Array.isArray(value)) {\n // handle Array\n cloned[key] = value.map(function (item) {\n return item;\n });\n } else {\n // handle generic Object\n cloned[key] = cloneProperties(value);\n }\n } else {\n cloned[key] = value;\n }\n });\n return cloned;\n}\n/**\n * Clone Feature Collection\n *\n * @private\n * @param {FeatureCollection} geojson GeoJSON Feature Collection\n * @returns {FeatureCollection} cloned Feature Collection\n */\n\n\nfunction cloneFeatureCollection(geojson) {\n var cloned = {\n type: \"FeatureCollection\"\n }; // Preserve Foreign Members\n\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"features\":\n return;\n\n default:\n cloned[key] = geojson[key];\n }\n }); // Add features\n\n cloned.features = geojson.features.map(function (feature) {\n return cloneFeature(feature);\n });\n return cloned;\n}\n/**\n * Clone Geometry\n *\n * @private\n * @param {Geometry} geometry GeoJSON Geometry\n * @returns {Geometry} cloned Geometry\n */\n\n\nfunction cloneGeometry(geometry) {\n var geom = {\n type: geometry.type\n };\n\n if (geometry.bbox) {\n geom.bbox = geometry.bbox;\n }\n\n if (geometry.type === \"GeometryCollection\") {\n geom.geometries = geometry.geometries.map(function (g) {\n return cloneGeometry(g);\n });\n return geom;\n }\n\n geom.coordinates = deepSlice(geometry.coordinates);\n return geom;\n}\n/**\n * Deep Slice coordinates\n *\n * @private\n * @param {Coordinates} coords Coordinates\n * @returns {Coordinates} all coordinates sliced\n */\n\n\nfunction deepSlice(coords) {\n var cloned = coords;\n\n if (typeof cloned[0] !== \"object\") {\n return cloned.slice();\n }\n\n return cloned.map(function (coord) {\n return deepSlice(coord);\n });\n}\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\n\n\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;\n isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === \"GeometryCollection\" : false;\n stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry\n\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n wrapShrink = excludeWrapCoord && (geomType === \"Polygon\" || geomType === \"MultiPolygon\") ? 1 : 0;\n\n switch (geomType) {\n case null:\n break;\n\n case \"Point\":\n if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n }\n\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n }\n\n geometryIndex++;\n }\n\n multiFeatureIndex++;\n }\n\n break;\n\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++) {\n if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;\n }\n\n break;\n\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\n\n\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\n\n\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\nvar distance$1 = {\n /**\n * Euclidean distance\n */\n eudist: function eudist(v1, v2, sqrt) {\n var len = v1.length;\n var sum = 0;\n\n for (var i = 0; i < len; i++) {\n var d = (v1[i] || 0) - (v2[i] || 0);\n sum += d * d;\n } // Square root not really needed\n\n\n return sqrt ? Math.sqrt(sum) : sum;\n },\n mandist: function mandist(v1, v2, sqrt) {\n var len = v1.length;\n var sum = 0;\n\n for (var i = 0; i < len; i++) {\n sum += Math.abs((v1[i] || 0) - (v2[i] || 0));\n } // Square root not really needed\n\n\n return sqrt ? Math.sqrt(sum) : sum;\n },\n\n /**\n * Unidimensional distance\n */\n dist: function dist(v1, v2, sqrt) {\n var d = Math.abs(v1 - v2);\n return sqrt ? d : d * d;\n }\n};\nvar Distance$1 = distance$1,\n eudist$1 = Distance$1.eudist,\n dist = Distance$1.dist;\nvar kinit = {\n kmrand: function kmrand(data, k) {\n var map = {},\n ks = [],\n t = k << 2;\n var len = data.length;\n var multi = data[0].length > 0;\n\n while (ks.length < k && t-- > 0) {\n var d = data[Math.floor(Math.random() * len)];\n var key = multi ? d.join(\"_\") : \"\" + d;\n\n if (!map[key]) {\n map[key] = true;\n ks.push(d);\n }\n }\n\n if (ks.length < k) throw new Error(\"Error initializating clusters\");else return ks;\n },\n\n /**\n * K-means++ initial centroid selection\n */\n kmpp: function kmpp(data, k) {\n var distance = data[0].length ? eudist$1 : dist;\n var ks = [],\n len = data.length;\n var multi = data[0].length > 0;\n var map = {}; // First random centroid\n\n var c = data[Math.floor(Math.random() * len)];\n var key = multi ? c.join(\"_\") : \"\" + c;\n ks.push(c);\n map[key] = true; // Retrieve next centroids\n\n while (ks.length < k) {\n // Min Distances between current centroids and data points\n var dists = [],\n lk = ks.length;\n var dsum = 0,\n prs = [];\n\n for (var i = 0; i < len; i++) {\n var min = Infinity;\n\n for (var j = 0; j < lk; j++) {\n var _dist = distance(data[i], ks[j]);\n\n if (_dist <= min) min = _dist;\n }\n\n dists[i] = min;\n } // Sum all min distances\n\n\n for (var _i = 0; _i < len; _i++) {\n dsum += dists[_i];\n } // Probabilities and cummulative prob (cumsum)\n\n\n for (var _i2 = 0; _i2 < len; _i2++) {\n prs[_i2] = {\n i: _i2,\n v: data[_i2],\n pr: dists[_i2] / dsum,\n cs: 0\n };\n } // Sort Probabilities\n\n\n prs.sort(function (a, b) {\n return a.pr - b.pr;\n }); // Cummulative Probabilities\n\n prs[0].cs = prs[0].pr;\n\n for (var _i3 = 1; _i3 < len; _i3++) {\n prs[_i3].cs = prs[_i3 - 1].cs + prs[_i3].pr;\n } // Randomize\n\n\n var rnd = Math.random(); // Gets only the items whose cumsum >= rnd\n\n var idx = 0;\n\n while (idx < len - 1 && prs[idx++].cs < rnd) {}\n\n ks.push(prs[idx - 1].v);\n /*\n let done = false;\n while(!done) {\n \t// this is our new centroid\n \tc = prs[idx-1].v\n \tkey = multi? c.join(\"_\") : `${c}`;\n \tif(!map[key]) {\n \t\tmap[key] = true;\n \t\tks.push(c);\n \t\tdone = true;\n \t}\n \telse {\n \t\tidx++;\n \t}\n }\n */\n }\n\n return ks;\n }\n};\n/*jshint esversion: 6 */\n\nvar Distance = distance$1,\n ClusterInit = kinit,\n eudist = Distance.eudist,\n kmrand = ClusterInit.kmrand,\n kmpp = ClusterInit.kmpp;\nvar MAX = 10000;\n/**\n * Inits an array with values\n */\n\nfunction init(len, val, v) {\n v = v || [];\n\n for (var i = 0; i < len; i++) {\n v[i] = val;\n }\n\n return v;\n}\n\nfunction skmeans(data, k, initial, maxit) {\n var ks = [],\n old = [],\n idxs = [],\n dist = [];\n var conv = false,\n it = maxit || MAX;\n var len = data.length,\n vlen = data[0].length,\n multi = vlen > 0;\n var count = [];\n\n if (!initial) {\n var _idxs = {};\n\n while (ks.length < k) {\n var idx = Math.floor(Math.random() * len);\n\n if (!_idxs[idx]) {\n _idxs[idx] = true;\n ks.push(data[idx]);\n }\n }\n } else if (initial == \"kmrand\") {\n ks = kmrand(data, k);\n } else if (initial == \"kmpp\") {\n ks = kmpp(data, k);\n } else {\n ks = initial;\n }\n\n do {\n // Reset k count\n init(k, 0, count); // For each value in data, find the nearest centroid\n\n for (var i = 0; i < len; i++) {\n var min = Infinity,\n _idx = 0;\n\n for (var j = 0; j < k; j++) {\n // Multidimensional or unidimensional\n var dist = multi ? eudist(data[i], ks[j]) : Math.abs(data[i] - ks[j]);\n\n if (dist <= min) {\n min = dist;\n _idx = j;\n }\n }\n\n idxs[i] = _idx; // Index of the selected centroid for that value\n\n count[_idx]++; // Number of values for this centroid\n } // Recalculate centroids\n\n\n var sum = [],\n old = [];\n\n for (var _j = 0; _j < k; _j++) {\n // Multidimensional or unidimensional\n sum[_j] = multi ? init(vlen, 0, sum[_j]) : 0;\n old[_j] = ks[_j];\n } // If multidimensional\n\n\n if (multi) {\n for (var _j2 = 0; _j2 < k; _j2++) {\n ks[_j2] = [];\n } // Sum values and count for each centroid\n\n\n for (var _i = 0; _i < len; _i++) {\n var _idx2 = idxs[_i],\n // Centroid for that item\n vsum = sum[_idx2],\n // Sum values for this centroid\n vect = data[_i]; // Current vector\n // Accumulate value on the centroid for current vector\n\n for (var h = 0; h < vlen; h++) {\n vsum[h] += vect[h];\n }\n } // Calculate the average for each centroid\n\n\n conv = true;\n\n for (var _j3 = 0; _j3 < k; _j3++) {\n var ksj = ks[_j3],\n // Current centroid\n sumj = sum[_j3],\n // Accumulated centroid values\n oldj = old[_j3],\n // Old centroid value\n cj = count[_j3]; // Number of elements for this centroid\n // New average\n\n for (var _h = 0; _h < vlen; _h++) {\n ksj[_h] = sumj[_h] / cj || 0; // New centroid\n } // Find if centroids have moved\n\n\n if (conv) {\n for (var _h2 = 0; _h2 < vlen; _h2++) {\n if (oldj[_h2] != ksj[_h2]) {\n conv = false;\n break;\n }\n }\n }\n }\n } // If unidimensional\n else {\n // Sum values and count for each centroid\n for (var _i2 = 0; _i2 < len; _i2++) {\n var _idx3 = idxs[_i2];\n sum[_idx3] += data[_i2];\n } // Calculate the average for each centroid\n\n\n for (var _j4 = 0; _j4 < k; _j4++) {\n ks[_j4] = sum[_j4] / count[_j4] || 0; // New centroid\n } // Find if centroids have moved\n\n\n conv = true;\n\n for (var _j5 = 0; _j5 < k; _j5++) {\n if (old[_j5] != ks[_j5]) {\n conv = false;\n break;\n }\n }\n }\n\n conv = conv || --it <= 0;\n } while (!conv);\n\n return {\n it: MAX - it,\n k: k,\n idxs: idxs,\n centroids: ks\n };\n}\n\nvar main = skmeans;\n/**\n * Takes a set of {@link Point|points} and partition them into clusters using the k-mean .\n * It uses the [k-means algorithm](https://en.wikipedia.org/wiki/K-means_clustering)\n *\n * @name clustersKmeans\n * @param {FeatureCollection} points to be clustered\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.numberOfClusters=Math.sqrt(numberOfPoints/2)] numberOfClusters that will be generated\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {FeatureCollection} Clustered Points with an additional two properties associated to each Feature:\n * - {number} cluster - the associated clusterId\n * - {[number, number]} centroid - Centroid of the cluster [Longitude, Latitude]\n * @example\n * // create random points with random z-values in their properties\n * var points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\n * var options = {numberOfClusters: 7};\n * var clustered = turf.clustersKmeans(points, options);\n *\n * //addToMap\n * var addToMap = [clustered];\n */\n\nfunction clustersKmeans(points, options) {\n if (options === void 0) {\n options = {};\n } // Default Params\n\n\n var count = points.features.length;\n options.numberOfClusters = options.numberOfClusters || Math.round(Math.sqrt(count / 2)); // numberOfClusters can't be greater than the number of points\n // fallbacks to count\n\n if (options.numberOfClusters > count) options.numberOfClusters = count; // Clone points to prevent any mutations (enabled by default)\n\n if (options.mutate !== true) points = clone(points); // collect points coordinates\n\n var data = coordAll(points); // create seed to avoid skmeans to drift\n\n var initialCentroids = data.slice(0, options.numberOfClusters); // create skmeans clusters\n\n var skmeansResult = main(data, options.numberOfClusters, initialCentroids); // store centroids {clusterId: [number, number]}\n\n var centroids = {};\n skmeansResult.centroids.forEach(function (coord, idx) {\n centroids[idx] = coord;\n }); // add associated cluster number\n\n featureEach(points, function (point, index) {\n var clusterId = skmeansResult.idxs[index];\n point.properties.cluster = clusterId;\n point.properties.centroid = centroids[clusterId];\n });\n return points;\n}\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\n\n\nfunction getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" && coord.geometry !== null && coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n\n if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) {\n return coord;\n }\n\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n} //http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord | Point} from origin point or coordinate\n * @param {Coord | Point} to destination point or coordinate\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\n\n\nfunction distance(from, to, options) {\n if (options === void 0) {\n options = {};\n }\n\n var coordinates1 = getCoord(from);\n var coordinates2 = getCoord(to);\n var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);\n var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) + Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\n\nvar lib = {\n exports: {}\n};\nvar DBSCAN = {\n exports: {}\n};\n/**\r\n * DBSCAN - Density based clustering\r\n *\r\n * @author Lukasz Krawczyk \r\n * @copyright MIT\r\n */\n\n(function (module) {\n /**\r\n * DBSCAN class construcotr\r\n * @constructor\r\n *\r\n * @param {Array} dataset\r\n * @param {number} epsilon\r\n * @param {number} minPts\r\n * @param {function} distanceFunction\r\n * @returns {DBSCAN}\r\n */\n function DBSCAN(dataset, epsilon, minPts, distanceFunction) {\n /** @type {Array} */\n this.dataset = [];\n /** @type {number} */\n\n this.epsilon = 1;\n /** @type {number} */\n\n this.minPts = 2;\n /** @type {function} */\n\n this.distance = this._euclideanDistance;\n /** @type {Array} */\n\n this.clusters = [];\n /** @type {Array} */\n\n this.noise = []; // temporary variables used during computation\n\n /** @type {Array} */\n\n this._visited = [];\n /** @type {Array} */\n\n this._assigned = [];\n /** @type {number} */\n\n this._datasetLength = 0;\n\n this._init(dataset, epsilon, minPts, distanceFunction);\n }\n /******************************************************************************/\n // public functions\n\n /**\r\n * Start clustering\r\n *\r\n * @param {Array} dataset\r\n * @param {number} epsilon\r\n * @param {number} minPts\r\n * @param {function} distanceFunction\r\n * @returns {undefined}\r\n * @access public\r\n */\n\n\n DBSCAN.prototype.run = function (dataset, epsilon, minPts, distanceFunction) {\n this._init(dataset, epsilon, minPts, distanceFunction);\n\n for (var pointId = 0; pointId < this._datasetLength; pointId++) {\n // if point is not visited, check if it forms a cluster\n if (this._visited[pointId] !== 1) {\n this._visited[pointId] = 1; // if closest neighborhood is too small to form a cluster, mark as noise\n\n var neighbors = this._regionQuery(pointId);\n\n if (neighbors.length < this.minPts) {\n this.noise.push(pointId);\n } else {\n // create new cluster and add point\n var clusterId = this.clusters.length;\n this.clusters.push([]);\n\n this._addToCluster(pointId, clusterId);\n\n this._expandCluster(clusterId, neighbors);\n }\n }\n }\n\n return this.clusters;\n };\n /******************************************************************************/\n // protected functions\n\n /**\r\n * Set object properties\r\n *\r\n * @param {Array} dataset\r\n * @param {number} epsilon\r\n * @param {number} minPts\r\n * @param {function} distance\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n DBSCAN.prototype._init = function (dataset, epsilon, minPts, distance) {\n if (dataset) {\n if (!(dataset instanceof Array)) {\n throw Error('Dataset must be of type array, ' + typeof dataset + ' given');\n }\n\n this.dataset = dataset;\n this.clusters = [];\n this.noise = [];\n this._datasetLength = dataset.length;\n this._visited = new Array(this._datasetLength);\n this._assigned = new Array(this._datasetLength);\n }\n\n if (epsilon) {\n this.epsilon = epsilon;\n }\n\n if (minPts) {\n this.minPts = minPts;\n }\n\n if (distance) {\n this.distance = distance;\n }\n };\n /**\r\n * Expand cluster to closest points of given neighborhood\r\n *\r\n * @param {number} clusterId\r\n * @param {Array} neighbors\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n DBSCAN.prototype._expandCluster = function (clusterId, neighbors) {\n /**\r\n * It's very important to calculate length of neighbors array each time,\r\n * as the number of elements changes over time\r\n */\n for (var i = 0; i < neighbors.length; i++) {\n var pointId2 = neighbors[i];\n\n if (this._visited[pointId2] !== 1) {\n this._visited[pointId2] = 1;\n\n var neighbors2 = this._regionQuery(pointId2);\n\n if (neighbors2.length >= this.minPts) {\n neighbors = this._mergeArrays(neighbors, neighbors2);\n }\n } // add to cluster\n\n\n if (this._assigned[pointId2] !== 1) {\n this._addToCluster(pointId2, clusterId);\n }\n }\n };\n /**\r\n * Add new point to cluster\r\n *\r\n * @param {number} pointId\r\n * @param {number} clusterId\r\n */\n\n\n DBSCAN.prototype._addToCluster = function (pointId, clusterId) {\n this.clusters[clusterId].push(pointId);\n this._assigned[pointId] = 1;\n };\n /**\r\n * Find all neighbors around given point\r\n *\r\n * @param {number} pointId,\r\n * @param {number} epsilon\r\n * @returns {Array}\r\n * @access protected\r\n */\n\n\n DBSCAN.prototype._regionQuery = function (pointId) {\n var neighbors = [];\n\n for (var id = 0; id < this._datasetLength; id++) {\n var dist = this.distance(this.dataset[pointId], this.dataset[id]);\n\n if (dist < this.epsilon) {\n neighbors.push(id);\n }\n }\n\n return neighbors;\n };\n /******************************************************************************/\n // helpers\n\n /**\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @returns {Array}\r\n * @access protected\r\n */\n\n\n DBSCAN.prototype._mergeArrays = function (a, b) {\n var len = b.length;\n\n for (var i = 0; i < len; i++) {\n var P = b[i];\n\n if (a.indexOf(P) < 0) {\n a.push(P);\n }\n }\n\n return a;\n };\n /**\r\n * Calculate euclidean distance in multidimensional space\r\n *\r\n * @param {Array} p\r\n * @param {Array} q\r\n * @returns {number}\r\n * @access protected\r\n */\n\n\n DBSCAN.prototype._euclideanDistance = function (p, q) {\n var sum = 0;\n var i = Math.min(p.length, q.length);\n\n while (i--) {\n sum += (p[i] - q[i]) * (p[i] - q[i]);\n }\n\n return Math.sqrt(sum);\n };\n\n if (module.exports) {\n module.exports = DBSCAN;\n }\n})(DBSCAN);\n\nvar KMEANS = {\n exports: {}\n};\n\n(function (module) {\n /**\r\n * KMEANS clustering\r\n *\r\n * @author Lukasz Krawczyk \r\n * @copyright MIT\r\n */\n\n /**\r\n * KMEANS class constructor\r\n * @constructor\r\n *\r\n * @param {Array} dataset\r\n * @param {number} k - number of clusters\r\n * @param {function} distance - distance function\r\n * @returns {KMEANS}\r\n */\n function KMEANS(dataset, k, distance) {\n this.k = 3; // number of clusters\n\n this.dataset = []; // set of feature vectors\n\n this.assignments = []; // set of associated clusters for each feature vector\n\n this.centroids = []; // vectors for our clusters\n\n this.init(dataset, k, distance);\n }\n /**\r\n * @returns {undefined}\r\n */\n\n\n KMEANS.prototype.init = function (dataset, k, distance) {\n this.assignments = [];\n this.centroids = [];\n\n if (typeof dataset !== 'undefined') {\n this.dataset = dataset;\n }\n\n if (typeof k !== 'undefined') {\n this.k = k;\n }\n\n if (typeof distance !== 'undefined') {\n this.distance = distance;\n }\n };\n /**\r\n * @returns {undefined}\r\n */\n\n\n KMEANS.prototype.run = function (dataset, k) {\n this.init(dataset, k);\n var len = this.dataset.length; // initialize centroids\n\n for (var i = 0; i < this.k; i++) {\n this.centroids[i] = this.randomCentroid();\n }\n\n var change = true;\n\n while (change) {\n // assign feature vectors to clusters\n change = this.assign(); // adjust location of centroids\n\n for (var centroidId = 0; centroidId < this.k; centroidId++) {\n var mean = new Array(maxDim);\n var count = 0; // init mean vector\n\n for (var dim = 0; dim < maxDim; dim++) {\n mean[dim] = 0;\n }\n\n for (var j = 0; j < len; j++) {\n var maxDim = this.dataset[j].length; // if current cluster id is assigned to point\n\n if (centroidId === this.assignments[j]) {\n for (var dim = 0; dim < maxDim; dim++) {\n mean[dim] += this.dataset[j][dim];\n }\n\n count++;\n }\n }\n\n if (count > 0) {\n // if cluster contain points, adjust centroid position\n for (var dim = 0; dim < maxDim; dim++) {\n mean[dim] /= count;\n }\n\n this.centroids[centroidId] = mean;\n } else {\n // if cluster is empty, generate new random centroid\n this.centroids[centroidId] = this.randomCentroid();\n change = true;\n }\n }\n }\n\n return this.getClusters();\n };\n /**\r\n * Generate random centroid\r\n *\r\n * @returns {Array}\r\n */\n\n\n KMEANS.prototype.randomCentroid = function () {\n var maxId = this.dataset.length - 1;\n var centroid;\n var id;\n\n do {\n id = Math.round(Math.random() * maxId);\n centroid = this.dataset[id];\n } while (this.centroids.indexOf(centroid) >= 0);\n\n return centroid;\n };\n /**\r\n * Assign points to clusters\r\n *\r\n * @returns {boolean}\r\n */\n\n\n KMEANS.prototype.assign = function () {\n var change = false;\n var len = this.dataset.length;\n var closestCentroid;\n\n for (var i = 0; i < len; i++) {\n closestCentroid = this.argmin(this.dataset[i], this.centroids, this.distance);\n\n if (closestCentroid != this.assignments[i]) {\n this.assignments[i] = closestCentroid;\n change = true;\n }\n }\n\n return change;\n };\n /**\r\n * Extract information about clusters\r\n *\r\n * @returns {undefined}\r\n */\n\n\n KMEANS.prototype.getClusters = function () {\n var clusters = new Array(this.k);\n var centroidId;\n\n for (var pointId = 0; pointId < this.assignments.length; pointId++) {\n centroidId = this.assignments[pointId]; // init empty cluster\n\n if (typeof clusters[centroidId] === 'undefined') {\n clusters[centroidId] = [];\n }\n\n clusters[centroidId].push(pointId);\n }\n\n return clusters;\n }; // utils\n\n /**\r\n * @params {Array} point\r\n * @params {Array.} set\r\n * @params {Function} f\r\n * @returns {number}\r\n */\n\n\n KMEANS.prototype.argmin = function (point, set, f) {\n var min = Number.MAX_VALUE;\n var arg = 0;\n var len = set.length;\n var d;\n\n for (var i = 0; i < len; i++) {\n d = f(point, set[i]);\n\n if (d < min) {\n min = d;\n arg = i;\n }\n }\n\n return arg;\n };\n /**\r\n * Euclidean distance\r\n *\r\n * @params {number} p\r\n * @params {number} q\r\n * @returns {number}\r\n */\n\n\n KMEANS.prototype.distance = function (p, q) {\n var sum = 0;\n var i = Math.min(p.length, q.length);\n\n while (i--) {\n var diff = p[i] - q[i];\n sum += diff * diff;\n }\n\n return Math.sqrt(sum);\n };\n\n if (module.exports) {\n module.exports = KMEANS;\n }\n})(KMEANS);\n\nvar OPTICS = {\n exports: {}\n};\nvar PriorityQueue = {\n exports: {}\n};\n/**\r\n * PriorityQueue\r\n * Elements in this queue are sorted according to their value\r\n *\r\n * @author Lukasz Krawczyk \r\n * @copyright MIT\r\n */\n\n(function (module) {\n /**\r\n * PriorityQueue class construcotr\r\n * @constructor\r\n *\r\n * @example\r\n * queue: [1,2,3,4]\r\n * priorities: [4,1,2,3]\r\n * > result = [1,4,2,3]\r\n *\r\n * @param {Array} elements\r\n * @param {Array} priorities\r\n * @param {string} sorting - asc / desc\r\n * @returns {PriorityQueue}\r\n */\n function PriorityQueue(elements, priorities, sorting) {\n /** @type {Array} */\n this._queue = [];\n /** @type {Array} */\n\n this._priorities = [];\n /** @type {string} */\n\n this._sorting = 'desc';\n\n this._init(elements, priorities, sorting);\n }\n /**\r\n * Insert element\r\n *\r\n * @param {Object} ele\r\n * @param {Object} priority\r\n * @returns {undefined}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.insert = function (ele, priority) {\n var indexToInsert = this._queue.length;\n var index = indexToInsert;\n\n while (index--) {\n var priority2 = this._priorities[index];\n\n if (this._sorting === 'desc') {\n if (priority > priority2) {\n indexToInsert = index;\n }\n } else {\n if (priority < priority2) {\n indexToInsert = index;\n }\n }\n }\n\n this._insertAt(ele, priority, indexToInsert);\n };\n /**\r\n * Remove element\r\n *\r\n * @param {Object} ele\r\n * @returns {undefined}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.remove = function (ele) {\n var index = this._queue.length;\n\n while (index--) {\n var ele2 = this._queue[index];\n\n if (ele === ele2) {\n this._queue.splice(index, 1);\n\n this._priorities.splice(index, 1);\n\n break;\n }\n }\n };\n /**\r\n * For each loop wrapper\r\n *\r\n * @param {function} func\r\n * @returs {undefined}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.forEach = function (func) {\n this._queue.forEach(func);\n };\n /**\r\n * @returns {Array}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.getElements = function () {\n return this._queue;\n };\n /**\r\n * @param {number} index\r\n * @returns {Object}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.getElementPriority = function (index) {\n return this._priorities[index];\n };\n /**\r\n * @returns {Array}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.getPriorities = function () {\n return this._priorities;\n };\n /**\r\n * @returns {Array}\r\n * @access public\r\n */\n\n\n PriorityQueue.prototype.getElementsWithPriorities = function () {\n var result = [];\n\n for (var i = 0, l = this._queue.length; i < l; i++) {\n result.push([this._queue[i], this._priorities[i]]);\n }\n\n return result;\n };\n /**\r\n * Set object properties\r\n *\r\n * @param {Array} elements\r\n * @param {Array} priorities\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n PriorityQueue.prototype._init = function (elements, priorities, sorting) {\n if (elements && priorities) {\n this._queue = [];\n this._priorities = [];\n\n if (elements.length !== priorities.length) {\n throw new Error('Arrays must have the same length');\n }\n\n for (var i = 0; i < elements.length; i++) {\n this.insert(elements[i], priorities[i]);\n }\n }\n\n if (sorting) {\n this._sorting = sorting;\n }\n };\n /**\r\n * Insert element at given position\r\n *\r\n * @param {Object} ele\r\n * @param {number} index\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n PriorityQueue.prototype._insertAt = function (ele, priority, index) {\n if (this._queue.length === index) {\n this._queue.push(ele);\n\n this._priorities.push(priority);\n } else {\n this._queue.splice(index, 0, ele);\n\n this._priorities.splice(index, 0, priority);\n }\n };\n\n if (module.exports) {\n module.exports = PriorityQueue;\n }\n})(PriorityQueue);\n\n(function (module) {\n /**\r\n * @requires ./PriorityQueue.js\r\n */\n if (module.exports) {\n var PriorityQueue$1 = PriorityQueue.exports;\n }\n /**\r\n * OPTICS - Ordering points to identify the clustering structure\r\n *\r\n * @author Lukasz Krawczyk \r\n * @copyright MIT\r\n */\n\n /**\r\n * OPTICS class constructor\r\n * @constructor\r\n *\r\n * @param {Array} dataset\r\n * @param {number} epsilon\r\n * @param {number} minPts\r\n * @param {function} distanceFunction\r\n * @returns {OPTICS}\r\n */\n\n\n function OPTICS(dataset, epsilon, minPts, distanceFunction) {\n /** @type {number} */\n this.epsilon = 1;\n /** @type {number} */\n\n this.minPts = 1;\n /** @type {function} */\n\n this.distance = this._euclideanDistance; // temporary variables used during computation\n\n /** @type {Array} */\n\n this._reachability = [];\n /** @type {Array} */\n\n this._processed = [];\n /** @type {number} */\n\n this._coreDistance = 0;\n /** @type {Array} */\n\n this._orderedList = [];\n\n this._init(dataset, epsilon, minPts, distanceFunction);\n }\n /******************************************************************************/\n // pulic functions\n\n /**\r\n * Start clustering\r\n *\r\n * @param {Array} dataset\r\n * @returns {undefined}\r\n * @access public\r\n */\n\n\n OPTICS.prototype.run = function (dataset, epsilon, minPts, distanceFunction) {\n this._init(dataset, epsilon, minPts, distanceFunction);\n\n for (var pointId = 0, l = this.dataset.length; pointId < l; pointId++) {\n if (this._processed[pointId] !== 1) {\n this._processed[pointId] = 1;\n this.clusters.push([pointId]);\n var clusterId = this.clusters.length - 1;\n\n this._orderedList.push(pointId);\n\n var priorityQueue = new PriorityQueue$1(null, null, 'asc');\n\n var neighbors = this._regionQuery(pointId); // using priority queue assign elements to new cluster\n\n\n if (this._distanceToCore(pointId) !== undefined) {\n this._updateQueue(pointId, neighbors, priorityQueue);\n\n this._expandCluster(clusterId, priorityQueue);\n }\n }\n }\n\n return this.clusters;\n };\n /**\r\n * Generate reachability plot for all points\r\n *\r\n * @returns {array}\r\n * @access public\r\n */\n\n\n OPTICS.prototype.getReachabilityPlot = function () {\n var reachabilityPlot = [];\n\n for (var i = 0, l = this._orderedList.length; i < l; i++) {\n var pointId = this._orderedList[i];\n var distance = this._reachability[pointId];\n reachabilityPlot.push([pointId, distance]);\n }\n\n return reachabilityPlot;\n };\n /******************************************************************************/\n // protected functions\n\n /**\r\n * Set object properties\r\n *\r\n * @param {Array} dataset\r\n * @param {number} epsilon\r\n * @param {number} minPts\r\n * @param {function} distance\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._init = function (dataset, epsilon, minPts, distance) {\n if (dataset) {\n if (!(dataset instanceof Array)) {\n throw Error('Dataset must be of type array, ' + typeof dataset + ' given');\n }\n\n this.dataset = dataset;\n this.clusters = [];\n this._reachability = new Array(this.dataset.length);\n this._processed = new Array(this.dataset.length);\n this._coreDistance = 0;\n this._orderedList = [];\n }\n\n if (epsilon) {\n this.epsilon = epsilon;\n }\n\n if (minPts) {\n this.minPts = minPts;\n }\n\n if (distance) {\n this.distance = distance;\n }\n };\n /**\r\n * Update information in queue\r\n *\r\n * @param {number} pointId\r\n * @param {Array} neighbors\r\n * @param {PriorityQueue} queue\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._updateQueue = function (pointId, neighbors, queue) {\n var self = this;\n this._coreDistance = this._distanceToCore(pointId);\n neighbors.forEach(function (pointId2) {\n if (self._processed[pointId2] === undefined) {\n var dist = self.distance(self.dataset[pointId], self.dataset[pointId2]);\n var newReachableDistance = Math.max(self._coreDistance, dist);\n\n if (self._reachability[pointId2] === undefined) {\n self._reachability[pointId2] = newReachableDistance;\n queue.insert(pointId2, newReachableDistance);\n } else {\n if (newReachableDistance < self._reachability[pointId2]) {\n self._reachability[pointId2] = newReachableDistance;\n queue.remove(pointId2);\n queue.insert(pointId2, newReachableDistance);\n }\n }\n }\n });\n };\n /**\r\n * Expand cluster\r\n *\r\n * @param {number} clusterId\r\n * @param {PriorityQueue} queue\r\n * @returns {undefined}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._expandCluster = function (clusterId, queue) {\n var queueElements = queue.getElements();\n\n for (var p = 0, l = queueElements.length; p < l; p++) {\n var pointId = queueElements[p];\n\n if (this._processed[pointId] === undefined) {\n var neighbors = this._regionQuery(pointId);\n\n this._processed[pointId] = 1;\n this.clusters[clusterId].push(pointId);\n\n this._orderedList.push(pointId);\n\n if (this._distanceToCore(pointId) !== undefined) {\n this._updateQueue(pointId, neighbors, queue);\n\n this._expandCluster(clusterId, queue);\n }\n }\n }\n };\n /**\r\n * Calculating distance to cluster core\r\n *\r\n * @param {number} pointId\r\n * @returns {number}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._distanceToCore = function (pointId) {\n var l = this.epsilon;\n\n for (var coreDistCand = 0; coreDistCand < l; coreDistCand++) {\n var neighbors = this._regionQuery(pointId, coreDistCand);\n\n if (neighbors.length >= this.minPts) {\n return coreDistCand;\n }\n }\n\n return;\n };\n /**\r\n * Find all neighbors around given point\r\n *\r\n * @param {number} pointId\r\n * @param {number} epsilon\r\n * @returns {Array}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._regionQuery = function (pointId, epsilon) {\n epsilon = epsilon || this.epsilon;\n var neighbors = [];\n\n for (var id = 0, l = this.dataset.length; id < l; id++) {\n if (this.distance(this.dataset[pointId], this.dataset[id]) < epsilon) {\n neighbors.push(id);\n }\n }\n\n return neighbors;\n };\n /******************************************************************************/\n // helpers\n\n /**\r\n * Calculate euclidean distance in multidimensional space\r\n *\r\n * @param {Array} p\r\n * @param {Array} q\r\n * @returns {number}\r\n * @access protected\r\n */\n\n\n OPTICS.prototype._euclideanDistance = function (p, q) {\n var sum = 0;\n var i = Math.min(p.length, q.length);\n\n while (i--) {\n sum += (p[i] - q[i]) * (p[i] - q[i]);\n }\n\n return Math.sqrt(sum);\n };\n\n if (module.exports) {\n module.exports = OPTICS;\n }\n})(OPTICS);\n\n(function (module) {\n if (module.exports) {\n module.exports = {\n DBSCAN: DBSCAN.exports,\n KMEANS: KMEANS.exports,\n OPTICS: OPTICS.exports,\n PriorityQueue: PriorityQueue.exports\n };\n }\n})(lib);\n\nvar clustering = lib.exports;\n/**\n * Takes a set of {@link Point|points} and partition them into clusters according to {@link DBSCAN's|https://en.wikipedia.org/wiki/DBSCAN} data clustering algorithm.\n *\n * @name clustersDbscan\n * @param {FeatureCollection} points to be clustered\n * @param {number} maxDistance Maximum Distance between any point of the cluster to generate the clusters (kilometers only)\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units=\"kilometers\"] in which `maxDistance` is expressed, can be degrees, radians, miles, or kilometers\n * @param {boolean} [options.mutate=false] Allows GeoJSON input to be mutated\n * @param {number} [options.minPoints=3] Minimum number of points to generate a single cluster,\n * points which do not meet this requirement will be classified as an 'edge' or 'noise'.\n * @returns {FeatureCollection} Clustered Points with an additional two properties associated to each Feature:\n * - {number} cluster - the associated clusterId\n * - {string} dbscan - type of point it has been classified as ('core'|'edge'|'noise')\n * @example\n * // create random points with random z-values in their properties\n * var points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\n * var maxDistance = 100;\n * var clustered = turf.clustersDbscan(points, maxDistance);\n *\n * //addToMap\n * var addToMap = [clustered];\n */\n\nfunction clustersDbscan(points, maxDistance, options) {\n // Input validation being handled by Typescript\n // collectionOf(points, 'Point', 'points must consist of a FeatureCollection of only Points');\n // if (maxDistance === null || maxDistance === undefined) throw new Error('maxDistance is required');\n // if (!(Math.sign(maxDistance) > 0)) throw new Error('maxDistance is invalid');\n // if (!(minPoints === undefined || minPoints === null || Math.sign(minPoints) > 0)) throw new Error('options.minPoints is invalid');\n if (options === void 0) {\n options = {};\n } // Clone points to prevent any mutations\n\n\n if (options.mutate !== true) points = clone(points); // Defaults\n\n options.minPoints = options.minPoints || 3; // create clustered ids\n\n var dbscan = new clustering.DBSCAN();\n var clusteredIds = dbscan.run(coordAll(points), convertLength(maxDistance, options.units), options.minPoints, distance); // Tag points to Clusters ID\n\n var clusterId = -1;\n clusteredIds.forEach(function (clusterIds) {\n clusterId++; // assign cluster ids to input points\n\n clusterIds.forEach(function (idx) {\n var clusterPoint = points.features[idx];\n if (!clusterPoint.properties) clusterPoint.properties = {};\n clusterPoint.properties.cluster = clusterId;\n clusterPoint.properties.dbscan = \"core\";\n });\n }); // handle noise points, if any\n // edges points are tagged by DBSCAN as both 'noise' and 'cluster' as they can \"reach\" less than 'minPoints' number of points\n\n dbscan.noise.forEach(function (noiseId) {\n var noisePoint = points.features[noiseId];\n if (!noisePoint.properties) noisePoint.properties = {};\n if (noisePoint.properties.cluster) noisePoint.properties.dbscan = \"edge\";else noisePoint.properties.dbscan = \"noise\";\n });\n return points;\n}\n\nvar supercluster = {\n exports: {}\n};\n\n(function (module, exports) {\n (function (global, factory) {\n module.exports = factory();\n })(commonjsGlobal, function () {\n function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) {\n return;\n }\n\n var m = left + right >> 1;\n select(ids, coords, m, left, right, depth % 2);\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n }\n\n function select(ids, coords, k, left, right, inc) {\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n swapItem(ids, coords, left, k);\n\n if (coords[2 * right + inc] > t) {\n swapItem(ids, coords, left, right);\n }\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n\n while (coords[2 * i + inc] < t) {\n i++;\n }\n\n while (coords[2 * j + inc] > t) {\n j--;\n }\n }\n\n if (coords[2 * left + inc] === t) {\n swapItem(ids, coords, left, j);\n } else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) {\n left = j + 1;\n }\n\n if (k <= j) {\n right = j - 1;\n }\n }\n }\n\n function swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n }\n\n function swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }\n\n function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) {\n result.push(ids[i]);\n }\n }\n\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) {\n result.push(ids[m]);\n }\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n }\n\n function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) {\n result.push(ids[i]);\n }\n }\n\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) {\n result.push(ids[m]);\n }\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n }\n\n function sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n }\n\n var defaultGetX = function defaultGetX(p) {\n return p[0];\n };\n\n var defaultGetY = function defaultGetY(p) {\n return p[1];\n };\n\n var KDBush = function KDBush(points, getX, getY, nodeSize, ArrayType) {\n if (getX === void 0) getX = defaultGetX;\n if (getY === void 0) getY = defaultGetY;\n if (nodeSize === void 0) nodeSize = 64;\n if (ArrayType === void 0) ArrayType = Float64Array;\n this.nodeSize = nodeSize;\n this.points = points;\n var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;\n var ids = this.ids = new IndexArrayType(points.length);\n var coords = this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n ids[i] = i;\n coords[2 * i] = getX(points[i]);\n coords[2 * i + 1] = getY(points[i]);\n }\n\n sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0);\n };\n\n KDBush.prototype.range = function range$1(minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n };\n\n KDBush.prototype.within = function within$1(x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n };\n\n var defaultOptions = {\n minZoom: 0,\n // min zoom to generate clusters on\n maxZoom: 16,\n // max zoom level to cluster the points on\n minPoints: 2,\n // minimum points to form a cluster\n radius: 40,\n // cluster radius in pixels\n extent: 512,\n // tile extent (radius is calculated relative to it)\n nodeSize: 64,\n // size of the KD-tree leaf node, affects performance\n log: false,\n // whether to log timing info\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n // a reduce function for calculating custom cluster properties\n reduce: null,\n // (accumulated, props) => { accumulated.sum += props.sum; }\n // properties to use for individual points when running the reducer\n map: function map(props) {\n return props;\n } // props => ({sum: props.my_value})\n\n };\n\n var fround = Math.fround || function (tmp) {\n return function (x) {\n tmp[0] = +x;\n return tmp[0];\n };\n }(new Float32Array(1));\n\n var Supercluster = function Supercluster(options) {\n this.options = extend(Object.create(defaultOptions), options);\n this.trees = new Array(this.options.maxZoom + 1);\n };\n\n Supercluster.prototype.load = function load(points) {\n var ref = this.options;\n var log = ref.log;\n var minZoom = ref.minZoom;\n var maxZoom = ref.maxZoom;\n var nodeSize = ref.nodeSize;\n\n if (log) {\n console.time('total time');\n }\n\n var timerId = \"prepare \" + points.length + \" points\";\n\n if (log) {\n console.time(timerId);\n }\n\n this.points = points; // generate a cluster object for each point and index input points into a KD-tree\n\n var clusters = [];\n\n for (var i = 0; i < points.length; i++) {\n if (!points[i].geometry) {\n continue;\n }\n\n clusters.push(createPointCluster(points[i], i));\n }\n\n this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n\n if (log) {\n console.timeEnd(timerId);\n } // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n\n\n for (var z = maxZoom; z >= minZoom; z--) {\n var now = +Date.now(); // create a new set of clusters for the zoom and index them with a KD-tree\n\n clusters = this._cluster(clusters, z);\n this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n\n if (log) {\n console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);\n }\n }\n\n if (log) {\n console.timeEnd('total time');\n }\n\n return this;\n };\n\n Supercluster.prototype.getClusters = function getClusters(bbox, zoom) {\n var minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n var minLat = Math.max(-90, Math.min(90, bbox[1]));\n var maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n var maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n var easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n var westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n var tree = this.trees[this._limitZoom(zoom)];\n\n var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n var clusters = [];\n\n for (var i = 0, list = ids; i < list.length; i += 1) {\n var id = list[i];\n var c = tree.points[id];\n clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n\n return clusters;\n };\n\n Supercluster.prototype.getChildren = function getChildren(clusterId) {\n var originId = this._getOriginId(clusterId);\n\n var originZoom = this._getOriginZoom(clusterId);\n\n var errorMsg = 'No cluster with the specified id.';\n var index = this.trees[originZoom];\n\n if (!index) {\n throw new Error(errorMsg);\n }\n\n var origin = index.points[originId];\n\n if (!origin) {\n throw new Error(errorMsg);\n }\n\n var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n var ids = index.within(origin.x, origin.y, r);\n var children = [];\n\n for (var i = 0, list = ids; i < list.length; i += 1) {\n var id = list[i];\n var c = index.points[id];\n\n if (c.parentId === clusterId) {\n children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n }\n\n if (children.length === 0) {\n throw new Error(errorMsg);\n }\n\n return children;\n };\n\n Supercluster.prototype.getLeaves = function getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n var leaves = [];\n\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n };\n\n Supercluster.prototype.getTile = function getTile(z, x, y) {\n var tree = this.trees[this._limitZoom(z)];\n\n var z2 = Math.pow(2, z);\n var ref = this.options;\n var extent = ref.extent;\n var radius = ref.radius;\n var p = radius / extent;\n var top = (y - p) / z2;\n var bottom = (y + 1 + p) / z2;\n var tile = {\n features: []\n };\n\n this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.points, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.points, z2, y, z2, tile);\n }\n\n if (x === z2 - 1) {\n this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.points, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n };\n\n Supercluster.prototype.getClusterExpansionZoom = function getClusterExpansionZoom(clusterId) {\n var expansionZoom = this._getOriginZoom(clusterId) - 1;\n\n while (expansionZoom <= this.options.maxZoom) {\n var children = this.getChildren(clusterId);\n expansionZoom++;\n\n if (children.length !== 1) {\n break;\n }\n\n clusterId = children[0].properties.cluster_id;\n }\n\n return expansionZoom;\n };\n\n Supercluster.prototype._appendLeaves = function _appendLeaves(result, clusterId, limit, offset, skipped) {\n var children = this.getChildren(clusterId);\n\n for (var i = 0, list = children; i < list.length; i += 1) {\n var child = list[i];\n var props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped); // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n\n if (result.length === limit) {\n break;\n }\n }\n\n return skipped;\n };\n\n Supercluster.prototype._addTileFeatures = function _addTileFeatures(ids, points, x, y, z2, tile) {\n for (var i$1 = 0, list = ids; i$1 < list.length; i$1 += 1) {\n var i = list[i$1];\n var c = points[i];\n var isCluster = c.numPoints;\n var tags = void 0,\n px = void 0,\n py = void 0;\n\n if (isCluster) {\n tags = getClusterProperties(c);\n px = c.x;\n py = c.y;\n } else {\n var p = this.points[c.index];\n tags = p.properties;\n px = lngX(p.geometry.coordinates[0]);\n py = latY(p.geometry.coordinates[1]);\n }\n\n var f = {\n type: 1,\n geometry: [[Math.round(this.options.extent * (px * z2 - x)), Math.round(this.options.extent * (py * z2 - y))]],\n tags: tags\n }; // assign id\n\n var id = void 0;\n\n if (isCluster) {\n id = c.id;\n } else if (this.options.generateId) {\n // optionally generate id\n id = c.index;\n } else if (this.points[c.index].id) {\n // keep id if already assigned\n id = this.points[c.index].id;\n }\n\n if (id !== undefined) {\n f.id = id;\n }\n\n tile.features.push(f);\n }\n };\n\n Supercluster.prototype._limitZoom = function _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(+z, this.options.maxZoom + 1));\n };\n\n Supercluster.prototype._cluster = function _cluster(points, zoom) {\n var clusters = [];\n var ref = this.options;\n var radius = ref.radius;\n var extent = ref.extent;\n var reduce = ref.reduce;\n var minPoints = ref.minPoints;\n var r = radius / (extent * Math.pow(2, zoom)); // loop through each point\n\n for (var i = 0; i < points.length; i++) {\n var p = points[i]; // if we've already visited the point at this zoom level, skip it\n\n if (p.zoom <= zoom) {\n continue;\n }\n\n p.zoom = zoom; // find all nearby points\n\n var tree = this.trees[zoom + 1];\n var neighborIds = tree.within(p.x, p.y, r);\n var numPointsOrigin = p.numPoints || 1;\n var numPoints = numPointsOrigin; // count the number of points in a potential cluster\n\n for (var i$1 = 0, list = neighborIds; i$1 < list.length; i$1 += 1) {\n var neighborId = list[i$1];\n var b = tree.points[neighborId]; // filter out neighbors that are already processed\n\n if (b.zoom > zoom) {\n numPoints += b.numPoints || 1;\n }\n } // if there were neighbors to merge, and there are enough points to form a cluster\n\n\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n var wx = p.x * numPointsOrigin;\n var wy = p.y * numPointsOrigin;\n var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null; // encode both zoom and point index on which the cluster originated -- offset by total length of features\n\n var id = (i << 5) + (zoom + 1) + this.points.length;\n\n for (var i$2 = 0, list$1 = neighborIds; i$2 < list$1.length; i$2 += 1) {\n var neighborId$1 = list$1[i$2];\n var b$1 = tree.points[neighborId$1];\n\n if (b$1.zoom <= zoom) {\n continue;\n }\n\n b$1.zoom = zoom; // save the zoom (so it doesn't get processed twice)\n\n var numPoints2 = b$1.numPoints || 1;\n wx += b$1.x * numPoints2; // accumulate coordinates for calculating weighted center\n\n wy += b$1.y * numPoints2;\n b$1.parentId = id;\n\n if (reduce) {\n if (!clusterProperties) {\n clusterProperties = this._map(p, true);\n }\n\n reduce(clusterProperties, this._map(b$1));\n }\n }\n\n p.parentId = id;\n clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties));\n } else {\n // left points as unclustered\n clusters.push(p);\n\n if (numPoints > 1) {\n for (var i$3 = 0, list$2 = neighborIds; i$3 < list$2.length; i$3 += 1) {\n var neighborId$2 = list$2[i$3];\n var b$2 = tree.points[neighborId$2];\n\n if (b$2.zoom <= zoom) {\n continue;\n }\n\n b$2.zoom = zoom;\n clusters.push(b$2);\n }\n }\n }\n }\n\n return clusters;\n }; // get index of the point from which the cluster originated\n\n\n Supercluster.prototype._getOriginId = function _getOriginId(clusterId) {\n return clusterId - this.points.length >> 5;\n }; // get zoom of the point from which the cluster originated\n\n\n Supercluster.prototype._getOriginZoom = function _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n };\n\n Supercluster.prototype._map = function _map(point, clone) {\n if (point.numPoints) {\n return clone ? extend({}, point.properties) : point.properties;\n }\n\n var original = this.points[point.index].properties;\n var result = this.options.map(original);\n return clone && result === original ? extend({}, result) : result;\n };\n\n function createCluster(x, y, id, numPoints, properties) {\n return {\n x: fround(x),\n // weighted cluster center; round for consistency with Float32Array index\n y: fround(y),\n zoom: Infinity,\n // the last zoom the cluster was processed at\n id: id,\n // encodes index of the first child of the cluster and its zoom level\n parentId: -1,\n // parent cluster id\n numPoints: numPoints,\n properties: properties\n };\n }\n\n function createPointCluster(p, id) {\n var ref = p.geometry.coordinates;\n var x = ref[0];\n var y = ref[1];\n return {\n x: fround(lngX(x)),\n // projected point coordinates\n y: fround(latY(y)),\n zoom: Infinity,\n // the last zoom the point was processed at\n index: id,\n // index of the source feature in the original input array,\n parentId: -1 // parent cluster id\n\n };\n }\n\n function getClusterJSON(cluster) {\n return {\n type: 'Feature',\n id: cluster.id,\n properties: getClusterProperties(cluster),\n geometry: {\n type: 'Point',\n coordinates: [xLng(cluster.x), yLat(cluster.y)]\n }\n };\n }\n\n function getClusterProperties(cluster) {\n var count = cluster.numPoints;\n var abbrev = count >= 10000 ? Math.round(count / 1000) + \"k\" : count >= 1000 ? Math.round(count / 100) / 10 + \"k\" : count;\n return extend(extend({}, cluster.properties), {\n cluster: true,\n cluster_id: cluster.id,\n point_count: count,\n point_count_abbreviated: abbrev\n });\n } // longitude/latitude to spherical mercator in [0..1] range\n\n\n function lngX(lng) {\n return lng / 360 + 0.5;\n }\n\n function latY(lat) {\n var sin = Math.sin(lat * Math.PI / 180);\n var y = 0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI;\n return y < 0 ? 0 : y > 1 ? 1 : y;\n } // spherical mercator to longitude/latitude\n\n\n function xLng(x) {\n return (x - 0.5) * 360;\n }\n\n function yLat(y) {\n var y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n }\n\n function extend(dest, src) {\n for (var id in src) {\n dest[id] = src[id];\n }\n\n return dest;\n }\n\n function getX(p) {\n return p.x;\n }\n\n function getY(p) {\n return p.y;\n }\n\n return Supercluster;\n });\n})(supercluster);\n\nvar SuperCluster = supercluster.exports;\n\nvar es6 = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n\n var _iterator = _createForOfIteratorHelper(a.entries()),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n i = _step.value;\n if (!b.has(i[0])) return false;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var _iterator2 = _createForOfIteratorHelper(a.entries()),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n i = _step2.value;\n if (!equal(i[1], b.get(i[0]))) return false;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return true;\n }\n\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n\n var _iterator3 = _createForOfIteratorHelper(a.entries()),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n i = _step3.value;\n if (!b.has(i[0])) return false;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return true;\n }\n\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (a[i] !== b[i]) return false;\n }\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n }\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n } // true if both NaN, false otherwise\n\n\n return a !== a && b !== b;\n};\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n\nfunction __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar Cluster = /*#__PURE__*/function () {\n function Cluster(_ref7) {\n var markers = _ref7.markers,\n position = _ref7.position;\n\n _classCallCheck(this, Cluster);\n\n this.markers = markers;\n\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n } else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n\n _createClass(Cluster, [{\n key: \"bounds\",\n get: function get() {\n if (this.markers.length === 0 && !this._position) {\n return undefined;\n }\n\n return this.markers.reduce(function (bounds, marker) {\n return bounds.extend(marker.getPosition());\n }, new google.maps.LatLngBounds(this._position, this._position));\n }\n }, {\n key: \"position\",\n get: function get() {\n return this._position || this.bounds.getCenter();\n }\n /**\r\n * Get the count of **visible** markers.\r\n */\n\n }, {\n key: \"count\",\n get: function get() {\n return this.markers.filter(function (m) {\n return m.getVisible();\n }).length;\n }\n /**\r\n * Add a marker to the cluster.\r\n */\n\n }, {\n key: \"push\",\n value: function push(marker) {\n this.markers.push(marker);\n }\n /**\r\n * Cleanup references and remove marker from map.\r\n */\n\n }, {\n key: \"delete\",\n value: function _delete() {\n if (this.marker) {\n this.marker.setMap(null);\n delete this.marker;\n }\n\n this.markers.length = 0;\n }\n }]);\n\n return Cluster;\n}();\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar filterMarkersToPaddedViewport = function filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, viewportPadding) {\n var extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPadding);\n return markers.filter(function (marker) {\n return extendedMapBounds.contains(marker.getPosition());\n });\n};\n/**\r\n * Extends a bounds by a number of pixels in each direction.\r\n */\n\n\nvar extendBoundsToPaddedViewport = function extendBoundsToPaddedViewport(bounds, projection, pixels) {\n var _latLngBoundsToPixelB = latLngBoundsToPixelBounds(bounds, projection),\n northEast = _latLngBoundsToPixelB.northEast,\n southWest = _latLngBoundsToPixelB.southWest;\n\n var extendedPixelBounds = extendPixelBounds({\n northEast: northEast,\n southWest: southWest\n }, pixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\r\n * @hidden\r\n */\n\n\nvar distanceBetweenPoints = function distanceBetweenPoints(p1, p2) {\n var R = 6371; // Radius of the Earth in km\n\n var dLat = (p2.lat - p1.lat) * Math.PI / 180;\n var dLon = (p2.lng - p1.lng) * Math.PI / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat * Math.PI / 180) * Math.cos(p2.lat * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\r\n * @hidden\r\n */\n\n\nvar latLngBoundsToPixelBounds = function latLngBoundsToPixelBounds(bounds, projection) {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest())\n };\n};\n/**\r\n * @hidden\r\n */\n\n\nvar extendPixelBounds = function extendPixelBounds(_ref8, pixels) {\n var northEast = _ref8.northEast,\n southWest = _ref8.southWest;\n northEast.x += pixels;\n northEast.y -= pixels;\n southWest.x -= pixels;\n southWest.y += pixels;\n return {\n northEast: northEast,\n southWest: southWest\n };\n};\n/**\r\n * @hidden\r\n */\n\n\nvar pixelBoundsToLatLngBounds = function pixelBoundsToLatLngBounds(_ref9, projection) {\n var northEast = _ref9.northEast,\n southWest = _ref9.southWest;\n var bounds = new google.maps.LatLngBounds();\n bounds.extend(projection.fromDivPixelToLatLng(northEast));\n bounds.extend(projection.fromDivPixelToLatLng(southWest));\n return bounds;\n};\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @hidden\r\n */\n\n\nvar AbstractAlgorithm = /*#__PURE__*/function () {\n function AbstractAlgorithm(_ref10) {\n var _ref10$maxZoom = _ref10.maxZoom,\n maxZoom = _ref10$maxZoom === void 0 ? 16 : _ref10$maxZoom;\n\n _classCallCheck(this, AbstractAlgorithm);\n\n this.maxZoom = maxZoom;\n }\n /**\r\n * Helper function to bypass clustering based upon some map state such as\r\n * zoom, number of markers, etc.\r\n *\r\n * ```typescript\r\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\r\n * if (shouldBypassClustering(map)) {\r\n * return this.noop({markers, map})\r\n * }\r\n * }\r\n * ```\r\n */\n\n\n _createClass(AbstractAlgorithm, [{\n key: \"noop\",\n value: function noop(_ref11) {\n var markers = _ref11.markers;\n return noop$1(markers);\n }\n }]);\n\n return AbstractAlgorithm;\n}();\n/**\r\n * Abstract viewport algorithm proves a class to filter markers by a padded\r\n * viewport. This is a common optimization.\r\n *\r\n * @hidden\r\n */\n\n\nvar AbstractViewportAlgorithm = /*#__PURE__*/function (_AbstractAlgorithm) {\n _inherits(AbstractViewportAlgorithm, _AbstractAlgorithm);\n\n var _super10 = _createSuper(AbstractViewportAlgorithm);\n\n function AbstractViewportAlgorithm(_a) {\n var _this16;\n\n _classCallCheck(this, AbstractViewportAlgorithm);\n\n var _a$viewportPadding = _a.viewportPadding,\n viewportPadding = _a$viewportPadding === void 0 ? 60 : _a$viewportPadding,\n options = __rest(_a, [\"viewportPadding\"]);\n\n _this16 = _super10.call(this, options);\n _this16.viewportPadding = 60;\n _this16.viewportPadding = viewportPadding;\n return _this16;\n }\n\n _createClass(AbstractViewportAlgorithm, [{\n key: \"calculate\",\n value: function calculate(_ref12) {\n var markers = _ref12.markers,\n map = _ref12.map,\n mapCanvasProjection = _ref12.mapCanvasProjection;\n\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers: markers,\n map: map,\n mapCanvasProjection: mapCanvasProjection\n }),\n changed: false\n };\n }\n\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map: map,\n mapCanvasProjection: mapCanvasProjection\n })\n };\n }\n }]);\n\n return AbstractViewportAlgorithm;\n}(AbstractAlgorithm);\n/**\r\n * @hidden\r\n */\n\n\nvar noop$1 = function noop$1(markers) {\n var clusters = markers.map(function (marker) {\n return new Cluster({\n position: marker.getPosition(),\n markers: [marker]\n });\n });\n return clusters;\n};\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * The default Grid algorithm historically used in Google Maps marker\r\n * clustering.\r\n *\r\n * The Grid algorithm does not implement caching and markers may flash as the\r\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\r\n */\n\n\nvar GridAlgorithm = /*#__PURE__*/function (_AbstractViewportAlgo) {\n _inherits(GridAlgorithm, _AbstractViewportAlgo);\n\n var _super11 = _createSuper(GridAlgorithm);\n\n function GridAlgorithm(_a) {\n var _this17;\n\n _classCallCheck(this, GridAlgorithm);\n\n var _a$maxDistance = _a.maxDistance,\n maxDistance = _a$maxDistance === void 0 ? 40000 : _a$maxDistance,\n _a$gridSize = _a.gridSize,\n gridSize = _a$gridSize === void 0 ? 40 : _a$gridSize,\n options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n\n _this17 = _super11.call(this, options);\n _this17.clusters = [];\n _this17.maxDistance = maxDistance;\n _this17.gridSize = gridSize;\n return _this17;\n }\n\n _createClass(GridAlgorithm, [{\n key: \"cluster\",\n value: function cluster(_ref13) {\n var _this18 = this;\n\n var markers = _ref13.markers,\n map = _ref13.map,\n mapCanvasProjection = _ref13.mapCanvasProjection;\n this.clusters = [];\n markers.forEach(function (marker) {\n _this18.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n }, {\n key: \"addToClosestCluster\",\n value: function addToClosestCluster(marker, map, projection) {\n var maxDistance = this.maxDistance; // Some large number\n\n var cluster = null;\n\n for (var i = 0; i < this.clusters.length; i++) {\n var candidate = this.clusters[i];\n\n var _distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), marker.getPosition().toJSON());\n\n if (_distance < maxDistance) {\n maxDistance = _distance;\n cluster = candidate;\n }\n }\n\n if (cluster && extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(marker.getPosition())) {\n cluster.push(marker);\n } else {\n var _cluster2 = new Cluster({\n markers: [marker]\n });\n\n this.clusters.push(_cluster2);\n }\n }\n }]);\n\n return GridAlgorithm;\n}(AbstractViewportAlgorithm);\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\r\n */\n\n\nvar NoopAlgorithm = /*#__PURE__*/function (_AbstractAlgorithm2) {\n _inherits(NoopAlgorithm, _AbstractAlgorithm2);\n\n var _super12 = _createSuper(NoopAlgorithm);\n\n function NoopAlgorithm(_a) {\n _classCallCheck(this, NoopAlgorithm);\n\n var options = __rest(_a, []);\n\n return _super12.call(this, options);\n }\n\n _createClass(NoopAlgorithm, [{\n key: \"calculate\",\n value: function calculate(_ref14) {\n var markers = _ref14.markers,\n map = _ref14.map,\n mapCanvasProjection = _ref14.mapCanvasProjection;\n return {\n clusters: this.cluster({\n markers: markers,\n map: map,\n mapCanvasProjection: mapCanvasProjection\n }),\n changed: false\n };\n }\n }, {\n key: \"cluster\",\n value: function cluster(input) {\n return this.noop(input);\n }\n }]);\n\n return NoopAlgorithm;\n}(AbstractAlgorithm);\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Experimental algorithm using Kmeans.\r\n *\r\n * The Grid algorithm does not implement caching and markers may flash as the\r\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\r\n *\r\n * @see https://www.npmjs.com/package/@turf/clusters-kmeans\r\n */\n\n\nvar KmeansAlgorithm = /*#__PURE__*/function (_AbstractViewportAlgo2) {\n _inherits(KmeansAlgorithm, _AbstractViewportAlgo2);\n\n var _super13 = _createSuper(KmeansAlgorithm);\n\n function KmeansAlgorithm(_a) {\n var _this19;\n\n _classCallCheck(this, KmeansAlgorithm);\n\n var numberOfClusters = _a.numberOfClusters,\n options = __rest(_a, [\"numberOfClusters\"]);\n\n _this19 = _super13.call(this, options);\n _this19.numberOfClusters = numberOfClusters;\n return _this19;\n }\n\n _createClass(KmeansAlgorithm, [{\n key: \"cluster\",\n value: function cluster(_ref15) {\n var markers = _ref15.markers,\n map = _ref15.map;\n var clusters = [];\n\n if (markers.length === 0) {\n return clusters;\n }\n\n var points = featureCollection(markers.map(function (marker) {\n return point([marker.getPosition().lng(), marker.getPosition().lat()]);\n }));\n var numberOfClusters;\n\n if (this.numberOfClusters instanceof Function) {\n numberOfClusters = this.numberOfClusters(markers.length, map.getZoom());\n } else {\n numberOfClusters = this.numberOfClusters;\n }\n\n clustersKmeans(points, {\n numberOfClusters: numberOfClusters\n }).features.forEach(function (point, i) {\n if (!clusters[point.properties.cluster]) {\n clusters[point.properties.cluster] = new Cluster({\n position: {\n lng: point.properties.centroid[0],\n lat: point.properties.centroid[1]\n },\n markers: []\n });\n }\n\n clusters[point.properties.cluster].push(markers[i]);\n });\n return clusters;\n }\n }]);\n\n return KmeansAlgorithm;\n}(AbstractViewportAlgorithm);\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar DEFAULT_INTERNAL_DBSCAN_OPTION = {\n units: \"kilometers\",\n mutate: false,\n minPoints: 1\n};\n/**\r\n *\r\n * **This algorithm is not yet ready for use!**\r\n *\r\n * Experimental algorithm using DBScan.\r\n *\r\n * The Grid algorithm does not implement caching and markers may flash as the\r\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\r\n *\r\n * @see https://www.npmjs.com/package/@turf/clusters-dbscan\r\n */\n\nvar DBScanAlgorithm = /*#__PURE__*/function (_AbstractViewportAlgo3) {\n _inherits(DBScanAlgorithm, _AbstractViewportAlgo3);\n\n var _super14 = _createSuper(DBScanAlgorithm);\n\n function DBScanAlgorithm(_a) {\n var _this20;\n\n _classCallCheck(this, DBScanAlgorithm);\n\n var _a$maxDistance2 = _a.maxDistance,\n maxDistance = _a$maxDistance2 === void 0 ? 200 : _a$maxDistance2,\n _a$minPoints = _a.minPoints,\n minPoints = _a$minPoints === void 0 ? DEFAULT_INTERNAL_DBSCAN_OPTION.minPoints : _a$minPoints,\n options = __rest(_a, [\"maxDistance\", \"minPoints\"]);\n\n _this20 = _super14.call(this, options);\n _this20.maxDistance = maxDistance;\n _this20.options = Object.assign(Object.assign({}, DEFAULT_INTERNAL_DBSCAN_OPTION), {\n minPoints: minPoints\n });\n return _this20;\n }\n\n _createClass(DBScanAlgorithm, [{\n key: \"cluster\",\n value: function cluster(_ref16) {\n var markers = _ref16.markers,\n mapCanvasProjection = _ref16.mapCanvasProjection;\n var points = featureCollection(markers.map(function (marker) {\n var projectedPoint = mapCanvasProjection.fromLatLngToContainerPixel(marker.getPosition());\n return point([projectedPoint.x, projectedPoint.y]);\n }));\n var grouped = [];\n clustersDbscan(points, this.maxDistance, this.options).features.forEach(function (point, i) {\n if (!grouped[point.properties.cluster]) {\n grouped[point.properties.cluster] = [];\n }\n\n grouped[point.properties.cluster].push(markers[i]);\n });\n return grouped.map(function (markers) {\n return new Cluster({\n markers: markers\n });\n });\n }\n }]);\n\n return DBScanAlgorithm;\n}(AbstractViewportAlgorithm);\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\r\n *\r\n * @see https://www.npmjs.com/package/supercluster for more information on options.\r\n */\n\n\nvar SuperClusterAlgorithm = /*#__PURE__*/function (_AbstractAlgorithm3) {\n _inherits(SuperClusterAlgorithm, _AbstractAlgorithm3);\n\n var _super15 = _createSuper(SuperClusterAlgorithm);\n\n function SuperClusterAlgorithm(_a) {\n var _this21;\n\n _classCallCheck(this, SuperClusterAlgorithm);\n\n var maxZoom = _a.maxZoom,\n _a$radius = _a.radius,\n radius = _a$radius === void 0 ? 60 : _a$radius,\n options = __rest(_a, [\"maxZoom\", \"radius\"]);\n\n _this21 = _super15.call(this, {\n maxZoom: maxZoom\n });\n _this21.superCluster = new SuperCluster(Object.assign({\n maxZoom: _this21.maxZoom,\n radius: radius\n }, options));\n _this21.state = {\n zoom: null\n };\n return _this21;\n }\n\n _createClass(SuperClusterAlgorithm, [{\n key: \"calculate\",\n value: function calculate(input) {\n var changed = false;\n\n if (!es6(input.markers, this.markers)) {\n changed = true; // TODO use proxy to avoid copy?\n\n this.markers = _toConsumableArray(input.markers);\n var points = this.markers.map(function (marker) {\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: [marker.getPosition().lng(), marker.getPosition().lat()]\n },\n properties: {\n marker: marker\n }\n };\n });\n this.superCluster.load(points);\n }\n\n var state = {\n zoom: input.map.getZoom()\n };\n\n if (!changed) {\n if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ;else {\n changed = changed || !es6(this.state, state);\n }\n }\n\n this.state = state;\n\n if (changed) {\n this.clusters = this.cluster(input);\n }\n\n return {\n clusters: this.clusters,\n changed: changed\n };\n }\n }, {\n key: \"cluster\",\n value: function cluster(_ref17) {\n var map = _ref17.map;\n return this.superCluster.getClusters([-180, -90, 180, 90], map.getZoom()).map(this.transformCluster.bind(this));\n }\n }, {\n key: \"transformCluster\",\n value: function transformCluster(_ref18) {\n var _ref18$geometry$coord = _slicedToArray(_ref18.geometry.coordinates, 2),\n lng = _ref18$geometry$coord[0],\n lat = _ref18$geometry$coord[1],\n properties = _ref18.properties;\n\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster.getLeaves(properties.cluster_id, Infinity).map(function (leaf) {\n return leaf.properties.marker;\n }),\n position: new google.maps.LatLng({\n lat: lat,\n lng: lng\n })\n });\n } else {\n var marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: marker.getPosition()\n });\n }\n }\n }]);\n\n return SuperClusterAlgorithm;\n}(AbstractAlgorithm);\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\r\n */\n\n\nvar ClusterStats = function ClusterStats(markers, clusters) {\n _classCallCheck(this, ClusterStats);\n\n this.markers = {\n sum: markers.length\n };\n var clusterMarkerCounts = clusters.map(function (a) {\n return a.count;\n });\n var clusterMarkerSum = clusterMarkerCounts.reduce(function (a, b) {\n return a + b;\n }, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min.apply(Math, _toConsumableArray(clusterMarkerCounts)),\n max: Math.max.apply(Math, _toConsumableArray(clusterMarkerCounts))\n }\n };\n};\n\nvar DefaultRenderer = /*#__PURE__*/function () {\n function DefaultRenderer() {\n _classCallCheck(this, DefaultRenderer);\n }\n\n _createClass(DefaultRenderer, [{\n key: \"render\",\n value:\n /**\r\n * The default render function for the library used by {@link MarkerClusterer}.\r\n *\r\n * Currently set to use the following:\r\n *\r\n * ```typescript\r\n * // change color if this cluster has more markers than the mean cluster\r\n * const color =\r\n * count > Math.max(10, stats.clusters.markers.mean)\r\n * ? \"#ff0000\"\r\n * : \"#0000ff\";\r\n *\r\n * // create svg url with fill color\r\n * const svg = window.btoa(`\r\n * \r\n * \r\n * \r\n * \r\n * \r\n * `);\r\n *\r\n * // create marker using svg icon\r\n * return new google.maps.Marker({\r\n * position,\r\n * icon: {\r\n * url: `data:image/svg+xml;base64,${svg}`,\r\n * scaledSize: new google.maps.Size(45, 45),\r\n * },\r\n * label: {\r\n * text: String(count),\r\n * color: \"rgba(255,255,255,0.9)\",\r\n * fontSize: \"12px\",\r\n * },\r\n * // adjust zIndex to be above other markers\r\n * zIndex: 1000 + count,\r\n * });\r\n * ```\r\n */\n function render(_ref19, stats) {\n var count = _ref19.count,\n position = _ref19.position;\n // change color if this cluster has more markers than the mean cluster\n var color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\"; // create svg url with fill color\n\n var svg = window.btoa(\"\\n \\n \\n \\n \\n \")); // create marker using svg icon\n\n return new google.maps.Marker({\n position: position,\n icon: {\n url: \"data:image/svg+xml;base64,\".concat(svg),\n scaledSize: new google.maps.Size(45, 45)\n },\n label: {\n text: String(count),\n color: \"rgba(255,255,255,0.9)\",\n fontSize: \"12px\"\n },\n // adjust zIndex to be above other markers\n zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count\n });\n }\n }]);\n\n return DefaultRenderer;\n}();\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Extends an object's prototype by another's.\r\n *\r\n * @param type1 The Type to be extended.\r\n * @param type2 The Type to extend with.\r\n * @ignore\r\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (var property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\r\n * @ignore\r\n */\n\n\nvar OverlayViewSafe = function OverlayViewSafe() {\n _classCallCheck(this, OverlayViewSafe);\n\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n};\n/**\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar MarkerClustererEvents;\n\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\n\nvar defaultOnClusterClickHandler = function defaultOnClusterClickHandler(_, cluster, map) {\n map.fitBounds(cluster.bounds);\n};\n/**\r\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\r\n * of markers. See {@link MarkerClustererOptions} for more details.\r\n *\r\n * \r\n */\n\n\nvar MarkerClusterer = /*#__PURE__*/function (_OverlayViewSafe) {\n _inherits(MarkerClusterer, _OverlayViewSafe);\n\n var _super16 = _createSuper(MarkerClusterer);\n\n function MarkerClusterer(_ref20) {\n var _this22;\n\n var map = _ref20.map,\n _ref20$markers = _ref20.markers,\n markers = _ref20$markers === void 0 ? [] : _ref20$markers,\n _ref20$algorithm = _ref20.algorithm,\n algorithm = _ref20$algorithm === void 0 ? new SuperClusterAlgorithm({}) : _ref20$algorithm,\n _ref20$renderer = _ref20.renderer,\n renderer = _ref20$renderer === void 0 ? new DefaultRenderer() : _ref20$renderer,\n _ref20$onClusterClick = _ref20.onClusterClick,\n onClusterClick = _ref20$onClusterClick === void 0 ? defaultOnClusterClickHandler : _ref20$onClusterClick;\n\n _classCallCheck(this, MarkerClusterer);\n\n _this22 = _super16.call(this);\n _this22.markers = _toConsumableArray(markers);\n _this22.clusters = [];\n _this22.algorithm = algorithm;\n _this22.renderer = renderer;\n _this22.onClusterClick = onClusterClick;\n\n if (map) {\n _this22.setMap(map);\n }\n\n return _this22;\n }\n\n _createClass(MarkerClusterer, [{\n key: \"addMarker\",\n value: function addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n\n this.markers.push(marker);\n\n if (!noDraw) {\n this.render();\n }\n }\n }, {\n key: \"addMarkers\",\n value: function addMarkers(markers, noDraw) {\n var _this23 = this;\n\n markers.forEach(function (marker) {\n _this23.addMarker(marker, true);\n });\n\n if (!noDraw) {\n this.render();\n }\n }\n }, {\n key: \"removeMarker\",\n value: function removeMarker(marker, noDraw) {\n var index = this.markers.indexOf(marker);\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n\n if (!noDraw) {\n this.render();\n }\n\n return true;\n }\n }, {\n key: \"removeMarkers\",\n value: function removeMarkers(markers, noDraw) {\n var _this24 = this;\n\n var removed = false;\n markers.forEach(function (marker) {\n removed = _this24.removeMarker(marker, true) || removed;\n });\n\n if (removed && !noDraw) {\n this.render();\n }\n\n return removed;\n }\n }, {\n key: \"clearMarkers\",\n value: function clearMarkers(noDraw) {\n this.markers.length = 0;\n\n if (!noDraw) {\n this.render();\n }\n }\n /**\r\n * Recalculates and draws all the marker clusters.\r\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var map = this.getMap();\n\n if (map instanceof google.maps.Map && this.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n\n var _this$algorithm$calcu = this.algorithm.calculate({\n markers: this.markers,\n map: map,\n mapCanvasProjection: this.getProjection()\n }),\n clusters = _this$algorithm$calcu.clusters,\n changed = _this$algorithm$calcu.changed; // allow algorithms to return flag on whether the clusters/markers have changed\n\n\n if (changed || changed == undefined) {\n // reset visibility of markers and clusters\n this.reset(); // store new clusters\n\n this.clusters = clusters;\n this.renderClusters();\n }\n\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n }, {\n key: \"onAdd\",\n value: function onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n }, {\n key: \"onRemove\",\n value: function onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.markers.forEach(function (marker) {\n return marker.setMap(null);\n });\n this.clusters.forEach(function (cluster) {\n return cluster.delete();\n });\n this.clusters = [];\n }\n }, {\n key: \"renderClusters\",\n value: function renderClusters() {\n var _this25 = this;\n\n // generate stats to pass to renderers\n var stats = new ClusterStats(this.markers, this.clusters);\n var map = this.getMap();\n this.clusters.forEach(function (cluster) {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n } else {\n cluster.marker = _this25.renderer.render(cluster, stats);\n\n if (_this25.onClusterClick) {\n cluster.marker.addListener(\"click\",\n /* istanbul ignore next */\n function (event) {\n google.maps.event.trigger(_this25, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n\n _this25.onClusterClick(event, cluster, map);\n });\n }\n }\n\n cluster.marker.setMap(map);\n });\n }\n }]);\n\n return MarkerClusterer;\n}(OverlayViewSafe);\n\nvar index_esm = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AbstractAlgorithm: AbstractAlgorithm,\n AbstractViewportAlgorithm: AbstractViewportAlgorithm,\n Cluster: Cluster,\n ClusterStats: ClusterStats,\n DBScanAlgorithm: DBScanAlgorithm,\n DefaultRenderer: DefaultRenderer,\n GridAlgorithm: GridAlgorithm,\n KmeansAlgorithm: KmeansAlgorithm,\n MarkerClusterer: MarkerClusterer,\n\n get MarkerClustererEvents() {\n return MarkerClustererEvents;\n },\n\n NoopAlgorithm: NoopAlgorithm,\n SuperClusterAlgorithm: SuperClusterAlgorithm,\n defaultOnClusterClickHandler: defaultOnClusterClickHandler,\n distanceBetweenPoints: distanceBetweenPoints,\n extendBoundsToPaddedViewport: extendBoundsToPaddedViewport,\n extendPixelBounds: extendPixelBounds,\n filterMarkersToPaddedViewport: filterMarkersToPaddedViewport,\n noop: noop$1,\n pixelBoundsToLatLngBounds: pixelBoundsToLatLngBounds\n});\n\nvar useGoogleMarkerClusterer = function useGoogleMarkerClusterer(options) {\n var map = useGoogleMap();\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n markerClusterer = _useState2[0],\n setMarkerClusterer = _useState2[1];\n\n useEffect(function () {\n if (map && markerClusterer === null) {\n var markerCluster = new MarkerClusterer(Object.assign(Object.assign({}, options), {\n map: map\n }));\n setMarkerClusterer(markerCluster);\n }\n }, [map]);\n return markerClusterer;\n};\n/** Wrapper around [@googlemaps/markerclusterer](https://github.com/googlemaps/js-markerclusterer)\n *\n * Accepts {@link MarkerClustererOptionsSubset} which is a subset of {@link MarkerClustererOptions}\n */\n\n\nvar GoogleMarkerClusterer = function GoogleMarkerClusterer(_ref21) {\n var children = _ref21.children,\n options = _ref21.options;\n var markerClusterer = useGoogleMarkerClusterer(options);\n return markerClusterer !== null ? children(markerClusterer) : null;\n};\n/* global google */\n\n\nvar eventMap$c = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed'\n};\nvar updaterMap$c = {\n options: function options(instance, _options6) {\n instance.setOptions(_options6);\n },\n position: function position(instance, _position3) {\n instance.setPosition(_position3);\n },\n zIndex: function zIndex(instance, _zIndex3) {\n instance.setZIndex(_zIndex3);\n }\n};\n\nvar InfoWindow = /*#__PURE__*/function (_React$PureComponent9) {\n _inherits(InfoWindow, _React$PureComponent9);\n\n var _super17 = _createSuper(InfoWindow);\n\n function InfoWindow() {\n var _this26;\n\n _classCallCheck(this, InfoWindow);\n\n _this26 = _super17.apply(this, arguments);\n _this26.registeredEvents = [];\n _this26.containerElement = null;\n _this26.state = {\n infoWindow: null\n };\n\n _this26.open = function (infoWindow, anchor) {\n if (anchor) {\n infoWindow.open(_this26.context, anchor);\n } else if (infoWindow.getPosition()) {\n infoWindow.open(_this26.context);\n } else {\n invariant_1(false, \"You must provide either an anchor (typically render it inside a ) or a position props for .\");\n }\n };\n\n _this26.setInfoWindowCallback = function () {\n if (_this26.state.infoWindow !== null && _this26.containerElement !== null) {\n _this26.state.infoWindow.setContent(_this26.containerElement);\n\n _this26.open(_this26.state.infoWindow, _this26.props.anchor);\n\n if (_this26.props.onLoad) {\n _this26.props.onLoad(_this26.state.infoWindow);\n }\n }\n };\n\n return _this26;\n }\n\n _createClass(InfoWindow, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var infoWindow = new google.maps.InfoWindow(Object.assign({}, this.props.options || {}));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: {},\n nextProps: this.props,\n instance: infoWindow\n });\n this.setState(function setInfoWindow() {\n return {\n infoWindow: infoWindow\n };\n }, this.setInfoWindowCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.infoWindow\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n this.state.infoWindow.close();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.containerElement ? ReactDOM.createPortal(React.Children.only(this.props.children), this.containerElement) : React.createElement(React.Fragment, null);\n }\n }]);\n\n return InfoWindow;\n}(React.PureComponent);\n\nInfoWindow.contextType = MapContext;\nvar eventMap$b = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick'\n};\nvar updaterMap$b = {\n draggable: function draggable(instance, _draggable2) {\n instance.setDraggable(_draggable2);\n },\n editable: function editable(instance, _editable) {\n instance.setEditable(_editable);\n },\n map: function map(instance, _map3) {\n instance.setMap(_map3);\n },\n options: function options(instance, _options7) {\n instance.setOptions(_options7);\n },\n path: function path(instance, _path) {\n instance.setPath(_path);\n },\n visible: function visible(instance, _visible3) {\n instance.setVisible(_visible3);\n }\n};\n\nvar Polyline = /*#__PURE__*/function (_React$PureComponent10) {\n _inherits(Polyline, _React$PureComponent10);\n\n var _super18 = _createSuper(Polyline);\n\n function Polyline() {\n var _this27;\n\n _classCallCheck(this, Polyline);\n\n _this27 = _super18.apply(this, arguments);\n _this27.registeredEvents = [];\n _this27.state = {\n polyline: null\n };\n\n _this27.setPolylineCallback = function () {\n if (_this27.state.polyline !== null && _this27.props.onLoad) {\n _this27.props.onLoad(_this27.state.polyline);\n }\n };\n\n return _this27;\n }\n\n _createClass(Polyline, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var polyline = new google.maps.Polyline(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: {},\n nextProps: this.props,\n instance: polyline\n });\n this.setState(function setPolyline() {\n return {\n polyline: polyline\n };\n }, this.setPolylineCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.polyline !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polyline\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.polyline !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polyline);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.polyline.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return Polyline;\n}(React.PureComponent);\n\nPolyline.contextType = MapContext;\n/* global google */\n\nvar eventMap$a = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick'\n};\nvar updaterMap$a = {\n draggable: function draggable(instance, _draggable3) {\n instance.setDraggable(_draggable3);\n },\n editable: function editable(instance, _editable2) {\n instance.setEditable(_editable2);\n },\n map: function map(instance, _map4) {\n instance.setMap(_map4);\n },\n options: function options(instance, _options8) {\n instance.setOptions(_options8);\n },\n path: function path(instance, _path2) {\n instance.setPath(_path2);\n },\n paths: function paths(instance, _paths) {\n instance.setPaths(_paths);\n },\n visible: function visible(instance, _visible4) {\n instance.setVisible(_visible4);\n }\n};\n\nvar Polygon = /*#__PURE__*/function (_React$PureComponent11) {\n _inherits(Polygon, _React$PureComponent11);\n\n var _super19 = _createSuper(Polygon);\n\n function Polygon() {\n var _this28;\n\n _classCallCheck(this, Polygon);\n\n _this28 = _super19.apply(this, arguments);\n _this28.registeredEvents = [];\n _this28.state = {\n polygon: null\n };\n\n _this28.setPolygonCallback = function () {\n if (_this28.state.polygon !== null && _this28.props.onLoad) {\n _this28.props.onLoad(_this28.state.polygon);\n }\n };\n\n return _this28;\n }\n\n _createClass(Polygon, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var polygon = new google.maps.Polygon(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: {},\n nextProps: this.props,\n instance: polygon\n });\n this.setState(function setPolygon() {\n return {\n polygon: polygon\n };\n }, this.setPolygonCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.polygon !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polygon\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.polygon !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polygon);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.polygon && this.state.polygon.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return Polygon;\n}(React.PureComponent);\n\nPolygon.contextType = MapContext;\nvar eventMap$9 = {\n onBoundsChanged: 'bounds_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick'\n};\nvar updaterMap$9 = {\n bounds: function bounds(instance, _bounds) {\n instance.setBounds(_bounds);\n },\n draggable: function draggable(instance, _draggable4) {\n instance.setDraggable(_draggable4);\n },\n editable: function editable(instance, _editable3) {\n instance.setEditable(_editable3);\n },\n map: function map(instance, _map5) {\n instance.setMap(_map5);\n },\n options: function options(instance, _options9) {\n instance.setOptions(_options9);\n },\n visible: function visible(instance, _visible5) {\n instance.setVisible(_visible5);\n }\n};\n\nvar Rectangle = /*#__PURE__*/function (_React$PureComponent12) {\n _inherits(Rectangle, _React$PureComponent12);\n\n var _super20 = _createSuper(Rectangle);\n\n function Rectangle() {\n var _this29;\n\n _classCallCheck(this, Rectangle);\n\n _this29 = _super20.apply(this, arguments);\n _this29.registeredEvents = [];\n _this29.state = {\n rectangle: null\n };\n\n _this29.setRectangleCallback = function () {\n if (_this29.state.rectangle !== null && _this29.props.onLoad) {\n _this29.props.onLoad(_this29.state.rectangle);\n }\n };\n\n return _this29;\n }\n\n _createClass(Rectangle, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var rectangle = new google.maps.Rectangle(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: {},\n nextProps: this.props,\n instance: rectangle\n });\n this.setState(function setRectangle() {\n return {\n rectangle: rectangle\n };\n }, this.setRectangleCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.rectangle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.rectangle\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.rectangle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.rectangle);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.rectangle.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return Rectangle;\n}(React.PureComponent);\n\nRectangle.contextType = MapContext;\nvar eventMap$8 = {\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRadiusChanged: 'radius_changed',\n onRightClick: 'rightclick'\n};\nvar updaterMap$8 = {\n center: function center(instance, _center2) {\n instance.setCenter(_center2);\n },\n draggable: function draggable(instance, _draggable5) {\n instance.setDraggable(_draggable5);\n },\n editable: function editable(instance, _editable4) {\n instance.setEditable(_editable4);\n },\n map: function map(instance, _map6) {\n instance.setMap(_map6);\n },\n options: function options(instance, _options10) {\n instance.setOptions(_options10);\n },\n radius: function radius(instance, _radius) {\n instance.setRadius(_radius);\n },\n visible: function visible(instance, _visible6) {\n instance.setVisible(_visible6);\n }\n};\n\nvar Circle = /*#__PURE__*/function (_React$PureComponent13) {\n _inherits(Circle, _React$PureComponent13);\n\n var _super21 = _createSuper(Circle);\n\n function Circle() {\n var _this30;\n\n _classCallCheck(this, Circle);\n\n _this30 = _super21.apply(this, arguments);\n _this30.registeredEvents = [];\n _this30.state = {\n circle: null\n };\n\n _this30.setCircleCallback = function () {\n if (_this30.state.circle !== null && _this30.props.onLoad) {\n _this30.props.onLoad(_this30.state.circle);\n }\n };\n\n return _this30;\n }\n\n _createClass(Circle, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var circle = new google.maps.Circle(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: {},\n nextProps: this.props,\n instance: circle\n });\n this.setState(function setCircle() {\n return {\n circle: circle\n };\n }, this.setCircleCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.circle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.circle\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.circle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.circle);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.circle && this.state.circle.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return Circle;\n}(React.PureComponent);\n\nCircle.contextType = MapContext;\nvar eventMap$7 = {\n onAddFeature: 'addfeature',\n onClick: 'click',\n onDblClick: 'dblclick',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRemoveFeature: 'removefeature',\n onRemoveProperty: 'removeproperty',\n onRightClick: 'rightclick',\n onSetGeometry: 'setgeometry',\n onSetProperty: 'setproperty'\n};\nvar updaterMap$7 = {\n add: function add(instance, features) {\n instance.add(features);\n },\n addgeojson: function addgeojson(instance, geojson, options) {\n instance.addGeoJson(geojson, options);\n },\n contains: function contains(instance, feature) {\n instance.contains(feature);\n },\n foreach: function foreach(instance, callback) {\n instance.forEach(callback);\n },\n loadgeojson: function loadgeojson(instance, url, options, callback) {\n instance.loadGeoJson(url, options, callback);\n },\n overridestyle: function overridestyle(instance, feature, style) {\n instance.overrideStyle(feature, style);\n },\n remove: function remove(instance, feature) {\n instance.remove(feature);\n },\n revertstyle: function revertstyle(instance, feature) {\n instance.revertStyle(feature);\n },\n controlposition: function controlposition(instance, controlPosition) {\n instance.setControlPosition(controlPosition);\n },\n controls: function controls(instance, _controls) {\n instance.setControls(_controls);\n },\n drawingmode: function drawingmode(instance, mode) {\n instance.setDrawingMode(mode);\n },\n map: function map(instance, _map7) {\n instance.setMap(_map7);\n },\n style: function style(instance, _style) {\n instance.setStyle(_style);\n },\n togeojson: function togeojson(instance, callback) {\n instance.toGeoJson(callback);\n }\n};\n\nvar Data = /*#__PURE__*/function (_React$PureComponent14) {\n _inherits(Data, _React$PureComponent14);\n\n var _super22 = _createSuper(Data);\n\n function Data() {\n var _this31;\n\n _classCallCheck(this, Data);\n\n _this31 = _super22.apply(this, arguments);\n _this31.registeredEvents = [];\n _this31.state = {\n data: null\n };\n\n _this31.setDataCallback = function () {\n if (_this31.state.data !== null && _this31.props.onLoad) {\n _this31.props.onLoad(_this31.state.data);\n }\n };\n\n return _this31;\n }\n\n _createClass(Data, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var data = new google.maps.Data(Object.assign(Object.assign({}, this.props.options || {}), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: {},\n nextProps: this.props,\n instance: data\n });\n this.setState(function setData() {\n return {\n data: data\n };\n }, this.setDataCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.data !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.data\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.data !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.data);\n }\n\n unregisterEvents(this.registeredEvents);\n\n if (this.state.data) {\n this.state.data.setMap(null);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return Data;\n}(React.PureComponent);\n\nData.contextType = MapContext;\nvar eventMap$6 = {\n onClick: 'click',\n onDefaultViewportChanged: 'defaultviewport_changed',\n onStatusChanged: 'status_changed'\n};\nvar updaterMap$6 = {\n options: function options(instance, _options11) {\n instance.setOptions(_options11);\n },\n url: function url(instance, _url) {\n instance.setUrl(_url);\n },\n zIndex: function zIndex(instance, _zIndex4) {\n instance.setZIndex(_zIndex4);\n }\n};\n\nvar KmlLayer = /*#__PURE__*/function (_PureComponent2) {\n _inherits(KmlLayer, _PureComponent2);\n\n var _super23 = _createSuper(KmlLayer);\n\n function KmlLayer() {\n var _this32;\n\n _classCallCheck(this, KmlLayer);\n\n _this32 = _super23.apply(this, arguments);\n _this32.registeredEvents = [];\n _this32.state = {\n kmlLayer: null\n };\n\n _this32.setKmlLayerCallback = function () {\n if (_this32.state.kmlLayer !== null && _this32.props.onLoad) {\n _this32.props.onLoad(_this32.state.kmlLayer);\n }\n };\n\n return _this32;\n }\n\n _createClass(KmlLayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var kmlLayer = new google.maps.KmlLayer(Object.assign(Object.assign({}, this.props.options), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: {},\n nextProps: this.props,\n instance: kmlLayer\n });\n this.setState(function setLmlLayer() {\n return {\n kmlLayer: kmlLayer\n };\n }, this.setKmlLayerCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.kmlLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.kmlLayer\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.kmlLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.kmlLayer);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.kmlLayer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return KmlLayer;\n}(PureComponent);\n\nKmlLayer.contextType = MapContext;\n/* eslint-disable filenames/match-regex */\n\nfunction getOffsetOverride(containerElement, getPixelPositionOffset) {\n return typeof getPixelPositionOffset === 'function' ? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight) : {};\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nvar createLatLng = function createLatLng(inst, Type) {\n return new Type(inst.lat, inst.lng);\n}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nvar createLatLngBounds = function createLatLngBounds(inst, Type) {\n return new Type(new google.maps.LatLng(inst.ne.lat, inst.ne.lng), new google.maps.LatLng(inst.sw.lat, inst.sw.lng));\n}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nvar ensureOfType = function ensureOfType(inst, type, factory) {\n return inst instanceof type ? inst : factory(inst, type);\n};\n\nvar getLayoutStylesByBounds = function getLayoutStylesByBounds(mapCanvasProjection, offset, bounds) {\n var ne = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast());\n var sw = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest());\n\n if (ne && sw) {\n return {\n left: \"\".concat(sw.x + offset.x, \"px\"),\n top: \"\".concat(ne.y + offset.y, \"px\"),\n width: \"\".concat(ne.x - sw.x - offset.x, \"px\"),\n height: \"\".concat(sw.y - ne.y - offset.y, \"px\")\n };\n }\n\n return {\n left: '-9999px',\n top: '-9999px'\n };\n};\n\nvar getLayoutStylesByPosition = function getLayoutStylesByPosition(mapCanvasProjection, offset, position) {\n var point = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(position);\n\n if (point) {\n var x = point.x,\n y = point.y;\n return {\n left: \"\".concat(x + offset.x, \"px\"),\n top: \"\".concat(y + offset.y, \"px\")\n };\n }\n\n return {\n left: '-9999px',\n top: '-9999px'\n };\n};\n\nvar getLayoutStyles = function getLayoutStyles(mapCanvasProjection, offset, bounds, position) {\n return bounds !== undefined ? getLayoutStylesByBounds(mapCanvasProjection, offset, ensureOfType(bounds, google.maps.LatLngBounds, createLatLngBounds)) : getLayoutStylesByPosition(mapCanvasProjection, offset, ensureOfType(position, google.maps.LatLng, createLatLng));\n};\n\nvar arePositionsEqual = function arePositionsEqual(currentPosition, previousPosition) {\n return currentPosition.left === previousPosition.left && currentPosition.top === previousPosition.top && currentPosition.width === previousPosition.height && currentPosition.height === previousPosition.height;\n};\n\nfunction convertToLatLngString(latLngLike) {\n if (!latLngLike) {\n return '';\n }\n\n var latLng = latLngLike instanceof google.maps.LatLng ? latLngLike : new google.maps.LatLng(latLngLike.lat, latLngLike.lng);\n return latLng + '';\n}\n\nfunction convertToLatLngBoundsString(latLngBoundsLike) {\n if (!latLngBoundsLike) {\n return '';\n }\n\n var latLngBounds = latLngBoundsLike instanceof google.maps.LatLngBounds ? latLngBoundsLike : new google.maps.LatLngBounds(new google.maps.LatLng(latLngBoundsLike.south, latLngBoundsLike.east), new google.maps.LatLng(latLngBoundsLike.north, latLngBoundsLike.west));\n return latLngBounds + '';\n}\n\nvar OverlayView = /*#__PURE__*/function (_React$PureComponent15) {\n _inherits(OverlayView, _React$PureComponent15);\n\n var _super24 = _createSuper(OverlayView);\n\n function OverlayView(props) {\n var _this33;\n\n _classCallCheck(this, OverlayView);\n\n _this33 = _super24.call(this, props);\n _this33.state = {\n paneEl: null,\n containerStyle: {\n // set initial position\n position: 'absolute'\n }\n };\n\n _this33.updatePane = function () {\n var mapPaneName = _this33.props.mapPaneName; // https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapPanes\n\n var mapPanes = _this33.overlayView.getPanes();\n\n invariant_1(!!mapPaneName, \"OverlayView requires props.mapPaneName but got %s\", mapPaneName);\n\n if (mapPanes) {\n _this33.setState({\n paneEl: mapPanes[mapPaneName]\n });\n } else {\n _this33.setState({\n paneEl: null\n });\n }\n };\n\n _this33.onAdd = function () {\n var _a, _b;\n\n _this33.updatePane();\n\n (_b = (_a = _this33.props).onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, _this33.overlayView);\n };\n\n _this33.onPositionElement = function () {\n var mapCanvasProjection = _this33.overlayView.getProjection();\n\n var offset = Object.assign({\n x: 0,\n y: 0\n }, _this33.containerRef.current ? getOffsetOverride(_this33.containerRef.current, _this33.props.getPixelPositionOffset) : {});\n var layoutStyles = getLayoutStyles(mapCanvasProjection, offset, _this33.props.bounds, _this33.props.position);\n var _this33$state$contain = _this33.state.containerStyle,\n left = _this33$state$contain.left,\n top = _this33$state$contain.top,\n width = _this33$state$contain.width,\n height = _this33$state$contain.height;\n\n if (!arePositionsEqual(layoutStyles, {\n left: left,\n top: top,\n width: width,\n height: height\n })) {\n _this33.setState({\n containerStyle: Object.assign(Object.assign({}, layoutStyles), {\n position: 'absolute'\n })\n });\n }\n };\n\n _this33.draw = function () {\n _this33.onPositionElement();\n };\n\n _this33.onRemove = function () {\n var _a, _b;\n\n _this33.setState(function () {\n return {\n paneEl: null\n };\n }); // this.mapPaneEl = null\n\n\n (_b = (_a = _this33.props).onUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, _this33.overlayView);\n };\n\n _this33.containerRef = React.createRef(); // You must implement three methods: onAdd(), draw(), and onRemove().\n\n var overlayView = new google.maps.OverlayView();\n overlayView.onAdd = _this33.onAdd;\n overlayView.draw = _this33.draw;\n overlayView.onRemove = _this33.onRemove;\n _this33.overlayView = overlayView;\n return _this33;\n }\n\n _createClass(OverlayView, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // You must call setMap() with a valid Map object to trigger the call to\n // the onAdd() method and setMap(null) in order to trigger the onRemove() method.\n this.overlayView.setMap(this.context);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var prevPositionString = convertToLatLngString(prevProps.position);\n var positionString = convertToLatLngString(this.props.position);\n var prevBoundsString = convertToLatLngBoundsString(prevProps.bounds);\n var boundsString = convertToLatLngBoundsString(this.props.bounds);\n\n if (prevPositionString !== positionString || prevBoundsString !== boundsString) {\n this.overlayView.draw();\n }\n\n if (prevProps.mapPaneName !== this.props.mapPaneName) {\n this.updatePane();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.overlayView.setMap(null);\n }\n }, {\n key: \"render\",\n value: function render() {\n var paneEl = this.state.paneEl;\n\n if (paneEl) {\n return ReactDOM.createPortal(React.createElement(\"div\", {\n ref: this.containerRef,\n style: this.state.containerStyle\n }, React.Children.only(this.props.children)), paneEl);\n } else {\n return null;\n }\n }\n }]);\n\n return OverlayView;\n}(React.PureComponent);\n\nOverlayView.FLOAT_PANE = \"floatPane\";\nOverlayView.MAP_PANE = \"mapPane\";\nOverlayView.MARKER_LAYER = \"markerLayer\";\nOverlayView.OVERLAY_LAYER = \"overlayLayer\";\nOverlayView.OVERLAY_MOUSE_TARGET = \"overlayMouseTarget\";\nOverlayView.contextType = MapContext;\n\nfunction noop() {}\n\nvar eventMap$5 = {\n onDblClick: 'dblclick',\n onClick: 'click'\n};\nvar updaterMap$5 = {\n opacity: function opacity(instance, _opacity2) {\n instance.setOpacity(_opacity2);\n }\n};\n\nvar GroundOverlay = /*#__PURE__*/function (_React$PureComponent16) {\n _inherits(GroundOverlay, _React$PureComponent16);\n\n var _super25 = _createSuper(GroundOverlay);\n\n function GroundOverlay() {\n var _this34;\n\n _classCallCheck(this, GroundOverlay);\n\n _this34 = _super25.apply(this, arguments);\n _this34.registeredEvents = [];\n _this34.state = {\n groundOverlay: null\n };\n\n _this34.setGroundOverlayCallback = function () {\n if (_this34.state.groundOverlay !== null && _this34.props.onLoad) {\n _this34.props.onLoad(_this34.state.groundOverlay);\n }\n };\n\n return _this34;\n }\n\n _createClass(GroundOverlay, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!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\");\n var groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, Object.assign(Object.assign({}, this.props.options), {\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: {},\n nextProps: this.props,\n instance: groundOverlay\n });\n this.setState(function setGroundOverlay() {\n return {\n groundOverlay: groundOverlay\n };\n }, this.setGroundOverlayCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.groundOverlay !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.groundOverlay\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.groundOverlay) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.groundOverlay);\n }\n\n this.state.groundOverlay.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return GroundOverlay;\n}(React.PureComponent);\n\nGroundOverlay.defaultProps = {\n onLoad: noop\n};\nGroundOverlay.contextType = MapContext;\nvar eventMap$4 = {};\nvar updaterMap$4 = {\n data: function data(instance, _data) {\n instance.setData(_data);\n },\n map: function map(instance, _map8) {\n instance.setMap(_map8);\n },\n options: function options(instance, _options12) {\n instance.setOptions(_options12);\n }\n};\n\nvar HeatmapLayer = /*#__PURE__*/function (_React$PureComponent17) {\n _inherits(HeatmapLayer, _React$PureComponent17);\n\n var _super26 = _createSuper(HeatmapLayer);\n\n function HeatmapLayer() {\n var _this35;\n\n _classCallCheck(this, HeatmapLayer);\n\n _this35 = _super26.apply(this, arguments);\n _this35.registeredEvents = [];\n _this35.state = {\n heatmapLayer: null\n };\n\n _this35.setHeatmapLayerCallback = function () {\n if (_this35.state.heatmapLayer !== null && _this35.props.onLoad) {\n _this35.props.onLoad(_this35.state.heatmapLayer);\n }\n };\n\n return _this35;\n }\n\n _createClass(HeatmapLayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} to ? %s', google.maps.visualization);\n invariant_1(!!this.props.data, 'data property is required in HeatmapLayer %s', this.props.data);\n var heatmapLayer = new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({}, this.props.options || {}), {\n data: this.props.data,\n map: this.context\n }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: {},\n nextProps: this.props,\n instance: heatmapLayer\n });\n this.setState(function setHeatmapLayer() {\n return {\n heatmapLayer: heatmapLayer\n };\n }, this.setHeatmapLayerCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.heatmapLayer\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.heatmapLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.heatmapLayer);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.heatmapLayer.setMap(null);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return HeatmapLayer;\n}(React.PureComponent);\n\nHeatmapLayer.contextType = MapContext;\nvar eventMap$3 = {\n onCloseClick: 'closeclick',\n onPanoChanged: 'pano_changed',\n onPositionChanged: 'position_changed',\n onPovChanged: 'pov_changed',\n onResize: 'resize',\n onStatusChanged: 'status_changed',\n onVisibleChanged: 'visible_changed',\n onZoomChanged: 'zoom_changed'\n};\nvar updaterMap$3 = {\n register: function register(instance, provider, options) {\n instance.registerPanoProvider(provider, options);\n },\n links: function links(instance, _links) {\n instance.setLinks(_links);\n },\n motionTracking: function motionTracking(instance, _motionTracking) {\n instance.setMotionTracking(_motionTracking);\n },\n options: function options(instance, _options13) {\n instance.setOptions(_options13);\n },\n pano: function pano(instance, _pano) {\n instance.setPano(_pano);\n },\n position: function position(instance, _position4) {\n instance.setPosition(_position4);\n },\n pov: function pov(instance, _pov) {\n instance.setPov(_pov);\n },\n visible: function visible(instance, _visible7) {\n instance.setVisible(_visible7);\n },\n zoom: function zoom(instance, _zoom2) {\n instance.setZoom(_zoom2);\n }\n};\n\nvar StreetViewPanorama = /*#__PURE__*/function (_React$PureComponent18) {\n _inherits(StreetViewPanorama, _React$PureComponent18);\n\n var _super27 = _createSuper(StreetViewPanorama);\n\n function StreetViewPanorama() {\n var _this36;\n\n _classCallCheck(this, StreetViewPanorama);\n\n _this36 = _super27.apply(this, arguments);\n _this36.registeredEvents = [];\n _this36.state = {\n streetViewPanorama: null\n };\n\n _this36.setStreetViewPanoramaCallback = function () {\n if (_this36.state.streetViewPanorama !== null && _this36.props.onLoad) {\n _this36.props.onLoad(_this36.state.streetViewPanorama);\n }\n };\n\n return _this36;\n }\n\n _createClass(StreetViewPanorama, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var streetViewPanorama = this.context.getStreetView();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: {},\n nextProps: this.props,\n instance: streetViewPanorama\n });\n this.setState(function setStreetViewPanorama() {\n return {\n streetViewPanorama: streetViewPanorama\n };\n }, this.setStreetViewPanoramaCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.streetViewPanorama !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.streetViewPanorama\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.streetViewPanorama !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewPanorama);\n }\n\n unregisterEvents(this.registeredEvents);\n this.state.streetViewPanorama.setVisible(false);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return StreetViewPanorama;\n}(React.PureComponent);\n\nStreetViewPanorama.contextType = MapContext;\n\nvar StreetViewService = /*#__PURE__*/function (_React$PureComponent19) {\n _inherits(StreetViewService, _React$PureComponent19);\n\n var _super28 = _createSuper(StreetViewService);\n\n function StreetViewService() {\n var _this37;\n\n _classCallCheck(this, StreetViewService);\n\n _this37 = _super28.apply(this, arguments);\n _this37.state = {\n streetViewService: null\n };\n\n _this37.setStreetViewServiceCallback = function () {\n if (_this37.state.streetViewService !== null && _this37.props.onLoad) {\n _this37.props.onLoad(_this37.state.streetViewService);\n }\n };\n\n return _this37;\n }\n\n _createClass(StreetViewService, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var streetViewService = new google.maps.StreetViewService();\n this.setState(function setStreetViewService() {\n return {\n streetViewService: streetViewService\n };\n }, this.setStreetViewServiceCallback);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.streetViewService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewService);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return StreetViewService;\n}(React.PureComponent);\n\nStreetViewService.contextType = MapContext;\n\nvar DirectionsService = /*#__PURE__*/function (_React$PureComponent20) {\n _inherits(DirectionsService, _React$PureComponent20);\n\n var _super29 = _createSuper(DirectionsService);\n\n function DirectionsService() {\n var _this38;\n\n _classCallCheck(this, DirectionsService);\n\n _this38 = _super29.apply(this, arguments);\n _this38.state = {\n directionsService: null\n };\n\n _this38.setDirectionsServiceCallback = function () {\n if (_this38.state.directionsService !== null && _this38.props.onLoad) {\n _this38.props.onLoad(_this38.state.directionsService);\n }\n };\n\n return _this38;\n }\n\n _createClass(DirectionsService, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!this.props.options, 'DirectionsService expected options object as parameter, but got %s', this.props.options);\n var directionsService = new google.maps.DirectionsService();\n this.setState(function setDirectionsService() {\n return {\n directionsService: directionsService\n };\n }, this.setDirectionsServiceCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.state.directionsService !== null) {\n this.state.directionsService.route(this.props.options, this.props.callback);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.directionsService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsService);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return DirectionsService;\n}(React.PureComponent);\n\nvar eventMap$2 = {\n onDirectionsChanged: 'directions_changed'\n};\nvar updaterMap$2 = {\n directions: function directions(instance, _directions) {\n instance.setDirections(_directions);\n },\n map: function map(instance, _map9) {\n instance.setMap(_map9);\n },\n options: function options(instance, _options14) {\n instance.setOptions(_options14);\n },\n panel: function panel(instance, _panel) {\n instance.setPanel(_panel);\n },\n routeIndex: function routeIndex(instance, _routeIndex) {\n instance.setRouteIndex(_routeIndex);\n }\n};\n\nvar DirectionsRenderer = /*#__PURE__*/function (_React$PureComponent21) {\n _inherits(DirectionsRenderer, _React$PureComponent21);\n\n var _super30 = _createSuper(DirectionsRenderer);\n\n function DirectionsRenderer() {\n var _this39;\n\n _classCallCheck(this, DirectionsRenderer);\n\n _this39 = _super30.apply(this, arguments);\n _this39.registeredEvents = [];\n _this39.state = {\n directionsRenderer: null\n };\n\n _this39.setDirectionsRendererCallback = function () {\n if (_this39.state.directionsRenderer !== null) {\n _this39.state.directionsRenderer.setMap(_this39.context);\n\n if (_this39.props.onLoad) {\n _this39.props.onLoad(_this39.state.directionsRenderer);\n }\n }\n };\n\n return _this39;\n }\n\n _createClass(DirectionsRenderer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var directionsRenderer = new google.maps.DirectionsRenderer(this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: {},\n nextProps: this.props,\n instance: directionsRenderer\n });\n this.setState(function setDirectionsRenderer() {\n return {\n directionsRenderer: directionsRenderer\n };\n }, this.setDirectionsRendererCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.directionsRenderer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.directionsRenderer\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.directionsRenderer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsRenderer);\n }\n\n unregisterEvents(this.registeredEvents);\n\n if (this.state.directionsRenderer) {\n this.state.directionsRenderer.setMap(null);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return DirectionsRenderer;\n}(React.PureComponent);\n\nDirectionsRenderer.contextType = MapContext;\n\nvar DistanceMatrixService = /*#__PURE__*/function (_React$PureComponent22) {\n _inherits(DistanceMatrixService, _React$PureComponent22);\n\n var _super31 = _createSuper(DistanceMatrixService);\n\n function DistanceMatrixService() {\n var _this40;\n\n _classCallCheck(this, DistanceMatrixService);\n\n _this40 = _super31.apply(this, arguments);\n _this40.state = {\n distanceMatrixService: null\n };\n\n _this40.setDistanceMatrixServiceCallback = function () {\n if (_this40.state.distanceMatrixService !== null && _this40.props.onLoad) {\n _this40.props.onLoad(_this40.state.distanceMatrixService);\n }\n };\n\n return _this40;\n }\n\n _createClass(DistanceMatrixService, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!this.props.options, 'DistanceMatrixService expected options object as parameter, but go %s', this.props.options);\n var distanceMatrixService = new google.maps.DistanceMatrixService();\n this.setState(function setDistanceMatrixService() {\n return {\n distanceMatrixService: distanceMatrixService\n };\n }, this.setDistanceMatrixServiceCallback);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.state.distanceMatrixService !== null) {\n this.state.distanceMatrixService.getDistanceMatrix(this.props.options, this.props.callback);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.distanceMatrixService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.distanceMatrixService);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(React.Fragment, null);\n }\n }]);\n\n return DistanceMatrixService;\n}(React.PureComponent);\n\nvar eventMap$1 = {\n onPlacesChanged: 'places_changed'\n};\nvar updaterMap$1 = {\n bounds: function bounds(instance, _bounds2) {\n instance.setBounds(_bounds2);\n }\n};\n\nvar StandaloneSearchBox = /*#__PURE__*/function (_React$PureComponent23) {\n _inherits(StandaloneSearchBox, _React$PureComponent23);\n\n var _super32 = _createSuper(StandaloneSearchBox);\n\n function StandaloneSearchBox() {\n var _this41;\n\n _classCallCheck(this, StandaloneSearchBox);\n\n _this41 = _super32.apply(this, arguments);\n _this41.registeredEvents = [];\n _this41.containerElement = React.createRef();\n _this41.state = {\n searchBox: null\n };\n\n _this41.setSearchBoxCallback = function () {\n if (_this41.state.searchBox !== null && _this41.props.onLoad) {\n _this41.props.onLoad(_this41.state.searchBox);\n }\n };\n\n return _this41;\n }\n\n _createClass(StandaloneSearchBox, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n\n if (this.containerElement !== null && this.containerElement.current !== null) {\n var input = this.containerElement.current.querySelector('input');\n\n if (input !== null) {\n var searchBox = new google.maps.places.SearchBox(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: {},\n nextProps: this.props,\n instance: searchBox\n });\n this.setState(function setSearchBox() {\n return {\n searchBox: searchBox\n };\n }, this.setSearchBoxCallback);\n }\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.state.searchBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.searchBox\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.searchBox !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.searchBox);\n }\n\n unregisterEvents(this.registeredEvents);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(\"div\", {\n ref: this.containerElement\n }, React.Children.only(this.props.children));\n }\n }]);\n\n return StandaloneSearchBox;\n}(React.PureComponent);\n\nStandaloneSearchBox.contextType = MapContext;\nvar eventMap = {\n onPlaceChanged: 'place_changed'\n};\nvar updaterMap = {\n bounds: function bounds(instance, _bounds3) {\n instance.setBounds(_bounds3);\n },\n restrictions: function restrictions(instance, _restrictions) {\n instance.setComponentRestrictions(_restrictions);\n },\n fields: function fields(instance, _fields) {\n instance.setFields(_fields);\n },\n options: function options(instance, _options15) {\n instance.setOptions(_options15);\n },\n types: function types(instance, _types) {\n instance.setTypes(_types);\n }\n};\n\nvar Autocomplete = /*#__PURE__*/function (_React$PureComponent24) {\n _inherits(Autocomplete, _React$PureComponent24);\n\n var _super33 = _createSuper(Autocomplete);\n\n function Autocomplete() {\n var _this42;\n\n _classCallCheck(this, Autocomplete);\n\n _this42 = _super33.apply(this, arguments);\n _this42.registeredEvents = [];\n _this42.containerElement = React.createRef();\n _this42.state = {\n autocomplete: null\n };\n\n _this42.setAutocompleteCallback = function () {\n if (_this42.state.autocomplete !== null && _this42.props.onLoad) {\n _this42.props.onLoad(_this42.state.autocomplete);\n }\n };\n\n return _this42;\n }\n\n _createClass(Autocomplete, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n invariant_1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places); // TODO: why current could be equal null?\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n\n var input = this.containerElement.current.querySelector('input');\n\n if (input) {\n var autocomplete = new google.maps.places.Autocomplete(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: autocomplete\n });\n this.setState(function setAutocomplete() {\n return {\n autocomplete: autocomplete\n };\n }, this.setAutocompleteCallback);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.autocomplete\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.autocomplete !== null) {\n unregisterEvents(this.registeredEvents);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(\"div\", {\n ref: this.containerElement,\n className: this.props.className || ''\n }, React.Children.only(this.props.children));\n }\n }]);\n\n return Autocomplete;\n}(React.PureComponent);\n\nAutocomplete.contextType = MapContext;\nexport { Autocomplete, BicyclingLayer, Circle, Data, DirectionsRenderer, DirectionsService, DistanceMatrixService, DrawingManager, GoogleMap, index_esm as GoogleMapsMarkerClusterer, GoogleMarkerClusterer, GroundOverlay, HeatmapLayer, InfoBoxComponent as InfoBox, InfoWindow, KmlLayer, LoadScript, LoadScriptNext$1 as LoadScriptNext, MapContext, Marker, ClustererComponent as MarkerClusterer, OverlayView, Polygon, Polyline, Rectangle, StandaloneSearchBox, StreetViewPanorama, StreetViewService, TrafficLayer, TransitLayer, useGoogleMap, useJsApiLoader, useLoadScript };"],"names":["_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","from","test","_unsupportedIterableToArray","length","i","F","s","done","value","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","result","Super","NewTarget","this","arguments","apply","globalThis","window","g","self","invariant_1","condition","format","a","b","c","d","error","undefined","Error","args","argIndex","replace","framesToPop","MapContext","createContext","useGoogleMap","useContext","map","applyUpdaterToNextProps","updaterMap","prevProps","nextProps","instance","obj","fn","key","nextValue","keys","forEach","registerEvents","props","eventMap","acc","registeredList","googleEventName","onEventName","push","google","maps","event","addListener","reduce","newAcc","unregisterEvent","registered","removeListener","unregisterEvents","events","applyUpdatersToPropsAndRegisterEvents","_ref","registeredEvents","eventMap$i","onDblClick","onDragEnd","onDragStart","onMapTypeIdChanged","onMouseMove","onMouseOut","onMouseOver","onMouseDown","onMouseUp","onRightClick","onTilesLoaded","onBoundsChanged","onCenterChanged","onClick","onDrag","onHeadingChanged","onIdle","onProjectionChanged","onResize","onTiltChanged","onZoomChanged","updaterMap$i","extraMapTypes","extra","mapTypes","set","String","center","_center","setCenter","clickableIcons","clickable","setClickableIcons","heading","_heading","setHeading","mapTypeId","_mapTypeId","setMapTypeId","options","_options","setOptions","streetView","_streetView","setStreetView","tilt","_tilt","setTilt","zoom","_zoom","setZoom","GoogleMap","_React$PureComponent","_super","_this2","state","mapRef","getInstance","Map","panTo","latLng","setMapCallback","onLoad","getRef","ref","setState","onUnmount","id","style","mapContainerStyle","className","mapContainerClassName","Provider","children","__rest$1","t","p","hasOwnProperty","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","rejected","then","isBrowser","document","injectScript","_ref2","url","nonce","existingScript","getElementById","windowWithGoogleMap","dataStateAttribute","getAttribute","src","originalInitMap","initMap","originalErrorCallback","onerror","remove","script","createElement","type","async","setAttribute","head","appendChild","catch","console","isRobotoStyle","element","href","tagName","toLowerCase","styleSheet","cssText","innerHTML","preventGoogleFonts","getElementsByTagName","trueInsertBefore","insertBefore","bind","newElement","referenceElement","trueAppend","textNode","makeLoadScriptUrl","_ref3","googleMapsApiKey","googleMapsClientId","_ref3$version","version","language","region","libraries","channel","mapIds","params","concat","sort","join","cleaningUp","DefaultLoadingElement","previouslyLoadedUrl","defaultLoadScriptProps","LoadScript","_React$PureComponent2","_super2","_this3","check","loaded","cleanupCallback","isCleaningUp","_callee","promiseCallback","_context","prev","timer","setInterval","clearInterval","abrupt","stop","cleanup","parentNode","removeChild","filter","includes","link","innerText","preventGoogleFontsLoading","injectScriptOptions","onError","warn","_this4","setTimeout","current","loadingElement","useLoadScript","_ref4","_ref4$id","_ref4$version","isMounted","_React$useState","_React$useState2","isLoaded","setLoaded","_React$useState3","_React$useState4","loadError","setLoadError","setLoadedIfMounted","prevLibraries","defaultProps","defaultLoadingElement","LoadScriptNext$1","_a","_useLoadScript","fastDeepEqual","equal","RegExp","source","flags","DEFAULT_ID","Loader","_ref5","apiKey","client","_ref5$id","_ref5$libraries","_ref5$retries","retries","_ref5$url","CALLBACK","callbacks","loading","errors","JSON","stringify","get","loadPromise","_this5","loadCallback","execute","callback","createUrl","loadErrorCallback","defer","deleteScript","onerrorEvent","failed","reset","_this6","delay","Math","pow","log","setScript","__googleMapsCallback","_this7","cb","resetIfRetryingFailed","setCallback","useJsApiLoader","_ref6","_ref6$id","_ref6$version","_React$useState5","_React$useState6","_React$useState7","_React$useState8","loader","load","eventMap$h","updaterMap$h","_options2","TrafficLayer","_PureComponent","_super3","_this8","trafficLayer","setTrafficLayerCallback","assign","context","setMap","PureComponent","contextType","BicyclingLayer","_React$PureComponent3","_super4","_this9","bicyclingLayer","setBicyclingLayerCallback","TransitLayer","_React$PureComponent4","_super5","_this10","transitLayer","setTransitLayerCallback","eventMap$g","onCircleComplete","onMarkerComplete","onOverlayComplete","onPolygonComplete","onPolylineComplete","onRectangleComplete","updaterMap$g","drawingMode","_drawingMode","setDrawingMode","_options3","DrawingManager","_React$PureComponent5","_super6","_this11","drawingManager","setDrawingManagerCallback","drawing","eventMap$f","onAnimationChanged","onClickableChanged","onCursorChanged","onDraggableChanged","onFlatChanged","onIconChanged","onPositionChanged","onShapeChanged","onTitleChanged","onVisibleChanged","onZindexChanged","updaterMap$f","animation","_animation","setAnimation","_clickable","setClickable","cursor","_cursor","setCursor","draggable","_draggable","setDraggable","icon","_icon","setIcon","label","_label","setLabel","_map2","opacity","_opacity","setOpacity","_options4","position","_position","setPosition","shape","_shape","setShape","title","_title","setTitle","visible","_visible","setVisible","zIndex","_zIndex","setZIndex","Marker","_React$PureComponent6","_super7","_this12","markerOptions","clusterer","marker","addMarker","noClustererRedraw","removeMarker","_this13","child","elementChild","anchor","ClusterIcon","cluster","styles","getClusterer","extend","OverlayView","clusterClassName","getClusterClass","div","sums","boundsChangedListener","height","width","anchorText","anchorIcon","textColor","textSize","textDecoration","fontWeight","fontStyle","fontFamily","backgroundPosition","getMap","onAdd","cMouseDownInCluster","cDraggingMapByCluster","_this","show","getPanes","overlayMouseTarget","addDomListener","markerClusterer_1","trigger","getZoomOnClick","maxZoom_1","getMaxZoom","bounds_1","getBounds","fitBounds","getZoom","cancelBubble","stopPropagation","onRemove","hide","clearInstanceListeners","draw","getPosFromLatLng","x","y","top","left","display","img","divTitle","bp","split","spriteH","parseInt","spriteV","pos","getTitle","createCss","enableRetinaIcons","text","useStyle","getStyles","min","max","index","latlng","getProjection","fromLatLngToDivPixel","Cluster$1","Cluster","markerClusterer","gridSize","getGridSize","minClusterSize","getMinimumClusterSize","averageCenter","getAverageCenter","markers","bounds","clusterIcon","getSize","getMarkers","getCenter","LatLngBounds","getPosition","isMarkerAlreadyAdded","length_1","LatLng","lat","lng","calculateBounds","isAdded","mCount","maxZoom","isMarkerInClusterBounds","contains","getExtendedBounds","updateIcon","getCalculator","CALCULATOR","numStyles","count","numberOfDigits","IMAGE_SIZES","Clusterer","optMarkers","optOptions","clusters","listeners","activeMap","ready","minimumClusterSize","zoomOnClick","ignoreHidden","imagePath","imageExtension","imageSizes","calculator","batchSize","batchSizeIE","clusterClass","navigator","userAgent","timerRefStatic","setupStyles","addMarkers","repaint","resetViewport","redraw","fitMapToMarkers","setGridSize","setMinimumClusterSize","setMaxZoom","setStyles","setZoomOnClick","setAverageCenter","getIgnoreHidden","setIgnoreHidden","getEnableRetinaIcons","setEnableRetinaIcons","getImageExtension","setImageExtension","getImagePath","setImagePath","getImageSizes","setImageSizes","setCalculator","getBatchSizeIE","setBatchSizeIE","setClusterClass","getTotalMarkers","getClusters","getTotalClusters","optNoDraw","pushMarkerTo","getDraggable","removeMarker_","splice","removed","removeMarkers","clearMarkers","oldClusters","projection","trPix","getNorthEast","blPix","getSouthWest","fromDivPixelToLatLng","createClusters","optHide","distanceBetweenPoints","p1","p2","dLat","PI","dLon","sin","cos","atan2","sqrt","isMarkerInBounds","addToClosestCluster","distance","clusterToAddTo","iFirst","clearTimeout","mapBounds","iLast","getVisible","obj1","obj2","object","property","eventMap$e","onClusteringBegin","onClusteringEnd","updaterMap$e","_averageCenter","_batchSizeIE","_calculator","_clusterClass","_enableRetinaIcons","_gridSize","_ignoreHidden","_imageExtension","_imagePath","_imageSizes","_maxZoom","_minimumClusterSize","_styles","_title2","_zoomOnClick","ClustererComponent","_React$PureComponent7","_super8","_this14","setClustererCallback","InfoBox","content","disableAutoPan","maxWidth","pixelOffset","Size","boxClass","boxStyle","closeBoxMargin","closeBoxURL","infoBoxClearance","isHidden","alignBottom","pane","enableEventPropagation","closeListener","moveListener","mapListener","contextListener","eventListeners","fixedWidthSet","createInfoBoxDiv","cancelHandler","setBoxStyle","getCloseBoxImg","addClickHandler","offsetWidth","bw","getBoxWidths","right","panBox","returnValue","preventDefault","firstChild","closeBox","getCloseClickHandler","close","disablePan","xOffset","yOffset","mapDiv","getDiv","mapWidth","mapHeight","offsetHeight","iwOffsetX","iwOffsetY","iwWidth","iwHeight","padX","padY","pixPosition","fromLatLngToContainerPixel","panBy","webkitTransform","parseFloat","msFilter","visibility","overflow","bottom","defaultView","getComputedStyle","ownerDocument","computedStyle","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","documentElement","currentStyle","setContent","isVisible","getContent","getZIndex","open","eventMap$d","onCloseClick","onContentChanged","onDomReady","updaterMap$d","_options5","_position2","_visible2","_zIndex2","InfoBoxComponent","_React$PureComponent8","_super9","_this15","containerElement","infoBox","setInfoBoxCallback","_this15$props","positionLatLng","infoBoxOptions","earthRadius","factors","centimeters","centimetres","degrees","feet","inches","kilometers","kilometres","meters","metres","miles","millimeters","millimetres","nauticalmiles","radians","yards","point","coordinates","properties","isNumber","geom","feat","bbox","geometry","feature","featureCollection","features","fc","radiansToLength","units","factor","degreesToRadians","convertLength","originalUnit","finalUnit","lengthToRadians","num","isNaN","clone","geojson","cloneFeature","cloned","cloneFeatureCollection","cloneGeometry","cloneProperties","item","geometries","deepSlice","coords","coord","coordEach","excludeWrapCoord","j","k","l","stopG","geometryMaybeCollection","isGeometryCollection","wrapShrink","coordIndex","isFeatureCollection","isFeature","featureIndex","geomIndex","multiFeatureIndex","geometryIndex","geomType","coordAll","distance$1","eudist","v1","v2","sum","mandist","abs","dist","eudist$1","kinit","kmrand","data","ks","multi","floor","random","kmpp","dists","lk","dsum","prs","Infinity","_dist","_i","_i2","v","pr","cs","_i3","rnd","idx","init","val","main","initial","maxit","old","idxs","conv","vlen","_idxs","_idx","_j","_j2","vsum","vect","h","_j3","ksj","sumj","oldj","cj","_h","_h2","_j4","_j5","centroids","getCoord","to","coordinates1","coordinates2","lat1","lat2","lib","exports","DBSCAN","module","dataset","epsilon","minPts","distanceFunction","_euclideanDistance","noise","_visited","_assigned","_datasetLength","_init","run","pointId","neighbors","_regionQuery","clusterId","_addToCluster","_expandCluster","pointId2","neighbors2","_mergeArrays","q","KMEANS","assignments","randomCentroid","change","centroidId","mean","maxDim","dim","centroid","maxId","round","closestCentroid","argmin","Number","MAX_VALUE","arg","diff","OPTICS","PriorityQueue","elements","priorities","sorting","_queue","_priorities","_sorting","insert","ele","priority","indexToInsert","priority2","_insertAt","func","getElements","getElementPriority","getPriorities","getElementsWithPriorities","PriorityQueue$1","_reachability","_processed","_coreDistance","_orderedList","priorityQueue","_distanceToCore","_updateQueue","getReachabilityPlot","reachabilityPlot","queue","newReachableDistance","queueElements","coreDistCand","clustering","supercluster","sortKD","ids","nodeSize","depth","m","select","inc","z","exp","sd","swapItem","swap","tmp","range","minX","minY","maxX","maxY","stack","axis","pop","nextAxis","within","qx","qy","r","r2","sqDist","ax","ay","bx","by","dx","dy","defaultGetX","defaultGetY","KDBush","points","getX","getY","ArrayType","Float64Array","IndexArrayType","Uint16Array","Uint32Array","defaultOptions","minZoom","minPoints","radius","extent","generateId","fround","Float32Array","Supercluster","create","trees","createCluster","numPoints","parentId","createPointCluster","lngX","latY","getClusterJSON","getClusterProperties","xLng","yLat","abbrev","cluster_id","point_count","point_count_abbreviated","y2","atan","dest","time","timerId","timeEnd","now","Date","_cluster","minLng","minLat","maxLng","maxLat","easternHem","westernHem","tree","_limitZoom","list","getChildren","originId","_getOriginId","originZoom","_getOriginZoom","errorMsg","origin","getLeaves","limit","offset","leaves","_appendLeaves","getTile","z2","tile","_addTileFeatures","getClusterExpansionZoom","expansionZoom","skipped","i$1","isCluster","tags","px","py","neighborIds","numPointsOrigin","neighborId","wx","wy","clusterProperties","_map","i$2","list$1","neighborId$1","b$1","numPoints2","i$3","list$2","neighborId$2","b$2","original","factory","SuperCluster","es6","size","_step","_iterator","entries","has","_step2","_iterator2","Set","_step3","_iterator3","ArrayBuffer","isView","__rest","_ref7","filterMarkersToPaddedViewport","mapCanvasProjection","viewportPadding","extendedMapBounds","extendBoundsToPaddedViewport","pixels","_latLngBoundsToPixelB","latLngBoundsToPixelBounds","northEast","southWest","extendedPixelBounds","extendPixelBounds","pixelBoundsToLatLngBounds","_ref8","_ref9","AbstractAlgorithm","_ref10","_ref10$maxZoom","_ref11","noop$1","AbstractViewportAlgorithm","_AbstractAlgorithm","_super10","_this16","_a$viewportPadding","_ref12","noop","changed","GridAlgorithm","_AbstractViewportAlgo","_super11","_this17","_a$maxDistance","maxDistance","_a$gridSize","_ref13","_this18","candidate","_distance","toJSON","_cluster2","NoopAlgorithm","_AbstractAlgorithm2","_super12","_ref14","input","KmeansAlgorithm","_AbstractViewportAlgo2","_super13","_this19","numberOfClusters","_ref15","mutate","initialCentroids","skmeansResult","featureEach","clustersKmeans","Function","DEFAULT_INTERNAL_DBSCAN_OPTION","DBScanAlgorithm","_AbstractViewportAlgo3","_super14","_this20","_a$maxDistance2","_a$minPoints","_ref16","projectedPoint","grouped","dbscan","clusteredIds","clusterIds","clusterPoint","noiseId","noisePoint","clustersDbscan","SuperClusterAlgorithm","_AbstractAlgorithm3","_super15","_this21","_a$radius","superCluster","_ref17","transformCluster","_ref18","_ref18$geometry$coord","leaf","ClusterStats","clusterMarkerCounts","clusterMarkerSum","DefaultRenderer","_ref19","stats","color","svg","btoa","scaledSize","fontSize","MAX_ZINDEX","MarkerClustererEvents","OverlayViewSafe","type1","type2","defaultOnClusterClickHandler","_","MarkerClusterer","_OverlayViewSafe","_super16","_ref20","_this22","_ref20$markers","_ref20$algorithm","algorithm","_ref20$renderer","renderer","_ref20$onClusterClick","onClusterClick","noDraw","render","_this23","_this24","CLUSTERING_BEGIN","_this$algorithm$calcu","calculate","renderClusters","CLUSTERING_END","idleListener","delete","_this25","CLUSTER_CLICK","index_esm","freeze","__proto__","GoogleMarkerClusterer","_ref21","_useState","useState","_useState2","setMarkerClusterer","useEffect","markerCluster","useGoogleMarkerClusterer","eventMap$c","updaterMap$c","_options6","_position3","_zIndex3","InfoWindow","_React$PureComponent9","_super17","_this26","infoWindow","setInfoWindowCallback","eventMap$b","updaterMap$b","_draggable2","editable","_editable","setEditable","_map3","_options7","path","_path","setPath","_visible3","Polyline","_React$PureComponent10","_super18","_this27","polyline","setPolylineCallback","eventMap$a","updaterMap$a","_draggable3","_editable2","_map4","_options8","_path2","paths","_paths","setPaths","_visible4","Polygon","_React$PureComponent11","_super19","_this28","polygon","setPolygonCallback","eventMap$9","updaterMap$9","_bounds","setBounds","_draggable4","_editable3","_map5","_options9","_visible5","Rectangle","_React$PureComponent12","_super20","_this29","rectangle","setRectangleCallback","eventMap$8","onRadiusChanged","updaterMap$8","_center2","_draggable5","_editable4","_map6","_options10","_radius","setRadius","_visible6","Circle","_React$PureComponent13","_super21","_this30","circle","setCircleCallback","eventMap$7","onAddFeature","onRemoveFeature","onRemoveProperty","onSetGeometry","onSetProperty","updaterMap$7","add","addgeojson","addGeoJson","foreach","loadgeojson","loadGeoJson","overridestyle","overrideStyle","revertstyle","revertStyle","controlposition","controlPosition","setControlPosition","controls","_controls","setControls","drawingmode","mode","_map7","_style","setStyle","togeojson","toGeoJson","Data","_React$PureComponent14","_super22","_this31","setDataCallback","eventMap$6","onDefaultViewportChanged","onStatusChanged","updaterMap$6","_options11","_url","setUrl","_zIndex4","KmlLayer","_PureComponent2","_super23","_this32","kmlLayer","setKmlLayerCallback","createLatLng","inst","Type","createLatLngBounds","ne","sw","ensureOfType","convertToLatLngString","latLngLike","convertToLatLngBoundsString","latLngBoundsLike","south","east","north","west","_React$PureComponent15","_super24","_this33","paneEl","containerStyle","updatePane","mapPaneName","mapPanes","overlayView","_b","onPositionElement","getPixelPositionOffset","currentPosition","previousPosition","layoutStyles","getLayoutStylesByBounds","getLayoutStylesByPosition","getLayoutStyles","containerRef","_this33$state$contain","prevPositionString","positionString","prevBoundsString","boundsString","FLOAT_PANE","MAP_PANE","MARKER_LAYER","OVERLAY_LAYER","OVERLAY_MOUSE_TARGET","eventMap$5","updaterMap$5","_opacity2","GroundOverlay","_React$PureComponent16","_super25","_this34","groundOverlay","setGroundOverlayCallback","eventMap$4","updaterMap$4","_data","setData","_map8","_options12","HeatmapLayer","_React$PureComponent17","_super26","_this35","heatmapLayer","setHeatmapLayerCallback","visualization","eventMap$3","onPanoChanged","onPovChanged","updaterMap$3","register","provider","registerPanoProvider","links","_links","setLinks","motionTracking","_motionTracking","setMotionTracking","_options13","pano","_pano","setPano","_position4","pov","_pov","setPov","_visible7","_zoom2","StreetViewPanorama","_React$PureComponent18","_super27","_this36","streetViewPanorama","setStreetViewPanoramaCallback","getStreetView","StreetViewService","_React$PureComponent19","_super28","_this37","streetViewService","setStreetViewServiceCallback","DirectionsService","_React$PureComponent20","_super29","_this38","directionsService","setDirectionsServiceCallback","route","eventMap$2","onDirectionsChanged","updaterMap$2","directions","_directions","setDirections","_map9","_options14","panel","_panel","setPanel","routeIndex","_routeIndex","setRouteIndex","DirectionsRenderer","_React$PureComponent21","_super30","_this39","directionsRenderer","setDirectionsRendererCallback","DistanceMatrixService","_React$PureComponent22","_super31","_this40","distanceMatrixService","setDistanceMatrixServiceCallback","getDistanceMatrix","eventMap$1","onPlacesChanged","updaterMap$1","_bounds2","StandaloneSearchBox","_React$PureComponent23","_super32","_this41","searchBox","setSearchBoxCallback","places","querySelector","SearchBox","onPlaceChanged","_bounds3","restrictions","_restrictions","setComponentRestrictions","fields","_fields","setFields","_options15","types","_types","setTypes","Autocomplete","_React$PureComponent24","_super33","_this42","autocomplete","setAutocompleteCallback"],"sourceRoot":""}