leaflet
Version:
JavaScript library for mobile-friendly interactive maps
6 lines • 140 kB
JavaScript
/* @preserve
* Leaflet 2.0.0-beta.1, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2026 Volodymyr Agafonkin, (c) 2010-2011 CloudMade
*/
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=t({falseFn:()=>s,formatNum:()=>c,lastId:()=>r,setOptions:()=>d,splitWords:()=>u,stamp:()=>i,template:()=>ee,throttle:()=>a,wrapNum:()=>o});let r=0;function i(e){return`_leaflet_id`in e||(e._leaflet_id=++r),e._leaflet_id}function a(e,t,n){let r,i;function a(){r=!1,i&&=(o.apply(n,i),!1)}function o(...o){r?i=o:(e.apply(n,o),setTimeout(a,t),r=!0)}return o}function o(e,t,n){let r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function s(){return!1}function c(e,t){if(t===!1)return e;let n=10**(t===void 0?6:t);return Math.round(e*n)/n}const l=/\s+/;function u(e){return e.trim().split(l)}function d(e,t){if(!Object.hasOwn(e,`options`)){let t=p(e.constructor)??e.options;e.options=t?Object.create(t):{}}for(let n in t)Object.hasOwn(t,n)&&(e.options[n]=t[n]);return e.options}const f=new WeakMap;function p(e){let t=e?.defaultOptions;if(t&&f.get(e)!==t){for(let t=e;t.defaultOptions;t=Object.getPrototypeOf(t))Object.hasOwn(t,`defaultOptions`)&&Object.setPrototypeOf(t.defaultOptions,Object.getPrototypeOf(t).defaultOptions??Object.prototype);f.set(e,t)}return t}const m=/\{ *([\w_ -]+) *\}/g;function ee(e,t){return e.replace(m,(e,n)=>{let r=t[n];if(r===void 0)throw Error(`No value provided for variable ${e}`);return typeof r==`function`&&(r=r(t)),r})}let h=0;const g=new WeakMap,_=new WeakMap;function te(e){let t=_.get(e);if(t?.version!==h){t={version:h,runners:0,hooks:[]};for(let n=e;n!==Function.prototype;n=Object.getPrototypeOf(n))Object.hasOwn(n,`initHooks`)&&n.initHooks&&t.runners++,t.hooks.unshift(...g.get(n)??[]);_.set(e,t)}return t}var v=class{static initHooks=!0;static include(e){for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t))for(let n of Object.getOwnPropertyNames(t))n!==`constructor`&&n!==`options`&&(this.prototype[n]=e[n]);let{options:t}=e;return t&&this.mergeOptions(t),this}static mergeOptions(e){return Object.hasOwn(this,`defaultOptions`)||(this.defaultOptions=Object.create(this.defaultOptions??Object.prototype)),Object.assign(this.defaultOptions,e),this}static setDefaultOptions(e){return this.mergeOptions(e)}static addInitHook(e,...t){let n=typeof e==`function`?e:function(){this[e](...t)};return g.has(this)||g.set(this,[]),g.get(this).push(n),h++,this}constructor(){if(this.initialize)throw Error(`${this.constructor.name}: initialize() is not called in Leaflet 2. Rename it to constructor() and call super() at its start.`);this.options=d(this),this._initHooksLeft=te(this.constructor).runners,this.callInitHooks()}callInitHooks(){if(--this._initHooksLeft===0)for(let e of te(this.constructor).hooks)e.call(this)}};const ne={position:`topright`};var y=class extends v{static initHooks=!0;static defaultOptions=ne;constructor(e){super(),d(this,e),this.callInitHooks()}getPosition(){return this.options.position}setPosition(e){let t=this._map;return t?.removeControl(this),this.options.position=e,t?.addControl(this),this}getContainer(){return this._container}addTo(e){this.remove(),this._map=e;let t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return t.classList.add(`leaflet-control`),n.includes(`bottom`)?r.insertBefore(t,r.firstChild):r.appendChild(t),this._map.on(`unload`,this.remove,this),this}remove(){return this._map&&=(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off(`unload`,this.remove,this),null),this}_refocusOnMap(e){this._map&&e&&(e.screenX!==0||e.screenY!==0)&&this._map.getContainer().focus({preventScroll:!0,focusVisible:!1})}},b=class e{constructor(t,n,r){if(!e.validate(t,n))throw Error(`Invalid Point object: (${t}, ${n})`);let i,a;if(t instanceof e)return t;Array.isArray(t)?(i=t[0],a=t[1]):typeof t==`object`&&`x`in t&&`y`in t?(i=t.x,a=t.y):(i=t,a=n),this.x=r?Math.round(i):i,this.y=r?Math.round(a):a}static validate(t,n){return!!(t instanceof e||Array.isArray(t)||t&&typeof t==`object`&&`x`in t&&`y`in t||(t||t===0)&&(n||n===0))}clone(){let t=new e(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new e(t))}_add(e){return this.x+=e.x,this.y+=e.y,this}subtract(t){return this.clone()._subtract(new e(t))}_subtract(e){return this.x-=e.x,this.y-=e.y,this}divideBy(e){return this.clone()._divideBy(e)}_divideBy(e){return this.x/=e,this.y/=e,this}multiplyBy(e){return this.clone()._multiplyBy(e)}_multiplyBy(e){return this.x*=e,this.y*=e,this}scaleBy(t){return new e(this.x*t.x,this.y*t.y)}unscaleBy(t){return new e(this.x/t.x,this.y/t.y)}round(){return this.clone()._round()}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}floor(){return this.clone()._floor()}_floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.clone()._ceil()}_ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}trunc(){return this.clone()._trunc()}_trunc(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}distanceTo(t){t=new e(t);let n=t.x-this.x,r=t.y-this.y;return Math.sqrt(n*n+r*r)}equals(t){return t=new e(t),t.x===this.x&&t.y===this.y}contains(t){return t=new e(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${c(this.x)}, ${c(this.y)})`}},re=t({create:()=>x,disableImageDrag:()=>oe,enableImageDrag:()=>se,get:()=>ie,getPosition:()=>E,getScale:()=>D,getSizedParentNode:()=>ce,setPosition:()=>T,setTransform:()=>w,toBack:()=>C,toFront:()=>S});function ie(e){return typeof e==`string`?document.getElementById(e):e}function x(e,t,n){let r=document.createElement(e);return r.className=t??``,n?.appendChild(r),r}function S(e){let t=e.parentNode;if(t&&t.lastChild!==e){if(e.matches(`:hover`))for(;e.nextSibling;)t.insertBefore(e.nextSibling,e);else t.appendChild(e)}}function C(e){let t=e.parentNode;if(t&&t.firstChild!==e){if(e.matches(`:hover`))for(;e.previousSibling;)t.insertBefore(e.previousSibling,e.nextSibling);else t.insertBefore(e,t.firstChild)}}function w(e,t,n){let r=t??new b(0,0);e.style.transform=`translate3d(${r.x}px,${r.y}px,0)${n?` scale(${n})`:``}`}const ae=new WeakMap;function T(e,t,n){ae.set(e,t),n?e.style.transform=`translate(${t.x}px,${t.y}px)`:w(e,t)}function E(e){return ae.get(e)??new b(0,0)}function oe(){j(window,`dragstart`,I)}function se(){N(window,`dragstart`,I)}function ce(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function D(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}const le=new WeakSet,ue=new WeakSet,de=new WeakSet,O=new Map;function fe(e){e.addEventListener(`pointerdown`,me,{capture:!0}),e.addEventListener(`pointermove`,he,{capture:!0}),e.addEventListener(`pointerup`,k,{capture:!0}),e.addEventListener(`pointercancel`,k,{capture:!0}),O.clear()}function pe(e){e.removeEventListener(`pointerdown`,me,{capture:!0}),e.removeEventListener(`pointermove`,he,{capture:!0}),e.removeEventListener(`pointerup`,k,{capture:!0}),e.removeEventListener(`pointercancel`,k,{capture:!0})}function me(e){e.isTrusted&&e.target.setPointerCapture(e.pointerId),O.set(e.pointerId,e)}function he(e){O.has(e.pointerId)&&O.set(e.pointerId,e)}function k(e){e.isTrusted&&e.target.releasePointerCapture(e.pointerId),O.delete(e.pointerId)}function A(){return[...O.values()]}var ge=t({disableClickPropagation:()=>F,disableScrollPropagation:()=>xe,getPointerPosition:()=>Se,getWheelDelta:()=>Ce,off:()=>N,on:()=>j,preventDefault:()=>I,stop:()=>L,stopPropagation:()=>P});function j(e,t,n,r){if(t&&typeof t==`object`)for(let[r,i]of Object.entries(t))ye(e,r,i,n);else for(let i of u(t))ye(e,i,n,r)}const M=new WeakMap;function N(e,t,n,r){if(arguments.length===1)ve(e),M.delete(e);else if(t&&typeof t==`object`)for(let[r,i]of Object.entries(t))be(e,r,i,n);else if(t=u(t),arguments.length===2)ve(e,e=>t.includes(e));else for(let i of t)be(e,i,n,r)}const _e=/\d/;function ve(e,t){for(let n of M.get(e)?.keys()??[]){let r=n.split(_e)[0];(!t||t(r))&&be(e,r,null,null,n)}}function ye(e,t,n,r){let a=t+i(n)+(r?`_${i(r)}`:``),o=M.get(e);if(o?.has(a))return;let s=function(t){return n.call(r||e,t)};t===`dblclick`?s=Te(e,s):e.addEventListener(t,s,t===`wheel`&&{passive:!1}),o||(o=new Map,M.set(e,o)),o.set(a,s)}function be(e,t,n,r,a){a??=t+i(n)+(r?`_${i(r)}`:``);let o=M.get(e),s=o?.get(a);o&&s&&(t===`dblclick`?Ee(e,s):e.removeEventListener(t,s,!1),o.delete(a))}function P(e){`stopPropagation`in e?e.stopPropagation():e.originalEvent&&le.add(e.originalEvent)}function xe(e){ye(e,`wheel`,P)}function F(e){j(e,`pointerdown dblclick contextmenu`,P),ue.add(e)}function I(e){e.preventDefault?.()}function L(e){`preventDefault`in e&&I(e),P(e)}function Se(e,t){if(!t)return new b(e.clientX,e.clientY);let n=D(t),r=n.boundingClientRect;return new b((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}function Ce(e){return e.deltaY&&e.deltaMode===0?-e.deltaY/(window.devicePixelRatio*2):e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:(e.deltaX||e.deltaZ,0)}function we(e){let t={bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed,detail:2,view:e.view,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,button:e.button,buttons:e.buttons,relatedTarget:e.relatedTarget,region:e.region},n;return n=e instanceof PointerEvent?new PointerEvent(`dblclick`,{...t,pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,pointerType:e.pointerType,isPrimary:e.isPrimary}):new MouseEvent(`dblclick`,t),n}function Te(e,t){e.addEventListener(`dblclick`,t);let n=0,r,i;function a(e){i=e.pointerType}function o(e){if(e.detail!==1){r=e.detail;return}if(i===`mouse`||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents)return;let t=e.composedPath();if(t.some(e=>e instanceof HTMLLabelElement&&e.htmlFor)&&!t.some(e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement))return;let a=Date.now();a-n<=200?(r++,r===2&&e.target.dispatchEvent(we(e))):r=1,n=a}return e.addEventListener(`pointerdown`,a,!0),e.addEventListener(`click`,o),{dblclick:t,onPointerDown:a,simDblclick:o}}function Ee(e,t){e.removeEventListener(`dblclick`,t.dblclick),e.removeEventListener(`pointerdown`,t.onPointerDown,!0),e.removeEventListener(`click`,t.simDblclick)}const De={position:`bottomright`,prefix:`<a target="_blank" href="https://leafletjs.com" title="A JavaScript library for interactive maps"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>Leaflet</a>`};var Oe=class extends y{static initHooks=!0;static defaultOptions=De;constructor(e){super(e),this._attributions={},this._layerAttributions=new Map,this.callInitHooks()}onAdd(e){return e.attributionControl=this,this._container=x(`div`,`leaflet-control-attribution`),F(this._container),e._loaded&&e.eachLayer(e=>this._addLayer({layer:e})),this._update(),e.on({layeradd:this._addLayer,layerremove:this._removeLayer},this),this._container}onRemove(e){e.off({layeradd:this._addLayer,layerremove:this._removeLayer},this);for(let e of this._layerAttributions.keys())this._removeLayer({layer:e})}_addLayer({layer:e}){let t=e.getAttribution?.();t&&!this._layerAttributions.has(e)&&(this._layerAttributions.set(e,t),this.addAttribution(t))}_removeLayer({layer:e}){this.removeAttribution(this._layerAttributions.get(e)),this._layerAttributions.delete(e)}setPrefix(e){return this.options.prefix=e,this._update(),this}addAttribution(e){return e&&(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update()),this}removeAttribution(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this}_update(){if(!this._map)return;let e=Object.keys(this._attributions).filter(e=>this._attributions[e]),t=[];this.options.prefix&&t.push(this.options.prefix),e.length&&t.push(e.join(`, `)),this._container.innerHTML=t.join(` <span aria-hidden="true">|</span> `)}};const ke={collapsed:!0,collapseDelay:0,position:`topright`,autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction(e,t,n,r){return n<r?-1:+(r<n)}};var Ae=class extends y{static initHooks=!0;static defaultOptions=ke;constructor(e,t,n){super(n),this._layerControlInputs=new Map,this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(let[t,n]of Object.entries(e??{}))this._addLayer(n,t);for(let[e,n]of Object.entries(t??{}))this._addLayer(n,e,!0);this.callInitHooks()}onAdd(e){this._initLayout(),this._update(),this._map=e,e.on(`zoomend`,this._checkDisabledLayers,this);for(let e of this._layers)e.layer.on(`add remove`,this._onLayerChange,this);return this.options.collapsed||e.on(`resize`,this._expandIfNotCollapsed,this),this._container}addTo(e){return super.addTo(e),this._expandIfNotCollapsed()}onRemove(e){e.off(`zoomend`,this._checkDisabledLayers,this);for(let e of this._layers)e.layer.off(`add remove`,this._onLayerChange,this);e.off(`resize`,this._expandIfNotCollapsed,this),e.off(`click`,this.collapse,this)}addBaseLayer(e,t){return this._addLayer(e,t),this._map?this._update():this}addOverlay(e,t){return this._addLayer(e,t,!0),this._map?this._update():this}removeLayer(e){return e.off(`add remove`,this._onLayerChange,this),this._layers=this._layers.filter(t=>t.layer!==e),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add(`leaflet-control-layers-expanded`),this._section.style.height=``;let e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(this._section.classList.add(`leaflet-control-layers-scrollbar`),this._section.style.height=`${e}px`):this._section.classList.remove(`leaflet-control-layers-scrollbar`),this._checkDisabledLayers(),this}collapse(){return this.options.collapseDelay>0?this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove(`leaflet-control-layers-expanded`)},this.options.collapseDelay):this._container.classList.remove(`leaflet-control-layers-expanded`),this}_initLayout(){let e=`leaflet-control-layers`,t=this._container=x(`div`,e),n=this.options.collapsed;F(t),xe(t);let r=x(`fieldset`,`${e}-list`);this._section=r,n&&(this._map.on(`click`,this.collapse,this),j(t,{pointerenter:this._expandSafely,pointerleave(e){e.pointerType!==`touch`&&this.collapse()}},this));let i=this._layersLink=x(`a`,`${e}-toggle`,t);i.href=`#`,i.title=`Layers`,i.setAttribute(`role`,`button`),r.setAttribute(`aria-label`,i.title),j(i,{keydown(e){e.code===`Enter`&&this._expandSafely()},click(e){e.preventDefault(),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=x(`div`,`${e}-base`,r),this._separator=x(`div`,`${e}-separator`,r),this._overlaysList=x(`div`,`${e}-overlays`,r),t.appendChild(r)}_addLayer(e,t,n){this._map&&e.on(`add remove`,this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(((e,t)=>this.options.sortFunction(e.layer,t.layer,e.name,t.name))),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs.clear();let e,t,n=0;for(let r of this._layers)this._addItem(r),t||=r.overlay,e||=!r.overlay,n+=+!r.overlay;return this.options.hideSingleBase&&(e&&=n>1,this._baseLayersList.style.display=e?``:`none`),this._separator.style.display=t&&e?``:`none`,this}_onLayerChange(e){this._handlingClick||this._update();let t=this._layers.find(t=>t.layer===e.target),n=t.overlay?e.type===`add`?`overlayadd`:`overlayremove`:e.type===`add`?`baselayerchange`:null;n&&this._map.fire(n,t)}_addItem(e){let t=document.createElement(`label`),n=this._map.hasLayer(e.layer),r=document.createElement(`input`);r.type=e.overlay?`checkbox`:`radio`,r.className=`leaflet-control-layers-selector`,r.defaultChecked=n,e.overlay||(r.name=`leaflet-base-layers_${i(this)}`),this._layerControlInputs.set(r,e.layer),j(r,`click`,this._onInputClick,this);let a=document.createElement(`span`);a.innerHTML=` ${e.name}`;let o=document.createElement(`span`);return t.appendChild(o),o.appendChild(r),o.appendChild(a),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(t),this._checkDisabledLayers(),t}_onInputClick(e){if(this._preventClick)return;let t=new Map;for(let[e,n]of this._layerControlInputs)t.set(n,t.get(n)||e.checked);let n=[],r=[];for(let[e,i]of t)i!==this._map.hasLayer(e)&&(i?n:r).push(e);this._handlingClick=!0;for(let e of r)this._map.removeLayer(e);for(let e of n)this._map.addLayer(e);this._handlingClick=!1;for(let[e,n]of t)if(n!==this._map.hasLayer(e)){this._update();break}this._refocusOnMap(e)}_checkDisabledLayers(){let e=this._map.getZoom();for(let[t,n]of this._layerControlInputs){let r=n.options;t.disabled=r.minZoom!==void 0&&e<r.minZoom||r.maxZoom!==void 0&&e>r.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){let e=this._section;this._preventClick=!0,j(e,`click`,I),this.expand(),setTimeout(()=>{N(e,`click`,I),this._preventClick=!1})}};const je={position:`bottomleft`,maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1};var Me=class extends y{static defaultOptions=je;onAdd(e){let t=`leaflet-control-scale`,n=x(`div`,t),r=this.options;return this._addScales(r,`${t}-line`,n),e.on(r.updateWhenIdle?`moveend`:`move`,this._update,this),e.whenReady(this._update,this),n}onRemove(e){e.off(this.options.updateWhenIdle?`moveend`:`move`,this._update,this)}_addScales(e,t,n){e.metric&&(this._mScale=x(`div`,t,n)),e.imperial&&(this._iScale=x(`div`,t,n))}_update(){let e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)}_updateScales(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)}_updateMetric(e){let t=this._getRoundNum(e),n=t<1e3?`${t} m`:`${t/1e3} km`;this._updateScale(this._mScale,n,t/e)}_updateImperial(e){let t=e*3.2808399,n,r,i;t>5280?(n=t/5280,r=this._getRoundNum(n),this._updateScale(this._iScale,`${r} mi`,r/n)):(i=this._getRoundNum(t),this._updateScale(this._iScale,`${i} ft`,i/t))}_updateScale(e,t,n){e.style.width=`${Math.round(this.options.maxWidth*n)}px`,e.innerHTML=t}_getRoundNum(e){let t=10**(`${Math.floor(e)}`.length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}};const Ne={position:`topleft`,zoomInText:`<span aria-hidden="true">+</span>`,zoomInTitle:`Zoom in`,zoomOutText:`<span aria-hidden="true">−</span>`,zoomOutTitle:`Zoom out`};var Pe=class extends y{static defaultOptions=Ne;onAdd(e){let t=`leaflet-control-zoom`,n=x(`div`,`${t} leaflet-bar`),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,`${t}-in`,n,e=>this._zoom(e,1)),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,`${t}-out`,n,e=>this._zoom(e,-1)),this._updateDisabled(),e.on(`zoomend zoomlevelschange`,this._updateDisabled,this),n}onRemove(e){e.off(`zoomend zoomlevelschange`,this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoom(e,t){let n=this._map;!this._disabled&&(t>0?n._zoom<n.getMaxZoom():n._zoom>n.getMinZoom())&&n.zoomIn(t*n.options.zoomDelta*(e.shiftKey?3:1))}_createButton(e,t,n,r,i){let a=x(`a`,n,r);return a.innerHTML=e,a.href=`#`,a.title=t,a.setAttribute(`role`,`button`),a.setAttribute(`aria-label`,t),F(a),j(a,`click`,e=>{L(e),i.call(this,e),this._refocusOnMap(e)}),a}_updateDisabled(){let e=this._map;for(let[t,n]of[[this._zoomInButton,e.getMaxZoom()],[this._zoomOutButton,e.getMinZoom()]]){let r=this._disabled||e._zoom===n;t.classList.toggle(`leaflet-disabled`,r),t.setAttribute(`aria-disabled`,`${r}`)}}};const Fe=new Set;var R=class e extends v{static initHooks=!0;constructor(){super(),this._events=void 0,this._eventParents=void 0,this._firingCount=0,this.callInitHooks()}on(e,t,n){if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._on(n,r,t);else for(let r of u(e))this._on(r,t,n);return this}off(e,t,n){if(!arguments.length)this._events=void 0;else if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._off(n,r,t);else{let r=arguments.length===1;for(let i of u(e))r?this._off(i):this._off(i,t,n)}return this}static __REMOVED_EVENTS={mousedown:`pointerdown`,mouseup:`pointerup`,mouseover:`pointerover`,mouseout:`pointerout`,mousemove:`pointermove`,keypress:`keydown`};_on(t,n,r,i){if(Object.hasOwn(e.__REMOVED_EVENTS,t)&&!Fe.has(t)&&(Fe.add(t),console.error(`The event ${t} has been removed in Leaflet 2. Use ${e.__REMOVED_EVENTS[t]} instead.`)),typeof n!=`function`){console.warn(`wrong listener type: ${typeof n}`);return}if(this._listens(t,n,r)!==!1)return;r===this&&(r=void 0);let a={fn:n,ctx:r};i&&(a.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(a)}_off(e,t,n){if(!this._events)return;let r=this._events[e];if(!r)return;if(arguments.length===1){if(this._firingCount)for(let e of r)e.fn=s;delete this._events[e];return}if(typeof t!=`function`){console.warn(`wrong listener type: ${typeof t}`);return}let i=this._listens(e,t,n);if(i!==!1){let t=r[i];this._firingCount&&(t.fn=s,this._events[e]=r=r.slice()),r.splice(i,1)}}fire(e,t,n){if(!this.listens(e,n))return this;let r={...t,type:e,target:this,sourceTarget:t?.sourceTarget||this};if(this._events){let t=this._events[e];if(t){this._firingCount=this._firingCount+1||1;for(let n of t){let t=n.fn;n.once&&this.off(e,t,n.ctx),t.call(n.ctx||this,r)}this._firingCount--}}return n&&this._propagateEvent(r),this}listens(e,t,n,r){typeof e!=`string`&&console.warn(`"string" type argument expected`);let i=t;if(typeof t!=`function`&&(r=!!t,i=void 0,n=void 0),this._events?.[e]?.length&&this._listens(e,i,n)!==!1)return!0;if(r){for(let i of Object.values(this._eventParents??{}))if(i.listens(e,t,n,r))return!0}return!1}_listens(e,t,n){if(!this._events)return!1;let r=this._events[e]??[];if(!t)return!!r.length;n===this&&(n=void 0);let i=r.findIndex(e=>e.fn===t&&e.ctx===n);return i!==-1&&i}once(e,t,n){if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._on(n,r,t,!0);else for(let r of u(e))this._on(r,t,n,!0);return this}addEventParent(e){return this._eventParents??={},this._eventParents[i(e)]=e,this}removeEventParent(e){return this._eventParents&&delete this._eventParents[i(e)],this}_propagateEvent(e){for(let t of Object.values(this._eventParents??{}))t.fire(e.type,{layer:e.target,propagatedFrom:e.target,...e},!0)}},z=class extends v{static initHooks=!0;constructor(e){super(),this._map=e,this.callInitHooks()}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this}enabled(){return!!this._enabled}addHooks(){}removeHooks(){}static addTo(e,t){return e.addHandler(t,this),this}};const Ie={clickTolerance:3};var B=class e extends R{static initHooks=!0;static defaultOptions=Ie;static _dragging=!1;constructor(e,t,n){if(typeof n==`boolean`)throw Error(`Draggable: the preventOutline argument is removed in Leaflet 2. Pass options as the third argument.`);super(),d(this,n),this._element=e,this._dragStartTarget=t??e,this.callInitHooks()}enable(){this._enabled||=(j(this._dragStartTarget,`pointerdown`,this._onDown,this),!0)}disable(){this._enabled&&(e._dragging===this&&this.finishDrag(!0),N(this._dragStartTarget,`pointerdown`,this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){if(this._moved=!1,this._element.classList.contains(`leaflet-zoom-anim`))return;let n=A().length;if(n>1){e._dragging===this&&this.finishDrag();return}if(e._dragging||t.shiftKey||t.button!==0&&t.pointerType!==`touch`||(e._dragging=this,oe(),this._moving))return;!n&&t.isTrusted&&t.target.setPointerCapture(t.pointerId),this.fire(`down`);let r=ce(this._element);this._startPoint=new b(t.clientX,t.clientY),this._startPos=E(this._element),this._parentScale=D(r),j(this._dragStartTarget,`pointermove`,this._onMove,this),j(this._dragStartTarget,`pointerup pointercancel lostpointercapture`,this._onUp,this)}_onMove(e){if(A().length>1){this._moved=!0;return}let t=new b(e.clientX,e.clientY)._subtract(this._startPoint),n=Math.abs(t.x)+Math.abs(t.y);!this._moved&&(!n||n<this.options.clickTolerance)||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,e.cancelable&&e.preventDefault(),this._moved||(this.fire(`dragstart`),this._moved=!0,this._draggingContainer=this._element.closest(`.leaflet-container`)??this._element,this._draggingContainer.classList.add(`leaflet-dragging`),this._lastTarget=e.target,this._lastTarget.classList.add(`leaflet-drag-target`)),this._newPos=this._startPos.add(t),this._moving=!0,this._lastEvent=e,this._updatePosition())}_updatePosition(){let e={originalEvent:this._lastEvent};this.fire(`predrag`,e);let t=window.devicePixelRatio;this._newPos=this._newPos.multiplyBy(t)._round()._divideBy(t),T(this._element,this._newPos),this.fire(`drag`,e)}_onUp(e){e.type===`lostpointercapture`&&e.buttons||this.finishDrag()}finishDrag(t){this._draggingContainer?.classList.remove(`leaflet-dragging`),this._draggingContainer=null,this._lastTarget&&=(this._lastTarget.classList.remove(`leaflet-drag-target`),null),N(this._dragStartTarget,`pointermove`,this._onMove,this),N(this._dragStartTarget,`pointerup pointercancel lostpointercapture`,this._onUp,this),se();let n=this._moved&&this._moving;this._moving=!1,e._dragging=!1,n&&this.fire(`dragend`,{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}},V=class e{constructor(t,n){if(!t)return;if(t instanceof e)return t;let r=n?[t,n]:t;for(let e of r)this.extend(e)}extend(t){let n,r;if(!t)return this;if(Le(t))n=r=new b(t);else if({min:n,max:r}=new e(t),!n)return this;return this.min?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(r.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(r.y,this.max.y)):(this.min=n.clone(),this.max=r.clone()),this}getCenter(e){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)}getBottomLeft(){return new b(this.min.x,this.max.y)}getTopRight(){return new b(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let n,r;return Le(t)?n=r=new b(t):{min:n,max:r}=new e(t),n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y}intersects(t){t=new e(t);let n=this.min,r=this.max,i=t.min,a=t.max,o=a.x>=n.x&&i.x<=r.x,s=a.y>=n.y&&i.y<=r.y;return o&&s}overlaps(t){t=new e(t);let n=this.min,r=this.max,i=t.min,a=t.max,o=a.x>n.x&&i.x<r.x,s=a.y>n.y&&i.y<r.y;return o&&s}isValid(){return!!(this.min&&this.max)}pad(t){let n=this.min,r=this.max,i=Math.abs(n.x-r.x)*t,a=Math.abs(n.y-r.y)*t;return new e(new b(n.x-i,n.y-a),new b(r.x+i,r.y+a))}equals(t){return t?(t=new e(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function Le(e){return e instanceof b||(Array.isArray(e)?typeof e[0]==`number`:`x`in e)}var H=class{constructor(e,t,n,r){Array.isArray(e)?(this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3]):(this._a=e,this._b=t,this._c=n,this._d=r)}transform(e,t){return this._transform(e.clone(),t)}_transform(e,t){return t||=1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e}untransform(e,t){return t||=1,new b((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},U=class e{constructor(t,n){if(!t)return;if(t instanceof e)return t;let r=n?[t,n]:t;for(let e of r)this.extend(e)}extend(t){let n=this._southWest,r=this._northEast,i,a;if(t instanceof W)i=a=t;else if(t instanceof e){if({_southWest:i,_northEast:a}=t,!i)return this}else if(Re(t))i=a=new W(t);else return this.extend(new e(t));return n?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),r.lat=Math.max(a.lat,r.lat),r.lng=Math.max(a.lng,r.lng)):(this._southWest=new W(i.lat,i.lng),this._northEast=new W(a.lat,a.lng)),this}pad(t){let n=this._southWest,r=this._northEast,i=Math.abs(n.lat-r.lat)*t,a=Math.abs(n.lng-r.lng)*t;return new e(new W(n.lat-i,n.lng-a),new W(r.lat+i,r.lng+a))}getCenter(){return new W((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)}getSouthWest(){return this._southWest}getNorthEast(){return this._northEast}getNorthWest(){return new W(this.getNorth(),this.getWest())}getSouthEast(){return new W(this.getSouth(),this.getEast())}getWest(){return this._southWest.lng}getSouth(){return this._southWest.lat}getEast(){return this._northEast.lng}getNorth(){return this._northEast.lat}contains(t){let n=this._southWest,r=this._northEast,i,a;return Re(t)?i=a=new W(t):{_southWest:i,_northEast:a}=new e(t),i.lat>=n.lat&&a.lat<=r.lat&&i.lng>=n.lng&&a.lng<=r.lng}intersects(t){t=new e(t);let n=this._southWest,r=this._northEast,i=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=n.lat&&i.lat<=r.lat,s=a.lng>=n.lng&&i.lng<=r.lng;return o&&s}overlaps(t){t=new e(t);let n=this._southWest,r=this._northEast,i=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>n.lat&&i.lat<r.lat,s=a.lng>n.lng&&i.lng<r.lng;return o&&s}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(`,`)}equals(t,n){return t?(t=new e(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n)):!1}isValid(){return!!(this._southWest&&this._northEast)}};function Re(e){return W.validate(e)}var W=class e{constructor(t,n,r){if(!e.validate(t,n,r))throw Error(`Invalid LatLng object: (${t}, ${n})`);let i,a,o;if(t instanceof e)return t;Array.isArray(t)&&typeof t[0]!=`object`?t.length===3?(i=t[0],a=t[1],o=t[2]):t.length===2&&(i=t[0],a=t[1]):typeof t==`object`&&`lat`in t?(i=t.lat,a=`lng`in t?t.lng:t.lon,o=t.alt):(i=t,a=n,o=r),this.lat=+i,this.lng=+a,o!==void 0&&(this.alt=+o)}static validate(t,n,r){return t instanceof e||typeof t==`object`&&t&&`lat`in t?!0:t&&Array.isArray(t)&&typeof t[0]!=`object`?t.length===3||t.length===2:!(!t&&t!==0||!n&&n!==0)}equals(t,n){return t?(t=new e(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(n??1e-9)):!1}toString(e){return`LatLng(${c(this.lat,e)}, ${c(this.lng,e)})`}distanceTo(t){return ze(this,new e(t),6371e3)}wrap(){return new e(this.lat,o(this.lng,[-180,180],!0),this.alt)}toBounds(e){let t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new U([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])}clone(){let t=new e(0,0);return t.lat=this.lat,t.lng=this.lng,this.alt!==void 0&&(t.alt=this.alt),t}};function ze(e,t,n){let r=Math.PI/180,i=e.lat*r,a=t.lat*r,o=Math.sin((t.lat-e.lat)*r/2),s=Math.sin((t.lng-e.lng)*r/2),c=o*o+Math.cos(i)*Math.cos(a)*s*s;return n*(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)))}var Be=t({_getBitCode:()=>G,_getEdgeIntersection:()=>Ye,_projectRing:()=>J,_sqClosestPointOnSegment:()=>K,clipSegment:()=>Je,closestPointOnSegment:()=>Ue,isFlat:()=>q,pointToSegmentDistance:()=>He,polylineCenter:()=>Ze,simplify:()=>Ve});function Ve(e,t){if(!t||!e.length)return e.slice();let n=t*t;return e=Ke(e,n),e=We(e,n),e}function He(e,t,n){return Math.sqrt(K(e,t,n,!0))}function Ue(e,t,n){return K(e,t,n)}function We(e,t){let n=e.length,r=new Uint8Array(n);r[0]=r[n-1]=1,Ge(e,r,t,0,n-1);let i,a=[];for(i=0;i<n;i++)r[i]&&a.push(e[i]);return a}function Ge(e,t,n,r,i){let a=0,o=0,s,c;for(s=r+1;s<=i-1;s++)c=K(e[s],e[r],e[i],!0),c>a&&(o=s,a=c);a>n&&(t[o]=1,Ge(e,t,n,r,o),Ge(e,t,n,o,i))}function Ke(e,t){let n=[e[0]],r=0;for(let i=1;i<e.length;i++)Xe(e[i],e[r])>t&&(n.push(e[i]),r=i);return r<e.length-1&&n.push(e[e.length-1]),n}let qe;function Je(e,t,n,r,i){let a=e,o=t,s=r?qe:G(e,n),c=G(t,n),l,u,d;for(qe=c;;){if(!(s|c))return i&&(e!==a&&(e=e.round()),t!==o&&(t=t.round())),[e,t];if(s&c)return!1;l=s||c,u=Ye(e,t,l,n),d=G(u,n),l===s?(e=u,s=d):(t=u,c=d)}}function Ye(e,t,n,r,i){let a=t.x-e.x,o=t.y-e.y,s=r.min,c=r.max,l,u;return n&8?(l=e.x+a*(c.y-e.y)/o,u=c.y):n&4?(l=e.x+a*(s.y-e.y)/o,u=s.y):n&2?(l=c.x,u=e.y+o*(c.x-e.x)/a):(l=s.x,u=e.y+o*(s.x-e.x)/a),new b(l,u,i)}function G(e,t){let n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Xe(e,t){let n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function K(e,t,n,r){let i=t.x,a=t.y,o=n.x-i,s=n.y-a,c,l=o*o+s*s;return l>0&&(c=((e.x-i)*o+(e.y-a)*s)/l,c>1?(i=n.x,a=n.y):c>0&&(i+=o*c,a+=s*c)),o=e.x-i,s=e.y-a,r?o*o+s*s:new b(i,a)}function q(e){return!Array.isArray(e[0])||typeof e[0][0]!=`object`&&e[0][0]!==void 0}function Ze(e,t){let n=J(e,t),r=n.length,i=0;for(let e=1;e<r;e++)i+=n[e-1].distanceTo(n[e]);i/=2;let a=n[0];for(let e=1,t=0;e<r;e++){let r=n[e-1],o=n[e],s=r.distanceTo(o);if(t+=s,t>i){let e=(t-i)/s;a=new b(o.x-e*(o.x-r.x),o.y-e*(o.y-r.y));break}}return t.unproject(a)}function J(e,t){if(!e||e.length===0)throw Error(`latlngs not passed`);return q(e)?e.map(e=>t.project(new W(e))):(console.warn(`latlngs are not flat! Only the first ring will be used`),J(e[0],t))}var Qe=t({centroid:()=>nt,clipPolygon:()=>$e,polygonCenter:()=>tt});function $e(e,t,n){for(let r of[1,4,2,8]){if(!e.length)break;let i=[],a=e[e.length-1],o=et(a,r,t);for(let s of e){let e=et(s,r,t);e!==o&&i.push(Ye(a,s,r,t,n)),e||i.push(s),a=s,o=e}e=i}return e}function et(e,t,n){return t===1?e.x<n.min.x:t===2?e.x>n.max.x:t===4?e.y<n.min.y:e.y>n.max.y}function tt(e,t){let n=J(e,t),r=n[0].clone(),i=n.length;for(let e of n)e._subtract(r);let a=0,o=0,s=0;for(let e=0,t=i-1;e<i;t=e++){let r=n[e],i=n[t],c=r.y*i.x-i.y*r.x;o+=(r.x+i.x)*c,s+=(r.y+i.y)*c,a+=c}return t.unproject(a===0?r:new b(o/(3*a),s/(3*a))._add(r))}function nt(e){let t=0,n=0,r=0;for(let i of e){let e=new W(i);t+=e.lat,n+=e.lng,r++}return new W([t/r,n/r])}const rt={project(e){return e=new W(e),new b(e.lng,e.lat)},unproject(e){return e=new b(e),new W(e.y,e.x)},bounds:new V([-180,-90],[180,90])},it={R:6378137,R_MINOR:6356752.314245179,bounds:new V([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(e){e=new W(e);let t=Math.PI/180,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=e.lat*t,o=i*Math.sin(a),s=Math.tan(Math.PI/4-a/2)/((1-o)/(1+o))**(i/2);return a=-n*Math.log(Math.max(s,1e-10)),new b(e.lng*t*n,a)},unproject(e){e=new b(e);let t=180/Math.PI,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=Math.exp(-e.y/n),o=Math.PI/2-2*Math.atan(a);for(let e=0,t=.1,n;e<15&&Math.abs(t)>1e-7;e++)n=i*Math.sin(o),n=((1-n)/(1+n))**(i/2),t=Math.PI/2-2*Math.atan(a*n)-o,o+=t;return new W(o*t,e.x*t/n)}},at=6378137,ot={R:at,MAX_LATITUDE:85.0511287798,project(e){e=new W(e);let t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new b(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject(e){e=new b(e);let t=180/Math.PI;return new W((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(()=>{let e=at*Math.PI;return new V([-e,-e],[e,e])})()};var st=class{static code;static projection;static transformation;static wrapLng;static wrapLat;static distance;static latLngToPoint(e,t){let n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)}static pointToLatLng(e,t){let n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)}static project(e){return this.projection.project(e)}static unproject(e){return this.projection.unproject(e)}static scale(e){return 256*2**e}static zoom(e){return Math.log(e/256)/Math.LN2}static getProjectedBounds(e){if(this.infinite)return null;let t=this.projection.bounds,n=this.scale(e);return new V(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))}static infinite=!1;static wrapLatLng(e){e=new W(e);let t=this.wrapLng?o(e.lng,this.wrapLng,!0):e.lng,n=this.wrapLat?o(e.lat,this.wrapLat,!0):e.lat,r=e.alt;return new W(n,t,r)}static wrapLatLngBounds(e){e=new U(e);let t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(r===0&&i===0)return e;let a=e.getSouthWest(),o=e.getNorthEast();return new U(new W(a.lat-r,a.lng-i),new W(o.lat-r,o.lng-i))}},Y=class extends st{static wrapLng=[-180,180];static R=6371e3;static distance(e,t){return ze(e,t,this.R)}},ct=class extends Y{static code=`EPSG:3395`;static projection=it;static transformation=(()=>{let e=.5/(Math.PI*it.R);return new H(e,.5,-e,.5)})()},lt=class extends Y{static code=`EPSG:3857`;static projection=ot;static transformation=(()=>{let e=.5/(Math.PI*ot.R);return new H(e,.5,-e,.5)})()},ut=class extends lt{static code=`EPSG:900913`},dt=class extends Y{static code=`EPSG:4326`;static projection=rt;static transformation=new H(1/180,1,-1/180,.5)},ft=class extends st{static projection=rt;static transformation=new H(1,0,-1,0);static scale(e){return 2**e}static zoom(e){return Math.log(e)/Math.LN2}static distance(e,t){let n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)}static infinite=!0};const pt={pane:`overlayPane`,attribution:null,bubblingPointerEvents:!0};var mt=class extends R{static defaultOptions=pt;addTo(e){return e.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(e){return e?.removeLayer(this),this}getPane(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)}addInteractiveTarget(e){return this._map._targets[i(e)]=this,this}removeInteractiveTarget(e){return delete this._map._targets[i(e)],this}getAttribution(){return this.options.attribution}_layerAdd(e){let t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){let e=this.getEvents();t.on(e,this),this.once(`remove`,()=>t.off(e,this))}this.onAdd(t),this.fire(`add`),t.fire(`layeradd`,{layer:this})}}};const ht={interactive:!1,offset:[0,0],className:``,content:``};var gt=class extends mt{static initHooks=!0;static defaultOptions=ht;constructor(e,t){super(),e instanceof W||Array.isArray(e)?(this._latlng=new W(e),d(this,t)):(d(this,e),this._source=t),this.options.content&&(this._content=this.options.content),this.callInitHooks()}openOn(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this}onAdd(e){this._container||this._initLayout(),e._fadeAnimated&&(this._container.style.opacity=`0`),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&(this._container.style.opacity=`1`),this.bringToFront(),this.options.interactive&&(this._container.classList.add(`leaflet-interactive`),this.addInteractiveTarget(this._container))}onRemove(e){e._fadeAnimated?(this._container.style.opacity=`0`,this._removeTimeout=setTimeout(()=>this._container.remove(),200)):this._container.remove(),this.options.interactive&&(this._container.classList.remove(`leaflet-interactive`),this.removeInteractiveTarget(this._container))}getLatLng(){return this._latlng}setLatLng(e){return this._latlng=new W(e),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(e){return this._content=e,this.update(),this}getElement(){return this._container}update(){this._map&&(this._container.style.visibility=`hidden`,this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility=``,this._adjustPan())}getEvents(){return{zoom:this._updatePosition,viewreset:this._updatePosition,zoomanim:this._animateZoom}}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&S(this._container),this}bringToBack(){return this._map&&C(this._container),this}_prepareOpen(e){let t=this._source;if(!t._map)return!1;let n=t._getOverlaySource();if(!n)return!1;if(this._source=n,!e){if(n.getCenter)e=n.getCenter();else if(n.getLatLng)e=n.getLatLng();else if(n.getBounds)e=n.getBounds().getCenter();else throw Error(`Unable to get source layer LatLng.`)}return this.setLatLng(e),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;let e=this._contentNode,t=typeof this._content==`function`?this._content(this._source??this):this._content;if(typeof t==`string`)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire(`contentupdate`)}_updatePosition(){if(!this._map)return;let e=this._map.latLngToLayerPoint(this._latlng)._round(),t=new b(this.options.offset);T(this._container,e.add(this._getAnchor()));let n=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=`${n}px`,this._container.style.left=`${r}px`}_getAnchor(){return[0,0]}};const _t={pane:`popupPane`,offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,closeButtonLabel:`Close popup`,autoClose:!0,closeOnEscapeKey:!0,className:``,trackResize:!0};var vt=class extends gt{static defaultOptions=_t;openOn(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,super.openOn(e)}onAdd(e){super.onAdd(e),e.fire(`popupopen`,{popup:this}),this._source&&(this._source.fire(`popupopen`,{popup:this},!0),this._source._togglesPopupOnClick()&&this._source.on(`preclick`,P))}onRemove(e){super.onRemove(e),e.fire(`popupclose`,{popup:this}),this._source&&(this._source.fire(`popupclose`,{popup:this},!0),this._source._togglesPopupOnClick()&&this._source.off(`preclick`,P))}getEvents(){let e=super.getEvents();return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e}_initLayout(){let e=`leaflet-popup`,t=this._container=x(`div`,`${e} ${this.options.className||``} leaflet-zoom-animated`),n=this._wrapper=x(`div`,`${e}-content-wrapper`,t);if(this._contentNode=x(`div`,`${e}-content`,n),F(t),xe(this._contentNode),j(t,`contextmenu`,P),this._tipContainer=x(`div`,`${e}-tip-container`,t),this._tip=x(`div`,`${e}-tip`,this._tipContainer),this.options.closeButton){let n=this._closeButton=x(`a`,`${e}-close-button`,t);n.setAttribute(`role`,`button`),n.setAttribute(`aria-label`,this.options.closeButtonLabel),n.href=`#close`,n.innerHTML=`<span aria-hidden="true">×</span>`,j(n,`click`,e=>{e.preventDefault(),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(()=>{this._map&&(this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){let e=this._contentNode,t=e.style;t.maxWidth=`${this.options.maxWidth}px`,t.minWidth=`${this.options.minWidth}px`,t.height=``;let n=e.offsetHeight,r=this.options.maxHeight,i=`leaflet-popup-scrolled`;r&&n>r?(t.height=`${r}px`,e.classList.add(i)):e.classList.remove(i),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();T(this._container,t.add(n))}_adjustPan(){if(!this.options.autoPan||(this._map._panAnim?.stop(),!this._map))return;if(this._autopanning){this._autopanning=!1;return}let e=this._map,t=parseInt(getComputedStyle(this._container).marginBottom,10)||0,n=this._containerHeight+t,r=this._containerWidth,i=new b(this._containerLeft,-n-this._containerBottom);i._add(E(this._container));let a=e.layerPointToContainerPoint(i),o=new b(this.options.autoPanPadding),s=new b(this.options.autoPanPaddingTopLeft??o),c=new b(this.options.autoPanPaddingBottomRight??o),l=e.getSize(),u=0,d=0;a.x+r+c.x>l.x&&(u=a.x+r-l.x+c.x),a.x-u-s.x<0&&(u=a.x-s.x),a.y+n+c.y>l.y&&(d=a.y+n-l.y+c.y),a.y-d-s.y<0&&(d=a.y-s.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire(`autopanstart`).panBy([u,d]))}_getAnchor(){return new b(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}};const yt={pane:`tooltipPane`,offset:[0,0],direction:`auto`,permanent:!1,sticky:!1,opacity:.9};var bt=class extends gt{static defaultOptions=yt;onAdd(e){super.onAdd(e),this.setOpacity(this.options.opacity),e.fire(`tooltipopen`,{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire(`tooltipopen`,{tooltip:this},!0))}onRemove(e){super.onRemove(e),e.fire(`tooltipclose`,{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire(`tooltipclose`,{tooltip:this},!0))}getEvents(){let e=super.getEvents();return this.options.permanent||(e.preclick=this.close),e}_initLayout(){let e=`leaflet-tooltip ${this.options.className||``} leaflet-zoom-animated`;this._contentNode=this._container=x(`div`,e),this._container.setAttribute(`role`,`tooltip`),this._container.setAttribute(`id`,`leaflet-tooltip-${i(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(e){let t,n,r=this.options.direction,i=this._map,a=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(e),c=a.offsetWidth,l=a.offsetHeight,u=new b(this.options.offset),d=this._getAnchor();r===`top`?(t=c/2,n=l):r===`bottom`?(t=c/2,n=0):r===`center`?(t=c/2,n=l/2):r===`right`?(t=0,n=l/2):r===`left`?(t=c,n=l/2):s.x<o.x?(r=`right`,t=0,n=l/2):(r=`left`,t=c+(u.x+d.x)*2,n=l/2),e=e.subtract(new b(t,n,!0)).add(u).add(d),a.classList.remove(`leaflet-tooltip-right`,`leaflet-tooltip-left`,`leaflet-tooltip-top`,`leaflet-tooltip-bottom`),a.classList.add(`leaflet-tooltip-${r}`),T(a,e)}_updatePosition(){let e=this._map.latLngToLayerPoint(this._latlng)._round();this._setPosition(e)}setOpacity(e){this.options.opacity=e,this._container&&(this._container.style.opacity=`${e}`)}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)}_getAnchor(){return new b(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}};const xt=new WeakMap;var X=class extends mt{bindPopup(e,t){return this._popup=this._initOverlay(vt,this._popup,e,t),this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this}unbindPopup(){return this._popup&&=(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),null),this}openPopup(e){return this._popup&&(this._getOverlaySource()===this&&(this._popup._source=this),this._popup._prepareOpen(e)&&this._popup.openOn(this._map)),this}closePopup(){return this._popup?.close(),this}togglePopup(){return this._popup?.toggle(this),this}isPopupOpen(){return this._popup?.isOpen()??!1}setPopupContent(e){return this._popup?.setContent(e),this}getPopup(){return this._popup}_openPopup(e){if(!this._popup||!this._map)return;P(e);let t=e.propagatedFrom??e.target;this._popup._source===t&&t._togglesPopupOnClick()?this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng):(this._popup._source=t,this.openPopup(e.latlng))}_movePopup(e){this._popup.setLatLng(e.latlng)}bindTooltip(e,t){let n=this.isTooltipOpen()?null:this._tooltip;return this._tooltip&&this.unbindTooltip(),this._tooltip=this._initOverlay(bt,n,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this}unbindTooltip(){return this._tooltip&&=(this._initTooltipInteractions(!0),this.closeTooltip(),null),this}_initTooltipInteractions(e){let{permanent:t,sticky:n}=this._tooltip.options,r={remove:this.closeTooltip,move:this._moveTooltip};t?r.add=this._openTooltip:(r.pointerover=this._openTooltip,r.pointerout=this.closeTooltip,r.click=this._openTooltip,r.add=this._toggleFocusListeners,this._map&&this._toggleFocusListeners(!e)),n&&(r.pointermove=this._moveTooltip),this[e?`off`:`on`](r)}openTooltip(e){return this._tooltip&&(this._getOverlaySource()===this&&(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(e=>this._setAriaDescribedByOnLayer(e)))),this}closeTooltip(){return this._tooltip?.close(),this}toggleTooltip(){return this._tooltip?.toggle(this),this}isTooltipOpen(){return this._tooltip?.isOpen()??!1}setTooltipContent(e){return this._tooltip?.setContent(e),this}getTooltip(){return this._tooltip}_toggleFocusListeners(e){this.getElement?this._addFocusListenersOnLayer(this,!e):this.eachLayer&&this.eachLayer(t=>this._addFocusListenersOnLayer(t,!e))}_addFocusListenersOnLayer(e,t){let n=e.getElement?.();if(!n)return;let r=xt.get(n);if(r&&N(n,`focus`,r,this),t){xt.delete(n),N(n,`blur`,this.closeTooltip,this);return}let i=()=>{this._tooltip&&(this._tooltip._source=e,this.openTooltip())};xt.set(n,i),j(n,`focus`,i,this),j(n,`blur`,this.closeTooltip,this)}_setAriaDescribedByOnLayer(e){(e.getElement?.())?.setAttribute?.(`aria-describedby`,this._tooltip._container.id)}_openTooltip(e){this._tooltip&&this._map&&(this._map.dragging?.moving()?e.type===`add`&&!this._moveEndOpensTooltip&&(this._moveEndOpensTooltip=!0,this._map.once(`moveend`,()=>{this._moveEndOpensTooltip=!1,this._openTooltip(e)})):(this._tooltip._source=e.propagatedFrom??e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)))}_moveTooltip(e){let t=e.latlng,n,r,i=this._tooltip;i.options.sticky&&e.originalEvent&&(n=this._map.pointerEventToContainerPoint(e.originalEvent),r=this._map.containerPointToLayerPoint(n),t=this._map.layerPointToLatLng(r)),i.setLatLng(t)}_initOverlay(e,t,n,r){let i=n;return i instanceof e?(d(i,r),i._source=this):(i=t&&!r?t:new e(r,this),i.setContent(n)),i}_getOverlaySource(){return this}_togglesPopupOnClick(){return!0}};function St(e,t){return e=new W(e),e.alt===void 0?[c(e.lng,t),c(e.lat,t)]:[c(e.lng,t),c(e.lat,t),c(e.alt,t)]}function Z(e,t,n,r){if(!q(e))return e.map(e=>Z(e,t,n,r));let i=e.map(e=>St(e,r));return n&&i.length>0&&i.push(i[0].slice()),i}function Q(e,t){return e.feature?{...e.feature,geometry:t}:Ct(t)}function Ct(e){return e.type===`Feature`||e.type===`FeatureCollection`?e:{type:`Feature`,properties:{},geometry:e}}function wt(e,t){return Q(e,{type:`Point`,coordinates:St(e.getLatLng(),t)})}var Tt=class extends X{static initHooks=!0;constructor(e,t){super(),d(this,t),this._layers={};for(let t of e??[])this.addLayer(t);this.callInitHooks()}addLayer(e){let t=this.getLayerId(e);return this._layers[t]=e,this._map?.addLayer(e),this}removeLayer(e){let t=typeof e==`number`?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this}hasLayer(e){return(typeof e==`number`?e:this.getLayerId(e))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}onAdd(e){this.eachLayer(e.addLayer,e)}onRemove(e){this.eachLayer(e.removeLayer,e)}eachLayer(e,t){for(let n of Object.values(this._layers))e.call(t,n);return this}getLayer(e){return this._layers[e]}getLayers(){let e=[];return this.eachLayer(t=>e.push(t)),e}setZIndex(e){for(let t of Object.values(this._layers))t.setZIndex?.(e);return this}getLayerId(e){return i(e)}toMultiPoint(e){let t=[];return this.eachLayer(n=>{t.push(n.toGeoJSON(e).geometry.coordinates)}),Q(this,{type:`MultiPoint`,coordinates:t})}toGeoJSON(e){let t=this.feature?.geometry?.type;if(t===`MultiPoint`)return this.toMultiPoint(e);let n=t===`GeometryCollection`,r=[];for(let t of Object.values(this._layers))if(t.toGeoJSON){let i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{let e=Ct(i);e.type===`FeatureCollection`?r.push(...e.features):r.push(e)}}return n?Q(this,{geometries:r,type:`GeometryCollection`}):{type:`FeatureCollection`,features:r}}},$=class e extends Tt{addLayer(e){return this.hasLayer(e)?this:(e.addEventParent(this),super.addLayer(e),this.fire(`layeradd`,{layer:e}))}removeLayer(e){return this.hasLayer(e)?(typeof e==`number`&&(e=this._layers[e]),e.removeEventParent(this),super.removeLayer(e),this.fire(`layerremove`,{layer:e})):this}setStyle(e){for(let t of Object.values(this._layers))t.setStyle?.(e);return this}bringToFront(){for(let e of Object.values(this._layers))e.bringToFront?.();return this}bringToBack(){for(let e of Object.values(this._layers))e.bringToBack?.();return this}getBounds(){let t=new U;for(let n of Object.values(this._layers))n.getBounds?t.extend(n.getBounds()):n.getLatLng?t.extend(n.getLatLng()):n instanceof Tt&&t.extend(e.prototype.getBounds.call(n));return t}_getOverlaySource(){return Object.values(this._layers).find(e=>e._map)}};const Et={iconUrl:null,iconRetinaUrl:null,iconSize:null,iconAnchor:null,popupAnchor:[0,0],tooltipAnchor:[0,0],shadowUrl:null,shadowRetinaUrl:null,shadowSize:null,shadowAnchor:null,className:``,crossOrigin:!1};var Dt=class extends v{static initHooks=!0;static defaultOptions=Et;constructor(e){super(),d(this,e),this.callInitHooks()}createIcon(e){return this._createIcon(`icon`,e)}createShadow(e){return this._createIcon(`shadow`,e)}_createIcon(e,t){let n=this._getIconUrl(e);if(!n){if(e===`icon`)throw Error(`iconUrl not set in Icon options (see the docs).`);return null}let r=this._createImg(n,t instanceof HTMLImageElement?t:null);return this._setIconStyles(r,e),(this.options.crossOrigin||this.options.crossOrigin===``)&&(r.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),r}_setIconStyles(e,t){let n=this.options,r=n[`${t}Size`];typeof r==`number`&&(r=[r,r]);let i=b.validate(r)&&new b(r),a=t===`shadow`&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2),o=b.validate(a)&&new b(a);e.className=`leaflet-marker-${t} ${n.className||``}`,o&&(e.style.marginLeft=`${-o.x}px`,e.style.marginTop=`${-o.y}px`,e.style.transformOrigin=`${o.x}px ${o.y}px`),i&&(e.style.width=`${i.x}px`,e.style.height=`${i.y}px`)}_createImg(e,t){return t??=document.createElement(`img`),t.src=e,t}_getIconUrl(e){return window.devicePixelRatio>1&&this.options[`${e}RetinaUrl`]||this.options[`${e}Url`]}};const Ot=(e,t,n,r,i=``)=>`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.59 47.09" fill="%23fff" stroke-width="1.1"><radialGradient id="c"><stop stop-opacity=".3"/><stop offset="1" stop-opacity="0"/></radialGradient><ellipse cx="12.8" cy="41.53" rx="10.5" ry="5" fill="url(%23c)"/><linearGradient id="a" x2="0" y1="1"><stop stop-color="${e}"/><stop offset="1" stop-color="${t}" stop-opacity=".75"/></linearGradient><linearGradient id="b" x2="0" y1=".5"><stop stop-color="${n}"/><stop offset="1" stop-color="${r}"/></linearGradient><circle cx="12.8" cy="13.63" r="4.7"/><path id="p" d="M12.84 1.74c-6.57 0-12.04 5.69-12.04 11.87 0 2.78 1.56 6.31 2.69 8.75l9.31 17.87 9.26-17.87c1.13-2.44 2.74-5.79 2.74-8.75 0-6.18-5.38-11.87-11.96-11.87Zm0 7.16a4.71 4.71 0 0 1 4.68 4.71c0 2.59-2.1 4.66-4.68 4.68-2.58-.02-4.68-2.09-4.68-4.68a4.71 4.71 0 0 1 4.68-4.71Z"/><use href="%23p" fill="url(%23a)" stroke="url(%23b)"/>${i}</svg>`,kt={iconUrl:Ot(`%23126FC6`,`%23107BC2`,`%232E6C97`,`%233883B7`),iconSize:[25,46],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],color:null};var At=class extends Dt{static defaultOptions=kt;_getIconUrl(e){let{color:t}=this.options;if(!t||e!==`icon`)return super._getIconUrl(e);let n=t.replace(`#`,`%23`);return Ot(n,n,n,n,`<use href="%23p" fill="none" stroke="%23666" stroke-opacity=".4"/>`)}};const jt={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};var Mt=class extends z{static initHooks=!0;constructor(e){super(e._map),this._marker=e,this.callInitHooks()}addHooks(){let e=this._marker._icon;this._draggable||=new B(e),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),j(e,`keydown keyup blur`,this._onKey,this),e.classList.add(`leaflet-marker-draggable`)}removeHooks(){this._keyDrag=!1,this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),N(this._draggable._element,`keydown keyup blur`,this._onKey,this),this._marker._icon?.classList.remove(`leaflet-marker-draggable`)}moved(){return this._draggable?._moved}_adjustPan(e){let t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,a=t._icon,o=E(a),s=n.getPixelBounds(),c=n.getPixelOrigin(),l=new V(s.min._subtract(c).add(i),s.max._subtract(c).subtract(i));if(!l.contains(o)){let t=new b((Math.max(l.max.x,o.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(r);n.panBy(t,{animate:!1}),this._draggable._newPos._add(t),this._draggable._startPos._add(t),T(a,this._draggable._newPos),this._onDrag(e),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,e))}}_onDragStart(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.(),this._marker.fire(`movestart`).fire(`dragstart`)}_onPreDrag(e){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,e)))}_onDrag(e){let t=this._marker,n=E(t._icon),r=t._map.layerPointToLatLng(n);t._positionElements(n),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire(`move`,e).fire(`drag`,e)}_onDragEnd(e){cancelAnimationFrame(this._panRequest),delete this._oldLatLng,this._marker.fire(`moveend`).fire(`dragend`,e)}_onKey(e){let t=e,n=jt[t.key],r=this._draggable,{options:i,_map:a}=this._marker;if(e.type!==`keydown`)this._keyDrag&&(this._keyDrag=!1,r.finishDrag());else if(n&&t.target===r._element&&!(t.altKey||t.ctrlKey||t.metaKey)){if(e.preventDefault(),!this._keyDrag){if(B._dragging)return;B._dragging=r,r._startPos=r._newPos=E(r._element),r._moved=r._moving=this._keyDrag=!0,r.fire(`dragstart`)}r._newPos=r._newPos.add(new b(...n).multiplyBy(t.shiftKey?30:10)),T(r._element,r._newPos),r.fire(`drag`,{originalEvent:t}),i.autoPan&&a.panInside(this._marker._latlng,{padding:i.autoPanPadding,animate:!1})}}};const Nt={icon:new At,interactive:!0,keyboard:!0,title:``,alt:`Marker`,zIndexOffset:0,opacity:1,rotation:null,riseOnHover:!1,riseOffset:250,pane:`markerPane`,shadowPane:`shadowPane`,bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10};var Pt=class extends X{static initHooks=!0;static defaultOptions=Nt;constructor(e,t){super(),d(this,t),this._latlng=new W(e),this.callInitHooks()}onAdd(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on(`zoomanim`,this._animateZoom,this),this._initIcon(),this.update()}onRemove(e){this.dragging&&(this.options.draggable=this.dragging.enabled(),this.options.draggable&&this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off(`zoomanim`,this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(e){let t=this._latlng;return this._latlng=new W(e),this.update(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})}setZIndexOffset(e){return this.options.zIndexOffset=e,this.update()}getIcon(){return this.options.icon}setIcon(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this}getElement(){return this._icon}update(){if(this._icon&&this._map){let e=this._map.latLngToLayerPoint(this._latlng)._round();this._setPos(e)}return this}_initIcon(){let e=this.options,t=`leaflet-zoom-${this._zoomAnimated?`animated`:`hide`}`,n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),n instanceof HTMLImageElement&&(n.alt=e.alt??``)),n.classList.add(t),e.keyboard&&(n.tabIndex=0,e.interactive&&(n.setAttribute(`role`,`button`),j(n,`keydown`,this._onKeyDown,this))),this._icon=n,e.riseOnHover&&this.on({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&j(n,`focus`,this._panOnFocus,this);let i=e.icon.createShadow?.(this._shadow)??null,a=!1;i!==this._shadow&&(this._removeShadow(),a=!0),i&&(i.classList.add(t),i.alt=``),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(n),this._initInteraction(),i&&a&&this.getPane(e.shadowPane).appendChild(i)}_removeIcon(){this.options.riseOnHover&&this.off({pointerover:this._bringToFront,pointerout:this._resetZIndex});let e=this._icon;this.options.autoPanOnFocus&&N(e,`focus`,this._panOnFocus,this),N(e,`keydown`,this._onKeyDown,this),e.remove(),this.removeInteractiveTarget(e),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(e){this._positionElements(e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()}_positionElements(e){let t=this.options.rotation;this._icon&&(T(this._icon,e),t!=null&&(this._icon.style.transform+=` rotate(${t}deg)`)),this._shadow&&(T(this._shadow,e),this._shadow.style.display=t==null?``:`none`)}_updateZIndex(e){this._icon&&(this._icon.style.zIndex=`${this._zIndex+e}`)}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center)._round();this._setPos(t)}_initInteraction(){if(!this.options.interactive)return;let e=this._icon;if(e.classList.add(`leaflet-interactive`),this.addInteractiveTarget(e),Mt){if(this.dragging?._draggable?._element===e){e.classList.toggle(`leaflet-marker-draggable`,this.dragging.enabled());return}let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Mt(this),t&&this.dragging.enable()}}getRotation(){return this.options.rotation}setRotation(e){return this.options.rotation=e,this._icon&&!this._map._animatingZoom&&(this._positionElements(E(this._icon)),this._popup?._updatePosition(),this._tooltip?._updatePosition()),this}setOpacity(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this}toGeoJSON(e){return wt(this,e)}_updateOpacity(){let e=this.options.opacity;this._icon&&(this._icon.style.opacity=`${e}`),this._shadow&&(this._shadow.style.opacity=`${e}`)}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_onKeyDown(e){e.target!==this._icon||e.repeat||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),this._icon?.click())}_panOnFocus(){let e=this._map;if(!e)return;let t=this._icon,n=getComputedStyle(t),r=new b(-parseFloat(n.marginLeft)||0,-parseFloat(n.marginTop)||0),i=new b(t.offsetWidth,t.offsetHeight);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:i.subtract(r)})}_getPopupAnchor(){return this._rotateAnchor(this.options.icon.options.popupAnchor)}_getTooltipAnchor(){return this._rotateAnchor(this.options.icon.options.tooltipAnchor)}_rotateAnchor(e){let t=(this.options.rotation??0)*Math.PI/180;if(!t||!e)return e;let{x:n,y:r}=new b(e),i=Math.cos(t),a=Math.sin(t);return new b(n*i-r*a,n*a+r*i)}};const Ft={padding:.1,continuous:!1};var It=class extends X{static initHooks=!0;static defaultOptions=Ft;constructor(e){super(),d(this,e),this.callInitHooks()}onAdd(e){this._container||(this._initContainer(),this._container.classList.add(`leaflet-zoom-animated`)),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(e){this._destroyContainer()}getEvents(){let e={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,resize:this._resizeContainer,zoomend:this._onZoomEnd,zoomanim:this._onAnimZoom};return this.options.continuous&&(e.move=this._onMoveEnd),e}_onAnimZoom(e){this._updateTransform(e.center,e.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(e,t){let n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),a=r.multiplyBy(-n)._add(i)._subtract(this._map._getNewPixelOrigin(e,t))._round();w(this._container,a,n)}_onMoveEnd(e){let t=this.options.padding,n=this._map.getSize(),r=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new V(r,r.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(e)}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=x(`div`)}_destroyContainer(){N(this._container),this._container.remove(),delete this._container}_resizeContainer(){let e=this.options.padding,t=this._map.getSize().multiplyBy(1+e*2).round();return this._container.style.width=`${t.x}px`,this._container.style.height=`${t.y}px`,t}_onZoomEnd(){}_onViewReset(){}_onSettled(e){}},Lt=class extends It{static initHooks=!0;constructor(e){super({...e,continuous:!1}),i(this),this._layers??={},this.callInitHooks()}onAdd(e){super.onAdd(e),this.on(`update`,this._updatePaths,this)}onRemove(e){super.onRemove(e),this.off(`update`,this._updatePaths,this)}_onZoomEnd(){for(let e of Object.values(this._layers))e._project()}_updatePaths(){for(let e of Object.values(this._layers))e._update()}_onViewReset(){for(let e of Object.values(this._layers))e._reset()}_onSettled(){this._update()}_update(){}},Rt=class e extends Lt{_initContainer(){this._container=e.create(`svg`),this._container.setAttribute(`pointer-events`,`none`),this._rootGroup=e.create(`g`),this._container.appendChild(this._rootGroup)}_destroyContainer(){super._destroyContainer(),delete this._rootGroup,delete this._svgSize}_resizeContainer(){let e=super._resizeContainer();this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,this._container.setAttribute(`width`,`${e.x}`),this._container.setAttribute(`height`,`${e.y}`));let t=this._bounds;return t&&this._container.setAttribute(`viewBox`,[t.min.x,t.min.y,e.x,e.y].join(` `)),e}_update(){if(this._map._animatingZoom&&this._bounds)return;let e=this._bounds,t=e.getSize();this._container.setAttribute(`viewBox`,[e.min.x,e.min.y,t.x,t.y].join(` `)),this.fire(`update`)}_initPath(t){let n=t._path=e.create(`path`);t.options.className&&n.classList.add(...u(t.options.className)),t.options.interactive&&n.classList.add(`leaflet-interactive`),this._updateStyle(t),this._layers[i(t)]=t}_addPath(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)}_removePath(e){e._path.remove(),e.removeInteractiveTarget(e._path),delete this._layers[i(e)]}_updatePath(e){e._project(),e._update()}_updateStyle(e){let t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute(`stroke`,n.color),t.setAttribute(`stroke-opacity`,`${n.opacity}`),t.setAttribute(`stroke-width`,`${n.weight}`),t.setAttribute(`stroke-linecap`,n.lineCap),t.setAttribute(`stroke-linejoin`,n.lineJoin),n.dashArray?t.setAttribute(`stroke-dasharray`,`${n.dashArray}`):t.removeAttribute(`stroke-dasharray`),n.dashOffset?t.setAttribute(`stroke-dashoffset`,n.dashOffset):t.removeAttribute(`stroke-dashoffset`)):t.setAttribute(`stroke`,`none`),n.fill?(t.setAttribute(`fill`,n.fillColor||n.color),t.setAttribute(`fill-opacity`,`${n.fillOpacity}`),t.setAttribute(`fill-rule`,n.fillRule||`evenodd`)):t.setAttribute(`fill`,`none`))}_updatePoly(t,n){this._setPath(t,e.pointsToPath(t._parts,n))}_updateCircle(e){let t=e._point,n=Math.max(Math.round(e._pxRadius),1),r=`a${n},${Math.max(Math.round(e._pxRadiusY??n),1)} 0 1,0 `,i=e._empty()?`M0 0`:`M${zt(t.x-n)},${zt(t.y)}${r}${n*2},0 ${r}${-n*2},0 `;this._setPath(e,i)}_setPath(e,t){e._path.setAttribute(`d`,t)}_bringToFront(e){S(e._path)}_bringToBack(e){C(e._path)}static create(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}static pointsToPath(e,t){return e.flatMap(e=>[...e.map((e,t)=>`${(t?`L`:`M`)+zt(e.x)} ${zt(e.y)}`),t?`z`:``]).join(``)||`M0 0`}};function zt(e){let t=Math.round(e*10),n=t<0?-t:t,r=Math.floor(n/10),i=n-r*10;return(t<0?`-`:``)+(i?`${r}.${i}`:r)}const Bt={stroke:!0,color:`#3388ff`,weight:3,opacity:1,lineCap:`round`,lineJoin:`round`,dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:`evenodd`,interactive:!0,bubblingPointerEvents:!0,renderer:void 0};var Vt=class extends X{static defaultOptions=Bt;beforeAdd(e){this._renderer=e.getRenderer(this)}onAdd(e){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(e){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(e){return d(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.hasOwn(e,`weight`)&&this._updateBounds()),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_createRenderer(e){return new Rt(e)}_togglesPopupOnClick(){return!1}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}};const Ht={smoothFactor:.5,noClip:!1};var Ut=class extends Vt{static initHooks=!0;static defaultOptions=Ht;constructor(e,t){super(),d(this,t),this._setLatLngs(e),this.callInitHooks()}getLatLngs(){return this._latlngs}setLatLngs(e){return this._setLatLngs(e),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(e){e=new b(e);let t=1/0,n=null,r,i,a=K;for(let o of this._parts)for(let s=1,c=o.length;s<c;s++){r=o[s-1],i=o[s];let c=a(e,r,i,!0);c<t&&(t=c,n=a(e,r,i))}return n&&Object.assign(n,{distance:Math.sqrt(t)})}getCenter(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return Ze(this._defaultShape(),this._map.options.crs)}getBounds(){return this._bounds}addLatLng(e,t){return t??=this._defaultShape(),e=new W(e),t.push(e),this._bounds.extend(e),this.redraw()}toGeoJSON(e){let t=!q(this._latlngs),n=Z(this._latlngs,0,!1,e);return Q(this,{type:`${t?`Multi`:``}LineString`,coordinates:n})}_setLatLngs(e){this._bounds=new U,this._latlngs=this._convertLatLngs(e)}_defaultShape(){return q(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(e){if(!q(e))return e.map(e=>this._convertLatLngs(e));let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=new W(e[n]),this._bounds.extend(t[n]);return t}_project(){let e=new V;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())}_updateBounds(){let e=this._clickTolerance(),t=new b(e,e);this._rawPxBounds&&(this._pxBounds=new V([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))}_projectLatlngs(e,t,n){if(q(e)){let r=e.map(e=>this._map.latLngToLayerPoint(e));r.forEach(e=>n.extend(e)),t.push(r)}else e.forEach(e=>this._projectLatlngs(e,t,n))}_clipPoints(){let e=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(e))return;if(this.options.noClip){this._parts=this._rings;return}let t=this._parts,n,r,i,a,o,s,c;for(n=0,i=0,a=this._rings.length;n<a;n++)for(c=this._rings[n],r=0,o=c.length;r<o-1;r++)s=Je(c[r],c[r+1],e,!!r),s&&(t[i]??=[],t[i].push(s[0]),(s[1]!==c[r+1]||r===o-2)&&(t[i].push(s[1]),i++))}_simplifyPoints(){let e=this._parts,t=this.options.smoothFactor;for(let n=0,r=e.length;n<r;n++)e[n]=Ve(e[n],t)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_containsPoint(e,t){let n,r,i,a,o,s,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,a=this._parts.length;n<a;n++)for(s=this._parts[n],r=0,o=s.length,i=o-1;r<o;i=r++)if((t||r!==0)&&He(e,s[i],s[r])<=c)return!0;return!1}};const Wt={fill:!0};var Gt=class extends Ut{static defaultOptions=Wt;isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}getCenter(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return tt(this._defaultShape(),this._map.options.crs)}toGeoJSON(e){let t=!q(this._latlngs),n=t&&!q(this._latlngs[0]),r=Z(this._latlngs,0,!0,e);return Q(this,{type:`${n?`Multi`:``}Polygon`,coordinates:t?r:[r]})}_convertLatLngs(e){let t=super._convertLatLngs(e),n=t.length;return n>=2&&q(t)&&t[0].equals(t[n-1])&&t.pop(),t}_setLatLngs(e){super._setLatLngs(e),q(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return q(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let e=this._renderer._bounds,t=this.options.weight,n=new b(t,t);if(e=new V(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e)){if(this.options.noClip)this._parts=this._rings;else for(let t of this._rings){let n=$e(t,e);n.length&&this._parts.push(n)}}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(e){let t=!1,n,r,i,a,o,s,c,l;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(a=0,c=this._parts.length;a<c;a++)for(n=this._parts[a],o=0,l=n.length,s=l-1;o<l;s=o++)r=n[o],i=n[s],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(t=!t);return t||super._containsPoint(e,!0)}},Kt=class e extends ${static initHooks=!0;constructor(e,t){super(void 0,t),e&&this.addData(e),this.callInitHooks()}addData(t){if(Array.isArray(t)||`features`in t){for(let e of Array.isArray(t)?t:t.features)this.addData(e);return this}let n=this.options,r=e.asFeature(t);if(!r.geometry||n.filter&&!n.filter(r))return this;let i=e.geometryToLayer(r,n);return i?(i.feature=r,i.defaultOptions=i.options,this.resetStyle(i),n.onEachFeature&&n.onEachFeature(r,i),this.addLayer(i)):this}resetStyle(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=Object.create(e.defaultOptions),this._setLayerStyle(e,this.options.style),this)}setStyle(e){return this.eachLayer(t=>this._setLayerStyle(t,e))}_setLayerStyle(e,t){e.setStyle&&(typeof t==`function`&&(t=t(e.feature)),e.setStyle(t))}static geometryToLayer(t,n){let r=t.type===`Feature`?t.geometry:t,i=r?.coordinates,a=[],o=n?.pointToLayer,s=n?.coordsToLatLng??e.coordsToLatLng,c,l;if(!r)return null;switch(r.type){case`Point`:return c=s(i),e._pointToLayer(o,t,c,n);case`MultiPoint`:for(let r of i)c=s(r),a.push(e._pointToLayer(o,t,c,n));return new $(a);case`LineString`:case`MultiLineString`:return l=e.coordsToLatLngs(i,r.type===`LineString`?0:1,s),new Ut(l,n);case`Polygon`:case`MultiPolygon`:return l=e.coordsToLatLngs(i,r.type===`Polygon`?1:2,s),new Gt(l,n);case`GeometryCollection`:for(let i of r.geometries){let r=e.geometryToLayer({geometry:i,type:`Feature`,properties:t.properties},n);r&&(r.feature=e.asFeature(i),a.push(r))}return new $(a);case`FeatureCollection`:for(let t of r.features){let r=e.geometryToLayer(t,n);r&&a.push(r)}return new $(a);default:throw Error(`Invalid GeoJSON object.`)}}static _pointToLayer(e,t,n,r){return e?e(t,n):new Pt(n,r?.markersInheritOptions&&r)}static coordsToLatLng(e){return new W(e[1],e[0],e[2])}static coordsToLatLngs(t,n,r){return t.map(t=>n?e.coordsToLatLngs(t,n-1,r):(r||e.coordsToLatLng)(t))}static latLngToCoords=St;static latLngsToCoords=Z;static getFeature=Q;static asFeature=Ct};const qt={opacity:1,alt:``,interactive:!1,crossOrigin:!1,errorOverlayUrl:``,zIndex:1,className:``,decoding:`auto`};var Jt=class extends X{static initHooks=!0;static defaultOptions=qt;constructor(e,t,n){super(),this._url=e,this._bounds=new U(t),d(this,n),this.callInitHooks()}onAdd(e){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add(`leaflet-interactive`),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(e){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this}setStyle(e){return e.opacity&&this.setOpacity(e.opacity),this}bringToFront(){return this._map&&S(this._image),this}bringToBack(){return this._map&&C(this._image),this}setUrl(e){return this._url=e,this._image&&(this._image.src=e),this}setBounds(e){return this._bounds=new U(e),this._map&&this._reset(),this}getEvents(){return{zoom:this._reset,viewreset:this._reset,zoomanim:this._animateZoom}}setZIndex(e){return this.options.zIndex=e,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){let e=this._url,t=e instanceof HTMLImageElement,n=t?e:x(`img`);this._image=n,n.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&n.classList.add(...u(this.options.className)),n.onload=this.fire.bind(this,`load`),n.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),n.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t?this._url=n.src:(n.src=e,n.alt=this.options.alt)}_animateZoom(e){let t=this._map.getZoomScale(e.zoom),n=this._map._latLngToNewLayerPoint(this._bounds.getNorthWest(),e.zoom,e.center);w(this._image,n,t)}_reset(){let e=this._image,t=new V(this._map.latLngToLayerPoint(this._bounds.getNorthWest())._round(),this._map.latLngToLayerPoint(this._bounds.getSouthEast())._round()),n=t.getSize();T(e,t.min),e.style.width=`${n.x}px`,e.style.height=`${n.y}px`}_updateOpacity(){this._image.style.opacity=`${this.options.opacity}`}_updateZIndex(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=`${this.options.zIndex}`)}_overlayOnError(){this.fire(`error`);let e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)}getCenter(){return this._bounds.getCenter()}};const Yt={autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0};var Xt=class extends Jt{static defaultOptions=Yt;_initImage(){let e=this._url,t=e instanceof HTMLVideoElement,n=this._image=t?e:x(`video`);if(n.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&n.classList.add(...u(this.options.className)),j(n,`pointerdown`,e=>{n.controls&&P(e)}),n.onloadeddata=this.fire.bind(this,`load`),t){let e=n.getElementsByTagName(`source`),t=Array.from(e,e=>e.src);this._url=e.length>0?t:[n.src];return}let r=this._url=Array.isArray(e)?e:[e];this.options.keepAspectRatio||(n.style.objectFit=`fill`),n.autoplay=!!this.options.autoplay,n.controls=!!this.options.controls,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(let e of r){let t=x(`source`);t.src=e,n.appendChild(t)}}},Zt=class extends Jt{_initImage(){let e=this._image=this._url;e.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&e.classList.add(...u(this.options.className))}};const Qt={iconSize:[12,12],html:!1,bgPos:null,className:`leaflet-div-icon`};var $t=class extends Dt{static defaultOptions=Qt;createIcon(e){let t=e instanceof HTMLDivElement?e:document.createElement(`div`),n=this.options;if(n.html instanceof Element?(t.replaceChildren(),t.appendChild(n.html)):t.innerHTML=n.html===!1?``:n.html,n.bgPos){let e=new b(n.bgPos);t.style.backgroundPosition=`${-e.x}px ${-e.y}px`}return this._setIconStyles(t,`icon`),t}createShadow(){return null}};const en={tileSize:256,opacity:1,updateWhenIdle:!1,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:`tilePane`,className:``,keepBuffer:2};var tn=class extends X{static initHooks=!0;static defaultOptions=en;constructor(e){super(),d(this,e),this.callInitHooks()}onAdd(e){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(e){e._addZoomLimit(this)}onRemove(e){this._removeAllTiles(),this._container.remove(),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout),cancelAnimationFrame(this._fadePruneFrame),this._fadePruneFrame=0}bringToFront(){return this._map&&(S(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(C(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(e){return this.options.opacity=e,this._updateOpacity(),this}setZIndex(e){return this.options.zIndex=e,this._updateZIndex(),this}isLoading(){return!!this._loading}redraw(){if(this._map){this._removeAllTiles();let e=this._clampZoom(Math.round(this._map.getZoom()));e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this}getEvents(){let e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd,worldcopyjump:this._onWorldCopyJump,zoomanim:this._animateZoom};return this.options.updateWhenIdle||(this._onMove||=a(this._onMoveEnd,this.options.updateInterval,this),e.move=this._onMove),e}createTile(){return document.createElement(`div`)}getTileSize(){let e=this.options.tileSize;return e instanceof b?e:new b(e,e)}_updateZIndex(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=`${this.options.zIndex}`)}_setAutoZIndex(e){let t=this.getPane().children,n=-e(-1/0,1/0);for(let r of t){let t=r.style.zIndex;r!==this._container&&t&&(n=e(n,+t))}isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())}_updateOpacity(){this._map&&(this._container.style.opacity=`${this.options.opacity}`)}_onOpaqueTile(e){}_initContainer(){this._container||(this._container=x(`div`,`leaflet-layer ${this.options.className??``}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){let e=this._tileZoom,t=this.options.maxZoom;if(e===void 0)return;for(let n of Object.keys(this._levels).map(Number))this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=`${t-Math.abs(e-n)}`,this._onUpdateLevel(n)):(this._levels[n].el.remove(),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);let n=this._levels[e],r=this._map;return n||(n=this._levels[e]={},n.el=x(`div`,`leaflet-tile-container leaflet-zoom-animated`,this._container),n.el.style.zIndex=`${t}`,n.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),n.zoom=e,this._setZoomTransform(n,r.getCenter(),r.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}_onUpdateLevel(e){}_onRemoveLevel(e){}_onCreateLevel(e){}_pruneTiles(){if(!this._map)return;let e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(let e of Object.values(this._tiles))e.retain=e.current;for(let e of Object.values(this._tiles))if(e.current&&!e.active){let t=e.coords;this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2)}for(let[e,t]of Object.entries(this._tiles))t.retain||this._removeTile(e)}}_removeTilesAtZoom(e){for(let[t,n]of Object.entries(this._tiles))n.coords.z===e&&this._removeTile(t)}_removeAllTiles(){for(let e of Object.keys(this._tiles))this._removeTile(e)}_invalidateAll(e){let t=this._map;if(!(e?.zoom!==void 0&&e.zoom!==t.getZoom()&&t.getBounds().contains(e.center))){for(let e of Object.keys(this._levels))this._levels[e].el.remove(),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0}}_retainParent(e,t,n,r){for(n--;n>=r;n--)if(e=Math.floor(e/2),t=Math.floor(t/2),this._retain(e,t,n))return!0;return!1}_retainChildren(e,t,n,r){for(let i=2*e;i<2*e+2;i++)for(let e=2*t;e<2*t+2;e++)!this._retain(i,e,n+1)&&n+1<r&&this._retainChildren(i,e,n+1,r)}_retain(e,t,n){let r=this._tiles[this._tileCoordsToKey({x:e,y:t,z:n})];return r?.loaded&&(r.retain=!0),r?.active}_resetView(e){let t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)}_animateZoom(e){this._setView(e.center,e.zoom,!0,e.noUpdate)}_clampZoom(e){let t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e}_setView(e,t,n,r){let i=Math.round(t);i=this.options.maxZoom!==void 0&&i>this.options.maxZoom||this.options.minZoom!==void 0&&i<this.options.minZoom?void 0:this._clampZoom(i);let a=this.options.updateWhenZooming&&i!==this._tileZoom;(!r||a)&&(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),i!==void 0&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)}_setZoomTransforms(e,t){for(let n of Object.values(this._levels))this._setZoomTransform(n,e,t)}_setZoomTransform(e,t,n){let r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n)).round();w(e.el,i,r)}_resetGrid(){let e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.x)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.y),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]}_onMoveEnd(){this._map&&!this._map._animatingZoom&&this._update()}_onWorldCopyJump({worlds:e}){if(!this._wrapX)return;let t=this.getTileSize(),n={};for(let r of Object.values(this._tiles)){let{coords:i,el:a}=r,o=e*this._map.getPixelWorldBounds(i.z).getSize().x;o%t.x===0&&(i.x-=o/t.x,T(a,E(a).subtract([o,0]),!0)),n[this._tileCoordsToKey(i)]=r}this._tiles=n}_getTiledPixelBounds(e){let t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),a=t.getSize().divideBy(r*2);return new V(i.subtract(a),i.add(a))}_update(e){let t=this._map;if(!t)return;let n=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom===void 0)return;let r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),a=i.getCenter(),o=[],s=this.options.keepBuffer,c=new V(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw Error(`Attempted to load an infinite number of tiles`);for(let e of Object.values(this._tiles)){let t=e.coords;t.z===this._tileZoom&&c.contains(new b(t.x,t.y))||(e.current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(let e=i.min.y;e<=i.max.y;e++)for(let t=i.min.x;t<=i.max.x;t++){let n=new b(t,e);if(n.z=this._tileZoom,!this._isValidTile(n))continue;let r=this._tiles[this._tileCoordsToKey(n)];r?r.current=!0:o.push(n)}if(o.sort((e,t)=>e.distanceTo(a)-t.distanceTo(a)),o.length!==0){this._loading||(this._loading=!0,this.fire(`loading`));let e=document.createDocumentFragment();for(let t of o)this._addTile(t,e);this._level.el.appendChild(e)}}}_isValidTile(e){let t=this._map.options.crs;if(!t.infinite){let n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;let n=this._tileCoordsToBounds(e);return new U(this.options.bounds).overlaps(n)}_tileCoordsToNwSe(e){let t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]}_tileCoordsToBounds(e){let t=this._tileCoordsToNwSe(e),n=new U(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n}_tileCoordsToKey(e){return`${e.x}:${e.y}:${e.z}`}_removeTile(e){let t=this._tiles[e];t&&(t.el.remove(),delete this._tiles[e],this.fire(`tileunload`,{tile:t.el,coords:t.coords}))}_initTile(e){e.classList.add(`leaflet-tile`);let t=this.getTileSize();e.style.width=`${t.x}px`,e.style.height=`${t.y}px`}_addTile(e,t){let n=this._getTilePos(e),r=this._tileCoordsToKey(e),i=this.createTile(this._wrapCoords(e),this._tileReady.bind(this,e));this._initTile(i),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,e,null,i)),T(i,n,!0),this._tiles[r]={el:i,coords:e,current:!0},t.appendChild(i),this.fire(`tileloadstart`,{tile:i,coords:e})}_tileReady(e,t,n){t&&this.fire(`tileerror`,{error:t,tile:n,coords:e});let r=this._tiles[this._tileCoordsToKey(e)];if(r&&(this._map._fadeAnimated?r.loaded||(r.el.classList.add(`leaflet-tile-fading`),r.el.animate({opacity:[0,1]},200).onfinish=this._onTileFaded.bind(this,r)):(r.active=!0,this._pruneTiles()),r.loaded=!0,t||(r.el.classList.add(`leaflet-tile-loaded`),this.fire(`tileload`,{tile:r.el,coords:e})),this._map&&this._noTilesToLoad())){if(this._loading=!1,this.fire(`load`),!this._map)return;this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))}}_onTileFaded(e){e.el.classList.remove(`leaflet-tile-fading`),this._tiles[this._tileCoordsToKey(e.coords)]===e&&(e.active=!0,this._onOpaqueTile(e),this._noPrune||this._fadePruneFrame||(this._fadePruneFrame=requestAnimationFrame(()=>{this._fadePruneFrame=0,this._noPrune||this._pruneTiles()})))}_getTilePos(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(e){let t=new b(this._wrapX?o(e.x,this._wrapX):e.x,this._wrapY?o(e.y,this._wrapY):e.y);return t.z=e.z,t}_pxBoundsToTileRange(e){let t=this.getTileSize();return new V(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(e=>e.loaded)}};const nn={minZoom:0,maxZoom:18,subdomains:`abc`,errorTileUrl:``,zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:`strict-origin-when-cross-origin`},rn=[`tile.openstreetmap.org`,`tile.osm.org`],an=/^(https?:)?\/\/([^/?#:]*)/i,on=/^http:/i;function sn(e){let t=an.exec(e)?.[2]??``;return rn.some(e=>t===e||t.endsWith(`.${e}`))}const cn=e=>sn(e)?e.replace(on,`https:`):e;var ln=class extends tn{static initHooks=!0;static defaultOptions=nn;constructor(e,t){if(super(t),t=d(this,t),sn(e)&&t.attribution===null&&(t.attribution=`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors`),this._url=cn(e),this.options.detectRetina&&window.devicePixelRatio>1&&this.options.maxZoom>0){let e=this.options.tileSize;this.options.tileSize=e instanceof b?e.divideBy(2).floor():Math.floor(e/2),this.options.zoomReverse?(this.options.zoomOffset--,this.options.minZoom=Math.min(this.options.maxZoom,this.options.minZoom+1)):(this.options.zoomOffset++,this.options.maxZoom=Math.max(this.options.minZoom,this.options.maxZoom-1)),this.options.minZoom=Math.max(0,this.options.minZoom)}else this.options.zoomReverse?this.options.minZoom=Math.min(this.options.maxZoom,this.options.minZoom):this.options.maxZoom=Math.max(this.options.minZoom,this.options.maxZoom);typeof this.options.subdomains==`string`&&(this.options.subdomains=this.options.subdomains.split(``)),this.callInitHooks()}setUrl(e,t){return e=cn(e),this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this}createTile(e,t){let n=document.createElement(`img`);return j(n,`load`,this._tileOnLoad.bind(this,t,n)),j(n,`error`,this._tileOnError.bind(this,t,n)),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),typeof this.options.referrerPolicy==`string`&&(n.referrerPolicy=this.options.referrerPolicy),n.alt=``,n.src=this.getTileUrl(e),n}getTileUrl(e){let t=Object.create(this.options);if(Object.assign(t,{r:window.devicePixelRatio>1?`@2x`:``,s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){let n=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=n),t[`-y`]=n}return ee(this._url,t)}_tileOnLoad(e,t){e(null,t)}_tileOnError(e,t,n){let r=this.options.errorTileUrl,i=t.getAttribute(`src`);r&&i!==r&&(i||t.isConnected)&&(t.src=r),e(n,t)}_getZoomForUrl(){let e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(e=t-e),e+r}_getSubdomain(e){let{subdomains:t}=this.options;return t?.[Math.abs(e.x+e.y)%t.length]}_abortLoading(){let e,t;for(e of Object.keys(this._tiles))if(this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,!t.complete)){t.setAttribute(`src`,``);let n=this._tiles[e].coords;t.remove(),delete this._tiles[e],this.fire(`tileabort`,{tile:t,coords:n})}}_removeTile(e){let t=this._tiles[e];if(t)return t.el.setAttribute(`src`,``),super._removeTile(e)}_tileReady(e,t,n){if(!(!this._map||n&&n.getAttribute(`src`)===``))return super._tileReady(e,t,n)}_clampZoom(e){return Math.round(super._clampZoom(e))}};const un={service:`WMS`,request:`GetMap`,layers:``,styles:``,format:`image/jpeg`,transparent:!1,version:`1.1.1`},dn={crs:null,uppercase:!1};var fn=class e extends ln{static initHooks=!0;static defaultWmsParams=un;static defaultOptions=dn;constructor(t,n){super(t,n);let r={...e.defaultWmsParams};for(let[t,i]of Object.entries(n))t in e.defaultOptions||(r[t]=i);let i=this.options.detectRetina&&window.devicePixelRatio>1?2:1,a=this.getTileSize();r.width=a.x*i,r.height=a.y*i,this.wmsParams=r,this.callInitHooks()}onAdd(e){this._crs=this.options.crs??e.options.crs,this._updateCrsParam(),super.onAdd(e)}_updateCrsParam(){this._wmsVersion=parseFloat(this.wmsParams.version),delete this.wmsParams.srs,delete this.wmsParams.crs,this.wmsParams[this._wmsVersion>=1.3?`crs`:`srs`]=this._crs.code}getTileUrl(e){let t=this._tileCoordsToNwSe(e),n=this._crs,r=new V(n.project(t[0]),n.project(t[1])),i=r.min,a=r.max,o=(this._wmsVersion>=1.3&&this._crs===dt?[i.y,i.x,a.y,a.x]:[i.x,i.y,a.x,a.y]).join(`,`),s=new URL(super.getTileUrl(e),document.baseURI);for(let[e,t]of Object.entries({...this.wmsParams,bbox:o}))s.searchParams.append(this.options.uppercase?e.toUpperCase():e,`${t}`);return s.toString()}setParams(e,t){return Object.assign(this.wmsParams,e),this._crs&&this._updateCrsParam(),t||this.redraw(),this}};const pn={tolerance:0},mn=/[, ]+/;var hn=class extends Lt{static defaultOptions=pn;getEvents(){let e=super.getEvents();return e.viewprereset=this._onViewPreReset,e}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(e){super.onAdd(e),this._draw()}onRemove(e){super.onRemove(e),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){let e=this._container=document.createElement(`canvas`);j(e,`pointermove`,this._onPointerMove,this),j(e,`click dblclick pointerdown pointerup contextmenu`,this._onClick,this),j(e,`pointerout`,this._handlePointerOut,this),de.add(e),this._ctx=e.getContext(`2d`)}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,super._destroyContainer()}_resizeContainer(){let e=super._resizeContainer(),t=this._ctxScale=window.devicePixelRatio;return this._container.width=t*e.x,this._container.height=t*e.y,e}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(let e of Object.values(this._layers))e._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;let e=this._bounds,t=this._ctxScale;this._ctx.setTransform(t,0,0,t,-e.min.x*t,-e.min.y*t),this.fire(`update`)}_reset(){super._reset(),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(e){this._updateDashArray(e),this._layers[i(e)]=e;let t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst??=this._drawLast}_addPath(e){this._requestRedraw(e)}_removePath(e){let t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[i(e)],this._requestRedraw(e)}_updatePath(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)}_updateStyle(e){this._updateDashArray(e),this._requestRedraw(e)}_updateDashArray(e){e._dashArray=typeof e.options.dashArray==`string`?e.options.dashArray.split(mn).map(e=>Number(e)).filter(e=>!isNaN(e)):e.options.dashArray}_requestRedraw(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(e){if(e._pxBounds){let t=(e.options.weight??0)+1;this._redrawBounds??=new V,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}}_redraw(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){let e=this._redrawBounds;if(e){let t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()}_draw(){let e,t=this._redrawBounds;if(this._ctx.save(),t){let e=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(let n=this._drawFirst;n;n=n.next)e=n.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(e,t){if(!this._drawing)return;let n=e._parts,r=this._ctx;n.length&&(r.beginPath(),n.forEach(e=>{e.forEach((e,t)=>{r[t?`lineTo`:`moveTo`](e.x,e.y)}),t&&r.closePath()}),this._fillStroke(r,e))}_updateCircle(e){if(!this._drawing||e._empty())return;let{x:t,y:n}=e._point,r=this._ctx,i=Math.max(Math.round(e._pxRadius),1),a=Math.max(Math.round(e._pxRadiusY??i),1);r.beginPath(),a===i?r.arc(t,n,i,0,Math.PI*2):r.ellipse(t,n,i,a,0,0,Math.PI*2),this._fillStroke(r,e)}_fillStroke(e,t){let n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor??n.color,e.fill(n.fillRule||`evenodd`)),n.stroke&&n.weight!==0&&(e.lineDashOffset=Number(n.dashOffset??0),e.setLineDash(t._dashArray??[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())}_onClick(e){let t=this._map.pointerEventToLayerPoint(e),n,r;for(let i=this._drawFirst;i;i=i.next)n=i.layer,n.options.interactive&&n._containsPoint(t)&&(e.type!==`click`&&e.type!==`preclick`||!this._map._draggableMoved(n))&&(r=n);this._fireEvent(r?[r]:!1,e)}_onPointerMove(e){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;let t=this._map.pointerEventToLayerPoint(e);this._handlePointerHover(e,t)}_handlePointerOut(e){let t=this._hoveredLayer;t&&(this._container.classList.remove(`leaflet-interactive`),this._fireEvent([t],e,`pointerout`),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(e,t){if(this._pointerHoverThrottled)return;let n,r;for(let e=this._drawFirst;e;e=e.next)n=e.layer,n.options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handlePointerOut(e),r&&(this._container.classList.add(`leaflet-interactive`),this._fireEvent([r],e,`pointerover`),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout((()=>{this._pointerHoverThrottled=!1}),32)}_fireEvent(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)}_bringToFront(e){let t=e._order;if(!t)return;let n=t.next,r=t.prev;if(n)n.prev=r;else return;r?r.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)}_bringToBack(e){let t=e._order;if(!t)return;let n=t.next,r=t.prev;if(r)r.next=n;else return;n?n.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}};const gn={fill:!0,radius:10};var _n=class extends Vt{static initHooks=!0;static defaultOptions=gn;constructor(e,t){super(),d(this,t),this._latlng=new W(e),this._radius=this.options.radius,this.callInitHooks()}setLatLng(e){let t=this._latlng;return this._latlng=new W(e),this.redraw(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(e){return this.options.radius=this._radius=e,this.redraw()}getRadius(){return this._radius}setStyle(e){return super.setStyle(e),e?.radius!==void 0&&this.setRadius(e.radius),this}toGeoJSON(e){return wt(this,e)}_project(){this._point=this._map.latLngToLayerPoint(this._latlng)._round(),this._pxRadius=this._radius,this._updateBounds()}_updateBounds(){let e=this._pxRadius,t=this._pxRadiusY??e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new V(this._point.subtract(r),this._point.add(r))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._pxRadius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(e){return e.distanceTo(this._point)<=this._pxRadius+this._clickTolerance()}},vn=class extends _n{static initHooks=!0;constructor(e,t){if(typeof t==`number`)throw Error(`Circle: the radius is an option in Leaflet 2. Use new Circle(latlng, {radius}).`);if(super(e,t),isNaN(this.options.radius))throw Error(`Circle radius cannot be NaN`);this.callInitHooks()}getBounds(){if(!this._map)return this._latlng.toBounds(this._radius*2);let e=[this._pxRadius,this._pxRadiusY??this._pxRadius];return new U(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))}_project(){let e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===Y.distance){let r=Math.PI/180,i=this._radius/Y.R/r,a=n.project([t+i,e]),o=n.project([t-i,e]),s=a.add(o).divideBy(2),c=n.unproject(s).lat,l=2*Math.asin(Math.sqrt((Math.sin(i*r/2)**2-Math.sin((c-t)*r/2)**2)/(Math.cos(t*r)*Math.cos(c*r))))/r;(isNaN(l)||l===0)&&(l=i/Math.cos(Math.PI/180*t)),this._point=s.subtract(n.getPixelOrigin()),this._pxRadius=isNaN(l)?0:s.x-n.project([c,e-l]).x,this._pxRadiusY=s.y-a.y}else{let e=r.unproject(r.project(this._latlng).subtract([this._radius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._pxRadius=Math.abs(this._point.x-n.latLngToLayerPoint(e).x)}this._updateBounds()}},yn=class extends Gt{static initHooks=!0;constructor(e,t){super(bn(e),t),this.callInitHooks()}setBounds(e){return this.setLatLngs(bn(e))}};function bn(e){return e=new U(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}var xn=class extends R{run(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n??.25,this._easeOutPower=1/Math.max(r??.5,.2),this._startPos=E(e),this._offset=t.subtract(this._startPos),this._startTime=Date.now(),this.fire(`start`),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(e){let t=Date.now()-this._startTime,n=this._duration*1e3;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())}_runFrame(e,t){let n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),T(this._el,n),this.fire(`step`)}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire(`end`)}_easeOut(e){return 1-(1-e)**this._easeOutPower}},Sn=class extends z{addHooks(){j(this._map._container,`pointerdown`,this._onPointerDown,this)}removeHooks(){N(this._map._container,`pointerdown`,this._onPointerDown,this)}moved(){return this._moved}_resetState(){clearTimeout(this._resetStateTimeout),this._moved=!1}_toggleListeners(e){e(this._map._container,{contextmenu:L,pointermove:this._onPointerMove,pointerup:this._onPointerUp},this),e(document,`keydown`,this._onKeyDown,this)}_onPointerDown(e){if(!e.shiftKey||e.button!==0)return!1;this._resetState(),I(e),this._startPoint=this._map.pointerEventToContainerPoint(e),this._toggleListeners(j)}_onPointerMove(e){let t=this._map;this._moved||(this._moved=!0,this._box=x(`div`,`leaflet-zoom-box`,t._container),t._container.classList.add(`leaflet-crosshair`),t.fire(`boxzoomstart`)),this._point=t.pointerEventToContainerPoint(e);let n=new V(this._point,this._startPoint),r=n.getSize();T(this._box,n.min),this._box.style.width=`${r.x}px`,this._box.style.height=`${r.y}px`}_finish(){this._moved&&(this._box.remove(),this._map._container.classList.remove(`leaflet-crosshair`)),this._toggleListeners(N)}_onPointerUp(e){if(e.button!==0||(this._finish(),!this._moved))return;this._resetStateTimeout=setTimeout(()=>this._resetState(),0);let t=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.getBoundsZoom(t)!==1/0&&this._map.fitBounds(t),this._map.fire(`boxzoomend`,{boxZoomBounds:t})}_onKeyDown(e){e.code===`Escape`&&(this._finish(),this._resetState())}},Cn=class extends z{addHooks(){this._map.on(`dblclick`,this._onDoubleClick,this)}removeHooks(){this._map.off(`dblclick`,this._onDoubleClick,this)}_onDoubleClick(e){let t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;t.options.doubleClickZoom===`center`?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}},wn=class extends z{addHooks(){if(!this._draggable){let e=this._map;this._draggable=new B(e._mapPane,e._container),this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on(`predrag`,this._onPreDragLimit,this),e.options.worldCopyJump&&this._draggable.on(`predrag`,this._onPreDragWrap,this)}this._map._container.classList.add(`leaflet-grab`,`leaflet-touch-drag`),this._draggable.enable(),this._positions=[],this._times=[]}removeHooks(){this._map._container.classList.remove(`leaflet-grab`,`leaflet-touch-drag`),this._draggable.disable()}moved(){return this._draggable?._moved}moving(){return this._draggable?._moving}_onDown(){this._map._stop()}_onDragStart(){let e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){let e=new U(this._map.options.maxBounds);this._offsetLimit=new V(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire(`movestart`).fire(`dragstart`),e.options.inertia&&(this._positions=[],this._times=[])}_onDrag(e){if(this._map.options.inertia){let e=Date.now(),t=this._draggable._absPos||this._draggable._newPos;this._lastTime=e,this._lastPos=t,this._positions.push(t),this._times.push(e),this._prunePositions(e)}this._map.fire(`move`,e).fire(`drag`,e)}_prunePositions(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()}_viscousLimit(e,t){return e-(e-t)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;let e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}_onPreDragWrap(){let e=this._draggable;e._absPos=e._newPos,e._newPos=this._map._wrapWorldCopy(e._newPos)}_onDragEnd(e){let t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire(`dragend`,e),r)t.fire(`moveend`);else{this._prunePositions(Date.now());let e=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,i=n.easeLinearity,a=e.multiplyBy(i/r),o=a.distanceTo([0,0]),s=Math.min(n.inertiaMaxSpeed,o),c=a.multiplyBy(s/o),l=t.getSize().divideBy(2),u=s/(n.inertiaDeceleration*i),d=c.multiplyBy(-u/2).round();if(t._prefersReducedMotion()&&!l.contains(d)){let e=Math.min(l.x/Math.abs(d.x),l.y/Math.abs(d.y));d=d.multiplyBy(e).round(),u*=Math.sqrt(e)}!d.x&&!d.y?t.fire(`moveend`):(d=t._limitOffset(d,t.options.maxBounds),requestAnimationFrame(()=>{t.panBy(d,{duration:u,easeLinearity:i,noMoveStart:!0,animate:!0})}))}}},Tn=class e extends z{static keys={left:[`ArrowLeft`],right:[`ArrowRight`],down:[`ArrowDown`],up:[`ArrowUp`],zoomIn:[`+`,`=`],zoomOut:[`-`,`_`]};addHooks(){let e=this._map._container;e.tabIndex<=0&&(e.tabIndex=0);let t=this._map.options.ariaKeyShortcuts;t&&(e.ariaKeyShortcuts=t===!0?`ArrowLeft ArrowRight ArrowUp ArrowDown = Plus -`:t),j(e,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown,keydown:this._onContainerKeyDown},this)}removeHooks(){N(document,`keydown`,this._onKeyDown,this),this._map.options.ariaKeyShortcuts&&this._map._container.removeAttribute(`aria-keyshortcuts`),N(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown,keydown:this._onContainerKeyDown},this)}_onPointerDown(){this._focused||this._map._container.focus({preventScroll:!0,focusVisible:!1})}_onFocus(){this._focused=!0,j(document,`keydown`,this._onKeyDown,this),this._map.fire(`focus`)}_onBlur(){this._focused=!1,N(document,`keydown`,this._onKeyDown,this),this._map.fire(`blur`)}_onContainerKeyDown(e){let t=this._map,n=t._popup,r=e.target;if(e.key!==`Escape`||e.defaultPrevented||!n?.options.closeOnEscapeKey||t._controlContainer.contains(r))return;let i=n._container.contains(r),a=n._source?._icon;t.closePopup(),e.preventDefault(),i&&(a&&a.tabIndex>=0?a:t._container).focus()}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=t.key,r=this._map,{left:i,right:a,down:o,up:s,zoomIn:c,zoomOut:l}=e.keys,u=+a.includes(n)-i.includes(n),d=+o.includes(n)-s.includes(n),f=+c.includes(n)-l.includes(n),p=t.shiftKey?3:1;if(u||d){if(!r._panAnim?._inProgress){let e=new b(u,d).multiplyBy(p*r.options.keyboardPanDelta);r.options.maxBounds&&(e=r._limitOffset(e,r.options.maxBounds)),r.panBy(e)}}else if(f)r._zoomInputBlocked()||r.setZoom(r.getZoom()+p*f*r.options.zoomDelta);else return;L(t)}},En=class extends z{addHooks(){j(this._map._container,`wheel`,this._onWheelScroll,this),this._delta=0}removeHooks(){N(this._map._container,`wheel`,this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(e){let t=Ce(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastEvent=e,this._startTime||=Date.now();let r=Math.max(n-(Date.now()-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),r),L(e)}_performZoom(){let e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap??0;e._stop();let r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,a=n?Math.ceil(i/n)*n:i,o=e._prefersReducedMotion()?Math.min(a,1):a,s=e._limitZoom(t+(this._delta>0?o:-o))-t;this._delta=0,this._startTime=null,s&&!e._zoomInputBlocked()&&(e.options.scrollWheelZoom===`center`?e.setZoom(t+s):e.setZoomAround(e.pointerEventToContainerPoint(this._lastEvent),t+s))}},Dn=class extends z{addHooks(){j(this._map._container,`pointerdown`,this._onDown,this)}removeHooks(){N(this._map._container,`pointerdown`,this._onDown,this),this._cancel(),this._cancelClickPrevent(),this._stopPreventingNative()}_onDown(e){if(clearTimeout(this._holdTimeout),A().length!==1||e.pointerType===`mouse`)return;let t=this._map._container;this._startPos=this._newPos=new b(e.clientX,e.clientY),this._holdTimeout=setTimeout((()=>{this._cancel(),this._isTapValid()&&(j(t,`pointerup`,I),j(t,`pointerup pointercancel`,this._cancelClickPrevent,this),this._simulateEvent(`contextmenu`,e),t.addEventListener(`contextmenu`,L,!0),t.addEventListener(`pointerdown`,this._stopPreventingNative,!0))}),600),j(t,`pointerup pointercancel contextmenu`,this._cancel,this),j(t,`pointermove`,this._onMove,this)}_cancelClickPrevent(){let e=this._map._container;N(e,`pointerup`,I),N(e,`pointerup pointercancel`,this._cancelClickPrevent,this)}_stopPreventingNative=()=>{let e=this._map._container;e.removeEventListener(`contextmenu`,L,!0),e.removeEventListener(`pointerdown`,this._stopPreventingNative,!0)};_cancel(){clearTimeout(this._holdTimeout);let e=this._map._container;N(e,`pointerup pointercancel contextmenu`,this._cancel,this),N(e,`pointermove`,this._onMove,this)}_onMove(e){this._newPos=new b(e.clientX,e.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(e,t){let n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});t.target.dispatchEvent(n)}},On=class extends z{addHooks(){this._map._container.classList.add(`leaflet-touch-zoom`),j(this._map._container,`pointerdown`,this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove(`leaflet-touch-zoom`),N(this._map._container,`pointerdown`,this._onPointerStart,this),N(this._map._container,`pointermove`,this._onPointerMove,this),N(this._map._container,`pointerup pointercancel`,this._onPointerEnd,this)}_onPointerStart(e){let t=this._map,n=A();if(n.length!==2||t._animatingZoom||this._zooming)return;let r=t.pointerEventToContainerPoint(n[0]),i=t.pointerEventToContainerPoint(n[1]),{x:a,y:o}=D(t._container);this._containerScale=new b(a,o),this._containerOrigin=new b(n[0].clientX,n[0].clientY)._subtract(r.scaleBy(this._containerScale)),this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.pinchZoom!==`center`&&(this._pinchStartLatLng=t.containerPointToLatLng(r.add(i)._divideBy(2))),this._startDist=r.distanceTo(i),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),j(this._map._container,`pointermove`,this._onPointerMove,this),j(this._map._container,`pointerup pointercancel`,this._onPointerEnd,this),e.preventDefault()}_onPointerMove(e){let t=A();if(t.length!==2||!this._zooming)return;let n=this._map,r=this._toContainerPoint(t[0]),i=this._toContainerPoint(t[1]),a=r.distanceTo(i)/this._startDist;if(this._zoom=n.getScaleZoom(a,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&a<1||this._zoom>n.getMaxZoom()&&a>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.pinchZoom===`center`){if(this._center=this._startLatLng,a===1)return}else{let e=r._add(i)._divideBy(2)._subtract(this._centerPoint);if(a===1&&e.x===0&&e.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(e),this._zoom)}this._moved||=(n._moveStart(!0,!1),!0),cancelAnimationFrame(this._animRequest);let o=n._move.bind(n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(o.bind(this)),e.preventDefault()}_toContainerPoint(e){return new b(e.clientX,e.clientY)._subtract(this._containerOrigin).unscaleBy(this._containerScale)}_onPointerEnd(){N(this._map._container,`pointermove`,this._onPointerMove,this),N(this._map._container,`pointerup pointercancel`,this._onPointerEnd,this),!this._moved||!this._zooming?this._zooming=!1:(this._zooming=!1,cancelAnimationFrame(this._animRequest),this._map._zoomAnimated?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,!!this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))}};const kn={crs:lt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:null,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0,closePopupOnClick:!0,boxZoom:!0,doubleClickZoom:!0,dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1400,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0,keyboard:!0,keyboardPanDelta:80,ariaKeyShortcuts:!1,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60,tapHold:!0,tapTolerance:15,pinchZoom:!0,bounceAtZoomLimits:!0,zoomControl:!0,attributionControl:!0};var An=class e extends R{static initHooks=!0;static defaultOptions=kn;constructor(e,t){super(),t=d(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._popup=void 0,this._renderer=void 0,this._initContainer(e),this._initLayout(),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(new W(t.center),t.zoom,{reset:!0}),t.attributionControl&&(this.attributionControl=new Oe,this.addControl(this.attributionControl)),t.zoomControl&&(this.zoomControl=new Pe,this.addControl(this.zoomControl)),t.touchZoom!==void 0&&(console.warn(`Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead.`),t.pinchZoom=t.touchZoom,delete t.touchZoom),t.preferCanvas!==void 0&&console.error(`Map: preferCanvas option has been removed. Use renderer: new Canvas() instead.`),this.boxZoom=this._addHandler(`boxZoom`,Sn),this.doubleClickZoom=this._addHandler(`doubleClickZoom`,Cn),this.dragging=this._addHandler(`dragging`,wn),this.keyboard=this._addHandler(`keyboard`,Tn),this.scrollWheelZoom=this._addHandler(`scrollWheelZoom`,En),this.tapHold=this._addHandler(`tapHold`,Dn),this.pinchZoom=this._addHandler(`pinchZoom`,On),this.touchZoom=this.pinchZoom,this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(e,t,n){t=t===void 0?this._zoom:this._limitZoom(t);let r=this._limitCenter(new W(e),t,this.options.maxBounds);return n??={},this._stop(),this._loaded&&!n.reset&&(n.animate!==void 0&&(n.zoom={animate:n.animate,...n.zoom},n.pan={animate:n.animate,duration:n.duration,...n.pan}),this._zoom===t?this._tryAnimatedPan(r,n.pan):this._tryAnimatedZoom&&this._tryAnimatedZoom(r,t,n.zoom))?(clearTimeout(this._sizeTimer),this):(this._resetView(r,t,n.pan?.noMoveStart),this)}setZoom(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)}zoomIn(e,t){return e??=this.options.zoomDelta,this.setZoom(this._zoom+e,t)}zoomOut(e,t){return e??=this.options.zoomDelta,this.setZoom(this._zoom-e,t)}setZoomAround(e,t,n){let r=this.project(this.getCenter()),i=e instanceof b?e.subtract(this.getSize().divideBy(2)):this.project(e).subtract(r),a=this.unproject(r.add(i.multiplyBy(1-1/this.getZoomScale(t))));return this.setView(a,t,{zoom:n})}_getBoundsCenterZoom(e,t){t??={},e=`getBounds`in e?e.getBounds():new U(e);let n=new b(t.paddingTopLeft||t.padding||[0,0]),r=new b(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if(i=typeof t.maxZoom==`number`?Math.min(t.maxZoom,i):i,i===1/0)return{center:e.getCenter(),zoom:i};let a=r.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),i),s=this.project(e.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(a),i),zoom:i}}fitBounds(e,t){if(e=new U(e),!e.isValid())throw Error(`Bounds are not valid.`);let n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)}fitWorld(e){return this.fitBounds([[-90,-180],[90,180]],e)}panTo(e,t){return this.setView(e,this._zoom,{pan:t})}panBy(e,t){if(e=new b(e).round(),t??={},!e.x&&!e.y)return this.fire(`moveend`);let n=this.getSize();if(t.animate!==!0&&!n.contains(e)){let t=this.unproject(this.project(this.getCenter()).add(e));return this._resetView(this.options.worldCopyJump?this.wrapLatLng(t):t,this.getZoom()),this}this._panAnim||(this._panAnim=new xn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire(`movestart`);let r=this._prefersReducedMotion()&&!n.divideBy(2).contains(e);if(t.animate===!0||t.animate!==!1&&!r){this._mapPane.classList.add(`leaflet-pan-anim`);let n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this._wrapWorldCopy(),this.fire(`move`).fire(`moveend`);return this}flyTo(e,t,n){if(n??={},n.animate===!1)return this.setView(e,t,{...n,zoom:{...n.zoom,animate:!1}});if(n.animate!==!0&&this._prefersReducedMotion())return this.setView(e,t,n);this._stop(),t=t===void 0?this._zoom:this._limitZoom(t);let r=this._limitCenter(new W(e),t,this.options.maxBounds),i=this.project(this.getCenter()),a=this.project(r),o=this.getSize(),s=this._zoom,c=Math.max(o.x,o.y),l=c*this.getZoomScale(s,t),u=a.distanceTo(i)||1,d=1.42,f=d*d;function p(e){let t=e?-1:1,n=e?l:c,r=l*l-c*c+t*f*f*u*u,i=2*n*f*u;return-Math.asinh(r/i)}let m=p(0);function ee(e){return c*(Math.cosh(m)*Math.tanh(m+d*e)-Math.sinh(m))/f}function h(e){return 1-(1-e)**1.5}let g=Date.now(),_=(p(1)-m)/d,te=n.duration?1e3*n.duration:1e3*_*.8,v=()=>{let e=(Date.now()-g)/te,n=h(e)*_;if(e<=1)this._flyToFrame=requestAnimationFrame(v),this._move(this.unproject(i.add(a.subtract(i).multiplyBy(ee(n)/u)),s),this.getScaleZoom(Math.cosh(m+d*n)/Math.cosh(m),s),{flyTo:!0});else{let e=this._zoom!==t;this._move(r,t),e||this.fire(`zoom`),this._moveEnd(!0)}};return this._moveStart(!0,n.noMoveStart),v(),this}flyToBounds(e,t){let n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)}setMaxBounds(e){return e=new U(e),this.listens(`moveend`,this._panInsideMaxBounds)&&this.off(`moveend`,this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on(`moveend`,this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(e){let t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()<this.options.minZoom)?this.setZoom(e):this}setMaxZoom(e){let t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this}panInsideBounds(e,t){this._enforcingBounds=!0;let n=this.getCenter(),r=this._limitCenter(n,this._zoom,new U(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this}panInside(e,t){t??={};let n=new b(t.paddingTopLeft||t.padding||[0,0]),r=new b(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),a=this.project(e),o=this.getPixelBounds(),s=new V([o.min.add(n),o.max.subtract(r)]),c=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;let e=a.subtract(s.getCenter()),n=s.extend(a).getSize().subtract(c);i.x+=e.x<0?-n.x:n.x,i.y+=e.y<0?-n.y:n.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this}invalidateSize(e){if(!this._loaded)return this;e={animate:!1,pan:!0,...e===!0?{animate:!0}:e};let t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;let n=this.getSize(),r=t.divideBy(2).round(),i=n.divideBy(2).round(),a=r.subtract(i);return!a.x&&!a.y?this:(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire(`move`),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,`moveend`),200)):this.fire(`moveend`)),this.fire(`resize`,{oldSize:t,newSize:n}))}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire(`viewreset`),this._stop()}locate(e){if(this._locateOptions=e={timeout:1e4,watch:!1,...e},!(`geolocation`in navigator))return this._handleGeolocationError({code:0,message:`Geolocation not supported.`}),this;let t=this._handleGeolocationResponse.bind(this),n=this._handleGeolocationError.bind(this);return e.watch?(this._locationWatchId!==void 0&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(t,n,e)):navigator.geolocation.getCurrentPosition(t,n,e),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(e){if(!this._container._leaflet_id)return;let t=e.code,n=e.message||(t===1?`permission denied`:t===2?`position unavailable`:`timeout`);this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(`locationerror`,{code:t,message:`Geolocation error: ${n}.`})}_handleGeolocationResponse(e){if(!this._container._leaflet_id)return;let t=e.coords.latitude,n=e.coords.longitude,r=new W(t,n),i=r.toBounds(e.coords.accuracy*2),a=this._locateOptions;if(a.setView){let e=this.getBoundsZoom(i);this.setView(r,a.maxZoom?Math.min(e,a.maxZoom):e)}let o={latlng:r,bounds:i,timestamp:e.timestamp};for(let t in e.coords){let n=e.coords[t];typeof n==`number`&&(o[t]=n)}this.fire(`locationfound`,o)}addLayer(e){if(!e._layerAdd)throw Error(`The provided object is not a Layer.`);let t=i(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this}removeLayer(e){let t=i(e);return this._layers[t]&&(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire(`layerremove`,{layer:e}),e.fire(`remove`)),e._map=e._mapToAdd=null),this}hasLayer(e){return i(e)in this._layers}eachLayer(e,t){for(let n of Object.values(this._layers))e.call(t,n);return this}openPopup(e,t,n){return this._initOverlay(vt,e,t,n).openOn(this),this}closePopup(e){return e=arguments.length?e:this._popup,e?.close(),this}openTooltip(e,t,n){return this._initOverlay(bt,e,t,n).openOn(this),this}closeTooltip(e){return e.close(),this}_initOverlay(e,t,n,r){let i=t instanceof e?t:new e(r).setContent(t);return n&&i.setLatLng(n),i}addControl(e){return e.addTo(this),this}removeControl(e){return e.remove(),this}getRenderer(e){let t=e.options.renderer??this._getPaneRenderer(e)??this.options.renderer??(this._renderer??=e._createRenderer?.());return t&&!this.hasLayer(t)&&this.addLayer(t),t}_getPaneRenderer(e){let t=e.options.pane;if(t===`overlayPane`||t===void 0)return;let n=this._paneRenderers[t];if(!n){let r=this.options.renderer?.constructor;n=r?new r({...this.options.renderer?.options,pane:t}):e._createRenderer({pane:t}),this._paneRenderers[t]=n}return n}addHandler(e,t){return t&&(this[e]=this._addHandler(e,t)),this}_addHandler(e,t){let n=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),n}remove(){if(this._initEvents(!0),this.options.maxBounds&&this.off(`moveend`,this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error(`Map container is being reused by another instance`);delete this._container._leaflet_id,delete this._containerId,this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),pe(this._container),this._mapPane.remove(),this._controlContainer.remove(),this._controlContainer.replaceChildren(),this._controlCorners={},cancelAnimationFrame(this._resizeRequest);for(let e of this._handlers)e.disable();clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire(`unload`);for(let e of Object.values(this._layers))e.remove();for(let e of Object.values(this._panes))e.remove();return this._layers={},this._panes={},delete this._renderer,this}createPane(e,t){let n=x(`div`,`leaflet-pane${e?` leaflet-${e.replace(`Pane`,``)}-pane`:``}`,t||this._mapPane);return e&&(this._panes[e]=n),n}getCenter(){return this._checkIfLoaded(),this._lastCenter&&this._getMapPanePos().equals(this._lastCenterPanePos)?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){let e=this.getPixelBounds();return new U(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(e,t,n){e=new U(e),n=new b(n??[0,0]);let r=this.getZoom()??0,i=this.getMinZoom(),a=this.getMaxZoom(),o=e.getNorthWest(),s=e.getSouthEast(),c=this.getSize().subtract(n),l=new V(this.project(s,r),this.project(o,r)).getSize(),u=this.options.zoomSnap,d=c.x/l.x,f=c.y/l.y,p=t?Math.max(d,f):Math.min(d,f);return r=this.getScaleZoom(p,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(a,r))}getSize(){return(!this._size||this._sizeChanged)&&(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(e,t){let n=this._getTopLeftPoint(e,t);return new V(n,n.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(e){return this.options.crs.getProjectedBounds(e??this.getZoom())}getPane(e){return typeof e==`string`?this._panes[e]:e}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(e,t){let n=this.options.crs;return t??=this._zoom,n.scale(e)/n.scale(t)}getScaleZoom(e,t){let n=this.options.crs;t??=this._zoom;let r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r}project(e,t){return t??=this._zoom,this.options.crs.latLngToPoint(new W(e),t)}unproject(e,t){return t??=this._zoom,this.options.crs.pointToLatLng(new b(e),t)}layerPointToLatLng(e){let t=new b(e).add(this.getPixelOrigin());return this.unproject(t)}latLngToLayerPoint(e){return this.project(new W(e))._subtract(this.getPixelOrigin())}wrapLatLng(e){return this.options.crs.wrapLatLng(new W(e))}wrapLatLngBounds(e){return this.options.crs.wrapLatLngBounds(new U(e))}distance(e,t){return this.options.crs.distance(new W(e),new W(t))}containerPointToLayerPoint(e){return new b(e).subtract(this._getMapPanePos())}layerPointToContainerPoint(e){return new b(e).add(this._getMapPanePos())}containerPointToLatLng(e){let t=this.containerPointToLayerPoint(new b(e));return this.layerPointToLatLng(t)}latLngToContainerPoint(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new W(e)))}pointerEventToContainerPoint(e){return Se(e,this._container)}pointerEventToLayerPoint(e){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(e))}pointerEventToLatLng(e){return this.layerPointToLatLng(this.pointerEventToLayerPoint(e))}_initContainer(e){let t=ie(e);if(!t)throw Error(`Map container not found.`);if(t._leaflet_id)throw Error(`Map container is already initialized.`);this._container=t,fe(t),j(t,`scroll`,this._onScroll,this),this._containerId=i(t),t.hasAttribute(`role`)||t.setAttribute(`role`,`region`),t.hasAttribute(`aria-label`)||t.setAttribute(`aria-label`,`Map`)}_initLayout(){let e=this._container;this._fadeAnimated=this.options.fadeAnimation;let t=[`leaflet-container`,`leaflet-touch`];window.devicePixelRatio>1&&t.push(`leaflet-retina`),this._fadeAnimated&&t.push(`leaflet-fade-anim`),e.classList.add(...t);let{position:n}=getComputedStyle(e);n!==`absolute`&&n!==`relative`&&n!==`fixed`&&n!==`sticky`&&(e.style.position=`relative`),this._initPanes(),this._initControlPos()}_initControlPos(){let e={},t=`leaflet-`,n=x(`div`,`${t}control-container`,this._container);for(let r of[`top`,`bottom`])for(let i of[`left`,`right`])e[r+i]=x(`div`,`${t+r} ${t}${i}`,n);this._controlCorners=e,this._controlContainer=n}_initPanes(){let e={};this._panes=e,this._paneRenderers={},this._mapPane=this.createPane(`mapPane`,this._container),T(this._mapPane,new b(0,0)),this.createPane(`tilePane`),this.createPane(`overlayPane`),this.createPane(`shadowPane`),this.createPane(`markerPane`),this.createPane(`tooltipPane`),this.createPane(`popupPane`),this.options.markerZoomAnimation||(e.markerPane.classList.add(`leaflet-zoom-hide`),e.shadowPane.classList.add(`leaflet-zoom-hide`))}_resetView(e,t,n){let r=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire(`viewprereset`,{center:e,zoom:t}),T(this._mapPane,new b(0,0));let i=this._zoom!==t;i&&!r&&(this._instantZoomEnd=Date.now()+250),this._moveStart(i,n)._move(e,t)._moveEnd(i),this.fire(`viewreset`),r&&this.fire(`load`)}_moveStart(e,t){return e&&this.fire(`zoomstart`),t||this.fire(`movestart`),this}_move(e,t,n,r){t===void 0&&(t=this._zoom);let i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._lastCenterPanePos=this._getMapPanePos(),this._pixelOrigin=this._getNewPixelOrigin(e),r?n?.pinch&&this.fire(`zoom`,n):((i||n?.pinch)&&this.fire(`zoom`,n),this.fire(`move`,n)),this}_moveEnd(e){return e&&this.fire(`zoomend`),this.fire(`moveend`)}_stop(){return cancelAnimationFrame(this._flyToFrame),cancelAnimationFrame(this._zoomAnimFrame),this._panAnim?.stop(),this}_rawPanBy(e){T(this._mapPane,this._getMapPanePos().subtract(e))}_wrapWorldCopy(e=this._getMapPanePos()){if(!this._loaded||!this.options.worldCopyJump||this.options.crs.infinite)return e;let t=this.getPixelWorldBounds().getSize().x,n=e.x-t*Math.round((e.x+this.latLngToLayerPoint([0,0]).x-this.getSize().x/2)/t),r=Math.round((n-this._getMapPanePos().x)/t);return e=new b(n,e.y),r&&(T(this._mapPane,e),this.fire(`worldcopyjump`,{worlds:r})),e}_addLayers(e){e=e?Array.isArray(e)?e:[e]:[];for(let t of e)this.addLayer(t)}_addZoomLimit(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[i(e)]=e,this._updateZoomLevels())}_removeZoomLimit(e){let t=i(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())}_updateZoomLevels(){let e=1/0,t=-1/0,n=this._getZoomSpan();for(let n of Object.values(this._zoomBoundLayers)){let r=n.options;e=Math.min(e,r.minZoom??1/0),t=Math.max(t,r.maxZoom??-1/0)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire(`zoomlevelschange`),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw Error(`Set map center and zoom first.`)}_initEvents(e){this._targets={},this._targets[i(this._container)]=this,(e?N:j)(this._container,`click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keydown keyup`,this._handleDOMEvent,this),this.options.trackResize&&(e?this._resizeObserver.disconnect():(this._resizeObserver||=new ResizeObserver(this._onResize.bind(this)),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(e?this.off(`moveend`,this._onMoveEnd):this.on(`moveend`,this._onMoveEnd))}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){let e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(e,t){let n=[],r,a=e.target,o=!1,s=t===`pointerout`||t===`pointerover`,c=e.relatedTarget;for(;a;){if(r=this._targets[i(a)],r&&(t===`click`||t===`preclick`)&&this._draggableMoved(r)){o=!0;break}if(r&&r.listens(t,!0)&&(s&&a.contains(c)||(n.push(r),s))||a===this._container)break;a=a.parentNode}return!n.length&&!o&&!s&&this.listens(t,!0)&&(n=[this]),n}_isClickDisabled(e){for(;e&&e!==this._container;){if(ue.has(e)||!e.parentNode)return!0;e=e.parentNode}}_handleDOMEvent(e){let t=e.target;!this._loaded||de.has(t)||e.type===`click`&&this._isClickDisabled(t)||this._fireDOMEvent(e,e.type)}static _pointerEvents=[`click`,`dblclick`,`pointerover`,`pointerout`,`contextmenu`];_fireDOMEvent(t,n,r){n===`click`&&this._fireDOMEvent(t,`preclick`,r);let i=this._findEventTargets(t,n);if(r&&(i=[...r.filter(e=>e.listens(n,!0)),...i]),!i.length)return;n===`contextmenu`&&t.preventDefault();let a=i[0],o={originalEvent:t};if(t.type!==`keydown`&&t.type!==`keyup`){let e=(!a._pxRadius||a._pxRadius<=10)&&a.getLatLng?.();o.containerPoint=e?this.latLngToContainerPoint(e):this.pointerEventToContainerPoint(t),o.layerPoint=this.containerPointToLayerPoint(o.containerPoint),o.latlng=e||this.layerPointToLatLng(o.layerPoint)}for(let r of i){r.fire(n,o,!0);let i=r.options.bubblingMouseEvents??r.options.bubblingPointerEvents;if(le.has(t)||i===!1&&e._pointerEvents.includes(n))return}}_draggableMoved(e){return e=e.dragging?.enabled()?e:this,e.dragging?.moved()||this.boxZoom?.moved()}whenReady(e,t){return this._loaded?e.call(t||this,{target:this}):this.on(`load`,e,t),this}_getMapPanePos(){return E(this._mapPane)}_getTopLeftPoint(e,t){return(e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(e,t){let n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(e,t,n){let r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(e){return this.latLngToLayerPoint(e)._round()._subtract(this._getCenterLayerPoint())}_limitCenter(e,t,n){if(!n)return e;let r=this.project(e,t),i=this.getSize().divideBy(2),a=new V(r.subtract(i),r.add(i)),o=this._getBoundsOffset(a,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(r.add(o),t)}_prefersReducedMotion(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}_limitOffset(e,t){if(!t)return e;let n=this.getPixelBounds(),r=new V(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))}_getBoundsOffset(e,t,n){let r=t,i=new V(this.project(r.getNorthEast(),n),this.project(r.getSouthWest(),n)),a=i.min.subtract(e.min),o=i.max.subtract(e.max);return new b(this._rebound(a.x,-o.x),this._rebound(a.y,-o.y))}_rebound(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))}_limitZoom(e){let t=this.getMinZoom(),n=this.getMaxZoom(),r=this.options.zoomSnap;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))}_onPanTransitionStep(){this.fire(`move`)}_onPanTransitionEnd(){this._mapPane.classList.remove(`leaflet-pan-anim`),this._wrapWorldCopy(),this.fire(`moveend`)}_tryAnimatedPan(e,t){let n=this._getCenterOffset(e)._trunc();return t?.animate!==!0&&!this.getSize().contains(n)?!1:(this.panBy(n,t),!0)}_createAnimProxy(){this._proxy=x(`div`,`leaflet-proxy leaflet-zoom-animated`),this._panes.mapPane.appendChild(this._proxy),this.on(`zoomanim`,this._animateProxyZoom,this),this.on(`load moveend`,this._animMoveEnd,this),j(this._proxy,`transitionend`,this._catchTransitionEnd,this)}_animateProxyZoom(e){let t=this._proxy.style.transform;w(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),t===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){let e=this.getCenter(),t=this.getZoom();w(this._proxy,this.project(e,t),this.getZoomScale(t,1))}_catchTransitionEnd(e){this._animatingZoom&&e.propertyName.includes(`transform`)&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName(`leaflet-zoom-animated`).length}_zoomInputBlocked(){return this._animatingZoom||Date.now()<this._instantZoomEnd}_tryAnimatedZoom(e,t,n){if(this._animatingZoom)return!0;n??={};let r=this.options.zoomAnimationThreshold,i=this._prefersReducedMotion()&&n.animate!==!0?Math.min(r,1):r;if(!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>i)return!1;let a=this.getZoomScale(t),o=this._getCenterOffset(e)._divideBy(1-1/a);return n.animate!==!0&&!this.getSize().contains(o)?!1:(this._zoomAnimFrame=requestAnimationFrame(()=>{this._zoomAnimFrame=0,this._moveStart(!0,n.noMoveStart??!1)._animateZoom(e,t,!0)}),!0)}_animateZoom(e,t,n,r){this._mapPane.parentNode&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,this._mapPane.classList.add(`leaflet-zoom-anim`)),this.fire(`zoomanim`,{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||=this._zoom!==this._animateToZoom,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane.classList.remove(`leaflet-zoom-anim`),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire(`zoom`),delete this._tempFireZoomEvent,this.fire(`move`),this._moveEnd(!0))}};const jn=`2.0.0-beta.1`;export{Oe as AttributionControl,It as BlanketOverlay,V as Bounds,Sn as BoxZoomHandler,st as CRS,hn as Canvas,vn as Circle,_n as CircleMarker,v as Class,y as Control,At as DefaultIcon,$t as DivIcon,gt as DivOverlay,ge as DomEvent,re as DomUtil,Cn as DoubleClickZoomHandler,wn as DragHandler,B as Draggable,ct as EPSG3395,lt as EPSG3857,dt as EPSG4326,ut as EPSG900913,Y as EarthCRS,R as Evented,$ as FeatureGroup,Kt as GeoJSON,tn as GridLayer,z as Handler,Dt as Icon,Jt as ImageOverlay,Tn as KeyboardHandler,W as LatLng,U as LatLngBounds,X as Layer,Tt as LayerGroup,Ae as LayersControl,An as LeafletMap,An as Map,Be as LineUtil,rt as LonLatProjection,Pt as Marker,it as MercatorProjection,Vt as Path,On as PinchZoomHandler,b as Point,Qe as PolyUtil,Gt as Polygon,Ut as Polyline,vt as Popup,yn as Rectangle,Lt as Renderer,Rt as SVG,Zt as SVGOverlay,Me as ScaleControl,En as ScrollWheelZoomHandler,ft as SimpleCRS,ot as SphericalMercatorProjection,Dn as TapHoldHandler,ln as TileLayer,bt as Tooltip,H as Transformation,n as Util,Xt as VideoOverlay,fn as WMSTileLayer,Pe as ZoomControl,jn as version};
//# sourceMappingURL=leaflet.js.map