@mattilsynet/design 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import P from "../styles.module.css.js";
2
2
  import { getByCSSModule as _, onHotReload as h, on as r, QUICK_EVENT as m, debounce as E } from "../utils.js";
3
- import "./app-toggle2.js";
3
+ import "./app-toggle.js";
4
4
  const y = P.app.split(" ")[0], I = `[data-command="toggle-app-expanded"],.${y} > [command="show-modal"]`, u = `.${y} > dialog,.${y} dialog ~ main`, S = _("sticky"), w = (t) => {
5
5
  document.startViewTransition ? document.startViewTransition(t) : t();
6
6
  }, x = (t) => (
@@ -1,27 +1,11 @@
1
- const t = `if (
2
- typeof window !== "undefined" &&
3
- window.CSSStyleSheet &&
4
- document.adoptedStyleSheets
5
- )
6
- (() => {
7
- const key = "--mtds-app-expanded";
8
- const sheet = new CSSStyleSheet();
9
- const prev = () => !window.localStorage.getItem(key)?.includes("false");
10
-
11
- document.adoptedStyleSheets.push(sheet);
12
- window.mtdsToggleAppExpanded = (force) => {
13
- try {
14
- const next = force ?? !prev();
15
- sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
16
- window.localStorage.setItem(key, next);
17
- } catch (_err) {} // localStorage is full or replaceSync is not supported
18
- };
19
-
20
- // Set and store initial state
21
- window.mtdsToggleAppExpanded(prev());
22
- })();
23
- `;
24
- export {
25
- t as default
26
- };
1
+ typeof window < "u" && window.CSSStyleSheet && document.adoptedStyleSheets && (() => {
2
+ const e = "--mtds-app-expanded", d = new CSSStyleSheet(), o = () => !window.localStorage.getItem(e)?.includes("false");
3
+ document.adoptedStyleSheets.push(d), window.mtdsToggleAppExpanded = (n) => {
4
+ try {
5
+ const t = n ?? !o();
6
+ d.replaceSync?.(`:root { ${e}: var(${e}--${t})}`), window.localStorage.setItem(e, t);
7
+ } catch {
8
+ }
9
+ }, window.mtdsToggleAppExpanded(o());
10
+ })();
27
11
  //# sourceMappingURL=app-toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js?raw"],"sourcesContent":["export default \"if (\\n\\ttypeof window !== \\\"undefined\\\" &&\\n\\twindow.CSSStyleSheet &&\\n\\tdocument.adoptedStyleSheets\\n)\\n\\t(() => {\\n\\t\\tconst key = \\\"--mtds-app-expanded\\\";\\n\\t\\tconst sheet = new CSSStyleSheet();\\n\\t\\tconst prev = () => !window.localStorage.getItem(key)?.includes(\\\"false\\\");\\n\\n\\t\\tdocument.adoptedStyleSheets.push(sheet);\\n\\t\\twindow.mtdsToggleAppExpanded = (force) => {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tconst next = force ?? !prev();\\n\\t\\t\\t\\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\\n\\t\\t\\t\\twindow.localStorage.setItem(key, next);\\n\\t\\t\\t} catch (_err) {} // localStorage is full or replaceSync is not supported\\n\\t\\t};\\n\\n\\t\\t// Set and store initial state\\n\\t\\twindow.mtdsToggleAppExpanded(prev());\\n\\t})();\\n\""],"names":["script"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (\n\ttypeof window !== \"undefined\" &&\n\twindow.CSSStyleSheet &&\n\tdocument.adoptedStyleSheets\n)\n\t(() => {\n\t\tconst key = \"--mtds-app-expanded\";\n\t\tconst sheet = new CSSStyleSheet();\n\t\tconst prev = () => !window.localStorage.getItem(key)?.includes(\"false\");\n\n\t\tdocument.adoptedStyleSheets.push(sheet);\n\t\twindow.mtdsToggleAppExpanded = (force) => {\n\t\t\ttry {\n\t\t\t\tconst next = force ?? !prev();\n\t\t\t\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\n\t\t\t\twindow.localStorage.setItem(key, next);\n\t\t\t} catch (_err) {} // localStorage is full or replaceSync is not supported\n\t\t};\n\n\t\t// Set and store initial state\n\t\twindow.mtdsToggleAppExpanded(prev());\n\t})();\n"],"names":["key","sheet","prev","force","next"],"mappings":"AACC,OAAO,SAAW,OAClB,OAAO,iBACP,SAAS,uBAER,MAAM;AACN,QAAMA,IAAM,uBACNC,IAAQ,IAAI,cAAa,GACzBC,IAAO,MAAM,CAAC,OAAO,aAAa,QAAQF,CAAG,GAAG,SAAS,OAAO;AAEtE,WAAS,mBAAmB,KAAKC,CAAK,GACtC,OAAO,wBAAwB,CAACE,MAAU;AACzC,QAAI;AACH,YAAMC,IAAOD,KAAS,CAACD,EAAI;AAC3B,MAAAD,EAAM,cAAc,WAAWD,CAAG,SAASA,CAAG,KAAKI,CAAI,IAAI,GAC3D,OAAO,aAAa,QAAQJ,GAAKI,CAAI;AAAA,IACtC,QAAe;AAAA,IAAC;AAAA,EACjB,GAGA,OAAO,sBAAsBF,GAAM;AACpC,GAAC;"}
@@ -1,11 +1,27 @@
1
- typeof window < "u" && window.CSSStyleSheet && document.adoptedStyleSheets && (() => {
2
- const e = "--mtds-app-expanded", d = new CSSStyleSheet(), o = () => !window.localStorage.getItem(e)?.includes("false");
3
- document.adoptedStyleSheets.push(d), window.mtdsToggleAppExpanded = (n) => {
4
- try {
5
- const t = n ?? !o();
6
- d.replaceSync?.(`:root { ${e}: var(${e}--${t})}`), window.localStorage.setItem(e, t);
7
- } catch {
8
- }
9
- }, window.mtdsToggleAppExpanded(o());
10
- })();
1
+ const t = `if (
2
+ typeof window !== "undefined" &&
3
+ window.CSSStyleSheet &&
4
+ document.adoptedStyleSheets
5
+ )
6
+ (() => {
7
+ const key = "--mtds-app-expanded";
8
+ const sheet = new CSSStyleSheet();
9
+ const prev = () => !window.localStorage.getItem(key)?.includes("false");
10
+
11
+ document.adoptedStyleSheets.push(sheet);
12
+ window.mtdsToggleAppExpanded = (force) => {
13
+ try {
14
+ const next = force ?? !prev();
15
+ sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
16
+ window.localStorage.setItem(key, next);
17
+ } catch (_err) {} // localStorage is full or replaceSync is not supported
18
+ };
19
+
20
+ // Set and store initial state
21
+ window.mtdsToggleAppExpanded(prev());
22
+ })();
23
+ `;
24
+ export {
25
+ t as default
26
+ };
11
27
  //# sourceMappingURL=app-toggle2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (\n\ttypeof window !== \"undefined\" &&\n\twindow.CSSStyleSheet &&\n\tdocument.adoptedStyleSheets\n)\n\t(() => {\n\t\tconst key = \"--mtds-app-expanded\";\n\t\tconst sheet = new CSSStyleSheet();\n\t\tconst prev = () => !window.localStorage.getItem(key)?.includes(\"false\");\n\n\t\tdocument.adoptedStyleSheets.push(sheet);\n\t\twindow.mtdsToggleAppExpanded = (force) => {\n\t\t\ttry {\n\t\t\t\tconst next = force ?? !prev();\n\t\t\t\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\n\t\t\t\twindow.localStorage.setItem(key, next);\n\t\t\t} catch (_err) {} // localStorage is full or replaceSync is not supported\n\t\t};\n\n\t\t// Set and store initial state\n\t\twindow.mtdsToggleAppExpanded(prev());\n\t})();\n"],"names":["key","sheet","prev","force","next"],"mappings":"AACC,OAAO,SAAW,OAClB,OAAO,iBACP,SAAS,uBAER,MAAM;AACN,QAAMA,IAAM,uBACNC,IAAQ,IAAI,cAAa,GACzBC,IAAO,MAAM,CAAC,OAAO,aAAa,QAAQF,CAAG,GAAG,SAAS,OAAO;AAEtE,WAAS,mBAAmB,KAAKC,CAAK,GACtC,OAAO,wBAAwB,CAACE,MAAU;AACzC,QAAI;AACH,YAAMC,IAAOD,KAAS,CAACD,EAAI;AAC3B,MAAAD,EAAM,cAAc,WAAWD,CAAG,SAASA,CAAG,KAAKI,CAAI,IAAI,GAC3D,OAAO,aAAa,QAAQJ,GAAKI,CAAI;AAAA,IACtC,QAAe;AAAA,IAAC;AAAA,EACjB,GAGA,OAAO,sBAAsBF,GAAM;AACpC,GAAC;"}
1
+ {"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js?raw"],"sourcesContent":["export default \"if (\\n\\ttypeof window !== \\\"undefined\\\" &&\\n\\twindow.CSSStyleSheet &&\\n\\tdocument.adoptedStyleSheets\\n)\\n\\t(() => {\\n\\t\\tconst key = \\\"--mtds-app-expanded\\\";\\n\\t\\tconst sheet = new CSSStyleSheet();\\n\\t\\tconst prev = () => !window.localStorage.getItem(key)?.includes(\\\"false\\\");\\n\\n\\t\\tdocument.adoptedStyleSheets.push(sheet);\\n\\t\\twindow.mtdsToggleAppExpanded = (force) => {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tconst next = force ?? !prev();\\n\\t\\t\\t\\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\\n\\t\\t\\t\\twindow.localStorage.setItem(key, next);\\n\\t\\t\\t} catch (_err) {} // localStorage is full or replaceSync is not supported\\n\\t\\t};\\n\\n\\t\\t// Set and store initial state\\n\\t\\twindow.mtdsToggleAppExpanded(prev());\\n\\t})();\\n\""],"names":["script"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
package/mtds/app/app.js CHANGED
@@ -3,7 +3,7 @@ import a from "clsx";
3
3
  import { forwardRef as n } from "react";
4
4
  import { Button as m } from "../button/button.js";
5
5
  import s from "../styles.module.css.js";
6
- import d from "./app-toggle.js";
6
+ import d from "./app-toggle2.js";
7
7
  const u = n(function({ as: r, className: t, ...p }, e) {
8
8
  return /* @__PURE__ */ o(r || "div", { className: a(s.app, t), ref: e, ...p });
9
9
  }), f = n(function({ as: r, className: t, ...p }, e) {
@@ -24,7 +24,7 @@ class m extends C {
24
24
  "style",
25
25
  null,
26
26
  `@layer leaflet{${f}}
27
- @layer mt.v3-0-2design{${b}`
27
+ @layer mt.v3-0-3design{${b}`
28
28
  ),
29
29
  r("figure")
30
30
  );
@@ -600,7 +600,7 @@ path.leaflet-interactive:focus:not(:focus-visible) {
600
600
  print-color-adjust: exact;
601
601
  }
602
602
  }
603
- `;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,l=0,h=!0,d;if(this._map){const c=Date.now(),u=()=>{for(var p=Date.now();l<a&&!(s&&l%200===0&&Date.now()-p>o);l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const y=d.__parent.getAllChildMarkers(),g=y[0]===d?y[1]:y[0];e.removeLayer(g)}}r&&r(l,a,Date.now()-c),l===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(u,this.options.chunkDelay)};u()}else{const c=this._needsClustering;for(;l<a;l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let l=i;for(t=0;t<l;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),l=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var l=n.__parent,h=l._markers,d;for(this._arraySplice(h,n);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(d=l._markers[0]===n?l._markers[1]:l._markers[0],i[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),s[l._zoom].addObject(d,r.project(d.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(d),d.__parent=l.__parent,l._icon&&(o.removeLayer(l),e||o.addLayer(d))):l._iconNeedsUpdate=!0,l=l.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const l=a.__parent;l&&this._removeLayer(a,!1);const h=new this._markerCluster(this,t,a,n);e[t].addObject(h,this._map.project(h._cLatLng,t)),a.__parent=h,n.__parent=h;let d=h;for(r=t-1;r>l._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));l._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,l=r._markers,h;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=l.length-1;o>=0;o--)h=l[o],e.contains(h._latlng)||i.removeLayer(h)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,l;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,l=r._childCount,e+=a.lat*l,i+=a.lng*l;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,l;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)l=o[a],n.intersects(l._bounds)&&l._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,l;for(delete this._objectPoint[_.Util.stamp(n)],a=0,l=r.length;a<l;a++)if(r[a]===n)return r.splice(a,1),l===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,l,h=this._grid;for(e in h){r=h[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)l=n.call(t,a[s]),l&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,l,h,d,c=this._objectPoint,u=this._sqCellSize,p=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,l=a.length;o<l;o++)h=a[o],d=this._sqDist(c[_.Util.stamp(h)],n),d<u&&(u=d,p=h)}return p},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,l=null,h=null,d=null,c;for(c=n.length-1;c>=0;c--){const p=n[c];(t===!1||p.lat>t)&&(o=p,t=p.lat),(e===!1||p.lat<e)&&(r=p,e=p.lat),(i===!1||p.lng>i)&&(a=p,i=p.lng),(s===!1||p.lng<s)&&(l=p,s=p.lng)}e!==t?(d=r,h=o):(d=l,h=a);var u=[].concat(this.buildConvexHull([d,h],n),this.buildConvexHull([h,d],n));return u}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],l;for(a.length=n,l=n-1;l>=0;l--)r+=s/i+l*5e-4,a[l]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,l,h;for(e._ignoreMove=!0,r=0;r<n.length;r++)h=i.layerPointToLatLng(t[r]),a=n[r],l=new _.Polyline([this._latlng,h],o),i.addLayer(l),a._spiderLeg=l,a._preSpiderfyLatlng=a._latlng,a.setLatLng(h),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,l=Object.assign({},this._group.options.spiderLegPolylineOptions),h=l.opacity,d,c,u,p,y,g;for(h===void 0&&(h=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(l.opacity=0,l.className=`${l.className||""} leaflet-cluster-spider-leg`):l.opacity=h,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],g=i.layerPointToLatLng(t[d]),u=new _.Polyline([o,g],l),i.addLayer(u),c._spiderLeg=u,a&&(p=u._path,y=p.getTotalLength()+.1,p.style.strokeDasharray=y,p.style.strokeDashoffset=y),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)g=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(g),c.clusterShow&&c.clusterShow(),a&&(u=c._spiderLeg,p=u._path,p.style.strokeDashoffset=0,u.setStyle({opacity:h}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,l,h,d,c,u;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)a=o[l],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,u=!0,a._setPos&&(a._setPos(s),u=!1),a.clusterHide&&(a.clusterHide(),u=!1),u&&i.removeLayer(a),r&&(h=a._spiderLeg,d=h._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,h.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var p=0;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&p++;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),p>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Ve=()=>typeof window<"u"&&typeof document<"u";function Yn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}function A(n,t,e){return e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null)}const en=(n,...t)=>{const[e,...i]=t;for(const s of e.split(" "))n.addEventListener(s,...i);return()=>Ke(n,...t)},Ke=(n,...t)=>{const[e,...i]=t;for(const s of e.split(" "))n.removeEventListener(s,...i)},ce=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))A(i,s,o);return i},ue=typeof HTMLElement>"u"?class{}:HTMLElement,pe=(n,t)=>!Ve()||window.customElements.get(n)||window.customElements.define(n,t),Xn=`/**
603
+ `;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,l=0,h=!0,d;if(this._map){const c=Date.now(),u=()=>{for(var p=Date.now();l<a&&!(s&&l%200===0&&Date.now()-p>o);l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const y=d.__parent.getAllChildMarkers(),g=y[0]===d?y[1]:y[0];e.removeLayer(g)}}r&&r(l,a,Date.now()-c),l===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(u,this.options.chunkDelay)};u()}else{const c=this._needsClustering;for(;l<a;l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let l=i;for(t=0;t<l;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),l=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var l=n.__parent,h=l._markers,d;for(this._arraySplice(h,n);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(d=l._markers[0]===n?l._markers[1]:l._markers[0],i[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),s[l._zoom].addObject(d,r.project(d.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(d),d.__parent=l.__parent,l._icon&&(o.removeLayer(l),e||o.addLayer(d))):l._iconNeedsUpdate=!0,l=l.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const l=a.__parent;l&&this._removeLayer(a,!1);const h=new this._markerCluster(this,t,a,n);e[t].addObject(h,this._map.project(h._cLatLng,t)),a.__parent=h,n.__parent=h;let d=h;for(r=t-1;r>l._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));l._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,l=r._markers,h;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=l.length-1;o>=0;o--)h=l[o],e.contains(h._latlng)||i.removeLayer(h)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,l;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,l=r._childCount,e+=a.lat*l,i+=a.lng*l;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,l;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)l=o[a],n.intersects(l._bounds)&&l._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,l;for(delete this._objectPoint[_.Util.stamp(n)],a=0,l=r.length;a<l;a++)if(r[a]===n)return r.splice(a,1),l===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,l,h=this._grid;for(e in h){r=h[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)l=n.call(t,a[s]),l&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,l,h,d,c=this._objectPoint,u=this._sqCellSize,p=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,l=a.length;o<l;o++)h=a[o],d=this._sqDist(c[_.Util.stamp(h)],n),d<u&&(u=d,p=h)}return p},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,l=null,h=null,d=null,c;for(c=n.length-1;c>=0;c--){const p=n[c];(t===!1||p.lat>t)&&(o=p,t=p.lat),(e===!1||p.lat<e)&&(r=p,e=p.lat),(i===!1||p.lng>i)&&(a=p,i=p.lng),(s===!1||p.lng<s)&&(l=p,s=p.lng)}e!==t?(d=r,h=o):(d=l,h=a);var u=[].concat(this.buildConvexHull([d,h],n),this.buildConvexHull([h,d],n));return u}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],l;for(a.length=n,l=n-1;l>=0;l--)r+=s/i+l*5e-4,a[l]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,l,h;for(e._ignoreMove=!0,r=0;r<n.length;r++)h=i.layerPointToLatLng(t[r]),a=n[r],l=new _.Polyline([this._latlng,h],o),i.addLayer(l),a._spiderLeg=l,a._preSpiderfyLatlng=a._latlng,a.setLatLng(h),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,l=Object.assign({},this._group.options.spiderLegPolylineOptions),h=l.opacity,d,c,u,p,y,g;for(h===void 0&&(h=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(l.opacity=0,l.className=`${l.className||""} leaflet-cluster-spider-leg`):l.opacity=h,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],g=i.layerPointToLatLng(t[d]),u=new _.Polyline([o,g],l),i.addLayer(u),c._spiderLeg=u,a&&(p=u._path,y=p.getTotalLength()+.1,p.style.strokeDasharray=y,p.style.strokeDashoffset=y),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)g=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(g),c.clusterShow&&c.clusterShow(),a&&(u=c._spiderLeg,p=u._path,p.style.strokeDashoffset=0,u.setStyle({opacity:h}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,l,h,d,c,u;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)a=o[l],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,u=!0,a._setPos&&(a._setPos(s),u=!1),a.clusterHide&&(a.clusterHide(),u=!1),u&&i.removeLayer(a),r&&(h=a._spiderLeg,d=h._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,h.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var p=0;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&p++;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),p>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Ve=()=>typeof window<"u"&&typeof document<"u";function Yn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}const A=(n,t,e)=>e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null),en=(n,...t)=>{const[e,...i]=t;for(const s of e.split(" "))n.addEventListener(s,...i);return()=>Ke(n,...t)},Ke=(n,...t)=>{const[e,...i]=t;for(const s of e.split(" "))n.removeEventListener(s,...i)},ce=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))A(i,s,o);return i},ue=typeof HTMLElement>"u"?class{}:HTMLElement,pe=(n,t)=>!Ve()||window.customElements.get(n)||window.customElements.define(n,t),Xn=`/**
604
604
  * NOTE:
605
605
  * - Dark mode styles are in styles.module.css to leverage data-color-scheme attribute
606
606
  * - This file is using --mtds- not --mtds- since we're inside shadow dom