1/* @preserve 2 * Leaflet 2.0.0-alpha.1, a JS library for interactive maps. https://leafletjs.com 3 * (c) 2010-2025 Volodymyr Agafonkin, (c) 2010-2011 CloudMade 4 */ 5let lastId=0;function stamp(t){return"_leaflet_id"in t||(t._leaflet_id=++lastId),t._leaflet_id}function throttle(t,e,i){let o,s;function n(){o=!1,s&&(a.apply(i,s),s=!1)}function a(...a){o?s=a:(t.apply(i,a),setTimeout(n,e),o=!0)}return a}function wrapNum(t,e,i){const o=e[1],s=e[0],n=o-s;return t===o&&i?t:((t-s)%n+n)%n+s}function falseFn(){return!1}function formatNum(t,e){if(!1===e)return t;const i=10**(void 0===e?6:e);return Math.round(t*i)/i}function splitWords(t){return t.trim().split(/\s+/)}function setOptions(t,e){Object.hasOwn(t,"options")||(t.options=t.options?Object.create(t.options):{});for(const i in e)Object.hasOwn(e,i)&&(t.options[i]=e[i]);return t.options}const templateRe=/\{ *([\w_ -]+) *\}/g;function template(t,e){return t.replace(templateRe,(t,i)=>{let o=e[i];if(void 0===o)throw new Error(`No value provided for variable ${t}`);return"function"==typeof o&&(o=o(e)),o})}const emptyImageUrl="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";var Util={__proto__:null,emptyImageUrl:emptyImageUrl,falseFn:falseFn,formatNum:formatNum,get lastId(){return lastId},setOptions:setOptions,splitWords:splitWords,stamp:stamp,template:template,throttle:throttle,wrapNum:wrapNum};class Class{static extend({statics:t,includes:e,...i}){const o=class extends(this){};Object.setPrototypeOf(o,this);const s=this.prototype,n=o.prototype;if(t&&Object.assign(o,t),Array.isArray(e))for(const t of e)Object.assign(n,t);else e&&Object.assign(n,e);return Object.assign(n,i),n.options&&(n.options=s.options?Object.create(s.options):{},Object.assign(n.options,i.options)),n._initHooks=[],o}static include(t){const e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return setOptions(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){const i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(i),this}constructor(...t){this._initHooksCalled=!1,setOptions(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(this._initHooksCalled)return;const t=[];let e=this;for(;null!==(e=Object.getPrototypeOf(e));)t.push(e);t.reverse();for(const e of t)for(const t of e._initHooks??[])t.call(this);this._initHooksCalled=!0}}class Evented extends Class{on(t,e,i){if("object"==typeof t)for(const[i,o]of Object.entries(t))this._on(i,o,e);else for(const o of splitWords(t))this._on(o,e,i);return this}off(t,e,i){if(arguments.length)if("object"==typeof t)for(const[i,o]of Object.entries(t))this._off(i,o,e);else{const o=1===arguments.length;for(const s of splitWords(t))o?this._off(s):this._off(s,e,i)}else delete this._events;return this}_on(t,e,i,o){if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);if(!1!==this._listens(t,e,i))return;i===this&&(i=void 0);const s={fn:e,ctx:i};o&&(s.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(s)}_off(t,e,i){if(!this._events)return;let o=this._events[t];if(!o)return;if(1===arguments.length){if(this._firingCount)for(const t of o)t.fn=falseFn;return void delete this._events[t]}if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);const s=this._listens(t,e,i);if(!1!==s){const e=o[s];this._firingCount&&(e.fn=falseFn,this._events[t]=o=o.slice()),o.splice(s,1)}}fire(t,e,i){if(!this.listens(t,i))return this;const o={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){const e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(const i of e){const e=i.fn;i.once&&this.off(t,e,i.ctx),e.call(i.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this}listens(t,e,i,o){"string"!=typeof t&&console.warn('"string" type argument expected');let s=e;if("function"!=typeof e&&(o=!!e,s=void 0,i=void 0),this._events?.[t]?.length&&!1!==this._listens(t,s,i))return!0;
5if(o)for(const s of Object.values(this._eventParents??{}))if(s.listens(t,e,i,o))return!0;return!1}_listens(t,e,i){if(!this._events)return!1;const o=this._events[t]??[];if(!e)return!!o.length;i===this&&(i=void 0);const s=o.findIndex(t=>t.fn===e&&t.ctx===i);return-1!==s&&s}once(t,e,i){if("object"==typeof t)for(const[i,o]of Object.entries(t))this._on(i,o,e,!0);else for(const o of splitWords(t))this._on(o,e,i,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[stamp(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[stamp(t)],this}_propagateEvent(t){for(const e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class Point{constructor(t,e,i){if(!Point.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let o,s;if(t instanceof Point)return t;Array.isArray(t)?(o=t[0],s=t[1]):"object"==typeof t&&"x"in t&&"y"in t?(o=t.x,s=t.y):(o=t,s=e),this.x=i?Math.round(o):o,this.y=i?Math.round(s):s}static validate(t,e){return!!(t instanceof Point||Array.isArray(t))||(!!(t&&"object"==typeof t&&"x"in t&&"y"in t)||!(!t&&0!==t||!e&&0!==e))}clone(){const t=new Point(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new Point(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new Point(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new Point(this.x*t.x,this.y*t.y)}unscaleBy(t){return new Point(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){const e=(t=new Point(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)}equals(t){return(t=new Point(t)).x===this.x&&t.y===this.y}contains(t){return t=new Point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${formatNum(this.x)}, ${formatNum(this.y)})`}}class Bounds{constructor(t,e){if(!t)return;if(t instanceof Bounds)return t;const i=e?[t,e]:t;for(const t of i)this.extend(t)}extend(t){let e,i;if(!t)return this;if(t instanceof Point||"number"==typeof t[0]||"x"in t)e=i=new Point(t);else if(e=(t=new Bounds(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this}getCenter(t){return new Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new Point(this.min.x,this.max.y)}getTopRight(){return new Point(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,i;return(t="number"==typeof t[0]||t instanceof Point?new Point(t):new Bounds(t))instanceof Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y}intersects(t){t=new Bounds(t);const e=this.min,i=this.max,o=t.min,s=t.max,n=s.x>=e.x&&o.x<=i.x,a=s.y>=e.y&&o.y<=i.y;return n&&a}overlaps(t){t=new Bounds(t);const e=this.min,i=this.max,o=t.min,s=t.max,n=s.x>e.x&&o.x<i.x,a=s.y>e.y&&o.y<i.y;return n&&a}isValid(){return!(!this.min||!this.max)}pad(t){const e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return new Bounds(new Point(e.x-o,e.y-s),new Point(i.x+o,i.y+s))}equals(t){return!!t&&(t=new Bounds(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}}class LatLngBounds{constructor(t,e){if(!t)return;if(t instanceof LatLngBounds)return t;const i=e?[t,e]:t;for(const t of i)this.extend(t)}extend(t){const e=this._southWest,i=this._northEast;let o,s;if(t instanceof LatLng)o=t,s=t;else{if(!(t instanceof LatLngBounds))return t?LatLng.validate(t)?this.extend(new LatLng(t)):this.extend(new LatLngBounds(t)):this;if(o=t._southWest,s=t._northEast,!o||!s)return this}return e||i?(e.lat=Math.min(o.lat,e.lat),e.lng=Math.min(o.lng,e.lng),i.lat=Math.max(s.lat,i.lat),i.lng=Math.max(s.lng,i.lng)):(this._southWest=new LatLng(o.lat,o.lng),this._northEast=new LatLng(s.lat,s.lng)),this}pad(t){const e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;
5return new LatLngBounds(new LatLng(e.lat-o,e.lng-s),new LatLng(i.lat+o,i.lng+s))}getCenter(){return new LatLng((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 LatLng(this.getNorth(),this.getWest())}getSouthEast(){return new LatLng(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){t=LatLng.validate(t)?new LatLng(t):new LatLngBounds(t);const e=this._southWest,i=this._northEast;let o,s;return t instanceof LatLngBounds?(o=t.getSouthWest(),s=t.getNorthEast()):o=s=t,o.lat>=e.lat&&s.lat<=i.lat&&o.lng>=e.lng&&s.lng<=i.lng}intersects(t){t=new LatLngBounds(t);const e=this._southWest,i=this._northEast,o=t.getSouthWest(),s=t.getNorthEast(),n=s.lat>=e.lat&&o.lat<=i.lat,a=s.lng>=e.lng&&o.lng<=i.lng;return n&&a}overlaps(t){t=new LatLngBounds(t);
5const e=this._southWest,i=this._northEast,o=t.getSouthWest(),s=t.getNorthEast(),n=s.lat>e.lat&&o.lat<i.lat,a=s.lng>e.lng&&o.lng<i.lng;return n&&a}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")}equals(t,e){return!!t&&(t=new LatLngBounds(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))}isValid(){return!(!this._southWest||!this._northEast)}}class LatLng{constructor(t,e,i){if(!LatLng.validate(t,e,i))throw new Error(`Invalid LatLng object: (${t}, ${e})`);let o,s,n;if(t instanceof LatLng)return t;Array.isArray(t)&&"object"!=typeof t[0]?3===t.length?(o=t[0],s=t[1],n=t[2]):2===t.length&&(o=t[0],s=t[1]):"object"==typeof t&&"lat"in t?(o=t.lat,s="lng"in t?t.lng:t.lon,n=t.alt):(o=t,s=e,n=i),this.lat=+o,this.lng=+s,void 0!==n&&(this.alt=+n)}static validate(t,e,i){return t instanceof LatLng||"object"==typeof t&&"lat"in t||(t&&Array.isArray(t)&&"object"!=typeof t[0]?3===t.length||2===t.length:!(!t&&0!==t||!e&&0!==e))}equals(t,e){if(!t)return!1;t=new LatLng(t);return Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(e??1e-9)}toString(t){return`LatLng(${formatNum(this.lat,t)}, ${formatNum(this.lng,t)})`}distanceTo(t){return Earth.distance(this,new LatLng(t))}wrap(){return Earth.wrapLatLng(this)}toBounds(t){const e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new LatLngBounds([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])}clone(){const t=new LatLng(0,0);return t.lat=this.lat,t.lng=this.lng,t.alt=this.alt,t}}class CRS{static projection=void 0;static transformation=void 0;static latLngToPoint(t,e){const i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)}static pointToLatLng(t,e){const i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)}static project(t){return this.projection.project(t)}static unproject(t){return this.projection.unproject(t)}static scale(t){return 256*2**t}static zoom(t){return Math.log(t/256)/Math.LN2}static getProjectedBounds(t){if(this.infinite)return null;const e=this.projection.bounds,i=this.scale(t),o=this.transformation.transform(e.min,i),s=this.transformation.transform(e.max,i);return new Bounds(o,s)}static infinite=!1;static wrapLatLng(t){t=new LatLng(t);const e=this.wrapLng?wrapNum(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?wrapNum(t.lat,this.wrapLat,!0):t.lat,o=t.alt;return new LatLng(i,e,o)}static wrapLatLngBounds(t){const e=(t=new LatLngBounds(t)).getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,s=e.lng-i.lng;if(0===o&&0===s)return t;
5const n=t.getSouthWest(),a=t.getNorthEast(),r=new LatLng(n.lat-o,n.lng-s),h=new LatLng(a.lat-o,a.lng-s);return new LatLngBounds(r,h)}}class Earth extends CRS{static wrapLng=[-180,180];static R=6371e3;static distance(t,e){const i=Math.PI/180,o=t.lat*i,s=e.lat*i,n=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),r=n*n+Math.cos(o)*Math.cos(s)*a*a,h=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*h}}const earthRadius$1=6378137,SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project(t){t=new LatLng(t);const e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),s=Math.sin(o*e);return new Point(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject(t){t=new Point(t);const e=180/Math.PI;return new LatLng((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(()=>{const t=6378137*Math.PI;return new Bounds([-t,-t],[t,t])})()};class Transformation{constructor(t,e,i,o){if(Array.isArray(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=o}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return e||=1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class EPSG3857 extends Earth{static code="EPSG:3857";static projection=SphericalMercator;static transformation=(()=>{const t=.5/(Math.PI*SphericalMercator.R);return new Transformation(t,.5,-t,.5)})()}class EPSG900913 extends EPSG3857{static code="EPSG:900913"}const chrome=userAgentContains("chrome"),safari=!chrome&&userAgentContains("safari"),mobile="undefined"!=typeof orientation||userAgentContains("mobile"),pointer="undefined"!=typeof window&&!!window.PointerEvent,touchNative="undefined"!=typeof window&&("ontouchstart"in window||!!window.TouchEvent),touch=touchNative||pointer,retina="undefined"!=typeof window&&void 0!==window.devicePixelRatio&&window.devicePixelRatio>1,mac="undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Mac"),linux="undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Linux");function userAgentContains(t){return"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t)}var Browser={chrome:chrome,safari:safari,mobile:mobile,pointer:pointer,touch:touch,touchNative:touchNative,retina:retina,mac:mac,linux:linux};function makeDblclick(t){let e,i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:2,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget,region:t.region};return t instanceof PointerEvent?(i={...i,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary},e=new PointerEvent("dblclick",i)):e=new MouseEvent("dblclick",i),e}const delay=200;function addDoubleTapListener(t,e){t.addEventListener("dblclick",e);let i,o=0;function s(t){if(1!==t.detail)return void(i=t.detail);if("mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents)return;const e=getPropagationPath(t);if(e.some(t=>t instanceof HTMLLabelElement&&t.attributes.for)&&!e.some(t=>t instanceof HTMLInputElement||t instanceof HTMLSelectElement))return;const s=Date.now();s-o<=200?(i++,2===i&&t.target.dispatchEvent(makeDblclick(t))):i=1,o=s}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function removeDoubleTapListener(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}function get(t){return"string"==typeof t?document.getElementById(t):t}function create$1(t,e,i){const o=document.createElement(t);return o.className=e??"",i?.appendChild(o),o}function toFront(t){const e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function toBack(t){const e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function setTransform(t,e,i){const o=e??new Point(0,0);t.style.transform=`translate3d(${o.x}px,${o.y}px,0)${i?` scale(${i})`:""}`}const positions=new WeakMap;function setPosition(t,e){positions.set(t,e),setTransform(t,e)}function getPosition(t){return positions.get(t)??new Point(0,0)}const documentStyle="undefined"==typeof document?{}:document.documentElement.style,userSelectProp=["userSelect","WebkitUserSelect"].find(t=>t in documentStyle);let prevUserSelect,_outlineElement,_outlineStyle;function disableTextSelection(){const t=documentStyle[userSelectProp];"none"!==t&&(prevUserSelect=t,documentStyle[userSelectProp]="none")}function enableTextSelection(){void 0!==prevUserSelect&&(documentStyle[userSelectProp]=prevUserSelect,prevUserSelect=void 0)}function disableImageDrag(){on(window,"dragstart",preventDefault)}function enableImageDrag(){off(window,"dragstart",preventDefault)}function preventOutline(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(restoreOutline(),_outlineElement=t,_outlineStyle=t.style.outlineStyle,t.style.outlineStyle="none",on(window,"keydown",restoreOutline))}function restoreOutline(){_outlineElement&&(_outlineElement.style.outlineStyle=_outlineStyle,_outlineElement=void 0,_outlineStyle=void 0,off(window,"keydown",restoreOutline))}function getSizedParentNode(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function getScale(t){const e=t.getBoundingClientRect();
5return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var DomUtil={__proto__:null,create:create$1,disableImageDrag:disableImageDrag,disableTextSelection:disableTextSelection,enableImageDrag:enableImageDrag,enableTextSelection:enableTextSelection,get:get,getPosition:getPosition,getScale:getScale,getSizedParentNode:getSizedParentNode,preventOutline:preventOutline,restoreOutline:restoreOutline,setPosition:setPosition,setTransform:setTransform,toBack:toBack,toFront:toFront};let activePointers=new Map,initialized=!1;function enablePointerDetection(){initialized||(initialized=!0,document.addEventListener("pointerdown",_onSet,{capture:!0}),document.addEventListener("pointermove",_onUpdate,{capture:!0}),document.addEventListener("pointerup",_onDelete,{capture:!0}),document.addEventListener("pointercancel",_onDelete,{capture:!0}),activePointers=new Map)}function disablePointerDetection(){document.removeEventListener("pointerdown",_onSet,{capture:!0}),document.removeEventListener("pointermove",_onUpdate,{capture:!0}),document.removeEventListener("pointerup",_onDelete,{capture:!0}),document.removeEventListener("pointercancel",_onDelete,{capture:!0}),initialized=!1}function _onSet(t){activePointers.set(t.pointerId,t)}function _onUpdate(t){activePointers.has(t.pointerId)&&activePointers.set(t.pointerId,t)}function _onDelete(t){activePointers.delete(t.pointerId)}function getPointers(){return[...activePointers.values()]}function cleanupPointers(){activePointers.clear()}var DomEvent_PointerEvents={__proto__:null,cleanupPointers:cleanupPointers,disablePointerDetection:disablePointerDetection,enablePointerDetection:enablePointerDetection,getPointers:getPointers};function on(t,e,i,o){if(e&&"object"==typeof e)for(const[o,s]of Object.entries(e))addOne(t,o,s,i);else for(const s of splitWords(e))addOne(t,s,i,o);return this}const eventsKey="_leaflet_events";function off(t,e,i,o){if(1===arguments.length)batchRemove(t),delete t[eventsKey];else if(e&&"object"==typeof e)for(const[o,s]of Object.entries(e))removeOne(t,o,s,i);else if(e=splitWords(e),2===arguments.length)batchRemove(t,t=>e.includes(t));else for(const s of e)removeOne(t,s,i,o);return this}function batchRemove(t,e){for(const i of Object.keys(t[eventsKey]??{})){const o=i.split(/\d/)[0];e&&!e(o)||removeOne(t,o,null,null,i)}}const pointerSubst={pointerenter:"pointerover",pointerleave:"pointerout",wheel:"undefined"!=typeof window&&(!("onwheel"in window)&&"mousewheel")};function addOne(t,e,i,o){const s=e+stamp(i)+(o?`_${stamp(o)}`:"");if(t[eventsKey]&&t[eventsKey][s])return this;let n=function(e){return i.call(o||t,e||window.event)};const a=n;Browser.touch&&"dblclick"===e?n=addDoubleTapListener(t,n):"addEventListener"in t?"wheel"===e||"mousewheel"===e?t.addEventListener(pointerSubst[e]||e,n,{passive:!1}):"pointerenter"===e||"pointerleave"===e?(n=function(e){e??=window.event,isExternalTarget(t,e)&&a(e)},t.addEventListener(pointerSubst[e],n,!1)):t.addEventListener(e,a,!1):t.attachEvent(`on${e}`,n),t[eventsKey]??={},t[eventsKey][s]=n}function removeOne(t,e,i,o,s){s??=e+stamp(i)+(o?`_${stamp(o)}`:"");const n=t[eventsKey]&&t[eventsKey][s];if(!n)return this;Browser.touch&&"dblclick"===e?removeDoubleTapListener(t,n):"removeEventListener"in t?t.removeEventListener(pointerSubst[e]||e,n,!1):t.detachEvent(`on${e}`,n),t[eventsKey][s]=null}function stopPropagation(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function disableScrollPropagation(t){return addOne(t,"wheel",stopPropagation),this}function disableClickPropagation(t){return on(t,"pointerdown dblclick contextmenu",stopPropagation),t._leaflet_disable_click=!0,this}function preventDefault(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function stop(t){return preventDefault(t),stopPropagation(t),this}function getPropagationPath(t){return t.composedPath()}function getPointerPosition(t,e){if(!e)return new Point(t.clientX,t.clientY);const i=getScale(e),o=i.boundingClientRect;return new Point((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}function getWheelPxFactor(){const t=window.devicePixelRatio;return Browser.linux&&Browser.chrome?t:Browser.mac?3*t:t>0?2*t:1}function getWheelDelta(t){return t.deltaY&&0===t.deltaMode?-t.deltaY/getWheelPxFactor():t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:(t.deltaX||t.deltaZ,0)}function isExternalTarget(t,e){let i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var DomEvent={__proto__:null,PointerEvents:DomEvent_PointerEvents,disableClickPropagation:disableClickPropagation,disableScrollPropagation:disableScrollPropagation,getPointerPosition:getPointerPosition,getPropagationPath:getPropagationPath,getWheelDelta:getWheelDelta,getWheelPxFactor:getWheelPxFactor,isExternalTarget:isExternalTarget,off:off,on:on,preventDefault:preventDefault,stop:stop,stopPropagation:stopPropagation};
5class PosAnimation extends Evented{run(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i??.25,this._easeOutPower=1/Math.max(o??.5,.2),this._startPos=getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){const e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())}_runFrame(t,e){const i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),setPosition(this._el,i),this.fire("step")}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire("end")}_easeOut(t){return 1-(1-t)**this._easeOutPower}}let Map$1=class t extends Evented{static{this.setDefaultOptions({crs:EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0})}initialize(t,e){e=setOptions(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(new LatLng(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(t,e,i){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(new LatLng(t),e,this.options.maxBounds),i??={},this._stop(),this._loaded&&!i.reset&&!0!==i){void 0!==i.animate&&(i.zoom={animate:i.animate,...i.zoom},i.pan={animate:i.animate,duration:i.duration,...i.pan});if(this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,i.pan?.noMoveStart),this}setZoom(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)}zoomIn(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom+t,e)}zoomOut(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom-t,e)}setZoomAround(t,e,i){const o=this.getZoomScale(e),s=this.getSize().divideBy(2),n=(t instanceof Point?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/o),a=this.containerPointToLatLng(s.add(n));return this.setView(a,e,{zoom:i})}_getBoundsCenterZoom(t,e){e??={},t=t.getBounds?t.getBounds():new LatLngBounds(t);const i=new Point(e.paddingTopLeft||e.padding||[0,0]),o=new Point(e.paddingBottomRight||e.padding||[0,0]);let s=this.getBoundsZoom(t,!1,i.add(o));if(s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s,s===1/0)return{center:t.getCenter(),zoom:s};
5const n=o.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),r=this.project(t.getNorthEast(),s);return{center:this.unproject(a.add(r).divideBy(2).add(n),s),zoom:s}}fitBounds(t,e){if(!(t=new LatLngBounds(t)).isValid())throw new Error("Bounds are not valid.");const i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)}fitWorld(t){return this.fitBounds([[-90,-180],[90,180]],t)}panTo(t,e){return this.setView(t,this._zoom,{pan:e})}panBy(t,e){if(t=new Point(t).round(),e??={},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){this._mapPane.classList.add("leaflet-pan-anim");const i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this}flyTo(t,e,i){if(i??={},!1===i.animate)return this.setView(t,e,i);this._stop();const o=this.project(this.getCenter()),s=this.project(t),n=this.getSize(),a=this._zoom;t=new LatLng(t),e=void 0===e?a:this._limitZoom(e);const r=Math.max(n.x,n.y),h=r*this.getZoomScale(a,e),l=s.distanceTo(o)||1,c=1.42,d=2.0164;function p(t){const e=(h*h-r*r+(t?-1:1)*d*d*l*l)/(2*(t?h:r)*d*l),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function u(t){return(Math.exp(t)+Math.exp(-t))/2}const m=p(0);function g(t){return r*(u(m)*(_(e=m+c*t)/u(e))-_(m))/d;var e}const f=Date.now(),y=(p(1)-m)/c,v=i.duration?1e3*i.duration:1e3*y*.8,L=()=>{const i=(Date.now()-f)/v,n=function(t){return 1-(1-t)**1.5}(i)*y;i<=1?(this._flyToFrame=requestAnimationFrame(L),this._move(this.unproject(o.add(s.subtract(o).multiplyBy(g(n)/l)),a),this.get
5ScaleZoom(r/function(t){return r*(u(m)/u(m+c*t))}(n),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)};return this._moveStart(!0,i.noMoveStart),L(),this}flyToBounds(t,e){const i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)}setMaxBounds(t){return t=new LatLngBounds(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){const e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this}setMaxZoom(t){const e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;const i=this.getCenter(),o=this._limitCenter(i,this._zoom,new LatLngBounds(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};const i=new Point(e.paddingTopLeft||e.padding||[0,0]),o=new Point(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),n=this.project(t),a=this.getPixelBounds(),r=new Bounds([a.min.add(i),a.max.subtract(o)]),h=r.getSize();if(!r.contains(n)){this._enforcingBounds=!0;const t=n.subtract(r.getCenter()),i=r.extend(n).getSize().subtract(h);s.x+=t.x<0?-i.x:i.x,s.y+=t.y<0?-i.y:i.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1}return this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...!0===t?{animate:!0}:t};const e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;const i=this.getSize(),o=e.divideBy(2).round(),s=i.divideBy(2).round(),n=o.subtract(s);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){if(t=this._locateOptions={timeout:1e4,watch:!1,...t},!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;const e=this._handleGeolocationResponse.bind(this),i=this._handleGeolocationError.bind(this);return t.watch?(void 0!==this._locationWatchId&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,i,t)):navigator.geolocation.getCurrentPosition(e,i,t),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){if(!this._container._leaflet_id)return;const e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${i}.`})}_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;const e=t.coords.latitude,i=t.coords.longitude,o=new LatLng(e,i),s=o.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){const t=this.getBoundsZoom(s);this.setView(o,n.maxZoom?Math.min(t,n.maxZoom):t)}const a={latlng:o,bounds:s,timestamp:t.timestamp};for(const e in t.coords)"number"==typeof t.coords[e]&&(a[e]=t.coords[e]);this.fire("locationfound",a)}addHandler(t,e){if(!e)return this;const i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this}remove(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");delete this._container._leaflet_id,delete this._containerId,void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(const t of Object.values(this._layers))t.remove();for(const t of Object.values(this._panes))t.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){const i=create$1("div","leaflet-pane"+(t?` leaflet-${t.replace("Pane","")}-pane`:""),e||this._mapPane);return t&&(this._panes[t]=i),i}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){const t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());
5return new LatLngBounds(e,i)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,i){t=new LatLngBounds(t),i=new Point(i??[0,0]);let o=this.getZoom()??0;const s=this.getMinZoom(),n=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),h=this.getSize().subtract(i),l=new Bounds(this.project(r,o),this.project(a,o)).getSize(),c=this.options.zoomSnap,d=h.x/l.x,p=h.y/l.y,_=e?Math.max(d,p):Math.min(d,p);return o=this.getScaleZoom(_,o),c&&(o=Math.round(o/(c/100))*(c/100),o=e?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(s,Math.min(n,o))}getSize(){return this._size&&!this._sizeChanged||(this._size=new Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){const i=this._getTopLeftPoint(t,e);return new Bounds(i,i.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return"string"==typeof t?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){const i=this.options.crs;return e??=this._zoom,i.scale(t)/i.scale(e)}getScaleZoom(t,e){const i=this.options.crs;e??=this._zoom;const o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new LatLng(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new Point(t),e)}layerPointToLatLng(t){const e=new Point(t).add(this.getPixelOrigin());return this.unproject(e)}latLngToLayerPoint(t){return this.project(new LatLng(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new LatLng(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new LatLngBounds(t))}distance(t,e){return this.options.crs.distance(new LatLng(t),new LatLng(e))}containerPointToLayerPoint(t){return new Point(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new Point(t).add(this._getMapPanePos())}containerPointToLatLng(t){const e=this.containerPointToLayerPoint(new Point(t));return this.layerPointToLatLng(e)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new LatLng(t)))}pointerEventToContainerPoint(t){return getPointerPosition(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){const e=this._container=get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");on(e,"scroll",this._onScroll,this),this._containerId=stamp(e),enablePointerDetection()}_initLayout(){const t=this._container;this._fadeAnimated=this.options.fadeAnimation;const e=["leaflet-container","leaflet-touch"];Browser.retina&&e.push("leaflet-retina"),Browser.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e);const{position:i}=getComputedStyle(t);"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){const t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),setPosition(this._mapPane,new Point(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,i){setPosition(this._mapPane,new Point(0,0));const o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");const s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),this.fire("viewreset"),o&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,i,o){void 0===e&&(e=this._zoom);const s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i?.pinch&&this.fire("zoom",i):((s||i?.pinch)&&this.fire("zoom",i),this.fire("move",i)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){setPosition(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},this._targets[stamp(this._container)]=this;(t?off:on)(this._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove c
5ontextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){const t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let i,o=[],s=t.target||t.srcElement,n=!1;const a="pointerout"===e||"pointerover"===e;for(;s;){if(i=this._targets[stamp(s)],i&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){n=!0;break}if(i&&i.listens(e,!0)){if(a&&!isExternalTarget(s,t))break;if(o.push(i),a)break}if(s===this._container)break;s=s.parentNode}return o.length||n||a||!this.listens(e,!0)||(o=[this]),o}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){const e=t.target??t.srcElement;if(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))return;const i=t.type;"pointerdown"===i&&preventOutline(e),this._fireDOMEvent(t,i)}static _pointerEvents=["click","dblclick","pointerover","pointerout","contextmenu"];_fireDOMEvent(e,i,o){"click"===i&&this._fireDOMEvent(e,"preclick",o);let s=this._findEventTargets(e,i);if(o){s=o.filter(t=>t.listens(i,!0)).concat(s)}if(!s.length)return;"contextmenu"===i&&preventDefault(e);const n=s[0],a={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){const t=n.getLatLng&&(!n._radius||n._radius<=10);a.containerPoint=t?this.latLngToContainerPoint(n.getLatLng()):this.pointerEventToContainerPoint(e),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=t?n.getLatLng():this.layerPointToLatLng(
5a.layerPoint)}for(const e of s)if(e.fire(i,a,!0),a.originalEvent._stopped||!1===e.options.bubblingPointerEvents&&t._pointerEvents.includes(i))return}_draggableMoved(t){return t=t.dragging?.enabled()?t:this,t.dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(const t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return getPosition(this._mapPane)}_moved(){const t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){const i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,i){const o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)}_latLngBoundsToNewLayerBounds(t,e,i){const o=this._getNewPixelOrigin(i,e);return new Bounds([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,i){if(!i)return t;const o=this.project(t,e),s=this.getSize().divideBy(2),n=new Bounds(o.subtract(s),o.add(s)),a=this._getBoundsOffset(n,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(o.add(a),e)}_limitOffset(t,e){if(!e)return t;const i=this.getPixelBounds(),o=new Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))}_getBoundsOffset(t,e,i){const o=new Bounds(this.project(e.getNorthEast(),i),this.project(e.getSouthWest
5(),i)),s=o.min.subtract(t.min),n=o.max.subtract(t.max),a=this._rebound(s.x,-n.x),r=this._rebound(s.y,-n.y);return new Point(a,r)}_rebound(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){const e=this.getMinZoom(),i=this.getMaxZoom(),o=this.options.zoomSnap;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){const i=this._getCenterOffset(t)._trunc();return!(!0!==e?.animate&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)}_createAnimProxy(){this._proxy=create$1("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),on(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){const e=this._proxy.style.transform;setTransform(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){const t=this.getCenter(),e=this.getZoom();setTransform(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(off(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,i){if(this._animatingZoom)return!0;if(i??={},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;const o=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(s))&&(requestAnimationFrame(()=>{this._moveStart(!0,i.noMoveStart??!1)._animateZoom(t,e,!0)}),!0)}_animateZoom(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(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 LeafletMap=Map$1;class Control extends Class{static{this.setDefaultOptions({position:"topright"})}initialize(t){setOptions(this,t)}getPosition(){return this.options.position}setPosition(t){const e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;const e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return e.classList.add("leaflet-control"),i.includes("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),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),this._map=null,this):this}_refocusOnMap(t){this._map&&t&&(0!==t.screenX||0!==t.screenY)&&this._map.getContainer().focus()}}Map$1.include({addControl(t){return t.addTo(this),this},removeControl(t){return t.remove(),this},_initControlPos(){const t=this._controlCorners={},e="leaflet-",i=this._controlContainer=create$1("div",`${e}control-container`,this._container);function o(o,s){const n=`${e+o} ${e}${s}`;t[o+s]=create$1("div",n,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos(){for(const t of Object.values(this._controlCorners))t.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}}
5);class Layers extends Control{static{this.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:(t,e,i,o)=>i<o?-1:o<i?1:0})}initialize(t,e,i){setOptions(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(const[e,i]of Object.entries(t??{}))this._addLayer(i,e);for(const[t,i]of Object.entries(e??{}))this._addLayer(i,t,!0)}onAdd(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(const t of this._layers)t.layer.on("add remove",this._onLayerChange,this);return this.options.collapsed||t.on("resize",this._expandIfNotCollapsed,this),this._container}addTo(t){return Control.prototype.addTo.call(this,t),this._expandIfNotCollapsed()}onRemove(){this._map.off("zoomend",this._checkDisabledLayers,this);for(const t of this._layers)t.layer.off("add remove",this._onLayerChange,this);this._map.off("resize",this._expandIfNotCollapsed,this)}addBaseLayer(t,e){return this._addLayer(t,e),this._map?this._update():this}addOverlay(t,e){return this._addLayer(t,e,!0),this._map?this._update():this}removeLayer(t){t.off("add remove",this._onLayerChange,this);const e=this._getLayer(stamp(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add("leaflet-control-layers-expanded"),this._section.style.height=null;const t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(this._section.classList.add("leaflet-control-layers-scrollbar"),this._section.style.height=`${t}px`):this._section.classList.remove("leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this}collapse(t){if(!t||"pointerleave"!==t.type&&"pointerout"!==t.type||"touch"!==t.pointerType){if(this.options.collapseDelay>0)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){const t="leaflet-control-layers",e=this._container=create$1("div",t),i=this.options.collapsed;disableClickPropagation(e),disableScrollPropagation(e);const o=this._section=create$1("fieldset",`${t}-list`);i&&(this._map.on("click",this.collapse,this),on(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this));const s=this._layersLink=create$1("a",`${t}-toggle`,e);s.href="#",s.title="Layers",s.setAttribute("role","button"),on(s,{keydown(t){"Enter"===t.code&&this._expandSafely()},click(t){preventDefault(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=create$1("div",`${t}-base`,o),this._separator=create$1("div",`${t}-separator`,o),this._overlaysList=create$1("div",`${t}-overlays`,o),e.appendChild(o)}_getLayer(t){for(const e of this._layers)if(e&&stamp(e.layer)===t)return e}_addLayer(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort((t,e)=>this.options.sortFunction(t.layer,e.layer,t.name,e.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,i=0;for(const o of this._layers)this._addItem(o),e||=o.overlay,t||=!o.overlay,i+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this}_onLayerChange(t){this._handlingClick||this._update();const e=this._getLayer(stamp(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}_addItem(t){const e=document.createElement("label"),i=this._map.hasLayer(t.layer),o=document.createElement("input");o.type=t.overlay?"checkbox":"radio",o.className="leaflet-control-layers-selector",o.defaultChecked=i,t.overlay||(o.name=`leaflet-base-layers_${stamp(this)}`),this._layerControlInputs.push(o),o.layerId=stamp(t.layer),on(o,"click",this._onInputClick,this);const s=document.createElement("span");s.innerHTML=` ${t.name}`;const n=document.createElement("span");e.appendChild(n),n.appendChild(o),n.appendChild(s);return(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(this._preventClick)return;const e=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(const t of e){const e=this._getLayer(t.layerId).layer;t.checked?i.push(e):t.checked||o.push(e)}for(const t of o)this._map.hasLayer(t)&&this._map.removeLayer(t);for(const t of i)this._map.hasLayer(t)||this._map.addLayer(t);this._handlingClick=!1,this._refocusOnMap(t)}_checkDisabledLayers(){const t=this._layerControlInputs,e=this._map.getZoom();for(const i of t){const t=this._getLayer(i.layerId).layer;i.disabled=void 0!==t.options.minZoom&&e<t.options.minZoom||void 0!==t.options.maxZoom&&e>t.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){const t=this._section;this._preventClick=!0,on(t,"click",preventDefault),this.expand(),setTimeout(()=>{off(t,"click",preventDefault),this._preventClick=!1})}}class Zoom extends Control{static{this.setDefaultOptions({position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"})}onAdd(t){const e="leaflet-control-zoom",i=create$1("div",`${e} leaflet-bar`),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,`${e}-in`,i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,`${e}-out`,i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))}_zoomOut(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,i,o,s){const n=create$1("a",i,o);return n.innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),disableClickPropagation(n),on(n,"click",stop),on(n,"click",s,this),on(n,"click",this._refocusOnMap,this),n}_updateDisabled(){const t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}}Map$1.mergeOptions({zoomControl:!0}),Map$1.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Zoom,this.addControl(this.zoomControl))});class Scale extends Control{static{this.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1})}onAdd(t){const e="leaflet-control-scale",i=create$1("div",e),o=this.options;return this._addScales(o,`${e}-line`,i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,i){t.metric&&(this._mScale=create$1("div",e,i)),t.imperial&&(this._iScale=create$1("div",e,i))}
5_update(){const t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){const e=this._getRoundNum(t),i=e<1e3?`${e} m`:e/1e3+" km";this._updateScale(this._mScale,i,e/t)}_updateImperial(t){const e=3.2808399*t;let i,o,s;e>5280?(i=e/5280,o=this._getRoundNum(i),this._updateScale(this._iScale,`${o} mi`,o/i)):(s=this._getRoundNum(e),this._updateScale(this._iScale,`${s} ft`,s/e))}_updateScale(t,e,i){t.style.width=`${Math.round(this.options.maxWidth*i)}px`,t.innerHTML=e}_getRoundNum(t){const e=10**(`${Math.floor(t)}`.length-1);let i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}const ukrainianFlag='<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>';class Attribution extends Control{static{this.setDefaultOptions({position:"bottomright",prefix:`<a target="_blank" href="https://leafletjs.com" title="A JavaScript library for interactive maps">${ukrainianFlag}Leaflet</a>`})}initialize(t){setOptions(this,t),this._attributions={}}onAdd(t){t.attributionControl=this,this._container=create$1("div","leaflet-control-attribution"),disableClickPropagation(this._container);for(const e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this}removeAttribution(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(t=>this._attributions[t]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}Map$1.mergeOptions({attributionControl:!0}),Map$1.addInitHook(function(){this.options.attributionControl&&(new Attribution).addTo(this)}),Control.Layers=Layers,Control.Zoom=Zoom,Control.Scale=Scale,Control.Attribution=Attribution;class Handler extends Class{initialize(t){this._map=t}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this}enabled(){return!!this._enabled}}Handler.addTo=function(t,e){return t.addHandler(e,this),this};class Draggable extends Evented{static{this.setDefaultOptions({clickTolerance:3})}initialize(t,e,i,o){setOptions(this,o),this._element=t,this._dragStartTarget=e??t,this._preventOutline=i}enable(){this._enabled||(on(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(Draggable._dragging===this&&this.finishDrag(!0),off(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;if(1!==getPointers().length)return void(Draggable._dragging===this&&this.finishDrag());if(Draggable._dragging||t.shiftKey||0!==t.button&&"touch"!==t.pointerType)return;if(Draggable._dragging=this,this._preventOutline&&preventOutline(this._element),disableImageDrag(),disableTextSelection(),this._moving)return;this.fire("down");const e=getSizedParentNode(this._element);this._startPoint=new Point(t.clientX,t.clientY),this._startPos=getPosition(this._element),this._parentScale=getScale(e),on(document,"pointermove",this._onMove,this),on(document,"pointerup pointercancel",this._onUp,this)}_onMove(t){if(getPointers().length>1)return void(this._moved=!0);const e=new Point(t.clientX,t.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,t.cancelable&&preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,document.body.classList.add("leaflet-dragging"),this._lastTarget=t.target??t.srcElement,this._lastTarget.classList.add("leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))}_updatePosition(){const t={originalEvent:this._lastEvent};this.fire("predrag",t),setPosition(this._element,this._newPos),this.fire("drag",t)}_onUp(){this.finishDrag()}finishDrag(t){document.body.classList.remove("leaflet-dragging"),this._lastTarget&&(this._lastTarget.classList.remove("leaflet-drag-target"),this._lastTarget=null),off(document,"pointermove",this._onMove,this),off(document,"pointerup pointercancel",this._onUp,this),enableImageDrag(),enableTextSelection();const e=this._moved&&this._moving;this._moving=!1,Draggable._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}}function clipPolygon(t,e,i){let o,s,n,a,r,h,l,c,d;const p=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=_getBitCode(t[s],e);for(a=0;a<4;a++){for(c=p[a],o=[],s=0,l=t.length,n=l-1;s<l;n=s++)r=t[s],h=t[n],r._code&c?h._code&c||(d=_getEdgeIntersection(h,r,c,e,i),d._code=_getBitCode(d,e),o.push(d)):(h._code&c&&(d=_getEdgeIntersection(h,r,c,e,i),d._code=_getBitCode(d,e),o.push(d)),o.push(r));t=o}return t}function polygonCenter(t,e){let i,o,s,n,a,r,h,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");isFlat(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let d=new LatLng([0,0]);const p=new LatLngBounds(t);
5p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(d=centroid(t));const _=t.length,u=[];for(i=0;i<_;i++){const o=new LatLng(t[i]);u.push(e.project(new LatLng([o.lat-d.lat,o.lng-d.lng])))}for(r=h=l=0,i=0,o=_-1;i<_;o=i++)s=u[i],n=u[o],a=s.y*n.x-n.y*s.x,h+=(s.x+n.x)*a,l+=(s.y+n.y)*a,r+=3*a;c=0===r?u[0]:[h/r,l/r];const m=e.unproject(new Point(c));return new LatLng([m.lat+d.lat,m.lng+d.lng])}function centroid(t){let e=0,i=0,o=0;for(const s of t){const t=new LatLng(s);e+=t.lat,i+=t.lng,o++}return new LatLng([e/o,i/o])}var PolyUtil={__proto__:null,centroid:centroid,clipPolygon:clipPolygon,polygonCenter:polygonCenter};function simplify(t,e){if(!e||!t.length)return t.slice();const i=e*e;return t=_simplifyDP(t=_reducePoints(t,i),i)}function pointToSegmentDistance(t,e,i){return Math.sqrt(_sqClosestPointOnSegment(t,e,i,!0))}function closestPointOnSegment(t,e,i){return _sqClosestPointOnSegment(t,e,i)}function _simplifyDP(t,e){const i=t.length,o=new Uint8Array(i);let s;o[0]=o[i-1]=1,_simplifyDPStep(t,o,e,0,i-1);const n=[];for(s=0;s<i;s++)o[s]&&n.push(t[s]);return n}function _simplifyDPStep(t,e,i,o,s){let n,a,r,h=0;for(a=o+1;a<=s-1;a++)r=_sqClosestPointOnSegment(t[a],t[o],t[s],!0),r>h&&(n=a,h=r);h>i&&(e[n]=1,_simplifyDPStep(t,e,i,o,n),_simplifyDPStep(t,e,i,n,s))}function _reducePoints(t,e){const i=[t[0]];let o=0;for(let s=1;s<t.length;s++)_sqDist(t[s],t[o])>e&&(i.push(t[s]),o=s);return o<t.length-1&&i.push(t[t.length-1]),i}let _lastCode;function clipSegment(t,e,i,o,s){let n,a,r,h=o?_lastCode:_getBitCode(t,i),l=_getBitCode(e,i);for(_lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;n=h||l,a=_getEdgeIntersection(t,e,n,i,s),r=_getBitCode(a,i),n===h?(t=a,h=r):(e=a,l=r)}}function _getEdgeIntersection(t,e,i,o,s){const n=e.x-t.x,a=e.y-t.y,r=o.min,h=o.max;let l,c;return 8&i?(l=t.x+n*(h.y-t.y)/a,c=h.y):4&i?(l=t.x+n*(r.y-t.y)/a,c=r.y):2&i?(l=h.x,c=t.y+a*(h.x-t.x)/n):1&i&&(l=r.x,c=t.y+a*(r.x-t.x)/n),new Point(l,c,s)}function _getBitCode(t,e){let i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function _sqDist(t,e){const i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function _sqClosestPointOnSegment(t,e,i,o){let s,n=e.x,a=e.y,r=i.x-n,h=i.y-a;const l=r*r+h*h;return l>0&&(s=((t.x-n)*r+(t.y-a)*h)/l,s>1?(n=i.x,a=i.y):s>0&&(n+=r*s,a+=h*s)),r=t.x-n,h=t.y-a,o?r*r+h*h:new Point(n,a)}function isFlat(t){return!Array.isArray(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function polylineCenter(t,e){let i,o,s,n,a,r,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");isFlat(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let c=new LatLng([0,0]);const d=new LatLngBounds(t);
5d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(c=centroid(t));const p=t.length,_=[];for(i=0;i<p;i++){const o=new LatLng(t[i]);_.push(e.project(new LatLng([o.lat-c.lat,o.lng-c.lng])))}for(i=0,o=0;i<p-1;i++)o+=_[i].distanceTo(_[i+1])/2;if(0===o)l=_[0];else for(i=0,n=0;i<p-1;i++)if(a=_[i],r=_[i+1],s=a.distanceTo(r),n+=s,n>o){h=(n-o)/s,l=[r.x-h*(r.x-a.x),r.y-h*(r.y-a.y)];break}const u=e.unproject(new Point(l));return new LatLng([u.lat+c.lat,u.lng+c.lng])}var LineUtil={__proto__:null,_getBitCode:_getBitCode,_getEdgeIntersection:_getEdgeIntersection,_sqClosestPointOnSegment:_sqClosestPointOnSegment,clipSegment:clipSegment,closestPointOnSegment:closestPointOnSegment,isFlat:isFlat,pointToSegmentDistance:pointToSegmentDistance,polylineCenter:polylineCenter,simplify:simplify};const LonLat={project:t=>(t=new LatLng(t),new Point(t.lng,t.lat)),unproject:t=>(t=new Point(t),new LatLng(t.y,t.x)),bounds:new Bounds([-180,-90],[180,90])},earthRadius=6378137,Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:new Bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(t){t=new LatLng(t);const e=Math.PI/180,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o);let n=t.lat*e;const a=s*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/((1-a)/(1+a))**(s/2);return n=-i*Math.log(Math.max(r,1e-10)),new Point(t.lng*e*i,n)},unproject(t){t=new Point(t);const e=180/Math.PI,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),n=Math.exp(-t.y/i);let a=Math.PI/2-2*Math.atan(n);for(let t,e=0,i=.1;e<15&&Math.abs(i)>1e-7;e++)t=s*Math.sin(a),t=((1-t)/(1+t))**(s/2),i=Math.PI/2-2*Math.atan(n*t)-a,a+=i;return new LatLng(a*e,t.x*e/i)}};var index={__proto__:null,LonLat:LonLat,Mercator:Mercator,SphericalMercator:SphericalMercator};class EPSG3395 extends Earth{static code="EPSG:3395";static projection=Mercator;static transformation=(()=>{const t=.5/(Math.PI*Mercator.R);return new Transformation(t,.5,-t,.5)})()}class EPSG4326 extends Earth{static code="EPSG:4326";static projection=LonLat;static transformation=new Transformation(1/180,1,-1/180,.5)}class Simple extends CRS{static projection=LonLat;static transformation=new Transformation(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){const i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)}static infinite=!0}CRS.Earth=Earth,CRS.EPSG3395=EPSG3395,CRS.EPSG3857=EPSG3857,CRS.EPSG900913=EPSG900913,CRS.EPSG4326=EPSG4326,CRS.Simple=Simple;class Layer extends Evented{static{this.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0})}addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[stamp(t)]=this,this}removeInteractiveTarget(t){return delete this._map._targets[stamp(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){const e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){const t=this.getEvents();e.on(t,this),this.once("remove",()=>e.off(t,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}}Map$1.include({addLayer(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");const e=stamp(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer(t){const e=stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer(t){return stamp(t)in this._layers},eachLayer(t,e){for(const i of Object.values(this._layers))t.call(e,i);return this},_addLayers(t){t=t?Array.isArray(t)?t:[t]:[];for(const e of t)this.addLayer(e)},_addZoomLimit(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit(t){const e=stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels(){let t=1/0,e=-1/0;const i=this._getZoomSpan();for(const i of Object.values(this._zoomBoundLayers)){const o=i.options;t=Math.min(t,o.minZoom??1/0),e=Math.max(e,o.maxZoom??-1/0)}
5this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});class LayerGroup extends Layer{initialize(t,e){setOptions(this,e),this._layers={};for(const e of t??[])this.addLayer(e)}addLayer(t){const e=this.getLayerId(t);return this._layers[e]=t,this._map?.addLayer(t),this}removeLayer(t){const e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this}hasLayer(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}invoke(t,...e){for(const i of Object.values(this._layers))i[t]?.apply(i,e);return this}onAdd(t){this.eachLayer(t.addLayer,t)}onRemove(t){this.eachLayer(t.removeLayer,t)}eachLayer(t,e){for(const i of Object.values(this._layers))t.call(e,i);return this}getLayer(t){return this._layers[t]}getLayers(){const t=[];return this.eachLayer(t.push,t),t}setZIndex(t){return this.invoke("setZIndex",t)}getLayerId(t){return stamp(t)}}class FeatureGroup extends LayerGroup{addLayer(t){return this.hasLayer(t)?this:(t.addEventParent(this),LayerGroup.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))}removeLayer(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),LayerGroup.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this}setStyle(t){return this.invoke("setStyle",t)}bringToFront(){return this.invoke("bringToFront")}bringToBack(){return this.invoke("bringToBack")}getBounds(){const t=new LatLngBounds;for(const e of Object.values(this._layers))t.extend(e.getBounds?e.getBounds():e.getLatLng());return t}}class Icon extends Class{static{this.setDefaultOptions({popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1})}initialize(t){setOptions(this,t)}createIcon(t){return this._createIcon("icon",t)}createShadow(t){return this._createIcon("shadow",t)}_createIcon(t,e){const i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}const o=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o}_setIconStyles(t,e){const i=this.options;let o=i[`${e}Size`];"number"==typeof o&&(o=[o,o]);const s=Point.validate(o)&&new Point(o),n="shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0),a=Point.validate(n)&&new Point(n);t.className=`leaflet-marker-${e} ${i.className||""}`,a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px"),s&&(t.style.width=`${s.x}px`,t.style.height=`${s.y}px`)}_createImg(t,e){return e??=document.createElement("img"),e.src=t,e}_getIconUrl(t){return Browser.retina&&this.options[`${t}RetinaUrl`]||this.options[`${t}Url`]}}class IconDefault extends Icon{static{this.setDefaultOptions({iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]})}_getIconUrl(t){IconDefault.imagePath||(IconDefault.imagePath=this._detectIconPath());const e=Icon.prototype._getIconUrl.call(this,t);return e?(this.options.imagePath||IconDefault.imagePath)+e:null}_stripUrl(t){const e=function(t,e,i){const o=e.exec(t);return o&&o[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)}_detectIconPath(){const t=create$1("div","leaflet-default-icon-path",document.body),e=this._stripUrl(getComputedStyle(t).backgroundImage);if(document.body.removeChild(t),e)return e;const i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}class MarkerDrag extends Handler{initialize(t){this._marker=t}addHooks(){const t=this._marker._icon;this._draggable||(this._draggable=new Draggable(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t.classList.add("leaflet-marker-draggable")}removeHooks(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon?.classList.remove("leaflet-marker-draggable")}moved(){return this._draggable?._moved}_adjustPan(t){const e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,n=getPosition(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),h=new Bounds(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s));if(!h.contains(n)){const s=new Point((Math.max(h.max.x,n.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,n.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,n.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,n.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(o);i.panBy(s,{animate:!1}),this._draggable._newPos._add(s),this._draggable._startPos._add(s),setPosition(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t))}}_onDragStart(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.(),this._marker.fire("movestart").fire("dragstart")}_onPreDrag(t){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t)))}_onDrag(t){const e=this._marker,i=e._shadow,o=getPosition(e._icon),s=e._map.layerPointToLatLng(o);i&&setPosition(i,o),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)}_onDragEnd(t){cancelAnimationFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}class Marker extends Layer{static{this.setDefaultOptions({icon:new IconDefault,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10})}initialize(t,e){setOptions(this,e),this._latlng=new LatLng(t)}onAdd(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()}onRemove(t){this.dragging?.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(t){const e=this._latlng;return this._latlng=new LatLng(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}setZIndexOffset(t){return this.options.zIndexOffset=t,this.update()}getIcon(){return this.options.icon}setIcon(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this}getElement(){return this._icon}update(){if(this._icon&&this._map){const t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this}_initIcon(){const t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon);let o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt??"")),i.classList.add(e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&on(i,"focus",this._panOnFocus,this);const s=t.icon.createShadow(this._shadow);let n=!1;s!==this._shadow&&(this._removeShadow(),n=!0),s&&(s.classList.add(e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&n&&this.getPane(t.shadowPane).appendChild(this._shadow)}_removeIcon(){this.options.riseOnHover&&this.off({pointerover:this._bringToFront,pointerout:this._resetZIndex}
5),this.options.autoPanOnFocus&&off(this._icon,"focus",this._panOnFocus,this),this._icon.remove(),this.removeInteractiveTarget(this._icon),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(t){this._icon&&setPosition(this._icon,t),this._shadow&&setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()}_updateZIndex(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)}_initInteraction(){if(this.options.interactive&&(this._icon.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._icon),MarkerDrag)){let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new MarkerDrag(this),t&&this.dragging.enable()}}setOpacity(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this}_updateOpacity(){const t=this.options.opacity;this._icon&&(this._icon.style.opacity=t),this._shadow&&(this._shadow.style.opacity=t)}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_panOnFocus(){const t=this._map;if(!t)return;const e=this.options.icon.options,i=e.iconSize?new Point(e.iconSize):new Point(0,0),o=e.iconAnchor?new Point(e.iconAnchor):new Point(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}_getPopupAnchor(){return this.options.icon.options.popupAnchor}_getTooltipAnchor(){return this.options.icon.options.tooltipAnchor}}class Path extends Layer{static{this.setDefaultOptions({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})}beforeAdd(t){this._renderer=t.getRenderer(this)}onAdd(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(t){return setOptions(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.hasOwn(t,"weight")&&this._updateBounds()),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}class CircleMarker extends Path{static{this.setDefaultOptions({fill:!0,radius:10})}initialize(t,e){setOptions(this,e),this._latlng=new LatLng(t),this._radius=this.options.radius}setLatLng(t){const e=this._latlng;return this._latlng=new LatLng(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(t){return this.options.radius=this._radius=t,this.redraw()}getRadius(){return this._radius}setStyle(t){const e=t?.radius??this._radius;return Path.prototype.setStyle.call(this,t),this.setRadius(e),this}_project(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()}_updateBounds(){const t=this._radius,e=this._radiusY??t,i=this._clickTolerance(),o=[t+i,e+i];this._pxBounds=new Bounds(this._point.subtract(o),this._point.add(o))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}class Circle extends CircleMarker{initialize(t,e){if(setOptions(this,e),this._latlng=new LatLng(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius}setRadius(t){return this._mRadius=t,this.redraw()}getRadius(){return this._mRadius}getBounds(){const t=[this._radius,this._radiusY??this._radius];return new LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))}setStyle=Path.prototype.setStyle;_project(){const t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===Earth.distance){const o=Math.PI/180,s=this._mRadius/Earth.R/o,n=i.project([e+s,t]),a=i.project([e-s,t]),r=n.add(a).divideBy(2),h=i.unproject(r).lat;let l=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;
5(isNaN(l)||0===l)&&(l=s/Math.cos(Math.PI/180*e)),this._point=r.subtract(i.getPixelOrigin()),this._radius=isNaN(l)?0:r.x-i.project([h,t-l]).x,this._radiusY=r.y-n.y}else{const t=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=Math.abs(this._point.x-i.latLngToLayerPoint(t).x)}this._updateBounds()}}class Polyline extends Path{static{this.setDefaultOptions({smoothFactor:1,noClip:!1})}initialize(t,e){setOptions(this,e),this._setLatLngs(t)}getLatLngs(){return this._latlngs}setLatLngs(t){return this._setLatLngs(t),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(t){t=new Point(t);let e,i,o=1/0,s=null;const n=_sqClosestPointOnSegment;for(const a of this._parts)for(let r=1,h=a.length;r<h;r++){e=a[r-1],i=a[r];const h=n(t,e,i,!0);h<o&&(o=h,s=n(t,e,i))}return s&&(s.distance=Math.sqrt(o)),s}getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polylineCenter(this._defaultShape(),this._map.options.crs)}getBounds(){return this._bounds}addLatLng(t,e){return e??=this._defaultShape(),t=new LatLng(t),e.push(t),this._bounds.extend(t),this.redraw()}_setLatLngs(t){this._bounds=new LatLngBounds,this._latlngs=this._convertLatLngs(t)}_defaultShape(){return isFlat(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(t){const e=[],i=isFlat(t);for(let o=0,s=t.length;o<s;o++)i?(e[o]=new LatLng(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e}_project(){const t=new Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())}_updateBounds(){const t=this._clickTolerance(),e=new Point(t,t);this._rawPxBounds&&(this._pxBounds=new Bounds([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))}_projectLatlngs(t,e,i){if(t[0]instanceof LatLng){const o=t.map(t=>this._map.latLngToLayerPoint(t));o.forEach(t=>i.extend(t)),e.push(o)}else t.forEach(t=>this._projectLatlngs(t,e,i))}_clipPoints(){const t=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(t))return;if(this.options.noClip)return void(this._parts=this._rings);const e=this._parts;let i,o,s,n,a,r,h;for(i=0,s=0,n=this._rings.length;i<n;i++)for(h=this._rings[i],o=0,a=h.length;o<a-1;o++)r=clipSegment(h[o],h[o+1],t,o,!0),r&&(e[s]??=[],e[s].push(r[0]),r[1]===h[o+1]&&o!==a-2||(e[s].push(r[1]),s++))}_simplifyPoints(){const t=this._parts,e=this.options.smoothFactor;for(let i=0,o=t.length;i<o;i++)t[i]=simplify(t[i],e)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_containsPoint(t,e){let i,o,s,n,a,r;const h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,n=this._parts.length;i<n;i++)for(r=this._parts[i],o=0,a=r.length,s=a-1;o<a;s=o++)if((e||0!==o)&&pointToSegmentDistance(t,r[s],r[o])<=h)return!0;return!1}}class Polygon extends Polyline{static{this.setDefaultOptions({fill:!0})}isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}
5getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polygonCenter(this._defaultShape(),this._map.options.crs)}_convertLatLngs(t){const e=Polyline.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof LatLng&&e[0].equals(e[i-1])&&e.pop(),e}_setLatLngs(t){Polyline.prototype._setLatLngs.call(this,t),isFlat(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return isFlat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let t=this._renderer._bounds;const e=this.options.weight,i=new Point(e,e);if(t=new Bounds(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(const e of this._rings){const i=clipPolygon(e,t,!0);i.length&&this._parts.push(i)}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e,i,o,s,n,a,r,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(e=this._parts[s],n=0,h=e.length,a=h-1;n<h;a=n++)i=e[n],o=e[a],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(l=!l);return l||Polyline.prototype._containsPoint.call(this,t,!0)}}class GeoJSON extends FeatureGroup{initialize(t,e){setOptions(this,e),this._layers={},t&&this.addData(t)}addData(t){const e=Array.isArray(t)?t:t.features;if(e){for(const t of e)(t.geometries||t.geometry||t.features||t.coordinates)&&this.addData(t);return this}const i=this.options;if(i.filter&&!i.filter(t))return this;const o=geometryToLayer(t,i);return o?(o.feature=asFeature(t),o.defaultOptions=o.options,this.resetStyle(o),i.onEachFeature&&i.onEachFeature(t,o),this.addLayer(o)):this}resetStyle(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(t){return this.eachLayer(e=>this._setLayerStyle(e,t))}_setLayerStyle(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}}function geometryToLayer(t,e){const i="Feature"===t.type?t.geometry:t,o=i?.coordinates,s=[],n=e?.pointToLayer,a=e?.coordsToLatLng??coordsToLatLng;let r,h;if(!o&&!i)return null;switch(i.type){case"Point":return r=a(o),_pointToLayer(n,t,r,e);case"MultiPoint":for(const i of o)r=a(i),s.push(_pointToLayer(n,t,r,e));return new FeatureGroup(s);case"LineString":case"MultiLineString":return h=coordsToLatLngs(o,"LineString"===i.type?0:1,a),new Polyline(h,e);case"Polygon":case"MultiPolygon":return h=coordsToLatLngs(o,"Polygon"===i.type?1:2,a),new Polygon(h,e);case"GeometryCollection":for(const o of i.geometries){const i=geometryToLayer({geometry:o,type:"Feature",properties:t.properties},e);i&&s.push(i)}return new FeatureGroup(s);case"FeatureCollection":for(const t of i.features){const i=geometryToLayer(t,e);i&&s.push(i)}return new FeatureGroup(s);default:throw new Error("Invalid GeoJSON object.")}}function _pointToLayer(t,e,i,o){return t?t(e,i):new Marker(i,o?.markersInheritOptions&&o)}function coordsToLatLng(t){return new LatLng(t[1],t[0],t[2])}function coordsToLatLngs(t,e,i){return t.map(t=>e?coordsToLatLngs(t,e-1,i):(i||coordsToLatLng)(t))}function latLngToCoords(t,e){return void 0!==(t=new LatLng(t)).alt?[formatNum(t.lng,e),formatNum
5(t.lat,e),formatNum(t.alt,e)]:[formatNum(t.lng,e),formatNum(t.lat,e)]}function latLngsToCoords(t,e,i,o){const s=t.map(t=>e?latLngsToCoords(t,isFlat(t)?0:e-1,i,o):latLngToCoords(t,o));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function getFeature(t,e){return t.feature?{...t.feature,geometry:e}:asFeature(e)}function asFeature(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}const PointToGeoJSON={toGeoJSON(t){return getFeature(this,{type:"Point",coordinates:latLngToCoords(this.getLatLng(),t)})}};Marker.include(PointToGeoJSON),Circle.include(PointToGeoJSON),CircleMarker.include(PointToGeoJSON),Polyline.include({toGeoJSON(t){const e=!isFlat(this._latlngs);return getFeature(this,{type:(e?"Multi":"")+"LineString",coordinates:latLngsToCoords(this._latlngs,e?1:0,!1,t)})}}),Polygon.include({toGeoJSON(t){const e=!isFlat(this._latlngs),i=e&&!isFlat(this._latlngs[0]);let o=latLngsToCoords(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),getFeature(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),LayerGroup.include({toMultiPoint(t){const e=[];return this.eachLayer(i=>{e.push(i.toGeoJSON(t).geometry.coordinates)}),getFeature(this,{type:"MultiPoint",coordinates:e})},toGeoJSON(t){const e=this.feature?.geometry?.type;if("MultiPoint"===e)return this.toMultiPoint(t);const i="GeometryCollection"===e,o=[];return this.eachLayer(e=>{if(e.toGeoJSON){const s=e.toGeoJSON(t);if(i)o.push(s.geometry);else{const t=asFeature(s);"FeatureCollection"===t.type?o.push.apply(o,t.features):o.push(t)}}}),i?getFeature(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});class BlanketOverlay extends Layer{static{this.setDefaultOptions({padding:.1,continuous:!1})}initialize(t){setOptions(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){const t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){const i=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),n=o.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));setTransform(this._container,n,i)}_onMoveEnd(t){const e=this.options.padding,i=this._map.getSize(),o=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new Bounds(o,o.add(i.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=create$1("div")}_destroyContainer(){off(this._container),this._container.remove(),delete this._container}_resizeContainer(){const t=this.options.padding,e=this._map.getSize().multiplyBy(1+2*t).round();return this._container.style.width=`${e.x}px`,this._container.style.height=`${e.y}px`,e}_onZoomEnd(){}_onViewReset(){}_onSettled(){}}class ImageOverlay extends Layer{static{this.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"})}initialize(t,e,i){this._url=t,this._bounds=new LatLngBounds(e),setOptions(this,i)}onAdd(){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(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&toFront(this._image),this}bringToBack(){return this._map&&toBack(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new LatLngBounds(t),this._map&&this._reset(),this}getEvents(){const t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){const t="IMG"===this._url.tagName,e=this._image=t?this._url:create$1("img");e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...splitWords(this.options.className)),e.onselectstart=falseFn,e.onpointermove=falseFn,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;setTransform(this._image,i,e)}_reset(){const t=this._image,e=new Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();setPosition(t,e.min),t.style.width=`${i.x}px`,t.style.height=`${i.y}px`}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");const t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}}class VideoOverlay extends ImageOverlay{static{this.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
5ine:!0})}_initImage(){const t="VIDEO"===this._url.tagName,e=this._image=t?this._url:create$1("video");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...splitWords(this.options.className)),on(e,"pointerdown",t=>{e.controls&&stopPropagation(t)}),e.onloadeddata=this.fire.bind(this,"load"),t){const t=e.getElementsByTagName("source"),i=t.map(t=>t.src);return void(this._url=t.length>0?i:[e.src])}Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.controls=!!this.options.controls,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(const t of this._url){const i=create$1("source");i.src=t,e.appendChild(i)}}}class SVGOverlay extends ImageOverlay{_initImage(){const t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(...splitWords(this.options.className)),t.onselectstart=falseFn,t.onpointermove=falseFn}}class DivOverlay extends Layer{static{this.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""})}initialize(t,e){t instanceof LatLng||Array.isArray(t)?(this._latlng=new LatLng(t),setOptions(this,e)):(setOptions(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._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(t){return this._latlng=new LatLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,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(){const t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&toFront(this._container),this}bringToBack(){return this._map&&toBack(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof FeatureGroup){e=null;for(const t of Object.values(this._source._layers))if(t._map){e=t;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;const t=this._contentNode,e="function"==typeof this._content?this._content(this._source??this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}_updatePosition(){if(!this._map)return;const t=this._map.latLngToLayerPoint(this._latlng),e=this._getAnchor();let i=new Point(this.options.offset);this._zoomAnimated?setPosition(this._container,t.add(e)):i=i.add(t).add(e);const o=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=`${o}px`,this._container.style.left=`${s}px`}_getAnchor(){return[0,0]}}Map$1.include({_initOverlay(t,e,i,o){let s=e;return s instanceof t||(s=new t(o).setContent(e)),i&&s.setLatLng(i),s}}),Layer.include({_initOverlay(t,e,i,o){let s=i;return s instanceof t?(setOptions(s,o),s._source=this):(s=e&&!o?e:new t(o,this),s.setContent(i)),s}});class Popup extends DivOverlay{static{this.setDefaultOptions({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})}openOn(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,DivOverlay.prototype.openOn.call(this,t)}onAdd(t){DivOverlay.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this}
5,!0),this._source instanceof Path||this._source.on("preclick",stopPropagation))}onRemove(t){DivOverlay.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Path||this._source.off("preclick",stopPropagation))}getEvents(){const t=DivOverlay.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){const t="leaflet-popup",e=this._container=create$1("div",`${t} ${this.options.className||""} leaflet-zoom-animated`),i=this._wrapper=create$1("div",`${t}-content-wrapper`,e);if(this._contentNode=create$1("div",`${t}-content`,i),disableClickPropagation(e),disableScrollPropagation(this._contentNode),on(e,"contextmenu",stopPropagation),this._tipContainer=create$1("div",`${t}-tip-container`,e),this._tip=create$1("div",`${t}-tip`,this._tipContainer),this.options.closeButton){const i=this._closeButton=create$1("a",`${t}-close-button`,e);i.setAttribute("role","button"),i.setAttribute("aria-label",this.options.closeButtonLabel),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',on(i,"click",t=>{preventDefault(t),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(t=>{this._map&&(this._containerWidth=t[0]?.contentRect?.width,this._containerHeight=t[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){const t=this._contentNode,e=t.style;e.maxWidth=`${this.options.maxWidth}px`,e.minWidth=`${this.options.minWidth}px`;const i=this._containerHeight??t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&i>o?(e.height=`${o}px`,t.classList.add(s)):t.classList.remove(s),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();setPosition(this._container,e.add(i))}_adjustPan(){if(!this.options.autoPan)return;if(this._map._panAnim?.stop(),this._autopanning)return void(this._autopanning=!1);const t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,i=this._containerHeight+e,o=this._containerWidth,s=new Point(this._containerLeft,-i-this._containerBottom);s._add(getPosition(this._container));const n=t.layerPointToContainerPoint(s),a=new Point(this.options.autoPanPadding),r=new Point(this.options.autoPanPaddingTopLeft??a),h=new Point(this.options.autoPanPaddingBottomRight??a),l=t.getSize();let c=0,d=0;n.x+o+h.x>l.x&&(c=n.x+o-l.x+h.x),n.x-c-r.x<0&&(c=n.x-r.x),n.y+i+h.y>l.y&&(d=n.y+i-l.y+h.y),n.y-d-r.y<0&&(d=n.y-r.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,d]))}_getAnchor(){return new Point(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}Map$1.mergeOptions({closePopupOnClick:!0}),Map$1.include({openPopup(t,e,i){return this._initOverlay(Popup,t,e,i).openOn(this),this},closePopup(t){return t=arguments.length?t:this._popup,t?.close(),this}}),Layer.include({bindPopup(t,e){return this._popup=this._initOverlay(Popup,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup(t){return this._popup&&(this instanceof FeatureGroup||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&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}
5,setPopupContent(t){return this._popup?.setContent(t),this},getPopup(){return this._popup},_openPopup(t){if(!this._popup||!this._map)return;stop(t);const e=t.propagatedFrom??t.target;this._popup._source!==e||e instanceof Path?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)},_movePopup(t){this._popup.setLatLng(t.latlng)},_onKeyPress(t){"Enter"===t.originalEvent.code&&this._openPopup(t)}});class Tooltip extends DivOverlay{static{this.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9})}onAdd(t){DivOverlay.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){DivOverlay.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){const t=DivOverlay.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){const t=`leaflet-tooltip ${this.options.className||""} leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`;this._contentNode=this._container=create$1("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id",`leaflet-tooltip-${stamp(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,i,o=this.options.direction;const s=this._map,n=this._container,a=s.latLngToContainerPoint(s.getCenter()),r=s.layerPointToContainerPoint(t),h=n.offsetWidth,l=n.offsetHeight,c=new Point(this.options.offset),d=this._getAnchor();"top"===o?(e=h/2,i=l):"bottom"===o?(e=h/2,i=0):"center"===o?(e=h/2,i=l/2):"right"===o?(e=0,i=l/2):"left"===o?(e=h,i=l/2):r.x<a.x?(o="right",e=0,i=l/2):(o="left",e=h+2*(c.x+d.x),i=l/2),t=t.subtract(new Point(e,i,!0)).add(c).add(d),n.classList.remove("leaflet-tooltip-right","leaflet-tooltip-left","leaflet-tooltip-top","leaflet-tooltip-bottom"),n.classList.add(`leaflet-tooltip-${o}`),setPosition(n,t)}_updatePosition(){const t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)}setOpacity(t){this.options.opacity=t,this._container&&(this._container.style.opacity=t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)}_getAnchor(){return new Point(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}Map$1.include({openTooltip(t,e,i){return this._initOverlay(Tooltip,t,e,i).openOn(this),this},closeTooltip(t){return t.close(),this}}),Layer.include({bindTooltip(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Tooltip,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions(t){if(!t&&this._tooltipHandlersAdded)return;const e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.pointerover=this._openTooltip,i.pointerout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners(t):i.add=()=>this._addFocusListeners(t)),this._tooltip.options.sticky&&(i.pointermove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t},openTooltip(t){return this._tooltip&&(this instanceof FeatureGroup||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(t){return this._tooltip?.setContent(t),this},getTooltip(){return this._tooltip},_addFocusListeners(t){this.getElement?this._addFocusListenersOnLayer(this,t):this.eachLayer&&this.eachLayer(e=>this._addFocusListenersOnLayer(e,t),this)},_addFocusListenersOnLayer(t,e){const i="function"==typeof t.getElement&&t.getElement();if(i){const o=e?"off":"on";
5e||(i._leaflet_focus_handler&&off(i,"focus",i._leaflet_focus_handler,this),i._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=t,this.openTooltip())}),i._leaflet_focus_handler&&DomEvent[o](i,"focus",i._leaflet_focus_handler,this),DomEvent[o](i,"blur",this.closeTooltip,this),e&&delete i._leaflet_focus_handler}},_setAriaDescribedByOnLayer(t){const e="function"==typeof t.getElement&&t.getElement();e?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(t){this._tooltip&&this._map&&(this._map.dragging?.moving()?"add"!==t.type||this._moveEndOpensTooltip||(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(t)})):(this._tooltip._source=t.propagatedFrom??t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip(t){let e,i,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.pointerEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(o)}});class DivIcon extends Icon{static{this.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"})}createIcon(t){const e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(e.replaceChildren(),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){const t=new Point(i.bgPos);e.style.backgroundPosition=`${-t.x}px ${-t.y}px`}return this._setIconStyles(e,"icon"),e}createShadow(){return null}}Icon.Default=IconDefault;class GridLayer extends Layer{static{this.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:Browser.mobile,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})}initialize(t){setOptions(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(toFront(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(toBack(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){if(this._map){this._removeAllTiles();const t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this}getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){const t=this.options.tileSize;return t instanceof Point?t:new Point(t,t)}_updateZIndex(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){const e=this.getPane().children;let i=-t(-1/0,1/0);for(const o of e){const e=o.style.zIndex;o!==this._container&&e&&(i=t(i,+e))}isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())}_updateOpacity(){if(!this._map)return;this._container.style.opacity=this.options.opacity;const t=+new Date;let e=!1,i=!1;for(const o of Object.values(this._tiles??{})){if(!o.current||!o.loaded)continue;const s=Math.min(1,(t-o.loaded)/200);o.el.style.opacity=s,s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}i&&!this._noPrune&&this._pruneTiles(),e&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}_onOpaqueTile(){}_initContainer(){this._container||(this._container=create$1("div",`leaflet-layer ${this.options.className??""}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){const t=this._tileZoom,e=this.options.maxZoom;if(void 0===t)return;for(let i of Object.keys(this._levels))i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(this._levels[i].el.remove(),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);let i=this._levels[t];const o=this._map;
5return i||(i=this._levels[t]={},i.el=create$1("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),falseFn(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(!this._map)return;const t=this._map.getZoom();if(t>this.options.maxZoom||t<this.options.minZoom)this._removeAllTiles();else{for(const t of Object.values(this._tiles))t.retain=t.current;for(const t of Object.values(this._tiles))if(t.current&&!t.active){const e=t.coords;this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2)}for(const[t,e]of Object.entries(this._tiles))e.retain||this._removeTile(t)}}_removeTilesAtZoom(t){for(const[e,i]of Object.entries(this._tiles))i.coords.z===t&&this._removeTile(e)}_removeAllTiles(){for(const t of Object.keys(this._tiles))this._removeTile(t)}_invalidateAll(){for(const t of Object.keys(this._levels))this._levels[t].el.remove(),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}_retainParent(t,e,i,o){const s=Math.floor(t/2),n=Math.floor(e/2),a=i-1,r=new Point(+s,+n);r.z=+a;const h=this._tileCoordsToKey(r),l=this._tiles[h];return l?.active?(l.retain=!0,!0):(l?.loaded&&(l.retain=!0),a>o&&this._retainParent(s,n,a,o))}_retainChildren(t,e,i,o){for(let s=2*t;s<2*t+2;s++)for(let t=2*e;t<2*e+2;t++){const e=new Point(s,t);e.z=i+1;const n=this._tileCoordsToKey(e),a=this._tiles[n];a?.active?a.retain=!0:(a?.loaded&&(a.retain=!0),i+1<o&&this._retainChildren(s,t,i+1,o))}}_resetView(t){const e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)}_animateZoom(t){this._setView(t.center,t.zoom,!0,t.noUpdate)}_clampZoom(t){const e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t}_setView(t,e,i,o){let s=Math.round(e);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s);const n=this.options.updateWhenZooming&&s!==this._tileZoom;o&&!n||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)}_setZoomTransforms(t,e){for(const i of Object.values(this._levels))this._setZoomTransform(i,t,e)}_setZoomTransform(t,e,i){const o=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();setTransform(t.el,s,o)}_resetGrid(){const t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]}_onMoveEnd(){this._map&&!this._map._animatingZoom&&this._update()}_getTiledPixelBounds(t){const e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),n=e.getSize().divideBy(2*o);return new Bounds(s.subtract(n),s.add(n))}_update(t){const e=this._map;if(!e)return;const i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0===this._tileZoom)return;const o=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(o),n=s.getCenter(),a=[],r=this.options.keepBuffer,h=new Bounds(s.getBottomLeft().subtract([r,-r]),s.getTopRight().add([r,-r]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(const t of Object.values(this._tiles)){const e=t.coords;e.z===this._tileZoom&&h.contains(new Point(e.x,e.y))||(t.current=!1)}if(Math.abs(i-this._tileZoom)>
51)this._setView(t,i);else{for(let t=s.min.y;t<=s.max.y;t++)for(let e=s.min.x;e<=s.max.x;e++){const i=new Point(e,t);if(i.z=this._tileZoom,!this._isValidTile(i))continue;const o=this._tiles[this._tileCoordsToKey(i)];o?o.current=!0:a.push(i)}if(a.sort((t,e)=>t.distanceTo(n)-e.distanceTo(n)),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));const t=document.createDocumentFragment();for(const e of a)this._addTile(e,t);this._level.el.appendChild(t)}}}_isValidTile(t){const e=this._map.options.crs;if(!e.infinite){const i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;const i=this._tileCoordsToBounds(t);return new LatLngBounds(this.options.bounds).overlaps(i)}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){const e=this._map,i=this.getTileSize(),o=t.scaleBy(i),s=o.add(i);return[e.unproject(o,t.z),e.unproject(s,t.z)]}_tileCoordsToBounds(t){const e=this._tileCoordsToNwSe(t);let i=new LatLngBounds(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i}_tileCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`}_keyToTileCoords(t){const e=t.split(":"),i=new Point(+e[0],+e[1]);return i.z=+e[2],i}_removeTile(t){const e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");const e=this.getTileSize();t.style.width=`${e.x}px`,t.style.height=`${e.y}px`,t.onselectstart=falseFn,t.onpointermove=falseFn}_addTile(t,e){const i=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(s),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,s)),setPosition(s,i),this._tiles[o]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})}_tileReady(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});const o=this._tileCoordsToKey(t);(i=this._tiles[o])&&(i.loaded=+new Date,this._map._fadeAnimated?(i.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(i.active=!0,this._pruneTiles()),e||(i.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){const e=new Point(this._wrapX?wrapNum(t.x,this._wrapX):t.x,this._wrapY?wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){const e=this.getTileSize();return new Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}}class TileLayer extends GridLayer{static{this.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1})}initialize(t,e){if(this._url=t,null===(e=setOptions(this,e)).attribution&&URL.canParse(t)){const i=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(t=>i.endsWith(t))&&(e.attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors')}e.detectRetina&&Browser.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){const i=document.createElement("img");return on(i,"load",this._tileOnLoad.bind(this,e,i)),on(i,"error",this._tileOnError.bind(this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i}getTileUrl(t){const e=Object.create(this.options);if(Object.assign(e,{r:Browser.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){const i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return template(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,i){const o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;const e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset}_getSubdomain(t){const e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]}
5_abortLoading(){let t,e;for(t of Object.keys(this._tiles))if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=falseFn,e.onerror=falseFn,!e.complete)){e.src=emptyImageUrl;const i=this._tiles[t].coords;e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}}_removeTile(t){const e=this._tiles[t];if(e)return e.el.setAttribute("src",emptyImageUrl),GridLayer.prototype._removeTile.call(this,t)}_tileReady(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==emptyImageUrl))return GridLayer.prototype._tileReady.call(this,t,e,i)}_clampZoom(t){return Math.round(GridLayer.prototype._clampZoom.call(this,t))}}class TileLayerWMS extends TileLayer{static{this.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},this.setDefaultOptions({crs:null,uppercase:!1})}initialize(t,e){this._url=t;const i={...this.defaultWmsParams};for(const t of Object.keys(e))t in this.options||(i[t]=e[t]);const o=(e=setOptions(this,e)).detectRetina&&Browser.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);const e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,TileLayer.prototype.onAdd.call(this,t)}getTileUrl(t){const e=this._tileCoordsToNwSe(t),i=this._crs,o=new Bounds(i.project(e[0]),i.project(e[1])),s=o.min,n=o.max,a=(this._wmsVersion>=1.3&&this._crs===EPSG4326?[s.y,s.x,n.y,n.x]:[s.x,s.y,n.x,n.y]).join(","),r=new URL(TileLayer.prototype.getTileUrl.call(this,t));for(const[t,e]of Object.entries({...this.wmsParams,bbox:a}))r.searchParams.append(this.options.uppercase?t.toUpperCase():t,e);return r.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}}TileLayer.WMS=TileLayerWMS;class Renderer extends BlanketOverlay{initialize(t){setOptions(this,{...t,continuous:!1}),stamp(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(const t of Object.values(this._layers))t._project()}_updatePaths(){for(const t of Object.values(this._layers))t._update()}_onViewReset(){for(const t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}class Canvas extends Renderer{static{this.setDefaultOptions({tolerance:0})}getEvents(){const t=Renderer.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){Renderer.prototype.onAdd.call(this,t),this._draw()}onRemove(){Renderer.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){const t=this._container=document.createElement("canvas");on(t,"pointermove",this._onPointerMove,this),on(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),on(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,Renderer.prototype._destroyContainer.call(this)}_resizeContainer(){const t=Renderer.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(const t of Object.values(this._layers))t._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=this._ctxScale;this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update")}_reset(){Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t),this._layers[stamp(t)]=t;const e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){const e=t._order,i=e.next,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[stamp(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){if("string"==typeof t.options.dashArray){const e=t.options.dashArray.split(/[, ]+/);t.options._dashArray=e.map(t=>Number(t)).filter(t=>!isNaN(t))}else t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){if(t._pxBounds){const e=(t.options.weight??0)+1;this._redrawBounds??=new Bounds,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){const t=this._redrawBounds;if(t){const e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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(
5)}_draw(){let t;const e=this._redrawBounds;if(this._ctx.save(),e){const t=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,t.x,t.y),this._ctx.clip()}this._drawing=!0;for(let i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(t,e){if(!this._drawing)return;const i=t._parts,o=this._ctx;i.length&&(o.beginPath(),i.forEach(t=>{t.forEach((t,e)=>{o[e?"lineTo":"moveTo"](t.x,t.y)}),e&&o.closePath()}),this._fillStroke(o,t))}_updateCircle(t){if(!this._drawing||t._empty())return;const e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,o,0,2*Math.PI,!1),1!==s&&i.restore(),this._fillStroke(i,t)}_fillStroke(t,e){const i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor??i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&(t.lineDashOffset=Number(i.dashOffset??0),t.setLineDash(i._dashArray??[])),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())}_onClick(t){const e=this._map.pointerEventToLayerPoint(t);let i,o;for(let s=this._drawFirst;s;s=s.next)i=s.layer,i.options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(o=i);this._fireEvent(!!o&&[o],t)}_onPointerMove(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;const e=this._map.pointerEventToLayerPoint(t);this._handlePointerHover(t,e)}_handlePointerOut(t){const e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,e){if(this._pointerHoverThrottled)return;let i,o;for(let t=this._drawFirst;t;t=t.next)i=t.layer,i.options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handlePointerOut(t),o&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([o],t,"pointerover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}_fireEvent(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)}_bringToFront(t){const e=t._order;if(!e)return;const i=e.next,o=e.prev;i&&(i.prev=o,o?o.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}_bringToBack(t){const e=t._order;if(!e)return;const i=e.next,o=e.prev;o&&(o.next=i,i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}function svgCreate(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function pointsToPath(t,e){return t.flatMap(t=>[...t.map((t,e)=>`${(e?"L":"M")+t.x} ${t.y}`),e?"z":""]).join("")||"M0 0"}const create=svgCreate;class SVG extends Renderer{_initContainer(){this._container=create("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=create("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){Renderer.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){const t=Renderer.prototype._resizeContainer.call(this);this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=t.getSize();this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}_initPath(t){const e=t._path=create("path");t.options.className&&e.classList.add(...splitWords(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[stamp(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[stamp(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){const e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,pointsToPath(t._parts,e))}_updateCircle(t){const e=t._point,i=Math.max(Math.round(t._radius),1),o=`a${i},${Math.max(Math.round(t._radiusY),1)||i} 0 1,0 `,s=t._empty()?"M0 0":`M${e.x-i},${e.y}${o}${2*i},0 ${o}${2*-i},0 `;this._setPath(t,s)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){toFront(t._path)}_bringToBack(t){toBack(t._path)}}Map$1.include({getRenderer(t){let e=t.options.renderer??this._getPaneRenderer(t.options.pane)??this.options.renderer??this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer(t){if("overlayPane"===t||void 0===t)return;let e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer(t){return this.options.preferCanvas&&new Canvas(t)||new SVG(t)}});class Rectangle extends Polygon{initialize(t,e){Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}
5_boundsToLatLngs(t){return[(t=new LatLngBounds(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}SVG.create=create,SVG.pointsToPath=pointsToPath,GeoJSON.geometryToLayer=geometryToLayer,GeoJSON.coordsToLatLng=coordsToLatLng,GeoJSON.coordsToLatLngs=coordsToLatLngs,GeoJSON.latLngToCoords=latLngToCoords,GeoJSON.latLngsToCoords=latLngsToCoords,GeoJSON.getFeature=getFeature,GeoJSON.asFeature=asFeature,Map$1.mergeOptions({boxZoom:!0});class BoxZoom extends Handler{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){on(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){off(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||0!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),disableTextSelection(),disableImageDrag(),this._startPoint=this._map.pointerEventToContainerPoint(t),on(document,{contextmenu:stop,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=create$1("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);const e=new Bounds(this._point,this._startPoint),i=e.getSize();setPosition(this._box,e.min),this._box.style.width=`${i.x}px`,this._box.style.height=`${i.y}px`}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),enableTextSelection(),enableImageDrag(),off(document,{contextmenu:stop,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){if(0!==t.button)return;if(this._finish(),!this._moved)return;this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0);const e=new LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}_onKeyDown(t){"Escape"===t.code&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}Map$1.addInitHook("addHandler","boxZoom",BoxZoom),Map$1.mergeOptions({doubleClickZoom:!0});class DoubleClickZoom extends Handler{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){const e=this._map,i=e.getZoom(),o=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-o:i+o;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}}Map$1.addInitHook("addHandler","doubleClickZoom",DoubleClickZoom),Map$1.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Drag extends Handler{addHooks(){if(!this._draggable){const t=this._map;this._draggable=new Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,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}_onDragStart(){const t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){const t=new LatLngBounds(this._map.options.maxBounds);this._offsetLimit=new Bounds(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])}_onDrag(t){if(this._map.options.inertia){const t=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(t),this._prunePositions(t)}this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()}_onZoomEnd(){const t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;const t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}_onPreDragWrap(){const t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,s=(o-e+i)%t+e-i,n=(o+e+i)%t-e-i,a=Math.abs(s+i)<Math.abs(n+i)?s:n;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a}_onDragEnd(t){const e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);const t=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,s=i.easeLinearity,n=t.multiplyBy(s/o),a=n.distanceTo([0,0]),r=Math.min(i.inertiaMaxSpeed,a),h=n.multiplyBy(r/a),l=r/(i.inertiaDeceleration*s);let c=h.multiplyBy(-l/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),requestAnimationFrame(()=>{e.panBy(c,{duration:l,easeLinearity:s,noMoveStart:!0,animate:!0})}
5)):e.fire("moveend")}}}Map$1.addInitHook("addHandler","dragging",Drag),Map$1.mergeOptions({keyboard:!0,keyboardPanDelta:80});class Keyboard extends Handler{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){const t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(Keyboard.keyCodes).flat().join(" "),on(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),off(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){if(this._focused)return;const t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,i)}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){const e=this._panKeys={},i=Keyboard.keyCodes;for(const o of i.left)e[o]=[-1*t,0];for(const o of i.right)e[o]=[t,0];for(const o of i.down)e[o]=[0,t];for(const o of i.up)e[o]=[0,-1*t]}_setZoomDelta(t){const e=this._zoomKeys={},i=Keyboard.keyCodes;for(const o of i.zoomIn)e[o]=t;for(const o of i.zoomOut)e[o]=-t}_addHooks(){on(document,"keydown",this._onKeyDown,this)}_removeHooks(){off(document,"keydown",this._onKeyDown,this)}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.code,i=this._map;let o;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=new Point(o).multiplyBy(3)),i.options.maxBounds&&(o=i._limitOffset(new Point(o),i.options.maxBounds)),i.options.worldCopyJump){const t=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(o)));i.panTo(t)}else i.panBy(o)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if("Escape"!==e||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}stop(t)}}Map$1.addInitHook("addHandler","keyboard",Keyboard),Map$1.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class ScrollWheelZoom extends Handler{addHooks(){on(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){off(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){const e=getWheelDelta(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);const o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),o),stop(t)}_performZoom(){const t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap??0;t._stop();const o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,n=i?Math.ceil(s/i)*i:s,a=t._limitZoom(e+(this._delta>0?n:-n))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}}Map$1.addInitHook("addHandler","scrollWheelZoom",ScrollWheelZoom);const tapHoldDelay=600;Map$1.mergeOptions({tapHold:Browser.safari&&Browser.mobile,tapTolerance:15});class TapHold extends Handler{addHooks(){on(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){off(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),1===getPointers().length&&"mouse"!==t.pointerType&&(this._startPos=this._newPos=new Point(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(on(document,"pointerup",preventDefault),on(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},600),on(document,"pointerup pointercancel contextmenu",this._cancel,this),on(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){off(document,"pointerup",preventDefault),off(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),off(document,"pointerup pointercancel contextmenu",this._cancel,this),off(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new Point(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){const i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}}Map$1.addInitHook("addHandler","tapHold",TapHold),Map$1.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class PinchZoom extends Handler{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),on(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),off(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){const e=this._map,i=getPointers();if(2!==i.length||e._animatingZoom||this._zooming)return;const o=e.pointerEventToContainerPoint(i[0]),s=e.pointerEventToContainerPoint(i[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.pinchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(s)._divideBy(2))),this._startDist=o.distanceTo(s),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),on(document,"pointermove",this._onPointerMove,this),on(document,"pointerup pointercancel",this._onPointerEnd,this),preventDefault(t)}_onPointerMove(t){const e=getPointers();if(2!==e.length||!this._zooming)return;const i=this._map,o=i.pointerEventToContainerPoint(e[0]),s=i.pointerEventToContainerPoint(e[1]),n=o.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(n,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&n<1||this._zoom>i.getMaxZoom()&&n>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.pinchZoom){if(this._center=this._startLatLng,1===n)return}else{const t=o._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===n&&0===t.x&&0===t.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(t),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);const a=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(a.bind(this)),preventDefault(t)}_onPointerEnd(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimationFrame(this._animRequest),off(document,"pointermove",this._onPointerMove,this),off(document,"pointerup pointercancel",this._onPointerEnd,this),this._map.options.zoomAnimation?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))):this._zooming=!1}}Map$1.addInitHook("addHandler","pinchZoom",PinchZoom),Map$1.addInitHook(function(){this.touchZoom=this.pinchZoom,void 0!==this.options.touchZoom&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),Map$1.BoxZoom=BoxZoom,Map$1.DoubleClickZoom=DoubleClickZoom,Map$1.Drag=Drag,Map$1.Keyboard=Keyboard,Map$1.ScrollWheelZoom=ScrollWheelZoom,Map$1.TapHold=TapHold,Map$1.PinchZoom=PinchZo
5om,Map$1.TouchZoom=PinchZoom;const version="2.0.0-alpha.1";var L={__proto__:null,BlanketOverlay:BlanketOverlay,Bounds:Bounds,Browser:Browser,CRS:CRS,Canvas:Canvas,Circle:Circle,CircleMarker:CircleMarker,Class:Class,Control:Control,DivIcon:DivIcon,DivOverlay:DivOverlay,DomEvent:DomEvent,DomUtil:DomUtil,Draggable:Draggable,Evented:Evented,FeatureGroup:FeatureGroup,GeoJSON:GeoJSON,GridLayer:GridLayer,Handler:Handler,Icon:Icon,ImageOverlay:ImageOverlay,LatLng:LatLng,LatLngBounds:LatLngBounds,Layer:Layer,LayerGroup:LayerGroup,LeafletMap:LeafletMap,LineUtil:LineUtil,Map:Map$1,Marker:Marker,Path:Path,Point:Point,PolyUtil:PolyUtil,Polygon:Polygon,Polyline:Polyline,Popup:Popup,PosAnimation:PosAnimation,Projection:index,Rectangle:Rectangle,Renderer:Renderer,SVG:SVG,SVGOverlay:SVGOverlay,TileLayer:TileLayer,Tooltip:Tooltip,Transformation:Transformation,Util:Util,VideoOverlay:VideoOverlay,version:version};const oldL=getGlobalObject().L;function getGlobalObject(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}getGlobalObject().L=L,getGlobalObject().L.noConflict=function(){return getGlobalObject().L=oldL,this};export{BlanketOverlay,Bounds,Browser,CRS,Canvas,Circle,CircleMarker,Class,Control,DivIcon,DivOverlay,DomEvent,DomUtil,Draggable,Evented,FeatureGroup,GeoJSON,GridLayer,Handler,Icon,ImageOverlay,LatLng,LatLngBounds,Layer,LayerGroup,LeafletMap,LineUtil,Map$1 as Map,Marker,Path,Point,PolyUtil,Polygon,Polyline,Popup,PosAnimation,index as Projection,Rectangle,Renderer,SVG,SVGOverlay,TileLayer,Tooltip,Transformation,Util,VideoOverlay,L as default,version}; 6//# sourceMappingURL=leaflet-src.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.