Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-google-maps/marker-clusterer

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-google-maps/marker-clusterer - npm Package Compare versions

Comparing version 2.9.0 to 2.10.0

39

dist/cjs.js

@@ -49,7 +49,7 @@ 'use strict';

});
google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {
google.maps.event.addListener(this.div, 'mousedown', function onMouseDown() {
cMouseDownInCluster = true;
cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
google.maps.event.addListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -93,3 +93,3 @@ if (!cDraggingMapByCluster) {

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addListener(this.div, 'mouseover', function () {
/**

@@ -103,3 +103,3 @@ * This event is fired when the mouse moves over a cluster marker.

});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
google.maps.event.addListener(this.div, 'mouseout', function () {
/**

@@ -227,2 +227,3 @@ * This event is fired when the mouse moves out of a cluster marker.

this.markerClusterer = markerClusterer;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -265,5 +266,7 @@ this.map = this.markerClusterer.getMap();

Cluster.prototype.remove = function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -356,7 +359,5 @@ delete this.markers;

}
else {
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}

@@ -435,2 +436,3 @@ }

this.addMarkers(optMarkers, true);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -441,2 +443,3 @@ this.setMap(map); // Note: this causes onAdd to be called

var _this = this;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -449,2 +452,3 @@ this.activeMap = this.getMap();

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -459,4 +463,6 @@ this.getMap(), 'zoom_changed', function () {

if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -468,2 +474,3 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -518,2 +525,3 @@ this.getMap(), 'idle', function () {

}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -710,2 +718,3 @@ this.getMap().fitBounds(bounds);

Clusterer.prototype.getExtendedBounds = function (bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -812,2 +821,3 @@ var projection = this.getProjection();

window.clearTimeout(this.timerRefStatic);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -822,5 +832,7 @@ delete this.timerRefStatic;

var mapBounds =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3
? new google.maps.LatLngBounds(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -830,2 +842,3 @@ this.getMap()

.getSouthWest(),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -840,6 +853,4 @@ this.getMap()

var marker = this.markers[i];
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds)) {
if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {
this.addToClosestCluster(marker);
}
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {
this.addToClosestCluster(marker);
}

@@ -871,5 +882,7 @@ }

for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -876,0 +889,0 @@ return this;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,o){void 0===r&&(r=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||s,this.calculator=o.calculator||i,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(i=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();exports.Cluster=e,exports.ClusterIcon=t,exports.Clusterer=r;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,o){void 0===r&&(r=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||s,this.calculator=o.calculator||i,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(i=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();exports.Cluster=e,exports.ClusterIcon=t,exports.Clusterer=r;
//# sourceMappingURL=cjs.min.js.map

@@ -45,7 +45,7 @@ var ClusterIcon = /** @class */ (function () {

});
google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {
google.maps.event.addListener(this.div, 'mousedown', function onMouseDown() {
cMouseDownInCluster = true;
cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
google.maps.event.addListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -89,3 +89,3 @@ if (!cDraggingMapByCluster) {

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addListener(this.div, 'mouseover', function () {
/**

@@ -99,3 +99,3 @@ * This event is fired when the mouse moves over a cluster marker.

});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
google.maps.event.addListener(this.div, 'mouseout', function () {
/**

@@ -223,2 +223,3 @@ * This event is fired when the mouse moves out of a cluster marker.

this.markerClusterer = markerClusterer;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -261,5 +262,7 @@ this.map = this.markerClusterer.getMap();

Cluster.prototype.remove = function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -352,7 +355,5 @@ delete this.markers;

}
else {
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}

@@ -431,2 +432,3 @@ }

this.addMarkers(optMarkers, true);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -437,2 +439,3 @@ this.setMap(map); // Note: this causes onAdd to be called

var _this = this;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -445,2 +448,3 @@ this.activeMap = this.getMap();

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -455,4 +459,6 @@ this.getMap(), 'zoom_changed', function () {

if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -464,2 +470,3 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -514,2 +521,3 @@ this.getMap(), 'idle', function () {

}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -706,2 +714,3 @@ this.getMap().fitBounds(bounds);

Clusterer.prototype.getExtendedBounds = function (bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -808,2 +817,3 @@ var projection = this.getProjection();

window.clearTimeout(this.timerRefStatic);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -818,5 +828,7 @@ delete this.timerRefStatic;

var mapBounds =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3
? new google.maps.LatLngBounds(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -826,2 +838,3 @@ this.getMap()

.getSouthWest(),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -836,6 +849,4 @@ this.getMap()

var marker = this.markers[i];
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds)) {
if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {
this.addToClosestCluster(marker);
}
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {
this.addToClosestCluster(marker);
}

@@ -867,5 +878,7 @@ }

for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -872,0 +885,0 @@ return this;

@@ -1,2 +0,2 @@

var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,o){void 0===r&&(r=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||s,this.calculator=o.calculator||i,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(i=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();export{e as Cluster,t as ClusterIcon,r as Clusterer};
var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),o=i.cluster.getBounds();r.getMap().fitBounds(o),setTimeout((function(){r.getMap().fitBounds(o),null!==n&&r.getMap().getZoom()>n&&r.getMap().setZoom(n+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),n=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(n.y,"px"),this.div.style.left="".concat(n.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var o=document.createElement("img");o.alt=e,o.src=this.url,o.style.position="absolute",o.style.top="".concat(r,"px"),o.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(o.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(o),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),n=this.map.getZoom();if(null!==r&&void 0!==n&&n>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var o=0;o<s;o++)this.markers[o].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,n){void 0===r&&(r=[]),void 0===n&&(n={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,void 0!==n.zoomOnClick&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,void 0!==n.averageCenter&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,void 0!==n.ignoreHidden&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,void 0!==n.enableRetinaIcons&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=n.imageExtension||"png",this.imageSizes=n.imageSizes||s,this.calculator=n.calculator||i,this.batchSize=n.batchSize||2e3,this.batchSizeIE=n.batchSizeIE||500,this.clusterClass=n.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,n=0;n<this.clusters.length;n++){var o=(i=this.clusters[n]).getCenter(),a=t.getPosition();if(o&&a){var h=this.distanceBetweenPoints(o,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),n=t;n<r;n++){var o=this.markers[n];!o.isAdded&&this.isMarkerInBounds(o,s)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(n=0;n<this.clusters.length;n++)this.clusters[n].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();export{e as Cluster,t as ClusterIcon,r as Clusterer};
//# sourceMappingURL=esm.min.js.map

@@ -51,7 +51,7 @@ (function (global, factory) {

});
google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {
google.maps.event.addListener(this.div, 'mousedown', function onMouseDown() {
cMouseDownInCluster = true;
cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
google.maps.event.addListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -95,3 +95,3 @@ if (!cDraggingMapByCluster) {

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addListener(this.div, 'mouseover', function () {
/**

@@ -105,3 +105,3 @@ * This event is fired when the mouse moves over a cluster marker.

});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
google.maps.event.addListener(this.div, 'mouseout', function () {
/**

@@ -229,2 +229,3 @@ * This event is fired when the mouse moves out of a cluster marker.

this.markerClusterer = markerClusterer;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -267,5 +268,7 @@ this.map = this.markerClusterer.getMap();

Cluster.prototype.remove = function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -358,7 +361,5 @@ delete this.markers;

}
else {
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}
for (var i = 0; i < this.markers.length; i++) {
if (marker === this.markers[i]) {
return true;
}

@@ -437,2 +438,3 @@ }

this.addMarkers(optMarkers, true);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -443,2 +445,3 @@ this.setMap(map); // Note: this causes onAdd to be called

var _this = this;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -451,2 +454,3 @@ this.activeMap = this.getMap();

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -461,4 +465,6 @@ this.getMap(), 'zoom_changed', function () {

if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -470,2 +476,3 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

google.maps.event.addListener(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -520,2 +527,3 @@ this.getMap(), 'idle', function () {

}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -712,2 +720,3 @@ this.getMap().fitBounds(bounds);

Clusterer.prototype.getExtendedBounds = function (bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -814,2 +823,3 @@ var projection = this.getProjection();

window.clearTimeout(this.timerRefStatic);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -824,5 +834,7 @@ delete this.timerRefStatic;

var mapBounds =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3
? new google.maps.LatLngBounds(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -832,2 +844,3 @@ this.getMap()

.getSouthWest(),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -842,6 +855,4 @@ this.getMap()

var marker = this.markers[i];
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds)) {
if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {
this.addToClosestCluster(marker);
}
if (!marker.isAdded && this.isMarkerInBounds(marker, bounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {
this.addToClosestCluster(marker);
}

@@ -873,5 +884,7 @@ }

for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -878,0 +891,0 @@ return this;

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).markerClusterer={})}(this,(function(t){"use strict";var e=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),i=function(){function t(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new e(this,this.markerClusterer.getStyles())}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},t.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},t}(),s=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},r=[53,56,66,78,90],o=function(){function t(e,i,o){void 0===i&&(i=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||r,this.calculator=o.calculator||s,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(i,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var e,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(e=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=e)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((e=new i(this)).addMarker(t),this.clusters.push(e))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();t.Cluster=i,t.ClusterIcon=e,t.Clusterer=o,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).markerClusterer={})}(this,(function(t){"use strict";var e=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}return t.prototype.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),i=function(){function t(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new e(this,this.markerClusterer.getStyles())}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}else(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},t.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},t}(),s=function(t,e){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},r=[53,56,66,78,90],o=function(){function t(e,i,o){void 0===i&&(i=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||r,this.calculator=o.calculator||s,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(i,!0),this.setMap(e)}return t.prototype.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var e,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(e=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=e)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((e=new i(this)).addMarker(t),this.clusters.push(e))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();t.Cluster=i,t.ClusterIcon=e,t.Clusterer=o,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=umd.min.js.map
{
"name": "@react-google-maps/marker-clusterer",
"sideEffects": false,
"version": "2.9.0",
"version": "2.10.0",
"description": "Marker Clusterer for React.js Google Maps API",

@@ -54,54 +54,17 @@ "license": "MIT",

},
"dependencies": {
"@typescript/lib-dom": "npm:@types/web"
},
"devDependencies": {
"@getify/eslint-plugin-proper-arrows": "11.0.3",
"@rollup/plugin-commonjs": "21.0.3",
"@rollup/plugin-node-resolve": "13.1.3",
"@rollup/plugin-typescript": "8.3.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-node-resolve": "13.2.1",
"@rollup/plugin-typescript": "8.3.2",
"@types/babel-types": "7.0.11",
"@types/google.maps": "3.48.3",
"@types/jest": "27.4.1",
"@typescript-eslint/eslint-plugin": "5.17.0",
"@typescript-eslint/parser": "5.17.0",
"eslint": "8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "17.0.0-0",
"eslint-import-resolver-typescript": "2.7.1",
"eslint-plugin-ascii": "1.0.0",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-html": "6.2.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jest": "^26.1.3",
"eslint-plugin-jest-dom": "^4.0.1",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-n": "^15.1.0",
"eslint-plugin-no-inferred-method-name": "2.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "6.0.0",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-functional-set-state": "1.2.1",
"eslint-plugin-react-hooks": "4.4.0",
"eslint-plugin-react-perf": "3.3.1",
"eslint-plugin-security-node": "^1.1.1",
"eslint-plugin-standard": "5.0.0",
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
"@types/google.maps": "3.48.5",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"prettier": "^2.6.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"rimraf": "3.0.2",
"rollup": "2.70.1",
"rollup-plugin-dts": "4.2.0",
"rollup-plugin-terser": "7.0.2",
"ts-jest": "27.1.4",
"typescript": "4.6.3"
"rollup": "2.70.2",
"rollup-plugin-dts": "4.2.1",
"rollup-plugin-terser": "7.0.2"
},
"gitHead": "80167ddcc3d8e356dbf0b0c3a6292c6a3a989f83"
}

@@ -46,7 +46,7 @@ /* eslint-disable filenames/match-exported */

export {
ClusterIconInfo,
ClusterIconStyle,
MarkerExtended,
TCalculator,
ClustererOptions,
type ClusterIconInfo,
type ClusterIconStyle,
type MarkerExtended,
type TCalculator,
type ClustererOptions,
} from './types'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc