@edgepdf/viewer-js 0.1.0 → 0.1.1
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/README.md +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/lib/coordinate-mapper.d.ts +4 -4
- package/dist/lib/coordinate-mapper.d.ts.map +1 -1
- package/dist/lib/marker-manager.d.ts +3 -3
- package/dist/lib/marker-manager.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -217,7 +217,7 @@ Creates a new marker from coordinates.
|
|
|
217
217
|
|
|
218
218
|
**Parameters:**
|
|
219
219
|
|
|
220
|
-
- `options.position?:
|
|
220
|
+
- `options.position?: ViewerCoords` - Map coordinates [y, x]
|
|
221
221
|
- `options.imageCoords?: ImageCoords` - Image pixel coordinates {x, y}
|
|
222
222
|
- `options.label?: string` - Marker label/tooltip text
|
|
223
223
|
- `options.description?: string` - Marker description
|
|
@@ -273,7 +273,7 @@ Updates a marker's properties.
|
|
|
273
273
|
|
|
274
274
|
**Returns:** `true` if marker was updated, `false` if not found
|
|
275
275
|
|
|
276
|
-
##### `updateMarkerPosition(id: string, position:
|
|
276
|
+
##### `updateMarkerPosition(id: string, position: ViewerCoords): boolean`
|
|
277
277
|
|
|
278
278
|
Updates a marker's position.
|
|
279
279
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,9 @@ export type { ZoomControlsPosition, ZoomControlsOptions, } from './lib/zoom-cont
|
|
|
9
9
|
export { MarkerManager } from './lib/marker-manager.js';
|
|
10
10
|
export type { CreateMarkerOptions } from './lib/marker-manager.js';
|
|
11
11
|
export { CDNManager } from './lib/cdn-manager.js';
|
|
12
|
-
export type { ImageInfo, TileConfig, ViewerConfig,
|
|
12
|
+
export type { ImageInfo, TileConfig, ViewerConfig, ViewerCoords,
|
|
13
|
+
/***
|
|
14
|
+
* @deprecated Use ViewerCoords instead of LeafletCoords for consistency with viewer terminology
|
|
15
|
+
*/
|
|
16
|
+
ViewerCoords as LeafletCoords, ImageCoords, Marker, MarkerData, MapOptions, ZoomConfig, ZoomState, CoordinateBounds, MarkerEventType, MarkerEvent, MarkerEditHandler, MarkerDeleteHandler, MarkerInteractionConfig, MarkerSelectionState, } from '@edgepdf/types';
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAEtB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAEtB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY;AACZ;;GAEG;AACH,YAAY,IAAI,aAAa,EAC7B,WAAW,EACX,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;600;700&display=swap";.seamless-tiles img,.leaflet-tile{border:none!important;outline:none!important;margin:0!important;padding:0!important}.leaflet-layer{border:none!important}.edgepdf-marker-tooltip{text-align:center;white-space:nowrap}.leaflet-tooltip-top.edgepdf-marker-tooltip:before,.leaflet-tooltip-bottom.edgepdf-marker-tooltip:before{left:50%!important;margin-left:-8px!important}.leaflet-tooltip-left.edgepdf-marker-tooltip:before,.leaflet-tooltip-right.edgepdf-marker-tooltip:before{top:50%!important;margin-top:-8px!important}.edgepdf-marker-popup-actions{display:flex;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #e0e0e0}.edgepdf-marker-popup-edit,.edgepdf-marker-popup-delete{flex:1;padding:6px 12px;border:1px solid #ccc;border-radius:4px;background-color:#fff;color:#333;cursor:pointer;font-size:14px;transition:all .2s ease}.edgepdf-marker-popup-edit:hover{background-color:#f0f0f0;border-color:#999}.edgepdf-marker-popup-delete{color:#d32f2f;border-color:#d32f2f}.edgepdf-marker-popup-delete:hover{background-color:#ffebee;border-color:#b71c1c}.edgepdf-marker-edit-popup{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;font-family:Lato,sans-serif}.edgepdf-marker-edit-popup-overlay{position:absolute;inset:0;background-color:#000000b3;cursor:pointer}.edgepdf-marker-edit-popup-content{position:relative;background-color:#1a1a1a;border-radius:8px;box-shadow:0 4px 20px #00000080;border:1px solid #333;width:90%;max-width:500px;max-height:90vh;overflow:auto;z-index:100001}.edgepdf-marker-edit-popup-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #333}.edgepdf-marker-edit-popup-header h3{margin:0;font-size:18px;font-weight:600;color:#fff}.edgepdf-marker-edit-popup-close{background:none;border:none;font-size:24px;line-height:1;color:#fff;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.edgepdf-marker-edit-popup-close:hover{background-color:#333;color:orange}.edgepdf-marker-edit-popup-body{padding:20px}.edgepdf-marker-edit-field{margin-bottom:16px}.edgepdf-marker-edit-field:last-child{margin-bottom:0}.edgepdf-marker-edit-field label{display:block;margin-bottom:8px;font-size:14px;font-weight:500;color:#fff}.edgepdf-marker-edit-input{width:100%;padding:10px 12px;border:1px solid #444;border-radius:4px;font-size:14px;background-color:#2a2a2a;color:#fff;box-sizing:border-box;transition:border-color .2s ease}.edgepdf-marker-edit-input:focus{outline:none;border-color:orange;box-shadow:0 0 0 2px #ffa50033}.edgepdf-marker-edit-input::placeholder{color:#888}.edgepdf-marker-edit-popup-footer{display:flex;justify-content:flex-end;gap:12px;padding:16px 20px;border-top:1px solid #333}.edgepdf-marker-edit-button{padding:10px 20px;border:1px solid #444;border-radius:4px;background-color:#2a2a2a;color:#fff;cursor:pointer;font-size:14px;font-weight:500;transition:all .2s ease}.edgepdf-marker-edit-button-cancel:hover{background-color:#333;border-color:#555}.edgepdf-marker-edit-button-save{background-color:orange;color:#000;border-color:orange}.edgepdf-marker-edit-button-save:hover{background-color:gold;border-color:gold}.edgepdf-marker-delete-popup{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;font-family:Lato,sans-serif}.edgepdf-marker-delete-popup-overlay{position:absolute;inset:0;background-color:#000000b3;cursor:pointer}.edgepdf-marker-delete-popup-content{position:relative;background-color:#1a1a1a;border-radius:8px;box-shadow:0 4px 20px #00000080;border:1px solid #333;width:90%;max-width:500px;max-height:90vh;overflow:auto;z-index:100001}.edgepdf-marker-delete-popup-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #333}.edgepdf-marker-delete-popup-header h3{margin:0;font-size:18px;font-weight:600;color:#fff}.edgepdf-marker-delete-popup-close{background:none;border:none;font-size:24px;line-height:1;color:#fff;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.edgepdf-marker-delete-popup-close:hover{background-color:#333;color:orange}.edgepdf-marker-delete-popup-body{padding:20px}.edgepdf-marker-delete-popup-body p{margin:0;font-size:14px;color:#fff;line-height:1.5}.edgepdf-marker-delete-popup-body strong{font-weight:600;color:orange}.edgepdf-marker-delete-popup-footer{display:flex;justify-content:flex-end;gap:12px;padding:16px 20px;border-top:1px solid #333}.edgepdf-marker-delete-button{padding:10px 20px;border:1px solid #444;border-radius:4px;background-color:#2a2a2a;color:#fff;cursor:pointer;font-size:14px;font-weight:500;transition:all .2s ease}.edgepdf-marker-delete-button-cancel:hover{background-color:#333;border-color:#555}.edgepdf-marker-delete-button-confirm{background-color:orange;color:#000;border-color:orange}.edgepdf-marker-delete-button-confirm:hover{background-color:gold;border-color:gold}.edgepdf-marker-icon-overlay-container{background:transparent!important;border:none!important;box-shadow:none!important}.edgepdf-marker-icon-overlay{display:flex;flex-direction:column;gap:4px;position:relative;z-index:1000}.edgepdf-marker-icon-button{border:none;background:transparent;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:transform .2s ease,opacity .2s ease}.edgepdf-marker-icon-button:hover{transform:scale(1.1);opacity:.9}.edgepdf-marker-icon-button:active{transform:scale(.95)}
|
|
2
|
-
`;if(typeof document<"u"){let y=document.createElement("style");y.textContent=Oo,document.head.appendChild(y)}var kr=Object.create,ui=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Tr=Object.getOwnPropertyNames,Cr=Object.getPrototypeOf,Er=Object.prototype.hasOwnProperty,zr=(y,r)=>()=>(r||y((r={exports:{}}).exports,r),r.exports),Ir=(y,r)=>{for(var s in r)ui(y,s,{get:r[s],enumerable:!0})},ci=(y,r,s,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Tr(r))!Er.call(y,u)&&u!==s&&ui(y,u,{get:()=>r[u],enumerable:!(h=Pr(r,u))||h.enumerable});return y},Zr=(y,r,s)=>(ci(y,r,"default"),s&&ci(s,r,"default")),Bo=(y,r,s)=>(s=y!=null?kr(Cr(y)):{},ci(r||!y||!y.__esModule?ui(s,"default",{value:y,enumerable:!0}):s,y)),Ro=zr((y,r)=>{"use strict";(function(s,h){typeof y=="object"&&typeof r<"u"?h(y):typeof define=="function"&&define.amd?define(["exports"],h):(s=typeof globalThis<"u"?globalThis:s||self,h(s.leaflet={}))})(y,function(s){"use strict";var h="1.9.4";function u(t){var e,i,o,n;for(i=1,o=arguments.length;i<o;i++){n=arguments[i];for(e in n)t[e]=n[e]}return t}var m=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function f(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}var x=0;function g(t){return"_leaflet_id"in t||(t._leaflet_id=++x),t._leaflet_id}function C(t,e,i){var o,n,a,l;return l=function(){o=!1,n&&(a.apply(i,n),n=!1)},a=function(){o?n=arguments:(t.apply(i,arguments),setTimeout(l,e),o=!0)},a}function M(t,e,i){var o=e[1],n=e[0],a=o-n;return t===o&&i?t:((t-n)%a+a)%a+n}function v(){return!1}function B(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function O(t){return j(t).split(/\s+/)}function S(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?m(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function V(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(!e||e.indexOf("?")===-1?"?":"&")+o.join("&")}var zt=/\{ *([\w_ -]+) *\}/g;function yi(t,e){return t.replace(zt,function(i,o){var n=e[o];if(n===void 0)throw new Error("No value provided for variable "+i);return typeof n=="function"&&(n=n(e)),n})}var st=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function Te(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var re="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Ce(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var bi=0;function xi(t){var e=+new Date,i=Math.max(0,16-(e-bi));return bi=e+i,window.setTimeout(t,i)}var Ee=window.requestAnimationFrame||Ce("RequestAnimationFrame")||xi,wi=window.cancelAnimationFrame||Ce("CancelAnimationFrame")||Ce("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function J(t,e,i){if(i&&Ee===xi)t.call(e);else return Ee.call(window,f(t,e))}function it(t){t&&wi.call(window,t)}var $o={__proto__:null,extend:u,create:m,bind:f,get lastId(){return x},stamp:g,throttle:C,wrapNum:M,falseFn:v,formatNum:B,trim:j,splitWords:O,setOptions:S,getParamString:V,template:yi,isArray:st,indexOf:Te,emptyImageUrl:re,requestFn:Ee,cancelFn:wi,requestAnimFrame:J,cancelAnimFrame:it};function pt(){}pt.extend=function(t){var e=function(){S(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,o=m(i);o.constructor=e,e.prototype=o;for(var n in this)Object.prototype.hasOwnProperty.call(this,n)&&n!=="prototype"&&n!=="__super__"&&(e[n]=this[n]);return t.statics&&u(e,t.statics),t.includes&&(Qo(t.includes),u.apply(null,[o].concat(t.includes))),u(o,t),delete o.statics,delete o.includes,o.options&&(o.options=i.options?m(i.options):{},u(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var a=0,l=o._initHooks.length;a<l;a++)o._initHooks[a].call(this)}},e},pt.include=function(t){var e=this.prototype.options;return u(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},pt.mergeOptions=function(t){return u(this.prototype.options,t),this},pt.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 Qo(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=st(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 et={on:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e);else{t=O(t);for(var n=0,a=t.length;n<a;n++)this._on(t[n],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var o in t)this._off(o,t[o],e);else{t=O(t);for(var n=arguments.length===1,a=0,l=t.length;a<l;a++)n?this._off(t[a]):this._off(t[a],e,i)}return this},_on:function(t,e,i,o){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 n={fn:e,ctx:i};o&&(n.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(n)}},_off:function(t,e,i){var o,n,a;if(this._events&&(o=this._events[t],!!o)){if(arguments.length===1){if(this._firingCount)for(n=0,a=o.length;n<a;n++)o[n].fn=v;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var l=this._listens(t,e,i);if(l!==!1){var c=o[l];this._firingCount&&(c.fn=v,this._events[t]=o=o.slice()),o.splice(l,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=u({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var n=this._events[t];if(n){this._firingCount=this._firingCount+1||1;for(var a=0,l=n.length;a<l;a++){var c=n[a],d=c.fn;c.once&&this.off(t,d,c.ctx),d.call(c.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,i,o){typeof t!="string"&&console.warn('"string" type argument expected');var n=e;typeof e!="function"&&(o=!!e,n=void 0,i=void 0);var a=this._events&&this._events[t];if(a&&a.length&&this._listens(t,n,i)!==!1)return!0;if(o){for(var l in this._eventParents)if(this._eventParents[l].listens(t,e,i,o))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var o=this._events[t]||[];if(!e)return!!o.length;i===this&&(i=void 0);for(var n=0,a=o.length;n<a;n++)if(o[n].fn===e&&o[n].ctx===i)return n;return!1},once:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e,!0);else{t=O(t);for(var n=0,a=t.length;n<a;n++)this._on(t[n],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[g(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[g(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,u({layer:t.target,propagatedFrom:t.target},t),!0)}};et.addEventListener=et.on,et.removeEventListener=et.clearAllEventListeners=et.off,et.addOneTimeEventListener=et.once,et.fireEvent=et.fire,et.hasEventListeners=et.listens;var Ht=pt.extend(et);function P(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var Li=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};P.prototype={clone:function(){return new P(this.x,this.y)},add:function(t){return this.clone()._add(k(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(k(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 P(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new P(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=Li(this.x),this.y=Li(this.y),this},distanceTo:function(t){t=k(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=k(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=k(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function k(t,e,i){return t instanceof P?t:st(t)?new P(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new P(t.x,t.y):new P(t,e,i)}function N(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}N.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof P||typeof t[0]=="number"||"x"in t)e=i=k(t);else if(t=$(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 k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return k(this.min.x,this.max.y)},getTopRight:function(){return k(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 P?t=k(t):t=$(t),t instanceof N?(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=$(t);var e=this.min,i=this.max,o=t.min,n=t.max,a=n.x>=e.x&&o.x<=i.x,l=n.y>=e.y&&o.y<=i.y;return a&&l},overlaps:function(t){t=$(t);var e=this.min,i=this.max,o=t.min,n=t.max,a=n.x>e.x&&o.x<i.x,l=n.y>e.y&&o.y<i.y;return a&&l},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,n=Math.abs(e.y-i.y)*t;return $(k(e.x-o,e.y-n),k(i.x+o,i.y+n))},equals:function(t){return t?(t=$(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function $(t,e){return!t||t instanceof N?t:new N(t,e)}function Q(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}Q.prototype={extend:function(t){var e=this._southWest,i=this._northEast,o,n;if(t instanceof R)o=t,n=t;else if(t instanceof Q){if(o=t._southWest,n=t._northEast,!o||!n)return this}else return t?this.extend(I(t)||F(t)):this;return!e&&!i?(this._southWest=new R(o.lat,o.lng),this._northEast=new R(n.lat,n.lng)):(e.lat=Math.min(o.lat,e.lat),e.lng=Math.min(o.lng,e.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new Q(new R(e.lat-o,e.lng-n),new R(i.lat+o,i.lng+n))},getCenter:function(){return new R((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 R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(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 R||"lat"in t?t=I(t):t=F(t);var e=this._southWest,i=this._northEast,o,n;return t instanceof Q?(o=t.getSouthWest(),n=t.getNorthEast()):o=n=t,o.lat>=e.lat&&n.lat<=i.lat&&o.lng>=e.lng&&n.lng<=i.lng},intersects:function(t){t=F(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),a=n.lat>=e.lat&&o.lat<=i.lat,l=n.lng>=e.lng&&o.lng<=i.lng;return a&&l},overlaps:function(t){t=F(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),a=n.lat>e.lat&&o.lat<i.lat,l=n.lng>e.lng&&o.lng<i.lng;return a&&l},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=F(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function F(t,e){return t instanceof Q?t:new Q(t,e)}function R(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)}R.prototype={equals:function(t,e){if(!t)return!1;t=I(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("+B(this.lat,t)+", "+B(this.lng,t)+")"},distanceTo:function(t){return bt.distance(this,I(t))},wrap:function(){return bt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return F([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new R(this.lat,this.lng,this.alt)}};function I(t,e,i){return t instanceof R?t:st(t)&&typeof t[0]!="object"?t.length===3?new R(t[0],t[1],t[2]):t.length===2?new R(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new R(t,e,i)}var mt={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},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),o=this.transformation.transform(e.min,i),n=this.transformation.transform(e.max,i);return new N(o,n)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?M(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?M(t.lat,this.wrapLat,!0):t.lat,o=t.alt;return new R(i,e,o)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,n=e.lng-i.lng;if(o===0&&n===0)return t;var a=t.getSouthWest(),l=t.getNorthEast(),c=new R(a.lat-o,a.lng-n),d=new R(l.lat-o,l.lng-n);return new Q(c,d)}},bt=u({},mt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,a=Math.sin((e.lat-t.lat)*i/2),l=Math.sin((e.lng-t.lng)*i/2),c=a*a+Math.cos(o)*Math.cos(n)*l*l,d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return this.R*d}}),Mi=6378137,ze={R:Mi,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=Math.sin(o*e);return new P(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=Mi*Math.PI;return new N([-t,-t],[t,t])}()};function Ie(t,e,i,o){if(st(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=o}Ie.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 P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function jt(t,e,i,o){return new Ie(t,e,i,o)}var Ze=u({},bt,{code:"EPSG:3857",projection:ze,transformation:function(){var t=.5/(Math.PI*ze.R);return jt(t,.5,-t,.5)}()}),tn=u({},Ze,{code:"EPSG:900913"});function ki(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Pi(t,e){var i="",o,n,a,l,c,d;for(o=0,a=t.length;o<a;o++){for(c=t[o],n=0,l=c.length;n<l;n++)d=c[n],i+=(n?"L":"M")+d.x+" "+d.y;i+=e?b.svg?"z":"x":""}return i||"M0 0"}var Se=document.documentElement.style,se="ActiveXObject"in window,en=se&&!document.addEventListener,Ti="msLaunchUri"in navigator&&!("documentMode"in document),Ae=ht("webkit"),Ci=ht("android"),Ei=ht("android 2")||ht("android 3"),on=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),nn=Ci&&ht("Google")&&on<537&&!("AudioNode"in window),Oe=!!window.opera,zi=!Ti&&ht("chrome"),Ii=ht("gecko")&&!Ae&&!Oe&&!se,rn=!zi&&ht("safari"),Zi=ht("phantom"),Si="OTransition"in Se,sn=navigator.platform.indexOf("Win")===0,Ai=se&&"transition"in Se,Be="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ei,Oi="MozPerspective"in Se,an=!window.L_DISABLE_3D&&(Ai||Be||Oi)&&!Si&&!Zi,Wt=typeof orientation<"u"||ht("mobile"),ln=Wt&&Ae,hn=Wt&&Be,Bi=!window.PointerEvent&&window.MSPointerEvent,Ri=!!(window.PointerEvent||Bi),Di="ontouchstart"in window||!!window.TouchEvent,cn=!window.L_NO_TOUCH&&(Di||Ri),un=Wt&&Oe,dn=Wt&&Ii,pn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,mn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",v,e),window.removeEventListener("testPassiveEventSupport",v,e)}catch{}return t}(),fn=function(){return!!document.createElement("canvas").getContext}(),Re=!!(document.createElementNS&&ki("svg").createSVGRect),gn=!!Re&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),_n=!Re&&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}}(),vn=navigator.platform.indexOf("Mac")===0,yn=navigator.platform.indexOf("Linux")===0;function ht(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var b={ie:se,ielt9:en,edge:Ti,webkit:Ae,android:Ci,android23:Ei,androidStock:nn,opera:Oe,chrome:zi,gecko:Ii,safari:rn,phantom:Zi,opera12:Si,win:sn,ie3d:Ai,webkit3d:Be,gecko3d:Oi,any3d:an,mobile:Wt,mobileWebkit:ln,mobileWebkit3d:hn,msPointer:Bi,pointer:Ri,touch:cn,touchNative:Di,mobileOpera:un,mobileGecko:dn,retina:pn,passiveEvents:mn,canvas:fn,svg:Re,vml:_n,inlineSvg:gn,mac:vn,linux:yn},Ni=b.msPointer?"MSPointerDown":"pointerdown",Hi=b.msPointer?"MSPointerMove":"pointermove",ji=b.msPointer?"MSPointerUp":"pointerup",Wi=b.msPointer?"MSPointerCancel":"pointercancel",De={touchstart:Ni,touchmove:Hi,touchend:ji,touchcancel:Wi},Fi={touchstart:kn,touchmove:ae,touchend:ae,touchcancel:ae},It={},Ui=!1;function bn(t,e,i){return e==="touchstart"&&Mn(),Fi[e]?(i=Fi[e].bind(this,i),t.addEventListener(De[e],i,!1),i):(console.warn("wrong event specified:",e),v)}function xn(t,e,i){if(!De[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(De[e],i,!1)}function wn(t){It[t.pointerId]=t}function Ln(t){It[t.pointerId]&&(It[t.pointerId]=t)}function qi(t){delete It[t.pointerId]}function Mn(){Ui||(document.addEventListener(Ni,wn,!0),document.addEventListener(Hi,Ln,!0),document.addEventListener(ji,qi,!0),document.addEventListener(Wi,qi,!0),Ui=!0)}function ae(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in It)e.touches.push(It[i]);e.changedTouches=[e],t(e)}}function kn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Y(e),ae(t,e)}function Pn(t){var e={},i,o;for(o in t)i=t[o],e[o]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Tn=200;function Cn(t,e){t.addEventListener("dblclick",e);var i=0,o;function n(a){if(a.detail!==1){o=a.detail;return}if(!(a.pointerType==="mouse"||a.sourceCapabilities&&!a.sourceCapabilities.firesTouchEvents)){var l=Xi(a);if(!(l.some(function(d){return d instanceof HTMLLabelElement&&d.attributes.for})&&!l.some(function(d){return d instanceof HTMLInputElement||d instanceof HTMLSelectElement}))){var c=Date.now();c-i<=Tn?(o++,o===2&&e(Pn(a))):o=1,i=c}}}return t.addEventListener("click",n),{dblclick:e,simDblclick:n}}function En(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ne=ce(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ft=ce(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Vi=Ft==="webkitTransition"||Ft==="OTransition"?Ft+"End":"transitionend";function Gi(t){return typeof t=="string"?document.getElementById(t):t}function Ut(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return i==="auto"?null:i}function A(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function H(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Zt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function St(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function He(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=he(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function E(t,e){if(t.classList!==void 0)for(var i=O(e),o=0,n=i.length;o<n;o++)t.classList.add(i[o]);else if(!He(t,e)){var a=he(t);je(t,(a?a+" ":"")+e)}}function W(t,e){t.classList!==void 0?t.classList.remove(e):je(t,j((" "+he(t)+" ").replace(" "+e+" "," ")))}function je(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function he(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ot(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&zn(t,e)}function zn(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function ce(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function kt(t,e,i){var o=e||new P(0,0);t.style[Ne]=(b.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function U(t,e){t._leaflet_pos=e,b.any3d?kt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Pt(t){return t._leaflet_pos||new P(0,0)}var qt,Vt,We;if("onselectstart"in document)qt=function(){T(window,"selectstart",Y)},Vt=function(){D(window,"selectstart",Y)};else{var Gt=ce(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);qt=function(){if(Gt){var t=document.documentElement.style;We=t[Gt],t[Gt]="none"}},Vt=function(){Gt&&(document.documentElement.style[Gt]=We,We=void 0)}}function Fe(){T(window,"dragstart",Y)}function Ue(){D(window,"dragstart",Y)}var ue,qe;function Ve(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(de(),ue=t,qe=t.style.outlineStyle,t.style.outlineStyle="none",T(window,"keydown",de))}function de(){ue&&(ue.style.outlineStyle=qe,ue=void 0,qe=void 0,D(window,"keydown",de))}function Yi(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var In={__proto__:null,TRANSFORM:Ne,TRANSITION:Ft,TRANSITION_END:Vi,get:Gi,getStyle:Ut,create:A,remove:H,empty:le,toFront:Zt,toBack:St,hasClass:He,addClass:E,removeClass:W,setClass:je,getClass:he,setOpacity:ot,testProp:ce,setTransform:kt,setPosition:U,getPosition:Pt,get disableTextSelection(){return qt},get enableTextSelection(){return Vt},disableImageDrag:Fe,enableImageDrag:Ue,preventOutline:Ve,restoreOutline:de,getSizedParentNode:Yi,getScale:Ge};function T(t,e,i,o){if(e&&typeof e=="object")for(var n in e)Ke(t,n,e[n],i);else{e=O(e);for(var a=0,l=e.length;a<l;a++)Ke(t,e[a],i,o)}return this}var ct="_leaflet_events";function D(t,e,i,o){if(arguments.length===1)Ki(t),delete t[ct];else if(e&&typeof e=="object")for(var n in e)Xe(t,n,e[n],i);else if(e=O(e),arguments.length===2)Ki(t,function(c){return Te(e,c)!==-1});else for(var a=0,l=e.length;a<l;a++)Xe(t,e[a],i,o);return this}function Ki(t,e){for(var i in t[ct]){var o=i.split(/\d/)[0];(!e||e(o))&&Xe(t,o,null,null,i)}}var Ye={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ke(t,e,i,o){var n=e+g(i)+(o?"_"+g(o):"");if(t[ct]&&t[ct][n])return this;var a=function(c){return i.call(o||t,c||window.event)},l=a;!b.touchNative&&b.pointer&&e.indexOf("touch")===0?a=bn(t,e,a):b.touch&&e==="dblclick"?a=Cn(t,a):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Ye[e]||e,a,b.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(a=function(c){c=c||window.event,$e(t,c)&&l(c)},t.addEventListener(Ye[e],a,!1)):t.addEventListener(e,l,!1):t.attachEvent("on"+e,a),t[ct]=t[ct]||{},t[ct][n]=a}function Xe(t,e,i,o,n){n=n||e+g(i)+(o?"_"+g(o):"");var a=t[ct]&&t[ct][n];if(!a)return this;!b.touchNative&&b.pointer&&e.indexOf("touch")===0?xn(t,e,a):b.touch&&e==="dblclick"?En(t,a):"removeEventListener"in t?t.removeEventListener(Ye[e]||e,a,!1):t.detachEvent("on"+e,a),t[ct][n]=null}function Tt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Je(t){return Ke(t,"wheel",Tt),this}function Yt(t){return T(t,"mousedown touchstart dblclick contextmenu",Tt),t._leaflet_disable_click=!0,this}function Y(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ct(t){return Y(t),Tt(t),this}function Xi(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Ji(t,e){if(!e)return new P(t.clientX,t.clientY);var i=Ge(e),o=i.boundingClientRect;return new P((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}var Zn=b.linux&&b.chrome?window.devicePixelRatio:b.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function $i(t){return b.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Zn: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 $e(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 Sn={__proto__:null,on:T,off:D,stopPropagation:Tt,disableScrollPropagation:Je,disableClickPropagation:Yt,preventDefault:Y,stop:Ct,getPropagationPath:Xi,getMousePosition:Ji,getWheelDelta:$i,isExternalTarget:$e,addListener:T,removeListener:D},Qi=Ht.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=Pt(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=J(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(),U(this._el,i),this.fire("step")},_complete:function(){it(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=Ht.extend({options:{crs:Ze,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=S(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=f(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(I(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ft&&b.any3d&&!b.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),T(this._proxy,Vi,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(I(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=u({animate:i.animate},i.zoom),i.pan=u({animate:i.animate,duration:i.duration},i.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(o)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||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),a=t instanceof P?t:this.latLngToContainerPoint(t),l=a.subtract(n).multiplyBy(1-1/o),c=this.containerPointToLatLng(n.add(l));return this.setView(c,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var i=k(e.paddingTopLeft||e.padding||[0,0]),o=k(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));if(n=typeof e.maxZoom=="number"?Math.min(e.maxZoom,n):n,n===1/0)return{center:t.getCenter(),zoom:n};var a=o.subtract(i).divideBy(2),l=this.project(t.getSouthWest(),n),c=this.project(t.getNorthEast(),n),d=this.unproject(l.add(c).divideBy(2).add(a),n);return{center:d,zoom:n}},fitBounds:function(t,e){if(t=F(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=k(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 Qi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){E(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||!b.any3d)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),n=this.project(t),a=this.getSize(),l=this._zoom;t=I(t),e=e===void 0?l:e;var c=Math.max(a.x,a.y),d=c*this.getZoomScale(l,e),p=n.distanceTo(o)||1,_=1.42,w=_*_;function z(q){var Me=q?-1:1,xr=q?d:c,wr=d*d-c*c+Me*w*w*p*p,Lr=2*xr*w*p,hi=wr/Lr,Ao=Math.sqrt(hi*hi+1)-hi,Mr=Ao<1e-9?-18:Math.log(Ao);return Mr}function X(q){return(Math.exp(q)-Math.exp(-q))/2}function G(q){return(Math.exp(q)+Math.exp(-q))/2}function rt(q){return X(q)/G(q)}var tt=z(0);function Nt(q){return c*(G(tt)/G(tt+_*q))}function _r(q){return c*(G(tt)*rt(tt+_*q)-X(tt))/w}function vr(q){return 1-Math.pow(1-q,1.5)}var yr=Date.now(),Zo=(z(1)-tt)/_,br=i.duration?1e3*i.duration:1e3*Zo*.8;function So(){var q=(Date.now()-yr)/br,Me=vr(q)*Zo;q<=1?(this._flyToFrame=J(So,this),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(_r(Me)/p)),l),this.getScaleZoom(c/Nt(Me),l),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),So.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=F(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(),o=this._limitCenter(i,this._zoom,F(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=k(e.paddingTopLeft||e.padding||[0,0]),o=k(e.paddingBottomRight||e.padding||[0,0]),n=this.project(this.getCenter()),a=this.project(t),l=this.getPixelBounds(),c=$([l.min.add(i),l.max.subtract(o)]),d=c.getSize();if(!c.contains(a)){this._enforcingBounds=!0;var p=a.subtract(c.getCenter()),_=c.extend(a).getSize().subtract(d);n.x+=p.x<0?-_.x:_.x,n.y+=p.y<0?-_.y:_.y,this.panTo(this.unproject(n),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=u({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),n=i.divideBy(2).round(),a=o.subtract(n);return!a.x&&!a.y?this:(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(f(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=u({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=f(this._handleGeolocationResponse,this),i=f(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,o=new R(e,i),n=o.toBounds(t.coords.accuracy*2),a=this._locateOptions;if(a.setView){var l=this.getBoundsZoom(n);this.setView(o,a.maxZoom?Math.min(l,a.maxZoom):l)}var c={latlng:o,bounds:n,timestamp:t.timestamp};for(var d in t.coords)typeof t.coords[d]=="number"&&(c[d]=t.coords[d]);this.fire("locationfound",c)}},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(),H(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(it(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)H(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":""),o=A("div",i,e||this._mapPane);return t&&(this._panes[t]=o),o},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 Q(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=F(t),i=k(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),a=this.getMaxZoom(),l=t.getNorthWest(),c=t.getSouthEast(),d=this.getSize().subtract(i),p=$(this.project(c,o),this.project(l,o)).getSize(),_=b.any3d?this.options.zoomSnap:1,w=d.x/p.x,z=d.y/p.y,X=e?Math.max(w,z):Math.min(w,z);return o=this.getScaleZoom(X,o),_&&(o=Math.round(o/(_/100))*(_/100),o=e?Math.ceil(o/_)*_:Math.floor(o/_)*_),Math.max(n,Math.min(a,o))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new P(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 N(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 o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(I(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(k(t),e)},layerPointToLatLng:function(t){var e=k(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(I(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(I(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(I(t),I(e))},containerPointToLayerPoint:function(t){return k(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return k(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(k(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(I(t)))},mouseEventToContainerPoint:function(t){return Ji(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=Gi(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");T(e,"scroll",this._onScroll,this),this._containerId=g(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&b.any3d,E(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ut(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),U(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(E(t.markerPane,"leaflet-zoom-hide"),E(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){U(this._mapPane,new P(0,0));var o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,i)._move(t,e)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,o){e===void 0&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i&&i.pinch&&this.fire("zoom",i):((n||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 it(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){U(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[g(this._container)]=this;var e=t?D:T;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),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){it(this._resizeRequest),this._resizeRequest=J(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=[],o,n=e==="mouseout"||e==="mouseover",a=t.target||t.srcElement,l=!1;a;){if(o=this._targets[g(a)],o&&(e==="click"||e==="preclick")&&this._draggableMoved(o)){l=!0;break}if(o&&o.listens(e,!0)&&(n&&!$e(a,t)||(i.push(o),n))||a===this._container)break;a=a.parentNode}return!i.length&&!l&&!n&&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"&&Ve(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var o=u({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var n=this._findEventTargets(t,e);if(i){for(var a=[],l=0;l<i.length;l++)i[l].listens(e,!0)&&a.push(i[l]);n=a.concat(n)}if(n.length){e==="contextmenu"&&Y(t);var c=n[0],d={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var p=c.getLatLng&&(!c._radius||c._radius<=10);d.containerPoint=p?this.latLngToContainerPoint(c.getLatLng()):this.mouseEventToContainerPoint(t),d.layerPoint=this.containerPointToLayerPoint(d.containerPoint),d.latlng=p?c.getLatLng():this.layerPointToLatLng(d.layerPoint)}for(l=0;l<n.length;l++)if(n[l].fire(e,d,!0),d.originalEvent._stopped||n[l].options.bubblingMouseEvents===!1&&Te(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 Pt(this._mapPane)||new P(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 o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},_latLngBoundsToNewLayerBounds:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return $([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},_getCenterLayerPoint: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 o=this.project(t,e),n=this.getSize().divideBy(2),a=new N(o.subtract(n),o.add(n)),l=this._getBoundsOffset(a,i,e);return Math.abs(l.x)<=1&&Math.abs(l.y)<=1?t:this.unproject(o.add(l),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new N(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=$(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),n=o.min.subtract(t.min),a=o.max.subtract(t.max),l=this._rebound(n.x,-a.x),c=this._rebound(n.y,-a.y);return new P(l,c)},_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(),o=b.any3d?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){W(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=A("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Ne,o=this._proxy.style[i];kt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),o===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){H(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();kt(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 o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o);return i.animate!==!0&&!this.getSize().contains(n)?!1:(J(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,E(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(f(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&W(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 An(t,e){return new Z(t,e)}var at=pt.extend({options:{position:"topright"},initialize:function(t){S(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(),o=t._controlCorners[i];return E(e,"leaflet-control"),i.indexOf("bottom")!==-1?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(H(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()}}),Kt=function(t){return new at(t)};Z.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=A("div",e+"control-container",this._container);function o(n,a){var l=e+n+" "+e+a;t[n+a]=A("div",l,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)H(this._controlCorners[t]);H(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var to=at.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,o){return i<o?-1:o<i?1:0}},initialize:function(t,e,i){S(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var o in t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!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 at.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(g(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){E(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?(E(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):W(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return W(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=A("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Yt(e),Je(e);var o=this._section=A("section",t+"-list");i&&(this._map.on("click",this.collapse,this),T(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var n=this._layersLink=A("a",t+"-toggle",e);n.href="#",n.title="Layers",n.setAttribute("role","button"),T(n,{keydown:function(a){a.keyCode===13&&this._expandSafely()},click:function(a){Y(a),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=A("div",t+"-base",o),this._separator=A("div",t+"-separator",o),this._overlaysList=A("div",t+"-overlays",o),e.appendChild(o)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&g(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(f(function(o,n){return this.options.sortFunction(o.layer,n.layer,o.name,n.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;le(this._baseLayersList),le(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,n=0;for(i=0;i<this._layers.length;i++)o=this._layers[i],this._addItem(o),e=e||o.overlay,t=t||!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>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(g(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"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),o;t.overlay?(o=document.createElement("input"),o.type="checkbox",o.className="leaflet-control-layers-selector",o.defaultChecked=i):o=this._createRadioElement("leaflet-base-layers_"+g(this),i),this._layerControlInputs.push(o),o.layerId=g(t.layer),T(o,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;var a=document.createElement("span");e.appendChild(a),a.appendChild(o),a.appendChild(n);var l=t.overlay?this._overlaysList:this._baseLayersList;return l.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,o=[],n=[];this._handlingClick=!0;for(var a=t.length-1;a>=0;a--)e=t[a],i=this._getLayer(e.layerId).layer,e.checked?o.push(i):e.checked||n.push(i);for(a=0;a<n.length;a++)this._map.hasLayer(n[a])&&this._map.removeLayer(n[a]);for(a=0;a<o.length;a++)this._map.hasLayer(o[a])||this._map.addLayer(o[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,i,o=this._map.getZoom(),n=t.length-1;n>=0;n--)e=t[n],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&o<i.options.minZoom||i.options.maxZoom!==void 0&&o>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,T(t,"click",Y),this.expand();var e=this;setTimeout(function(){D(t,"click",Y),e._preventClick=!1})}}),On=function(t,e,i){return new to(t,e,i)},Qe=at.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=A("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove: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,o,n){var a=A("a",i,o);return a.innerHTML=t,a.href="#",a.title=e,a.setAttribute("role","button"),a.setAttribute("aria-label",e),Yt(a),T(a,"click",Ct),T(a,"click",n,this),T(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";W(this._zoomInButton,e),W(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(E(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(E(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var Bn=function(t){return new Qe(t)},eo=at.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=A("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=A("div",e,i)),t.imperial&&(this._iScale=A("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,o,n;e>5280?(i=e/5280,o=this._getRoundNum(i),this._updateScale(this._iScale,o+" mi",o/i)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/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}}),Rn=function(t){return new eo(t)},Dn='<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>',ti=at.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(b.inlineSvg?Dn+" ":"")+"Leaflet</a>"},initialize:function(t){S(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=A("div","leaflet-control-attribution"),Yt(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> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new ti().addTo(this)});var Nn=function(t){return new ti(t)};at.Layers=to,at.Zoom=Qe,at.Scale=eo,at.Attribution=ti,Kt.layers=On,Kt.zoom=Bn,Kt.scale=Rn,Kt.attribution=Nn;var ut=pt.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}});ut.addTo=function(t,e){return t.addHandler(e,this),this};var Hn={Events:et},io=b.touch?"touchstart mousedown":"mousedown",xt=Ht.extend({options:{clickTolerance:3},initialize:function(t,e,i,o){S(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(T(this._dragStartTarget,io,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xt._dragging===this&&this.finishDrag(!0),D(this._dragStartTarget,io,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!He(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){xt._dragging===this&&this.finishDrag();return}if(!(xt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(xt._dragging=this,this._preventOutline&&Ve(this._element),Fe(),qt(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Yi(this._element);this._startPoint=new P(e.clientX,e.clientY),this._startPos=Pt(this._element),this._parentScale=Ge(i);var o=t.type==="mousedown";T(document,o?"mousemove":"touchmove",this._onMove,this),T(document,o?"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 P(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,Y(t),this._moved||(this.fire("dragstart"),this._moved=!0,E(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),E(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),U(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){W(document.body,"leaflet-dragging"),this._lastTarget&&(W(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),D(document,"mousemove touchmove",this._onMove,this),D(document,"mouseup touchend touchcancel",this._onUp,this),Ue(),Vt();var e=this._moved&&this._moving;this._moving=!1,xt._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function oo(t,e,i){var o,n=[1,4,2,8],a,l,c,d,p,_,w,z;for(a=0,_=t.length;a<_;a++)t[a]._code=Et(t[a],e);for(c=0;c<4;c++){for(w=n[c],o=[],a=0,_=t.length,l=_-1;a<_;l=a++)d=t[a],p=t[l],d._code&w?p._code&w||(z=pe(p,d,w,e,i),z._code=Et(z,e),o.push(z)):(p._code&w&&(z=pe(p,d,w,e,i),z._code=Et(z,e),o.push(z)),o.push(d));t=o}return t}function no(t,e){var i,o,n,a,l,c,d,p,_;if(!t||t.length===0)throw new Error("latlngs not passed");nt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var w=I([0,0]),z=F(t),X=z.getNorthWest().distanceTo(z.getSouthWest())*z.getNorthEast().distanceTo(z.getNorthWest());X<1700&&(w=ei(t));var G=t.length,rt=[];for(i=0;i<G;i++){var tt=I(t[i]);rt.push(e.project(I([tt.lat-w.lat,tt.lng-w.lng])))}for(c=d=p=0,i=0,o=G-1;i<G;o=i++)n=rt[i],a=rt[o],l=n.y*a.x-a.y*n.x,d+=(n.x+a.x)*l,p+=(n.y+a.y)*l,c+=l*3;c===0?_=rt[0]:_=[d/c,p/c];var Nt=e.unproject(k(_));return I([Nt.lat+w.lat,Nt.lng+w.lng])}function ei(t){for(var e=0,i=0,o=0,n=0;n<t.length;n++){var a=I(t[n]);e+=a.lat,i+=a.lng,o++}return I([e/o,i/o])}var jn={__proto__:null,clipPolygon:oo,polygonCenter:no,centroid:ei};function ro(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Un(t,i),t=Fn(t,i),t}function so(t,e,i){return Math.sqrt(Xt(t,e,i,!0))}function Wn(t,e,i){return Xt(t,e,i)}function Fn(t,e){var i=t.length,o=typeof Uint8Array<"u"?Uint8Array:Array,n=new o(i);n[0]=n[i-1]=1,ii(t,n,e,0,i-1);var a,l=[];for(a=0;a<i;a++)n[a]&&l.push(t[a]);return l}function ii(t,e,i,o,n){var a=0,l,c,d;for(c=o+1;c<=n-1;c++)d=Xt(t[c],t[o],t[n],!0),d>a&&(l=c,a=d);a>i&&(e[l]=1,ii(t,e,i,o,l),ii(t,e,i,l,n))}function Un(t,e){for(var i=[t[0]],o=1,n=0,a=t.length;o<a;o++)qn(t[o],t[n])>e&&(i.push(t[o]),n=o);return n<a-1&&i.push(t[a-1]),i}var ao;function lo(t,e,i,o,n){var a=o?ao:Et(t,i),l=Et(e,i),c,d,p;for(ao=l;;){if(!(a|l))return[t,e];if(a&l)return!1;c=a||l,d=pe(t,e,c,i,n),p=Et(d,i),c===a?(t=d,a=p):(e=d,l=p)}}function pe(t,e,i,o,n){var a=e.x-t.x,l=e.y-t.y,c=o.min,d=o.max,p,_;return i&8?(p=t.x+a*(d.y-t.y)/l,_=d.y):i&4?(p=t.x+a*(c.y-t.y)/l,_=c.y):i&2?(p=d.x,_=t.y+l*(d.x-t.x)/a):i&1&&(p=c.x,_=t.y+l*(c.x-t.x)/a),new P(p,_,n)}function Et(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 qn(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function Xt(t,e,i,o){var n=e.x,a=e.y,l=i.x-n,c=i.y-a,d=l*l+c*c,p;return d>0&&(p=((t.x-n)*l+(t.y-a)*c)/d,p>1?(n=i.x,a=i.y):p>0&&(n+=l*p,a+=c*p)),l=t.x-n,c=t.y-a,o?l*l+c*c:new P(n,a)}function nt(t){return!st(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function ho(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),nt(t)}function co(t,e){var i,o,n,a,l,c,d,p;if(!t||t.length===0)throw new Error("latlngs not passed");nt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var _=I([0,0]),w=F(t),z=w.getNorthWest().distanceTo(w.getSouthWest())*w.getNorthEast().distanceTo(w.getNorthWest());z<1700&&(_=ei(t));var X=t.length,G=[];for(i=0;i<X;i++){var rt=I(t[i]);G.push(e.project(I([rt.lat-_.lat,rt.lng-_.lng])))}for(i=0,o=0;i<X-1;i++)o+=G[i].distanceTo(G[i+1])/2;if(o===0)p=G[0];else for(i=0,a=0;i<X-1;i++)if(l=G[i],c=G[i+1],n=l.distanceTo(c),a+=n,a>o){d=(a-o)/n,p=[c.x-d*(c.x-l.x),c.y-d*(c.y-l.y)];break}var tt=e.unproject(k(p));return I([tt.lat+_.lat,tt.lng+_.lng])}var Vn={__proto__:null,simplify:ro,pointToSegmentDistance:so,closestPointOnSegment:Wn,clipSegment:lo,_getEdgeIntersection:pe,_getBitCode:Et,_sqClosestPointOnSegment:Xt,isFlat:nt,_flat:ho,polylineCenter:co},oi={project:function(t){return new P(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new N([-180,-90],[180,90])},ni={R:6378137,R_MINOR:6356752314245179e-9,bounds:new N([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,n=this.R_MINOR/i,a=Math.sqrt(1-n*n),l=a*Math.sin(o),c=Math.tan(Math.PI/4-o/2)/Math.pow((1-l)/(1+l),a/2);return o=-i*Math.log(Math.max(c,1e-10)),new P(t.lng*e*i,o)},unproject:function(t){for(var e=180/Math.PI,i=this.R,o=this.R_MINOR/i,n=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),l=Math.PI/2-2*Math.atan(a),c=0,d=.1,p;c<15&&Math.abs(d)>1e-7;c++)p=n*Math.sin(l),p=Math.pow((1-p)/(1+p),n/2),d=Math.PI/2-2*Math.atan(a*p)-l,l+=d;return new R(l*e,t.x*e/i)}},Gn={__proto__:null,LonLat:oi,Mercator:ni,SphericalMercator:ze},Yn=u({},bt,{code:"EPSG:3395",projection:ni,transformation:function(){var t=.5/(Math.PI*ni.R);return jt(t,.5,-t,.5)}()}),uo=u({},bt,{code:"EPSG:4326",projection:oi,transformation:jt(1/180,1,-1/180,.5)}),Kn=u({},mt,{projection:oi,transformation:jt(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,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},infinite:!0});mt.Earth=bt,mt.EPSG3395=Yn,mt.EPSG3857=Ze,mt.EPSG900913=tn,mt.EPSG4326=uo,mt.Simple=Kn;var lt=Ht.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[g(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[g(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})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=g(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=g(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 g(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?st(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[g(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=g(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var n=this._zoomBoundLayers[o].options;t=n.minZoom===void 0?t:Math.min(t,n.minZoom),e=n.maxZoom===void 0?e:Math.max(e,n.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 At=lt.extend({initialize:function(t,e){S(this,e),this._layers={};var i,o;if(t)for(i=0,o=t.length;i<o;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,o;for(i in this._layers)o=this._layers[i],o[t]&&o[t].apply(o,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 g(t)}}),Xn=function(t,e){return new At(t,e)},ft=At.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),At.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),At.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 Q;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Jn=function(t,e){return new ft(t,e)},Ot=pt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){S(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 o=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),o},_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];typeof o=="number"&&(o=[o,o]);var n=k(o),a=k(e==="shadow"&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return b.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function $n(t){return new Ot(t)}var Jt=Ot.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 Jt.imagePath!="string"&&(Jt.imagePath=this._detectIconPath()),(this.options.imagePath||Jt.imagePath)+Ot.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(i,o,n){var a=o.exec(i);return a&&a[n]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=A("div","leaflet-default-icon-path",document.body),e=Ut(t,"background-image")||Ut(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):""}}),po=ut.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new xt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),E(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&&W(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,a=Pt(e._icon),l=i.getPixelBounds(),c=i.getPixelOrigin(),d=$(l.min._subtract(c).add(n),l.max._subtract(c).subtract(n));if(!d.contains(a)){var p=k((Math.max(d.max.x,a.x)-d.max.x)/(l.max.x-d.max.x)-(Math.min(d.min.x,a.x)-d.min.x)/(l.min.x-d.min.x),(Math.max(d.max.y,a.y)-d.max.y)/(l.max.y-d.max.y)-(Math.min(d.min.y,a.y)-d.min.y)/(l.min.y-d.min.y)).multiplyBy(o);i.panBy(p,{animate:!1}),this._draggable._newPos._add(p),this._draggable._startPos._add(p),U(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=J(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&&(it(this._panRequest),this._panRequest=J(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,o=Pt(e._icon),n=e._map.layerPointToLatLng(o);i&&U(i,o),e._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){it(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),me=lt.extend({options:{icon:new Jt,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){S(this,e),this._latlng=I(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=I(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),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),E(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&&T(i,"focus",this._panOnFocus,this);var n=t.icon.createShadow(this._shadow),a=!1;n!==this._shadow&&(this._removeShadow(),a=!0),n&&(E(n,e),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&a&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&D(this._icon,"focus",this._panOnFocus,this),H(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&H(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&U(this._icon,t),this._shadow&&U(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&&(E(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),po)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new po(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&&ot(this._icon,t),this._shadow&&ot(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?k(e.iconSize):k(0,0),o=e.iconAnchor?k(e.iconAnchor):k(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Qn(t,e){return new me(t,e)}var wt=lt.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 S(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)}}),fe=wt.extend({options:{fill:!0,radius:10},initialize:function(t,e){S(this,e),this._latlng=I(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=I(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 wt.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(),o=[t+i,e+i];this._pxBounds=new N(this._point.subtract(o),this._point.add(o))},_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 tr(t,e){return new fe(t,e)}var ri=fe.extend({initialize:function(t,e,i){if(typeof e=="number"&&(e=u({},i,{radius:e})),S(this,e),this._latlng=I(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 Q(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:wt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===bt.distance){var n=Math.PI/180,a=this._mRadius/bt.R/n,l=i.project([e+a,t]),c=i.project([e-a,t]),d=l.add(c).divideBy(2),p=i.unproject(d).lat,_=Math.acos((Math.cos(a*n)-Math.sin(e*n)*Math.sin(p*n))/(Math.cos(e*n)*Math.cos(p*n)))/n;(isNaN(_)||_===0)&&(_=a/Math.cos(Math.PI/180*e)),this._point=d.subtract(i.getPixelOrigin()),this._radius=isNaN(_)?0:d.x-i.project([p,t-_]).x,this._radiusY=d.y-l.y}else{var w=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(w).x}this._updateBounds()}});function er(t,e,i){return new ri(t,e,i)}var gt=wt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){S(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,o=Xt,n,a,l=0,c=this._parts.length;l<c;l++)for(var d=this._parts[l],p=1,_=d.length;p<_;p++){n=d[p-1],a=d[p];var w=o(t,n,a,!0);w<e&&(e=w,i=o(t,n,a))}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 co(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=I(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Q,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return nt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=nt(t),o=0,n=t.length;o<n;o++)i?(e[o]=I(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},_project:function(){var t=new N;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 P(t,t);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var o=t[0]instanceof R,n=t.length,a,l;if(o){for(l=[],a=0;a<n;a++)l[a]=this._map.latLngToLayerPoint(t[a]),i.extend(l[a]);e.push(l)}else for(a=0;a<n;a++)this._projectLatlngs(t[a],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,o,n,a,l,c,d;for(i=0,n=0,a=this._rings.length;i<a;i++)for(d=this._rings[i],o=0,l=d.length;o<l-1;o++)c=lo(d[o],d[o+1],t,o,!0),c&&(e[n]=e[n]||[],e[n].push(c[0]),(c[1]!==d[o+1]||o===l-2)&&(e[n].push(c[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=ro(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,o,n,a,l,c,d=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;i<a;i++)for(c=this._parts[i],o=0,l=c.length,n=l-1;o<l;n=o++)if(!(!e&&o===0)&&so(t,c[n],c[o])<=d)return!0;return!1}});function ir(t,e){return new gt(t,e)}gt._flat=ho;var Bt=gt.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 no(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=gt.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof R&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){gt.prototype._setLatLngs.call(this,t),nt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return nt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new P(e,e);if(t=new N(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 o=0,n=this._rings.length,a;o<n;o++)a=oo(this._rings[o],t,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,i,o,n,a,l,c,d,p;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(a=0,d=this._parts.length;a<d;a++)for(i=this._parts[a],l=0,p=i.length,c=p-1;l<p;c=l++)o=i[l],n=i[c],o.y>t.y!=n.y>t.y&&t.x<(n.x-o.x)*(t.y-o.y)/(n.y-o.y)+o.x&&(e=!e);return e||gt.prototype._containsPoint.call(this,t,!0)}});function or(t,e){return new Bt(t,e)}var _t=ft.extend({initialize:function(t,e){S(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=st(t)?t:t.features,i,o,n;if(e){for(i=0,o=e.length;i<o;i++)n=e[i],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var a=this.options;if(a.filter&&!a.filter(t))return this;var l=ge(t,a);return l?(l.feature=ye(t),l.defaultOptions=l.options,this.resetStyle(l),a.onEachFeature&&a.onEachFeature(t,l),this.addLayer(l)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=u({},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 ge(t,e){var i=t.type==="Feature"?t.geometry:t,o=i?i.coordinates:null,n=[],a=e&&e.pointToLayer,l=e&&e.coordsToLatLng||si,c,d,p,_;if(!o&&!i)return null;switch(i.type){case"Point":return c=l(o),mo(a,t,c,e);case"MultiPoint":for(p=0,_=o.length;p<_;p++)c=l(o[p]),n.push(mo(a,t,c,e));return new ft(n);case"LineString":case"MultiLineString":return d=_e(o,i.type==="LineString"?0:1,l),new gt(d,e);case"Polygon":case"MultiPolygon":return d=_e(o,i.type==="Polygon"?1:2,l),new Bt(d,e);case"GeometryCollection":for(p=0,_=i.geometries.length;p<_;p++){var w=ge({geometry:i.geometries[p],type:"Feature",properties:t.properties},e);w&&n.push(w)}return new ft(n);case"FeatureCollection":for(p=0,_=i.features.length;p<_;p++){var z=ge(i.features[p],e);z&&n.push(z)}return new ft(n);default:throw new Error("Invalid GeoJSON object.")}}function mo(t,e,i,o){return t?t(e,i):new me(i,o&&o.markersInheritOptions&&o)}function si(t){return new R(t[1],t[0],t[2])}function _e(t,e,i){for(var o=[],n=0,a=t.length,l;n<a;n++)l=e?_e(t[n],e-1,i):(i||si)(t[n]),o.push(l);return o}function ai(t,e){return t=I(t),t.alt!==void 0?[B(t.lng,e),B(t.lat,e),B(t.alt,e)]:[B(t.lng,e),B(t.lat,e)]}function ve(t,e,i,o){for(var n=[],a=0,l=t.length;a<l;a++)n.push(e?ve(t[a],nt(t[a])?0:e-1,i,o):ai(t[a],o));return!e&&i&&n.length>0&&n.push(n[0].slice()),n}function Rt(t,e){return t.feature?u({},t.feature,{geometry:e}):ye(e)}function ye(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var li={toGeoJSON:function(t){return Rt(this,{type:"Point",coordinates:ai(this.getLatLng(),t)})}};me.include(li),ri.include(li),fe.include(li),gt.include({toGeoJSON:function(t){var e=!nt(this._latlngs),i=ve(this._latlngs,e?1:0,!1,t);return Rt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Bt.include({toGeoJSON:function(t){var e=!nt(this._latlngs),i=e&&!nt(this._latlngs[0]),o=ve(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),Rt(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),At.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Rt(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",o=[];return this.eachLayer(function(n){if(n.toGeoJSON){var a=n.toGeoJSON(t);if(i)o.push(a.geometry);else{var l=ye(a);l.type==="FeatureCollection"?o.push.apply(o,l.features):o.push(l)}}}),i?Rt(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});function fo(t,e){return new _t(t,e)}var nr=fo,be=lt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=F(e),S(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(E(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){H(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&&Zt(this._image),this},bringToBack:function(){return this._map&&St(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=F(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:A("img");if(E(e,"leaflet-image-layer"),this._zoomAnimated&&E(e,"leaflet-zoom-animated"),this.options.className&&E(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onload=f(this.fire,this,"load"),e.onerror=f(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;kt(this._image,i,e)},_reset:function(){var t=this._image,e=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();U(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ot(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()}}),rr=function(t,e,i){return new be(t,e,i)},go=be.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:A("video");if(E(e,"leaflet-image-layer"),this._zoomAnimated&&E(e,"leaflet-zoom-animated"),this.options.className&&E(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onloadeddata=f(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],n=0;n<i.length;n++)o.push(i[n].src);this._url=i.length>0?o:[e.src];return}st(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 a=0;a<this._url.length;a++){var l=A("source");l.src=this._url[a],e.appendChild(l)}}});function sr(t,e,i){return new go(t,e,i)}var _o=be.extend({_initImage:function(){var t=this._image=this._url;E(t,"leaflet-image-layer"),this._zoomAnimated&&E(t,"leaflet-zoom-animated"),this.options.className&&E(t,this.options.className),t.onselectstart=v,t.onmousemove=v}});function ar(t,e,i){return new _o(t,e,i)}var dt=lt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof R||st(t))?(this._latlng=I(t),S(this,e)):(S(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&&ot(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ot(this._container,1),this.bringToFront(),this.options.interactive&&(E(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ot(this._container,0),this._removeTimeout=setTimeout(f(H,void 0,this._container),200)):H(this._container),this.options.interactive&&(W(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=I(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&&Zt(this._container),this},bringToBack:function(){return this._map&&St(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof ft){e=null;var i=this._source._layers;for(var o in i)if(i[o]._map){e=i[o];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=k(this.options.offset),i=this._getAnchor();this._zoomAnimated?U(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,i,o){var n=e;return n instanceof t||(n=new t(o).setContent(e)),i&&n.setLatLng(i),n}}),lt.include({_initOverlay:function(t,e,i,o){var n=i;return n instanceof t?(S(n,o),n._source=this):(n=e&&!o?e:new t(o,this),n.setContent(i)),n}});var xe=dt.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,dt.prototype.openOn.call(this,t)},onAdd:function(t){dt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof wt||this._source.on("preclick",Tt))},onRemove:function(t){dt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof wt||this._source.off("preclick",Tt))},getEvents:function(){var t=dt.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=A("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=A("div",t+"-content-wrapper",e);if(this._contentNode=A("div",t+"-content",i),Yt(e),Je(this._contentNode),T(e,"contextmenu",Tt),this._tipContainer=A("div",t+"-tip-container",e),this._tip=A("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=A("a",t+"-close-button",e);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">×</span>',T(o,"click",function(n){Y(n),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 o=t.offsetHeight,n=this.options.maxHeight,a="leaflet-popup-scrolled";n&&o>n?(e.height=n+"px",E(t,a)):W(t,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();U(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(Ut(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new P(this._containerLeft,-i-this._containerBottom);n._add(Pt(this._container));var a=t.layerPointToContainerPoint(n),l=k(this.options.autoPanPadding),c=k(this.options.autoPanPaddingTopLeft||l),d=k(this.options.autoPanPaddingBottomRight||l),p=t.getSize(),_=0,w=0;a.x+o+d.x>p.x&&(_=a.x+o-p.x+d.x),a.x-_-c.x<0&&(_=a.x-c.x),a.y+i+d.y>p.y&&(w=a.y+i-p.y+d.y),a.y-w-c.y<0&&(w=a.y-c.y),(_||w)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([_,w]))}},_getAnchor:function(){return k(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),lr=function(t,e){return new xe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,i){return this._initOverlay(xe,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),lt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(xe,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 ft||(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)){Ct(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof wt)){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 we=dt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){dt.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){dt.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=dt.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=A("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+g(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,o=this._map,n=this._container,a=o.latLngToContainerPoint(o.getCenter()),l=o.layerPointToContainerPoint(t),c=this.options.direction,d=n.offsetWidth,p=n.offsetHeight,_=k(this.options.offset),w=this._getAnchor();c==="top"?(e=d/2,i=p):c==="bottom"?(e=d/2,i=0):c==="center"?(e=d/2,i=p/2):c==="right"?(e=0,i=p/2):c==="left"?(e=d,i=p/2):l.x<a.x?(c="right",e=0,i=p/2):(c="left",e=d+(_.x+w.x)*2,i=p/2),t=t.subtract(k(e,i,!0)).add(_).add(w),W(n,"leaflet-tooltip-right"),W(n,"leaflet-tooltip-left"),W(n,"leaflet-tooltip-top"),W(n,"leaflet-tooltip-bottom"),E(n,"leaflet-tooltip-"+c),U(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ot(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return k(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),hr=function(t,e){return new we(t,e)};Z.include({openTooltip:function(t,e,i){return this._initOverlay(we,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),lt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(we,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 ft||(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&&(T(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),T(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,o;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),o=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(o)),this._tooltip.setLatLng(e)}});var vo=Ot.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?(le(e),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){var o=k(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function cr(t){return new vo(t)}Ot.Default=Jt;var $t=lt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:b.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){S(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),H(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Zt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(St(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=C(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 P?t:new P(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),o=0,n=e.length,a;o<n;o++)a=e[o].style.zIndex,e[o]!==this._container&&a&&(i=t(i,+a));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!b.ielt9){ot(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var n=this._tiles[o];if(!(!n.current||!n.loaded)){var a=Math.min(1,(t-n.loaded)/200);ot(n.el,a),a<1?e=!0:(n.active?i=!0:this._onOpaqueTile(n),n.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(it(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this))}},_onOpaqueTile:v,_initContainer:function(){this._container||(this._container=A("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)):(H(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],n=this._map;return o||(o=this._levels[t]={},o.el=A("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,n.getCenter(),n.getZoom()),v(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:v,_onRemoveLevel:v,_onCreateLevel:v,_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 o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.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)H(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,o){var n=Math.floor(t/2),a=Math.floor(e/2),l=i-1,c=new P(+n,+a);c.z=+l;var d=this._tileCoordsToKey(c),p=this._tiles[d];return p&&p.active?(p.retain=!0,!0):(p&&p.loaded&&(p.retain=!0),l>o?this._retainParent(n,a,l,o):!1)},_retainChildren:function(t,e,i,o){for(var n=2*t;n<2*t+2;n++)for(var a=2*e;a<2*e+2;a++){var l=new P(n,a);l.z=i+1;var c=this._tileCoordsToKey(l),d=this._tiles[c];if(d&&d.active){d.retain=!0;continue}else d&&d.loaded&&(d.retain=!0);i+1<o&&this._retainChildren(n,a,i+1,o)}},_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,o){var n=Math.round(e);this.options.maxZoom!==void 0&&n>this.options.maxZoom||this.options.minZoom!==void 0&&n<this.options.minZoom?n=void 0:n=this._clampZoom(n);var a=this.options.updateWhenZooming&&n!==this._tileZoom;(!o||a)&&(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),n!==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 o=this._map.getZoomScale(i,t.zoom),n=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();b.any3d?kt(t.el,n,o):U(t.el,n)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd: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(),o=e.getZoomScale(i,this._tileZoom),n=e.project(t,this._tileZoom).floor(),a=e.getSize().divideBy(o*2);return new N(n.subtract(a),n.add(a))},_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 o=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(o),a=n.getCenter(),l=[],c=this.options.keepBuffer,d=new N(n.getBottomLeft().subtract([c,-c]),n.getTopRight().add([c,-c]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var p in this._tiles){var _=this._tiles[p].coords;(_.z!==this._tileZoom||!d.contains(new P(_.x,_.y)))&&(this._tiles[p].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var w=n.min.y;w<=n.max.y;w++)for(var z=n.min.x;z<=n.max.x;z++){var X=new P(z,w);if(X.z=this._tileZoom,!!this._isValidTile(X)){var G=this._tiles[this._tileCoordsToKey(X)];G?G.current=!0:l.push(X)}}if(l.sort(function(tt,Nt){return tt.distanceTo(a)-Nt.distanceTo(a)}),l.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var rt=document.createDocumentFragment();for(z=0;z<l.length;z++)this._addTile(l[z],rt);this._level.el.appendChild(rt)}}}},_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 o=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),n=o.add(i),a=e.unproject(o,t.z),l=e.unproject(n,t.z);return[a,l]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Q(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 P(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(H(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){E(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=v,t.onmousemove=v,b.ielt9&&this.options.opacity<1&&ot(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),f(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&J(f(this._tileReady,this,t,null,n)),U(n,i),this._tiles[o]={el:n,coords:t,current:!0},e.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);i=this._tiles[o],i&&(i.loaded=+new Date,this._map._fadeAnimated?(ot(i.el,0),it(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(E(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(f(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new P(this._wrapX?M(t.x,this._wrapX):t.x,this._wrapY?M(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(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 ur(t){return new $t(t)}var Dt=$t.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=S(this,e),e.detectRetina&&b.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 T(i,"load",f(this._tileOnLoad,this,e,i)),T(i,"error",f(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:b.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 yi(this._url,u(e,this.options))},_tileOnLoad:function(t,e){b.ielt9?setTimeout(f(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,o=this.options.zoomOffset;return i&&(t=e-t),t+o},_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=v,e.onerror=v,!e.complete)){e.src=re;var i=this._tiles[t].coords;H(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",re),$t.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===re))return $t.prototype._tileReady.call(this,t,e,i)}});function yo(t,e){return new Dt(t,e)}var bo=Dt.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=u({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);e=S(this,e);var n=e.detectRetina&&b.retina?2:1,a=this.getTileSize();i.width=a.x*n,i.height=a.y*n,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,Dt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=$(i.project(e[0]),i.project(e[1])),n=o.min,a=o.max,l=(this._wmsVersion>=1.3&&this._crs===uo?[n.y,n.x,a.y,a.x]:[n.x,n.y,a.x,a.y]).join(","),c=Dt.prototype.getTileUrl.call(this,t);return c+V(this.wmsParams,c,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+l},setParams:function(t,e){return u(this.wmsParams,t),e||this.redraw(),this}});function dr(t,e){return new bo(t,e)}Dt.WMS=bo,yo.wms=dr;var vt=lt.extend({options:{padding:.1},initialize:function(t){S(this,t),g(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),E(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),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,e),a=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(t,e));b.any3d?kt(this._container,a,i):U(this._container,a)},_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 N(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xo=vt.extend({options:{tolerance:0},getEvents:function(){var t=vt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");T(t,"mousemove",this._onMouseMove,this),T(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),T(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){it(this._redrawRequest),delete this._ctx,H(this._container),D(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)){vt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=b.retina?2:1;U(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",b.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){vt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[g(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,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[g(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=[],o,n;for(n=0;n<e.length;n++){if(o=Number(e[n]),isNaN(o))return;i.push(o)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||J(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,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 o=this._drawFirst;o;o=o.next)t=o.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,o,n,a,l=t._parts,c=l.length,d=this._ctx;if(c){for(d.beginPath(),i=0;i<c;i++){for(o=0,n=l[i].length;o<n;o++)a=l[i][o],d[o?"lineTo":"moveTo"](a.x,a.y);e&&d.closePath()}this._fillStroke(d,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),n=(Math.max(Math.round(t._radiusY),1)||o)/o;n!==1&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,0,Math.PI*2,!1),n!==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,o,n=this._drawFirst;n;n=n.next)i=n.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(o=i);this._fireEvent(o?[o]:!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&&(W(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,o,n=this._drawFirst;n;n=n.next)i=n.layer,i.options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(E(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(f(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,o=e.prev;if(i)i.prev=o;else return;o?o.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;if(o)o.next=i;else return;i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function wo(t){return b.canvas?new xo(t):null}var Qt=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">')}}(),pr={_initContainer:function(){this._container=A("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Qt("shape");E(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Qt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[g(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;H(e),t.removeInteractiveTarget(e),delete this._layers[g(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,o=t.options,n=t._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(e||(e=t._stroke=Qt("stroke")),n.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=st(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(n.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=Qt("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Zt(t._container)},_bringToBack:function(t){St(t._container)}},Le=b.vml?Qt:ki,te=vt.extend({_initContainer:function(){this._container=Le("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Le("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){H(this._container),D(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vt.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)),U(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=Le("path");t.options.className&&E(e,t.options.className),t.options.interactive&&E(e,"leaflet-interactive"),this._updateStyle(t),this._layers[g(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){H(t._path),t.removeInteractiveTarget(t._path),delete this._layers[g(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,Pi(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o=Math.max(Math.round(t._radiusY),1)||i,n="a"+i+","+o+" 0 1,0 ",a=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+i*2+",0 "+n+-i*2+",0 ";this._setPath(t,a)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Zt(t._path)},_bringToBack:function(t){St(t._path)}});b.vml&&te.include(pr);function Lo(t){return b.svg||b.vml?new te(t):null}Z.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&&wo(t)||Lo(t)}});var Mo=Bt.extend({initialize:function(t,e){Bt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=F(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function mr(t,e){return new Mo(t,e)}te.create=Le,te.pointsToPath=Pi,_t.geometryToLayer=ge,_t.coordsToLatLng=si,_t.coordsToLatLngs=_e,_t.latLngToCoords=ai,_t.latLngsToCoords=ve,_t.getFeature=Rt,_t.asFeature=ye,Z.mergeOptions({boxZoom:!0});var ko=ut.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(){T(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){D(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){H(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(),qt(),Fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),T(document,{contextmenu:Ct,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=A("div","leaflet-zoom-box",this._container),E(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),i=e.getSize();U(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(H(this._box),W(this._container,"leaflet-crosshair")),Vt(),Ue(),D(document,{contextmenu:Ct,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(f(this._resetState,this),0);var e=new Q(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())}});Z.addInitHook("addHandler","boxZoom",ko),Z.mergeOptions({doubleClickZoom:!0});var Po=ut.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(),o=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-o:i+o;e.options.doubleClickZoom==="center"?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});Z.addInitHook("addHandler","doubleClickZoom",Po),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var To=ut.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new xt(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))}E(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){W(this._map._container,"leaflet-grab"),W(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=F(this._map.options.maxBounds);this._offsetLimit=$(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,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,a=(o+e+i)%t-e-i,l=Math.abs(n+i)<Math.abs(a+i)?n:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=l},_onDragEnd:function(t){var e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var n=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,l=i.easeLinearity,c=n.multiplyBy(l/a),d=c.distanceTo([0,0]),p=Math.min(i.inertiaMaxSpeed,d),_=c.multiplyBy(p/d),w=p/(i.inertiaDeceleration*l),z=_.multiplyBy(-w/2).round();!z.x&&!z.y?e.fire("moveend"):(z=e._limitOffset(z,e.options.maxBounds),J(function(){e.panBy(z,{duration:w,easeLinearity:l,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",To),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Co=ut.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"),T(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(),D(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,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,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,o,n;for(o=0,n=i.left.length;o<n;o++)e[i.left[o]]=[-1*t,0];for(o=0,n=i.right.length;o<n;o++)e[i.right[o]]=[t,0];for(o=0,n=i.down.length;o<n;o++)e[i.down[o]]=[0,t];for(o=0,n=i.up.length;o<n;o++)e[i.up[o]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,o,n;for(o=0,n=i.zoomIn.length;o<n;o++)e[i.zoomIn[o]]=t;for(o=0,n=i.zoomOut.length;o<n;o++)e[i.zoomOut[o]]=-t},_addHooks:function(){T(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){D(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,i=this._map,o;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=k(o).multiplyBy(3)),i.options.maxBounds&&(o=i._limitOffset(k(o),i.options.maxBounds)),i.options.worldCopyJump){var n=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(o)));i.panTo(n)}else i.panBy(o)}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;Ct(t)}}});Z.addInitHook("addHandler","keyboard",Co),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Eo=ut.extend({addHooks:function(){T(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){D(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=$i(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(f(this._performZoom,this),o),Ct(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=this._delta/(this._map.options.wheelPxPerZoomLevel*4),n=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,a=i?Math.ceil(n/i)*i:n,l=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,l&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+l):t.setZoomAround(this._lastMousePos,e+l))}});Z.addInitHook("addHandler","scrollWheelZoom",Eo);var fr=600;Z.mergeOptions({tapHold:b.touchNative&&b.safari&&b.mobile,tapTolerance:15});var zo=ut.extend({addHooks:function(){T(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){D(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 P(e.clientX,e.clientY),this._holdTimeout=setTimeout(f(function(){this._cancel(),this._isTapValid()&&(T(document,"touchend",Y),T(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),fr),T(document,"touchend touchcancel contextmenu",this._cancel,this),T(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){D(document,"touchend",Y),D(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),D(document,"touchend touchcancel contextmenu",this._cancel,this),D(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new P(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)}});Z.addInitHook("addHandler","tapHold",zo),Z.mergeOptions({touchZoom:b.touch,bounceAtZoomLimits:!0});var Io=ut.extend({addHooks:function(){E(this._map._container,"leaflet-touch-zoom"),T(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){W(this._map._container,"leaflet-touch-zoom"),D(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]),o=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(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),T(document,"touchmove",this._onTouchMove,this),T(document,"touchend touchcancel",this._onTouchEnd,this),Y(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),n=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(n,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&n<1||this._zoom>e.getMaxZoom()&&n>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,n===1)return}else{var a=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(n===1&&a.x===0&&a.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),it(this._animRequest);var l=f(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=J(l,this,!0),Y(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,it(this._animRequest),D(document,"touchmove",this._onTouchMove,this),D(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))}});Z.addInitHook("addHandler","touchZoom",Io),Z.BoxZoom=ko,Z.DoubleClickZoom=Po,Z.Drag=To,Z.Keyboard=Co,Z.ScrollWheelZoom=Eo,Z.TapHold=zo,Z.TouchZoom=Io,s.Bounds=N,s.Browser=b,s.CRS=mt,s.Canvas=xo,s.Circle=ri,s.CircleMarker=fe,s.Class=pt,s.Control=at,s.DivIcon=vo,s.DivOverlay=dt,s.DomEvent=Sn,s.DomUtil=In,s.Draggable=xt,s.Evented=Ht,s.FeatureGroup=ft,s.GeoJSON=_t,s.GridLayer=$t,s.Handler=ut,s.Icon=Ot,s.ImageOverlay=be,s.LatLng=R,s.LatLngBounds=Q,s.Layer=lt,s.LayerGroup=At,s.LineUtil=Vn,s.Map=Z,s.Marker=me,s.Mixin=Hn,s.Path=wt,s.Point=P,s.PolyUtil=jn,s.Polygon=Bt,s.Polyline=gt,s.Popup=xe,s.PosAnimation=Qi,s.Projection=Gn,s.Rectangle=Mo,s.Renderer=vt,s.SVG=te,s.SVGOverlay=_o,s.TileLayer=Dt,s.Tooltip=we,s.Transformation=Ie,s.Util=$o,s.VideoOverlay=go,s.bind=f,s.bounds=$,s.canvas=wo,s.circle=er,s.circleMarker=tr,s.control=Kt,s.divIcon=cr,s.extend=u,s.featureGroup=Jn,s.geoJSON=fo,s.geoJson=nr,s.gridLayer=ur,s.icon=$n,s.imageOverlay=rr,s.latLng=I,s.latLngBounds=F,s.layerGroup=Xn,s.map=An,s.marker=Qn,s.point=k,s.polygon=or,s.polyline=ir,s.popup=lr,s.rectangle=mr,s.setOptions=S,s.stamp=g,s.svg=Lo,s.svgOverlay=ar,s.tileLayer=yo,s.tooltip=hr,s.transformation=jt,s.version=h,s.videoOverlay=sr;var gr=window.L;s.noConflict=function(){return window.L=gr,this},window.L=s})}),Do={};Ir(Do,{L:()=>Ar,default:()=>K});var Sr=`.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
|
|
3
|
-
`;if(typeof document<"u"){let y=document.createElement("style");y.textContent=Sr,document.head.appendChild(y)}var No=Bo(Ro(),1);Zr(Do,Bo(Ro(),1));var Ar=No,K=No;var ke={TEMP:"temp",DRAFTS:"drafts",ORIGINALS:"originals",PROCESSED:"processed"},jo=4;var yt={WIDTH:30,HEIGHT:40,ANCHOR_X:16,ANCHOR_Y:36};function Ho(y,r,s){if(y<=0||r<=0||s<0)return 0;let h=y*Math.pow(2,s);return Math.ceil(h/r)}function Wo(y,r,s,h){return{tileX:Ho(y,s,h),tileY:Ho(r,s,h)}}function di(y){return`${ke.PROCESSED}/${y}/preview/preview.webp`}function pi(y){return`${ke.PROCESSED}/${y}/preview/thumbnail.webp`}function mi(y){return`${ke.PROCESSED}/${y}/annotated/preview/preview.webp`}function fi(y){return`${ke.PROCESSED}/${y}/annotated/preview/thumbnail.webp`}function Fo(y,r,s,h){return y.replace("{z}",String(r)).replace("{x}",String(s)).replace("{y}",String(h))}function Uo(y,r){return[[0,0],[r,y]]}function Pe(y){return y.includes("{z}")&&y.includes("{x}")&&y.includes("{y}")}var ee=class{config;tileLayer=null;constructor(r){if(!r)throw new Error("Tile configuration is required");if(!r.tileUrl)throw new Error("Tile URL is required");if(!Pe(r.tileUrl))throw new Error("Tile URL template must contain {z}, {x}, and {y} placeholders");if(!r.imageInfo)throw new Error("Image info is required");this.config=r}createTileLayer(r){if(this.tileLayer)return console.warn("Tile layer already created. Use removeTileLayer() first."),this.tileLayer;try{let{imageInfo:s,tileUrl:h,keepBuffer:u,updateInterval:m}=this.config,f=this.calculateTileBounds(),x={minZoom:s.minZoom,maxZoom:s.maxZoom,maxNativeZoom:s.maxZoom,tileSize:s.tileSize,bounds:f,noWrap:!0,keepBuffer:u??4,updateWhenIdle:!1,updateWhenZooming:!0,updateInterval:m??50,opacity:1,className:"seamless-tiles"};return this.tileLayer=K.tileLayer(h,x),r&&this.setupEventListeners(r),console.log("TileLayerManager: Tile layer created successfully",{bounds:f,tileSize:s.tileSize,zoomRange:[s.minZoom,s.maxZoom]}),this.tileLayer}catch(s){let h=s instanceof Error?s.message:"Unknown error";throw new Error(`Failed to create tile layer: ${h}`)}}calculateTileBounds(){let{width:r,height:s}=this.config.imageInfo;return Uo(r,s)}calculateGridSize(r){let{width:s,height:h,tileSize:u}=this.config.imageInfo;return Wo(s,h,u,r)}getTileUrl(r,s,h){return Fo(this.config.tileUrl,r,s,h)}getTileLayer(){return this.tileLayer}removeTileLayer(r){this.tileLayer&&(r&&r.removeLayer(this.tileLayer),this.tileLayer=null,console.log("TileLayerManager: Tile layer removed"))}setupEventListeners(r){this.tileLayer&&(this.tileLayer.on("tileloadstart",s=>{console.debug("Tile loading started",{url:s.tile.src})}),this.tileLayer.on("tileload",()=>{console.debug("Tile loaded successfully")}),this.tileLayer.on("tileerror",s=>{console.warn("Tile loading error",{url:s.tile.src,error:s.error})}))}getImageInfo(){return this.config.imageInfo}getConfig(){return this.config}};var ie=class{imageInfo;constructor(r){if(!r)throw new Error("Image info is required");if(r.width<=0||r.height<=0)throw new Error("Image width and height must be greater than 0");if(r.tileSize<=0)throw new Error("Tile size must be greater than 0");this.imageInfo=r}calculateImagePosition(){let r=this.imageInfo.tileSize||256,s=this.imageInfo.minZoom||0,h=Math.pow(2,s+1),u=h*r,m=h*r,f=this.imageInfo.width/this.imageInfo.height,x=u/m,g,C,M,v;return f>x?(g=u,C=u/f,M=0,v=(m-C)/2):(g=m*f,C=m,M=(u-g)/2,v=0),{imageRenderWidth:g,imageRenderHeight:C,imageOffsetX:M,imageOffsetY:v,canvasWidth:u,canvasHeight:m}}leafletToImage(r){this.validateLeafletCoords(r);let{imageRenderWidth:s,imageRenderHeight:h,imageOffsetX:u,imageOffsetY:m}=this.calculateImagePosition(),f=r[1],x=r[0],g=(f-u)/s,C=(x-m)/h,M=g*this.imageInfo.width,v=C*this.imageInfo.height,B=g>=0&&g<=1&&C>=0&&C<=1;return{x:M,y:v,withinBounds:B}}imageToLeaflet(r){this.validateImageCoords(r);let{imageRenderWidth:s,imageRenderHeight:h,imageOffsetX:u,imageOffsetY:m}=this.calculateImagePosition(),f=r.x/this.imageInfo.width,x=r.y/this.imageInfo.height,g=f*s+u;return[x*h+m,g]}getImageCenter(){let{imageRenderWidth:r,imageRenderHeight:s,imageOffsetX:h,imageOffsetY:u}=this.calculateImagePosition(),m=h+r/2,f=u+s/2;return{x:m,y:f}}calculateMapBounds(){let r=this.imageInfo.tileSize||256,s=this.imageInfo.minZoom||0,h=Math.pow(2,s+1),u=h*r,m=h*r;return K.latLngBounds([0,0],[m,u])}validateLeafletCoords(r){if(!Array.isArray(r)||r.length!==2)throw new Error("Leaflet coordinates must be an array of 2 numbers [y, x]");let[s,h]=r;if(typeof s!="number"||typeof h!="number")throw new Error("Leaflet coordinates must be numbers");if(isNaN(s)||isNaN(h)||!isFinite(s)||!isFinite(h))throw new Error("Leaflet coordinates must be finite numbers")}validateImageCoords(r){if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Image coordinates must be an object with x and y properties");let{x:s,y:h}=r;if(typeof s!="number"||typeof h!="number")throw new Error("Image coordinates x and y must be numbers");if(isNaN(s)||isNaN(h)||!isFinite(s)||!isFinite(h))throw new Error("Image coordinates must be finite numbers");if(s<0||s>this.imageInfo.width)throw new Error(`Image x coordinate (${s}) is out of bounds [0, ${this.imageInfo.width}]`);if(h<0||h>this.imageInfo.height)throw new Error(`Image y coordinate (${h}) is out of bounds [0, ${this.imageInfo.height}]`)}createCustomCRS(){return K.extend({},K.CRS.Simple,{transformation:new K.Transformation(1,0,1,0)})}getAspectRatio(){return this.imageInfo.width/this.imageInfo.height}getBounds(){return{minX:0,maxX:this.imageInfo.width,minY:0,maxY:this.imageInfo.height}}getImageInfo(){return{...this.imageInfo}}isWithinBounds(r){try{return this.validateImageCoords(r),!0}catch{return!1}}clampToBounds(r){return{x:Math.max(0,Math.min(this.imageInfo.width,r.x)),y:Math.max(0,Math.min(this.imageInfo.height,r.y))}}calculateCenterOffset(r,s,h){if(this.validateImageCoords(r),s<=0||h<=0)throw new Error("Container width and height must be greater than 0");return{x:r.x-s/2,y:r.y-h/2}}};var oe=class{map;imageInfo;config;zoomState;zoomChangeListeners=new Set;constructor(r){if(!r.map)throw new Error("Leaflet map instance is required");if(!r.imageInfo)throw new Error("Image info is required");if(r.imageInfo.width<=0||r.imageInfo.height<=0)throw new Error("Image width and height must be greater than 0");this.map=r.map,this.imageInfo=r.imageInfo;let s=this.calculateMaxZoomFromDimensions(),h=r.config?.minZoom??r.imageInfo.minZoom??0,u=r.config?.maxZoom??r.imageInfo.maxZoom??s;if(h<0)throw new Error("Minimum zoom must be >= 0");if(u<h)throw new Error("Maximum zoom must be >= minimum zoom");this.config={minZoom:h,maxZoom:u,initialZoom:r.config?.initialZoom,zoomSnap:r.config?.zoomSnap??1,zoomDelta:r.config?.zoomDelta??1};let m=this.map.getZoom();this.zoomState={currentZoom:this.constrainZoom(m),minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.setupZoomListeners()}calculateMaxZoomFromDimensions(){let{width:r,height:s,tileSize:h=256}=this.imageInfo,u=Math.max(r,s),m=Math.floor(Math.log2(u/h)),x=Math.floor(Math.log2(16383/h))-1,g=Math.min(m,x,jo);return Math.max(0,g)}calculateOptimalInitialZoom(){if(typeof window>"u")return this.config.minZoom;let r=window.innerWidth,s;return r<=768?s=this.config.minZoom:s=Math.min(this.config.minZoom+1,this.config.maxZoom),this.constrainZoom(s)}constrainZoom(r){return Math.max(this.config.minZoom,Math.min(this.config.maxZoom,Math.round(r)))}isValidZoom(r){return Number.isInteger(r)&&r>=this.config.minZoom&&r<=this.config.maxZoom}zoomIn(r){let s=this.map.getZoom(),h=this.config.zoomDelta??1,u=this.constrainZoom(s+h);return u===s?!1:(this.setZoom(u,r),!0)}zoomOut(r){let s=this.map.getZoom(),h=this.config.zoomDelta??1,u=this.constrainZoom(s-h);return u===s?!1:(this.setZoom(u,r),!0)}setZoom(r,s){if(!Number.isFinite(r))throw new Error(`Invalid zoom level: ${r}. Must be a finite number between ${this.config.minZoom} and ${this.config.maxZoom}`);let h=this.constrainZoom(r),u=s?.animate!==!1;this.map.setZoom(h,{animate:u})}getZoomState(){return{...this.zoomState}}getZoom(){return this.map.getZoom()}getMinZoom(){return this.config.minZoom}getMaxZoom(){return this.config.maxZoom}canZoomIn(){return this.map.getZoom()<this.config.maxZoom}canZoomOut(){return this.map.getZoom()>this.config.minZoom}onZoomChange(r){return this.zoomChangeListeners.add(r),()=>{this.zoomChangeListeners.delete(r)}}removeAllListeners(){this.zoomChangeListeners.clear()}setupZoomListeners(){let r=()=>{let s=this.map.getZoom();this.zoomState={currentZoom:this.constrainZoom(s),minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.zoomChangeListeners.forEach(h=>{h(this.zoomState)})};this.map.on("zoomend",r),this.map.on("zoom",r),r()}dispose(){this.removeAllListeners()}};var Lt=null;function
|
|
2
|
+
`;if(typeof document<"u"){let y=document.createElement("style");y.textContent=Oo,document.head.appendChild(y)}var kr=Object.create,ui=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Tr=Object.getOwnPropertyNames,Cr=Object.getPrototypeOf,Er=Object.prototype.hasOwnProperty,zr=(y,r)=>()=>(r||y((r={exports:{}}).exports,r),r.exports),Ir=(y,r)=>{for(var s in r)ui(y,s,{get:r[s],enumerable:!0})},ci=(y,r,s,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Tr(r))!Er.call(y,u)&&u!==s&&ui(y,u,{get:()=>r[u],enumerable:!(h=Pr(r,u))||h.enumerable});return y},Zr=(y,r,s)=>(ci(y,r,"default"),s&&ci(s,r,"default")),Bo=(y,r,s)=>(s=y!=null?kr(Cr(y)):{},ci(r||!y||!y.__esModule?ui(s,"default",{value:y,enumerable:!0}):s,y)),Ro=zr((y,r)=>{"use strict";(function(s,h){typeof y=="object"&&typeof r<"u"?h(y):typeof define=="function"&&define.amd?define(["exports"],h):(s=typeof globalThis<"u"?globalThis:s||self,h(s.leaflet={}))})(y,function(s){"use strict";var h="1.9.4";function u(t){var e,i,o,n;for(i=1,o=arguments.length;i<o;i++){n=arguments[i];for(e in n)t[e]=n[e]}return t}var m=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function f(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}var x=0;function g(t){return"_leaflet_id"in t||(t._leaflet_id=++x),t._leaflet_id}function C(t,e,i){var o,n,a,l;return l=function(){o=!1,n&&(a.apply(i,n),n=!1)},a=function(){o?n=arguments:(t.apply(i,arguments),setTimeout(l,e),o=!0)},a}function M(t,e,i){var o=e[1],n=e[0],a=o-n;return t===o&&i?t:((t-n)%a+a)%a+n}function v(){return!1}function B(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function O(t){return j(t).split(/\s+/)}function S(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?m(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function q(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(!e||e.indexOf("?")===-1?"?":"&")+o.join("&")}var zt=/\{ *([\w_ -]+) *\}/g;function yi(t,e){return t.replace(zt,function(i,o){var n=e[o];if(n===void 0)throw new Error("No value provided for variable "+i);return typeof n=="function"&&(n=n(e)),n})}var st=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function Te(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var re="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Ce(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var bi=0;function xi(t){var e=+new Date,i=Math.max(0,16-(e-bi));return bi=e+i,window.setTimeout(t,i)}var Ee=window.requestAnimationFrame||Ce("RequestAnimationFrame")||xi,wi=window.cancelAnimationFrame||Ce("CancelAnimationFrame")||Ce("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function J(t,e,i){if(i&&Ee===xi)t.call(e);else return Ee.call(window,f(t,e))}function it(t){t&&wi.call(window,t)}var $o={__proto__:null,extend:u,create:m,bind:f,get lastId(){return x},stamp:g,throttle:C,wrapNum:M,falseFn:v,formatNum:B,trim:j,splitWords:O,setOptions:S,getParamString:q,template:yi,isArray:st,indexOf:Te,emptyImageUrl:re,requestFn:Ee,cancelFn:wi,requestAnimFrame:J,cancelAnimFrame:it};function pt(){}pt.extend=function(t){var e=function(){S(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,o=m(i);o.constructor=e,e.prototype=o;for(var n in this)Object.prototype.hasOwnProperty.call(this,n)&&n!=="prototype"&&n!=="__super__"&&(e[n]=this[n]);return t.statics&&u(e,t.statics),t.includes&&(Qo(t.includes),u.apply(null,[o].concat(t.includes))),u(o,t),delete o.statics,delete o.includes,o.options&&(o.options=i.options?m(i.options):{},u(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var a=0,l=o._initHooks.length;a<l;a++)o._initHooks[a].call(this)}},e},pt.include=function(t){var e=this.prototype.options;return u(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},pt.mergeOptions=function(t){return u(this.prototype.options,t),this},pt.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 Qo(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=st(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 et={on:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e);else{t=O(t);for(var n=0,a=t.length;n<a;n++)this._on(t[n],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var o in t)this._off(o,t[o],e);else{t=O(t);for(var n=arguments.length===1,a=0,l=t.length;a<l;a++)n?this._off(t[a]):this._off(t[a],e,i)}return this},_on:function(t,e,i,o){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 n={fn:e,ctx:i};o&&(n.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(n)}},_off:function(t,e,i){var o,n,a;if(this._events&&(o=this._events[t],!!o)){if(arguments.length===1){if(this._firingCount)for(n=0,a=o.length;n<a;n++)o[n].fn=v;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var l=this._listens(t,e,i);if(l!==!1){var c=o[l];this._firingCount&&(c.fn=v,this._events[t]=o=o.slice()),o.splice(l,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=u({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var n=this._events[t];if(n){this._firingCount=this._firingCount+1||1;for(var a=0,l=n.length;a<l;a++){var c=n[a],d=c.fn;c.once&&this.off(t,d,c.ctx),d.call(c.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,i,o){typeof t!="string"&&console.warn('"string" type argument expected');var n=e;typeof e!="function"&&(o=!!e,n=void 0,i=void 0);var a=this._events&&this._events[t];if(a&&a.length&&this._listens(t,n,i)!==!1)return!0;if(o){for(var l in this._eventParents)if(this._eventParents[l].listens(t,e,i,o))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var o=this._events[t]||[];if(!e)return!!o.length;i===this&&(i=void 0);for(var n=0,a=o.length;n<a;n++)if(o[n].fn===e&&o[n].ctx===i)return n;return!1},once:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e,!0);else{t=O(t);for(var n=0,a=t.length;n<a;n++)this._on(t[n],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[g(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[g(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,u({layer:t.target,propagatedFrom:t.target},t),!0)}};et.addEventListener=et.on,et.removeEventListener=et.clearAllEventListeners=et.off,et.addOneTimeEventListener=et.once,et.fireEvent=et.fire,et.hasEventListeners=et.listens;var Ht=pt.extend(et);function P(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var Li=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};P.prototype={clone:function(){return new P(this.x,this.y)},add:function(t){return this.clone()._add(k(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(k(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 P(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new P(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=Li(this.x),this.y=Li(this.y),this},distanceTo:function(t){t=k(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=k(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=k(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function k(t,e,i){return t instanceof P?t:st(t)?new P(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new P(t.x,t.y):new P(t,e,i)}function N(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}N.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof P||typeof t[0]=="number"||"x"in t)e=i=k(t);else if(t=$(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 k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return k(this.min.x,this.max.y)},getTopRight:function(){return k(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 P?t=k(t):t=$(t),t instanceof N?(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=$(t);var e=this.min,i=this.max,o=t.min,n=t.max,a=n.x>=e.x&&o.x<=i.x,l=n.y>=e.y&&o.y<=i.y;return a&&l},overlaps:function(t){t=$(t);var e=this.min,i=this.max,o=t.min,n=t.max,a=n.x>e.x&&o.x<i.x,l=n.y>e.y&&o.y<i.y;return a&&l},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,n=Math.abs(e.y-i.y)*t;return $(k(e.x-o,e.y-n),k(i.x+o,i.y+n))},equals:function(t){return t?(t=$(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function $(t,e){return!t||t instanceof N?t:new N(t,e)}function Q(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}Q.prototype={extend:function(t){var e=this._southWest,i=this._northEast,o,n;if(t instanceof R)o=t,n=t;else if(t instanceof Q){if(o=t._southWest,n=t._northEast,!o||!n)return this}else return t?this.extend(I(t)||F(t)):this;return!e&&!i?(this._southWest=new R(o.lat,o.lng),this._northEast=new R(n.lat,n.lng)):(e.lat=Math.min(o.lat,e.lat),e.lng=Math.min(o.lng,e.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new Q(new R(e.lat-o,e.lng-n),new R(i.lat+o,i.lng+n))},getCenter:function(){return new R((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 R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(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 R||"lat"in t?t=I(t):t=F(t);var e=this._southWest,i=this._northEast,o,n;return t instanceof Q?(o=t.getSouthWest(),n=t.getNorthEast()):o=n=t,o.lat>=e.lat&&n.lat<=i.lat&&o.lng>=e.lng&&n.lng<=i.lng},intersects:function(t){t=F(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),a=n.lat>=e.lat&&o.lat<=i.lat,l=n.lng>=e.lng&&o.lng<=i.lng;return a&&l},overlaps:function(t){t=F(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),a=n.lat>e.lat&&o.lat<i.lat,l=n.lng>e.lng&&o.lng<i.lng;return a&&l},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=F(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function F(t,e){return t instanceof Q?t:new Q(t,e)}function R(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)}R.prototype={equals:function(t,e){if(!t)return!1;t=I(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("+B(this.lat,t)+", "+B(this.lng,t)+")"},distanceTo:function(t){return bt.distance(this,I(t))},wrap:function(){return bt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return F([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new R(this.lat,this.lng,this.alt)}};function I(t,e,i){return t instanceof R?t:st(t)&&typeof t[0]!="object"?t.length===3?new R(t[0],t[1],t[2]):t.length===2?new R(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new R(t,e,i)}var mt={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},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),o=this.transformation.transform(e.min,i),n=this.transformation.transform(e.max,i);return new N(o,n)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?M(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?M(t.lat,this.wrapLat,!0):t.lat,o=t.alt;return new R(i,e,o)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,n=e.lng-i.lng;if(o===0&&n===0)return t;var a=t.getSouthWest(),l=t.getNorthEast(),c=new R(a.lat-o,a.lng-n),d=new R(l.lat-o,l.lng-n);return new Q(c,d)}},bt=u({},mt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,a=Math.sin((e.lat-t.lat)*i/2),l=Math.sin((e.lng-t.lng)*i/2),c=a*a+Math.cos(o)*Math.cos(n)*l*l,d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return this.R*d}}),Mi=6378137,ze={R:Mi,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=Math.sin(o*e);return new P(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=Mi*Math.PI;return new N([-t,-t],[t,t])}()};function Ie(t,e,i,o){if(st(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=o}Ie.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 P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function jt(t,e,i,o){return new Ie(t,e,i,o)}var Ze=u({},bt,{code:"EPSG:3857",projection:ze,transformation:function(){var t=.5/(Math.PI*ze.R);return jt(t,.5,-t,.5)}()}),tn=u({},Ze,{code:"EPSG:900913"});function ki(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Pi(t,e){var i="",o,n,a,l,c,d;for(o=0,a=t.length;o<a;o++){for(c=t[o],n=0,l=c.length;n<l;n++)d=c[n],i+=(n?"L":"M")+d.x+" "+d.y;i+=e?b.svg?"z":"x":""}return i||"M0 0"}var Se=document.documentElement.style,se="ActiveXObject"in window,en=se&&!document.addEventListener,Ti="msLaunchUri"in navigator&&!("documentMode"in document),Ae=ht("webkit"),Ci=ht("android"),Ei=ht("android 2")||ht("android 3"),on=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),nn=Ci&&ht("Google")&&on<537&&!("AudioNode"in window),Oe=!!window.opera,zi=!Ti&&ht("chrome"),Ii=ht("gecko")&&!Ae&&!Oe&&!se,rn=!zi&&ht("safari"),Zi=ht("phantom"),Si="OTransition"in Se,sn=navigator.platform.indexOf("Win")===0,Ai=se&&"transition"in Se,Be="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ei,Oi="MozPerspective"in Se,an=!window.L_DISABLE_3D&&(Ai||Be||Oi)&&!Si&&!Zi,Wt=typeof orientation<"u"||ht("mobile"),ln=Wt&&Ae,hn=Wt&&Be,Bi=!window.PointerEvent&&window.MSPointerEvent,Ri=!!(window.PointerEvent||Bi),Di="ontouchstart"in window||!!window.TouchEvent,cn=!window.L_NO_TOUCH&&(Di||Ri),un=Wt&&Oe,dn=Wt&&Ii,pn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,mn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",v,e),window.removeEventListener("testPassiveEventSupport",v,e)}catch{}return t}(),fn=function(){return!!document.createElement("canvas").getContext}(),Re=!!(document.createElementNS&&ki("svg").createSVGRect),gn=!!Re&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),_n=!Re&&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}}(),vn=navigator.platform.indexOf("Mac")===0,yn=navigator.platform.indexOf("Linux")===0;function ht(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var b={ie:se,ielt9:en,edge:Ti,webkit:Ae,android:Ci,android23:Ei,androidStock:nn,opera:Oe,chrome:zi,gecko:Ii,safari:rn,phantom:Zi,opera12:Si,win:sn,ie3d:Ai,webkit3d:Be,gecko3d:Oi,any3d:an,mobile:Wt,mobileWebkit:ln,mobileWebkit3d:hn,msPointer:Bi,pointer:Ri,touch:cn,touchNative:Di,mobileOpera:un,mobileGecko:dn,retina:pn,passiveEvents:mn,canvas:fn,svg:Re,vml:_n,inlineSvg:gn,mac:vn,linux:yn},Ni=b.msPointer?"MSPointerDown":"pointerdown",Hi=b.msPointer?"MSPointerMove":"pointermove",ji=b.msPointer?"MSPointerUp":"pointerup",Wi=b.msPointer?"MSPointerCancel":"pointercancel",De={touchstart:Ni,touchmove:Hi,touchend:ji,touchcancel:Wi},Fi={touchstart:kn,touchmove:ae,touchend:ae,touchcancel:ae},It={},Ui=!1;function bn(t,e,i){return e==="touchstart"&&Mn(),Fi[e]?(i=Fi[e].bind(this,i),t.addEventListener(De[e],i,!1),i):(console.warn("wrong event specified:",e),v)}function xn(t,e,i){if(!De[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(De[e],i,!1)}function wn(t){It[t.pointerId]=t}function Ln(t){It[t.pointerId]&&(It[t.pointerId]=t)}function Vi(t){delete It[t.pointerId]}function Mn(){Ui||(document.addEventListener(Ni,wn,!0),document.addEventListener(Hi,Ln,!0),document.addEventListener(ji,Vi,!0),document.addEventListener(Wi,Vi,!0),Ui=!0)}function ae(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in It)e.touches.push(It[i]);e.changedTouches=[e],t(e)}}function kn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Y(e),ae(t,e)}function Pn(t){var e={},i,o;for(o in t)i=t[o],e[o]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Tn=200;function Cn(t,e){t.addEventListener("dblclick",e);var i=0,o;function n(a){if(a.detail!==1){o=a.detail;return}if(!(a.pointerType==="mouse"||a.sourceCapabilities&&!a.sourceCapabilities.firesTouchEvents)){var l=Xi(a);if(!(l.some(function(d){return d instanceof HTMLLabelElement&&d.attributes.for})&&!l.some(function(d){return d instanceof HTMLInputElement||d instanceof HTMLSelectElement}))){var c=Date.now();c-i<=Tn?(o++,o===2&&e(Pn(a))):o=1,i=c}}}return t.addEventListener("click",n),{dblclick:e,simDblclick:n}}function En(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ne=ce(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ft=ce(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),qi=Ft==="webkitTransition"||Ft==="OTransition"?Ft+"End":"transitionend";function Gi(t){return typeof t=="string"?document.getElementById(t):t}function Ut(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return i==="auto"?null:i}function A(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function H(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Zt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function St(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function He(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=he(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function E(t,e){if(t.classList!==void 0)for(var i=O(e),o=0,n=i.length;o<n;o++)t.classList.add(i[o]);else if(!He(t,e)){var a=he(t);je(t,(a?a+" ":"")+e)}}function W(t,e){t.classList!==void 0?t.classList.remove(e):je(t,j((" "+he(t)+" ").replace(" "+e+" "," ")))}function je(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function he(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ot(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&zn(t,e)}function zn(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function ce(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function kt(t,e,i){var o=e||new P(0,0);t.style[Ne]=(b.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function U(t,e){t._leaflet_pos=e,b.any3d?kt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Pt(t){return t._leaflet_pos||new P(0,0)}var Vt,qt,We;if("onselectstart"in document)Vt=function(){T(window,"selectstart",Y)},qt=function(){D(window,"selectstart",Y)};else{var Gt=ce(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Vt=function(){if(Gt){var t=document.documentElement.style;We=t[Gt],t[Gt]="none"}},qt=function(){Gt&&(document.documentElement.style[Gt]=We,We=void 0)}}function Fe(){T(window,"dragstart",Y)}function Ue(){D(window,"dragstart",Y)}var ue,Ve;function qe(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(de(),ue=t,Ve=t.style.outlineStyle,t.style.outlineStyle="none",T(window,"keydown",de))}function de(){ue&&(ue.style.outlineStyle=Ve,ue=void 0,Ve=void 0,D(window,"keydown",de))}function Yi(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var In={__proto__:null,TRANSFORM:Ne,TRANSITION:Ft,TRANSITION_END:qi,get:Gi,getStyle:Ut,create:A,remove:H,empty:le,toFront:Zt,toBack:St,hasClass:He,addClass:E,removeClass:W,setClass:je,getClass:he,setOpacity:ot,testProp:ce,setTransform:kt,setPosition:U,getPosition:Pt,get disableTextSelection(){return Vt},get enableTextSelection(){return qt},disableImageDrag:Fe,enableImageDrag:Ue,preventOutline:qe,restoreOutline:de,getSizedParentNode:Yi,getScale:Ge};function T(t,e,i,o){if(e&&typeof e=="object")for(var n in e)Ke(t,n,e[n],i);else{e=O(e);for(var a=0,l=e.length;a<l;a++)Ke(t,e[a],i,o)}return this}var ct="_leaflet_events";function D(t,e,i,o){if(arguments.length===1)Ki(t),delete t[ct];else if(e&&typeof e=="object")for(var n in e)Xe(t,n,e[n],i);else if(e=O(e),arguments.length===2)Ki(t,function(c){return Te(e,c)!==-1});else for(var a=0,l=e.length;a<l;a++)Xe(t,e[a],i,o);return this}function Ki(t,e){for(var i in t[ct]){var o=i.split(/\d/)[0];(!e||e(o))&&Xe(t,o,null,null,i)}}var Ye={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ke(t,e,i,o){var n=e+g(i)+(o?"_"+g(o):"");if(t[ct]&&t[ct][n])return this;var a=function(c){return i.call(o||t,c||window.event)},l=a;!b.touchNative&&b.pointer&&e.indexOf("touch")===0?a=bn(t,e,a):b.touch&&e==="dblclick"?a=Cn(t,a):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Ye[e]||e,a,b.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(a=function(c){c=c||window.event,$e(t,c)&&l(c)},t.addEventListener(Ye[e],a,!1)):t.addEventListener(e,l,!1):t.attachEvent("on"+e,a),t[ct]=t[ct]||{},t[ct][n]=a}function Xe(t,e,i,o,n){n=n||e+g(i)+(o?"_"+g(o):"");var a=t[ct]&&t[ct][n];if(!a)return this;!b.touchNative&&b.pointer&&e.indexOf("touch")===0?xn(t,e,a):b.touch&&e==="dblclick"?En(t,a):"removeEventListener"in t?t.removeEventListener(Ye[e]||e,a,!1):t.detachEvent("on"+e,a),t[ct][n]=null}function Tt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Je(t){return Ke(t,"wheel",Tt),this}function Yt(t){return T(t,"mousedown touchstart dblclick contextmenu",Tt),t._leaflet_disable_click=!0,this}function Y(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ct(t){return Y(t),Tt(t),this}function Xi(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Ji(t,e){if(!e)return new P(t.clientX,t.clientY);var i=Ge(e),o=i.boundingClientRect;return new P((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}var Zn=b.linux&&b.chrome?window.devicePixelRatio:b.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function $i(t){return b.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Zn: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 $e(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 Sn={__proto__:null,on:T,off:D,stopPropagation:Tt,disableScrollPropagation:Je,disableClickPropagation:Yt,preventDefault:Y,stop:Ct,getPropagationPath:Xi,getMousePosition:Ji,getWheelDelta:$i,isExternalTarget:$e,addListener:T,removeListener:D},Qi=Ht.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=Pt(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=J(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(),U(this._el,i),this.fire("step")},_complete:function(){it(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=Ht.extend({options:{crs:Ze,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=S(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=f(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(I(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ft&&b.any3d&&!b.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),T(this._proxy,qi,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(I(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=u({animate:i.animate},i.zoom),i.pan=u({animate:i.animate,duration:i.duration},i.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(o)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||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),a=t instanceof P?t:this.latLngToContainerPoint(t),l=a.subtract(n).multiplyBy(1-1/o),c=this.containerPointToLatLng(n.add(l));return this.setView(c,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var i=k(e.paddingTopLeft||e.padding||[0,0]),o=k(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));if(n=typeof e.maxZoom=="number"?Math.min(e.maxZoom,n):n,n===1/0)return{center:t.getCenter(),zoom:n};var a=o.subtract(i).divideBy(2),l=this.project(t.getSouthWest(),n),c=this.project(t.getNorthEast(),n),d=this.unproject(l.add(c).divideBy(2).add(a),n);return{center:d,zoom:n}},fitBounds:function(t,e){if(t=F(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=k(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 Qi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){E(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||!b.any3d)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),n=this.project(t),a=this.getSize(),l=this._zoom;t=I(t),e=e===void 0?l:e;var c=Math.max(a.x,a.y),d=c*this.getZoomScale(l,e),p=n.distanceTo(o)||1,_=1.42,w=_*_;function z(V){var Me=V?-1:1,xr=V?d:c,wr=d*d-c*c+Me*w*w*p*p,Lr=2*xr*w*p,hi=wr/Lr,Ao=Math.sqrt(hi*hi+1)-hi,Mr=Ao<1e-9?-18:Math.log(Ao);return Mr}function X(V){return(Math.exp(V)-Math.exp(-V))/2}function G(V){return(Math.exp(V)+Math.exp(-V))/2}function rt(V){return X(V)/G(V)}var tt=z(0);function Nt(V){return c*(G(tt)/G(tt+_*V))}function _r(V){return c*(G(tt)*rt(tt+_*V)-X(tt))/w}function vr(V){return 1-Math.pow(1-V,1.5)}var yr=Date.now(),Zo=(z(1)-tt)/_,br=i.duration?1e3*i.duration:1e3*Zo*.8;function So(){var V=(Date.now()-yr)/br,Me=vr(V)*Zo;V<=1?(this._flyToFrame=J(So,this),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(_r(Me)/p)),l),this.getScaleZoom(c/Nt(Me),l),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),So.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=F(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(),o=this._limitCenter(i,this._zoom,F(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=k(e.paddingTopLeft||e.padding||[0,0]),o=k(e.paddingBottomRight||e.padding||[0,0]),n=this.project(this.getCenter()),a=this.project(t),l=this.getPixelBounds(),c=$([l.min.add(i),l.max.subtract(o)]),d=c.getSize();if(!c.contains(a)){this._enforcingBounds=!0;var p=a.subtract(c.getCenter()),_=c.extend(a).getSize().subtract(d);n.x+=p.x<0?-_.x:_.x,n.y+=p.y<0?-_.y:_.y,this.panTo(this.unproject(n),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=u({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),n=i.divideBy(2).round(),a=o.subtract(n);return!a.x&&!a.y?this:(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(f(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=u({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=f(this._handleGeolocationResponse,this),i=f(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,o=new R(e,i),n=o.toBounds(t.coords.accuracy*2),a=this._locateOptions;if(a.setView){var l=this.getBoundsZoom(n);this.setView(o,a.maxZoom?Math.min(l,a.maxZoom):l)}var c={latlng:o,bounds:n,timestamp:t.timestamp};for(var d in t.coords)typeof t.coords[d]=="number"&&(c[d]=t.coords[d]);this.fire("locationfound",c)}},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(),H(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(it(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)H(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":""),o=A("div",i,e||this._mapPane);return t&&(this._panes[t]=o),o},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 Q(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=F(t),i=k(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),a=this.getMaxZoom(),l=t.getNorthWest(),c=t.getSouthEast(),d=this.getSize().subtract(i),p=$(this.project(c,o),this.project(l,o)).getSize(),_=b.any3d?this.options.zoomSnap:1,w=d.x/p.x,z=d.y/p.y,X=e?Math.max(w,z):Math.min(w,z);return o=this.getScaleZoom(X,o),_&&(o=Math.round(o/(_/100))*(_/100),o=e?Math.ceil(o/_)*_:Math.floor(o/_)*_),Math.max(n,Math.min(a,o))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new P(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 N(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 o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(I(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(k(t),e)},layerPointToLatLng:function(t){var e=k(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(I(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(I(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(I(t),I(e))},containerPointToLayerPoint:function(t){return k(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return k(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(k(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(I(t)))},mouseEventToContainerPoint:function(t){return Ji(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=Gi(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");T(e,"scroll",this._onScroll,this),this._containerId=g(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&b.any3d,E(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ut(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),U(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(E(t.markerPane,"leaflet-zoom-hide"),E(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){U(this._mapPane,new P(0,0));var o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,i)._move(t,e)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,o){e===void 0&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i&&i.pinch&&this.fire("zoom",i):((n||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 it(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){U(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[g(this._container)]=this;var e=t?D:T;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),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){it(this._resizeRequest),this._resizeRequest=J(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=[],o,n=e==="mouseout"||e==="mouseover",a=t.target||t.srcElement,l=!1;a;){if(o=this._targets[g(a)],o&&(e==="click"||e==="preclick")&&this._draggableMoved(o)){l=!0;break}if(o&&o.listens(e,!0)&&(n&&!$e(a,t)||(i.push(o),n))||a===this._container)break;a=a.parentNode}return!i.length&&!l&&!n&&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"&&qe(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var o=u({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var n=this._findEventTargets(t,e);if(i){for(var a=[],l=0;l<i.length;l++)i[l].listens(e,!0)&&a.push(i[l]);n=a.concat(n)}if(n.length){e==="contextmenu"&&Y(t);var c=n[0],d={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var p=c.getLatLng&&(!c._radius||c._radius<=10);d.containerPoint=p?this.latLngToContainerPoint(c.getLatLng()):this.mouseEventToContainerPoint(t),d.layerPoint=this.containerPointToLayerPoint(d.containerPoint),d.latlng=p?c.getLatLng():this.layerPointToLatLng(d.layerPoint)}for(l=0;l<n.length;l++)if(n[l].fire(e,d,!0),d.originalEvent._stopped||n[l].options.bubblingMouseEvents===!1&&Te(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 Pt(this._mapPane)||new P(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 o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},_latLngBoundsToNewLayerBounds:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return $([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},_getCenterLayerPoint: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 o=this.project(t,e),n=this.getSize().divideBy(2),a=new N(o.subtract(n),o.add(n)),l=this._getBoundsOffset(a,i,e);return Math.abs(l.x)<=1&&Math.abs(l.y)<=1?t:this.unproject(o.add(l),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new N(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=$(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),n=o.min.subtract(t.min),a=o.max.subtract(t.max),l=this._rebound(n.x,-a.x),c=this._rebound(n.y,-a.y);return new P(l,c)},_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(),o=b.any3d?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){W(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=A("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Ne,o=this._proxy.style[i];kt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),o===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){H(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();kt(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 o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o);return i.animate!==!0&&!this.getSize().contains(n)?!1:(J(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,E(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(f(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&W(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 An(t,e){return new Z(t,e)}var at=pt.extend({options:{position:"topright"},initialize:function(t){S(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(),o=t._controlCorners[i];return E(e,"leaflet-control"),i.indexOf("bottom")!==-1?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(H(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()}}),Kt=function(t){return new at(t)};Z.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=A("div",e+"control-container",this._container);function o(n,a){var l=e+n+" "+e+a;t[n+a]=A("div",l,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)H(this._controlCorners[t]);H(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var to=at.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,o){return i<o?-1:o<i?1:0}},initialize:function(t,e,i){S(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var o in t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!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 at.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(g(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){E(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?(E(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):W(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return W(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=A("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Yt(e),Je(e);var o=this._section=A("section",t+"-list");i&&(this._map.on("click",this.collapse,this),T(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var n=this._layersLink=A("a",t+"-toggle",e);n.href="#",n.title="Layers",n.setAttribute("role","button"),T(n,{keydown:function(a){a.keyCode===13&&this._expandSafely()},click:function(a){Y(a),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=A("div",t+"-base",o),this._separator=A("div",t+"-separator",o),this._overlaysList=A("div",t+"-overlays",o),e.appendChild(o)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&g(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(f(function(o,n){return this.options.sortFunction(o.layer,n.layer,o.name,n.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;le(this._baseLayersList),le(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,n=0;for(i=0;i<this._layers.length;i++)o=this._layers[i],this._addItem(o),e=e||o.overlay,t=t||!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>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(g(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"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),o;t.overlay?(o=document.createElement("input"),o.type="checkbox",o.className="leaflet-control-layers-selector",o.defaultChecked=i):o=this._createRadioElement("leaflet-base-layers_"+g(this),i),this._layerControlInputs.push(o),o.layerId=g(t.layer),T(o,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;var a=document.createElement("span");e.appendChild(a),a.appendChild(o),a.appendChild(n);var l=t.overlay?this._overlaysList:this._baseLayersList;return l.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,o=[],n=[];this._handlingClick=!0;for(var a=t.length-1;a>=0;a--)e=t[a],i=this._getLayer(e.layerId).layer,e.checked?o.push(i):e.checked||n.push(i);for(a=0;a<n.length;a++)this._map.hasLayer(n[a])&&this._map.removeLayer(n[a]);for(a=0;a<o.length;a++)this._map.hasLayer(o[a])||this._map.addLayer(o[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,i,o=this._map.getZoom(),n=t.length-1;n>=0;n--)e=t[n],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&o<i.options.minZoom||i.options.maxZoom!==void 0&&o>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,T(t,"click",Y),this.expand();var e=this;setTimeout(function(){D(t,"click",Y),e._preventClick=!1})}}),On=function(t,e,i){return new to(t,e,i)},Qe=at.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=A("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove: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,o,n){var a=A("a",i,o);return a.innerHTML=t,a.href="#",a.title=e,a.setAttribute("role","button"),a.setAttribute("aria-label",e),Yt(a),T(a,"click",Ct),T(a,"click",n,this),T(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";W(this._zoomInButton,e),W(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(E(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(E(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var Bn=function(t){return new Qe(t)},eo=at.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=A("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=A("div",e,i)),t.imperial&&(this._iScale=A("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,o,n;e>5280?(i=e/5280,o=this._getRoundNum(i),this._updateScale(this._iScale,o+" mi",o/i)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/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}}),Rn=function(t){return new eo(t)},Dn='<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>',ti=at.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(b.inlineSvg?Dn+" ":"")+"Leaflet</a>"},initialize:function(t){S(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=A("div","leaflet-control-attribution"),Yt(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> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new ti().addTo(this)});var Nn=function(t){return new ti(t)};at.Layers=to,at.Zoom=Qe,at.Scale=eo,at.Attribution=ti,Kt.layers=On,Kt.zoom=Bn,Kt.scale=Rn,Kt.attribution=Nn;var ut=pt.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}});ut.addTo=function(t,e){return t.addHandler(e,this),this};var Hn={Events:et},io=b.touch?"touchstart mousedown":"mousedown",xt=Ht.extend({options:{clickTolerance:3},initialize:function(t,e,i,o){S(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(T(this._dragStartTarget,io,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xt._dragging===this&&this.finishDrag(!0),D(this._dragStartTarget,io,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!He(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){xt._dragging===this&&this.finishDrag();return}if(!(xt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(xt._dragging=this,this._preventOutline&&qe(this._element),Fe(),Vt(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Yi(this._element);this._startPoint=new P(e.clientX,e.clientY),this._startPos=Pt(this._element),this._parentScale=Ge(i);var o=t.type==="mousedown";T(document,o?"mousemove":"touchmove",this._onMove,this),T(document,o?"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 P(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,Y(t),this._moved||(this.fire("dragstart"),this._moved=!0,E(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),E(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),U(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){W(document.body,"leaflet-dragging"),this._lastTarget&&(W(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),D(document,"mousemove touchmove",this._onMove,this),D(document,"mouseup touchend touchcancel",this._onUp,this),Ue(),qt();var e=this._moved&&this._moving;this._moving=!1,xt._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function oo(t,e,i){var o,n=[1,4,2,8],a,l,c,d,p,_,w,z;for(a=0,_=t.length;a<_;a++)t[a]._code=Et(t[a],e);for(c=0;c<4;c++){for(w=n[c],o=[],a=0,_=t.length,l=_-1;a<_;l=a++)d=t[a],p=t[l],d._code&w?p._code&w||(z=pe(p,d,w,e,i),z._code=Et(z,e),o.push(z)):(p._code&w&&(z=pe(p,d,w,e,i),z._code=Et(z,e),o.push(z)),o.push(d));t=o}return t}function no(t,e){var i,o,n,a,l,c,d,p,_;if(!t||t.length===0)throw new Error("latlngs not passed");nt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var w=I([0,0]),z=F(t),X=z.getNorthWest().distanceTo(z.getSouthWest())*z.getNorthEast().distanceTo(z.getNorthWest());X<1700&&(w=ei(t));var G=t.length,rt=[];for(i=0;i<G;i++){var tt=I(t[i]);rt.push(e.project(I([tt.lat-w.lat,tt.lng-w.lng])))}for(c=d=p=0,i=0,o=G-1;i<G;o=i++)n=rt[i],a=rt[o],l=n.y*a.x-a.y*n.x,d+=(n.x+a.x)*l,p+=(n.y+a.y)*l,c+=l*3;c===0?_=rt[0]:_=[d/c,p/c];var Nt=e.unproject(k(_));return I([Nt.lat+w.lat,Nt.lng+w.lng])}function ei(t){for(var e=0,i=0,o=0,n=0;n<t.length;n++){var a=I(t[n]);e+=a.lat,i+=a.lng,o++}return I([e/o,i/o])}var jn={__proto__:null,clipPolygon:oo,polygonCenter:no,centroid:ei};function ro(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Un(t,i),t=Fn(t,i),t}function so(t,e,i){return Math.sqrt(Xt(t,e,i,!0))}function Wn(t,e,i){return Xt(t,e,i)}function Fn(t,e){var i=t.length,o=typeof Uint8Array<"u"?Uint8Array:Array,n=new o(i);n[0]=n[i-1]=1,ii(t,n,e,0,i-1);var a,l=[];for(a=0;a<i;a++)n[a]&&l.push(t[a]);return l}function ii(t,e,i,o,n){var a=0,l,c,d;for(c=o+1;c<=n-1;c++)d=Xt(t[c],t[o],t[n],!0),d>a&&(l=c,a=d);a>i&&(e[l]=1,ii(t,e,i,o,l),ii(t,e,i,l,n))}function Un(t,e){for(var i=[t[0]],o=1,n=0,a=t.length;o<a;o++)Vn(t[o],t[n])>e&&(i.push(t[o]),n=o);return n<a-1&&i.push(t[a-1]),i}var ao;function lo(t,e,i,o,n){var a=o?ao:Et(t,i),l=Et(e,i),c,d,p;for(ao=l;;){if(!(a|l))return[t,e];if(a&l)return!1;c=a||l,d=pe(t,e,c,i,n),p=Et(d,i),c===a?(t=d,a=p):(e=d,l=p)}}function pe(t,e,i,o,n){var a=e.x-t.x,l=e.y-t.y,c=o.min,d=o.max,p,_;return i&8?(p=t.x+a*(d.y-t.y)/l,_=d.y):i&4?(p=t.x+a*(c.y-t.y)/l,_=c.y):i&2?(p=d.x,_=t.y+l*(d.x-t.x)/a):i&1&&(p=c.x,_=t.y+l*(c.x-t.x)/a),new P(p,_,n)}function Et(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 Vn(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function Xt(t,e,i,o){var n=e.x,a=e.y,l=i.x-n,c=i.y-a,d=l*l+c*c,p;return d>0&&(p=((t.x-n)*l+(t.y-a)*c)/d,p>1?(n=i.x,a=i.y):p>0&&(n+=l*p,a+=c*p)),l=t.x-n,c=t.y-a,o?l*l+c*c:new P(n,a)}function nt(t){return!st(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function ho(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),nt(t)}function co(t,e){var i,o,n,a,l,c,d,p;if(!t||t.length===0)throw new Error("latlngs not passed");nt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var _=I([0,0]),w=F(t),z=w.getNorthWest().distanceTo(w.getSouthWest())*w.getNorthEast().distanceTo(w.getNorthWest());z<1700&&(_=ei(t));var X=t.length,G=[];for(i=0;i<X;i++){var rt=I(t[i]);G.push(e.project(I([rt.lat-_.lat,rt.lng-_.lng])))}for(i=0,o=0;i<X-1;i++)o+=G[i].distanceTo(G[i+1])/2;if(o===0)p=G[0];else for(i=0,a=0;i<X-1;i++)if(l=G[i],c=G[i+1],n=l.distanceTo(c),a+=n,a>o){d=(a-o)/n,p=[c.x-d*(c.x-l.x),c.y-d*(c.y-l.y)];break}var tt=e.unproject(k(p));return I([tt.lat+_.lat,tt.lng+_.lng])}var qn={__proto__:null,simplify:ro,pointToSegmentDistance:so,closestPointOnSegment:Wn,clipSegment:lo,_getEdgeIntersection:pe,_getBitCode:Et,_sqClosestPointOnSegment:Xt,isFlat:nt,_flat:ho,polylineCenter:co},oi={project:function(t){return new P(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new N([-180,-90],[180,90])},ni={R:6378137,R_MINOR:6356752314245179e-9,bounds:new N([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,n=this.R_MINOR/i,a=Math.sqrt(1-n*n),l=a*Math.sin(o),c=Math.tan(Math.PI/4-o/2)/Math.pow((1-l)/(1+l),a/2);return o=-i*Math.log(Math.max(c,1e-10)),new P(t.lng*e*i,o)},unproject:function(t){for(var e=180/Math.PI,i=this.R,o=this.R_MINOR/i,n=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),l=Math.PI/2-2*Math.atan(a),c=0,d=.1,p;c<15&&Math.abs(d)>1e-7;c++)p=n*Math.sin(l),p=Math.pow((1-p)/(1+p),n/2),d=Math.PI/2-2*Math.atan(a*p)-l,l+=d;return new R(l*e,t.x*e/i)}},Gn={__proto__:null,LonLat:oi,Mercator:ni,SphericalMercator:ze},Yn=u({},bt,{code:"EPSG:3395",projection:ni,transformation:function(){var t=.5/(Math.PI*ni.R);return jt(t,.5,-t,.5)}()}),uo=u({},bt,{code:"EPSG:4326",projection:oi,transformation:jt(1/180,1,-1/180,.5)}),Kn=u({},mt,{projection:oi,transformation:jt(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,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},infinite:!0});mt.Earth=bt,mt.EPSG3395=Yn,mt.EPSG3857=Ze,mt.EPSG900913=tn,mt.EPSG4326=uo,mt.Simple=Kn;var lt=Ht.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[g(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[g(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})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=g(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=g(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 g(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?st(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[g(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=g(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var n=this._zoomBoundLayers[o].options;t=n.minZoom===void 0?t:Math.min(t,n.minZoom),e=n.maxZoom===void 0?e:Math.max(e,n.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 At=lt.extend({initialize:function(t,e){S(this,e),this._layers={};var i,o;if(t)for(i=0,o=t.length;i<o;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,o;for(i in this._layers)o=this._layers[i],o[t]&&o[t].apply(o,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 g(t)}}),Xn=function(t,e){return new At(t,e)},ft=At.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),At.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),At.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 Q;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Jn=function(t,e){return new ft(t,e)},Ot=pt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){S(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 o=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),o},_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];typeof o=="number"&&(o=[o,o]);var n=k(o),a=k(e==="shadow"&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return b.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function $n(t){return new Ot(t)}var Jt=Ot.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 Jt.imagePath!="string"&&(Jt.imagePath=this._detectIconPath()),(this.options.imagePath||Jt.imagePath)+Ot.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(i,o,n){var a=o.exec(i);return a&&a[n]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=A("div","leaflet-default-icon-path",document.body),e=Ut(t,"background-image")||Ut(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):""}}),po=ut.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new xt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),E(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&&W(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,a=Pt(e._icon),l=i.getPixelBounds(),c=i.getPixelOrigin(),d=$(l.min._subtract(c).add(n),l.max._subtract(c).subtract(n));if(!d.contains(a)){var p=k((Math.max(d.max.x,a.x)-d.max.x)/(l.max.x-d.max.x)-(Math.min(d.min.x,a.x)-d.min.x)/(l.min.x-d.min.x),(Math.max(d.max.y,a.y)-d.max.y)/(l.max.y-d.max.y)-(Math.min(d.min.y,a.y)-d.min.y)/(l.min.y-d.min.y)).multiplyBy(o);i.panBy(p,{animate:!1}),this._draggable._newPos._add(p),this._draggable._startPos._add(p),U(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=J(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&&(it(this._panRequest),this._panRequest=J(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,o=Pt(e._icon),n=e._map.layerPointToLatLng(o);i&&U(i,o),e._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){it(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),me=lt.extend({options:{icon:new Jt,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){S(this,e),this._latlng=I(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=I(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),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),E(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&&T(i,"focus",this._panOnFocus,this);var n=t.icon.createShadow(this._shadow),a=!1;n!==this._shadow&&(this._removeShadow(),a=!0),n&&(E(n,e),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&a&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&D(this._icon,"focus",this._panOnFocus,this),H(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&H(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&U(this._icon,t),this._shadow&&U(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&&(E(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),po)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new po(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&&ot(this._icon,t),this._shadow&&ot(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?k(e.iconSize):k(0,0),o=e.iconAnchor?k(e.iconAnchor):k(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Qn(t,e){return new me(t,e)}var wt=lt.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 S(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)}}),fe=wt.extend({options:{fill:!0,radius:10},initialize:function(t,e){S(this,e),this._latlng=I(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=I(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 wt.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(),o=[t+i,e+i];this._pxBounds=new N(this._point.subtract(o),this._point.add(o))},_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 tr(t,e){return new fe(t,e)}var ri=fe.extend({initialize:function(t,e,i){if(typeof e=="number"&&(e=u({},i,{radius:e})),S(this,e),this._latlng=I(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 Q(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:wt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===bt.distance){var n=Math.PI/180,a=this._mRadius/bt.R/n,l=i.project([e+a,t]),c=i.project([e-a,t]),d=l.add(c).divideBy(2),p=i.unproject(d).lat,_=Math.acos((Math.cos(a*n)-Math.sin(e*n)*Math.sin(p*n))/(Math.cos(e*n)*Math.cos(p*n)))/n;(isNaN(_)||_===0)&&(_=a/Math.cos(Math.PI/180*e)),this._point=d.subtract(i.getPixelOrigin()),this._radius=isNaN(_)?0:d.x-i.project([p,t-_]).x,this._radiusY=d.y-l.y}else{var w=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(w).x}this._updateBounds()}});function er(t,e,i){return new ri(t,e,i)}var gt=wt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){S(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,o=Xt,n,a,l=0,c=this._parts.length;l<c;l++)for(var d=this._parts[l],p=1,_=d.length;p<_;p++){n=d[p-1],a=d[p];var w=o(t,n,a,!0);w<e&&(e=w,i=o(t,n,a))}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 co(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=I(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Q,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return nt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=nt(t),o=0,n=t.length;o<n;o++)i?(e[o]=I(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},_project:function(){var t=new N;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 P(t,t);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var o=t[0]instanceof R,n=t.length,a,l;if(o){for(l=[],a=0;a<n;a++)l[a]=this._map.latLngToLayerPoint(t[a]),i.extend(l[a]);e.push(l)}else for(a=0;a<n;a++)this._projectLatlngs(t[a],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,o,n,a,l,c,d;for(i=0,n=0,a=this._rings.length;i<a;i++)for(d=this._rings[i],o=0,l=d.length;o<l-1;o++)c=lo(d[o],d[o+1],t,o,!0),c&&(e[n]=e[n]||[],e[n].push(c[0]),(c[1]!==d[o+1]||o===l-2)&&(e[n].push(c[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=ro(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,o,n,a,l,c,d=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;i<a;i++)for(c=this._parts[i],o=0,l=c.length,n=l-1;o<l;n=o++)if(!(!e&&o===0)&&so(t,c[n],c[o])<=d)return!0;return!1}});function ir(t,e){return new gt(t,e)}gt._flat=ho;var Bt=gt.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 no(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=gt.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof R&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){gt.prototype._setLatLngs.call(this,t),nt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return nt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new P(e,e);if(t=new N(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 o=0,n=this._rings.length,a;o<n;o++)a=oo(this._rings[o],t,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,i,o,n,a,l,c,d,p;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(a=0,d=this._parts.length;a<d;a++)for(i=this._parts[a],l=0,p=i.length,c=p-1;l<p;c=l++)o=i[l],n=i[c],o.y>t.y!=n.y>t.y&&t.x<(n.x-o.x)*(t.y-o.y)/(n.y-o.y)+o.x&&(e=!e);return e||gt.prototype._containsPoint.call(this,t,!0)}});function or(t,e){return new Bt(t,e)}var _t=ft.extend({initialize:function(t,e){S(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=st(t)?t:t.features,i,o,n;if(e){for(i=0,o=e.length;i<o;i++)n=e[i],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var a=this.options;if(a.filter&&!a.filter(t))return this;var l=ge(t,a);return l?(l.feature=ye(t),l.defaultOptions=l.options,this.resetStyle(l),a.onEachFeature&&a.onEachFeature(t,l),this.addLayer(l)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=u({},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 ge(t,e){var i=t.type==="Feature"?t.geometry:t,o=i?i.coordinates:null,n=[],a=e&&e.pointToLayer,l=e&&e.coordsToLatLng||si,c,d,p,_;if(!o&&!i)return null;switch(i.type){case"Point":return c=l(o),mo(a,t,c,e);case"MultiPoint":for(p=0,_=o.length;p<_;p++)c=l(o[p]),n.push(mo(a,t,c,e));return new ft(n);case"LineString":case"MultiLineString":return d=_e(o,i.type==="LineString"?0:1,l),new gt(d,e);case"Polygon":case"MultiPolygon":return d=_e(o,i.type==="Polygon"?1:2,l),new Bt(d,e);case"GeometryCollection":for(p=0,_=i.geometries.length;p<_;p++){var w=ge({geometry:i.geometries[p],type:"Feature",properties:t.properties},e);w&&n.push(w)}return new ft(n);case"FeatureCollection":for(p=0,_=i.features.length;p<_;p++){var z=ge(i.features[p],e);z&&n.push(z)}return new ft(n);default:throw new Error("Invalid GeoJSON object.")}}function mo(t,e,i,o){return t?t(e,i):new me(i,o&&o.markersInheritOptions&&o)}function si(t){return new R(t[1],t[0],t[2])}function _e(t,e,i){for(var o=[],n=0,a=t.length,l;n<a;n++)l=e?_e(t[n],e-1,i):(i||si)(t[n]),o.push(l);return o}function ai(t,e){return t=I(t),t.alt!==void 0?[B(t.lng,e),B(t.lat,e),B(t.alt,e)]:[B(t.lng,e),B(t.lat,e)]}function ve(t,e,i,o){for(var n=[],a=0,l=t.length;a<l;a++)n.push(e?ve(t[a],nt(t[a])?0:e-1,i,o):ai(t[a],o));return!e&&i&&n.length>0&&n.push(n[0].slice()),n}function Rt(t,e){return t.feature?u({},t.feature,{geometry:e}):ye(e)}function ye(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var li={toGeoJSON:function(t){return Rt(this,{type:"Point",coordinates:ai(this.getLatLng(),t)})}};me.include(li),ri.include(li),fe.include(li),gt.include({toGeoJSON:function(t){var e=!nt(this._latlngs),i=ve(this._latlngs,e?1:0,!1,t);return Rt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Bt.include({toGeoJSON:function(t){var e=!nt(this._latlngs),i=e&&!nt(this._latlngs[0]),o=ve(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),Rt(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),At.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Rt(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",o=[];return this.eachLayer(function(n){if(n.toGeoJSON){var a=n.toGeoJSON(t);if(i)o.push(a.geometry);else{var l=ye(a);l.type==="FeatureCollection"?o.push.apply(o,l.features):o.push(l)}}}),i?Rt(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});function fo(t,e){return new _t(t,e)}var nr=fo,be=lt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=F(e),S(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(E(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){H(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&&Zt(this._image),this},bringToBack:function(){return this._map&&St(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=F(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:A("img");if(E(e,"leaflet-image-layer"),this._zoomAnimated&&E(e,"leaflet-zoom-animated"),this.options.className&&E(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onload=f(this.fire,this,"load"),e.onerror=f(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;kt(this._image,i,e)},_reset:function(){var t=this._image,e=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();U(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ot(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()}}),rr=function(t,e,i){return new be(t,e,i)},go=be.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:A("video");if(E(e,"leaflet-image-layer"),this._zoomAnimated&&E(e,"leaflet-zoom-animated"),this.options.className&&E(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onloadeddata=f(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],n=0;n<i.length;n++)o.push(i[n].src);this._url=i.length>0?o:[e.src];return}st(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 a=0;a<this._url.length;a++){var l=A("source");l.src=this._url[a],e.appendChild(l)}}});function sr(t,e,i){return new go(t,e,i)}var _o=be.extend({_initImage:function(){var t=this._image=this._url;E(t,"leaflet-image-layer"),this._zoomAnimated&&E(t,"leaflet-zoom-animated"),this.options.className&&E(t,this.options.className),t.onselectstart=v,t.onmousemove=v}});function ar(t,e,i){return new _o(t,e,i)}var dt=lt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof R||st(t))?(this._latlng=I(t),S(this,e)):(S(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&&ot(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ot(this._container,1),this.bringToFront(),this.options.interactive&&(E(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ot(this._container,0),this._removeTimeout=setTimeout(f(H,void 0,this._container),200)):H(this._container),this.options.interactive&&(W(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=I(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&&Zt(this._container),this},bringToBack:function(){return this._map&&St(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof ft){e=null;var i=this._source._layers;for(var o in i)if(i[o]._map){e=i[o];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=k(this.options.offset),i=this._getAnchor();this._zoomAnimated?U(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,i,o){var n=e;return n instanceof t||(n=new t(o).setContent(e)),i&&n.setLatLng(i),n}}),lt.include({_initOverlay:function(t,e,i,o){var n=i;return n instanceof t?(S(n,o),n._source=this):(n=e&&!o?e:new t(o,this),n.setContent(i)),n}});var xe=dt.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,dt.prototype.openOn.call(this,t)},onAdd:function(t){dt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof wt||this._source.on("preclick",Tt))},onRemove:function(t){dt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof wt||this._source.off("preclick",Tt))},getEvents:function(){var t=dt.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=A("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=A("div",t+"-content-wrapper",e);if(this._contentNode=A("div",t+"-content",i),Yt(e),Je(this._contentNode),T(e,"contextmenu",Tt),this._tipContainer=A("div",t+"-tip-container",e),this._tip=A("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=A("a",t+"-close-button",e);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">×</span>',T(o,"click",function(n){Y(n),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 o=t.offsetHeight,n=this.options.maxHeight,a="leaflet-popup-scrolled";n&&o>n?(e.height=n+"px",E(t,a)):W(t,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();U(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(Ut(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new P(this._containerLeft,-i-this._containerBottom);n._add(Pt(this._container));var a=t.layerPointToContainerPoint(n),l=k(this.options.autoPanPadding),c=k(this.options.autoPanPaddingTopLeft||l),d=k(this.options.autoPanPaddingBottomRight||l),p=t.getSize(),_=0,w=0;a.x+o+d.x>p.x&&(_=a.x+o-p.x+d.x),a.x-_-c.x<0&&(_=a.x-c.x),a.y+i+d.y>p.y&&(w=a.y+i-p.y+d.y),a.y-w-c.y<0&&(w=a.y-c.y),(_||w)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([_,w]))}},_getAnchor:function(){return k(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),lr=function(t,e){return new xe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,i){return this._initOverlay(xe,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),lt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(xe,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 ft||(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)){Ct(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof wt)){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 we=dt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){dt.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){dt.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=dt.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=A("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+g(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,o=this._map,n=this._container,a=o.latLngToContainerPoint(o.getCenter()),l=o.layerPointToContainerPoint(t),c=this.options.direction,d=n.offsetWidth,p=n.offsetHeight,_=k(this.options.offset),w=this._getAnchor();c==="top"?(e=d/2,i=p):c==="bottom"?(e=d/2,i=0):c==="center"?(e=d/2,i=p/2):c==="right"?(e=0,i=p/2):c==="left"?(e=d,i=p/2):l.x<a.x?(c="right",e=0,i=p/2):(c="left",e=d+(_.x+w.x)*2,i=p/2),t=t.subtract(k(e,i,!0)).add(_).add(w),W(n,"leaflet-tooltip-right"),W(n,"leaflet-tooltip-left"),W(n,"leaflet-tooltip-top"),W(n,"leaflet-tooltip-bottom"),E(n,"leaflet-tooltip-"+c),U(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ot(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return k(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),hr=function(t,e){return new we(t,e)};Z.include({openTooltip:function(t,e,i){return this._initOverlay(we,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),lt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(we,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 ft||(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&&(T(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),T(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,o;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),o=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(o)),this._tooltip.setLatLng(e)}});var vo=Ot.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?(le(e),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){var o=k(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function cr(t){return new vo(t)}Ot.Default=Jt;var $t=lt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:b.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){S(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),H(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Zt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(St(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=C(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 P?t:new P(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),o=0,n=e.length,a;o<n;o++)a=e[o].style.zIndex,e[o]!==this._container&&a&&(i=t(i,+a));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!b.ielt9){ot(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var n=this._tiles[o];if(!(!n.current||!n.loaded)){var a=Math.min(1,(t-n.loaded)/200);ot(n.el,a),a<1?e=!0:(n.active?i=!0:this._onOpaqueTile(n),n.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(it(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this))}},_onOpaqueTile:v,_initContainer:function(){this._container||(this._container=A("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)):(H(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],n=this._map;return o||(o=this._levels[t]={},o.el=A("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,n.getCenter(),n.getZoom()),v(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:v,_onRemoveLevel:v,_onCreateLevel:v,_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 o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.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)H(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,o){var n=Math.floor(t/2),a=Math.floor(e/2),l=i-1,c=new P(+n,+a);c.z=+l;var d=this._tileCoordsToKey(c),p=this._tiles[d];return p&&p.active?(p.retain=!0,!0):(p&&p.loaded&&(p.retain=!0),l>o?this._retainParent(n,a,l,o):!1)},_retainChildren:function(t,e,i,o){for(var n=2*t;n<2*t+2;n++)for(var a=2*e;a<2*e+2;a++){var l=new P(n,a);l.z=i+1;var c=this._tileCoordsToKey(l),d=this._tiles[c];if(d&&d.active){d.retain=!0;continue}else d&&d.loaded&&(d.retain=!0);i+1<o&&this._retainChildren(n,a,i+1,o)}},_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,o){var n=Math.round(e);this.options.maxZoom!==void 0&&n>this.options.maxZoom||this.options.minZoom!==void 0&&n<this.options.minZoom?n=void 0:n=this._clampZoom(n);var a=this.options.updateWhenZooming&&n!==this._tileZoom;(!o||a)&&(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),n!==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 o=this._map.getZoomScale(i,t.zoom),n=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();b.any3d?kt(t.el,n,o):U(t.el,n)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd: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(),o=e.getZoomScale(i,this._tileZoom),n=e.project(t,this._tileZoom).floor(),a=e.getSize().divideBy(o*2);return new N(n.subtract(a),n.add(a))},_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 o=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(o),a=n.getCenter(),l=[],c=this.options.keepBuffer,d=new N(n.getBottomLeft().subtract([c,-c]),n.getTopRight().add([c,-c]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var p in this._tiles){var _=this._tiles[p].coords;(_.z!==this._tileZoom||!d.contains(new P(_.x,_.y)))&&(this._tiles[p].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var w=n.min.y;w<=n.max.y;w++)for(var z=n.min.x;z<=n.max.x;z++){var X=new P(z,w);if(X.z=this._tileZoom,!!this._isValidTile(X)){var G=this._tiles[this._tileCoordsToKey(X)];G?G.current=!0:l.push(X)}}if(l.sort(function(tt,Nt){return tt.distanceTo(a)-Nt.distanceTo(a)}),l.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var rt=document.createDocumentFragment();for(z=0;z<l.length;z++)this._addTile(l[z],rt);this._level.el.appendChild(rt)}}}},_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 o=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),n=o.add(i),a=e.unproject(o,t.z),l=e.unproject(n,t.z);return[a,l]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Q(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 P(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(H(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){E(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=v,t.onmousemove=v,b.ielt9&&this.options.opacity<1&&ot(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),f(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&J(f(this._tileReady,this,t,null,n)),U(n,i),this._tiles[o]={el:n,coords:t,current:!0},e.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);i=this._tiles[o],i&&(i.loaded=+new Date,this._map._fadeAnimated?(ot(i.el,0),it(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(E(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(f(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new P(this._wrapX?M(t.x,this._wrapX):t.x,this._wrapY?M(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(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 ur(t){return new $t(t)}var Dt=$t.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=S(this,e),e.detectRetina&&b.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 T(i,"load",f(this._tileOnLoad,this,e,i)),T(i,"error",f(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:b.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 yi(this._url,u(e,this.options))},_tileOnLoad:function(t,e){b.ielt9?setTimeout(f(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,o=this.options.zoomOffset;return i&&(t=e-t),t+o},_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=v,e.onerror=v,!e.complete)){e.src=re;var i=this._tiles[t].coords;H(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",re),$t.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===re))return $t.prototype._tileReady.call(this,t,e,i)}});function yo(t,e){return new Dt(t,e)}var bo=Dt.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=u({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);e=S(this,e);var n=e.detectRetina&&b.retina?2:1,a=this.getTileSize();i.width=a.x*n,i.height=a.y*n,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,Dt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=$(i.project(e[0]),i.project(e[1])),n=o.min,a=o.max,l=(this._wmsVersion>=1.3&&this._crs===uo?[n.y,n.x,a.y,a.x]:[n.x,n.y,a.x,a.y]).join(","),c=Dt.prototype.getTileUrl.call(this,t);return c+q(this.wmsParams,c,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+l},setParams:function(t,e){return u(this.wmsParams,t),e||this.redraw(),this}});function dr(t,e){return new bo(t,e)}Dt.WMS=bo,yo.wms=dr;var vt=lt.extend({options:{padding:.1},initialize:function(t){S(this,t),g(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),E(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),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,e),a=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(t,e));b.any3d?kt(this._container,a,i):U(this._container,a)},_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 N(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xo=vt.extend({options:{tolerance:0},getEvents:function(){var t=vt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");T(t,"mousemove",this._onMouseMove,this),T(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),T(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){it(this._redrawRequest),delete this._ctx,H(this._container),D(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)){vt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=b.retina?2:1;U(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",b.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){vt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[g(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,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[g(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=[],o,n;for(n=0;n<e.length;n++){if(o=Number(e[n]),isNaN(o))return;i.push(o)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||J(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,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 o=this._drawFirst;o;o=o.next)t=o.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,o,n,a,l=t._parts,c=l.length,d=this._ctx;if(c){for(d.beginPath(),i=0;i<c;i++){for(o=0,n=l[i].length;o<n;o++)a=l[i][o],d[o?"lineTo":"moveTo"](a.x,a.y);e&&d.closePath()}this._fillStroke(d,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),n=(Math.max(Math.round(t._radiusY),1)||o)/o;n!==1&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,0,Math.PI*2,!1),n!==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,o,n=this._drawFirst;n;n=n.next)i=n.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(o=i);this._fireEvent(o?[o]:!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&&(W(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,o,n=this._drawFirst;n;n=n.next)i=n.layer,i.options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(E(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(f(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,o=e.prev;if(i)i.prev=o;else return;o?o.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;if(o)o.next=i;else return;i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function wo(t){return b.canvas?new xo(t):null}var Qt=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">')}}(),pr={_initContainer:function(){this._container=A("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Qt("shape");E(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Qt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[g(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;H(e),t.removeInteractiveTarget(e),delete this._layers[g(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,o=t.options,n=t._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(e||(e=t._stroke=Qt("stroke")),n.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=st(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(n.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=Qt("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Zt(t._container)},_bringToBack:function(t){St(t._container)}},Le=b.vml?Qt:ki,te=vt.extend({_initContainer:function(){this._container=Le("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Le("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){H(this._container),D(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vt.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)),U(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=Le("path");t.options.className&&E(e,t.options.className),t.options.interactive&&E(e,"leaflet-interactive"),this._updateStyle(t),this._layers[g(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){H(t._path),t.removeInteractiveTarget(t._path),delete this._layers[g(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,Pi(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o=Math.max(Math.round(t._radiusY),1)||i,n="a"+i+","+o+" 0 1,0 ",a=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+i*2+",0 "+n+-i*2+",0 ";this._setPath(t,a)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Zt(t._path)},_bringToBack:function(t){St(t._path)}});b.vml&&te.include(pr);function Lo(t){return b.svg||b.vml?new te(t):null}Z.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&&wo(t)||Lo(t)}});var Mo=Bt.extend({initialize:function(t,e){Bt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=F(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function mr(t,e){return new Mo(t,e)}te.create=Le,te.pointsToPath=Pi,_t.geometryToLayer=ge,_t.coordsToLatLng=si,_t.coordsToLatLngs=_e,_t.latLngToCoords=ai,_t.latLngsToCoords=ve,_t.getFeature=Rt,_t.asFeature=ye,Z.mergeOptions({boxZoom:!0});var ko=ut.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(){T(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){D(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){H(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(),Vt(),Fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),T(document,{contextmenu:Ct,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=A("div","leaflet-zoom-box",this._container),E(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),i=e.getSize();U(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(H(this._box),W(this._container,"leaflet-crosshair")),qt(),Ue(),D(document,{contextmenu:Ct,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(f(this._resetState,this),0);var e=new Q(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())}});Z.addInitHook("addHandler","boxZoom",ko),Z.mergeOptions({doubleClickZoom:!0});var Po=ut.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(),o=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-o:i+o;e.options.doubleClickZoom==="center"?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});Z.addInitHook("addHandler","doubleClickZoom",Po),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var To=ut.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new xt(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))}E(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){W(this._map._container,"leaflet-grab"),W(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=F(this._map.options.maxBounds);this._offsetLimit=$(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,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,a=(o+e+i)%t-e-i,l=Math.abs(n+i)<Math.abs(a+i)?n:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=l},_onDragEnd:function(t){var e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var n=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,l=i.easeLinearity,c=n.multiplyBy(l/a),d=c.distanceTo([0,0]),p=Math.min(i.inertiaMaxSpeed,d),_=c.multiplyBy(p/d),w=p/(i.inertiaDeceleration*l),z=_.multiplyBy(-w/2).round();!z.x&&!z.y?e.fire("moveend"):(z=e._limitOffset(z,e.options.maxBounds),J(function(){e.panBy(z,{duration:w,easeLinearity:l,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",To),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Co=ut.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"),T(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(),D(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,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,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,o,n;for(o=0,n=i.left.length;o<n;o++)e[i.left[o]]=[-1*t,0];for(o=0,n=i.right.length;o<n;o++)e[i.right[o]]=[t,0];for(o=0,n=i.down.length;o<n;o++)e[i.down[o]]=[0,t];for(o=0,n=i.up.length;o<n;o++)e[i.up[o]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,o,n;for(o=0,n=i.zoomIn.length;o<n;o++)e[i.zoomIn[o]]=t;for(o=0,n=i.zoomOut.length;o<n;o++)e[i.zoomOut[o]]=-t},_addHooks:function(){T(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){D(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,i=this._map,o;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=k(o).multiplyBy(3)),i.options.maxBounds&&(o=i._limitOffset(k(o),i.options.maxBounds)),i.options.worldCopyJump){var n=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(o)));i.panTo(n)}else i.panBy(o)}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;Ct(t)}}});Z.addInitHook("addHandler","keyboard",Co),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Eo=ut.extend({addHooks:function(){T(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){D(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=$i(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(f(this._performZoom,this),o),Ct(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=this._delta/(this._map.options.wheelPxPerZoomLevel*4),n=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,a=i?Math.ceil(n/i)*i:n,l=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,l&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+l):t.setZoomAround(this._lastMousePos,e+l))}});Z.addInitHook("addHandler","scrollWheelZoom",Eo);var fr=600;Z.mergeOptions({tapHold:b.touchNative&&b.safari&&b.mobile,tapTolerance:15});var zo=ut.extend({addHooks:function(){T(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){D(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 P(e.clientX,e.clientY),this._holdTimeout=setTimeout(f(function(){this._cancel(),this._isTapValid()&&(T(document,"touchend",Y),T(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),fr),T(document,"touchend touchcancel contextmenu",this._cancel,this),T(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){D(document,"touchend",Y),D(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),D(document,"touchend touchcancel contextmenu",this._cancel,this),D(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new P(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)}});Z.addInitHook("addHandler","tapHold",zo),Z.mergeOptions({touchZoom:b.touch,bounceAtZoomLimits:!0});var Io=ut.extend({addHooks:function(){E(this._map._container,"leaflet-touch-zoom"),T(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){W(this._map._container,"leaflet-touch-zoom"),D(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]),o=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(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),T(document,"touchmove",this._onTouchMove,this),T(document,"touchend touchcancel",this._onTouchEnd,this),Y(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),n=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(n,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&n<1||this._zoom>e.getMaxZoom()&&n>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,n===1)return}else{var a=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(n===1&&a.x===0&&a.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),it(this._animRequest);var l=f(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=J(l,this,!0),Y(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,it(this._animRequest),D(document,"touchmove",this._onTouchMove,this),D(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))}});Z.addInitHook("addHandler","touchZoom",Io),Z.BoxZoom=ko,Z.DoubleClickZoom=Po,Z.Drag=To,Z.Keyboard=Co,Z.ScrollWheelZoom=Eo,Z.TapHold=zo,Z.TouchZoom=Io,s.Bounds=N,s.Browser=b,s.CRS=mt,s.Canvas=xo,s.Circle=ri,s.CircleMarker=fe,s.Class=pt,s.Control=at,s.DivIcon=vo,s.DivOverlay=dt,s.DomEvent=Sn,s.DomUtil=In,s.Draggable=xt,s.Evented=Ht,s.FeatureGroup=ft,s.GeoJSON=_t,s.GridLayer=$t,s.Handler=ut,s.Icon=Ot,s.ImageOverlay=be,s.LatLng=R,s.LatLngBounds=Q,s.Layer=lt,s.LayerGroup=At,s.LineUtil=qn,s.Map=Z,s.Marker=me,s.Mixin=Hn,s.Path=wt,s.Point=P,s.PolyUtil=jn,s.Polygon=Bt,s.Polyline=gt,s.Popup=xe,s.PosAnimation=Qi,s.Projection=Gn,s.Rectangle=Mo,s.Renderer=vt,s.SVG=te,s.SVGOverlay=_o,s.TileLayer=Dt,s.Tooltip=we,s.Transformation=Ie,s.Util=$o,s.VideoOverlay=go,s.bind=f,s.bounds=$,s.canvas=wo,s.circle=er,s.circleMarker=tr,s.control=Kt,s.divIcon=cr,s.extend=u,s.featureGroup=Jn,s.geoJSON=fo,s.geoJson=nr,s.gridLayer=ur,s.icon=$n,s.imageOverlay=rr,s.latLng=I,s.latLngBounds=F,s.layerGroup=Xn,s.map=An,s.marker=Qn,s.point=k,s.polygon=or,s.polyline=ir,s.popup=lr,s.rectangle=mr,s.setOptions=S,s.stamp=g,s.svg=Lo,s.svgOverlay=ar,s.tileLayer=yo,s.tooltip=hr,s.transformation=jt,s.version=h,s.videoOverlay=sr;var gr=window.L;s.noConflict=function(){return window.L=gr,this},window.L=s})}),Do={};Ir(Do,{L:()=>Ar,default:()=>K});var Sr=`.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
|
|
3
|
+
`;if(typeof document<"u"){let y=document.createElement("style");y.textContent=Sr,document.head.appendChild(y)}var No=Bo(Ro(),1);Zr(Do,Bo(Ro(),1));var Ar=No,K=No;var ke={TEMP:"temp",DRAFTS:"drafts",ORIGINALS:"originals",PROCESSED:"processed"},jo=4;var yt={WIDTH:30,HEIGHT:40,ANCHOR_X:16,ANCHOR_Y:36};function Ho(y,r,s){if(y<=0||r<=0||s<0)return 0;let h=y*Math.pow(2,s);return Math.ceil(h/r)}function Wo(y,r,s,h){return{tileX:Ho(y,s,h),tileY:Ho(r,s,h)}}function di(y){return`${ke.PROCESSED}/${y}/preview/preview.webp`}function pi(y){return`${ke.PROCESSED}/${y}/preview/thumbnail.webp`}function mi(y){return`${ke.PROCESSED}/${y}/annotated/preview/preview.webp`}function fi(y){return`${ke.PROCESSED}/${y}/annotated/preview/thumbnail.webp`}function Fo(y,r,s,h){return y.replace("{z}",String(r)).replace("{x}",String(s)).replace("{y}",String(h))}function Uo(y,r){return[[0,0],[r,y]]}function Pe(y){return y.includes("{z}")&&y.includes("{x}")&&y.includes("{y}")}var ee=class{config;tileLayer=null;constructor(r){if(!r)throw new Error("Tile configuration is required");if(!r.tileUrl)throw new Error("Tile URL is required");if(!Pe(r.tileUrl))throw new Error("Tile URL template must contain {z}, {x}, and {y} placeholders");if(!r.imageInfo)throw new Error("Image info is required");this.config=r}createTileLayer(r){if(this.tileLayer)return console.warn("Tile layer already created. Use removeTileLayer() first."),this.tileLayer;try{let{imageInfo:s,tileUrl:h,keepBuffer:u,updateInterval:m}=this.config,f=this.calculateTileBounds(),x={minZoom:s.minZoom,maxZoom:s.maxZoom,maxNativeZoom:s.maxZoom,tileSize:s.tileSize,bounds:f,noWrap:!0,keepBuffer:u??4,updateWhenIdle:!1,updateWhenZooming:!0,updateInterval:m??50,opacity:1,className:"seamless-tiles"};return this.tileLayer=K.tileLayer(h,x),r&&this.setupEventListeners(r),console.log("TileLayerManager: Tile layer created successfully",{bounds:f,tileSize:s.tileSize,zoomRange:[s.minZoom,s.maxZoom]}),this.tileLayer}catch(s){let h=s instanceof Error?s.message:"Unknown error";throw new Error(`Failed to create tile layer: ${h}`)}}calculateTileBounds(){let{width:r,height:s}=this.config.imageInfo;return Uo(r,s)}calculateGridSize(r){let{width:s,height:h,tileSize:u}=this.config.imageInfo;return Wo(s,h,u,r)}getTileUrl(r,s,h){return Fo(this.config.tileUrl,r,s,h)}getTileLayer(){return this.tileLayer}removeTileLayer(r){this.tileLayer&&(r&&r.removeLayer(this.tileLayer),this.tileLayer=null,console.log("TileLayerManager: Tile layer removed"))}setupEventListeners(r){this.tileLayer&&(this.tileLayer.on("tileloadstart",s=>{console.debug("Tile loading started",{url:s.tile.src})}),this.tileLayer.on("tileload",()=>{console.debug("Tile loaded successfully")}),this.tileLayer.on("tileerror",s=>{console.warn("Tile loading error",{url:s.tile.src,error:s.error})}))}getImageInfo(){return this.config.imageInfo}getConfig(){return this.config}};var ie=class{imageInfo;constructor(r){if(!r)throw new Error("Image info is required");if(r.width<=0||r.height<=0)throw new Error("Image width and height must be greater than 0");if(r.tileSize<=0)throw new Error("Tile size must be greater than 0");this.imageInfo=r}calculateImagePosition(){let r=this.imageInfo.tileSize||256,s=this.imageInfo.minZoom||0,h=Math.pow(2,s+1),u=h*r,m=h*r,f=this.imageInfo.width/this.imageInfo.height,x=u/m,g,C,M,v;return f>x?(g=u,C=u/f,M=0,v=(m-C)/2):(g=m*f,C=m,M=(u-g)/2,v=0),{imageRenderWidth:g,imageRenderHeight:C,imageOffsetX:M,imageOffsetY:v,canvasWidth:u,canvasHeight:m}}leafletToImage(r){this.validateLeafletCoords(r);let{imageRenderWidth:s,imageRenderHeight:h,imageOffsetX:u,imageOffsetY:m}=this.calculateImagePosition(),f=r[1],x=r[0],g=(f-u)/s,C=(x-m)/h,M=g*this.imageInfo.width,v=C*this.imageInfo.height,B=g>=0&&g<=1&&C>=0&&C<=1;return{x:M,y:v,withinBounds:B}}imageToLeaflet(r){this.validateImageCoords(r);let{imageRenderWidth:s,imageRenderHeight:h,imageOffsetX:u,imageOffsetY:m}=this.calculateImagePosition(),f=r.x/this.imageInfo.width,x=r.y/this.imageInfo.height,g=f*s+u;return[x*h+m,g]}getImageCenter(){let{imageRenderWidth:r,imageRenderHeight:s,imageOffsetX:h,imageOffsetY:u}=this.calculateImagePosition(),m=h+r/2,f=u+s/2;return{x:m,y:f}}calculateMapBounds(){let r=this.imageInfo.tileSize||256,s=this.imageInfo.minZoom||0,h=Math.pow(2,s+1),u=h*r,m=h*r;return K.latLngBounds([0,0],[m,u])}validateLeafletCoords(r){if(!Array.isArray(r)||r.length!==2)throw new Error("Leaflet coordinates must be an array of 2 numbers [y, x]");let[s,h]=r;if(typeof s!="number"||typeof h!="number")throw new Error("Leaflet coordinates must be numbers");if(isNaN(s)||isNaN(h)||!isFinite(s)||!isFinite(h))throw new Error("Leaflet coordinates must be finite numbers")}validateImageCoords(r){if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Image coordinates must be an object with x and y properties");let{x:s,y:h}=r;if(typeof s!="number"||typeof h!="number")throw new Error("Image coordinates x and y must be numbers");if(isNaN(s)||isNaN(h)||!isFinite(s)||!isFinite(h))throw new Error("Image coordinates must be finite numbers");if(s<0||s>this.imageInfo.width)throw new Error(`Image x coordinate (${s}) is out of bounds [0, ${this.imageInfo.width}]`);if(h<0||h>this.imageInfo.height)throw new Error(`Image y coordinate (${h}) is out of bounds [0, ${this.imageInfo.height}]`)}createCustomCRS(){return K.extend({},K.CRS.Simple,{transformation:new K.Transformation(1,0,1,0)})}getAspectRatio(){return this.imageInfo.width/this.imageInfo.height}getBounds(){return{minX:0,maxX:this.imageInfo.width,minY:0,maxY:this.imageInfo.height}}getImageInfo(){return{...this.imageInfo}}isWithinBounds(r){try{return this.validateImageCoords(r),!0}catch{return!1}}clampToBounds(r){return{x:Math.max(0,Math.min(this.imageInfo.width,r.x)),y:Math.max(0,Math.min(this.imageInfo.height,r.y))}}calculateCenterOffset(r,s,h){if(this.validateImageCoords(r),s<=0||h<=0)throw new Error("Container width and height must be greater than 0");return{x:r.x-s/2,y:r.y-h/2}}};var oe=class{map;imageInfo;config;zoomState;zoomChangeListeners=new Set;constructor(r){if(!r.map)throw new Error("Leaflet map instance is required");if(!r.imageInfo)throw new Error("Image info is required");if(r.imageInfo.width<=0||r.imageInfo.height<=0)throw new Error("Image width and height must be greater than 0");this.map=r.map,this.imageInfo=r.imageInfo;let s=this.calculateMaxZoomFromDimensions(),h=r.config?.minZoom??r.imageInfo.minZoom??0,u=r.config?.maxZoom??r.imageInfo.maxZoom??s;if(h<0)throw new Error("Minimum zoom must be >= 0");if(u<h)throw new Error("Maximum zoom must be >= minimum zoom");this.config={minZoom:h,maxZoom:u,initialZoom:r.config?.initialZoom,zoomSnap:r.config?.zoomSnap??1,zoomDelta:r.config?.zoomDelta??1};let m=this.map.getZoom();this.zoomState={currentZoom:this.constrainZoom(m),minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.setupZoomListeners()}calculateMaxZoomFromDimensions(){let{width:r,height:s,tileSize:h=256}=this.imageInfo,u=Math.max(r,s),m=Math.floor(Math.log2(u/h)),x=Math.floor(Math.log2(16383/h))-1,g=Math.min(m,x,jo);return Math.max(0,g)}calculateOptimalInitialZoom(){if(typeof window>"u")return this.config.minZoom;let r=window.innerWidth,s;return r<=768?s=this.config.minZoom:s=Math.min(this.config.minZoom+1,this.config.maxZoom),this.constrainZoom(s)}constrainZoom(r){return Math.max(this.config.minZoom,Math.min(this.config.maxZoom,Math.round(r)))}isValidZoom(r){return Number.isInteger(r)&&r>=this.config.minZoom&&r<=this.config.maxZoom}zoomIn(r){let s=this.map.getZoom(),h=this.config.zoomDelta??1,u=this.constrainZoom(s+h);return u===s?!1:(this.setZoom(u,r),!0)}zoomOut(r){let s=this.map.getZoom(),h=this.config.zoomDelta??1,u=this.constrainZoom(s-h);return u===s?!1:(this.setZoom(u,r),!0)}setZoom(r,s){if(!Number.isFinite(r))throw new Error(`Invalid zoom level: ${r}. Must be a finite number between ${this.config.minZoom} and ${this.config.maxZoom}`);let h=this.constrainZoom(r),u=s?.animate!==!1;this.map.setZoom(h,{animate:u})}getZoomState(){return{...this.zoomState}}getZoom(){return this.map.getZoom()}getMinZoom(){return this.config.minZoom}getMaxZoom(){return this.config.maxZoom}canZoomIn(){return this.map.getZoom()<this.config.maxZoom}canZoomOut(){return this.map.getZoom()>this.config.minZoom}onZoomChange(r){return this.zoomChangeListeners.add(r),()=>{this.zoomChangeListeners.delete(r)}}removeAllListeners(){this.zoomChangeListeners.clear()}setupZoomListeners(){let r=()=>{let s=this.map.getZoom();this.zoomState={currentZoom:this.constrainZoom(s),minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.zoomChangeListeners.forEach(h=>{h(this.zoomState)})};this.map.on("zoomend",r),this.map.on("zoom",r),r()}dispose(){this.removeAllListeners()}};var Lt=null;function Vo(y){Lt&&Lt.parentElement&&(Lt.parentElement.removeChild(Lt),Lt=null);let{marker:r,onSave:s,onCancel:h}=y,u=q=>q?q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):"",m=document.createElement("div");m.className="edgepdf-marker-edit-popup",m.innerHTML=`
|
|
4
4
|
<div class="edgepdf-marker-edit-popup-overlay"></div>
|
|
5
5
|
<div class="edgepdf-marker-edit-popup-content">
|
|
6
6
|
<div class="edgepdf-marker-edit-popup-header">
|
|
@@ -34,7 +34,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
34
34
|
<button class="edgepdf-marker-edit-button edgepdf-marker-edit-button-save">Save</button>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
|
-
`;let f=m.querySelector(".edgepdf-marker-edit-popup-overlay"),x=m.querySelector(".edgepdf-marker-edit-popup-close"),g=m.querySelector(".edgepdf-marker-edit-button-cancel"),C=m.querySelector(".edgepdf-marker-edit-button-save"),M=m.querySelector("#marker-edit-title"),v=m.querySelector("#marker-edit-url"),B=
|
|
37
|
+
`;let f=m.querySelector(".edgepdf-marker-edit-popup-overlay"),x=m.querySelector(".edgepdf-marker-edit-popup-close"),g=m.querySelector(".edgepdf-marker-edit-button-cancel"),C=m.querySelector(".edgepdf-marker-edit-button-save"),M=m.querySelector("#marker-edit-title"),v=m.querySelector("#marker-edit-url"),B=q=>{q.key==="Escape"&&(j(),h())};document.addEventListener("keydown",B);let j=()=>{document.removeEventListener("keydown",B),m.parentElement&&m.parentElement.removeChild(m),Lt===m&&(Lt=null)},O=()=>{j(),h()};f.addEventListener("click",q=>{q.stopPropagation(),O()}),x.addEventListener("click",q=>{q.stopPropagation(),O()}),g.addEventListener("click",q=>{q.stopPropagation(),O()}),C.addEventListener("click",q=>{q.stopPropagation();let zt={label:M.value.trim()||void 0,href:v.value.trim()||void 0};s(zt),j()});let S=q=>{q.key==="Enter"&&C.click()};return M.addEventListener("keydown",S),v.addEventListener("keydown",S),document.body.appendChild(m),Lt=m,setTimeout(()=>{M.focus(),M.select()},0),m}var Mt=null;function qo(y){Mt&&Mt.parentElement&&(Mt.parentElement.removeChild(Mt),Mt=null);let{marker:r,onConfirm:s,onCancel:h}=y,u=O=>{if(!O)return"";let S=document.createElement("div");return S.textContent=O,S.innerHTML},m=r.label||r.description||"this marker",f=document.createElement("div");f.className="edgepdf-marker-delete-popup",f.innerHTML=`
|
|
38
38
|
<div class="edgepdf-marker-delete-popup-overlay"></div>
|
|
39
39
|
<div class="edgepdf-marker-delete-popup-content">
|
|
40
40
|
<div class="edgepdf-marker-delete-popup-header">
|
|
@@ -49,7 +49,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
49
49
|
<button class="edgepdf-marker-delete-button edgepdf-marker-delete-button-confirm">Delete</button>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
|
-
`;let x=f.querySelector(".edgepdf-marker-delete-popup-overlay"),g=f.querySelector(".edgepdf-marker-delete-popup-close"),C=f.querySelector(".edgepdf-marker-delete-button-cancel"),M=f.querySelector(".edgepdf-marker-delete-button-confirm"),v=O=>{O.key==="Escape"&&(B(),h())};document.addEventListener("keydown",v);let B=()=>{document.removeEventListener("keydown",v),f.parentElement&&f.parentElement.removeChild(f),Mt===f&&(Mt=null)},j=()=>{B(),h()};return x.addEventListener("click",O=>{O.stopPropagation(),j()}),g.addEventListener("click",O=>{O.stopPropagation(),j()}),C.addEventListener("click",O=>{O.stopPropagation(),j()}),M.addEventListener("click",O=>{O.stopPropagation(),B(),s()}),document.body.appendChild(f),Mt=f,setTimeout(()=>{C.focus()},0),f}var ne=class{map;coordinateMapper;imageInfo;markers=new Map;leafletMarkers=new Map;markerLayerGroup;eventListeners=new Map;selectedIds=new Set;activeMarkerId=null;activeMarkerOverlays=new Map;interactionConfig={draggable:!1,selectable:!1,showTooltips:!0,showPopups:!0,multiSelect:!1,showEditButton:!0,showDeleteButton:!0};defaultIconType="pin-gray";iconBasePath="./images/";constructor(r){if(!r.map)throw new Error("Map instance is required");if(!r.coordinateMapper)throw new Error("Coordinate mapper is required");if(!r.imageInfo)throw new Error("Image info is required");this.map=r.map,this.coordinateMapper=r.coordinateMapper,this.imageInfo=r.imageInfo,this.markerLayerGroup=K.layerGroup().addTo(this.map)}createMarker(r){if(!r.position&&!r.imageCoords)throw new Error("Either position or imageCoords must be provided");let s,h;if(r.position){s=r.position;let g=this.coordinateMapper.leafletToImage(s);if(!g.withinBounds)throw new Error(`Leaflet coordinates [${s[0]}, ${s[1]}] are out of bounds`);h={x:g.x,y:g.y}}else if(r.imageCoords){if(h=r.imageCoords,h.x<0||h.x>this.imageInfo.width||h.y<0||h.y>this.imageInfo.height)throw new Error(`Image coordinates {x: ${h.x}, y: ${h.y}} are out of bounds`);s=this.coordinateMapper.imageToLeaflet(h)}else throw new Error("Either position or imageCoords must be provided");let u=this.map.getZoom(),m=r.id||this.generateMarkerId(),f={id:m,position:s,x:h.x,y:h.y,zoom:u,label:r.label,description:r.description,href:r.href,target:r.target,showLabel:r.showLabel??!0,iconType:r.iconType||"pin-gray",referenceId:r.referenceId,draggable:r.draggable,editable:r.editable,deletable:r.deletable};this.validateMarker(f);let x=this.createLeafletMarker(f);return this.setupMarkerInteractions(x,f),this.markers.set(m,f),this.leafletMarkers.set(m,x),this.markerLayerGroup.addLayer(x),f}getMarker(r){return this.markers.get(r)||null}getAllMarkers(){return Array.from(this.markers.values())}exportMarkers(){return{markers:this.getAllMarkers(),exportedAt:new Date().toISOString(),version:"1.0.0"}}importMarkers(r,s={}){let{clearExisting:h=!1,validateCoordinates:u=!0}=s,m=[];if(!r||typeof r!="object")throw new Error("Invalid marker data: data must be an object");if(!Array.isArray(r.markers))throw new Error("Invalid marker data: markers must be an array");h&&this.removeAllMarkers();let f=0;for(let x=0;x<r.markers.length;x++){let g=r.markers[x];try{this.validateMarkerData(g),u&&this.validateMarkerCoordinates(g),this.createMarker({id:g.id,imageCoords:{x:g.x,y:g.y},label:g.label,description:g.description,href:g.href,target:g.target,showLabel:g.showLabel,iconType:g.iconType,referenceId:g.referenceId,draggable:g.draggable,editable:g.editable,deletable:g.deletable}),f++}catch(C){let M=C instanceof Error?C.message:"Unknown error";m.push(`Marker ${x+1} (${g.id||"unknown"}): ${M}`)}}return{success:m.length===0,importedCount:f,errors:m}}removeMarker(r){let s=this.markers.get(r),h=this.leafletMarkers.get(r);return!s||!h?!1:(this.markerLayerGroup.removeLayer(h),this.removeActiveMarkerOverlay(r),this.activeMarkerId===r&&this.setActiveMarker(null),this.markers.delete(r),this.leafletMarkers.delete(r),!0)}removeAllMarkers(){this.markerLayerGroup.clearLayers(),this.markers.clear(),this.leafletMarkers.clear(),this.activeMarkerOverlays.clear(),this.setActiveMarker(null)}updateMarkerPosition(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;let m=this.coordinateMapper.leafletToImage(s);if(!m.withinBounds)throw new Error(`Leaflet coordinates [${s[0]}, ${s[1]}] are out of bounds`);h.position=s,h.x=m.x,h.y=m.y,h.zoom=this.map.getZoom(),u.setLatLng([s[0],s[1]]);let f=this.activeMarkerOverlays.get(r);return f&&f.setLatLng([s[0],s[1]]),!0}updateMarker(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;if(s.label!==void 0&&(h.label=s.label),s.description!==void 0&&(h.description=s.description),s.href!==void 0&&(h.href=s.href),s.target!==void 0&&(h.target=s.target),s.showLabel!==void 0&&(h.showLabel=s.showLabel),s.iconType!==void 0){h.iconType=s.iconType;let m=this.createCustomIcon(s.iconType);u.setIcon(m)}if(s.referenceId!==void 0&&(h.referenceId=s.referenceId),s.draggable!==void 0){h.draggable=s.draggable;let m=h.draggable!==void 0?h.draggable:this.interactionConfig.draggable??!1;u.dragging&&(m?u.dragging.enable():u.dragging.disable()),this.setupMarkerInteractions(u,h)}return s.editable!==void 0&&(h.editable=s.editable),s.deletable!==void 0&&(h.deletable=s.deletable),this.updateLeafletMarkerDisplay(u,h),!0}getMarkerCount(){return this.markers.size}hasMarker(r){return this.markers.has(r)}setInteractionConfig(r){this.interactionConfig={...this.interactionConfig,...r},this.leafletMarkers.forEach((s,h)=>{let u=this.markers.get(h);if(u){let m=u.draggable!==void 0?u.draggable:this.interactionConfig.draggable??!1;if(s.dragging&&(m?s.dragging.enable():s.dragging.disable()),this.setupMarkerInteractions(s,u),this.interactionConfig.showPopups){let f=this.createPopupContent(u);s.setPopupContent(f)}}})}getInteractionConfig(){return{...this.interactionConfig}}selectMarker(r){let s=this.markers.get(r);return s?(this.interactionConfig.multiSelect||this.deselectAllMarkers(),this.selectedIds.add(r),this.updateMarkerSelectionVisual(r,!0),this.emitEvent("select",s,void 0),this.setActiveMarker(r),!0):!1}deselectMarker(r){let s=this.markers.get(r);return s?(this.selectedIds.delete(r),this.updateMarkerSelectionVisual(r,!1),this.emitEvent("deselect",s,void 0),this.activeMarkerId===r&&this.setActiveMarker(null),!0):!1}deselectAllMarkers(){let r=Array.from(this.selectedIds);this.selectedIds.clear(),r.forEach(s=>{let h=this.markers.get(s);h&&(this.updateMarkerSelectionVisual(s,!1),this.emitEvent("deselect",h,void 0))}),this.setActiveMarker(null)}getSelectionState(){return{selectedIds:Array.from(this.selectedIds),multiSelect:this.interactionConfig.multiSelect??!1}}isMarkerSelected(r){return this.selectedIds.has(r)}setActiveMarker(r){if(r===null){let u=this.activeMarkerId;if(this.activeMarkerId=null,u){this.removeActiveMarkerOverlay(u);let m=this.leafletMarkers.get(u);m&&m.isPopupOpen()&&m.closePopup()}return this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(null),!0}let s=this.markers.get(r);if(!s)return!1;if(this.activeMarkerId&&this.activeMarkerId!==r){this.removeActiveMarkerOverlay(this.activeMarkerId);let u=this.leafletMarkers.get(this.activeMarkerId);u&&u.isPopupOpen()&&u.closePopup()}let h=this.leafletMarkers.get(r);return h&&h.isPopupOpen()&&h.closePopup(),this.activeMarkerId=r,this.addActiveMarkerOverlay(r),this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(s),!0}getActiveMarker(){return this.activeMarkerId&&this.markers.get(this.activeMarkerId)||null}deleteMarker(r){let s=this.markers.get(r);return s?(this.emitEvent("delete",s,void 0),this.removeMarker(r)):!1}on(r,s){this.eventListeners.has(r)||this.eventListeners.set(r,new Set);let h=this.eventListeners.get(r);return h&&h.add(s),()=>{this.off(r,s)}}off(r,s){let h=this.eventListeners.get(r);h&&h.delete(s)}removeAllListeners(r){r?this.eventListeners.delete(r):this.eventListeners.clear()}setDefaultIconType(r){this.defaultIconType=r}getDefaultIconType(){return this.defaultIconType}setIconBasePath(r){this.iconBasePath=r.endsWith("/")?r:`${r}/`}getIconBasePath(){return this.iconBasePath}updateMarkerIcon(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;h.iconType=s;let m=this.createCustomIcon(s);return u.setIcon(m),!0}updateAllMarkerIcons(r){this.markers.forEach((s,h)=>{this.updateMarkerIcon(h,r)})}focusMarker(r,s){let h=null;if(typeof r=="string"?h=this.getMarker(r):h=r,!h)return console.warn(`Marker not found: ${r}`),!1;let u=s?.zoom??h.zoom??2,m=this.imageInfo.minZoom??0,f=this.imageInfo.maxZoom??5,x=Math.max(m,Math.min(f,u)),g=[h.position[0],h.position[1]],C=s?.animate!==!1,M=s?.duration??.5,v=(s?.offsetRight??0)-(s?.offsetLeft??0),B=(s?.offsetBottom??0)-(s?.offsetTop??0);if(v!==0||B!==0){let j=this.map.getZoom(),O=j!==x;O&&this.map.setZoom(x,{animate:!1});let S=this.map.latLngToContainerPoint(g),V=K.point(S.x+v,S.y+B),zt=this.map.containerPointToLatLng(V);O&&C&&this.map.setZoom(j,{animate:!1}),C?this.map.flyTo(zt,x,{duration:M}):this.map.setView(zt,x)}else C?this.map.flyTo(g,x,{duration:M}):this.map.setView(g,x);return!0}dispose(){this.removeAllListeners(),this.removeAllMarkers(),this.markerLayerGroup&&this.map.removeLayer(this.markerLayerGroup)}createCustomIcon(r){let s=`${this.iconBasePath}${r}.png`;return K.icon({iconUrl:s,iconSize:[yt.WIDTH,yt.HEIGHT],iconAnchor:[yt.ANCHOR_X,yt.ANCHOR_Y],popupAnchor:[0,0],shadowUrl:void 0,shadowSize:void 0,shadowAnchor:void 0})}createLeafletMarker(r){let s=r.iconType||"pin-gray",h=this.createCustomIcon(s),u={title:r.label,icon:h};(r.draggable!==void 0?r.draggable:this.interactionConfig.draggable??!1)&&(u.draggable=!0);let f=K.marker([r.position[0],r.position[1]],u);if(this.interactionConfig.showTooltips&&r.label&&r.showLabel&&f.bindTooltip(r.label,{permanent:!1,direction:"top",offset:[0,-30],className:"edgepdf-marker-tooltip"}),this.interactionConfig.showPopups){let x=this.createPopupContent(r);f.bindPopup(x)}return f}setupMarkerInteractions(r,s){r.off("click"),r.off("dragstart"),r.off("drag"),r.off("dragend"),r.on("click",()=>{this.handleMarkerClick(s)}),(s.draggable!==void 0?s.draggable:this.interactionConfig.draggable??!1)&&(r.on("dragstart",()=>{this.emitEvent("dragstart",s,s.position)}),r.on("drag",()=>{let u=[r.getLatLng().lat,r.getLatLng().lng];this.emitEvent("drag",s,u)}),r.on("dragend",()=>{let u=[r.getLatLng().lat,r.getLatLng().lng];try{this.updateMarkerPosition(s.id,u),this.emitEvent("dragend",s,u)}catch(m){r.setLatLng([s.position[0],s.position[1]]),console.warn("Marker drag ended at invalid position, reverted",m)}}))}handleMarkerClick(r){this.emitEvent("click",r,r.position),this.setActiveMarker(r.id);let s=this.leafletMarkers.get(r.id);s&&s.isPopupOpen()&&s.closePopup(),this.interactionConfig.selectable&&(this.selectedIds.has(r.id)?this.deselectMarker(r.id):this.selectMarker(r.id))}updateMarkerSelectionVisual(r,s){}addActiveMarkerOverlay(r){this.removeActiveMarkerOverlay(r);let s=this.markers.get(r),h=this.leafletMarkers.get(r);if(!s||!h)return;let u=40,m=1,f=yt.WIDTH/2-yt.ANCHOR_X,x=yt.HEIGHT/2-yt.ANCHOR_Y,g=u/2-f,C=u/2-x,M=`
|
|
52
|
+
`;let x=f.querySelector(".edgepdf-marker-delete-popup-overlay"),g=f.querySelector(".edgepdf-marker-delete-popup-close"),C=f.querySelector(".edgepdf-marker-delete-button-cancel"),M=f.querySelector(".edgepdf-marker-delete-button-confirm"),v=O=>{O.key==="Escape"&&(B(),h())};document.addEventListener("keydown",v);let B=()=>{document.removeEventListener("keydown",v),f.parentElement&&f.parentElement.removeChild(f),Mt===f&&(Mt=null)},j=()=>{B(),h()};return x.addEventListener("click",O=>{O.stopPropagation(),j()}),g.addEventListener("click",O=>{O.stopPropagation(),j()}),C.addEventListener("click",O=>{O.stopPropagation(),j()}),M.addEventListener("click",O=>{O.stopPropagation(),B(),s()}),document.body.appendChild(f),Mt=f,setTimeout(()=>{C.focus()},0),f}var ne=class{map;coordinateMapper;imageInfo;markers=new Map;leafletMarkers=new Map;markerLayerGroup;eventListeners=new Map;selectedIds=new Set;activeMarkerId=null;activeMarkerOverlays=new Map;interactionConfig={draggable:!1,selectable:!1,showTooltips:!0,showPopups:!0,multiSelect:!1,showEditButton:!0,showDeleteButton:!0};defaultIconType="pin-gray";iconBasePath="./images/";constructor(r){if(!r.map)throw new Error("Map instance is required");if(!r.coordinateMapper)throw new Error("Coordinate mapper is required");if(!r.imageInfo)throw new Error("Image info is required");this.map=r.map,this.coordinateMapper=r.coordinateMapper,this.imageInfo=r.imageInfo,this.markerLayerGroup=K.layerGroup().addTo(this.map)}createMarker(r){if(!r.position&&!r.imageCoords)throw new Error("Either position or imageCoords must be provided");let s,h;if(r.position){s=r.position;let g=this.coordinateMapper.leafletToImage(s);if(!g.withinBounds)throw new Error(`Leaflet coordinates [${s[0]}, ${s[1]}] are out of bounds`);h={x:g.x,y:g.y}}else if(r.imageCoords){if(h=r.imageCoords,h.x<0||h.x>this.imageInfo.width||h.y<0||h.y>this.imageInfo.height)throw new Error(`Image coordinates {x: ${h.x}, y: ${h.y}} are out of bounds`);s=this.coordinateMapper.imageToLeaflet(h)}else throw new Error("Either position or imageCoords must be provided");let u=this.map.getZoom(),m=r.id||this.generateMarkerId(),f={id:m,position:s,x:h.x,y:h.y,zoom:u,label:r.label,description:r.description,href:r.href,target:r.target,showLabel:r.showLabel??!0,iconType:r.iconType||"pin-gray",referenceId:r.referenceId,draggable:r.draggable,editable:r.editable,deletable:r.deletable};this.validateMarker(f);let x=this.createLeafletMarker(f);return this.setupMarkerInteractions(x,f),this.markers.set(m,f),this.leafletMarkers.set(m,x),this.markerLayerGroup.addLayer(x),f}getMarker(r){return this.markers.get(r)||null}getAllMarkers(){return Array.from(this.markers.values())}exportMarkers(){return{markers:this.getAllMarkers(),exportedAt:new Date().toISOString(),version:"1.0.0"}}importMarkers(r,s={}){let{clearExisting:h=!1,validateCoordinates:u=!0}=s,m=[];if(!r||typeof r!="object")throw new Error("Invalid marker data: data must be an object");if(!Array.isArray(r.markers))throw new Error("Invalid marker data: markers must be an array");h&&this.removeAllMarkers();let f=0;for(let x=0;x<r.markers.length;x++){let g=r.markers[x];try{this.validateMarkerData(g),u&&this.validateMarkerCoordinates(g),this.createMarker({id:g.id,imageCoords:{x:g.x,y:g.y},label:g.label,description:g.description,href:g.href,target:g.target,showLabel:g.showLabel,iconType:g.iconType,referenceId:g.referenceId,draggable:g.draggable,editable:g.editable,deletable:g.deletable}),f++}catch(C){let M=C instanceof Error?C.message:"Unknown error";m.push(`Marker ${x+1} (${g.id||"unknown"}): ${M}`)}}return{success:m.length===0,importedCount:f,errors:m}}removeMarker(r){let s=this.markers.get(r),h=this.leafletMarkers.get(r);return!s||!h?!1:(this.markerLayerGroup.removeLayer(h),this.removeActiveMarkerOverlay(r),this.activeMarkerId===r&&this.setActiveMarker(null),this.markers.delete(r),this.leafletMarkers.delete(r),!0)}removeAllMarkers(){this.markerLayerGroup.clearLayers(),this.markers.clear(),this.leafletMarkers.clear(),this.activeMarkerOverlays.clear(),this.setActiveMarker(null)}updateMarkerPosition(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;let m=this.coordinateMapper.leafletToImage(s);if(!m.withinBounds)throw new Error(`Leaflet coordinates [${s[0]}, ${s[1]}] are out of bounds`);h.position=s,h.x=m.x,h.y=m.y,h.zoom=this.map.getZoom(),u.setLatLng([s[0],s[1]]);let f=this.activeMarkerOverlays.get(r);return f&&f.setLatLng([s[0],s[1]]),!0}updateMarker(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;if(s.label!==void 0&&(h.label=s.label),s.description!==void 0&&(h.description=s.description),s.href!==void 0&&(h.href=s.href),s.target!==void 0&&(h.target=s.target),s.showLabel!==void 0&&(h.showLabel=s.showLabel),s.iconType!==void 0){h.iconType=s.iconType;let m=this.createCustomIcon(s.iconType);u.setIcon(m)}if(s.referenceId!==void 0&&(h.referenceId=s.referenceId),s.draggable!==void 0){h.draggable=s.draggable;let m=h.draggable!==void 0?h.draggable:this.interactionConfig.draggable??!1;u.dragging&&(m?u.dragging.enable():u.dragging.disable()),this.setupMarkerInteractions(u,h)}return s.editable!==void 0&&(h.editable=s.editable),s.deletable!==void 0&&(h.deletable=s.deletable),this.updateLeafletMarkerDisplay(u,h),!0}getMarkerCount(){return this.markers.size}hasMarker(r){return this.markers.has(r)}setInteractionConfig(r){this.interactionConfig={...this.interactionConfig,...r},this.leafletMarkers.forEach((s,h)=>{let u=this.markers.get(h);if(u){let m=u.draggable!==void 0?u.draggable:this.interactionConfig.draggable??!1;if(s.dragging&&(m?s.dragging.enable():s.dragging.disable()),this.setupMarkerInteractions(s,u),this.interactionConfig.showPopups){let f=this.createPopupContent(u);s.setPopupContent(f)}}})}getInteractionConfig(){return{...this.interactionConfig}}selectMarker(r){let s=this.markers.get(r);return s?(this.interactionConfig.multiSelect||this.deselectAllMarkers(),this.selectedIds.add(r),this.updateMarkerSelectionVisual(r,!0),this.emitEvent("select",s,void 0),this.setActiveMarker(r),!0):!1}deselectMarker(r){let s=this.markers.get(r);return s?(this.selectedIds.delete(r),this.updateMarkerSelectionVisual(r,!1),this.emitEvent("deselect",s,void 0),this.activeMarkerId===r&&this.setActiveMarker(null),!0):!1}deselectAllMarkers(){let r=Array.from(this.selectedIds);this.selectedIds.clear(),r.forEach(s=>{let h=this.markers.get(s);h&&(this.updateMarkerSelectionVisual(s,!1),this.emitEvent("deselect",h,void 0))}),this.setActiveMarker(null)}getSelectionState(){return{selectedIds:Array.from(this.selectedIds),multiSelect:this.interactionConfig.multiSelect??!1}}isMarkerSelected(r){return this.selectedIds.has(r)}setActiveMarker(r){if(r===null){let u=this.activeMarkerId;if(this.activeMarkerId=null,u){this.removeActiveMarkerOverlay(u);let m=this.leafletMarkers.get(u);m&&m.isPopupOpen()&&m.closePopup()}return this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(null),!0}let s=this.markers.get(r);if(!s)return!1;if(this.activeMarkerId&&this.activeMarkerId!==r){this.removeActiveMarkerOverlay(this.activeMarkerId);let u=this.leafletMarkers.get(this.activeMarkerId);u&&u.isPopupOpen()&&u.closePopup()}let h=this.leafletMarkers.get(r);return h&&h.isPopupOpen()&&h.closePopup(),this.activeMarkerId=r,this.addActiveMarkerOverlay(r),this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(s),!0}getActiveMarker(){return this.activeMarkerId&&this.markers.get(this.activeMarkerId)||null}deleteMarker(r){let s=this.markers.get(r);return s?(this.emitEvent("delete",s,void 0),this.removeMarker(r)):!1}on(r,s){this.eventListeners.has(r)||this.eventListeners.set(r,new Set);let h=this.eventListeners.get(r);return h&&h.add(s),()=>{this.off(r,s)}}off(r,s){let h=this.eventListeners.get(r);h&&h.delete(s)}removeAllListeners(r){r?this.eventListeners.delete(r):this.eventListeners.clear()}setDefaultIconType(r){this.defaultIconType=r}getDefaultIconType(){return this.defaultIconType}setIconBasePath(r){this.iconBasePath=r.endsWith("/")?r:`${r}/`}getIconBasePath(){return this.iconBasePath}updateMarkerIcon(r,s){let h=this.markers.get(r),u=this.leafletMarkers.get(r);if(!h||!u)return!1;h.iconType=s;let m=this.createCustomIcon(s);return u.setIcon(m),!0}updateAllMarkerIcons(r){this.markers.forEach((s,h)=>{this.updateMarkerIcon(h,r)})}focusMarker(r,s){let h=null;if(typeof r=="string"?h=this.getMarker(r):h=r,!h)return console.warn(`Marker not found: ${r}`),!1;let u=s?.zoom??h.zoom??2,m=this.imageInfo.minZoom??0,f=this.imageInfo.maxZoom??5,x=Math.max(m,Math.min(f,u)),g=[h.position[0],h.position[1]],C=s?.animate!==!1,M=s?.duration??.5,v=(s?.offsetRight??0)-(s?.offsetLeft??0),B=(s?.offsetBottom??0)-(s?.offsetTop??0);if(v!==0||B!==0){let j=this.map.getZoom(),O=j!==x;O&&this.map.setZoom(x,{animate:!1});let S=this.map.latLngToContainerPoint(g),q=K.point(S.x+v,S.y+B),zt=this.map.containerPointToLatLng(q);O&&C&&this.map.setZoom(j,{animate:!1}),C?this.map.flyTo(zt,x,{duration:M}):this.map.setView(zt,x)}else C?this.map.flyTo(g,x,{duration:M}):this.map.setView(g,x);return!0}dispose(){this.removeAllListeners(),this.removeAllMarkers(),this.markerLayerGroup&&this.map.removeLayer(this.markerLayerGroup)}createCustomIcon(r){let s=`${this.iconBasePath}${r}.png`;return K.icon({iconUrl:s,iconSize:[yt.WIDTH,yt.HEIGHT],iconAnchor:[yt.ANCHOR_X,yt.ANCHOR_Y],popupAnchor:[0,0],shadowUrl:void 0,shadowSize:void 0,shadowAnchor:void 0})}createLeafletMarker(r){let s=r.iconType||"pin-gray",h=this.createCustomIcon(s),u={title:r.label,icon:h};(r.draggable!==void 0?r.draggable:this.interactionConfig.draggable??!1)&&(u.draggable=!0);let f=K.marker([r.position[0],r.position[1]],u);if(this.interactionConfig.showTooltips&&r.label&&r.showLabel&&f.bindTooltip(r.label,{permanent:!1,direction:"top",offset:[0,-30],className:"edgepdf-marker-tooltip"}),this.interactionConfig.showPopups){let x=this.createPopupContent(r);f.bindPopup(x)}return f}setupMarkerInteractions(r,s){r.off("click"),r.off("dragstart"),r.off("drag"),r.off("dragend"),r.on("click",()=>{this.handleMarkerClick(s)}),(s.draggable!==void 0?s.draggable:this.interactionConfig.draggable??!1)&&(r.on("dragstart",()=>{this.emitEvent("dragstart",s,s.position)}),r.on("drag",()=>{let u=[r.getLatLng().lat,r.getLatLng().lng];this.emitEvent("drag",s,u)}),r.on("dragend",()=>{let u=[r.getLatLng().lat,r.getLatLng().lng];try{this.updateMarkerPosition(s.id,u),this.emitEvent("dragend",s,u)}catch(m){r.setLatLng([s.position[0],s.position[1]]),console.warn("Marker drag ended at invalid position, reverted",m)}}))}handleMarkerClick(r){this.emitEvent("click",r,r.position),this.setActiveMarker(r.id);let s=this.leafletMarkers.get(r.id);s&&s.isPopupOpen()&&s.closePopup(),this.interactionConfig.selectable&&(this.selectedIds.has(r.id)?this.deselectMarker(r.id):this.selectMarker(r.id))}updateMarkerSelectionVisual(r,s){}addActiveMarkerOverlay(r){this.removeActiveMarkerOverlay(r);let s=this.markers.get(r),h=this.leafletMarkers.get(r);if(!s||!h)return;let u=40,m=1,f=yt.WIDTH/2-yt.ANCHOR_X,x=yt.HEIGHT/2-yt.ANCHOR_Y,g=u/2-f,C=u/2-x,M=`
|
|
53
53
|
<div style="
|
|
54
54
|
width: ${u}px;
|
|
55
55
|
height: ${u}px;
|
|
@@ -59,7 +59,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
59
59
|
pointer-events: none;
|
|
60
60
|
position: relative;
|
|
61
61
|
"></div>
|
|
62
|
-
`,v=K.marker([s.position[0],s.position[1]],{icon:K.divIcon({html:M,className:"edgepdf-active-marker-overlay",iconSize:[u,u],iconAnchor:[g,C]}),interactive:!1,zIndexOffset:500});this.activeMarkerOverlays.set(r,v),this.markerLayerGroup.addLayer(v),h.on("drag",()=>{let B=h.getLatLng();v.setLatLng(B)})}removeActiveMarkerOverlay(r){let s=this.activeMarkerOverlays.get(r);s&&(this.markerLayerGroup.removeLayer(s),this.activeMarkerOverlays.delete(r))}emitEvent(r,s,h){let u=this.eventListeners.get(r);if(u){let m={type:r,marker:s,coordinates:h};u.forEach(f=>{try{f(m)}catch(x){console.error(`Error in marker event listener for ${r}:`,x)}})}}escapeHtml(r){if(!r)return"";let s=document.createElement("div");return s.textContent=r,s.innerHTML}createPopupContent(r){let s="";if(r.description){let h=this.escapeHtml(r.description);if(r.href){let u=this.escapeHtml(r.href),m=this.escapeHtml(r.target||"_self");s=`<a href="${u}" target="${m}">${h}</a>`}else s=h}else r.label?s=this.escapeHtml(r.label):s='<span style="color: #666; font-style: italic;">Marker</span>';return!s||s.trim()===""?'<div style="padding: 4px;">Marker</div>':s}updateLeafletMarkerDisplay(r,s){if(this.interactionConfig.showTooltips&&s.label&&s.showLabel?r.getTooltip()?r.setTooltipContent(s.label):r.bindTooltip(s.label,{permanent:!1,direction:"top",offset:[0,-15],className:"edgepdf-marker-tooltip"}):r.unbindTooltip(),this.interactionConfig.showPopups){let h=this.createPopupContent(s);r.setPopupContent(h)}else r.unbindPopup()}async handleEdit(r){if(this.interactionConfig.onEdit){try{let s=await Promise.resolve(this.interactionConfig.onEdit(r));s&&(this.updateMarker(r.id,{label:s.label,href:s.href,description:s.description,target:s.target}),this.emitEvent("edit",s,void 0))}catch(s){console.error("Error in custom edit handler:",s)}return}
|
|
62
|
+
`,v=K.marker([s.position[0],s.position[1]],{icon:K.divIcon({html:M,className:"edgepdf-active-marker-overlay",iconSize:[u,u],iconAnchor:[g,C]}),interactive:!1,zIndexOffset:500});this.activeMarkerOverlays.set(r,v),this.markerLayerGroup.addLayer(v),h.on("drag",()=>{let B=h.getLatLng();v.setLatLng(B)})}removeActiveMarkerOverlay(r){let s=this.activeMarkerOverlays.get(r);s&&(this.markerLayerGroup.removeLayer(s),this.activeMarkerOverlays.delete(r))}emitEvent(r,s,h){let u=this.eventListeners.get(r);if(u){let m={type:r,marker:s,coordinates:h};u.forEach(f=>{try{f(m)}catch(x){console.error(`Error in marker event listener for ${r}:`,x)}})}}escapeHtml(r){if(!r)return"";let s=document.createElement("div");return s.textContent=r,s.innerHTML}createPopupContent(r){let s="";if(r.description){let h=this.escapeHtml(r.description);if(r.href){let u=this.escapeHtml(r.href),m=this.escapeHtml(r.target||"_self");s=`<a href="${u}" target="${m}">${h}</a>`}else s=h}else r.label?s=this.escapeHtml(r.label):s='<span style="color: #666; font-style: italic;">Marker</span>';return!s||s.trim()===""?'<div style="padding: 4px;">Marker</div>':s}updateLeafletMarkerDisplay(r,s){if(this.interactionConfig.showTooltips&&s.label&&s.showLabel?r.getTooltip()?r.setTooltipContent(s.label):r.bindTooltip(s.label,{permanent:!1,direction:"top",offset:[0,-15],className:"edgepdf-marker-tooltip"}):r.unbindTooltip(),this.interactionConfig.showPopups){let h=this.createPopupContent(s);r.setPopupContent(h)}else r.unbindPopup()}async handleEdit(r){if(this.interactionConfig.onEdit){try{let s=await Promise.resolve(this.interactionConfig.onEdit(r));s&&(this.updateMarker(r.id,{label:s.label,href:s.href,description:s.description,target:s.target}),this.emitEvent("edit",s,void 0))}catch(s){console.error("Error in custom edit handler:",s)}return}Vo({marker:r,onSave:s=>{this.updateMarker(r.id,s);let h=this.getMarker(r.id);h&&this.emitEvent("edit",h,void 0)},onCancel:()=>{}})}async handleDelete(r){if(this.interactionConfig.onDelete){try{await Promise.resolve(this.interactionConfig.onDelete(r))&&this.deleteMarker(r.id)}catch(s){console.error("Error in custom delete handler:",s)}return}qo({marker:r,onConfirm:()=>{this.deleteMarker(r.id)},onCancel:()=>{}})}handleMarkerEdit(r){this.handleEdit(r)}handleMarkerDelete(r){this.handleDelete(r)}validateMarker(r){if(!r.id||r.id.trim()==="")throw new Error("Marker ID is required");if(!r.position||r.position.length!==2)throw new Error("Marker position must be a valid Leaflet coordinate pair");if(typeof r.x!="number"||typeof r.y!="number")throw new Error("Marker image coordinates must be numbers");if(r.x<0||r.x>this.imageInfo.width)throw new Error(`Marker X coordinate (${r.x}) is out of bounds [0, ${this.imageInfo.width}]`);if(r.y<0||r.y>this.imageInfo.height)throw new Error(`Marker Y coordinate (${r.y}) is out of bounds [0, ${this.imageInfo.height}]`);if(typeof r.zoom!="number"||r.zoom<0)throw new Error("Marker zoom level must be a non-negative number")}validateMarkerData(r){if(!r||typeof r!="object")throw new Error("Marker data must be an object");let s=r;if(!s.id||typeof s.id!="string"||s.id.trim()==="")throw new Error("Marker ID is required and must be a non-empty string");if(typeof s.x!="number"||typeof s.y!="number"||isNaN(s.x)||isNaN(s.y))throw new Error("Marker image coordinates (x, y) must be valid numbers");if(!s.position||!Array.isArray(s.position)||s.position.length!==2||typeof s.position[0]!="number"||typeof s.position[1]!="number")throw new Error("Marker position must be a valid Leaflet coordinate pair [lat, lng]");if(typeof s.zoom!="number"||s.zoom<0)throw new Error("Marker zoom level must be a non-negative number");if(s.label!==void 0&&typeof s.label!="string")throw new Error("Marker label must be a string if provided");if(s.description!==void 0&&typeof s.description!="string")throw new Error("Marker description must be a string if provided");if(s.href!==void 0&&typeof s.href!="string")throw new Error("Marker href must be a string if provided");if(s.target!==void 0&&typeof s.target!="string")throw new Error("Marker target must be a string if provided");if(s.showLabel!==void 0&&typeof s.showLabel!="boolean")throw new Error("Marker showLabel must be a boolean if provided")}validateMarkerCoordinates(r){if(r.x<0||r.x>this.imageInfo.width)throw new Error(`Marker X coordinate (${r.x}) is out of bounds [0, ${this.imageInfo.width}]`);if(r.y<0||r.y>this.imageInfo.height)throw new Error(`Marker Y coordinate (${r.y}) is out of bounds [0, ${this.imageInfo.height}]`);if(!this.coordinateMapper.leafletToImage(r.position).withinBounds)throw new Error(`Marker Leaflet coordinates [${r.position[0]}, ${r.position[1]}] are out of bounds`)}generateMarkerId(){return`marker-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}};function Go(){return`
|
|
63
63
|
<svg
|
|
64
64
|
xmlns="http://www.w3.org/2000/svg"
|
|
65
65
|
height="24"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import L from '@edgepdf/core';
|
|
2
|
-
import type { ImageInfo,
|
|
2
|
+
import type { ImageInfo, ViewerCoords, ImageCoords, CoordinateBounds } from '@edgepdf/types';
|
|
3
3
|
/**
|
|
4
4
|
* Image position information within the tile grid canvas
|
|
5
5
|
*/
|
|
@@ -77,7 +77,7 @@ export declare class CoordinateMapper {
|
|
|
77
77
|
* // { x: 1000, y: 1500, withinBounds: true }
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
leafletToImage(leafletCoords:
|
|
80
|
+
leafletToImage(leafletCoords: ViewerCoords): ImageCoords & {
|
|
81
81
|
withinBounds: boolean;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
@@ -94,7 +94,7 @@ export declare class CoordinateMapper {
|
|
|
94
94
|
* // [1500, 1000]
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
|
-
imageToLeaflet(imageCoords: ImageCoords):
|
|
97
|
+
imageToLeaflet(imageCoords: ImageCoords): ViewerCoords;
|
|
98
98
|
/**
|
|
99
99
|
* Calculates the center point of the image in Leaflet coordinates.
|
|
100
100
|
*
|
|
@@ -131,7 +131,7 @@ export declare class CoordinateMapper {
|
|
|
131
131
|
* @param coords - Leaflet coordinates [y, x]
|
|
132
132
|
* @throws {Error} If coordinates are invalid or out of bounds
|
|
133
133
|
*/
|
|
134
|
-
validateLeafletCoords(coords:
|
|
134
|
+
validateLeafletCoords(coords: ViewerCoords): void;
|
|
135
135
|
/**
|
|
136
136
|
* Validates image pixel coordinates and checks bounds
|
|
137
137
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate-mapper.d.ts","sourceRoot":"","sources":["../../src/lib/coordinate-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,KAAK,EACV,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"coordinate-mapper.d.ts","sourceRoot":"","sources":["../../src/lib/coordinate-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAY;IAE7B;;;;;;OAMG;gBACS,SAAS,EAAE,SAAS;IAchC;;;;;OAKG;IACH,sBAAsB,IAAI,aAAa;IAuCvC;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,aAAa,EAAE,YAAY,GAC1B,WAAW,GAAG;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE;IAyB1C;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,YAAY;IAkBtD;;;;;;;;;;OAUG;IACH,cAAc,IAAI;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAU1C;;;;;;;;;;;;;OAaG;IACH,kBAAkB,IAAI,CAAC,CAAC,sBAAsB;IAU9C;;;;;OAKG;IACH,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAqBjD;;;;;OAKG;IACH,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IA+B9C;;;;;OAKG;IACH,eAAe,IAAI,CAAC,CAAC,GAAG;IAMxB;;;;;;;;;;OAUG;IACH,cAAc,IAAI,MAAM;IAIxB;;;;;;;;;;OAUG;IACH,SAAS,IAAI,gBAAgB;IAS7B;;;;OAIG;IACH,YAAY,IAAI,SAAS;IAIzB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO;IAS5C;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAO/C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,qBAAqB,CACnB,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,WAAW;CAaf"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import L from '@edgepdf/core';
|
|
2
|
-
import type { Marker, MarkerData,
|
|
2
|
+
import type { Marker, MarkerData, ViewerCoords, ImageCoords, ImageInfo, MarkerEvent, MarkerEventType, MarkerInteractionConfig, MarkerSelectionState } from '@edgepdf/types';
|
|
3
3
|
import { CoordinateMapper } from './coordinate-mapper.js';
|
|
4
4
|
/**
|
|
5
5
|
* Options for creating a marker
|
|
6
6
|
*/
|
|
7
7
|
export interface CreateMarkerOptions {
|
|
8
8
|
/** Leaflet coordinates [lat, lng] */
|
|
9
|
-
position?:
|
|
9
|
+
position?: ViewerCoords;
|
|
10
10
|
/** Image pixel coordinates {x, y} */
|
|
11
11
|
imageCoords?: ImageCoords;
|
|
12
12
|
/** Marker label/tooltip text */
|
|
@@ -217,7 +217,7 @@ export declare class MarkerManager {
|
|
|
217
217
|
*
|
|
218
218
|
* @throws {Error} If coordinates are invalid or out of bounds
|
|
219
219
|
*/
|
|
220
|
-
updateMarkerPosition(id: string, position:
|
|
220
|
+
updateMarkerPosition(id: string, position: ViewerCoords): boolean;
|
|
221
221
|
/**
|
|
222
222
|
* Updates a marker's properties (excluding position)
|
|
223
223
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker-manager.d.ts","sourceRoot":"","sources":["../../src/lib/marker-manager.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"marker-manager.d.ts","sourceRoot":"","sources":["../../src/lib/marker-manager.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,qCAAqC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACrC,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,cAAc,CAAoC;IAC1D,OAAO,CAAC,gBAAgB,CAAe;IACvC,OAAO,CAAC,cAAc,CAGR;IACd,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,oBAAoB,CAAoC;IAChE,OAAO,CAAC,iBAAiB,CAQvB;IAEF,OAAO,CAAC,eAAe,CAA2C;IAClE,OAAO,CAAC,YAAY,CAAe;IAEnC;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE;QACnB,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;QACX,gBAAgB,EAAE,gBAAgB,CAAC;QACnC,SAAS,EAAE,SAAS,CAAC;KACtB;IAmBD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM;IAuFlD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIpC;;;;OAIG;IACH,aAAa,IAAI,MAAM,EAAE;IAIzB;;;;;;;;;;;;;;;OAeG;IACH,aAAa,IAAI,UAAU;IAS3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,CACX,IAAI,EAAE,UAAU,EAChB,OAAO,GAAE;QACP,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC1B,GACL;QACD,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB;IAkED;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IA0BjC;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAaxB;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO;IAkCjE;;;;;;OAMG;IACH,YAAY,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,CAAC,GACrE,OAAO;IAgEV;;;;OAIG;IACH,cAAc,IAAI,MAAM;IAIxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI9B;;;;OAIG;IACH,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI;IAgCpE;;;;OAIG;IACH,oBAAoB,IAAI,uBAAuB;IAI/C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAsBjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAkBnC;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAgB1B;;;;OAIG;IACH,iBAAiB,IAAI,oBAAoB;IAOzC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIrC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO;IA0D3C;;;;OAIG;IACH,eAAe,IAAI,MAAM,GAAG,IAAI;IAOhC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAajC;;;;;;OAMG;IACH,EAAE,CACA,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACrC,MAAM,IAAI;IAeb;;;;;OAKG;IACH,GAAG,CACD,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACrC,IAAI;IAOP;;;;OAIG;IACH,kBAAkB,CAAC,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI;IAQrD;;;;OAIG;IACH,kBAAkB,CAAC,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI;IAI7D;;;;OAIG;IACH,kBAAkB,IAAI,UAAU,GAAG,YAAY;IAI/C;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIvC;;;;OAIG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO;IAe1E;;;;OAIG;IACH,oBAAoB,CAAC,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI;IAO/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,WAAW,CACT,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACA,OAAO;IAyFV;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAaf;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAgD3B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IAuD/B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAyBzB;;;;;OAKG;IACH,OAAO,CAAC,2BAA2B;IAQnC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAgE9B;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAQjC;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IAyBjB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAOlB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IA4B1B;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAmClC;;;;OAIG;YACW,UAAU;IAuCxB;;;;OAIG;YACW,YAAY;IA6B1B;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAItC;;;;OAIG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIxC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAgCtB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAsE1B;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAwBjC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;CAGzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgepdf/viewer-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "EdgePDF Viewer - JavaScript library for viewing PDF documents with interactive markers and zoom controls",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@edgepdf/core": "0.0.1",
|
|
43
|
-
"@edgepdf/
|
|
44
|
-
"@edgepdf/
|
|
43
|
+
"@edgepdf/types": "0.0.1",
|
|
44
|
+
"@edgepdf/utils": "0.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"jest-environment-jsdom": "^30.0.2"
|