gta-v-map 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/components/gta-v-map.d.ts +126 -0
- package/dist/components/gta-v-map.d.ts.map +1 -0
- package/dist/components/gta-v-map.styles.d.ts +3 -0
- package/dist/components/gta-v-map.styles.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/constants/crs.constants.d.ts +9 -0
- package/dist/constants/crs.constants.d.ts.map +1 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/map.constants.d.ts +14 -0
- package/dist/constants/map.constants.d.ts.map +1 -0
- package/dist/constants/tile.constants.d.ts +8 -0
- package/dist/constants/tile.constants.d.ts.map +1 -0
- package/dist/constants/water.constants.d.ts +5 -0
- package/dist/constants/water.constants.d.ts.map +1 -0
- package/dist/gta-v-map.es.js +8544 -0
- package/dist/gta-v-map.umd.js +59 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/types/event.types.d.ts +28 -0
- package/dist/types/event.types.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/map.types.d.ts +13 -0
- package/dist/types/map.types.d.ts.map +1 -0
- package/dist/types/marker.types.d.ts +27 -0
- package/dist/types/marker.types.d.ts.map +1 -0
- package/dist/types/shape.types.d.ts +44 -0
- package/dist/types/shape.types.d.ts.map +1 -0
- package/dist/utils/crs.utils.d.ts +8 -0
- package/dist/utils/crs.utils.d.ts.map +1 -0
- package/dist/utils/id.utils.d.ts +3 -0
- package/dist/utils/id.utils.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/marker.utils.d.ts +25 -0
- package/dist/utils/marker.utils.d.ts.map +1 -0
- package/dist/utils/shape.utils.d.ts +35 -0
- package/dist/utils/shape.utils.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
(function(A,St){typeof exports=="object"&&typeof module<"u"?St(exports):typeof define=="function"&&define.amd?define(["exports"],St):(A=typeof globalThis<"u"?globalThis:A||self,St(A.GtaVMap={}))})(this,function(A){"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/var yn;const St=globalThis,Ke=St.ShadowRoot&&(St.ShadyCSS===void 0||St.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ye=Symbol(),Vi=new WeakMap;let ji=class{constructor(r,h,c){if(this._$cssResult$=!0,c!==Ye)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=h}get styleSheet(){let r=this.o;const h=this.t;if(Ke&&r===void 0){const c=h!==void 0&&h.length===1;c&&(r=Vi.get(h)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),c&&Vi.set(h,r))}return r}toString(){return this.cssText}};const Xe=p=>new ji(typeof p=="string"?p:p+"",void 0,Ye),Io=(p,...r)=>{const h=p.length===1?p[0]:r.reduce((c,f,o)=>c+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(f)+p[o+1],p[0]);return new ji(h,p,Ye)},Bo=(p,r)=>{if(Ke)p.adoptedStyleSheets=r.map(h=>h instanceof CSSStyleSheet?h:h.styleSheet);else for(const h of r){const c=document.createElement("style"),f=St.litNonce;f!==void 0&&c.setAttribute("nonce",f),c.textContent=h.cssText,p.appendChild(c)}},qi=Ke?p=>p:p=>p instanceof CSSStyleSheet?(r=>{let h="";for(const c of r.cssRules)h+=c.cssText;return Xe(h)})(p):p;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const{is:No,defineProperty:Ro,getOwnPropertyDescriptor:Do,getOwnPropertyNames:Uo,getOwnPropertySymbols:Ho,getPrototypeOf:Go}=Object,kt=globalThis,Ki=kt.trustedTypes,Fo=Ki?Ki.emptyScript:"",Je=kt.reactiveElementPolyfillSupport,ie=(p,r)=>p,Te={toAttribute(p,r){switch(r){case Boolean:p=p?Fo:null;break;case Object:case Array:p=p==null?p:JSON.stringify(p)}return p},fromAttribute(p,r){let h=p;switch(r){case Boolean:h=p!==null;break;case Number:h=p===null?null:Number(p);break;case Object:case Array:try{h=JSON.parse(p)}catch{h=null}}return h}},Qe=(p,r)=>!No(p,r),Yi={attribute:!0,type:String,converter:Te,reflect:!1,useDefault:!1,hasChanged:Qe};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),kt.litPropertyMetadata??(kt.litPropertyMetadata=new WeakMap);let $t=class extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??(this.l=[])).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,h=Yi){if(h.state&&(h.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(r)&&((h=Object.create(h)).wrapped=!0),this.elementProperties.set(r,h),!h.noAccessor){const c=Symbol(),f=this.getPropertyDescriptor(r,c,h);f!==void 0&&Ro(this.prototype,r,f)}}static getPropertyDescriptor(r,h,c){const{get:f,set:o}=Do(this.prototype,r)??{get(){return this[h]},set(a){this[h]=a}};return{get:f,set(a){const u=f==null?void 0:f.call(this);o==null||o.call(this,a),this.requestUpdate(r,u,c)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??Yi}static _$Ei(){if(this.hasOwnProperty(ie("elementProperties")))return;const r=Go(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(ie("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ie("properties"))){const h=this.properties,c=[...Uo(h),...Ho(h)];for(const f of c)this.createProperty(f,h[f])}const r=this[Symbol.metadata];if(r!==null){const h=litPropertyMetadata.get(r);if(h!==void 0)for(const[c,f]of h)this.elementProperties.set(c,f)}this._$Eh=new Map;for(const[h,c]of this.elementProperties){const f=this._$Eu(h,c);f!==void 0&&this._$Eh.set(f,h)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){const h=[];if(Array.isArray(r)){const c=new Set(r.flat(1/0).reverse());for(const f of c)h.unshift(qi(f))}else r!==void 0&&h.push(qi(r));return h}static _$Eu(r,h){const c=h.attribute;return c===!1?void 0:typeof c=="string"?c:typeof r=="string"?r.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var r;this._$ES=new Promise(h=>this.enableUpdating=h),this._$AL=new Map,this._$E_(),this.requestUpdate(),(r=this.constructor.l)==null||r.forEach(h=>h(this))}addController(r){var h;(this._$EO??(this._$EO=new Set)).add(r),this.renderRoot!==void 0&&this.isConnected&&((h=r.hostConnected)==null||h.call(r))}removeController(r){var h;(h=this._$EO)==null||h.delete(r)}_$E_(){const r=new Map,h=this.constructor.elementProperties;for(const c of h.keys())this.hasOwnProperty(c)&&(r.set(c,this[c]),delete this[c]);r.size>0&&(this._$Ep=r)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bo(r,this.constructor.elementStyles),r}connectedCallback(){var r;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(r=this._$EO)==null||r.forEach(h=>{var c;return(c=h.hostConnected)==null?void 0:c.call(h)})}enableUpdating(r){}disconnectedCallback(){var r;(r=this._$EO)==null||r.forEach(h=>{var c;return(c=h.hostDisconnected)==null?void 0:c.call(h)})}attributeChangedCallback(r,h,c){this._$AK(r,c)}_$ET(r,h){var o;const c=this.constructor.elementProperties.get(r),f=this.constructor._$Eu(r,c);if(f!==void 0&&c.reflect===!0){const a=(((o=c.converter)==null?void 0:o.toAttribute)!==void 0?c.converter:Te).toAttribute(h,c.type);this._$Em=r,a==null?this.removeAttribute(f):this.setAttribute(f,a),this._$Em=null}}_$AK(r,h){var o,a;const c=this.constructor,f=c._$Eh.get(r);if(f!==void 0&&this._$Em!==f){const u=c.getPropertyOptions(f),d=typeof u.converter=="function"?{fromAttribute:u.converter}:((o=u.converter)==null?void 0:o.fromAttribute)!==void 0?u.converter:Te;this._$Em=f;const g=d.fromAttribute(h,u.type);this[f]=g??((a=this._$Ej)==null?void 0:a.get(f))??g,this._$Em=null}}requestUpdate(r,h,c,f=!1,o){var a;if(r!==void 0){const u=this.constructor;if(f===!1&&(o=this[r]),c??(c=u.getPropertyOptions(r)),!((c.hasChanged??Qe)(o,h)||c.useDefault&&c.reflect&&o===((a=this._$Ej)==null?void 0:a.get(r))&&!this.hasAttribute(u._$Eu(r,c))))return;this.C(r,h,c)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(r,h,{useDefault:c,reflect:f,wrapped:o},a){c&&!(this._$Ej??(this._$Ej=new Map)).has(r)&&(this._$Ej.set(r,a??h??this[r]),o!==!0||a!==void 0)||(this._$AL.has(r)||(this.hasUpdated||c||(h=void 0),this._$AL.set(r,h)),f===!0&&this._$Em!==r&&(this._$Eq??(this._$Eq=new Set)).add(r))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(h){Promise.reject(h)}const r=this.scheduleUpdate();return r!=null&&await r,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var c;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}const f=this.constructor.elementProperties;if(f.size>0)for(const[o,a]of f){const{wrapped:u}=a,d=this[o];u!==!0||this._$AL.has(o)||d===void 0||this.C(o,void 0,a,d)}}let r=!1;const h=this._$AL;try{r=this.shouldUpdate(h),r?(this.willUpdate(h),(c=this._$EO)==null||c.forEach(f=>{var o;return(o=f.hostUpdate)==null?void 0:o.call(f)}),this.update(h)):this._$EM()}catch(f){throw r=!1,this._$EM(),f}r&&this._$AE(h)}willUpdate(r){}_$AE(r){var h;(h=this._$EO)==null||h.forEach(c=>{var f;return(f=c.hostUpdated)==null?void 0:f.call(c)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(r){return!0}update(r){this._$Eq&&(this._$Eq=this._$Eq.forEach(h=>this._$ET(h,this[h]))),this._$EM()}updated(r){}firstUpdated(r){}};$t.elementStyles=[],$t.shadowRootOptions={mode:"open"},$t[ie("elementProperties")]=new Map,$t[ie("finalized")]=new Map,Je==null||Je({ReactiveElement:$t}),(kt.reactiveElementVersions??(kt.reactiveElementVersions=[])).push("2.1.2");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const ne=globalThis,Xi=p=>p,Se=ne.trustedTypes,Ji=Se?Se.createPolicy("lit-html",{createHTML:p=>p}):void 0,Qi="$lit$",Et=`lit$${Math.random().toFixed(9).slice(2)}$`,tn="?"+Et,$o=`<${tn}>`,Zt=document,oe=()=>Zt.createComment(""),se=p=>p===null||typeof p!="object"&&typeof p!="function",ti=Array.isArray,Wo=p=>ti(p)||typeof(p==null?void 0:p[Symbol.iterator])=="function",ei=`[
|
|
14
|
+
\f\r]`,re=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,en=/-->/g,nn=/>/g,It=RegExp(`>|${ei}(?:([^\\s"'>=/]+)(${ei}*=${ei}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),on=/'/g,sn=/"/g,rn=/^(?:script|style|textarea|title)$/i,Vo=p=>(r,...h)=>({_$litType$:p,strings:r,values:h}),jo=Vo(1),Wt=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),an=new WeakMap,Bt=Zt.createTreeWalker(Zt,129);function hn(p,r){if(!ti(p)||!p.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ji!==void 0?Ji.createHTML(r):r}const qo=(p,r)=>{const h=p.length-1,c=[];let f,o=r===2?"<svg>":r===3?"<math>":"",a=re;for(let u=0;u<h;u++){const d=p[u];let g,w,m=-1,P=0;for(;P<d.length&&(a.lastIndex=P,w=a.exec(d),w!==null);)P=a.lastIndex,a===re?w[1]==="!--"?a=en:w[1]!==void 0?a=nn:w[2]!==void 0?(rn.test(w[2])&&(f=RegExp("</"+w[2],"g")),a=It):w[3]!==void 0&&(a=It):a===It?w[0]===">"?(a=f??re,m=-1):w[1]===void 0?m=-2:(m=a.lastIndex-w[2].length,g=w[1],a=w[3]===void 0?It:w[3]==='"'?sn:on):a===sn||a===on?a=It:a===en||a===nn?a=re:(a=It,f=void 0);const x=a===It&&p[u+1].startsWith("/>")?" ":"";o+=a===re?d+$o:m>=0?(c.push(g),d.slice(0,m)+Qi+d.slice(m)+Et+x):d+Et+(m===-2?u:x)}return[hn(p,o+(p[h]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),c]};class ae{constructor({strings:r,_$litType$:h},c){let f;this.parts=[];let o=0,a=0;const u=r.length-1,d=this.parts,[g,w]=qo(r,h);if(this.el=ae.createElement(g,c),Bt.currentNode=this.el.content,h===2||h===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(f=Bt.nextNode())!==null&&d.length<u;){if(f.nodeType===1){if(f.hasAttributes())for(const m of f.getAttributeNames())if(m.endsWith(Qi)){const P=w[a++],x=f.getAttribute(m).split(Et),T=/([.?@])?(.*)/.exec(P);d.push({type:1,index:o,name:T[2],strings:x,ctor:T[1]==="."?Yo:T[1]==="?"?Xo:T[1]==="@"?Jo:ke}),f.removeAttribute(m)}else m.startsWith(Et)&&(d.push({type:6,index:o}),f.removeAttribute(m));if(rn.test(f.tagName)){const m=f.textContent.split(Et),P=m.length-1;if(P>0){f.textContent=Se?Se.emptyScript:"";for(let x=0;x<P;x++)f.append(m[x],oe()),Bt.nextNode(),d.push({type:2,index:++o});f.append(m[P],oe())}}}else if(f.nodeType===8)if(f.data===tn)d.push({type:2,index:o});else{let m=-1;for(;(m=f.data.indexOf(Et,m+1))!==-1;)d.push({type:7,index:o}),m+=Et.length-1}o++}}static createElement(r,h){const c=Zt.createElement("template");return c.innerHTML=r,c}}function Vt(p,r,h=p,c){var a,u;if(r===Wt)return r;let f=c!==void 0?(a=h._$Co)==null?void 0:a[c]:h._$Cl;const o=se(r)?void 0:r._$litDirective$;return(f==null?void 0:f.constructor)!==o&&((u=f==null?void 0:f._$AO)==null||u.call(f,!1),o===void 0?f=void 0:(f=new o(p),f._$AT(p,h,c)),c!==void 0?(h._$Co??(h._$Co=[]))[c]=f:h._$Cl=f),f!==void 0&&(r=Vt(p,f._$AS(p,r.values),f,c)),r}class Ko{constructor(r,h){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=h}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){const{el:{content:h},parts:c}=this._$AD,f=((r==null?void 0:r.creationScope)??Zt).importNode(h,!0);Bt.currentNode=f;let o=Bt.nextNode(),a=0,u=0,d=c[0];for(;d!==void 0;){if(a===d.index){let g;d.type===2?g=new he(o,o.nextSibling,this,r):d.type===1?g=new d.ctor(o,d.name,d.strings,this,r):d.type===6&&(g=new Qo(o,this,r)),this._$AV.push(g),d=c[++u]}a!==(d==null?void 0:d.index)&&(o=Bt.nextNode(),a++)}return Bt.currentNode=Zt,f}p(r){let h=0;for(const c of this._$AV)c!==void 0&&(c.strings!==void 0?(c._$AI(r,c,h),h+=c.strings.length-2):c._$AI(r[h])),h++}}class he{get _$AU(){var r;return((r=this._$AM)==null?void 0:r._$AU)??this._$Cv}constructor(r,h,c,f){this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=r,this._$AB=h,this._$AM=c,this.options=f,this._$Cv=(f==null?void 0:f.isConnected)??!0}get parentNode(){let r=this._$AA.parentNode;const h=this._$AM;return h!==void 0&&(r==null?void 0:r.nodeType)===11&&(r=h.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,h=this){r=Vt(this,r,h),se(r)?r===Q||r==null||r===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):r!==this._$AH&&r!==Wt&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):Wo(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==Q&&se(this._$AH)?this._$AA.nextSibling.data=r:this.T(Zt.createTextNode(r)),this._$AH=r}$(r){var o;const{values:h,_$litType$:c}=r,f=typeof c=="number"?this._$AC(r):(c.el===void 0&&(c.el=ae.createElement(hn(c.h,c.h[0]),this.options)),c);if(((o=this._$AH)==null?void 0:o._$AD)===f)this._$AH.p(h);else{const a=new Ko(f,this),u=a.u(this.options);a.p(h),this.T(u),this._$AH=a}}_$AC(r){let h=an.get(r.strings);return h===void 0&&an.set(r.strings,h=new ae(r)),h}k(r){ti(this._$AH)||(this._$AH=[],this._$AR());const h=this._$AH;let c,f=0;for(const o of r)f===h.length?h.push(c=new he(this.O(oe()),this.O(oe()),this,this.options)):c=h[f],c._$AI(o),f++;f<h.length&&(this._$AR(c&&c._$AB.nextSibling,f),h.length=f)}_$AR(r=this._$AA.nextSibling,h){var c;for((c=this._$AP)==null?void 0:c.call(this,!1,!0,h);r!==this._$AB;){const f=Xi(r).nextSibling;Xi(r).remove(),r=f}}setConnected(r){var h;this._$AM===void 0&&(this._$Cv=r,(h=this._$AP)==null||h.call(this,r))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,h,c,f,o){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=r,this.name=h,this._$AM=f,this.options=o,c.length>2||c[0]!==""||c[1]!==""?(this._$AH=Array(c.length-1).fill(new String),this.strings=c):this._$AH=Q}_$AI(r,h=this,c,f){const o=this.strings;let a=!1;if(o===void 0)r=Vt(this,r,h,0),a=!se(r)||r!==this._$AH&&r!==Wt,a&&(this._$AH=r);else{const u=r;let d,g;for(r=o[0],d=0;d<o.length-1;d++)g=Vt(this,u[c+d],h,d),g===Wt&&(g=this._$AH[d]),a||(a=!se(g)||g!==this._$AH[d]),g===Q?r=Q:r!==Q&&(r+=(g??"")+o[d+1]),this._$AH[d]=g}a&&!f&&this.j(r)}j(r){r===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,r??"")}}class Yo extends ke{constructor(){super(...arguments),this.type=3}j(r){this.element[this.name]=r===Q?void 0:r}}let Xo=class extends ke{constructor(){super(...arguments),this.type=4}j(r){this.element.toggleAttribute(this.name,!!r&&r!==Q)}};class Jo extends ke{constructor(r,h,c,f,o){super(r,h,c,f,o),this.type=5}_$AI(r,h=this){if((r=Vt(this,r,h,0)??Q)===Wt)return;const c=this._$AH,f=r===Q&&c!==Q||r.capture!==c.capture||r.once!==c.once||r.passive!==c.passive,o=r!==Q&&(c===Q||f);f&&this.element.removeEventListener(this.name,this,c),o&&this.element.addEventListener(this.name,this,r),this._$AH=r}handleEvent(r){var h;typeof this._$AH=="function"?this._$AH.call(((h=this.options)==null?void 0:h.host)??this.element,r):this._$AH.handleEvent(r)}}class Qo{constructor(r,h,c){this.element=r,this.type=6,this._$AN=void 0,this._$AM=h,this.options=c}get _$AU(){return this._$AM._$AU}_$AI(r){Vt(this,r)}}const ii=ne.litHtmlPolyfillSupport;ii==null||ii(ae,he),(ne.litHtmlVersions??(ne.litHtmlVersions=[])).push("3.3.2");const ts=(p,r,h)=>{const c=(h==null?void 0:h.renderBefore)??r;let f=c._$litPart$;if(f===void 0){const o=(h==null?void 0:h.renderBefore)??null;c._$litPart$=f=new he(r.insertBefore(oe(),o),o,void 0,h??{})}return f._$AI(p),f};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const Nt=globalThis;class le extends $t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var h;const r=super.createRenderRoot();return(h=this.renderOptions).renderBefore??(h.renderBefore=r.firstChild),r}update(r){const h=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(r),this._$Do=ts(h,this.renderRoot,this.renderOptions)}connectedCallback(){var r;super.connectedCallback(),(r=this._$Do)==null||r.setConnected(!0)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this._$Do)==null||r.setConnected(!1)}render(){return Wt}}le._$litElement$=!0,le.finalized=!0,(yn=Nt.litElementHydrateSupport)==null||yn.call(Nt,{LitElement:le});const ni=Nt.litElementPolyfillSupport;ni==null||ni({LitElement:le}),(Nt.litElementVersions??(Nt.litElementVersions=[])).push("4.2.2");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const es=p=>(r,h)=>{h!==void 0?h.addInitializer(()=>{customElements.define(p,r)}):customElements.define(p,r)};/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/const is={attribute:!0,type:String,converter:Te,reflect:!1,hasChanged:Qe},ns=(p=is,r,h)=>{const{kind:c,metadata:f}=h;let o=globalThis.litPropertyMetadata.get(f);if(o===void 0&&globalThis.litPropertyMetadata.set(f,o=new Map),c==="setter"&&((p=Object.create(p)).wrapped=!0),o.set(h.name,p),c==="accessor"){const{name:a}=h;return{set(u){const d=r.get.call(this);r.set.call(this,u),this.requestUpdate(a,d,p,!0,u)},init(u){return u!==void 0&&this.C(a,void 0,p,u),u}}}if(c==="setter"){const{name:a}=h;return function(u){const d=this[a];r.call(this,u),this.requestUpdate(a,d,p,!0,u)}}throw Error("Unsupported decorator location: "+c)};function tt(p){return(r,h)=>typeof h=="object"?ns(p,r,h):((c,f,o)=>{const a=f.hasOwnProperty(o);return f.constructor.createProperty(o,c),a?Object.getOwnPropertyDescriptor(f,o):void 0})(p,r,h)}var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function os(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var oi={exports:{}};/* @preserve
|
|
28
|
+
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
29
|
+
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
30
|
+
*/(function(p,r){(function(h,c){c(r)})(ln,function(h){var c="1.9.4";function f(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++){s=arguments[i];for(e in s)t[e]=s[e]}return t}var o=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function a(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var u=0;function d(t){return"_leaflet_id"in t||(t._leaflet_id=++u),t._leaflet_id}function g(t,e,i){var n,s,l,_;return _=function(){n=!1,s&&(l.apply(i,s),s=!1)},l=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(_,e),n=!0)},l}function w(t,e,i){var n=e[1],s=e[0],l=n-s;return t===n&&i?t:((t-s)%l+l)%l+s}function m(){return!1}function P(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function x(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function T(t){return x(t).split(/\s+/)}function C(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function U(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var k=/\{ *([\w_ -]+) *\}/g;function G(t,e){return t.replace(k,function(i,n){var s=e[n];if(s===void 0)throw new Error("No value provided for variable "+i);return typeof s=="function"&&(s=s(e)),s})}var $=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function _t(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var nt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function ce(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var Ln=0;function wn(t){var e=+new Date,i=Math.max(0,16-(e-Ln));return Ln=e+i,window.setTimeout(t,i)}var ci=window.requestAnimationFrame||ce("RequestAnimationFrame")||wn,xn=window.cancelAnimationFrame||ce("CancelAnimationFrame")||ce("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function st(t,e,i){if(i&&ci===wn)t.call(e);else return ci.call(window,a(t,e))}function ut(t){t&&xn.call(window,t)}var cs={__proto__:null,extend:f,create:o,bind:a,get lastId(){return u},stamp:d,throttle:g,wrapNum:w,falseFn:m,formatNum:P,trim:x,splitWords:T,setOptions:C,getParamString:U,template:G,isArray:$,indexOf:_t,emptyImageUrl:nt,requestFn:ci,cancelFn:xn,requestAnimFrame:st,cancelAnimFrame:ut};function xt(){}xt.extend=function(t){var e=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=o(i);n.constructor=e,e.prototype=n;for(var s in this)Object.prototype.hasOwnProperty.call(this,s)&&s!=="prototype"&&s!=="__super__"&&(e[s]=this[s]);return t.statics&&f(e,t.statics),t.includes&&(ds(t.includes),f.apply(null,[n].concat(t.includes))),f(n,t),delete n.statics,delete n.includes,n.options&&(n.options=i.options?o(i.options):{},f(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var l=0,_=n._initHooks.length;l<_;l++)n._initHooks[l].call(this)}},e},xt.include=function(t){var e=this.prototype.options;return f(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},xt.mergeOptions=function(t){return f(this.prototype.options,t),this},xt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function ds(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=$(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var lt={on:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e);else{t=T(t);for(var s=0,l=t.length;s<l;s++)this._on(t[s],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var n in t)this._off(n,t[n],e);else{t=T(t);for(var s=arguments.length===1,l=0,_=t.length;l<_;l++)s?this._off(t[l]):this._off(t[l],e,i)}return this},_on:function(t,e,i,n){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var s={fn:e,ctx:i};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}},_off:function(t,e,i){var n,s,l;if(this._events&&(n=this._events[t],!!n)){if(arguments.length===1){if(this._firingCount)for(s=0,l=n.length;s<l;s++)n[s].fn=m;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var _=this._listens(t,e,i);if(_!==!1){var v=n[_];this._firingCount&&(v.fn=m,this._events[t]=n=n.slice()),n.splice(_,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=f({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var l=0,_=s.length;l<_;l++){var v=s[l],y=v.fn;v.once&&this.off(t,y,v.ctx),y.call(v.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e,i,n){typeof t!="string"&&console.warn('"string" type argument expected');var s=e;typeof e!="function"&&(n=!!e,s=void 0,i=void 0);var l=this._events&&this._events[t];if(l&&l.length&&this._listens(t,s,i)!==!1)return!0;if(n){for(var _ in this._eventParents)if(this._eventParents[_].listens(t,e,i,n))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var s=0,l=n.length;s<l;s++)if(n[s].fn===e&&n[s].ctx===i)return s;return!1},once:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e,!0);else{t=T(t);for(var s=0,l=t.length;s<l;s++)this._on(t[s],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[d(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[d(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,f({layer:t.target,propagatedFrom:t.target},t),!0)}};lt.addEventListener=lt.on,lt.removeEventListener=lt.clearAllEventListeners=lt.off,lt.addOneTimeEventListener=lt.once,lt.fireEvent=lt.fire,lt.hasEventListeners=lt.listens;var de=xt.extend(lt);function z(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var Pn=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Pn(this.x),this.y=Pn(this.y),this},distanceTo:function(t){t=O(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=O(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+P(this.x)+", "+P(this.y)+")"}};function O(t,e,i){return t instanceof z?t:$(t)?new z(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function W(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}W.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof z||typeof t[0]=="number"||"x"in t)e=i=O(t);else if(t=rt(t),e=t.min,i=t.max,!e||!i)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=i.clone()):(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},getCenter:function(t){return O((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return O(this.min.x,this.max.y)},getTopRight:function(){return O(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return typeof t[0]=="number"||t instanceof z?t=O(t):t=rt(t),t instanceof W?(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:function(t){t=rt(t);var e=this.min,i=this.max,n=t.min,s=t.max,l=s.x>=e.x&&n.x<=i.x,_=s.y>=e.y&&n.y<=i.y;return l&&_},overlaps:function(t){t=rt(t);var e=this.min,i=this.max,n=t.min,s=t.max,l=s.x>e.x&&n.x<i.x,_=s.y>e.y&&n.y<i.y;return l&&_},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return rt(O(e.x-n,e.y-s),O(i.x+n,i.y+s))},equals:function(t){return t?(t=rt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function rt(t,e){return!t||t instanceof W?t:new W(t,e)}function at(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}at.prototype={extend:function(t){var e=this._southWest,i=this._northEast,n,s;if(t instanceof H)n=t,s=t;else if(t instanceof at){if(n=t._southWest,s=t._northEast,!n||!s)return this}else return t?this.extend(N(t)||q(t)):this;return!e&&!i?(this._southWest=new H(n.lat,n.lng),this._northEast=new H(s.lat,s.lng)):(e.lat=Math.min(n.lat,e.lat),e.lng=Math.min(n.lng,e.lng),i.lat=Math.max(s.lat,i.lat),i.lng=Math.max(s.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new at(new H(e.lat-n,e.lng-s),new H(i.lat+n,i.lng+s))},getCenter:function(){return new H((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new H(this.getNorth(),this.getWest())},getSouthEast:function(){return new H(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof H||"lat"in t?t=N(t):t=q(t);var e=this._southWest,i=this._northEast,n,s;return t instanceof at?(n=t.getSouthWest(),s=t.getNorthEast()):n=s=t,n.lat>=e.lat&&s.lat<=i.lat&&n.lng>=e.lng&&s.lng<=i.lng},intersects:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),l=s.lat>=e.lat&&n.lat<=i.lat,_=s.lng>=e.lng&&n.lng<=i.lng;return l&&_},overlaps:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),l=s.lat>e.lat&&n.lat<i.lat,_=s.lng>e.lng&&n.lng<i.lng;return l&&_},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=q(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function q(t,e){return t instanceof at?t:new at(t,e)}function H(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,i!==void 0&&(this.alt=+i)}H.prototype={equals:function(t,e){if(!t)return!1;t=N(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+P(this.lat,t)+", "+P(this.lng,t)+")"},distanceTo:function(t){return At.distance(this,N(t))},wrap:function(){return At.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return q([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new H(this.lat,this.lng,this.alt)}};function N(t,e,i){return t instanceof H?t:$(t)&&typeof t[0]!="object"?t.length===3?new H(t[0],t[1],t[2]):t.length===2?new H(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new H(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new H(t,e,i)}var Pt={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),s=this.transformation.transform(e.max,i);return new W(n,s)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?w(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?w(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new H(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(n===0&&s===0)return t;var l=t.getSouthWest(),_=t.getNorthEast(),v=new H(l.lat-n,l.lng-s),y=new H(_.lat-n,_.lng-s);return new at(v,y)}},At=f({},Pt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,l=Math.sin((e.lat-t.lat)*i/2),_=Math.sin((e.lng-t.lng)*i/2),v=l*l+Math.cos(n)*Math.cos(s)*_*_,y=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*y}}),bn=6378137,di={R:bn,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new z(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new H((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=bn*Math.PI;return new W([-t,-t],[t,t])}()};function fi(t,e,i,n){if($(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=n}fi.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function fe(t,e,i,n){return new fi(t,e,i,n)}var _i=f({},At,{code:"EPSG:3857",projection:di,transformation:function(){var t=.5/(Math.PI*di.R);return fe(t,.5,-t,.5)}()}),fs=f({},_i,{code:"EPSG:900913"});function Cn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Mn(t,e){var i="",n,s,l,_,v,y;for(n=0,l=t.length;n<l;n++){for(v=t[n],s=0,_=v.length;s<_;s++)y=v[s],i+=(s?"L":"M")+y.x+" "+y.y;i+=e?S.svg?"z":"x":""}return i||"M0 0"}var pi=document.documentElement.style,Ee="ActiveXObject"in window,_s=Ee&&!document.addEventListener,Tn="msLaunchUri"in navigator&&!("documentMode"in document),mi=vt("webkit"),Sn=vt("android"),kn=vt("android 2")||vt("android 3"),ps=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ms=Sn&&vt("Google")&&ps<537&&!("AudioNode"in window),gi=!!window.opera,En=!Tn&&vt("chrome"),An=vt("gecko")&&!mi&&!gi&&!Ee,gs=!En&&vt("safari"),On=vt("phantom"),zn="OTransition"in pi,vs=navigator.platform.indexOf("Win")===0,Zn=Ee&&"transition"in pi,vi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!kn,In="MozPerspective"in pi,ys=!window.L_DISABLE_3D&&(Zn||vi||In)&&!zn&&!On,_e=typeof orientation<"u"||vt("mobile"),Ls=_e&&mi,ws=_e&&vi,Bn=!window.PointerEvent&&window.MSPointerEvent,Nn=!!(window.PointerEvent||Bn),Rn="ontouchstart"in window||!!window.TouchEvent,xs=!window.L_NO_TOUCH&&(Rn||Nn),Ps=_e&&gi,bs=_e&&An,Cs=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ms=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",m,e),window.removeEventListener("testPassiveEventSupport",m,e)}catch{}return t}(),Ts=function(){return!!document.createElement("canvas").getContext}(),yi=!!(document.createElementNS&&Cn("svg").createSVGRect),Ss=!!yi&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ks=!yi&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Es=navigator.platform.indexOf("Mac")===0,As=navigator.platform.indexOf("Linux")===0;function vt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var S={ie:Ee,ielt9:_s,edge:Tn,webkit:mi,android:Sn,android23:kn,androidStock:ms,opera:gi,chrome:En,gecko:An,safari:gs,phantom:On,opera12:zn,win:vs,ie3d:Zn,webkit3d:vi,gecko3d:In,any3d:ys,mobile:_e,mobileWebkit:Ls,mobileWebkit3d:ws,msPointer:Bn,pointer:Nn,touch:xs,touchNative:Rn,mobileOpera:Ps,mobileGecko:bs,retina:Cs,passiveEvents:Ms,canvas:Ts,svg:yi,vml:ks,inlineSvg:Ss,mac:Es,linux:As},Dn=S.msPointer?"MSPointerDown":"pointerdown",Un=S.msPointer?"MSPointerMove":"pointermove",Hn=S.msPointer?"MSPointerUp":"pointerup",Gn=S.msPointer?"MSPointerCancel":"pointercancel",Li={touchstart:Dn,touchmove:Un,touchend:Hn,touchcancel:Gn},Fn={touchstart:Ns,touchmove:Ae,touchend:Ae,touchcancel:Ae},jt={},$n=!1;function Os(t,e,i){return e==="touchstart"&&Bs(),Fn[e]?(i=Fn[e].bind(this,i),t.addEventListener(Li[e],i,!1),i):(console.warn("wrong event specified:",e),m)}function zs(t,e,i){if(!Li[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Li[e],i,!1)}function Zs(t){jt[t.pointerId]=t}function Is(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Wn(t){delete jt[t.pointerId]}function Bs(){$n||(document.addEventListener(Dn,Zs,!0),document.addEventListener(Un,Is,!0),document.addEventListener(Hn,Wn,!0),document.addEventListener(Gn,Wn,!0),$n=!0)}function Ae(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in jt)e.touches.push(jt[i]);e.changedTouches=[e],t(e)}}function Ns(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&it(e),Ae(t,e)}function Rs(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Ds=200;function Us(t,e){t.addEventListener("dblclick",e);var i=0,n;function s(l){if(l.detail!==1){n=l.detail;return}if(!(l.pointerType==="mouse"||l.sourceCapabilities&&!l.sourceCapabilities.firesTouchEvents)){var _=Yn(l);if(!(_.some(function(y){return y instanceof HTMLLabelElement&&y.attributes.for})&&!_.some(function(y){return y instanceof HTMLInputElement||y instanceof HTMLSelectElement}))){var v=Date.now();v-i<=Ds?(n++,n===2&&e(Rs(l))):n=1,i=v}}}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function Hs(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var wi=Ze(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pe=Ze(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Vn=pe==="webkitTransition"||pe==="OTransition"?pe+"End":"transitionend";function jn(t){return typeof t=="string"?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function D(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function V(t){var e=t.parentNode;e&&e.removeChild(t)}function Oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function qt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Kt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function xi(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=ze(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function I(t,e){if(t.classList!==void 0)for(var i=T(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!xi(t,e)){var l=ze(t);Pi(t,(l?l+" ":"")+e)}}function j(t,e){t.classList!==void 0?t.classList.remove(e):Pi(t,x((" "+ze(t)+" ").replace(" "+e+" "," ")))}function Pi(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function ze(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ct(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Gs(t,e)}function Gs(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Ze(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Dt(t,e,i){var n=e||new z(0,0);t.style[wi]=(S.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function K(t,e){t._leaflet_pos=e,S.any3d?Dt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ut(t){return t._leaflet_pos||new z(0,0)}var ge,ve,bi;if("onselectstart"in document)ge=function(){Z(window,"selectstart",it)},ve=function(){F(window,"selectstart",it)};else{var ye=Ze(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ge=function(){if(ye){var t=document.documentElement.style;bi=t[ye],t[ye]="none"}},ve=function(){ye&&(document.documentElement.style[ye]=bi,bi=void 0)}}function Ci(){Z(window,"dragstart",it)}function Mi(){F(window,"dragstart",it)}var Ie,Ti;function Si(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Be(),Ie=t,Ti=t.style.outlineStyle,t.style.outlineStyle="none",Z(window,"keydown",Be))}function Be(){Ie&&(Ie.style.outlineStyle=Ti,Ie=void 0,Ti=void 0,F(window,"keydown",Be))}function qn(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function ki(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Fs={__proto__:null,TRANSFORM:wi,TRANSITION:pe,TRANSITION_END:Vn,get:jn,getStyle:me,create:D,remove:V,empty:Oe,toFront:qt,toBack:Kt,hasClass:xi,addClass:I,removeClass:j,setClass:Pi,getClass:ze,setOpacity:ct,testProp:Ze,setTransform:Dt,setPosition:K,getPosition:Ut,get disableTextSelection(){return ge},get enableTextSelection(){return ve},disableImageDrag:Ci,enableImageDrag:Mi,preventOutline:Si,restoreOutline:Be,getSizedParentNode:qn,getScale:ki};function Z(t,e,i,n){if(e&&typeof e=="object")for(var s in e)Ai(t,s,e[s],i);else{e=T(e);for(var l=0,_=e.length;l<_;l++)Ai(t,e[l],i,n)}return this}var yt="_leaflet_events";function F(t,e,i,n){if(arguments.length===1)Kn(t),delete t[yt];else if(e&&typeof e=="object")for(var s in e)Oi(t,s,e[s],i);else if(e=T(e),arguments.length===2)Kn(t,function(v){return _t(e,v)!==-1});else for(var l=0,_=e.length;l<_;l++)Oi(t,e[l],i,n);return this}function Kn(t,e){for(var i in t[yt]){var n=i.split(/\d/)[0];(!e||e(n))&&Oi(t,n,null,null,i)}}var Ei={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ai(t,e,i,n){var s=e+d(i)+(n?"_"+d(n):"");if(t[yt]&&t[yt][s])return this;var l=function(v){return i.call(n||t,v||window.event)},_=l;!S.touchNative&&S.pointer&&e.indexOf("touch")===0?l=Os(t,e,l):S.touch&&e==="dblclick"?l=Us(t,l):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Ei[e]||e,l,S.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(l=function(v){v=v||window.event,Zi(t,v)&&_(v)},t.addEventListener(Ei[e],l,!1)):t.addEventListener(e,_,!1):t.attachEvent("on"+e,l),t[yt]=t[yt]||{},t[yt][s]=l}function Oi(t,e,i,n,s){s=s||e+d(i)+(n?"_"+d(n):"");var l=t[yt]&&t[yt][s];if(!l)return this;!S.touchNative&&S.pointer&&e.indexOf("touch")===0?zs(t,e,l):S.touch&&e==="dblclick"?Hs(t,l):"removeEventListener"in t?t.removeEventListener(Ei[e]||e,l,!1):t.detachEvent("on"+e,l),t[yt][s]=null}function Ht(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function zi(t){return Ai(t,"wheel",Ht),this}function Le(t){return Z(t,"mousedown touchstart dblclick contextmenu",Ht),t._leaflet_disable_click=!0,this}function it(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Gt(t){return it(t),Ht(t),this}function Yn(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Xn(t,e){if(!e)return new z(t.clientX,t.clientY);var i=ki(e),n=i.boundingClientRect;return new z((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var $s=S.linux&&S.chrome?window.devicePixelRatio:S.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Jn(t){return S.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/$s:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Zi(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var Ws={__proto__:null,on:Z,off:F,stopPropagation:Ht,disableScrollPropagation:zi,disableClickPropagation:Le,preventDefault:it,stop:Gt,getPropagationPath:Yn,getMousePosition:Xn,getWheelDelta:Jn,isExternalTarget:Zi,addListener:Z,removeListener:F},Qn=de.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Ut(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=st(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),K(this._el,i),this.fire("step")},_complete:function(){ut(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),R=de.extend({options:{crs:_i,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:function(t,e){e=C(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(N(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=pe&&S.any3d&&!S.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Z(this._proxy,Vn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(N(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=f({animate:i.animate},i.zoom),i.pan=f({animate:i.animate,duration:i.duration},i.pan));var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,i.pan&&i.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(S.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(S.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),l=t instanceof z?t:this.latLngToContainerPoint(t),_=l.subtract(s).multiplyBy(1-1/n),v=this.containerPointToLatLng(s.add(_));return this.setView(v,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():q(t);var i=O(e.paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if(s=typeof e.maxZoom=="number"?Math.min(e.maxZoom,s):s,s===1/0)return{center:t.getCenter(),zoom:s};var l=n.subtract(i).divideBy(2),_=this.project(t.getSouthWest(),s),v=this.project(t.getNorthEast(),s),y=this.unproject(_.add(v).divideBy(2).add(l),s);return{center:y,zoom:s}},fitBounds:function(t,e){if(t=q(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=O(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Qn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){I(this._mapPane,"leaflet-pan-anim");var 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:function(t,e,i){if(i=i||{},i.animate===!1||!S.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),l=this.getSize(),_=this._zoom;t=N(t),e=e===void 0?_:e;var v=Math.max(l.x,l.y),y=v*this.getZoomScale(_,e),b=s.distanceTo(n)||1,M=1.42,E=M*M;function B(Y){var qe=Y?-1:1,zr=Y?y:v,Zr=y*y-v*v+qe*E*E*b*b,Ir=2*zr*E*b,Wi=Zr/Ir,Zo=Math.sqrt(Wi*Wi+1)-Wi,Br=Zo<1e-9?-18:Math.log(Zo);return Br}function ot(Y){return(Math.exp(Y)-Math.exp(-Y))/2}function et(Y){return(Math.exp(Y)+Math.exp(-Y))/2}function ft(Y){return ot(Y)/et(Y)}var ht=B(0);function ee(Y){return v*(et(ht)/et(ht+M*Y))}function kr(Y){return v*(et(ht)*ft(ht+M*Y)-ot(ht))/E}function Er(Y){return 1-Math.pow(1-Y,1.5)}var Ar=Date.now(),Oo=(B(1)-ht)/M,Or=i.duration?1e3*i.duration:1e3*Oo*.8;function zo(){var Y=(Date.now()-Ar)/Or,qe=Er(Y)*Oo;Y<=1?(this._flyToFrame=st(zo,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(kr(qe)/b)),_),this.getScaleZoom(v/ee(qe),_),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),zo.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=q(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:function(t){var 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:function(t){var 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:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,q(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=O(e.paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),l=this.project(t),_=this.getPixelBounds(),v=rt([_.min.add(i),_.max.subtract(n)]),y=v.getSize();if(!v.contains(l)){this._enforcingBounds=!0;var b=l.subtract(v.getCenter()),M=v.extend(l).getSize().subtract(y);s.x+=b.x<0?-M.x:M.x,s.y+=b.y<0?-M.y:M.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=f({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),l=n.subtract(s);return!l.x&&!l.y?this:(t.animate&&t.pan?this.panBy(l):(t.pan&&this._rawPanBy(l),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=f({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new H(e,i),s=n.toBounds(t.coords.accuracy*2),l=this._locateOptions;if(l.setView){var _=this.getBoundsZoom(s);this.setView(n,l.maxZoom?Math.min(_,l.maxZoom):_)}var v={latlng:n,bounds:s,timestamp:t.timestamp};for(var y in t.coords)typeof t.coords[y]=="number"&&(v[y]=t.coords[y]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){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");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),V(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ut(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)V(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=D("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new at(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=q(t),i=O(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),l=this.getMaxZoom(),_=t.getNorthWest(),v=t.getSouthEast(),y=this.getSize().subtract(i),b=rt(this.project(v,n),this.project(_,n)).getSize(),M=S.any3d?this.options.zoomSnap:1,E=y.x/b.x,B=y.y/b.y,ot=e?Math.max(E,B):Math.min(E,B);return n=this.getScaleZoom(ot,n),M&&(n=Math.round(n/(M/100))*(M/100),n=e?Math.ceil(n/M)*M:Math.floor(n/M)*M),Math.max(s,Math.min(l,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new W(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(N(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(N(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(q(t))},distance:function(t,e){return this.options.crs.distance(N(t),N(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return Xn(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=jn(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Z(e,"scroll",this._onScroll,this),this._containerId=d(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&S.any3d,I(t,"leaflet-container"+(S.touch?" leaflet-touch":"")+(S.retina?" leaflet-retina":"")+(S.ielt9?" leaflet-oldie":"")+(S.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),K(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(I(t.markerPane,"leaflet-zoom-hide"),I(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){K(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ut(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){K(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[d(this._container)]=this;var e=t?F:Z;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),S.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ut(this._resizeRequest),this._resizeRequest=st(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,s=e==="mouseout"||e==="mouseover",l=t.target||t.srcElement,_=!1;l;){if(n=this._targets[d(l)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){_=!0;break}if(n&&n.listens(e,!0)&&(s&&!Zi(l,t)||(i.push(n),s))||l===this._container)break;l=l.parentNode}return!i.length&&!_&&!s&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Si(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=f({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var s=this._findEventTargets(t,e);if(i){for(var l=[],_=0;_<i.length;_++)i[_].listens(e,!0)&&l.push(i[_]);s=l.concat(s)}if(s.length){e==="contextmenu"&&it(t);var v=s[0],y={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var b=v.getLatLng&&(!v._radius||v._radius<=10);y.containerPoint=b?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),y.layerPoint=this.containerPointToLayerPoint(y.containerPoint),y.latlng=b?v.getLatLng():this.layerPointToLatLng(y.layerPoint)}for(_=0;_<s.length;_++)if(s[_].fire(e,y,!0),y.originalEvent._stopped||s[_].options.bubblingMouseEvents===!1&&_t(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Ut(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return rt([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),l=new W(n.subtract(s),n.add(s)),_=this._getBoundsOffset(l,i,e);return Math.abs(_.x)<=1&&Math.abs(_.y)<=1?t:this.unproject(n.add(_),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new W(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=rt(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),l=n.max.subtract(t.max),_=this._rebound(s.x,-l.x),v=this._rebound(s.y,-l.y);return new z(_,v)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=S.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){j(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=D("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=wi,n=this._proxy.style[i];Dt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){V(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Dt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(s)?!1:(st(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,I(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&j(this._mapPane,"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))}});function Vs(t,e){return new R(t,e)}var pt=xt.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return I(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(V(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),we=function(t){return new pt(t)};R.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=D("div",e+"control-container",this._container);function n(s,l){var _=e+s+" "+e+l;t[s+l]=D("div",_,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)V(this._controlCorners[t]);V(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var to=pt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){C(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return pt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(d(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){I(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(I(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):j(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return j(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=D("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Le(e),zi(e);var n=this._section=D("section",t+"-list");i&&(this._map.on("click",this.collapse,this),Z(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var s=this._layersLink=D("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),Z(s,{keydown:function(l){l.keyCode===13&&this._expandSafely()},click:function(l){it(l),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=D("div",t+"-base",n),this._separator=D("div",t+"-separator",n),this._overlaysList=D("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&d(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(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(a(function(n,s){return this.options.sortFunction(n.layer,s.layer,n.name,s.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Oe(this._baseLayersList),Oe(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(d(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+d(this),i),this._layerControlInputs.push(n),n.layerId=d(t.layer),Z(n,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var l=document.createElement("span");e.appendChild(l),l.appendChild(n),l.appendChild(s);var _=t.overlay?this._overlaysList:this._baseLayersList;return _.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],s=[];this._handlingClick=!0;for(var l=t.length-1;l>=0;l--)e=t[l],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||s.push(i);for(l=0;l<s.length;l++)this._map.hasLayer(s[l])&&this._map.removeLayer(s[l]);for(l=0;l<n.length;l++)this._map.hasLayer(n[l])||this._map.addLayer(n[l]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,i,n=this._map.getZoom(),s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&n<i.options.minZoom||i.options.maxZoom!==void 0&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Z(t,"click",it),this.expand();var e=this;setTimeout(function(){F(t,"click",it),e._preventClick=!1})}}),js=function(t,e,i){return new to(t,e,i)},Ii=pt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=D("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var l=D("a",i,n);return l.innerHTML=t,l.href="#",l.title=e,l.setAttribute("role","button"),l.setAttribute("aria-label",e),Le(l),Z(l,"click",Gt),Z(l,"click",s,this),Z(l,"click",this._refocusOnMap,this),l},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";j(this._zoomInButton,e),j(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(I(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(I(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});R.mergeOptions({zoomControl:!0}),R.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ii,this.addControl(this.zoomControl))});var qs=function(t){return new Ii(t)},eo=pt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=D("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=D("div",e,i)),t.imperial&&(this._iScale=D("div",e,i))},_update:function(){var 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:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,s;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(s=this._getRoundNum(e),this._updateScale(this._iScale,s+" ft",s/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),Ks=function(t){return new eo(t)},Ys='<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>',Bi=pt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(S.inlineSvg?Ys+" ":"")+"Leaflet</a>"},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=D("div","leaflet-control-attribution"),Le(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});R.mergeOptions({attributionControl:!0}),R.addInitHook(function(){this.options.attributionControl&&new Bi().addTo(this)});var Xs=function(t){return new Bi(t)};pt.Layers=to,pt.Zoom=Ii,pt.Scale=eo,pt.Attribution=Bi,we.layers=js,we.zoom=qs,we.scale=Ks,we.attribution=Xs;var Lt=xt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Lt.addTo=function(t,e){return t.addHandler(e,this),this};var Js={Events:lt},io=S.touch?"touchstart mousedown":"mousedown",Ot=de.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Z(this._dragStartTarget,io,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ot._dragging===this&&this.finishDrag(!0),F(this._dragStartTarget,io,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!xi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ot._dragging===this&&this.finishDrag();return}if(!(Ot._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ot._dragging=this,this._preventOutline&&Si(this._element),Ci(),ge(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=qn(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=Ut(this._element),this._parentScale=ki(i);var n=t.type==="mousedown";Z(document,n?"mousemove":"touchmove",this._onMove,this),Z(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,it(t),this._moved||(this.fire("dragstart"),this._moved=!0,I(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),I(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),K(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){j(document.body,"leaflet-dragging"),this._lastTarget&&(j(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),F(document,"mousemove touchmove",this._onMove,this),F(document,"mouseup touchend touchcancel",this._onUp,this),Mi(),ve();var e=this._moved&&this._moving;this._moving=!1,Ot._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function no(t,e,i){var n,s=[1,4,2,8],l,_,v,y,b,M,E,B;for(l=0,M=t.length;l<M;l++)t[l]._code=Ft(t[l],e);for(v=0;v<4;v++){for(E=s[v],n=[],l=0,M=t.length,_=M-1;l<M;_=l++)y=t[l],b=t[_],y._code&E?b._code&E||(B=Ne(b,y,E,e,i),B._code=Ft(B,e),n.push(B)):(b._code&E&&(B=Ne(b,y,E,e,i),B._code=Ft(B,e),n.push(B)),n.push(y));t=n}return t}function oo(t,e){var i,n,s,l,_,v,y,b,M;if(!t||t.length===0)throw new Error("latlngs not passed");dt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var E=N([0,0]),B=q(t),ot=B.getNorthWest().distanceTo(B.getSouthWest())*B.getNorthEast().distanceTo(B.getNorthWest());ot<1700&&(E=Ni(t));var et=t.length,ft=[];for(i=0;i<et;i++){var ht=N(t[i]);ft.push(e.project(N([ht.lat-E.lat,ht.lng-E.lng])))}for(v=y=b=0,i=0,n=et-1;i<et;n=i++)s=ft[i],l=ft[n],_=s.y*l.x-l.y*s.x,y+=(s.x+l.x)*_,b+=(s.y+l.y)*_,v+=_*3;v===0?M=ft[0]:M=[y/v,b/v];var ee=e.unproject(O(M));return N([ee.lat+E.lat,ee.lng+E.lng])}function Ni(t){for(var e=0,i=0,n=0,s=0;s<t.length;s++){var l=N(t[s]);e+=l.lat,i+=l.lng,n++}return N([e/n,i/n])}var Qs={__proto__:null,clipPolygon:no,polygonCenter:oo,centroid:Ni};function so(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=ir(t,i),t=er(t,i),t}function ro(t,e,i){return Math.sqrt(xe(t,e,i,!0))}function tr(t,e,i){return xe(t,e,i)}function er(t,e){var i=t.length,n=typeof Uint8Array<"u"?Uint8Array:Array,s=new n(i);s[0]=s[i-1]=1,Ri(t,s,e,0,i-1);var l,_=[];for(l=0;l<i;l++)s[l]&&_.push(t[l]);return _}function Ri(t,e,i,n,s){var l=0,_,v,y;for(v=n+1;v<=s-1;v++)y=xe(t[v],t[n],t[s],!0),y>l&&(_=v,l=y);l>i&&(e[_]=1,Ri(t,e,i,n,_),Ri(t,e,i,_,s))}function ir(t,e){for(var i=[t[0]],n=1,s=0,l=t.length;n<l;n++)nr(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<l-1&&i.push(t[l-1]),i}var ao;function ho(t,e,i,n,s){var l=n?ao:Ft(t,i),_=Ft(e,i),v,y,b;for(ao=_;;){if(!(l|_))return[t,e];if(l&_)return!1;v=l||_,y=Ne(t,e,v,i,s),b=Ft(y,i),v===l?(t=y,l=b):(e=y,_=b)}}function Ne(t,e,i,n,s){var l=e.x-t.x,_=e.y-t.y,v=n.min,y=n.max,b,M;return i&8?(b=t.x+l*(y.y-t.y)/_,M=y.y):i&4?(b=t.x+l*(v.y-t.y)/_,M=v.y):i&2?(b=y.x,M=t.y+_*(y.x-t.x)/l):i&1&&(b=v.x,M=t.y+_*(v.x-t.x)/l),new z(b,M,s)}function Ft(t,e){var 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 nr(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function xe(t,e,i,n){var s=e.x,l=e.y,_=i.x-s,v=i.y-l,y=_*_+v*v,b;return y>0&&(b=((t.x-s)*_+(t.y-l)*v)/y,b>1?(s=i.x,l=i.y):b>0&&(s+=_*b,l+=v*b)),_=t.x-s,v=t.y-l,n?_*_+v*v:new z(s,l)}function dt(t){return!$(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function lo(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),dt(t)}function uo(t,e){var i,n,s,l,_,v,y,b;if(!t||t.length===0)throw new Error("latlngs not passed");dt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=N([0,0]),E=q(t),B=E.getNorthWest().distanceTo(E.getSouthWest())*E.getNorthEast().distanceTo(E.getNorthWest());B<1700&&(M=Ni(t));var ot=t.length,et=[];for(i=0;i<ot;i++){var ft=N(t[i]);et.push(e.project(N([ft.lat-M.lat,ft.lng-M.lng])))}for(i=0,n=0;i<ot-1;i++)n+=et[i].distanceTo(et[i+1])/2;if(n===0)b=et[0];else for(i=0,l=0;i<ot-1;i++)if(_=et[i],v=et[i+1],s=_.distanceTo(v),l+=s,l>n){y=(l-n)/s,b=[v.x-y*(v.x-_.x),v.y-y*(v.y-_.y)];break}var ht=e.unproject(O(b));return N([ht.lat+M.lat,ht.lng+M.lng])}var or={__proto__:null,simplify:so,pointToSegmentDistance:ro,closestPointOnSegment:tr,clipSegment:ho,_getEdgeIntersection:Ne,_getBitCode:Ft,_sqClosestPointOnSegment:xe,isFlat:dt,_flat:lo,polylineCenter:uo},Di={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new H(t.y,t.x)},bounds:new W([-180,-90],[180,90])},Ui={R:6378137,R_MINOR:6356752314245179e-9,bounds:new W([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,l=Math.sqrt(1-s*s),_=l*Math.sin(n),v=Math.tan(Math.PI/4-n/2)/Math.pow((1-_)/(1+_),l/2);return n=-i*Math.log(Math.max(v,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,s=Math.sqrt(1-n*n),l=Math.exp(-t.y/i),_=Math.PI/2-2*Math.atan(l),v=0,y=.1,b;v<15&&Math.abs(y)>1e-7;v++)b=s*Math.sin(_),b=Math.pow((1-b)/(1+b),s/2),y=Math.PI/2-2*Math.atan(l*b)-_,_+=y;return new H(_*e,t.x*e/i)}},sr={__proto__:null,LonLat:Di,Mercator:Ui,SphericalMercator:di},rr=f({},At,{code:"EPSG:3395",projection:Ui,transformation:function(){var t=.5/(Math.PI*Ui.R);return fe(t,.5,-t,.5)}()}),co=f({},At,{code:"EPSG:4326",projection:Di,transformation:fe(1/180,1,-1/180,.5)}),ar=f({},Pt,{projection:Di,transformation:fe(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Pt.Earth=At,Pt.EPSG3395=rr,Pt.EPSG3857=_i,Pt.EPSG900913=fs,Pt.EPSG4326=co,Pt.Simple=ar;var mt=de.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[d(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[d(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});R.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=d(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=d(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:function(t){return d(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?$(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[d(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=d(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=s.minZoom===void 0?t:Math.min(t,s.minZoom),e=s.maxZoom===void 0?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Yt=mt.extend({initialize:function(t,e){C(this,e),this._layers={};var i,n;if(t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var 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:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),i,n;for(i in this._layers)n=this._layers[i],n[t]&&n[t].apply(n,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return d(t)}}),hr=function(t,e){return new Yt(t,e)},bt=Yt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Yt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Yt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new at;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),lr=function(t,e){return new bt(t,e)},Xt=xt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){C(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];typeof n=="number"&&(n=[n,n]);var s=O(n),l=O(e==="shadow"&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),l&&(t.style.marginLeft=-l.x+"px",t.style.marginTop=-l.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return S.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ur(t){return new Xt(t)}var Pe=Xt.extend({options:{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:function(t){return typeof Pe.imagePath!="string"&&(Pe.imagePath=this._detectIconPath()),(this.options.imagePath||Pe.imagePath)+Xt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(i,n,s){var l=n.exec(i);return l&&l[s]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=D("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),fo=Lt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ot(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),I(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&j(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,l=Ut(e._icon),_=i.getPixelBounds(),v=i.getPixelOrigin(),y=rt(_.min._subtract(v).add(s),_.max._subtract(v).subtract(s));if(!y.contains(l)){var b=O((Math.max(y.max.x,l.x)-y.max.x)/(_.max.x-y.max.x)-(Math.min(y.min.x,l.x)-y.min.x)/(_.min.x-y.min.x),(Math.max(y.max.y,l.y)-y.max.y)/(_.max.y-y.max.y)-(Math.min(y.min.y,l.y)-y.min.y)/(_.min.y-y.min.y)).multiplyBy(n);i.panBy(b,{animate:!1}),this._draggable._newPos._add(b),this._draggable._startPos._add(b),K(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=st(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(ut(this._panRequest),this._panRequest=st(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Ut(e._icon),s=e._map.layerPointToLatLng(n);i&&K(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){ut(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Re=mt.extend({options:{icon:new Pe,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){C(this,e),this._latlng=N(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&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:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),I(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Z(i,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),l=!1;s!==this._shadow&&(this._removeShadow(),l=!0),s&&(I(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&l&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&F(this._icon,"focus",this._panOnFocus,this),V(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&V(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&K(this._icon,t),this._shadow&&K(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(I(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),fo)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new fo(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&ct(this._icon,t),this._shadow&&ct(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?O(e.iconSize):O(0,0),n=e.iconAnchor?O(e.iconAnchor):O(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function cr(t,e){return new Re(t,e)}var zt=mt.extend({options:{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,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return C(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),De=zt.extend({options:{fill:!0,radius:10},initialize:function(t,e){C(this,e),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return zt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new W(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function dr(t,e){return new De(t,e)}var Hi=De.extend({initialize:function(t,e,i){if(typeof e=="number"&&(e=f({},i,{radius:e})),C(this,e),this._latlng=N(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new at(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:zt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===At.distance){var s=Math.PI/180,l=this._mRadius/At.R/s,_=i.project([e+l,t]),v=i.project([e-l,t]),y=_.add(v).divideBy(2),b=i.unproject(y).lat,M=Math.acos((Math.cos(l*s)-Math.sin(e*s)*Math.sin(b*s))/(Math.cos(e*s)*Math.cos(b*s)))/s;(isNaN(M)||M===0)&&(M=l/Math.cos(Math.PI/180*e)),this._point=y.subtract(i.getPixelOrigin()),this._radius=isNaN(M)?0:y.x-i.project([b,t-M]).x,this._radiusY=y.y-_.y}else{var E=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(E).x}this._updateBounds()}});function fr(t,e,i){return new Hi(t,e,i)}var Ct=zt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){C(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,i=null,n=xe,s,l,_=0,v=this._parts.length;_<v;_++)for(var y=this._parts[_],b=1,M=y.length;b<M;b++){s=y[b-1],l=y[b];var E=n(t,s,l,!0);E<e&&(e=E,i=n(t,s,l))}return i&&(i.distance=Math.sqrt(e)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return uo(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=N(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new at,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return dt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=dt(t),n=0,s=t.length;n<s;n++)i?(e[n]=N(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new W;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new z(t,t);this._rawPxBounds&&(this._pxBounds=new W([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n=t[0]instanceof H,s=t.length,l,_;if(n){for(_=[],l=0;l<s;l++)_[l]=this._map.latLngToLayerPoint(t[l]),i.extend(_[l]);e.push(_)}else for(l=0;l<s;l++)this._projectLatlngs(t[l],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,i,n,s,l,_,v,y;for(i=0,s=0,l=this._rings.length;i<l;i++)for(y=this._rings[i],n=0,_=y.length;n<_-1;n++)v=ho(y[n],y[n+1],t,n,!0),v&&(e[s]=e[s]||[],e[s].push(v[0]),(v[1]!==y[n+1]||n===_-2)&&(e[s].push(v[1]),s++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=so(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,s,l,_,v,y=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,l=this._parts.length;i<l;i++)for(v=this._parts[i],n=0,_=v.length,s=_-1;n<_;s=n++)if(!(!e&&n===0)&&ro(t,v[s],v[n])<=y)return!0;return!1}});function _r(t,e){return new Ct(t,e)}Ct._flat=lo;var Jt=Ct.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return oo(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ct.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof H&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Ct.prototype._setLatLngs.call(this,t),dt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return dt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new W(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,s=this._rings.length,l;n<s;n++)l=no(this._rings[n],t,!0),l.length&&this._parts.push(l)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,i,n,s,l,_,v,y,b;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(l=0,y=this._parts.length;l<y;l++)for(i=this._parts[l],_=0,b=i.length,v=b-1;_<b;v=_++)n=i[_],s=i[v],n.y>t.y!=s.y>t.y&&t.x<(s.x-n.x)*(t.y-n.y)/(s.y-n.y)+n.x&&(e=!e);return e||Ct.prototype._containsPoint.call(this,t,!0)}});function pr(t,e){return new Jt(t,e)}var Mt=bt.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=$(t)?t:t.features,i,n,s;if(e){for(i=0,n=e.length;i<n;i++)s=e[i],(s.geometries||s.geometry||s.features||s.coordinates)&&this.addData(s);return this}var l=this.options;if(l.filter&&!l.filter(t))return this;var _=Ue(t,l);return _?(_.feature=Fe(t),_.defaultOptions=_.options,this.resetStyle(_),l.onEachFeature&&l.onEachFeature(t,_),this.addLayer(_)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=f({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function Ue(t,e){var i=t.type==="Feature"?t.geometry:t,n=i?i.coordinates:null,s=[],l=e&&e.pointToLayer,_=e&&e.coordsToLatLng||Gi,v,y,b,M;if(!n&&!i)return null;switch(i.type){case"Point":return v=_(n),_o(l,t,v,e);case"MultiPoint":for(b=0,M=n.length;b<M;b++)v=_(n[b]),s.push(_o(l,t,v,e));return new bt(s);case"LineString":case"MultiLineString":return y=He(n,i.type==="LineString"?0:1,_),new Ct(y,e);case"Polygon":case"MultiPolygon":return y=He(n,i.type==="Polygon"?1:2,_),new Jt(y,e);case"GeometryCollection":for(b=0,M=i.geometries.length;b<M;b++){var E=Ue({geometry:i.geometries[b],type:"Feature",properties:t.properties},e);E&&s.push(E)}return new bt(s);case"FeatureCollection":for(b=0,M=i.features.length;b<M;b++){var B=Ue(i.features[b],e);B&&s.push(B)}return new bt(s);default:throw new Error("Invalid GeoJSON object.")}}function _o(t,e,i,n){return t?t(e,i):new Re(i,n&&n.markersInheritOptions&&n)}function Gi(t){return new H(t[1],t[0],t[2])}function He(t,e,i){for(var n=[],s=0,l=t.length,_;s<l;s++)_=e?He(t[s],e-1,i):(i||Gi)(t[s]),n.push(_);return n}function Fi(t,e){return t=N(t),t.alt!==void 0?[P(t.lng,e),P(t.lat,e),P(t.alt,e)]:[P(t.lng,e),P(t.lat,e)]}function Ge(t,e,i,n){for(var s=[],l=0,_=t.length;l<_;l++)s.push(e?Ge(t[l],dt(t[l])?0:e-1,i,n):Fi(t[l],n));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function Qt(t,e){return t.feature?f({},t.feature,{geometry:e}):Fe(e)}function Fe(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var $i={toGeoJSON:function(t){return Qt(this,{type:"Point",coordinates:Fi(this.getLatLng(),t)})}};Re.include($i),Hi.include($i),De.include($i),Ct.include({toGeoJSON:function(t){var e=!dt(this._latlngs),i=Ge(this._latlngs,e?1:0,!1,t);return Qt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Jt.include({toGeoJSON:function(t){var e=!dt(this._latlngs),i=e&&!dt(this._latlngs[0]),n=Ge(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Qt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Yt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Qt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(s){if(s.toGeoJSON){var l=s.toGeoJSON(t);if(i)n.push(l.geometry);else{var _=Fe(l);_.type==="FeatureCollection"?n.push.apply(n,_.features):n.push(_)}}}),i?Qt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function po(t,e){return new Mt(t,e)}var mr=po,$e=mt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=q(e),C(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(I(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){V(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&qt(this._image),this},bringToBack:function(){return this._map&&Kt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:D("img");if(I(e,"leaflet-image-layer"),this._zoomAnimated&&I(e,"leaflet-zoom-animated"),this.options.className&&I(e,this.options.className),e.onselectstart=m,e.onmousemove=m,e.onload=a(this.fire,this,"load"),e.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Dt(this._image,i,e)},_reset:function(){var t=this._image,e=new W(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();K(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ct(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),gr=function(t,e,i){return new $e(t,e,i)},mo=$e.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:D("video");if(I(e,"leaflet-image-layer"),this._zoomAnimated&&I(e,"leaflet-zoom-animated"),this.options.className&&I(e,this.options.className),e.onselectstart=m,e.onmousemove=m,e.onloadeddata=a(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],s=0;s<i.length;s++)n.push(i[s].src);this._url=i.length>0?n:[e.src];return}$(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var l=0;l<this._url.length;l++){var _=D("source");_.src=this._url[l],e.appendChild(_)}}});function vr(t,e,i){return new mo(t,e,i)}var go=$e.extend({_initImage:function(){var t=this._image=this._url;I(t,"leaflet-image-layer"),this._zoomAnimated&&I(t,"leaflet-zoom-animated"),this.options.className&&I(t,this.options.className),t.onselectstart=m,t.onmousemove=m}});function yr(t,e,i){return new go(t,e,i)}var wt=mt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof H||$(t))?(this._latlng=N(t),C(this,e)):(C(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ct(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ct(this._container,1),this.bringToFront(),this.options.interactive&&(I(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ct(this._container,0),this._removeTimeout=setTimeout(a(V,void 0,this._container),200)):V(this._container),this.options.interactive&&(j(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&qt(this._container),this},bringToBack:function(){return this._map&&Kt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof bt){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];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)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),i=this._getAnchor();this._zoomAnimated?K(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});R.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),mt.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(C(s,n),s._source=this):(s=e&&!n?e:new t(n,this),s.setContent(i)),s}});var We=wt.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,wt.prototype.openOn.call(this,t)},onAdd:function(t){wt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zt||this._source.on("preclick",Ht))},onRemove:function(t){wt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zt||this._source.off("preclick",Ht))},getEvents:function(){var t=wt.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=D("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=D("div",t+"-content-wrapper",e);if(this._contentNode=D("div",t+"-content",i),Le(e),zi(this._contentNode),Z(e,"contextmenu",Ht),this._tipContainer=D("div",t+"-tip-container",e),this._tip=D("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=D("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',Z(n,"click",function(s){it(s),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,l="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",I(t,l)):j(t,l),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();K(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new z(this._containerLeft,-i-this._containerBottom);s._add(Ut(this._container));var l=t.layerPointToContainerPoint(s),_=O(this.options.autoPanPadding),v=O(this.options.autoPanPaddingTopLeft||_),y=O(this.options.autoPanPaddingBottomRight||_),b=t.getSize(),M=0,E=0;l.x+n+y.x>b.x&&(M=l.x+n-b.x+y.x),l.x-M-v.x<0&&(M=l.x-v.x),l.y+i+y.y>b.y&&(E=l.y+i-b.y+y.y),l.y-E-v.y<0&&(E=l.y-v.y),(M||E)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,E]))}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Lr=function(t,e){return new We(t,e)};R.mergeOptions({closePopupOnClick:!0}),R.include({openPopup:function(t,e,i){return this._initOverlay(We,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),mt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(We,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:function(){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:function(t){return this._popup&&(this instanceof bt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Gt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof zt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ve=wt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){wt.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:function(t){wt.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=wt.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=D("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,l=n.latLngToContainerPoint(n.getCenter()),_=n.layerPointToContainerPoint(t),v=this.options.direction,y=s.offsetWidth,b=s.offsetHeight,M=O(this.options.offset),E=this._getAnchor();v==="top"?(e=y/2,i=b):v==="bottom"?(e=y/2,i=0):v==="center"?(e=y/2,i=b/2):v==="right"?(e=0,i=b/2):v==="left"?(e=y,i=b/2):_.x<l.x?(v="right",e=0,i=b/2):(v="left",e=y+(M.x+E.x)*2,i=b/2),t=t.subtract(O(e,i,!0)).add(M).add(E),j(s,"leaflet-tooltip-right"),j(s,"leaflet-tooltip-left"),j(s,"leaflet-tooltip-top"),j(s,"leaflet-tooltip-bottom"),I(s,"leaflet-tooltip-"+v),K(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ct(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),wr=function(t,e){return new Ve(t,e)};R.include({openTooltip:function(t,e,i){return this._initOverlay(Ve,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),mt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ve,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof bt||(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:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(Z(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Z(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,i,n;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(e)}});var vo=Xt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(Oe(e),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){var n=O(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function xr(t){return new vo(t)}Xt.Default=Pe;var be=mt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:S.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:function(t){C(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),V(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(qt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Kt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=g(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof z?t:new z(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,i=-t(-1/0,1/0),n=0,s=e.length,l;n<s;n++)l=e[n].style.zIndex,e[n]!==this._container&&l&&(i=t(i,+l));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!S.ielt9){ct(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(!(!s.current||!s.loaded)){var l=Math.min(1,(t-s.loaded)/200);ct(s.el,l),l<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(ut(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=D("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var i in 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)):(V(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||(n=this._levels[t]={},n.el=D("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),m(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)V(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),l=Math.floor(e/2),_=i-1,v=new z(+s,+l);v.z=+_;var y=this._tileCoordsToKey(v),b=this._tiles[y];return b&&b.active?(b.retain=!0,!0):(b&&b.loaded&&(b.retain=!0),_>n?this._retainParent(s,l,_,n):!1)},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var l=2*e;l<2*e+2;l++){var _=new z(s,l);_.z=i+1;var v=this._tileCoordsToKey(_),y=this._tiles[v];if(y&&y.active){y.retain=!0;continue}else y&&y.loaded&&(y.retain=!0);i+1<n&&this._retainChildren(s,l,i+1,n)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var s=Math.round(e);this.options.maxZoom!==void 0&&s>this.options.maxZoom||this.options.minZoom!==void 0&&s<this.options.minZoom?s=void 0:s=this._clampZoom(s);var l=this.options.updateWhenZooming&&s!==this._tileZoom;(!n||l)&&(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),s!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();S.any3d?Dt(t.el,s,n):K(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=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]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),l=e.getSize().divideBy(n*2);return new W(s.subtract(l),s.add(l))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),l=s.getCenter(),_=[],v=this.options.keepBuffer,y=new W(s.getBottomLeft().subtract([v,-v]),s.getTopRight().add([v,-v]));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(var b in this._tiles){var M=this._tiles[b].coords;(M.z!==this._tileZoom||!y.contains(new z(M.x,M.y)))&&(this._tiles[b].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var E=s.min.y;E<=s.max.y;E++)for(var B=s.min.x;B<=s.max.x;B++){var ot=new z(B,E);if(ot.z=this._tileZoom,!!this._isValidTile(ot)){var et=this._tiles[this._tileCoordsToKey(ot)];et?et.current=!0:_.push(ot)}}if(_.sort(function(ht,ee){return ht.distanceTo(l)-ee.distanceTo(l)}),_.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ft=document.createDocumentFragment();for(B=0;B<_.length;B++)this._addTile(_[B],ft);this._level.el.appendChild(ft)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var 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;var n=this._tileCoordsToBounds(t);return q(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i),l=e.unproject(n,t.z),_=e.unproject(s,t.z);return[l,_]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new at(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(V(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){I(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=m,t.onmousemove=m,S.ielt9&&this.options.opacity<1&&ct(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&st(a(this._tileReady,this,t,null,s)),K(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(ct(i.el,0),ut(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(I(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),S.ielt9||!this._map._fadeAnimated?st(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?w(t.x,this._wrapX):t.x,this._wrapY?w(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new W(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Pr(t){return new be(t)}var te=be.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&&S.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),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Z(i,"load",a(this._tileOnLoad,this,e,i)),Z(i,"error",a(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:S.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return G(this._url,f(e,this.options))},_tileOnLoad:function(t,e){S.ielt9?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=m,e.onerror=m,!e.complete)){e.src=nt;var i=this._tiles[t].coords;V(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",nt),be.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===nt))return be.prototype._tileReady.call(this,t,e,i)}});function yo(t,e){return new te(t,e)}var Lo=te.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=f({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var s=e.detectRetina&&S.retina?2:1,l=this.getTileSize();i.width=l.x*s,i.height=l.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,te.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=rt(i.project(e[0]),i.project(e[1])),s=n.min,l=n.max,_=(this._wmsVersion>=1.3&&this._crs===co?[s.y,s.x,l.y,l.x]:[s.x,s.y,l.x,l.y]).join(","),v=te.prototype.getTileUrl.call(this,t);return v+U(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+_},setParams:function(t,e){return f(this.wmsParams,t),e||this.redraw(),this}});function br(t,e){return new Lo(t,e)}te.WMS=Lo,yo.wms=br;var Tt=mt.extend({options:{padding:.1},initialize:function(t){C(this,t),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),I(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),l=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));S.any3d?Dt(this._container,l,i):K(this._container,l)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new W(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wo=Tt.extend({options:{tolerance:0},getEvents:function(){var t=Tt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Tt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Z(t,"mousemove",this._onMouseMove,this),Z(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Z(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){ut(this._redrawRequest),delete this._ctx,V(this._container),F(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Tt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=S.retina?2:1;K(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",S.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Tt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[d(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[d(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,s;for(s=0;s<e.length;s++){if(n=Number(e[s]),isNaN(n))return;i.push(n)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||st(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new W,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var 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()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,s,l,_=t._parts,v=_.length,y=this._ctx;if(v){for(y.beginPath(),i=0;i<v;i++){for(n=0,s=_[i].length;n<s;n++)l=_[i][n],y[n?"lineTo":"moveTo"](l.x,l.y);e&&y.closePath()}this._fillStroke(y,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;s!==1&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,Math.PI*2,!1),s!==1&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),i,n,s=this._drawFirst;s;s=s.next)i=s.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(n=i);this._fireEvent(n?[n]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(j(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,s=this._drawFirst;s;s=s.next)i=s.layer,i.options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(I(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;if(i)i.prev=n;else return;n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;if(n)n.next=i;else return;i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function xo(t){return S.canvas?new wo(t):null}var Ce=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Cr={_initContainer:function(){this._container=D("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Tt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Ce("shape");I(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ce("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[d(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;V(e),t.removeInteractiveTarget(e),delete this._layers[d(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Ce("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=$(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Ce("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){qt(t._container)},_bringToBack:function(t){Kt(t._container)}},je=S.vml?Ce:Cn,Me=Tt.extend({_initContainer:function(){this._container=je("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=je("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){V(this._container),F(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Tt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),K(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=je("path");t.options.className&&I(e,t.options.className),t.options.interactive&&I(e,"leaflet-interactive"),this._updateStyle(t),this._layers[d(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){V(t._path),t.removeInteractiveTarget(t._path),delete this._layers[d(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var 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:function(t,e){this._setPath(t,Mn(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,s="a"+i+","+n+" 0 1,0 ",l=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+s+i*2+",0 "+s+-i*2+",0 ";this._setPath(t,l)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){qt(t._path)},_bringToBack:function(t){Kt(t._path)}});S.vml&&Me.include(Cr);function Po(t){return S.svg||S.vml?new Me(t):null}R.include({getRenderer:function(t){var 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:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xo(t)||Po(t)}});var bo=Jt.extend({initialize:function(t,e){Jt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=q(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Mr(t,e){return new bo(t,e)}Me.create=je,Me.pointsToPath=Mn,Mt.geometryToLayer=Ue,Mt.coordsToLatLng=Gi,Mt.coordsToLatLngs=He,Mt.latLngToCoords=Fi,Mt.latLngsToCoords=Ge,Mt.getFeature=Qt,Mt.asFeature=Fe,R.mergeOptions({boxZoom:!0});var Co=Lt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Z(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){F(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){V(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ge(),Ci(),this._startPoint=this._map.mouseEventToContainerPoint(t),Z(document,{contextmenu:Gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=D("div","leaflet-zoom-box",this._container),I(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new W(this._point,this._startPoint),i=e.getSize();K(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(V(this._box),j(this._container,"leaflet-crosshair")),ve(),Mi(),F(document,{contextmenu:Gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var e=new at(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});R.addInitHook("addHandler","boxZoom",Co),R.mergeOptions({doubleClickZoom:!0});var Mo=Lt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});R.addInitHook("addHandler","doubleClickZoom",Mo),R.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var To=Lt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ot(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))}I(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){j(this._map._container,"leaflet-grab"),j(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=q(this._map.options.maxBounds);this._offsetLimit=rt(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var 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:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var 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:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,l=(n+e+i)%t-e-i,_=Math.abs(s+i)<Math.abs(l+i)?s:l;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=_},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),l=(this._lastTime-this._times[0])/1e3,_=i.easeLinearity,v=s.multiplyBy(_/l),y=v.distanceTo([0,0]),b=Math.min(i.inertiaMaxSpeed,y),M=v.multiplyBy(b/y),E=b/(i.inertiaDeceleration*_),B=M.multiplyBy(-E/2).round();!B.x&&!B.y?e.fire("moveend"):(B=e._limitOffset(B,e.options.maxBounds),st(function(){e.panBy(B,{duration:E,easeLinearity:_,noMoveStart:!0,animate:!0})}))}}});R.addInitHook("addHandler","dragging",To),R.mergeOptions({keyboard:!0,keyboardPanDelta:80});var So=Lt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Z(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),F(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},i=this.keyCodes,n,s;for(n=0,s=i.left.length;n<s;n++)e[i.left[n]]=[-1*t,0];for(n=0,s=i.right.length;n<s;n++)e[i.right[n]]=[t,0];for(n=0,s=i.down.length;n<s;n++)e[i.down[n]]=[0,t];for(n=0,s=i.up.length;n<s;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,n,s;for(n=0,s=i.zoomIn.length;n<s;n++)e[i.zoomIn[n]]=t;for(n=0,s=i.zoomOut.length;n<s;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){Z(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){F(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,i=this._map,n;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(n=this._panKeys[e],t.shiftKey&&(n=O(n).multiplyBy(3)),i.options.maxBounds&&(n=i._limitOffset(O(n),i.options.maxBounds)),i.options.worldCopyJump){var s=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(n)));i.panTo(s)}else i.panBy(n)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;Gt(t)}}});R.addInitHook("addHandler","keyboard",So),R.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ko=Lt.extend({addHooks:function(){Z(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){F(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Jn(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),n),Gt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(this._map.options.wheelPxPerZoomLevel*4),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,l=i?Math.ceil(s/i)*i:s,_=t._limitZoom(e+(this._delta>0?l:-l))-e;this._delta=0,this._startTime=null,_&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+_):t.setZoomAround(this._lastMousePos,e+_))}});R.addInitHook("addHandler","scrollWheelZoom",ko);var Tr=600;R.mergeOptions({tapHold:S.touchNative&&S.safari&&S.mobile,tapTolerance:15});var Eo=Lt.extend({addHooks:function(){Z(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){F(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new z(e.clientX,e.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Z(document,"touchend",it),Z(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Tr),Z(document,"touchend touchcancel contextmenu",this._cancel,this),Z(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){F(document,"touchend",it),F(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),F(document,"touchend touchcancel contextmenu",this._cancel,this),F(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var 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)}});R.addInitHook("addHandler","tapHold",Eo),R.mergeOptions({touchZoom:S.touch,bounceAtZoomLimits:!0});var Ao=Lt.extend({addHooks:function(){I(this._map._container,"leaflet-touch-zoom"),Z(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){j(this._map._container,"leaflet-touch-zoom"),F(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Z(document,"touchmove",this._onTouchMove,this),Z(document,"touchend touchcancel",this._onTouchEnd,this),it(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,s===1)return}else{var l=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(s===1&&l.x===0&&l.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(l),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),ut(this._animRequest);var _=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=st(_,this,!0),it(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ut(this._animRequest),F(document,"touchmove",this._onTouchMove,this),F(document,"touchend touchcancel",this._onTouchEnd,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))}});R.addInitHook("addHandler","touchZoom",Ao),R.BoxZoom=Co,R.DoubleClickZoom=Mo,R.Drag=To,R.Keyboard=So,R.ScrollWheelZoom=ko,R.TapHold=Eo,R.TouchZoom=Ao,h.Bounds=W,h.Browser=S,h.CRS=Pt,h.Canvas=wo,h.Circle=Hi,h.CircleMarker=De,h.Class=xt,h.Control=pt,h.DivIcon=vo,h.DivOverlay=wt,h.DomEvent=Ws,h.DomUtil=Fs,h.Draggable=Ot,h.Evented=de,h.FeatureGroup=bt,h.GeoJSON=Mt,h.GridLayer=be,h.Handler=Lt,h.Icon=Xt,h.ImageOverlay=$e,h.LatLng=H,h.LatLngBounds=at,h.Layer=mt,h.LayerGroup=Yt,h.LineUtil=or,h.Map=R,h.Marker=Re,h.Mixin=Js,h.Path=zt,h.Point=z,h.PolyUtil=Qs,h.Polygon=Jt,h.Polyline=Ct,h.Popup=We,h.PosAnimation=Qn,h.Projection=sr,h.Rectangle=bo,h.Renderer=Tt,h.SVG=Me,h.SVGOverlay=go,h.TileLayer=te,h.Tooltip=Ve,h.Transformation=fi,h.Util=cs,h.VideoOverlay=mo,h.bind=a,h.bounds=rt,h.canvas=xo,h.circle=fr,h.circleMarker=dr,h.control=we,h.divIcon=xr,h.extend=f,h.featureGroup=lr,h.geoJSON=po,h.geoJson=mr,h.gridLayer=Pr,h.icon=ur,h.imageOverlay=gr,h.latLng=N,h.latLngBounds=q,h.layerGroup=hr,h.map=Vs,h.marker=cr,h.point=O,h.polygon=pr,h.polyline=_r,h.popup=Lr,h.rectangle=Mr,h.setOptions=C,h.stamp=d,h.svg=Po,h.svgOverlay=yr,h.tileLayer=yo,h.tooltip=wr,h.transformation=fe,h.version=c,h.videoOverlay=vr;var Sr=window.L;h.noConflict=function(){return window.L=Sr,this},window.L=h})})(oi,oi.exports);var ss=oi.exports;const X=os(ss);var un={exports:{}};(function(p,r){(function(h,c){c(r)})(ln,function(h){var c=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(o){L.Util.setOptions(this,o),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var a=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,a?this._withAnimation:this._noAnimation),this._markerCluster=a?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(o){if(o instanceof L.LayerGroup)return this.addLayers([o]);if(!o.getLatLng)return this._nonPointGroup.addLayer(o),this.fire("layeradd",{layer:o}),this;if(!this._map)return this._needsClustering.push(o),this.fire("layeradd",{layer:o}),this;if(this.hasLayer(o))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(o,this._maxZoom),this.fire("layeradd",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var a=o,u=this._zoom;if(o.__parent)for(;a.__parent._zoom>=u;)a=a.__parent;return this._currentShownBounds.contains(a.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(o,a):this._animationAddLayerNonAnimated(o,a)),this},removeLayer:function(o){return o instanceof L.LayerGroup?this.removeLayers([o]):o.getLatLng?this._map?o.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(o)),this._removeLayer(o,!0),this.fire("layerremove",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),o.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(o)&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,o)&&this.hasLayer(o)&&this._needsRemoving.push({layer:o,latlng:o._latlng}),this.fire("layerremove",{layer:o}),this):(this._nonPointGroup.removeLayer(o),this.fire("layerremove",{layer:o}),this)},addLayers:function(o,a){if(!L.Util.isArray(o))return this.addLayer(o);var u=this._featureGroup,d=this._nonPointGroup,g=this.options.chunkedLoading,w=this.options.chunkInterval,m=this.options.chunkProgress,P=o.length,x=0,T=!0,C;if(this._map){var U=new Date().getTime(),k=L.bind(function(){var $=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();x<P;x++){if(g&&x%200===0){var _t=new Date().getTime()-$;if(_t>w)break}if(C=o[x],C instanceof L.LayerGroup){T&&(o=o.slice(),T=!1),this._extractNonGroupLayers(C,o),P=o.length;continue}if(!C.getLatLng){d.addLayer(C),a||this.fire("layeradd",{layer:C});continue}if(!this.hasLayer(C)&&(this._addLayer(C,this._maxZoom),a||this.fire("layeradd",{layer:C}),C.__parent&&C.__parent.getChildCount()===2)){var nt=C.__parent.getAllChildMarkers(),ce=nt[0]===C?nt[1]:nt[0];u.removeLayer(ce)}}m&&m(x,P,new Date().getTime()-U),x===P?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(k,this.options.chunkDelay)},this);k()}else for(var G=this._needsClustering;x<P;x++){if(C=o[x],C instanceof L.LayerGroup){T&&(o=o.slice(),T=!1),this._extractNonGroupLayers(C,o),P=o.length;continue}if(!C.getLatLng){d.addLayer(C);continue}this.hasLayer(C)||G.push(C)}return this},removeLayers:function(o){var a,u,d=o.length,g=this._featureGroup,w=this._nonPointGroup,m=!0;if(!this._map){for(a=0;a<d;a++){if(u=o[a],u instanceof L.LayerGroup){m&&(o=o.slice(),m=!1),this._extractNonGroupLayers(u,o),d=o.length;continue}this._arraySplice(this._needsClustering,u),w.removeLayer(u),this.hasLayer(u)&&this._needsRemoving.push({layer:u,latlng:u._latlng}),this.fire("layerremove",{layer:u})}return this}if(this._unspiderfy){this._unspiderfy();var P=o.slice(),x=d;for(a=0;a<x;a++){if(u=P[a],u instanceof L.LayerGroup){this._extractNonGroupLayers(u,P),x=P.length;continue}this._unspiderfyLayer(u)}}for(a=0;a<d;a++){if(u=o[a],u instanceof L.LayerGroup){m&&(o=o.slice(),m=!1),this._extractNonGroupLayers(u,o),d=o.length;continue}if(!u.__parent){w.removeLayer(u),this.fire("layerremove",{layer:u});continue}this._removeLayer(u,!0,!0),this.fire("layerremove",{layer:u}),g.hasLayer(u)&&(g.removeLayer(u),u.clusterShow&&u.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(o){o.off(this._childMarkerEventHandlers,this),delete o.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var o=new L.LatLngBounds;this._topClusterLevel&&o.extend(this._topClusterLevel._bounds);for(var a=this._needsClustering.length-1;a>=0;a--)o.extend(this._needsClustering[a].getLatLng());return o.extend(this._nonPointGroup.getBounds()),o},eachLayer:function(o,a){var u=this._needsClustering.slice(),d=this._needsRemoving,g,w,m;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(u),w=u.length-1;w>=0;w--){for(g=!0,m=d.length-1;m>=0;m--)if(d[m].layer===u[w]){g=!1;break}g&&o.call(a,u[w])}this._nonPointGroup.eachLayer(o,a)},getLayers:function(){var o=[];return this.eachLayer(function(a){o.push(a)}),o},getLayer:function(o){var a=null;return o=parseInt(o,10),this.eachLayer(function(u){L.stamp(u)===o&&(a=u)}),a},hasLayer:function(o){if(!o)return!1;var a,u=this._needsClustering;for(a=u.length-1;a>=0;a--)if(u[a]===o)return!0;for(u=this._needsRemoving,a=u.length-1;a>=0;a--)if(u[a].layer===o)return!1;return!!(o.__parent&&o.__parent._group===this)||this._nonPointGroup.hasLayer(o)},zoomToShowLayer:function(o,a){var u=this._map;typeof a!="function"&&(a=function(){});var d=function(){(u.hasLayer(o)||u.hasLayer(o.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",d,this),this.off("animationend",d,this),u.hasLayer(o)?a():o.__parent._icon&&(this.once("spiderfied",a,this),o.__parent.spiderfy()))};o._icon&&this._map.getBounds().contains(o.getLatLng())?a():o.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",d,this),this._map.panTo(o.getLatLng())):(this._map.on("moveend",d,this),this.on("animationend",d,this),o.__parent.zoomToBounds())},onAdd:function(o){this._map=o;var a,u,d;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(o),this._nonPointGroup.addTo(o),this._gridClusters||this._generateInitialClusters(),this._maxLat=o.options.crs.projection.MAX_LATITUDE,a=0,u=this._needsRemoving.length;a<u;a++)d=this._needsRemoving[a],d.newlatlng=d.layer._latlng,d.layer._latlng=d.latlng;for(a=0,u=this._needsRemoving.length;a<u;a++)d=this._needsRemoving[a],this._removeLayer(d.layer,!0),d.layer._latlng=d.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),u=this._needsClustering,this._needsClustering=[],this.addLayers(u,!0)},onRemove:function(o){o.off("zoomend",this._zoomEnd,this),o.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(o){for(var a=o;a&&!a._icon;)a=a.__parent;return a||null},_arraySplice:function(o,a){for(var u=o.length-1;u>=0;u--)if(o[u]===a)return o.splice(u,1),!0},_removeFromGridUnclustered:function(o,a){for(var u=this._map,d=this._gridUnclustered,g=Math.floor(this._map.getMinZoom());a>=g&&d[a].removeObject(o,u.project(o.getLatLng(),a));a--);},_childMarkerDragStart:function(o){o.target.__dragStart=o.target._latlng},_childMarkerMoved:function(o){if(!this._ignoreMove&&!o.target.__dragStart){var a=o.target._popup&&o.target._popup.isOpen();this._moveChild(o.target,o.oldLatLng,o.latlng),a&&o.target.openPopup()}},_moveChild:function(o,a,u){o._latlng=a,this.removeLayer(o),o._latlng=u,this.addLayer(o)},_childMarkerDragEnd:function(o){var a=o.target.__dragStart;delete o.target.__dragStart,a&&this._moveChild(o.target,a,o.target._latlng)},_removeLayer:function(o,a,u){var d=this._gridClusters,g=this._gridUnclustered,w=this._featureGroup,m=this._map,P=Math.floor(this._map.getMinZoom());a&&this._removeFromGridUnclustered(o,this._maxZoom);var x=o.__parent,T=x._markers,C;for(this._arraySplice(T,o);x&&(x._childCount--,x._boundsNeedUpdate=!0,!(x._zoom<P));)a&&x._childCount<=1?(C=x._markers[0]===o?x._markers[1]:x._markers[0],d[x._zoom].removeObject(x,m.project(x._cLatLng,x._zoom)),g[x._zoom].addObject(C,m.project(C.getLatLng(),x._zoom)),this._arraySplice(x.__parent._childClusters,x),x.__parent._markers.push(C),C.__parent=x.__parent,x._icon&&(w.removeLayer(x),u||w.addLayer(C))):x._iconNeedsUpdate=!0,x=x.__parent;delete o.__parent},_isOrIsParent:function(o,a){for(;a;){if(o===a)return!0;a=a.parentNode}return!1},fire:function(o,a,u){if(a&&a.layer instanceof L.MarkerCluster){if(a.originalEvent&&this._isOrIsParent(a.layer._icon,a.originalEvent.relatedTarget))return;o="cluster"+o}L.FeatureGroup.prototype.fire.call(this,o,a,u)},listens:function(o,a){return L.FeatureGroup.prototype.listens.call(this,o,a)||L.FeatureGroup.prototype.listens.call(this,"cluster"+o,a)},_defaultIconCreateFunction:function(o){var a=o.getChildCount(),u=" marker-cluster-";return a<10?u+="small":a<100?u+="medium":u+="large",new L.DivIcon({html:"<div><span>"+a+"</span></div>",className:"marker-cluster"+u,iconSize:new L.Point(40,40)})},_bindEvents:function(){var o=this._map,a=this.options.spiderfyOnMaxZoom,u=this.options.showCoverageOnHover,d=this.options.zoomToBoundsOnClick,g=this.options.spiderfyOnEveryZoom;(a||d||g)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),u&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),o.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(o){var a=o.layer,u=a;if(!(o.type==="clusterkeypress"&&o.originalEvent&&o.originalEvent.keyCode!==13)){for(;u._childClusters.length===1;)u=u._childClusters[0];u._zoom===this._maxZoom&&u._childCount===a._childCount&&this.options.spiderfyOnMaxZoom?a.spiderfy():this.options.zoomToBoundsOnClick&&a.zoomToBounds(),this.options.spiderfyOnEveryZoom&&a.spiderfy(),o.originalEvent&&o.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(o){var a=this._map;this._inZoomAnimation||(this._shownPolygon&&a.removeLayer(this._shownPolygon),o.layer.getChildCount()>2&&o.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(o.layer.getConvexHull(),this.options.polygonOptions),a.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var o=this.options.spiderfyOnMaxZoom,a=this.options.showCoverageOnHover,u=this.options.zoomToBoundsOnClick,d=this.options.spiderfyOnEveryZoom,g=this._map;(o||u||d)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),a&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),g.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var o=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,o),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),o),this._currentShownBounds=o}},_generateInitialClusters:function(){var o=Math.ceil(this._map.getMaxZoom()),a=Math.floor(this._map.getMinZoom()),u=this.options.maxClusterRadius,d=u;typeof u!="function"&&(d=function(){return u}),this.options.disableClusteringAtZoom!==null&&(o=this.options.disableClusteringAtZoom-1),this._maxZoom=o,this._gridClusters={},this._gridUnclustered={};for(var g=o;g>=a;g--)this._gridClusters[g]=new L.DistanceGrid(d(g)),this._gridUnclustered[g]=new L.DistanceGrid(d(g));this._topClusterLevel=new this._markerCluster(this,a-1)},_addLayer:function(o,a){var u=this._gridClusters,d=this._gridUnclustered,g=Math.floor(this._map.getMinZoom()),w,m;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(o),o.on(this._childMarkerEventHandlers,this);a>=g;a--){w=this._map.project(o.getLatLng(),a);var P=u[a].getNearObject(w);if(P){P._addChild(o),o.__parent=P;return}if(P=d[a].getNearObject(w),P){var x=P.__parent;x&&this._removeLayer(P,!1);var T=new this._markerCluster(this,a,P,o);u[a].addObject(T,this._map.project(T._cLatLng,a)),P.__parent=T,o.__parent=T;var C=T;for(m=a-1;m>x._zoom;m--)C=new this._markerCluster(this,m,C),u[m].addObject(C,this._map.project(P.getLatLng(),m));x._addChild(C),this._removeFromGridUnclustered(P,a);return}d[a].addObject(o,w)}this._topClusterLevel._addChild(o),o.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(o){o instanceof L.MarkerCluster&&o._iconNeedsUpdate&&o._updateIcon()})},_enqueue:function(o){this._queue.push(o),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var o=0;o<this._queue.length;o++)this._queue[o].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var o=Math.round(this._map._zoom);this._processQueue(),this._zoom<o&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,o)):this._zoom>o?(this._animationStart(),this._animationZoomOut(this._zoom,o)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(o){var a=this._maxLat;return a!==void 0&&(o.getNorth()>=a&&(o._northEast.lat=1/0),o.getSouth()<=-a&&(o._southWest.lat=-1/0)),o},_animationAddLayerNonAnimated:function(o,a){if(a===o)this._featureGroup.addLayer(o);else if(a._childCount===2){a._addToMap();var u=a.getAllChildMarkers();this._featureGroup.removeLayer(u[0]),this._featureGroup.removeLayer(u[1])}else a._updateIcon()},_extractNonGroupLayers:function(o,a){var u=o.getLayers(),d=0,g;for(a=a||[];d<u.length;d++){if(g=u[d],g instanceof L.LayerGroup){this._extractNonGroupLayers(g,a);continue}a.push(g)}return a},_overrideMarkerIcon:function(o){var a=o.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[o]}});return a}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(o,a){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o),this._topClusterLevel._recursivelyAddChildrenToMap(null,a,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(o,a){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o),this._topClusterLevel._recursivelyAddChildrenToMap(null,a,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(o,a){this._animationAddLayerNonAnimated(o,a)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,a){var u=this._getExpandedVisibleBounds(),d=this._featureGroup,g=Math.floor(this._map.getMinZoom()),w;this._ignoreMove=!0,this._topClusterLevel._recursively(u,o,g,function(m){var P=m._latlng,x=m._markers,T;for(u.contains(P)||(P=null),m._isSingleParent()&&o+1===a?(d.removeLayer(m),m._recursivelyAddChildrenToMap(null,a,u)):(m.clusterHide(),m._recursivelyAddChildrenToMap(P,a,u)),w=x.length-1;w>=0;w--)T=x[w],u.contains(T._latlng)||d.removeLayer(T)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(u,a),d.eachLayer(function(m){!(m instanceof L.MarkerCluster)&&m._icon&&m.clusterShow()}),this._topClusterLevel._recursively(u,o,a,function(m){m._recursivelyRestoreChildPositions(a)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(u,o,g,function(m){d.removeLayer(m),m.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(o,a){this._animationZoomOutSingle(this._topClusterLevel,o-1,a),this._topClusterLevel._recursivelyAddChildrenToMap(null,a,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o,this._getExpandedVisibleBounds())},_animationAddLayer:function(o,a){var u=this,d=this._featureGroup;d.addLayer(o),a!==o&&(a._childCount>2?(a._updateIcon(),this._forceLayout(),this._animationStart(),o._setPos(this._map.latLngToLayerPoint(a.getLatLng())),o.clusterHide(),this._enqueue(function(){d.removeLayer(o),o.clusterShow(),u._animationEnd()})):(this._forceLayout(),u._animationStart(),u._animationZoomOutSingle(a,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(o,a,u){var d=this._getExpandedVisibleBounds(),g=Math.floor(this._map.getMinZoom());o._recursivelyAnimateChildrenInAndAddSelfToMap(d,g,a+1,u);var w=this;this._forceLayout(),o._recursivelyBecomeVisible(d,u),this._enqueue(function(){if(o._childCount===1){var m=o._markers[0];this._ignoreMove=!0,m.setLatLng(m.getLatLng()),this._ignoreMove=!1,m.clusterShow&&m.clusterShow()}else o._recursively(d,u,g,function(P){P._recursivelyRemoveChildrenFromMap(d,g,a+1)});w._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(o){return new L.MarkerClusterGroup(o)};var f=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(o,a,u,d){L.Marker.prototype.initialize.call(this,u?u._cLatLng||u.getLatLng():new L.LatLng(0,0),{icon:this,pane:o.options.clusterPane}),this._group=o,this._zoom=a,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,u&&this._addChild(u),d&&this._addChild(d)},getAllChildMarkers:function(o,a){o=o||[];for(var u=this._childClusters.length-1;u>=0;u--)this._childClusters[u].getAllChildMarkers(o,a);for(var d=this._markers.length-1;d>=0;d--)a&&this._markers[d].__dragStart||o.push(this._markers[d]);return o},getChildCount:function(){return this._childCount},zoomToBounds:function(o){for(var a=this._childClusters.slice(),u=this._group._map,d=u.getBoundsZoom(this._bounds),g=this._zoom+1,w=u.getZoom(),m;a.length>0&&d>g;){g++;var P=[];for(m=0;m<a.length;m++)P=P.concat(a[m]._childClusters);a=P}d>g?this._group._map.setView(this._latlng,g):d<=w?this._group._map.setView(this._latlng,w+1):this._group._map.fitBounds(this._bounds,o)},getBounds:function(){var o=new L.LatLngBounds;return o.extend(this._bounds),o},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(o,a){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(o),o instanceof L.MarkerCluster?(a||(this._childClusters.push(o),o.__parent=this),this._childCount+=o._childCount):(a||this._markers.push(o),this._childCount++),this.__parent&&this.__parent._addChild(o,!0)},_setClusterCenter:function(o){this._cLatLng||(this._cLatLng=o._cLatLng||o._latlng)},_resetBounds:function(){var o=this._bounds;o._southWest&&(o._southWest.lat=1/0,o._southWest.lng=1/0),o._northEast&&(o._northEast.lat=-1/0,o._northEast.lng=-1/0)},_recalculateBounds:function(){var o=this._markers,a=this._childClusters,u=0,d=0,g=this._childCount,w,m,P,x;if(g!==0){for(this._resetBounds(),w=0;w<o.length;w++)P=o[w]._latlng,this._bounds.extend(P),u+=P.lat,d+=P.lng;for(w=0;w<a.length;w++)m=a[w],m._boundsNeedUpdate&&m._recalculateBounds(),this._bounds.extend(m._bounds),P=m._wLatLng,x=m._childCount,u+=P.lat*x,d+=P.lng*x;this._latlng=this._wLatLng=new L.LatLng(u/g,d/g),this._boundsNeedUpdate=!1}},_addToMap:function(o){o&&(this._backupLatlng=this._latlng,this.setLatLng(o)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(o,a,u){this._recursively(o,this._group._map.getMinZoom(),u-1,function(d){var g=d._markers,w,m;for(w=g.length-1;w>=0;w--)m=g[w],m._icon&&(m._setPos(a),m.clusterHide())},function(d){var g=d._childClusters,w,m;for(w=g.length-1;w>=0;w--)m=g[w],m._icon&&(m._setPos(a),m.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(o,a,u,d){this._recursively(o,d,a,function(g){g._recursivelyAnimateChildrenIn(o,g._group._map.latLngToLayerPoint(g.getLatLng()).round(),u),g._isSingleParent()&&u-1===d?(g.clusterShow(),g._recursivelyRemoveChildrenFromMap(o,a,u)):g.clusterHide(),g._addToMap()})},_recursivelyBecomeVisible:function(o,a){this._recursively(o,this._group._map.getMinZoom(),a,null,function(u){u.clusterShow()})},_recursivelyAddChildrenToMap:function(o,a,u){this._recursively(u,this._group._map.getMinZoom()-1,a,function(d){if(a!==d._zoom)for(var g=d._markers.length-1;g>=0;g--){var w=d._markers[g];u.contains(w._latlng)&&(o&&(w._backupLatlng=w.getLatLng(),w.setLatLng(o),w.clusterHide&&w.clusterHide()),d._group._featureGroup.addLayer(w))}},function(d){d._addToMap(o)})},_recursivelyRestoreChildPositions:function(o){for(var a=this._markers.length-1;a>=0;a--){var u=this._markers[a];u._backupLatlng&&(u.setLatLng(u._backupLatlng),delete u._backupLatlng)}if(o-1===this._zoom)for(var d=this._childClusters.length-1;d>=0;d--)this._childClusters[d]._restorePosition();else for(var g=this._childClusters.length-1;g>=0;g--)this._childClusters[g]._recursivelyRestoreChildPositions(o)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(o,a,u,d){var g,w;this._recursively(o,a-1,u-1,function(m){for(w=m._markers.length-1;w>=0;w--)g=m._markers[w],(!d||!d.contains(g._latlng))&&(m._group._featureGroup.removeLayer(g),g.clusterShow&&g.clusterShow())},function(m){for(w=m._childClusters.length-1;w>=0;w--)g=m._childClusters[w],(!d||!d.contains(g._latlng))&&(m._group._featureGroup.removeLayer(g),g.clusterShow&&g.clusterShow())})},_recursively:function(o,a,u,d,g){var w=this._childClusters,m=this._zoom,P,x;if(a<=m&&(d&&d(this),g&&m===u&&g(this)),m<a||m<u)for(P=w.length-1;P>=0;P--)x=w[P],x._boundsNeedUpdate&&x._recalculateBounds(),o.intersects(x._bounds)&&x._recursively(o,a,u,d,g)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var o=this.options.opacity;return this.setOpacity(0),this.options.opacity=o,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(o){this._cellSize=o,this._sqCellSize=o*o,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(o,a){var u=this._getCoord(a.x),d=this._getCoord(a.y),g=this._grid,w=g[d]=g[d]||{},m=w[u]=w[u]||[],P=L.Util.stamp(o);this._objectPoint[P]=a,m.push(o)},updateObject:function(o,a){this.removeObject(o),this.addObject(o,a)},removeObject:function(o,a){var u=this._getCoord(a.x),d=this._getCoord(a.y),g=this._grid,w=g[d]=g[d]||{},m=w[u]=w[u]||[],P,x;for(delete this._objectPoint[L.Util.stamp(o)],P=0,x=m.length;P<x;P++)if(m[P]===o)return m.splice(P,1),x===1&&delete w[u],!0},eachObject:function(o,a){var u,d,g,w,m,P,x,T=this._grid;for(u in T){m=T[u];for(d in m)for(P=m[d],g=0,w=P.length;g<w;g++)x=o.call(a,P[g]),x&&(g--,w--)}},getNearObject:function(o){var a=this._getCoord(o.x),u=this._getCoord(o.y),d,g,w,m,P,x,T,C,U=this._objectPoint,k=this._sqCellSize,G=null;for(d=u-1;d<=u+1;d++)if(m=this._grid[d],m){for(g=a-1;g<=a+1;g++)if(P=m[g],P)for(w=0,x=P.length;w<x;w++)T=P[w],C=this._sqDist(U[L.Util.stamp(T)],o),(C<k||C<=k&&G===null)&&(k=C,G=T)}return G},_getCoord:function(o){var a=Math.floor(o/this._cellSize);return isFinite(a)?a:o},_sqDist:function(o,a){var u=a.x-o.x,d=a.y-o.y;return u*u+d*d}},function(){L.QuickHull={getDistant:function(o,a){var u=a[1].lat-a[0].lat,d=a[0].lng-a[1].lng;return d*(o.lat-a[0].lat)+u*(o.lng-a[0].lng)},findMostDistantPointFromBaseLine:function(o,a){var u=0,d=null,g=[],w,m,P;for(w=a.length-1;w>=0;w--){if(m=a[w],P=this.getDistant(m,o),P>0)g.push(m);else continue;P>u&&(u=P,d=m)}return{maxPoint:d,newPoints:g}},buildConvexHull:function(o,a){var u=[],d=this.findMostDistantPointFromBaseLine(o,a);return d.maxPoint?(u=u.concat(this.buildConvexHull([o[0],d.maxPoint],d.newPoints)),u=u.concat(this.buildConvexHull([d.maxPoint,o[1]],d.newPoints)),u):[o[0]]},getConvexHull:function(o){var a=!1,u=!1,d=!1,g=!1,w=null,m=null,P=null,x=null,T=null,C=null,U;for(U=o.length-1;U>=0;U--){var k=o[U];(a===!1||k.lat>a)&&(w=k,a=k.lat),(u===!1||k.lat<u)&&(m=k,u=k.lat),(d===!1||k.lng>d)&&(P=k,d=k.lng),(g===!1||k.lng<g)&&(x=k,g=k.lng)}u!==a?(C=m,T=w):(C=x,T=P);var G=[].concat(this.buildConvexHull([C,T],o),this.buildConvexHull([T,C],o));return G}}}(),L.MarkerCluster.include({getConvexHull:function(){var o=this.getAllChildMarkers(),a=[],u,d;for(d=o.length-1;d>=0;d--)u=o[d].getLatLng(),a.push(u);return L.QuickHull.getConvexHull(a)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var o=this.getAllChildMarkers(null,!0),a=this._group,u=a._map,d=u.latLngToLayerPoint(this._latlng),g;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?g=this._group.options.spiderfyShapePositions(o.length,d):o.length>=this._circleSpiralSwitchover?g=this._generatePointsSpiral(o.length,d):(d.y+=10,g=this._generatePointsCircle(o.length,d)),this._animationSpiderfy(o,g)}},unspiderfy:function(o){this._group._inZoomAnimation||(this._animationUnspiderfy(o),this._group._spiderfied=null)},_generatePointsCircle:function(o,a){var u=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+o),d=u/this._2PI,g=this._2PI/o,w=[],m,P;for(d=Math.max(d,35),w.length=o,m=0;m<o;m++)P=this._circleStartAngle+m*g,w[m]=new L.Point(a.x+d*Math.cos(P),a.y+d*Math.sin(P))._round();return w},_generatePointsSpiral:function(o,a){var u=this._group.options.spiderfyDistanceMultiplier,d=u*this._spiralLengthStart,g=u*this._spiralFootSeparation,w=u*this._spiralLengthFactor*this._2PI,m=0,P=[],x;for(P.length=o,x=o;x>=0;x--)x<o&&(P[x]=new L.Point(a.x+d*Math.cos(m),a.y+d*Math.sin(m))._round()),m+=g/d+x*5e-4,d+=w/m;return P},_noanimationUnspiderfy:function(){var o=this._group,a=o._map,u=o._featureGroup,d=this.getAllChildMarkers(null,!0),g,w;for(o._ignoreMove=!0,this.setOpacity(1),w=d.length-1;w>=0;w--)g=d[w],u.removeLayer(g),g._preSpiderfyLatlng&&(g.setLatLng(g._preSpiderfyLatlng),delete g._preSpiderfyLatlng),g.setZIndexOffset&&g.setZIndexOffset(0),g._spiderLeg&&(a.removeLayer(g._spiderLeg),delete g._spiderLeg);o.fire("unspiderfied",{cluster:this,markers:d}),o._ignoreMove=!1,o._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(o,a){var u=this._group,d=u._map,g=u._featureGroup,w=this._group.options.spiderLegPolylineOptions,m,P,x,T;for(u._ignoreMove=!0,m=0;m<o.length;m++)T=d.layerPointToLatLng(a[m]),P=o[m],x=new L.Polyline([this._latlng,T],w),d.addLayer(x),P._spiderLeg=x,P._preSpiderfyLatlng=P._latlng,P.setLatLng(T),P.setZIndexOffset&&P.setZIndexOffset(1e6),g.addLayer(P);this.setOpacity(.3),u._ignoreMove=!1,u.fire("spiderfied",{cluster:this,markers:o})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(o,a){var u=this,d=this._group,g=d._map,w=d._featureGroup,m=this._latlng,P=g.latLngToLayerPoint(m),x=L.Path.SVG,T=L.extend({},this._group.options.spiderLegPolylineOptions),C=T.opacity,U,k,G,$,_t,nt;for(C===void 0&&(C=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),x?(T.opacity=0,T.className=(T.className||"")+" leaflet-cluster-spider-leg"):T.opacity=C,d._ignoreMove=!0,U=0;U<o.length;U++)k=o[U],nt=g.layerPointToLatLng(a[U]),G=new L.Polyline([m,nt],T),g.addLayer(G),k._spiderLeg=G,x&&($=G._path,_t=$.getTotalLength()+.1,$.style.strokeDasharray=_t,$.style.strokeDashoffset=_t),k.setZIndexOffset&&k.setZIndexOffset(1e6),k.clusterHide&&k.clusterHide(),w.addLayer(k),k._setPos&&k._setPos(P);for(d._forceLayout(),d._animationStart(),U=o.length-1;U>=0;U--)nt=g.layerPointToLatLng(a[U]),k=o[U],k._preSpiderfyLatlng=k._latlng,k.setLatLng(nt),k.clusterShow&&k.clusterShow(),x&&(G=k._spiderLeg,$=G._path,$.style.strokeDashoffset=0,G.setStyle({opacity:C}));this.setOpacity(.3),d._ignoreMove=!1,setTimeout(function(){d._animationEnd(),d.fire("spiderfied",{cluster:u,markers:o})},200)},_animationUnspiderfy:function(o){var a=this,u=this._group,d=u._map,g=u._featureGroup,w=o?d._latLngToNewLayerPoint(this._latlng,o.zoom,o.center):d.latLngToLayerPoint(this._latlng),m=this.getAllChildMarkers(null,!0),P=L.Path.SVG,x,T,C,U,k,G;for(u._ignoreMove=!0,u._animationStart(),this.setOpacity(1),T=m.length-1;T>=0;T--)x=m[T],x._preSpiderfyLatlng&&(x.closePopup(),x.setLatLng(x._preSpiderfyLatlng),delete x._preSpiderfyLatlng,G=!0,x._setPos&&(x._setPos(w),G=!1),x.clusterHide&&(x.clusterHide(),G=!1),G&&g.removeLayer(x),P&&(C=x._spiderLeg,U=C._path,k=U.getTotalLength()+.1,U.style.strokeDashoffset=k,C.setStyle({opacity:0})));u._ignoreMove=!1,setTimeout(function(){var $=0;for(T=m.length-1;T>=0;T--)x=m[T],x._spiderLeg&&$++;for(T=m.length-1;T>=0;T--)x=m[T],x._spiderLeg&&(x.clusterShow&&x.clusterShow(),x.setZIndexOffset&&x.setZIndexOffset(0),$>1&&g.removeLayer(x),d.removeLayer(x._spiderLeg),delete x._spiderLeg);u._animationEnd(),u.fire("unspiderfied",{cluster:a,markers:m})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(o){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(o))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(o){this._spiderfied&&this._spiderfied.unspiderfy(o)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(o){o._spiderLeg&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow(),o.setZIndexOffset&&o.setZIndexOffset(0),this._map.removeLayer(o._spiderLeg),delete o._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(o){return o?o instanceof L.MarkerClusterGroup?o=o._topClusterLevel.getAllChildMarkers():o instanceof L.LayerGroup?o=o._layers:o instanceof L.MarkerCluster?o=o.getAllChildMarkers():o instanceof L.Marker&&(o=[o]):o=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(o),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(o),this},_flagParentsIconsNeedUpdate:function(o){var a,u;for(a in o)for(u=o[a].__parent;u;)u._iconNeedsUpdate=!0,u=u.__parent},_refreshSingleMarkerModeMarkers:function(o){var a,u;for(a in o)u=o[a],this.hasLayer(u)&&u.setIcon(this._overrideMarkerIcon(u))}}),L.Marker.include({refreshIconOptions:function(o,a){var u=this.options.icon;return L.setOptions(u,o),this.setIcon(u),a&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),h.MarkerClusterGroup=c,h.MarkerCluster=f,Object.defineProperty(h,"__esModule",{value:!0})})})(un,un.exports),function(){function p(r){return this instanceof p?(this._canvas=r=typeof r=="string"?document.getElementById(r):r,this._ctx=r.getContext("2d"),this._width=r.width,this._height=r.height,this._max=1,void this.clear()):new p(r)}p.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(r,h){return this._data=r,this},max:function(r){return this._max=r,this},add:function(r){return this._data.push(r),this},clear:function(){return this._data=[],this},radius:function(r,h){h=h||15;var c=this._circle=document.createElement("canvas"),f=c.getContext("2d"),o=this._r=r+h;return c.width=c.height=2*o,f.shadowOffsetX=f.shadowOffsetY=200,f.shadowBlur=h,f.shadowColor="black",f.beginPath(),f.arc(o-200,o-200,r,0,2*Math.PI,!0),f.closePath(),f.fill(),this},gradient:function(r){var h=document.createElement("canvas"),c=h.getContext("2d"),f=c.createLinearGradient(0,0,0,256);h.width=1,h.height=256;for(var o in r)f.addColorStop(o,r[o]);return c.fillStyle=f,c.fillRect(0,0,1,256),this._grad=c.getImageData(0,0,1,256).data,this},draw:function(r){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var h=this._ctx;h.clearRect(0,0,this._width,this._height);for(var c,f=0,o=this._data.length;o>f;f++)c=this._data[f],h.globalAlpha=Math.max(c[2]/this._max,r||.05),h.drawImage(this._circle,c[0]-this._r,c[1]-this._r);var a=h.getImageData(0,0,this._width,this._height);return this._colorize(a.data,this._grad),h.putImageData(a,0,0),this},_colorize:function(r,h){for(var c,f=3,o=r.length;o>f;f+=4)c=4*r[f],c&&(r[f-3]=h[c],r[f-2]=h[c+1],r[f-1]=h[c+2])}},window.simpleheat=p}(),L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(p,r){this._latlngs=p,L.setOptions(this,r)},setLatLngs:function(p){return this._latlngs=p,this.redraw()},addLatLng:function(p){return this._latlngs.push(p),this.redraw()},setOptions:function(p){return L.setOptions(this,p),this._heat&&this._updateOptions(),this.redraw()},redraw:function(){return!this._heat||this._frame||this._map._animating||(this._frame=L.Util.requestAnimFrame(this._redraw,this)),this},onAdd:function(p){this._map=p,this._canvas||this._initCanvas(),p._panes.overlayPane.appendChild(this._canvas),p.on("moveend",this._reset,this),p.options.zoomAnimation&&L.Browser.any3d&&p.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(p){p.getPanes().overlayPane.removeChild(this._canvas),p.off("moveend",this._reset,this),p.options.zoomAnimation&&p.off("zoomanim",this._animateZoom,this)},addTo:function(p){return p.addLayer(this),this},_initCanvas:function(){var p=this._canvas=L.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),r=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);p.style[r]="50% 50%";var h=this._map.getSize();p.width=h.x,p.height=h.y;var c=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(p,"leaflet-zoom-"+(c?"animated":"hide")),this._heat=simpleheat(p),this._updateOptions()},_updateOptions:function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},_reset:function(){var p=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,p);var r=this._map.getSize();this._heat._width!==r.x&&(this._canvas.width=this._heat._width=r.x),this._heat._height!==r.y&&(this._canvas.height=this._heat._height=r.y),this._redraw()},_redraw:function(){var p,r,h,c,f,o,a,u,d,g=[],w=this._heat._r,m=this._map.getSize(),P=new L.Bounds(L.point([-w,-w]),m.add([w,w])),x=this.options.max===void 0?1:this.options.max,T=this.options.maxZoom===void 0?this._map.getMaxZoom():this.options.maxZoom,C=1/Math.pow(2,Math.max(0,Math.min(T-this._map.getZoom(),12))),U=w/2,k=[],G=this._map._getMapPanePos(),$=G.x%U,_t=G.y%U;for(p=0,r=this._latlngs.length;r>p;p++)if(h=this._map.latLngToContainerPoint(this._latlngs[p]),P.contains(h)){f=Math.floor((h.x-$)/U)+2,o=Math.floor((h.y-_t)/U)+2;var nt=this._latlngs[p].alt!==void 0?this._latlngs[p].alt:this._latlngs[p][2]!==void 0?+this._latlngs[p][2]:1;d=nt*C,k[o]=k[o]||[],c=k[o][f],c?(c[0]=(c[0]*c[2]+h.x*d)/(c[2]+d),c[1]=(c[1]*c[2]+h.y*d)/(c[2]+d),c[2]+=d):k[o][f]=[h.x,h.y,d]}for(p=0,r=k.length;r>p;p++)if(k[p])for(a=0,u=k[p].length;u>a;a++)c=k[p][a],c&&g.push([Math.round(c[0]),Math.round(c[1]),Math.min(c[2],x)]);this._heat.data(g).draw(this.options.minOpacity),this._frame=null},_animateZoom:function(p){var r=this._map.getZoomScale(p.zoom),h=this._map._getCenterOffset(p.center)._multiplyBy(-r).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,h,r):this._canvas.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(h)+" scale("+r+")"}}),L.heatLayer=function(p,r){return new L.HeatLayer(p,r)};const rs=".leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-in;-moz-transition:-moz-transform .3s ease-out,opacity .3s ease-in;-o-transition:-o-transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset .3s ease-out,-webkit-stroke-opacity .3s ease-in;-moz-transition:-moz-stroke-dashoffset .3s ease-out,-moz-stroke-opacity .3s ease-in;-o-transition:-o-stroke-dashoffset .3s ease-out,-o-stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}",as=".marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px}";function ue(){return crypto.randomUUID()}const cn="#1a3a4a",si="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGOQsvICAAEQAJ+lYp46AAAAAElFTkSuQmCC",ri={satellite:{minZoom:0,maxZoom:8,extension:"jpg",folder:"styleSatelite"},atlas:{minZoom:0,maxZoom:5,extension:"jpg",folder:"styleAtlas"},grid:{minZoom:0,maxZoom:5,extension:"png",folder:"styleGrid"}},dn={satellite:"Satellite",atlas:"Atlas",grid:"Grid"},ai=["satellite","atlas","grid"],fn={centerX:117.3,centerY:172.8,scaleX:.02072,scaleY:.0205,ln2:Math.LN2},gt={zoom:3,minZoom:1,maxZoom:5,center:[0,0],maxBounds:[[-4e3,-5500],[8e3,6e3]],maxBoundsViscosity:1,tileBaseUrl:"mapStyles",blipsUrl:"blips",defaultStyle:"satellite"};function _n(){const{centerX:p,centerY:r,scaleX:h,scaleY:c,ln2:f}=fn;return Object.assign({},X.CRS.Simple,{projection:X.Projection.LonLat,scale(o){return Math.pow(2,o)},zoom(o){return Math.log(o)/f},distance(o,a){return Math.hypot(a.lng-o.lng,a.lat-o.lat)},transformation:new X.Transformation(h,p,-c,r),infinite:!0})}const hi="Markers";function pn(p,r){const h=r.id??ue(),c=r.group??hi,f=p.find(a=>a.id===h);if(f)return f.x=r.x,f.y=r.y,f.icon=r.icon,f.popup=r.popup,f.group=c,{entry:f,isUpdate:!0};const o={id:h,x:r.x,y:r.y,icon:r.icon,popup:r.popup,group:c};return p.push(o),{entry:o,isUpdate:!1}}function mn(p,r){p._leaflet&&(p._leaflet.setLatLng([p.y,p.x]),p._leaflet.setIcon(r(p.icon)),p.popup?(p._leaflet.unbindPopup(),p._leaflet.bindPopup(p.popup)):p._leaflet.unbindPopup())}const Rt={color:"#3388ff",weight:3,opacity:1,fillColor:"#3388ff",fillOpacity:.2,group:"Shapes"};function li(p){return{id:p.id??ue(),type:p.type,points:p.points,color:p.color??Rt.color,weight:p.weight??Rt.weight,opacity:p.opacity??Rt.opacity,fillColor:p.fillColor??p.color??Rt.fillColor,fillOpacity:p.fillOpacity??Rt.fillOpacity,popup:p.popup,group:p.group??Rt.group,label:p.label}}function ui(p,r){const h=r.id??ue(),c=p.findIndex(o=>o.id===h);if(c!==-1){const o=li({...r,id:h});return o._leaflet=p[c]._leaflet,o._labelMarker=p[c]._labelMarker,p[c]=o,{entry:o,isUpdate:!0}}const f=li({...r,id:h});return p.push(f),{entry:f,isUpdate:!1}}function gn(p){if(p.length===0)return[0,0];let r=0,h=0;for(const[c,f]of p)r+=c,h+=f;return[r/p.length,h/p.length]}function vn(p){const r=p.fontSize??12,h=p.color??"#fff",c=p.className??"";return X.divIcon({className:`gta-shape-label ${c}`.trim(),html:`<span style="
|
|
31
|
+
font-size: ${r}px;
|
|
32
|
+
color: ${h};
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
">${p.text}</span>`,iconSize:[0,0],iconAnchor:[0,0]})}const hs=Io`
|
|
37
|
+
:host {
|
|
38
|
+
--gta-water-color: #1a3a4a;
|
|
39
|
+
|
|
40
|
+
display: block;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
background: var(--gta-water-color);
|
|
44
|
+
}
|
|
45
|
+
#map-container {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
background: var(--gta-water-color);
|
|
49
|
+
}
|
|
50
|
+
.leaflet-container {
|
|
51
|
+
background: var(--gta-water-color) !important;
|
|
52
|
+
}
|
|
53
|
+
.leaflet-tile-pane {
|
|
54
|
+
background: var(--gta-water-color);
|
|
55
|
+
}
|
|
56
|
+
`;var ls=Object.defineProperty,us=Object.getOwnPropertyDescriptor,J=(p,r,h,c)=>{for(var f=c>1?void 0:c?us(r,h):r,o=p.length-1,a;o>=0;o--)(a=p[o])&&(f=(c?a(r,h,f):a(f))||f);return c&&f&&ls(r,h,f),f};A.GtaVMap=class extends le{constructor(){super(...arguments),this.leafletCssUrl="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css",this.tileBaseUrl=gt.tileBaseUrl,this.defaultStyle=gt.defaultStyle,this.zoom=gt.zoom,this.minZoom=gt.minZoom,this.maxZoom=gt.maxZoom,this.maxBounds=gt.maxBounds,this.maxBoundsViscosity=gt.maxBoundsViscosity,this.blipsUrl=gt.blipsUrl,this.showLayerControl=!1,this.disableClustering=!1,this.placeMode=!1,this.markers=[],this.shapes=[],this.showHeatmap=!1,this._markerEntries=[],this._shapeEntries=[],this._overlayGroups=new Map,this._tileLayers={}}get crs(){return this._crs}set crs(r){this._crs=r}addMarker(r){var o;const h=(o=this._markerEntries.find(a=>a.id===r.id))==null?void 0:o.group,{entry:c,isUpdate:f}=pn(this._markerEntries,r);if(this._map){if(f)if(h&&h!==c.group&&c._leaflet){const a=this._overlayGroups.get(h);a&&a.removeLayer(c._leaflet),c._leaflet=void 0,this._addLeafletMarker(c)}else mn(c,a=>this._createIcon(a));else this._addLeafletMarker(c);this._updateHeatmap()}return c.id}removeMarker(r){const h=this._markerEntries.findIndex(f=>f.id===r);if(h===-1)return!1;const c=this._markerEntries[h];if(c._leaflet){const f=this._overlayGroups.get(c.group);f&&f.removeLayer(c._leaflet)}return this._markerEntries.splice(h,1),this._updateHeatmap(),!0}getMarkers(){return this._markerEntries.map(({_leaflet:r,...h})=>h)}clearMarkers(){for(const r of this._markerEntries)if(r._leaflet){const h=this._overlayGroups.get(r.group);h&&h.removeLayer(r._leaflet)}this._markerEntries.length=0,this._updateHeatmap()}addShape(r){const h=r.id?this._shapeEntries.find(a=>a.id===r.id):void 0,c=h==null?void 0:h.group,{entry:f,isUpdate:o}=ui(this._shapeEntries,r);return this._map&&(o&&f._leaflet&&(this._removeShapeFromGroup(f,c),f._leaflet=void 0,f._labelMarker=void 0),this._addLeafletShape(f)),f.id}_removeShapeFromGroup(r,h){if(!h||!r._leaflet)return;const c=this._overlayGroups.get(h);c&&(c.removeLayer(r._leaflet),r._labelMarker&&c.removeLayer(r._labelMarker))}removeShape(r){const h=this._shapeEntries.findIndex(o=>o.id===r);if(h===-1)return!1;const c=this._shapeEntries[h],f=this._overlayGroups.get(c.group);return f&&(c._leaflet&&f.removeLayer(c._leaflet),c._labelMarker&&f.removeLayer(c._labelMarker)),this._shapeEntries.splice(h,1),!0}getShapes(){return this._shapeEntries.map(({_leaflet:r,_labelMarker:h,...c})=>c)}clearShapes(){for(const r of this._shapeEntries){const h=this._overlayGroups.get(r.group);h&&(r._leaflet&&h.removeLayer(r._leaflet),r._labelMarker&&h.removeLayer(r._labelMarker))}this._shapeEntries.length=0}render(){return jo`
|
|
57
|
+
<link rel="stylesheet" href="${this.leafletCssUrl}" @load=${this._onCssLoad}>
|
|
58
|
+
<div id="map-container"></div>
|
|
59
|
+
`}_onCssLoad(){this._map||this._initMap()}firstUpdated(){const r=this.renderRoot.querySelector("link");r!=null&&r.sheet&&this._initMap()}_initMap(){if(this._map)return;const r=this.renderRoot.querySelector("#map-container");if(!r)return;const h=this._crs??_n();this._buildTileLayers();const c=this._tileLayers[this.defaultStyle]??this._tileLayers.satellite,f={crs:h,minZoom:this.minZoom,maxZoom:this.maxZoom,preferCanvas:!0,layers:[c],center:gt.center,zoom:this.zoom};this.maxBounds&&(f.maxBounds=X.latLngBounds(X.latLng(this.maxBounds[0][0],this.maxBounds[0][1]),X.latLng(this.maxBounds[1][0],this.maxBounds[1][1])),f.maxBoundsViscosity=this.maxBoundsViscosity),this._map=X.map(r,f),this._map.getContainer().style.background=cn,requestAnimationFrame(()=>{var o;(o=this._map)==null||o.invalidateSize()}),this._syncMarkers(),this._syncShapes(),this.showHeatmap&&this._enableHeatmap(),this.showLayerControl&&this._addLayerControl(),this._bindMapEvents(),this._dispatch("map-ready",{map:this._map})}updated(r){if(this._map){if(r.has("markers")&&(this._syncMarkers(),this._updateHeatmap()),r.has("shapes")&&this._syncShapes(),r.has("zoom")&&r.get("zoom")!==void 0&&this._map.setZoom(this.zoom),r.has("defaultStyle")&&r.get("defaultStyle")!==void 0){const h=r.get("defaultStyle");this._switchTileLayer(h,this.defaultStyle)}r.has("showLayerControl")&&this._toggleLayerControl(),r.has("showHeatmap")&&(this.showHeatmap?this._enableHeatmap():this._disableHeatmap(),this._rebuildLayerControl())}}_bindMapEvents(){this._map&&this._map.on("click",r=>{const h={x:r.latlng.lng,y:r.latlng.lat};this._dispatch("map-click",h),this.placeMode&&this._dispatch("marker-placed",h)})}_getOrCreateOverlayGroup(r){const h=this._overlayGroups.get(r);if(h)return h;const c=this.disableClustering?X.layerGroup():X.markerClusterGroup();return this._overlayGroups.set(r,c),this._map&&(c.addTo(this._map),this._rebuildLayerControl()),c}_resolveTileUrl(r){const c={satellite:this.satelliteUrl,atlas:this.atlasUrl,grid:this.gridUrl}[r];if(c)return c;const f=ri[r];return`${this.tileBaseUrl}/${f.folder}/{z}/{x}/{y}.${f.extension}`}_buildTileLayers(){for(const r of ai){const h=this._resolveTileUrl(r),c=ri[r],f=X.tileLayer(h,{minZoom:c.minZoom,maxZoom:c.maxZoom,noWrap:!0,attribution:"Online map GTA V",errorTileUrl:si});f.on("tileerror",o=>{const a=o.tile;a.src=si}),this._tileLayers[r]=f}}_switchTileLayer(r,h){if(!this._map)return;const c=this._tileLayers[r],f=this._tileLayers[h];c&&f&&c!==f&&(this._map.removeLayer(c),this._map.addLayer(f))}_addLayerControl(){if(this._layerControl||!this._map)return;const r={};for(const c of ai)r[dn[c]]=this._tileLayers[c];const h={};for(const[c,f]of this._overlayGroups)h[c]=f;this._heatLayer&&(h.Heatmap=this._heatLayer),this._layerControl=X.control.layers(r,h).addTo(this._map)}_rebuildLayerControl(){!this._map||!this.showLayerControl||(this._layerControl&&(this._map.removeControl(this._layerControl),this._layerControl=void 0),this._addLayerControl())}_toggleLayerControl(){this._map&&(this.showLayerControl?this._addLayerControl():this._layerControl&&(this._map.removeControl(this._layerControl),this._layerControl=void 0))}_createIcon(r){return X.icon({iconUrl:`${this.blipsUrl}/${r}.png`,iconSize:[20,20],iconAnchor:[20,20],popupAnchor:[-10,-27]})}_addLeafletMarker(r){const h=this._getOrCreateOverlayGroup(r.group),c=this._createIcon(r.icon),f=X.marker([r.y,r.x],{icon:c}).addTo(h);r.popup&&f.bindPopup(r.popup),f.on("click",()=>{this._dispatch("marker-click",{id:r.id,x:r.x,y:r.y,icon:r.icon,popup:r.popup})}),r._leaflet=f}_syncMarkers(){for(const h of this._markerEntries){if(h._leaflet){const c=this._overlayGroups.get(h.group);c&&c.removeLayer(h._leaflet)}h._leaflet=void 0}const r=typeof this.markers=="string"?JSON.parse(this.markers):this.markers;for(const h of r){const c=h.id??ue(),f=h.group??hi,o={...h,id:c,group:f};this._addLeafletMarker(o)}for(const h of this._markerEntries)this._addLeafletMarker(h)}_addLeafletShape(r){const h=this._getOrCreateOverlayGroup(r.group),c=r.points.map(([o,a])=>X.latLng(a,o)),f={color:r.color,weight:r.weight,opacity:r.opacity};if(r.type==="polygon"?(f.fillColor=r.fillColor,f.fillOpacity=r.fillOpacity,r._leaflet=X.polygon(c,f).addTo(h)):r._leaflet=X.polyline(c,f).addTo(h),r.popup&&r._leaflet.bindPopup(r.popup),r.label){const[o,a]=gn(r.points),u=vn(r.label);r._labelMarker=X.marker([a,o],{icon:u,interactive:!1}).addTo(h)}}_syncShapes(){for(const h of this._shapeEntries){if(h._leaflet){const c=this._overlayGroups.get(h.group);c&&(c.removeLayer(h._leaflet),h._labelMarker&&c.removeLayer(h._labelMarker))}h._leaflet=void 0,h._labelMarker=void 0}this._shapeEntries.length=0;const r=typeof this.shapes=="string"?JSON.parse(this.shapes):this.shapes;for(const h of r){const{entry:c}=ui(this._shapeEntries,h);this._addLeafletShape(c)}}_getHeatmapData(){return[...typeof this.markers=="string"?JSON.parse(this.markers):this.markers,...this._markerEntries].map(c=>[c.y,c.x])}_enableHeatmap(){if(!this._map||this._heatLayer)return;const r=this._getHeatmapData();this._heatLayer=X.heatLayer(r,{radius:40,blur:20,max:1,minOpacity:.3,maxZoom:this.zoom}),this._heatLayer.addTo(this._map),this._rebuildLayerControl()}_disableHeatmap(){!this._map||!this._heatLayer||(this._map.removeLayer(this._heatLayer),this._heatLayer=void 0,this._rebuildLayerControl())}_updateHeatmap(){if(!this._heatLayer)return;const r=this._getHeatmapData();this._heatLayer.setLatLngs(r)}_dispatch(r,h){this.dispatchEvent(new CustomEvent(r,{detail:h,bubbles:!0,composed:!0}))}},A.GtaVMap.styles=[hs,Xe(rs),Xe(as)],J([tt({type:String,attribute:"leaflet-css-url"})],A.GtaVMap.prototype,"leafletCssUrl",2),J([tt({type:String,attribute:"tile-base-url"})],A.GtaVMap.prototype,"tileBaseUrl",2),J([tt({type:String,attribute:"satellite-url"})],A.GtaVMap.prototype,"satelliteUrl",2),J([tt({type:String,attribute:"atlas-url"})],A.GtaVMap.prototype,"atlasUrl",2),J([tt({type:String,attribute:"grid-url"})],A.GtaVMap.prototype,"gridUrl",2),J([tt({type:String,attribute:"default-style"})],A.GtaVMap.prototype,"defaultStyle",2),J([tt({type:Number})],A.GtaVMap.prototype,"zoom",2),J([tt({type:Number,attribute:"min-zoom"})],A.GtaVMap.prototype,"minZoom",2),J([tt({type:Number,attribute:"max-zoom"})],A.GtaVMap.prototype,"maxZoom",2),J([tt({type:Array,attribute:"max-bounds"})],A.GtaVMap.prototype,"maxBounds",2),J([tt({type:Number,attribute:"max-bounds-viscosity"})],A.GtaVMap.prototype,"maxBoundsViscosity",2),J([tt({type:String,attribute:"blips-url"})],A.GtaVMap.prototype,"blipsUrl",2),J([tt({type:Boolean,attribute:"show-layer-control"})],A.GtaVMap.prototype,"showLayerControl",2),J([tt({type:Boolean,attribute:"disable-clustering"})],A.GtaVMap.prototype,"disableClustering",2),J([tt({type:Boolean,attribute:"place-mode"})],A.GtaVMap.prototype,"placeMode",2),J([tt({type:Array})],A.GtaVMap.prototype,"markers",2),J([tt({type:Array})],A.GtaVMap.prototype,"shapes",2),J([tt({type:Boolean,attribute:"show-heatmap"})],A.GtaVMap.prototype,"showHeatmap",2),A.GtaVMap=J([es("gta-v-map")],A.GtaVMap),A.DEFAULT_MAP_CONFIG=gt,A.DEFAULT_MARKER_GROUP=hi,A.GTA_CRS_CONFIG=fn,A.MAP_STYLES=ai,A.SHAPE_DEFAULTS=Rt,A.STYLE_LABELS=dn,A.TILE_CONFIGS=ri,A.WATER_COLOR=cn,A.WATER_TILE_DATA_URI=si,A.computeCentroid=gn,A.createGtaCRS=_n,A.createLabelIcon=vn,A.createShapeEntry=li,A.generateId=ue,A.updateLeafletMarker=mn,A.upsertMarkerEntry=pn,A.upsertShapeEntry=ui,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|