@edgepdf/viewer-js 0.3.5 → 0.3.6
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/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
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=`
|
|
1
|
+
var ao=`@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 u=document.createElement("style");u.textContent=ao,document.head.appendChild(u)}var ma=Object.create,Ai=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,_a=Object.getOwnPropertyNames,va=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty,xa=(u,o)=>()=>(o||u((o={exports:{}}).exports,o),o.exports),ba=(u,o)=>{for(var r in o)Ai(u,r,{get:o[r],enumerable:!0})},Zi=(u,o,r,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of _a(o))!ya.call(u,h)&&h!==r&&Ai(u,h,{get:()=>o[h],enumerable:!(l=ga(o,h))||l.enumerable});return u},wa=(u,o,r)=>(Zi(u,o,"default"),r&&Zi(r,o,"default")),so=(u,o,r)=>(r=u!=null?ma(va(u)):{},Zi(o||!u||!u.__esModule?Ai(r,"default",{value:u,enumerable:!0}):r,u)),lo=xa((u,o)=>{"use strict";(function(r,l){typeof u=="object"&&typeof o<"u"?l(u):typeof define=="function"&&define.amd?define(["exports"],l):(r=typeof globalThis<"u"?globalThis:r||self,l(r.leaflet={}))})(u,function(r){"use strict";var l="1.9.4";function h(t){var e,i,n,a;for(i=1,n=arguments.length;i<n;i++){a=arguments[i];for(e in a)t[e]=a[e]}return t}var d=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 n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var g=0;function _(t){return"_leaflet_id"in t||(t._leaflet_id=++g),t._leaflet_id}function b(t,e,i){var n,a,s,c;return c=function(){n=!1,a&&(s.apply(i,a),a=!1)},s=function(){n?a=arguments:(t.apply(i,arguments),setTimeout(c,e),n=!0)},s}function x(t,e,i){var n=e[1],a=e[0],s=n-a;return t===n&&i?t:((t-a)%s+s)%s+a}function v(){return!1}function w(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function O(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function I(t){return O(t).split(/\s+/)}function T(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?d(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function U(t,e,i){var n=[];for(var a in t)n.push(encodeURIComponent(i?a.toUpperCase():a)+"="+encodeURIComponent(t[a]));return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var xt=/\{ *([\w_ -]+) *\}/g;function qt(t,e){return t.replace(xt,function(i,n){var a=e[n];if(a===void 0)throw new Error("No value provided for variable "+i);return typeof a=="function"&&(a=a(e)),a})}var G=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function Nt(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var At="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Ht(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var se=0;function le(t){var e=+new Date,i=Math.max(0,16-(e-se));return se=e+i,window.setTimeout(t,i)}var Tt=window.requestAnimationFrame||Ht("RequestAnimationFrame")||le,Gt=window.cancelAnimationFrame||Ht("CancelAnimationFrame")||Ht("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function j(t,e,i){if(i&&Tt===le)t.call(e);else return Tt.call(window,f(t,e))}function ot(t){t&&Gt.call(window,t)}var ti={__proto__:null,extend:h,create:d,bind:f,get lastId(){return g},stamp:_,throttle:b,wrapNum:x,falseFn:v,formatNum:w,trim:O,splitWords:I,setOptions:T,getParamString:U,template:qt,isArray:G,indexOf:Nt,emptyImageUrl:At,requestFn:Tt,cancelFn:Gt,requestAnimFrame:j,cancelAnimFrame:ot};function pt(){}pt.extend=function(t){var e=function(){T(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=d(i);n.constructor=e,e.prototype=n;for(var a in this)Object.prototype.hasOwnProperty.call(this,a)&&a!=="prototype"&&a!=="__super__"&&(e[a]=this[a]);return t.statics&&h(e,t.statics),t.includes&&(Ee(t.includes),h.apply(null,[n].concat(t.includes))),h(n,t),delete n.statics,delete n.includes,n.options&&(n.options=i.options?d(i.options):{},h(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var s=0,c=n._initHooks.length;s<c;s++)n._initHooks[s].call(this)}},e},pt.include=function(t){var e=this.prototype.options;return h(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},pt.mergeOptions=function(t){return h(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 Ee(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=G(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 $={on:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e);else{t=I(t);for(var a=0,s=t.length;a<s;a++)this._on(t[a],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var n in t)this._off(n,t[n],e);else{t=I(t);for(var a=arguments.length===1,s=0,c=t.length;s<c;s++)a?this._off(t[s]):this._off(t[s],e,i)}return this},_on:function(t,e,i,n){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var a={fn:e,ctx:i};n&&(a.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(a)}},_off:function(t,e,i){var n,a,s;if(this._events&&(n=this._events[t],!!n)){if(arguments.length===1){if(this._firingCount)for(a=0,s=n.length;a<s;a++)n[a].fn=v;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var c=this._listens(t,e,i);if(c!==!1){var p=n[c];this._firingCount&&(p.fn=v,this._events[t]=n=n.slice()),n.splice(c,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=h({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var a=this._events[t];if(a){this._firingCount=this._firingCount+1||1;for(var s=0,c=a.length;s<c;s++){var p=a[s],m=p.fn;p.once&&this.off(t,m,p.ctx),m.call(p.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e,i,n){typeof t!="string"&&console.warn('"string" type argument expected');var a=e;typeof e!="function"&&(n=!!e,a=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&this._listens(t,a,i)!==!1)return!0;if(n){for(var c in this._eventParents)if(this._eventParents[c].listens(t,e,i,n))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var a=0,s=n.length;a<s;a++)if(n[a].fn===e&&n[a].ctx===i)return a;return!1},once:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e,!0);else{t=I(t);for(var a=0,s=t.length;a<s;a++)this._on(t[a],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[_(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[_(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};$.addEventListener=$.on,$.removeEventListener=$.clearAllEventListeners=$.off,$.addOneTimeEventListener=$.once,$.fireEvent=$.fire,$.hasEventListeners=$.listens;var bt=pt.extend($);function C(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var mt=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};C.prototype={clone:function(){return new C(this.x,this.y)},add:function(t){return this.clone()._add(z(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(z(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 C(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new C(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=mt(this.x),this.y=mt(this.y),this},distanceTo:function(t){t=z(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=z(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=z(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+w(this.x)+", "+w(this.y)+")"}};function z(t,e,i){return t instanceof C?t:G(t)?new C(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new C(t.x,t.y):new C(t,e,i)}function F(t,e){if(t)for(var i=e?[t,e]:t,n=0,a=i.length;n<a;n++)this.extend(i[n])}F.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof C||typeof t[0]=="number"||"x"in t)e=i=z(t);else if(t=Q(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 z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(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 C?t=z(t):t=Q(t),t instanceof F?(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=Q(t);var e=this.min,i=this.max,n=t.min,a=t.max,s=a.x>=e.x&&n.x<=i.x,c=a.y>=e.y&&n.y<=i.y;return s&&c},overlaps:function(t){t=Q(t);var e=this.min,i=this.max,n=t.min,a=t.max,s=a.x>e.x&&n.x<i.x,c=a.y>e.y&&n.y<i.y;return s&&c},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,a=Math.abs(e.y-i.y)*t;return Q(z(e.x-n,e.y-a),z(i.x+n,i.y+a))},equals:function(t){return t?(t=Q(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function Q(t,e){return!t||t instanceof F?t:new F(t,e)}function Y(t,e){if(t)for(var i=e?[t,e]:t,n=0,a=i.length;n<a;n++)this.extend(i[n])}Y.prototype={extend:function(t){var e=this._southWest,i=this._northEast,n,a;if(t instanceof B)n=t,a=t;else if(t instanceof Y){if(n=t._southWest,a=t._northEast,!n||!a)return this}else return t?this.extend(A(t)||V(t)):this;return!e&&!i?(this._southWest=new B(n.lat,n.lng),this._northEast=new B(a.lat,a.lng)):(e.lat=Math.min(n.lat,e.lat),e.lng=Math.min(n.lng,e.lng),i.lat=Math.max(a.lat,i.lat),i.lng=Math.max(a.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,a=Math.abs(e.lng-i.lng)*t;return new Y(new B(e.lat-n,e.lng-a),new B(i.lat+n,i.lng+a))},getCenter:function(){return new B((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 B(this.getNorth(),this.getWest())},getSouthEast:function(){return new B(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 B||"lat"in t?t=A(t):t=V(t);var e=this._southWest,i=this._northEast,n,a;return t instanceof Y?(n=t.getSouthWest(),a=t.getNorthEast()):n=a=t,n.lat>=e.lat&&a.lat<=i.lat&&n.lng>=e.lng&&a.lng<=i.lng},intersects:function(t){t=V(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),a=t.getNorthEast(),s=a.lat>=e.lat&&n.lat<=i.lat,c=a.lng>=e.lng&&n.lng<=i.lng;return s&&c},overlaps:function(t){t=V(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),a=t.getNorthEast(),s=a.lat>e.lat&&n.lat<i.lat,c=a.lng>e.lng&&n.lng<i.lng;return s&&c},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=V(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function V(t,e){return t instanceof Y?t:new Y(t,e)}function B(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)}B.prototype={equals:function(t,e){if(!t)return!1;t=A(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("+w(this.lat,t)+", "+w(this.lng,t)+")"},distanceTo:function(t){return gt.distance(this,A(t))},wrap:function(){return gt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return V([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new B(this.lat,this.lng,this.alt)}};function A(t,e,i){return t instanceof B?t:G(t)&&typeof t[0]!="object"?t.length===3?new B(t[0],t[1],t[2]):t.length===2?new B(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new B(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new B(t,e,i)}var st={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),a=this.transformation.transform(e.max,i);return new F(n,a)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?x(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?x(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new B(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,a=e.lng-i.lng;if(n===0&&a===0)return t;var s=t.getSouthWest(),c=t.getNorthEast(),p=new B(s.lat-n,s.lng-a),m=new B(c.lat-n,c.lng-a);return new Y(p,m)}},gt=h({},st,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,a=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),c=Math.sin((e.lng-t.lng)*i/2),p=s*s+Math.cos(n)*Math.cos(a)*c*c,m=2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p));return this.R*m}}),he=6378137,ue={R:he,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),a=Math.sin(n*e);return new C(this.R*t.lng*e,this.R*Math.log((1+a)/(1-a))/2)},unproject:function(t){var e=180/Math.PI;return new B((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=he*Math.PI;return new F([-t,-t],[t,t])}()};function Yt(t,e,i,n){if(G(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=n}Yt.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 C((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function St(t,e,i,n){return new Yt(t,e,i,n)}var Kt=h({},gt,{code:"EPSG:3857",projection:ue,transformation:function(){var t=.5/(Math.PI*ue.R);return St(t,.5,-t,.5)}()}),Vo=h({},Kt,{code:"EPSG:900913"});function $i(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Xi(t,e){var i="",n,a,s,c,p,m;for(n=0,s=t.length;n<s;n++){for(p=t[n],a=0,c=p.length;a<c;a++)m=p[a],i+=(a?"L":"M")+m.x+" "+m.y;i+=e?k.svg?"z":"x":""}return i||"M0 0"}var ei=document.documentElement.style,Ie="ActiveXObject"in window,qo=Ie&&!document.addEventListener,Ji="msLaunchUri"in navigator&&!("documentMode"in document),ii=wt("webkit"),Qi=wt("android"),tn=wt("android 2")||wt("android 3"),Go=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Yo=Qi&&wt("Google")&&Go<537&&!("AudioNode"in window),ni=!!window.opera,en=!Ji&&wt("chrome"),nn=wt("gecko")&&!ii&&!ni&&!Ie,Ko=!en&&wt("safari"),on=wt("phantom"),rn="OTransition"in ei,$o=navigator.platform.indexOf("Win")===0,an=Ie&&"transition"in ei,oi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!tn,sn="MozPerspective"in ei,Xo=!window.L_DISABLE_3D&&(an||oi||sn)&&!rn&&!on,ce=typeof orientation<"u"||wt("mobile"),Jo=ce&&ii,Qo=ce&&oi,ln=!window.PointerEvent&&window.MSPointerEvent,hn=!!(window.PointerEvent||ln),un="ontouchstart"in window||!!window.TouchEvent,tr=!window.L_NO_TOUCH&&(un||hn),er=ce&&ni,ir=ce&&nn,nr=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,or=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}(),rr=function(){return!!document.createElement("canvas").getContext}(),ri=!!(document.createElementNS&&$i("svg").createSVGRect),ar=!!ri&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),sr=!ri&&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}}(),lr=navigator.platform.indexOf("Mac")===0,hr=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var k={ie:Ie,ielt9:qo,edge:Ji,webkit:ii,android:Qi,android23:tn,androidStock:Yo,opera:ni,chrome:en,gecko:nn,safari:Ko,phantom:on,opera12:rn,win:$o,ie3d:an,webkit3d:oi,gecko3d:sn,any3d:Xo,mobile:ce,mobileWebkit:Jo,mobileWebkit3d:Qo,msPointer:ln,pointer:hn,touch:tr,touchNative:un,mobileOpera:er,mobileGecko:ir,retina:nr,passiveEvents:or,canvas:rr,svg:ri,vml:sr,inlineSvg:ar,mac:lr,linux:hr},cn=k.msPointer?"MSPointerDown":"pointerdown",dn=k.msPointer?"MSPointerMove":"pointermove",fn=k.msPointer?"MSPointerUp":"pointerup",pn=k.msPointer?"MSPointerCancel":"pointercancel",ai={touchstart:cn,touchmove:dn,touchend:fn,touchcancel:pn},mn={touchstart:mr,touchmove:Ze,touchend:Ze,touchcancel:Ze},$t={},gn=!1;function ur(t,e,i){return e==="touchstart"&&pr(),mn[e]?(i=mn[e].bind(this,i),t.addEventListener(ai[e],i,!1),i):(console.warn("wrong event specified:",e),v)}function cr(t,e,i){if(!ai[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(ai[e],i,!1)}function dr(t){$t[t.pointerId]=t}function fr(t){$t[t.pointerId]&&($t[t.pointerId]=t)}function _n(t){delete $t[t.pointerId]}function pr(){gn||(document.addEventListener(cn,dr,!0),document.addEventListener(dn,fr,!0),document.addEventListener(fn,_n,!0),document.addEventListener(pn,_n,!0),gn=!0)}function Ze(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in $t)e.touches.push($t[i]);e.changedTouches=[e],t(e)}}function mr(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&it(e),Ze(t,e)}function gr(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var _r=200;function vr(t,e){t.addEventListener("dblclick",e);var i=0,n;function a(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var c=wn(s);if(!(c.some(function(m){return m instanceof HTMLLabelElement&&m.attributes.for})&&!c.some(function(m){return m instanceof HTMLInputElement||m instanceof HTMLSelectElement}))){var p=Date.now();p-i<=_r?(n++,n===2&&e(gr(s))):n=1,i=p}}}return t.addEventListener("click",a),{dblclick:e,simDblclick:a}}function yr(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var si=Oe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),de=Oe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vn=de==="webkitTransition"||de==="OTransition"?de+"End":"transitionend";function yn(t){return typeof t=="string"?document.getElementById(t):t}function fe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function R(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function q(t){var e=t.parentNode;e&&e.removeChild(t)}function Ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Xt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Jt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function li(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Se(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function Z(t,e){if(t.classList!==void 0)for(var i=I(e),n=0,a=i.length;n<a;n++)t.classList.add(i[n]);else if(!li(t,e)){var s=Se(t);hi(t,(s?s+" ":"")+e)}}function K(t,e){t.classList!==void 0?t.classList.remove(e):hi(t,O((" "+Se(t)+" ").replace(" "+e+" "," ")))}function hi(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Se(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ut(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&xr(t,e)}function xr(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Oe(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ut(t,e,i){var n=e||new C(0,0);t.style[si]=(k.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function X(t,e){t._leaflet_pos=e,k.any3d?Ut(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function jt(t){return t._leaflet_pos||new C(0,0)}var pe,me,ui;if("onselectstart"in document)pe=function(){E(window,"selectstart",it)},me=function(){W(window,"selectstart",it)};else{var ge=Oe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);pe=function(){if(ge){var t=document.documentElement.style;ui=t[ge],t[ge]="none"}},me=function(){ge&&(document.documentElement.style[ge]=ui,ui=void 0)}}function ci(){E(window,"dragstart",it)}function di(){W(window,"dragstart",it)}var Be,fi;function pi(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(De(),Be=t,fi=t.style.outlineStyle,t.style.outlineStyle="none",E(window,"keydown",De))}function De(){Be&&(Be.style.outlineStyle=fi,Be=void 0,fi=void 0,W(window,"keydown",De))}function xn(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function mi(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var br={__proto__:null,TRANSFORM:si,TRANSITION:de,TRANSITION_END:vn,get:yn,getStyle:fe,create:R,remove:q,empty:Ae,toFront:Xt,toBack:Jt,hasClass:li,addClass:Z,removeClass:K,setClass:hi,getClass:Se,setOpacity:ut,testProp:Oe,setTransform:Ut,setPosition:X,getPosition:jt,get disableTextSelection(){return pe},get enableTextSelection(){return me},disableImageDrag:ci,enableImageDrag:di,preventOutline:pi,restoreOutline:De,getSizedParentNode:xn,getScale:mi};function E(t,e,i,n){if(e&&typeof e=="object")for(var a in e)_i(t,a,e[a],i);else{e=I(e);for(var s=0,c=e.length;s<c;s++)_i(t,e[s],i,n)}return this}var Lt="_leaflet_events";function W(t,e,i,n){if(arguments.length===1)bn(t),delete t[Lt];else if(e&&typeof e=="object")for(var a in e)vi(t,a,e[a],i);else if(e=I(e),arguments.length===2)bn(t,function(p){return Nt(e,p)!==-1});else for(var s=0,c=e.length;s<c;s++)vi(t,e[s],i,n);return this}function bn(t,e){for(var i in t[Lt]){var n=i.split(/\d/)[0];(!e||e(n))&&vi(t,n,null,null,i)}}var gi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function _i(t,e,i,n){var a=e+_(i)+(n?"_"+_(n):"");if(t[Lt]&&t[Lt][a])return this;var s=function(p){return i.call(n||t,p||window.event)},c=s;!k.touchNative&&k.pointer&&e.indexOf("touch")===0?s=ur(t,e,s):k.touch&&e==="dblclick"?s=vr(t,s):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(gi[e]||e,s,k.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(s=function(p){p=p||window.event,xi(t,p)&&c(p)},t.addEventListener(gi[e],s,!1)):t.addEventListener(e,c,!1):t.attachEvent("on"+e,s),t[Lt]=t[Lt]||{},t[Lt][a]=s}function vi(t,e,i,n,a){a=a||e+_(i)+(n?"_"+_(n):"");var s=t[Lt]&&t[Lt][a];if(!s)return this;!k.touchNative&&k.pointer&&e.indexOf("touch")===0?cr(t,e,s):k.touch&&e==="dblclick"?yr(t,s):"removeEventListener"in t?t.removeEventListener(gi[e]||e,s,!1):t.detachEvent("on"+e,s),t[Lt][a]=null}function Wt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function yi(t){return _i(t,"wheel",Wt),this}function _e(t){return E(t,"mousedown touchstart dblclick contextmenu",Wt),t._leaflet_disable_click=!0,this}function it(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ft(t){return it(t),Wt(t),this}function wn(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Ln(t,e){if(!e)return new C(t.clientX,t.clientY);var i=mi(e),n=i.boundingClientRect;return new C((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var wr=k.linux&&k.chrome?window.devicePixelRatio:k.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Mn(t){return k.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/wr: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 xi(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 Lr={__proto__:null,on:E,off:W,stopPropagation:Wt,disableScrollPropagation:yi,disableClickPropagation:_e,preventDefault:it,stop:Ft,getPropagationPath:wn,getMousePosition:Ln,getWheelDelta:Mn,isExternalTarget:xi,addListener:E,removeListener:W},kn=bt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=jt(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(),X(this._el,i),this.fire("step")},_complete:function(){ot(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),D=bt.extend({options:{crs:Kt,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=T(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(A(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=de&&k.any3d&&!k.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),E(this._proxy,vn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(A(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=h({animate:i.animate},i.zoom),i.pan=h({animate:i.animate,duration:i.duration},i.pan));var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,i.pan&&i.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(k.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(k.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),a=this.getSize().divideBy(2),s=t instanceof C?t:this.latLngToContainerPoint(t),c=s.subtract(a).multiplyBy(1-1/n),p=this.containerPointToLatLng(a.add(c));return this.setView(p,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():V(t);var i=z(e.paddingTopLeft||e.padding||[0,0]),n=z(e.paddingBottomRight||e.padding||[0,0]),a=this.getBoundsZoom(t,!1,i.add(n));if(a=typeof e.maxZoom=="number"?Math.min(e.maxZoom,a):a,a===1/0)return{center:t.getCenter(),zoom:a};var s=n.subtract(i).divideBy(2),c=this.project(t.getSouthWest(),a),p=this.project(t.getNorthEast(),a),m=this.unproject(c.add(p).divideBy(2).add(s),a);return{center:m,zoom:a}},fitBounds:function(t,e){if(t=V(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=z(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 kn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){Z(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||!k.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),a=this.project(t),s=this.getSize(),c=this._zoom;t=A(t),e=e===void 0?c:e;var p=Math.max(s.x,s.y),m=p*this.getZoomScale(c,e),y=a.distanceTo(n)||1,M=1.42,P=M*M;function S(J){var Ke=J?-1:1,ca=J?m:p,da=m*m-p*p+Ke*P*P*y*y,fa=2*ca*P*y,Ii=da/fa,ro=Math.sqrt(Ii*Ii+1)-Ii,pa=ro<1e-9?-18:Math.log(ro);return pa}function rt(J){return(Math.exp(J)-Math.exp(-J))/2}function tt(J){return(Math.exp(J)+Math.exp(-J))/2}function dt(J){return rt(J)/tt(J)}var at=S(0);function oe(J){return p*(tt(at)/tt(at+M*J))}function sa(J){return p*(tt(at)*dt(at+M*J)-rt(at))/P}function la(J){return 1-Math.pow(1-J,1.5)}var ha=Date.now(),no=(S(1)-at)/M,ua=i.duration?1e3*i.duration:1e3*no*.8;function oo(){var J=(Date.now()-ha)/ua,Ke=la(J)*no;J<=1?(this._flyToFrame=j(oo,this),this._move(this.unproject(n.add(a.subtract(n).multiplyBy(sa(Ke)/y)),c),this.getScaleZoom(p/oe(Ke),c),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),oo.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=V(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,V(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=z(e.paddingTopLeft||e.padding||[0,0]),n=z(e.paddingBottomRight||e.padding||[0,0]),a=this.project(this.getCenter()),s=this.project(t),c=this.getPixelBounds(),p=Q([c.min.add(i),c.max.subtract(n)]),m=p.getSize();if(!p.contains(s)){this._enforcingBounds=!0;var y=s.subtract(p.getCenter()),M=p.extend(s).getSize().subtract(m);a.x+=y.x<0?-M.x:M.x,a.y+=y.y<0?-M.y:M.y,this.panTo(this.unproject(a),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),a=i.divideBy(2).round(),s=n.subtract(a);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),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=h({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,n=new B(e,i),a=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var c=this.getBoundsZoom(a);this.setView(n,s.maxZoom?Math.min(c,s.maxZoom):c)}var p={latlng:n,bounds:a,timestamp:t.timestamp};for(var m in t.coords)typeof t.coords[m]=="number"&&(p[m]=t.coords[m]);this.fire("locationfound",p)}},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(),q(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ot(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)q(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=R("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new Y(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=V(t),i=z(i||[0,0]);var n=this.getZoom()||0,a=this.getMinZoom(),s=this.getMaxZoom(),c=t.getNorthWest(),p=t.getSouthEast(),m=this.getSize().subtract(i),y=Q(this.project(p,n),this.project(c,n)).getSize(),M=k.any3d?this.options.zoomSnap:1,P=m.x/y.x,S=m.y/y.y,rt=e?Math.max(P,S):Math.min(P,S);return n=this.getScaleZoom(rt,n),M&&(n=Math.round(n/(M/100))*(M/100),n=e?Math.ceil(n/M)*M:Math.floor(n/M)*M),Math.max(a,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new C(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 F(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(A(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(z(t),e)},layerPointToLatLng:function(t){var e=z(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(A(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(A(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(V(t))},distance:function(t,e){return this.options.crs.distance(A(t),A(e))},containerPointToLayerPoint:function(t){return z(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return z(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(z(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(A(t)))},mouseEventToContainerPoint:function(t){return Ln(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=yn(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");E(e,"scroll",this._onScroll,this),this._containerId=_(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&k.any3d,Z(t,"leaflet-container"+(k.touch?" leaflet-touch":"")+(k.retina?" leaflet-retina":"")+(k.ielt9?" leaflet-oldie":"")+(k.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(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),X(this._mapPane,new C(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Z(t.markerPane,"leaflet-zoom-hide"),Z(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){X(this._mapPane,new C(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var a=this._zoom!==e;this._moveStart(a,i)._move(t,e)._moveEnd(a),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var a=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((a||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 ot(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){X(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[_(this._container)]=this;var e=t?W:E;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),k.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ot(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=[],n,a=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,c=!1;s;){if(n=this._targets[_(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){c=!0;break}if(n&&n.listens(e,!0)&&(a&&!xi(s,t)||(i.push(n),a))||s===this._container)break;s=s.parentNode}return!i.length&&!c&&!a&&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"&&pi(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=h({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var a=this._findEventTargets(t,e);if(i){for(var s=[],c=0;c<i.length;c++)i[c].listens(e,!0)&&s.push(i[c]);a=s.concat(a)}if(a.length){e==="contextmenu"&&it(t);var p=a[0],m={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var y=p.getLatLng&&(!p._radius||p._radius<=10);m.containerPoint=y?this.latLngToContainerPoint(p.getLatLng()):this.mouseEventToContainerPoint(t),m.layerPoint=this.containerPointToLayerPoint(m.containerPoint),m.latlng=y?p.getLatLng():this.layerPointToLatLng(m.layerPoint)}for(c=0;c<a.length;c++)if(a[c].fire(e,m,!0),m.originalEvent._stopped||a[c].options.bubblingMouseEvents===!1&&Nt(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 jt(this._mapPane)||new C(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return Q([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),a=this.getSize().divideBy(2),s=new F(n.subtract(a),n.add(a)),c=this._getBoundsOffset(s,i,e);return Math.abs(c.x)<=1&&Math.abs(c.y)<=1?t:this.unproject(n.add(c),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new F(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=Q(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),a=n.min.subtract(t.min),s=n.max.subtract(t.max),c=this._rebound(a.x,-s.x),p=this._rebound(a.y,-s.y);return new C(c,p)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=k.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){K(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=R("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=si,n=this._proxy.style[i];Ut(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){q(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ut(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),a=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(a)?!1:(j(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,Z(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(f(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&K(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 Mr(t,e){return new D(t,e)}var _t=pt.extend({options:{position:"topright"},initialize:function(t){T(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return Z(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(q(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()}}),ve=function(t){return new _t(t)};D.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=R("div",e+"control-container",this._container);function n(a,s){var c=e+a+" "+e+s;t[a+s]=R("div",c,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)q(this._controlCorners[t]);q(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Tn=_t.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){T(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return _t.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(_(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){Z(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?(Z(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):K(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return K(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=R("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),_e(e),yi(e);var n=this._section=R("section",t+"-list");i&&(this._map.on("click",this.collapse,this),E(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var a=this._layersLink=R("a",t+"-toggle",e);a.href="#",a.title="Layers",a.setAttribute("role","button"),E(a,{keydown:function(s){s.keyCode===13&&this._expandSafely()},click:function(s){it(s),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=R("div",t+"-base",n),this._separator=R("div",t+"-separator",n),this._overlaysList=R("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&_(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(n,a){return this.options.sortFunction(n.layer,a.layer,n.name,a.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ae(this._baseLayersList),Ae(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,a=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,a+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&a>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(_(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+_(this),i),this._layerControlInputs.push(n),n.layerId=_(t.layer),E(n,"click",this._onInputClick,this);var a=document.createElement("span");a.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(a);var c=t.overlay?this._overlaysList:this._baseLayersList;return c.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],a=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||a.push(i);for(s=0;s<a.length;s++)this._map.hasLayer(a[s])&&this._map.removeLayer(a[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,i,n=this._map.getZoom(),a=t.length-1;a>=0;a--)e=t[a],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&n<i.options.minZoom||i.options.maxZoom!==void 0&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,E(t,"click",it),this.expand();var e=this;setTimeout(function(){W(t,"click",it),e._preventClick=!1})}}),kr=function(t,e,i){return new Tn(t,e,i)},bi=_t.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=R("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,a){var s=R("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),_e(s),E(s,"click",Ft),E(s,"click",a,this),E(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";K(this._zoomInButton,e),K(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Z(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Z(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});D.mergeOptions({zoomControl:!0}),D.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new bi,this.addControl(this.zoomControl))});var Tr=function(t){return new bi(t)},Pn=_t.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=R("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=R("div",e,i)),t.imperial&&(this._iScale=R("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,a;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(a=this._getRoundNum(e),this._updateScale(this._iScale,a+" ft",a/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}}),Pr=function(t){return new Pn(t)},zr='<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>',wi=_t.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(k.inlineSvg?zr+" ":"")+"Leaflet</a>"},initialize:function(t){T(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=R("div","leaflet-control-attribution"),_e(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> ')}}});D.mergeOptions({attributionControl:!0}),D.addInitHook(function(){this.options.attributionControl&&new wi().addTo(this)});var Cr=function(t){return new wi(t)};_t.Layers=Tn,_t.Zoom=bi,_t.Scale=Pn,_t.Attribution=wi,ve.layers=kr,ve.zoom=Tr,ve.scale=Pr,ve.attribution=Cr;var Mt=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}});Mt.addTo=function(t,e){return t.addHandler(e,this),this};var Er={Events:$},zn=k.touch?"touchstart mousedown":"mousedown",Ot=bt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){T(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(E(this._dragStartTarget,zn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ot._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,zn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!li(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ot._dragging===this&&this.finishDrag();return}if(!(Ot._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ot._dragging=this,this._preventOutline&&pi(this._element),ci(),pe(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=xn(this._element);this._startPoint=new C(e.clientX,e.clientY),this._startPos=jt(this._element),this._parentScale=mi(i);var n=t.type==="mousedown";E(document,n?"mousemove":"touchmove",this._onMove,this),E(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new C(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,it(t),this._moved||(this.fire("dragstart"),this._moved=!0,Z(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Z(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),X(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){K(document.body,"leaflet-dragging"),this._lastTarget&&(K(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),di(),me();var e=this._moved&&this._moving;this._moving=!1,Ot._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Cn(t,e,i){var n,a=[1,4,2,8],s,c,p,m,y,M,P,S;for(s=0,M=t.length;s<M;s++)t[s]._code=Vt(t[s],e);for(p=0;p<4;p++){for(P=a[p],n=[],s=0,M=t.length,c=M-1;s<M;c=s++)m=t[s],y=t[c],m._code&P?y._code&P||(S=Re(y,m,P,e,i),S._code=Vt(S,e),n.push(S)):(y._code&P&&(S=Re(y,m,P,e,i),S._code=Vt(S,e),n.push(S)),n.push(m));t=n}return t}function En(t,e){var i,n,a,s,c,p,m,y,M;if(!t||t.length===0)throw new Error("latlngs not passed");ct(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var P=A([0,0]),S=V(t),rt=S.getNorthWest().distanceTo(S.getSouthWest())*S.getNorthEast().distanceTo(S.getNorthWest());rt<1700&&(P=Li(t));var tt=t.length,dt=[];for(i=0;i<tt;i++){var at=A(t[i]);dt.push(e.project(A([at.lat-P.lat,at.lng-P.lng])))}for(p=m=y=0,i=0,n=tt-1;i<tt;n=i++)a=dt[i],s=dt[n],c=a.y*s.x-s.y*a.x,m+=(a.x+s.x)*c,y+=(a.y+s.y)*c,p+=c*3;p===0?M=dt[0]:M=[m/p,y/p];var oe=e.unproject(z(M));return A([oe.lat+P.lat,oe.lng+P.lng])}function Li(t){for(var e=0,i=0,n=0,a=0;a<t.length;a++){var s=A(t[a]);e+=s.lat,i+=s.lng,n++}return A([e/n,i/n])}var Ir={__proto__:null,clipPolygon:Cn,polygonCenter:En,centroid:Li};function In(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Sr(t,i),t=Ar(t,i),t}function Zn(t,e,i){return Math.sqrt(ye(t,e,i,!0))}function Zr(t,e,i){return ye(t,e,i)}function Ar(t,e){var i=t.length,n=typeof Uint8Array<"u"?Uint8Array:Array,a=new n(i);a[0]=a[i-1]=1,Mi(t,a,e,0,i-1);var s,c=[];for(s=0;s<i;s++)a[s]&&c.push(t[s]);return c}function Mi(t,e,i,n,a){var s=0,c,p,m;for(p=n+1;p<=a-1;p++)m=ye(t[p],t[n],t[a],!0),m>s&&(c=p,s=m);s>i&&(e[c]=1,Mi(t,e,i,n,c),Mi(t,e,i,c,a))}function Sr(t,e){for(var i=[t[0]],n=1,a=0,s=t.length;n<s;n++)Or(t[n],t[a])>e&&(i.push(t[n]),a=n);return a<s-1&&i.push(t[s-1]),i}var An;function Sn(t,e,i,n,a){var s=n?An:Vt(t,i),c=Vt(e,i),p,m,y;for(An=c;;){if(!(s|c))return[t,e];if(s&c)return!1;p=s||c,m=Re(t,e,p,i,a),y=Vt(m,i),p===s?(t=m,s=y):(e=m,c=y)}}function Re(t,e,i,n,a){var s=e.x-t.x,c=e.y-t.y,p=n.min,m=n.max,y,M;return i&8?(y=t.x+s*(m.y-t.y)/c,M=m.y):i&4?(y=t.x+s*(p.y-t.y)/c,M=p.y):i&2?(y=m.x,M=t.y+c*(m.x-t.x)/s):i&1&&(y=p.x,M=t.y+c*(p.x-t.x)/s),new C(y,M,a)}function Vt(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 Or(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function ye(t,e,i,n){var a=e.x,s=e.y,c=i.x-a,p=i.y-s,m=c*c+p*p,y;return m>0&&(y=((t.x-a)*c+(t.y-s)*p)/m,y>1?(a=i.x,s=i.y):y>0&&(a+=c*y,s+=p*y)),c=t.x-a,p=t.y-s,n?c*c+p*p:new C(a,s)}function ct(t){return!G(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function On(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ct(t)}function Bn(t,e){var i,n,a,s,c,p,m,y;if(!t||t.length===0)throw new Error("latlngs not passed");ct(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=A([0,0]),P=V(t),S=P.getNorthWest().distanceTo(P.getSouthWest())*P.getNorthEast().distanceTo(P.getNorthWest());S<1700&&(M=Li(t));var rt=t.length,tt=[];for(i=0;i<rt;i++){var dt=A(t[i]);tt.push(e.project(A([dt.lat-M.lat,dt.lng-M.lng])))}for(i=0,n=0;i<rt-1;i++)n+=tt[i].distanceTo(tt[i+1])/2;if(n===0)y=tt[0];else for(i=0,s=0;i<rt-1;i++)if(c=tt[i],p=tt[i+1],a=c.distanceTo(p),s+=a,s>n){m=(s-n)/a,y=[p.x-m*(p.x-c.x),p.y-m*(p.y-c.y)];break}var at=e.unproject(z(y));return A([at.lat+M.lat,at.lng+M.lng])}var Br={__proto__:null,simplify:In,pointToSegmentDistance:Zn,closestPointOnSegment:Zr,clipSegment:Sn,_getEdgeIntersection:Re,_getBitCode:Vt,_sqClosestPointOnSegment:ye,isFlat:ct,_flat:On,polylineCenter:Bn},ki={project:function(t){return new C(t.lng,t.lat)},unproject:function(t){return new B(t.y,t.x)},bounds:new F([-180,-90],[180,90])},Ti={R:6378137,R_MINOR:6356752314245179e-9,bounds:new F([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,a=this.R_MINOR/i,s=Math.sqrt(1-a*a),c=s*Math.sin(n),p=Math.tan(Math.PI/4-n/2)/Math.pow((1-c)/(1+c),s/2);return n=-i*Math.log(Math.max(p,1e-10)),new C(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,a=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),c=Math.PI/2-2*Math.atan(s),p=0,m=.1,y;p<15&&Math.abs(m)>1e-7;p++)y=a*Math.sin(c),y=Math.pow((1-y)/(1+y),a/2),m=Math.PI/2-2*Math.atan(s*y)-c,c+=m;return new B(c*e,t.x*e/i)}},Dr={__proto__:null,LonLat:ki,Mercator:Ti,SphericalMercator:ue},Rr=h({},gt,{code:"EPSG:3395",projection:Ti,transformation:function(){var t=.5/(Math.PI*Ti.R);return St(t,.5,-t,.5)}()}),Dn=h({},gt,{code:"EPSG:4326",projection:ki,transformation:St(1/180,1,-1/180,.5)}),Nr=h({},st,{projection:ki,transformation:St(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});st.Earth=gt,st.EPSG3395=Rr,st.EPSG3857=Kt,st.EPSG900913=Vo,st.EPSG4326=Dn,st.Simple=Nr;var vt=bt.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[_(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[_(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})}}});D.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=_(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=_(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 _(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?G(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[_(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=_(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var a=this._zoomBoundLayers[n].options;t=a.minZoom===void 0?t:Math.min(t,a.minZoom),e=a.maxZoom===void 0?e:Math.max(e,a.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 Qt=vt.extend({initialize:function(t,e){T(this,e),this._layers={};var i,n;if(t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),i,n;for(i in this._layers)n=this._layers[i],n[t]&&n[t].apply(n,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return _(t)}}),Hr=function(t,e){return new Qt(t,e)},Pt=Qt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Qt.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),Qt.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 Y;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ur=function(t,e){return new Pt(t,e)},te=pt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){T(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];typeof n=="number"&&(n=[n,n]);var a=z(n),s=z(e==="shadow"&&i.shadowAnchor||i.iconAnchor||a&&a.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),a&&(t.style.width=a.x+"px",t.style.height=a.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return k.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function jr(t){return new te(t)}var xe=te.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 xe.imagePath!="string"&&(xe.imagePath=this._detectIconPath()),(this.options.imagePath||xe.imagePath)+te.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(i,n,a){var s=n.exec(i);return s&&s[a]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=R("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(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):""}}),Rn=Mt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ot(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Z(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&&K(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,a=this._marker.options.autoPanPadding,s=jt(e._icon),c=i.getPixelBounds(),p=i.getPixelOrigin(),m=Q(c.min._subtract(p).add(a),c.max._subtract(p).subtract(a));if(!m.contains(s)){var y=z((Math.max(m.max.x,s.x)-m.max.x)/(c.max.x-m.max.x)-(Math.min(m.min.x,s.x)-m.min.x)/(c.min.x-m.min.x),(Math.max(m.max.y,s.y)-m.max.y)/(c.max.y-m.max.y)-(Math.min(m.min.y,s.y)-m.min.y)/(c.min.y-m.min.y)).multiplyBy(n);i.panBy(y,{animate:!1}),this._draggable._newPos._add(y),this._draggable._startPos._add(y),X(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&&(ot(this._panRequest),this._panRequest=j(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=jt(e._icon),a=e._map.layerPointToLatLng(n);i&&X(i,n),e._latlng=a,t.latlng=a,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){ot(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ne=vt.extend({options:{icon:new xe,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){T(this,e),this._latlng=A(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=A(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),Z(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&&E(i,"focus",this._panOnFocus,this);var a=t.icon.createShadow(this._shadow),s=!1;a!==this._shadow&&(this._removeShadow(),s=!0),a&&(Z(a,e),a.alt=""),this._shadow=a,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),a&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&W(this._icon,"focus",this._panOnFocus,this),q(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&q(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&X(this._icon,t),this._shadow&&X(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&&(Z(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Rn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Rn(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&&ut(this._icon,t),this._shadow&&ut(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?z(e.iconSize):z(0,0),n=e.iconAnchor?z(e.iconAnchor):z(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Wr(t,e){return new Ne(t,e)}var Bt=vt.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 T(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)}}),He=Bt.extend({options:{fill:!0,radius:10},initialize:function(t,e){T(this,e),this._latlng=A(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=A(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 Bt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new F(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Fr(t,e){return new He(t,e)}var Pi=He.extend({initialize:function(t,e,i){if(typeof e=="number"&&(e=h({},i,{radius:e})),T(this,e),this._latlng=A(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 Y(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Bt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===gt.distance){var a=Math.PI/180,s=this._mRadius/gt.R/a,c=i.project([e+s,t]),p=i.project([e-s,t]),m=c.add(p).divideBy(2),y=i.unproject(m).lat,M=Math.acos((Math.cos(s*a)-Math.sin(e*a)*Math.sin(y*a))/(Math.cos(e*a)*Math.cos(y*a)))/a;(isNaN(M)||M===0)&&(M=s/Math.cos(Math.PI/180*e)),this._point=m.subtract(i.getPixelOrigin()),this._radius=isNaN(M)?0:m.x-i.project([y,t-M]).x,this._radiusY=m.y-c.y}else{var P=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(P).x}this._updateBounds()}});function Vr(t,e,i){return new Pi(t,e,i)}var zt=Bt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){T(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,i=null,n=ye,a,s,c=0,p=this._parts.length;c<p;c++)for(var m=this._parts[c],y=1,M=m.length;y<M;y++){a=m[y-1],s=m[y];var P=n(t,a,s,!0);P<e&&(e=P,i=n(t,a,s))}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 Bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=A(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Y,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ct(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=ct(t),n=0,a=t.length;n<a;n++)i?(e[n]=A(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new F;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 C(t,t);this._rawPxBounds&&(this._pxBounds=new F([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n=t[0]instanceof B,a=t.length,s,c;if(n){for(c=[],s=0;s<a;s++)c[s]=this._map.latLngToLayerPoint(t[s]),i.extend(c[s]);e.push(c)}else for(s=0;s<a;s++)this._projectLatlngs(t[s],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,i,n,a,s,c,p,m;for(i=0,a=0,s=this._rings.length;i<s;i++)for(m=this._rings[i],n=0,c=m.length;n<c-1;n++)p=Sn(m[n],m[n+1],t,n,!0),p&&(e[a]=e[a]||[],e[a].push(p[0]),(p[1]!==m[n+1]||n===c-2)&&(e[a].push(p[1]),a++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=In(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,a,s,c,p,m=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(p=this._parts[i],n=0,c=p.length,a=c-1;n<c;a=n++)if(!(!e&&n===0)&&Zn(t,p[a],p[n])<=m)return!0;return!1}});function qr(t,e){return new zt(t,e)}zt._flat=On;var ee=zt.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 En(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=zt.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof B&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){zt.prototype._setLatLngs.call(this,t),ct(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ct(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new C(e,e);if(t=new F(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,a=this._rings.length,s;n<a;n++)s=Cn(this._rings[n],t,!0),s.length&&this._parts.push(s)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,i,n,a,s,c,p,m,y;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,m=this._parts.length;s<m;s++)for(i=this._parts[s],c=0,y=i.length,p=y-1;c<y;p=c++)n=i[c],a=i[p],n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(e=!e);return e||zt.prototype._containsPoint.call(this,t,!0)}});function Gr(t,e){return new ee(t,e)}var Ct=Pt.extend({initialize:function(t,e){T(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=G(t)?t:t.features,i,n,a;if(e){for(i=0,n=e.length;i<n;i++)a=e[i],(a.geometries||a.geometry||a.features||a.coordinates)&&this.addData(a);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var c=Ue(t,s);return c?(c.feature=Fe(t),c.defaultOptions=c.options,this.resetStyle(c),s.onEachFeature&&s.onEachFeature(t,c),this.addLayer(c)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function Ue(t,e){var i=t.type==="Feature"?t.geometry:t,n=i?i.coordinates:null,a=[],s=e&&e.pointToLayer,c=e&&e.coordsToLatLng||zi,p,m,y,M;if(!n&&!i)return null;switch(i.type){case"Point":return p=c(n),Nn(s,t,p,e);case"MultiPoint":for(y=0,M=n.length;y<M;y++)p=c(n[y]),a.push(Nn(s,t,p,e));return new Pt(a);case"LineString":case"MultiLineString":return m=je(n,i.type==="LineString"?0:1,c),new zt(m,e);case"Polygon":case"MultiPolygon":return m=je(n,i.type==="Polygon"?1:2,c),new ee(m,e);case"GeometryCollection":for(y=0,M=i.geometries.length;y<M;y++){var P=Ue({geometry:i.geometries[y],type:"Feature",properties:t.properties},e);P&&a.push(P)}return new Pt(a);case"FeatureCollection":for(y=0,M=i.features.length;y<M;y++){var S=Ue(i.features[y],e);S&&a.push(S)}return new Pt(a);default:throw new Error("Invalid GeoJSON object.")}}function Nn(t,e,i,n){return t?t(e,i):new Ne(i,n&&n.markersInheritOptions&&n)}function zi(t){return new B(t[1],t[0],t[2])}function je(t,e,i){for(var n=[],a=0,s=t.length,c;a<s;a++)c=e?je(t[a],e-1,i):(i||zi)(t[a]),n.push(c);return n}function Ci(t,e){return t=A(t),t.alt!==void 0?[w(t.lng,e),w(t.lat,e),w(t.alt,e)]:[w(t.lng,e),w(t.lat,e)]}function We(t,e,i,n){for(var a=[],s=0,c=t.length;s<c;s++)a.push(e?We(t[s],ct(t[s])?0:e-1,i,n):Ci(t[s],n));return!e&&i&&a.length>0&&a.push(a[0].slice()),a}function ie(t,e){return t.feature?h({},t.feature,{geometry:e}):Fe(e)}function Fe(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Ei={toGeoJSON:function(t){return ie(this,{type:"Point",coordinates:Ci(this.getLatLng(),t)})}};Ne.include(Ei),Pi.include(Ei),He.include(Ei),zt.include({toGeoJSON:function(t){var e=!ct(this._latlngs),i=We(this._latlngs,e?1:0,!1,t);return ie(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),ee.include({toGeoJSON:function(t){var e=!ct(this._latlngs),i=e&&!ct(this._latlngs[0]),n=We(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),ie(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Qt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),ie(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(a){if(a.toGeoJSON){var s=a.toGeoJSON(t);if(i)n.push(s.geometry);else{var c=Fe(s);c.type==="FeatureCollection"?n.push.apply(n,c.features):n.push(c)}}}),i?ie(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Hn(t,e){return new Ct(t,e)}var Yr=Hn,Ve=vt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=V(e),T(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Z(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){q(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&&Xt(this._image),this},bringToBack:function(){return this._map&&Jt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=V(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:R("img");if(Z(e,"leaflet-image-layer"),this._zoomAnimated&&Z(e,"leaflet-zoom-animated"),this.options.className&&Z(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;Ut(this._image,i,e)},_reset:function(){var t=this._image,e=new F(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();X(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ut(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()}}),Kr=function(t,e,i){return new Ve(t,e,i)},Un=Ve.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:R("video");if(Z(e,"leaflet-image-layer"),this._zoomAnimated&&Z(e,"leaflet-zoom-animated"),this.options.className&&Z(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onloadeddata=f(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],a=0;a<i.length;a++)n.push(i[a].src);this._url=i.length>0?n:[e.src];return}G(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 s=0;s<this._url.length;s++){var c=R("source");c.src=this._url[s],e.appendChild(c)}}});function $r(t,e,i){return new Un(t,e,i)}var jn=Ve.extend({_initImage:function(){var t=this._image=this._url;Z(t,"leaflet-image-layer"),this._zoomAnimated&&Z(t,"leaflet-zoom-animated"),this.options.className&&Z(t,this.options.className),t.onselectstart=v,t.onmousemove=v}});function Xr(t,e,i){return new jn(t,e,i)}var kt=vt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof B||G(t))?(this._latlng=A(t),T(this,e)):(T(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&&ut(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ut(this._container,1),this.bringToFront(),this.options.interactive&&(Z(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ut(this._container,0),this._removeTimeout=setTimeout(f(q,void 0,this._container),200)):q(this._container),this.options.interactive&&(K(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=A(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&&Xt(this._container),this},bringToBack:function(){return this._map&&Jt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Pt){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=z(this.options.offset),i=this._getAnchor();this._zoomAnimated?X(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,a=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=a+"px"}},_getAnchor:function(){return[0,0]}});D.include({_initOverlay:function(t,e,i,n){var a=e;return a instanceof t||(a=new t(n).setContent(e)),i&&a.setLatLng(i),a}}),vt.include({_initOverlay:function(t,e,i,n){var a=i;return a instanceof t?(T(a,n),a._source=this):(a=e&&!n?e:new t(n,this),a.setContent(i)),a}});var qe=kt.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,kt.prototype.openOn.call(this,t)},onAdd:function(t){kt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Bt||this._source.on("preclick",Wt))},onRemove:function(t){kt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Bt||this._source.off("preclick",Wt))},getEvents:function(){var t=kt.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=R("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=R("div",t+"-content-wrapper",e);if(this._contentNode=R("div",t+"-content",i),_e(e),yi(this._contentNode),E(e,"contextmenu",Wt),this._tipContainer=R("div",t+"-tip-container",e),this._tip=R("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=R("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',E(n,"click",function(a){it(a),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,a=this.options.maxHeight,s="leaflet-popup-scrolled";a&&n>a?(e.height=a+"px",Z(t,s)):K(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();X(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(fe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,a=new C(this._containerLeft,-i-this._containerBottom);a._add(jt(this._container));var s=t.layerPointToContainerPoint(a),c=z(this.options.autoPanPadding),p=z(this.options.autoPanPaddingTopLeft||c),m=z(this.options.autoPanPaddingBottomRight||c),y=t.getSize(),M=0,P=0;s.x+n+m.x>y.x&&(M=s.x+n-y.x+m.x),s.x-M-p.x<0&&(M=s.x-p.x),s.y+i+m.y>y.y&&(P=s.y+i-y.y+m.y),s.y-P-p.y<0&&(P=s.y-p.y),(M||P)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,P]))}},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Jr=function(t,e){return new qe(t,e)};D.mergeOptions({closePopupOnClick:!0}),D.include({openPopup:function(t,e,i){return this._initOverlay(qe,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),vt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(qe,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 Pt||(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)){Ft(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof Bt)){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 Ge=kt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){kt.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){kt.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=kt.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=R("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+_(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,a=this._container,s=n.latLngToContainerPoint(n.getCenter()),c=n.layerPointToContainerPoint(t),p=this.options.direction,m=a.offsetWidth,y=a.offsetHeight,M=z(this.options.offset),P=this._getAnchor();p==="top"?(e=m/2,i=y):p==="bottom"?(e=m/2,i=0):p==="center"?(e=m/2,i=y/2):p==="right"?(e=0,i=y/2):p==="left"?(e=m,i=y/2):c.x<s.x?(p="right",e=0,i=y/2):(p="left",e=m+(M.x+P.x)*2,i=y/2),t=t.subtract(z(e,i,!0)).add(M).add(P),K(a,"leaflet-tooltip-right"),K(a,"leaflet-tooltip-left"),K(a,"leaflet-tooltip-top"),K(a,"leaflet-tooltip-bottom"),Z(a,"leaflet-tooltip-"+p),X(a,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ut(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Qr=function(t,e){return new Ge(t,e)};D.include({openTooltip:function(t,e,i){return this._initOverlay(Ge,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),vt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ge,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 Pt||(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&&(E(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),E(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,i,n;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(e)}});var Wn=te.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?(Ae(e),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){var n=z(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function ta(t){return new Wn(t)}te.Default=xe;var be=vt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:k.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){T(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),q(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Xt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Jt(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=b(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 C?t:new C(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,i=-t(-1/0,1/0),n=0,a=e.length,s;n<a;n++)s=e[n].style.zIndex,e[n]!==this._container&&s&&(i=t(i,+s));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!k.ielt9){ut(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var a=this._tiles[n];if(!(!a.current||!a.loaded)){var s=Math.min(1,(t-a.loaded)/200);ut(a.el,s),s<1?e=!0:(a.active?i=!0:this._onOpaqueTile(a),a.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(ot(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this))}},_onOpaqueTile:v,_initContainer:function(){this._container||(this._container=R("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)):(q(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],a=this._map;return n||(n=this._levels[t]={},n.el=R("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=a.project(a.unproject(a.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,a.getCenter(),a.getZoom()),v(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)q(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var a=Math.floor(t/2),s=Math.floor(e/2),c=i-1,p=new C(+a,+s);p.z=+c;var m=this._tileCoordsToKey(p),y=this._tiles[m];return y&&y.active?(y.retain=!0,!0):(y&&y.loaded&&(y.retain=!0),c>n?this._retainParent(a,s,c,n):!1)},_retainChildren:function(t,e,i,n){for(var a=2*t;a<2*t+2;a++)for(var s=2*e;s<2*e+2;s++){var c=new C(a,s);c.z=i+1;var p=this._tileCoordsToKey(c),m=this._tiles[p];if(m&&m.active){m.retain=!0;continue}else m&&m.loaded&&(m.retain=!0);i+1<n&&this._retainChildren(a,s,i+1,n)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var a=Math.round(e);this.options.maxZoom!==void 0&&a>this.options.maxZoom||this.options.minZoom!==void 0&&a<this.options.minZoom?a=void 0:a=this._clampZoom(a);var s=this.options.updateWhenZooming&&a!==this._tileZoom;(!n||s)&&(this._tileZoom=a,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),a!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),a=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();k.any3d?Ut(t.el,a,n):X(t.el,a)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,a=this._map.getPixelWorldBounds(this._tileZoom);a&&(this._globalTileRange=this._pxBoundsToTileRange(a)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),a=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(n*2);return new F(a.subtract(s),a.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var n=this._getTiledPixelBounds(t),a=this._pxBoundsToTileRange(n),s=a.getCenter(),c=[],p=this.options.keepBuffer,m=new F(a.getBottomLeft().subtract([p,-p]),a.getTopRight().add([p,-p]));if(!(isFinite(a.min.x)&&isFinite(a.min.y)&&isFinite(a.max.x)&&isFinite(a.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var y in this._tiles){var M=this._tiles[y].coords;(M.z!==this._tileZoom||!m.contains(new C(M.x,M.y)))&&(this._tiles[y].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var P=a.min.y;P<=a.max.y;P++)for(var S=a.min.x;S<=a.max.x;S++){var rt=new C(S,P);if(rt.z=this._tileZoom,!!this._isValidTile(rt)){var tt=this._tiles[this._tileCoordsToKey(rt)];tt?tt.current=!0:c.push(rt)}}if(c.sort(function(at,oe){return at.distanceTo(s)-oe.distanceTo(s)}),c.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var dt=document.createDocumentFragment();for(S=0;S<c.length;S++)this._addTile(c[S],dt);this._level.el.appendChild(dt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return V(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),a=n.add(i),s=e.unproject(n,t.z),c=e.unproject(a,t.z);return[s,c]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Y(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 C(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(q(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Z(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,k.ielt9&&this.options.opacity<1&&ut(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),a=this.createTile(this._wrapCoords(t),f(this._tileReady,this,t));this._initTile(a),this.createTile.length<2&&j(f(this._tileReady,this,t,null,a)),X(a,i),this._tiles[n]={el:a,coords:t,current:!0},e.appendChild(a),this.fire("tileloadstart",{tile:a,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(ut(i.el,0),ot(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(Z(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),k.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 C(this._wrapX?x(t.x,this._wrapX):t.x,this._wrapY?x(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new F(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 ea(t){return new be(t)}var ne=be.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=T(this,e),e.detectRetina&&k.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 E(i,"load",f(this._tileOnLoad,this,e,i)),E(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:k.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 qt(this._url,h(e,this.options))},_tileOnLoad:function(t,e){k.ielt9?setTimeout(f(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=v,e.onerror=v,!e.complete)){e.src=At;var i=this._tiles[t].coords;q(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",At),be.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===At))return be.prototype._tileReady.call(this,t,e,i)}});function Fn(t,e){return new ne(t,e)}var Vn=ne.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=h({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=T(this,e);var a=e.detectRetina&&k.retina?2:1,s=this.getTileSize();i.width=s.x*a,i.height=s.y*a,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,ne.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=Q(i.project(e[0]),i.project(e[1])),a=n.min,s=n.max,c=(this._wmsVersion>=1.3&&this._crs===Dn?[a.y,a.x,s.y,s.x]:[a.x,a.y,s.x,s.y]).join(","),p=ne.prototype.getTileUrl.call(this,t);return p+U(this.wmsParams,p,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+c},setParams:function(t,e){return h(this.wmsParams,t),e||this.redraw(),this}});function ia(t,e){return new Vn(t,e)}ne.WMS=Vn,Fn.wms=ia;var Et=vt.extend({options:{padding:.1},initialize:function(t){T(this,t),_(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Z(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),a=this._map.project(this._center,e),s=n.multiplyBy(-i).add(a).subtract(this._map._getNewPixelOrigin(t,e));k.any3d?Ut(this._container,s,i):X(this._container,s)},_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 F(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qn=Et.extend({options:{tolerance:0},getEvents:function(){var t=Et.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Et.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");E(t,"mousemove",this._onMouseMove,this),E(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),E(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){ot(this._redrawRequest),delete this._ctx,q(this._container),W(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)){Et.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=k.retina?2:1;X(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",k.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Et.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[_(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[_(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,a;for(a=0;a<e.length;a++){if(n=Number(e[a]),isNaN(n))return;i.push(n)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||j(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new F,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,a,s,c=t._parts,p=c.length,m=this._ctx;if(p){for(m.beginPath(),i=0;i<p;i++){for(n=0,a=c[i].length;n<a;n++)s=c[i][n],m[n?"lineTo":"moveTo"](s.x,s.y);e&&m.closePath()}this._fillStroke(m,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||n)/n;a!==1&&(i.save(),i.scale(1,a)),i.beginPath(),i.arc(e.x,e.y/a,n,0,Math.PI*2,!1),a!==1&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),i,n,a=this._drawFirst;a;a=a.next)i=a.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(n=i);this._fireEvent(n?[n]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(K(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,a=this._drawFirst;a;a=a.next)i=a.layer,i.options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(Z(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),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,n=e.prev;if(i)i.prev=n;else return;n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;if(n)n.next=i;else return;i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function Gn(t){return k.canvas?new qn(t):null}var we=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">')}}(),na={_initContainer:function(){this._container=R("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Et.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=we("shape");Z(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=we("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[_(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;q(e),t.removeInteractiveTarget(e),delete this._layers[_(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,a=t._container;a.stroked=!!n.stroke,a.filled=!!n.fill,n.stroke?(e||(e=t._stroke=we("stroke")),a.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=G(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(a.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=we("fill")),a.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(a.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Xt(t._container)},_bringToBack:function(t){Jt(t._container)}},Ye=k.vml?we:$i,Le=Et.extend({_initContainer:function(){this._container=Ye("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ye("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){q(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Et.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)),X(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=Ye("path");t.options.className&&Z(e,t.options.className),t.options.interactive&&Z(e,"leaflet-interactive"),this._updateStyle(t),this._layers[_(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){q(t._path),t.removeInteractiveTarget(t._path),delete this._layers[_(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,Xi(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,a="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+a+i*2+",0 "+a+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Xt(t._path)},_bringToBack:function(t){Jt(t._path)}});k.vml&&Le.include(na);function Yn(t){return k.svg||k.vml?new Le(t):null}D.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&&Gn(t)||Yn(t)}});var Kn=ee.extend({initialize:function(t,e){ee.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=V(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function oa(t,e){return new Kn(t,e)}Le.create=Ye,Le.pointsToPath=Xi,Ct.geometryToLayer=Ue,Ct.coordsToLatLng=zi,Ct.coordsToLatLngs=je,Ct.latLngToCoords=Ci,Ct.latLngsToCoords=We,Ct.getFeature=ie,Ct.asFeature=Fe,D.mergeOptions({boxZoom:!0});var $n=Mt.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(){E(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){q(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(),pe(),ci(),this._startPoint=this._map.mouseEventToContainerPoint(t),E(document,{contextmenu:Ft,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=R("div","leaflet-zoom-box",this._container),Z(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new F(this._point,this._startPoint),i=e.getSize();X(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(q(this._box),K(this._container,"leaflet-crosshair")),me(),di(),W(document,{contextmenu:Ft,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 Y(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())}});D.addInitHook("addHandler","boxZoom",$n),D.mergeOptions({doubleClickZoom:!0});var Xn=Mt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,a=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(a):e.setZoomAround(t.containerPoint,a)}});D.addInitHook("addHandler","doubleClickZoom",Xn),D.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Jn=Mt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ot(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Z(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){K(this._map._container,"leaflet-grab"),K(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=V(this._map.options.maxBounds);this._offsetLimit=Q(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,a=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,c=Math.abs(a+i)<Math.abs(s+i)?a:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=c},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var a=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,c=i.easeLinearity,p=a.multiplyBy(c/s),m=p.distanceTo([0,0]),y=Math.min(i.inertiaMaxSpeed,m),M=p.multiplyBy(y/m),P=y/(i.inertiaDeceleration*c),S=M.multiplyBy(-P/2).round();!S.x&&!S.y?e.fire("moveend"):(S=e._limitOffset(S,e.options.maxBounds),j(function(){e.panBy(S,{duration:P,easeLinearity:c,noMoveStart:!0,animate:!0})}))}}});D.addInitHook("addHandler","dragging",Jn),D.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Qn=Mt.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"),E(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(),W(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},i=this.keyCodes,n,a;for(n=0,a=i.left.length;n<a;n++)e[i.left[n]]=[-1*t,0];for(n=0,a=i.right.length;n<a;n++)e[i.right[n]]=[t,0];for(n=0,a=i.down.length;n<a;n++)e[i.down[n]]=[0,t];for(n=0,a=i.up.length;n<a;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,n,a;for(n=0,a=i.zoomIn.length;n<a;n++)e[i.zoomIn[n]]=t;for(n=0,a=i.zoomOut.length;n<a;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){E(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){W(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,i=this._map,n;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(n=this._panKeys[e],t.shiftKey&&(n=z(n).multiplyBy(3)),i.options.maxBounds&&(n=i._limitOffset(z(n),i.options.maxBounds)),i.options.worldCopyJump){var a=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(n)));i.panTo(a)}else i.panBy(n)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;Ft(t)}}});D.addInitHook("addHandler","keyboard",Qn),D.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=Mt.extend({addHooks:function(){E(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){W(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Mn(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(f(this._performZoom,this),n),Ft(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(this._map.options.wheelPxPerZoomLevel*4),a=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(a/i)*i:a,c=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,c&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+c):t.setZoomAround(this._lastMousePos,e+c))}});D.addInitHook("addHandler","scrollWheelZoom",to);var ra=600;D.mergeOptions({tapHold:k.touchNative&&k.safari&&k.mobile,tapTolerance:15});var eo=Mt.extend({addHooks:function(){E(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){W(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 C(e.clientX,e.clientY),this._holdTimeout=setTimeout(f(function(){this._cancel(),this._isTapValid()&&(E(document,"touchend",it),E(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),ra),E(document,"touchend touchcancel contextmenu",this._cancel,this),E(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){W(document,"touchend",it),W(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),W(document,"touchend touchcancel contextmenu",this._cancel,this),W(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new C(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)}});D.addInitHook("addHandler","tapHold",eo),D.mergeOptions({touchZoom:k.touch,bounceAtZoomLimits:!0});var io=Mt.extend({addHooks:function(){Z(this._map._container,"leaflet-touch-zoom"),E(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){K(this._map._container,"leaflet-touch-zoom"),W(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),E(document,"touchmove",this._onTouchMove,this),E(document,"touchend touchcancel",this._onTouchEnd,this),it(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),a=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(a,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&a<1||this._zoom>e.getMaxZoom()&&a>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,a===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(a===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),ot(this._animRequest);var c=f(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=j(c,this,!0),it(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ot(this._animRequest),W(document,"touchmove",this._onTouchMove,this),W(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))}});D.addInitHook("addHandler","touchZoom",io),D.BoxZoom=$n,D.DoubleClickZoom=Xn,D.Drag=Jn,D.Keyboard=Qn,D.ScrollWheelZoom=to,D.TapHold=eo,D.TouchZoom=io,r.Bounds=F,r.Browser=k,r.CRS=st,r.Canvas=qn,r.Circle=Pi,r.CircleMarker=He,r.Class=pt,r.Control=_t,r.DivIcon=Wn,r.DivOverlay=kt,r.DomEvent=Lr,r.DomUtil=br,r.Draggable=Ot,r.Evented=bt,r.FeatureGroup=Pt,r.GeoJSON=Ct,r.GridLayer=be,r.Handler=Mt,r.Icon=te,r.ImageOverlay=Ve,r.LatLng=B,r.LatLngBounds=Y,r.Layer=vt,r.LayerGroup=Qt,r.LineUtil=Br,r.Map=D,r.Marker=Ne,r.Mixin=Er,r.Path=Bt,r.Point=C,r.PolyUtil=Ir,r.Polygon=ee,r.Polyline=zt,r.Popup=qe,r.PosAnimation=kn,r.Projection=Dr,r.Rectangle=Kn,r.Renderer=Et,r.SVG=Le,r.SVGOverlay=jn,r.TileLayer=ne,r.Tooltip=Ge,r.Transformation=Yt,r.Util=ti,r.VideoOverlay=Un,r.bind=f,r.bounds=Q,r.canvas=Gn,r.circle=Vr,r.circleMarker=Fr,r.control=ve,r.divIcon=ta,r.extend=h,r.featureGroup=Ur,r.geoJSON=Hn,r.geoJson=Yr,r.gridLayer=ea,r.icon=jr,r.imageOverlay=Kr,r.latLng=A,r.latLngBounds=V,r.layerGroup=Hr,r.map=Mr,r.marker=Wr,r.point=z,r.polygon=Gr,r.polyline=qr,r.popup=Jr,r.rectangle=oa,r.setOptions=T,r.stamp=_,r.svg=Yn,r.svgOverlay=Xr,r.tileLayer=Fn,r.tooltip=Qr,r.transformation=St,r.version=l,r.videoOverlay=$r;var aa=window.L;r.noConflict=function(){return window.L=aa,this},window.L=r})}),ho={};ba(ho,{L:()=>Ma,default:()=>nt});var La=`.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 u=document.createElement("style");u.textContent=La,document.head.appendChild(u)}var uo=so(lo(),1);wa(ho,so(lo(),1));var Ma=uo,nt=uo;var ht=Uint8Array,re=Uint16Array,ka=Int32Array,co=new ht([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fo=new ht([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ta=new ht([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),po=function(u,o){for(var r=new re(31),l=0;l<31;++l)r[l]=o+=1<<u[l-1];for(var h=new ka(r[30]),l=1;l<30;++l)for(var d=r[l];d<r[l+1];++d)h[d]=d-r[l]<<5|l;return{b:r,r:h}},mo=po(co,2),go=mo.b,Pa=mo.r;go[28]=258,Pa[258]=28;var _o=po(fo,0),za=_o.b,os=_o.r,Bi=new re(32768);for(N=0;N<32768;++N)It=(N&43690)>>1|(N&21845)<<1,It=(It&52428)>>2|(It&13107)<<2,It=(It&61680)>>4|(It&3855)<<4,Bi[N]=((It&65280)>>8|(It&255)<<8)>>1;var It,N,Me=function(u,o,r){for(var l=u.length,h=0,d=new re(o);h<l;++h)u[h]&&++d[u[h]-1];var f=new re(o);for(h=1;h<o;++h)f[h]=f[h-1]+d[h-1]<<1;var g;if(r){g=new re(1<<o);var _=15-o;for(h=0;h<l;++h)if(u[h])for(var b=h<<4|u[h],x=o-u[h],v=f[u[h]-1]++<<x,w=v|(1<<x)-1;v<=w;++v)g[Bi[v]>>_]=b}else for(g=new re(l),h=0;h<l;++h)u[h]&&(g[h]=Bi[f[u[h]-1]++]>>15-u[h]);return g},ke=new ht(288);for(N=0;N<144;++N)ke[N]=8;var N;for(N=144;N<256;++N)ke[N]=9;var N;for(N=256;N<280;++N)ke[N]=7;var N;for(N=280;N<288;++N)ke[N]=8;var N,vo=new ht(32);for(N=0;N<32;++N)vo[N]=5;var N;var Ca=Me(ke,9,1);var Ea=Me(vo,5,1),Si=function(u){for(var o=u[0],r=1;r<u.length;++r)u[r]>o&&(o=u[r]);return o},yt=function(u,o,r){var l=o/8|0;return(u[l]|u[l+1]<<8)>>(o&7)&r},Oi=function(u,o){var r=o/8|0;return(u[r]|u[r+1]<<8|u[r+2]<<16)>>(o&7)},Ia=function(u){return(u+7)/8|0},Za=function(u,o,r){return(o==null||o<0)&&(o=0),(r==null||r>u.length)&&(r=u.length),new ht(u.subarray(o,r))};var Aa=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],lt=function(u,o,r){var l=new Error(o||Aa[u]);if(l.code=u,Error.captureStackTrace&&Error.captureStackTrace(l,lt),!r)throw l;return l},Di=function(u,o,r,l){var h=u.length,d=l?l.length:0;if(!h||o.f&&!o.l)return r||new ht(0);var f=!r,g=f||o.i!=2,_=o.i;f&&(r=new ht(h*3));var b=function(Yt){var St=r.length;if(Yt>St){var Kt=new ht(Math.max(St*2,Yt));Kt.set(r),r=Kt}},x=o.f||0,v=o.p||0,w=o.b||0,O=o.l,I=o.d,T=o.m,U=o.n,xt=h*8;do{if(!O){x=yt(u,v,1);var qt=yt(u,v+1,3);if(v+=3,qt)if(qt==1)O=Ca,I=Ea,T=9,U=5;else if(qt==2){var Ht=yt(u,v,31)+257,se=yt(u,v+10,15)+4,le=Ht+yt(u,v+5,31)+1;v+=14;for(var Tt=new ht(le),Gt=new ht(19),j=0;j<se;++j)Gt[Ta[j]]=yt(u,v+j*3,7);v+=se*3;for(var ot=Si(Gt),ti=(1<<ot)-1,pt=Me(Gt,ot,1),j=0;j<le;){var Ee=pt[yt(u,v,ti)];v+=Ee&15;var G=Ee>>4;if(G<16)Tt[j++]=G;else{var $=0,bt=0;for(G==16?(bt=3+yt(u,v,3),v+=2,$=Tt[j-1]):G==17?(bt=3+yt(u,v,7),v+=3):G==18&&(bt=11+yt(u,v,127),v+=7);bt--;)Tt[j++]=$}}var C=Tt.subarray(0,Ht),mt=Tt.subarray(Ht);T=Si(C),U=Si(mt),O=Me(C,T,1),I=Me(mt,U,1)}else lt(1);else{var G=Ia(v)+4,Nt=u[G-4]|u[G-3]<<8,At=G+Nt;if(At>h){_&<(0);break}g&&b(w+Nt),r.set(u.subarray(G,At),w),o.b=w+=Nt,o.p=v=At*8,o.f=x;continue}if(v>xt){_&<(0);break}}g&&b(w+131072);for(var z=(1<<T)-1,F=(1<<U)-1,Q=v;;Q=v){var $=O[Oi(u,v)&z],Y=$>>4;if(v+=$&15,v>xt){_&<(0);break}if($||lt(2),Y<256)r[w++]=Y;else if(Y==256){Q=v,O=null;break}else{var V=Y-254;if(Y>264){var j=Y-257,B=co[j];V=yt(u,v,(1<<B)-1)+go[j],v+=B}var A=I[Oi(u,v)&F],st=A>>4;A||lt(3),v+=A&15;var mt=za[st];if(st>3){var B=fo[st];mt+=Oi(u,v)&(1<<B)-1,v+=B}if(v>xt){_&<(0);break}g&&b(w+131072);var gt=w+V;if(w<mt){var he=d-mt,ue=Math.min(mt,gt);for(he+w<0&<(3);w<ue;++w)r[w]=l[he+w]}for(;w<gt;++w)r[w]=r[w-mt]}}o.l=O,o.p=Q,o.b=w,o.f=x,O&&(x=1,o.m=T,o.d=I,o.n=U)}while(!x);return w!=r.length&&f?Za(r,0,w):r.subarray(0,w)};var Sa=new ht(0);var Oa=function(u){(u[0]!=31||u[1]!=139||u[2]!=8)&<(6,"invalid gzip data");var o=u[3],r=10;o&4&&(r+=(u[10]|u[11]<<8)+2);for(var l=(o>>3&1)+(o>>4&1);l>0;l-=!u[r++]);return r+(o&2)},Ba=function(u){var o=u.length;return(u[o-4]|u[o-3]<<8|u[o-2]<<16|u[o-1]<<24)>>>0};var Da=function(u,o){return((u[0]&15)!=8||u[0]>>4>7||(u[0]<<8|u[1])%31)&<(6,"invalid zlib data"),(u[1]>>5&1)==+!o&<(6,"invalid zlib data: "+(u[1]&32?"need":"unexpected")+" dictionary"),(u[1]>>3&4)+2};function Ra(u,o){return Di(u,{i:2},o&&o.out,o&&o.dictionary)}function Na(u,o){var r=Oa(u);return r+8>u.length&<(6,"invalid gzip data"),Di(u.subarray(r,-8),{i:2},o&&o.out||new ht(Ba(u)),o&&o.dictionary)}function Ha(u,o){return Di(u.subarray(Da(u,o&&o.dictionary),-4),{i:2},o&&o.out,o&&o.dictionary)}function yo(u,o){return u[0]==31&&u[1]==139&&u[2]==8?Na(u,o):(u[0]&15)!=8||u[0]>>4>7||(u[0]<<8|u[1])%31?Ra(u,o):Ha(u,o)}var Ua=typeof TextDecoder<"u"&&new TextDecoder,ja=0;try{Ua.decode(Sa,{stream:!0}),ja=1}catch{}var Wa=Object.defineProperty,Fa=Math.pow,H=(u,o)=>Wa(u,"name",{value:o,configurable:!0}),et=(u,o,r)=>new Promise((l,h)=>{var d=_=>{try{g(r.next(_))}catch(b){h(b)}},f=_=>{try{g(r.throw(_))}catch(b){h(b)}},g=_=>_.done?l(_.value):Promise.resolve(_.value).then(d,f);g((r=r.apply(u,o)).next())}),xo=H((u,o)=>{let r=!1,l="",h=L.GridLayer.extend({createTile:H((d,f)=>{let g=document.createElement("img"),_=new AbortController,b=_.signal;return g.cancel=()=>{_.abort()},r||(u.getHeader().then(x=>{x.tileType===1?console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details."):x.tileType===2?l="image/png":x.tileType===3?l="image/jpeg":x.tileType===4?l="image/webp":x.tileType===5&&(l="image/avif")}),r=!0),u.getZxy(d.z,d.x,d.y,b).then(x=>{if(x){let v=new Blob([x.data],{type:l}),w=window.URL.createObjectURL(v);g.src=w}else g.style.display="none";g.cancel=void 0,f(void 0,g)}).catch(x=>{if(x.name!=="AbortError")throw x}),g},"createTile"),_removeTile:H(function(d){let f=this._tiles[d];f&&(f.el.cancel&&f.el.cancel(),f.el.width=0,f.el.height=0,f.el.deleted=!0,L.DomUtil.remove(f.el),delete this._tiles[d],this.fire("tileunload",{tile:f.el,coords:this._keyToTileCoords(d)}))},"_removeTile")});return new h(o)},"leafletRasterLayer"),Va=H(u=>(o,r)=>{if(r instanceof AbortController)return u(o,r);let l=new AbortController;return u(o,l).then(h=>r(void 0,h.data,h.cacheControl||"",h.expires||""),h=>r(h)).catch(h=>r(h)),{cancel:H(()=>l.abort(),"cancel")}},"v3compat"),qa=class{constructor(o){this.tilev4=H((r,l)=>et(this,null,function*(){if(r.type==="json"){let O=r.url.substr(10),I=this.tiles.get(O);if(I||(I=new $e(O),this.tiles.set(O,I)),this.metadata){let U=yield I.getTileJson(r.url);return l.signal.throwIfAborted(),{data:U}}let T=yield I.getHeader();return l.signal.throwIfAborted(),(T.minLon>=T.maxLon||T.minLat>=T.maxLat)&&console.error(`Bounds of PMTiles archive ${T.minLon},${T.minLat},${T.maxLon},${T.maxLat} are not valid.`),{data:{tiles:[`${r.url}/{z}/{x}/{y}`],minzoom:T.minZoom,maxzoom:T.maxZoom,bounds:[T.minLon,T.minLat,T.maxLon,T.maxLat]}}}let h=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),d=r.url.match(h);if(!d)throw new Error("Invalid PMTiles protocol URL");let f=d[1],g=this.tiles.get(f);g||(g=new $e(f),this.tiles.set(f,g));let _=d[2],b=d[3],x=d[4],v=yield g.getHeader(),w=yield g?.getZxy(+_,+b,+x,l.signal);if(l.signal.throwIfAborted(),w)return{data:new Uint8Array(w.data),cacheControl:w.cacheControl,expires:w.expires};if(v.tileType===1){if(this.errorOnMissingTile)throw new Error("Tile not found.");return{data:new Uint8Array}}return{data:null}}),"tilev4"),this.tile=Va(this.tilev4),this.tiles=new Map,this.metadata=o?.metadata||!1,this.errorOnMissingTile=o?.errorOnMissingTile||!1}add(o){this.tiles.set(o.source.getKey(),o)}get(o){return this.tiles.get(o)}};H(qa,"Protocol");function bo(u,o){return(o>>>0)*4294967296+(u>>>0)}H(bo,"toNum");function wo(u,o){let r=o.buf,l=r[o.pos++],h=(l&112)>>4;if(l<128||(l=r[o.pos++],h|=(l&127)<<3,l<128)||(l=r[o.pos++],h|=(l&127)<<10,l<128)||(l=r[o.pos++],h|=(l&127)<<17,l<128)||(l=r[o.pos++],h|=(l&127)<<24,l<128)||(l=r[o.pos++],h|=(l&1)<<31,l<128))return bo(u,h);throw new Error("Expected varint not more than 10 bytes")}H(wo,"readVarintRemainder");function ae(u){let o=u.buf,r=o[u.pos++],l=r&127;return r<128||(r=o[u.pos++],l|=(r&127)<<7,r<128)||(r=o[u.pos++],l|=(r&127)<<14,r<128)||(r=o[u.pos++],l|=(r&127)<<21,r<128)?l:(r=o[u.pos],l|=(r&15)<<28,wo(l,u))}H(ae,"readVarint");function Ni(u,o,r,l,h){return h===0?l!==0?[u-1-r,u-1-o]:[r,o]:[o,r]}H(Ni,"rotate");function Lo(u,o,r){if(u>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(o>=1<<u||r>=1<<u)throw new Error("tile x/y outside zoom level bounds");let l=((1<<u)*(1<<u)-1)/3,h=u-1,[d,f]=[o,r];for(let g=1<<h;g>0;g>>=1){let _=d&g,b=f&g;l+=(3*_^b)*(1<<h),[d,f]=Ni(g,d,f,_,b),h--}return l}H(Lo,"zxyToTileId");function Mo(u){let o=3*u+1;return o<4294967296?31-Math.clz32(o):63-Math.clz32(o/4294967296)}H(Mo,"tileIdToZ");function Ga(u){let o=Mo(u)>>1;if(o>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");let r=((1<<o)*(1<<o)-1)/3,l=u-r,h=0,d=0,f=1<<o;for(let g=1;g<f;g<<=1){let _=g&l/2,b=g&(l^_);[h,d]=Ni(g,h,d,_,b),l=l/2,h+=_,d+=b}return[o,h,d]}H(Ga,"tileIdToZxy");var Ya=(u=>(u[u.Unknown=0]="Unknown",u[u.None=1]="None",u[u.Gzip=2]="Gzip",u[u.Brotli=3]="Brotli",u[u.Zstd=4]="Zstd",u))(Ya||{});function Xe(u,o){return et(this,null,function*(){if(o===1||o===0)return u;if(o===2){if(typeof globalThis.DecompressionStream>"u")return yo(new Uint8Array(u));let r=new Response(u).body;if(!r)throw new Error("Failed to read response stream");let l=r.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(l).arrayBuffer()}throw new Error("Compression method not supported")})}H(Xe,"defaultDecompress");var Ka=(u=>(u[u.Unknown=0]="Unknown",u[u.Mvt=1]="Mvt",u[u.Png=2]="Png",u[u.Jpeg=3]="Jpeg",u[u.Webp=4]="Webp",u[u.Avif=5]="Avif",u[u.Mlt=6]="Mlt",u))(Ka||{});function ko(u){return u===1?".mvt":u===2?".png":u===3?".jpg":u===4?".webp":u===5?".avif":u===6?".mlt":""}H(ko,"tileTypeExt");var $a=127;function To(u,o){let r=0,l=u.length-1;for(;r<=l;){let h=l+r>>1,d=o-u[h].tileId;if(d>0)r=h+1;else if(d<0)l=h-1;else return u[h]}return l>=0&&(u[l].runLength===0||o-u[l].tileId<u[l].runLength)?u[l]:null}H(To,"findTile");var Xa=class{constructor(o){this.file=o}getKey(){return this.file.name}getBytes(o,r){return et(this,null,function*(){return{data:yield this.file.slice(o,o+r).arrayBuffer()}})}};H(Xa,"FileSource");var Po=class{constructor(o,r=new Headers){var l,h;this.url=o,this.customHeaders=r,this.mustReload=!1;let d="";"navigator"in globalThis&&(d=(h=(l=globalThis.navigator)==null?void 0:l.userAgent)!=null?h:"");let f=d.indexOf("Windows")>-1,g=/Chrome|Chromium|Edg|OPR|Brave/.test(d);this.chromeWindowsNoCache=!1,f&&g&&(this.chromeWindowsNoCache=!0)}getKey(){return this.url}setHeaders(o){this.customHeaders=o}getBytes(o,r,l,h){return et(this,null,function*(){let d,f;l?f=l:(d=new AbortController,f=d.signal);let g=new Headers(this.customHeaders);g.set("range",`bytes=${o}-${o+r-1}`);let _;this.mustReload?_="reload":this.chromeWindowsNoCache&&(_="no-store");let b=yield fetch(this.url,{signal:f,cache:_,headers:g});if(o===0&&b.status===416){let w=b.headers.get("Content-Range");if(!w||!w.startsWith("bytes */"))throw new Error("Missing content-length on 416 response");let O=+w.substr(8);b=yield fetch(this.url,{signal:f,cache:"reload",headers:{range:`bytes=0-${O-1}`}})}let x=b.headers.get("Etag");if(x!=null&&x.startsWith("W/")&&(x=null),b.status===416||h&&x&&x!==h)throw this.mustReload=!0,new Ri(`Server returned non-matching ETag ${h} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);if(b.status>=300)throw new Error(`Bad response code: ${b.status}`);let v=b.headers.get("Content-Length");if(b.status===200&&(!v||+v>r))throw d&&d.abort(),new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield b.arrayBuffer(),etag:x||void 0,cacheControl:b.headers.get("Cache-Control")||void 0,expires:b.headers.get("Expires")||void 0}})}};H(Po,"FetchSource");var Ja=Po;function ft(u,o){let r=u.getUint32(o+4,!0),l=u.getUint32(o+0,!0);return r*Fa(2,32)+l}H(ft,"getUint64");function zo(u,o){let r=new DataView(u),l=r.getUint8(7);if(l>3)throw new Error(`Archive is spec version ${l} but this library supports up to spec version 3`);return{specVersion:l,rootDirectoryOffset:ft(r,8),rootDirectoryLength:ft(r,16),jsonMetadataOffset:ft(r,24),jsonMetadataLength:ft(r,32),leafDirectoryOffset:ft(r,40),leafDirectoryLength:ft(r,48),tileDataOffset:ft(r,56),tileDataLength:ft(r,64),numAddressedTiles:ft(r,72),numTileEntries:ft(r,80),numTileContents:ft(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:o}}H(zo,"bytesToHeader");function Hi(u){let o={buf:new Uint8Array(u),pos:0},r=ae(o),l=[],h=0;for(let d=0;d<r;d++){let f=ae(o);l.push({tileId:h+f,offset:0,length:0,runLength:1}),h+=f}for(let d=0;d<r;d++)l[d].runLength=ae(o);for(let d=0;d<r;d++)l[d].length=ae(o);for(let d=0;d<r;d++){let f=ae(o);f===0&&d>0?l[d].offset=l[d-1].offset+l[d-1].length:l[d].offset=f-1}return l}H(Hi,"deserializeIndex");var Co=class extends Error{};H(Co,"EtagMismatch");var Ri=Co;function Ui(u,o){return et(this,null,function*(){let r=yield u.getBytes(0,16384);if(new DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");let l=r.data.slice(0,$a),h=zo(l,r.etag),d=r.data.slice(h.rootDirectoryOffset,h.rootDirectoryOffset+h.rootDirectoryLength),f=`${u.getKey()}|${h.etag||""}|${h.rootDirectoryOffset}|${h.rootDirectoryLength}`,g=Hi(yield o(d,h.internalCompression));return[h,[f,g.length,g]]})}H(Ui,"getHeaderAndRoot");function ji(u,o,r,l,h){return et(this,null,function*(){let d=yield u.getBytes(r,l,void 0,h.etag),f=yield o(d.data,h.internalCompression),g=Hi(f);if(g.length===0)throw new Error("Empty directory is invalid");return g})}H(ji,"getDirectory");var Qa=class{constructor(o=100,r=!0,l=Xe){this.cache=new Map,this.maxCacheEntries=o,this.counter=1,this.decompress=l}getHeader(o){return et(this,null,function*(){let r=o.getKey(),l=this.cache.get(r);if(l)return l.lastUsed=this.counter++,l.data;let h=yield Ui(o,this.decompress);return h[1]&&this.cache.set(h[1][0],{lastUsed:this.counter++,data:h[1][2]}),this.cache.set(r,{lastUsed:this.counter++,data:h[0]}),this.prune(),h[0]})}getDirectory(o,r,l,h){return et(this,null,function*(){let d=`${o.getKey()}|${h.etag||""}|${r}|${l}`,f=this.cache.get(d);if(f)return f.lastUsed=this.counter++,f.data;let g=yield ji(o,this.decompress,r,l,h);return this.cache.set(d,{lastUsed:this.counter++,data:g}),this.prune(),g})}prune(){if(this.cache.size>this.maxCacheEntries){let o=1/0,r;this.cache.forEach((l,h)=>{l.lastUsed<o&&(o=l.lastUsed,r=h)}),r&&this.cache.delete(r)}}invalidate(o){return et(this,null,function*(){this.cache.delete(o.getKey())})}};H(Qa,"ResolvedValueCache");var Eo=class{constructor(o=100,r=!0,l=Xe){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=o,this.counter=1,this.decompress=l}getHeader(o){return et(this,null,function*(){let r=o.getKey(),l=this.cache.get(r);if(l)return l.lastUsed=this.counter++,yield l.data;let h=new Promise((d,f)=>{Ui(o,this.decompress).then(g=>{g[1]&&this.cache.set(g[1][0],{lastUsed:this.counter++,data:Promise.resolve(g[1][2])}),d(g[0]),this.prune()}).catch(g=>{f(g)})});return this.cache.set(r,{lastUsed:this.counter++,data:h}),h})}getDirectory(o,r,l,h){return et(this,null,function*(){let d=`${o.getKey()}|${h.etag||""}|${r}|${l}`,f=this.cache.get(d);if(f)return f.lastUsed=this.counter++,yield f.data;let g=new Promise((_,b)=>{ji(o,this.decompress,r,l,h).then(x=>{_(x),this.prune()}).catch(x=>{b(x)})});return this.cache.set(d,{lastUsed:this.counter++,data:g}),g})}prune(){if(this.cache.size>=this.maxCacheEntries){let o=1/0,r;this.cache.forEach((l,h)=>{l.lastUsed<o&&(o=l.lastUsed,r=h)}),r&&this.cache.delete(r)}}invalidate(o){return et(this,null,function*(){let r=o.getKey();if(this.invalidations.get(r))return yield this.invalidations.get(r);this.cache.delete(o.getKey());let l=new Promise((h,d)=>{this.getHeader(o).then(f=>{h(),this.invalidations.delete(r)}).catch(f=>{d(f)})});this.invalidations.set(r,l)})}};H(Eo,"SharedPromiseCache");var ts=Eo,Io=class{constructor(o,r,l){typeof o=="string"?this.source=new Ja(o):this.source=o,l?this.decompress=l:this.decompress=Xe,r?this.cache=r:this.cache=new ts}getHeader(){return et(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(o,r,l,h){return et(this,null,function*(){let d=Lo(o,r,l),f=yield this.cache.getHeader(this.source);if(o<f.minZoom||o>f.maxZoom)return;let g=f.rootDirectoryOffset,_=f.rootDirectoryLength;for(let b=0;b<=3;b++){let x=yield this.cache.getDirectory(this.source,g,_,f),v=To(x,d);if(v){if(v.runLength>0){let w=yield this.source.getBytes(f.tileDataOffset+v.offset,v.length,h,f.etag);return{data:yield this.decompress(w.data,f.tileCompression),cacheControl:w.cacheControl,expires:w.expires}}g=f.leafDirectoryOffset+v.offset,_=v.length}else return}throw new Error("Maximum directory depth exceeded")})}getZxy(o,r,l,h){return et(this,null,function*(){try{return yield this.getZxyAttempt(o,r,l,h)}catch(d){if(d instanceof Ri)return this.cache.invalidate(this.source),yield this.getZxyAttempt(o,r,l,h);throw d}})}getMetadataAttempt(){return et(this,null,function*(){let o=yield this.cache.getHeader(this.source),r=yield this.source.getBytes(o.jsonMetadataOffset,o.jsonMetadataLength,void 0,o.etag),l=yield this.decompress(r.data,o.internalCompression),h=new TextDecoder("utf-8");return JSON.parse(h.decode(l))})}getMetadata(){return et(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(o){if(o instanceof Ri)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw o}})}getTileJson(o){return et(this,null,function*(){let r=yield this.getHeader(),l=yield this.getMetadata(),h=ko(r.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${o}/{z}/{x}/{y}${h}`],vector_layers:l.vector_layers,attribution:l.attribution,description:l.description,name:l.name,version:l.version,bounds:[r.minLon,r.minLat,r.maxLon,r.maxLat],center:[r.centerLon,r.centerLat,r.centerZoom],minzoom:r.minZoom,maxzoom:r.maxZoom}})}};H(Io,"PMTiles");var $e=Io;var Je={TEMP:"temp",DRAFTS:"drafts",ORIGINALS:"originals",PROCESSED:"processed"},Ao=4;var Zt={WIDTH:30,HEIGHT:40,ANCHOR_X:16,ANCHOR_Y:36};function Zo(u,o,r){if(u<=0||o<=0||r<0)return 0;let l=u*Math.pow(2,r);return Math.ceil(l/o)}function So(u,o,r,l){return{tileX:Zo(u,r,l),tileY:Zo(o,r,l)}}function Wi(u){return`${Je.PROCESSED}/${u}/preview/preview.webp`}function Fi(u){return`${Je.PROCESSED}/${u}/preview/thumbnail.webp`}function Vi(u){return`${Je.PROCESSED}/${u}/annotated/preview/preview.webp`}function qi(u){return`${Je.PROCESSED}/${u}/annotated/preview/thumbnail.webp`}function Oo(u,o,r,l){return u.replace("{z}",String(o)).replace("{x}",String(r)).replace("{y}",String(l))}function Bo(u,o){return[[0,0],[o,u]]}function Qe(u){return u.includes("{z}")&&u.includes("{x}")&&u.includes("{y}")}function Do(u){return u.endsWith(".pmtiles")}var Te=class{config;tileLayer=null;constructor(o){if(!o)throw new Error("Tile configuration is required");if(!o.imageInfo)throw new Error("Image info is required");if(!o.tileUrl&&!o.pmtilesUrl)throw new Error("Either tileUrl or pmtilesUrl is required");if(o.tileUrl&&!Qe(o.tileUrl))throw new Error("Tile URL template must contain {z}, {x}, and {y} placeholders");if(o.pmtilesUrl&&!Do(o.pmtilesUrl))throw new Error("PMTiles URL must end with .pmtiles");this.config=o}createTileLayer(o){if(this.tileLayer)return console.warn("Tile layer already created. Use removeTileLayer() first."),this.tileLayer;try{let{imageInfo:r,keepBuffer:l,updateInterval:h}=this.config,d=this.calculateTileBounds(),f={minZoom:r.minZoom,maxZoom:r.maxZoom,maxNativeZoom:r.maxZoom,tileSize:r.tileSize,bounds:d,noWrap:!0,keepBuffer:l??4,updateWhenIdle:!1,updateWhenZooming:!0,updateInterval:h??50,opacity:1,className:"seamless-tiles"};if(this.config.pmtilesUrl){let g=new $e(this.config.pmtilesUrl);if(r.minZoom===0){let b=g.getZxy.bind(g);g.getZxy=(x,v,w,O)=>b(x+1,v,w,O)}this.tileLayer=xo(g,f)}else{let g=this.config.tileUrl;if(!g)throw new Error("Tile URL is required in XYZ mode");this.tileLayer=nt.tileLayer(g,f)}return o&&this.setupEventListeners(o),console.log("TileLayerManager: Tile layer created successfully",{bounds:d,tileSize:r.tileSize,zoomRange:[r.minZoom,r.maxZoom]}),this.tileLayer}catch(r){let l=r instanceof Error?r.message:"Unknown error";throw new Error(`Failed to create tile layer: ${l}`)}}calculateTileBounds(){let{width:o,height:r}=this.config.imageInfo;return Bo(o,r)}calculateGridSize(o){let{width:r,height:l,tileSize:h}=this.config.imageInfo;return So(r,l,h,o)}getTileUrl(o,r,l){if(!this.config.tileUrl)throw new Error("getTileUrl is only supported in XYZ mode");return Oo(this.config.tileUrl,o,r,l)}getTileLayer(){return this.tileLayer}removeTileLayer(o){this.tileLayer&&(o&&o.removeLayer(this.tileLayer),this.tileLayer=null,console.log("TileLayerManager: Tile layer removed"))}setupEventListeners(o){this.tileLayer&&(this.tileLayer.on("tileloadstart",r=>{console.debug("Tile loading started",{url:r.tile.src})}),this.tileLayer.on("tileload",()=>{console.debug("Tile loaded successfully")}),this.tileLayer.on("tileerror",r=>{console.warn("Tile loading error",{url:r.tile.src,error:r.error})}))}getImageInfo(){return this.config.imageInfo}getConfig(){return this.config}};var Pe=class{imageInfo;constructor(o){if(!o)throw new Error("Image info is required");if(o.width<=0||o.height<=0)throw new Error("Image width and height must be greater than 0");if(o.tileSize<=0)throw new Error("Tile size must be greater than 0");this.imageInfo=o}calculateImagePosition(){let o=this.imageInfo.tileSize||256,h=(this.imageInfo.minZoom||0)===0?o*2:o,d=h,f=h,g=this.imageInfo.width/this.imageInfo.height,_=d/f,b,x,v,w;return g>_?(b=d,x=d/g,v=0,w=(f-x)/2):(b=f*g,x=f,v=(d-b)/2,w=0),{imageRenderWidth:b,imageRenderHeight:x,imageOffsetX:v,imageOffsetY:w,canvasWidth:d,canvasHeight:f}}leafletToImage(o){this.validateLeafletCoords(o);let{imageRenderWidth:r,imageRenderHeight:l,imageOffsetX:h,imageOffsetY:d}=this.calculateImagePosition(),f=o[1],g=o[0],_=(f-h)/r,b=(g-d)/l,x=_*this.imageInfo.width,v=b*this.imageInfo.height,w=_>=0&&_<=1&&b>=0&&b<=1;return{x,y:v,withinBounds:w}}imageToLeaflet(o){this.validateImageCoords(o);let{imageRenderWidth:r,imageRenderHeight:l,imageOffsetX:h,imageOffsetY:d}=this.calculateImagePosition(),f=o.x/this.imageInfo.width,g=o.y/this.imageInfo.height,_=f*r+h;return[g*l+d,_]}getImageCenter(){let{imageRenderWidth:o,imageRenderHeight:r,imageOffsetX:l,imageOffsetY:h}=this.calculateImagePosition(),d=l+o/2,f=h+r/2;return{x:d,y:f}}calculateMapBounds(){let o=this.imageInfo.tileSize||256,h=(this.imageInfo.minZoom||0)===0?o*2:o;return nt.latLngBounds([0,0],[h,h])}validateLeafletCoords(o){if(!Array.isArray(o)||o.length!==2)throw new Error("Leaflet coordinates must be an array of 2 numbers [y, x]");let[r,l]=o;if(typeof r!="number"||typeof l!="number")throw new Error("Leaflet coordinates must be numbers");if(isNaN(r)||isNaN(l)||!isFinite(r)||!isFinite(l))throw new Error("Leaflet coordinates must be finite numbers")}validateImageCoords(o){if(!o||typeof o!="object"||Array.isArray(o))throw new Error("Image coordinates must be an object with x and y properties");let{x:r,y:l}=o;if(typeof r!="number"||typeof l!="number")throw new Error("Image coordinates x and y must be numbers");if(isNaN(r)||isNaN(l)||!isFinite(r)||!isFinite(l))throw new Error("Image coordinates must be finite numbers");if(r<0||r>this.imageInfo.width)throw new Error(`Image x coordinate (${r}) is out of bounds [0, ${this.imageInfo.width}]`);if(l<0||l>this.imageInfo.height)throw new Error(`Image y coordinate (${l}) is out of bounds [0, ${this.imageInfo.height}]`)}createCustomCRS(){return nt.extend({},nt.CRS.Simple,{transformation:new nt.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(o){try{return this.validateImageCoords(o),!0}catch{return!1}}clampToBounds(o){return{x:Math.max(0,Math.min(this.imageInfo.width,o.x)),y:Math.max(0,Math.min(this.imageInfo.height,o.y))}}calculateCenterOffset(o,r,l){if(this.validateImageCoords(o),r<=0||l<=0)throw new Error("Container width and height must be greater than 0");return{x:o.x-r/2,y:o.y-l/2}}};var ze=class{map;imageInfo;config;zoomState;zoomChangeListeners=new Set;constructor(o){if(!o.map)throw new Error("Leaflet map instance is required");if(!o.imageInfo)throw new Error("Image info is required");if(o.imageInfo.width<=0||o.imageInfo.height<=0)throw new Error("Image width and height must be greater than 0");this.map=o.map,this.imageInfo=o.imageInfo;let r=this.calculateMaxZoomFromDimensions(),l=o.config?.minZoom??o.imageInfo.minZoom??0,h=o.config?.maxZoom??o.imageInfo.maxZoom??r;if(l<0)throw new Error("Minimum zoom must be >= 0");if(h<l)throw new Error("Maximum zoom must be >= minimum zoom");this.config={minZoom:l,maxZoom:h,initialZoom:o.config?.initialZoom,zoomSnap:o.config?.zoomSnap??1,zoomDelta:o.config?.zoomDelta??1};let d=this.map.getZoom();this.zoomState={currentZoom:this.constrainZoom(d),minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.setupZoomListeners()}calculateMaxZoomFromDimensions(){let{width:o,height:r,tileSize:l=256}=this.imageInfo,h=Math.max(o,r),d=Math.floor(Math.log2(h/l)),g=Math.floor(Math.log2(16383/l))-1,_=Math.min(d,g,Ao);return Math.max(0,_)}calculateOptimalInitialZoom(){if(typeof window>"u")return this.config.minZoom;let o=window.innerWidth,r;return o<=768?r=this.config.minZoom:r=Math.min(this.config.minZoom+1,this.config.maxZoom),this.constrainZoom(r)}constrainZoom(o){return Math.max(this.config.minZoom,Math.min(this.config.maxZoom,Math.round(o)))}isValidZoom(o){return Number.isInteger(o)&&o>=this.config.minZoom&&o<=this.config.maxZoom}zoomIn(o){let r=this.map.getZoom(),l=this.config.zoomDelta??1,h=this.constrainZoom(r+l);return h===r?!1:(this.setZoom(h,o),!0)}zoomOut(o){let r=this.map.getZoom(),l=this.config.zoomDelta??1,h=this.constrainZoom(r-l);return h===r?!1:(this.setZoom(h,o),!0)}setZoom(o,r){if(!Number.isFinite(o))throw new Error(`Invalid zoom level: ${o}. Must be a finite number between ${this.config.minZoom} and ${this.config.maxZoom}`);let l=this.constrainZoom(o),h=r?.animate!==!1;this.map.setZoom(l,{animate:h})}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(o){return this.zoomChangeListeners.add(o),()=>{this.zoomChangeListeners.delete(o)}}removeAllListeners(){this.zoomChangeListeners.clear()}setupZoomListeners(){let o=()=>{let r=this.map.getZoom(),l=this.constrainZoom(r);if(r!==l){this.map.setView(this.map.getCenter(),l,{animate:!1});return}this.zoomState={currentZoom:l,minZoom:this.config.minZoom,maxZoom:this.config.maxZoom},this.zoomChangeListeners.forEach(h=>{h(this.zoomState)})};this.map.on("zoomend",o),this.map.on("zoom",o),o()}dispose(){this.removeAllListeners()}};var Dt=null;function Ro(u){Dt&&Dt.parentElement&&(Dt.parentElement.removeChild(Dt),Dt=null);let{marker:o,onSave:r,onCancel:l}=u,h=U=>U?U.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):"",d=document.createElement("div");d.className="edgepdf-marker-edit-popup",d.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">
|
|
@@ -14,7 +14,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
14
14
|
type="text"
|
|
15
15
|
id="marker-edit-title"
|
|
16
16
|
class="edgepdf-marker-edit-input"
|
|
17
|
-
value="${
|
|
17
|
+
value="${h(o.label)}"
|
|
18
18
|
placeholder="Enter label"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
@@ -24,7 +24,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
24
24
|
type="url"
|
|
25
25
|
id="marker-edit-url"
|
|
26
26
|
class="edgepdf-marker-edit-input"
|
|
27
|
-
value="${
|
|
27
|
+
value="${h(o.href)}"
|
|
28
28
|
placeholder="Enter URL"
|
|
29
29
|
/>
|
|
30
30
|
</div>
|
|
@@ -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=
|
|
37
|
+
`;let f=d.querySelector(".edgepdf-marker-edit-popup-overlay"),g=d.querySelector(".edgepdf-marker-edit-popup-close"),_=d.querySelector(".edgepdf-marker-edit-button-cancel"),b=d.querySelector(".edgepdf-marker-edit-button-save"),x=d.querySelector("#marker-edit-title"),v=d.querySelector("#marker-edit-url"),w=U=>{U.key==="Escape"&&(O(),l())};document.addEventListener("keydown",w);let O=()=>{document.removeEventListener("keydown",w),d.parentElement&&d.parentElement.removeChild(d),Dt===d&&(Dt=null)},I=()=>{O(),l()};f.addEventListener("click",U=>{U.stopPropagation(),I()}),g.addEventListener("click",U=>{U.stopPropagation(),I()}),_.addEventListener("click",U=>{U.stopPropagation(),I()}),b.addEventListener("click",U=>{U.stopPropagation();let xt={label:x.value.trim()||void 0,href:v.value.trim()||void 0};r(xt),O()});let T=U=>{U.key==="Enter"&&b.click()};return x.addEventListener("keydown",T),v.addEventListener("keydown",T),document.body.appendChild(d),Dt=d,setTimeout(()=>{x.focus(),x.select()},0),d}var Rt=null;function No(u){Rt&&Rt.parentElement&&(Rt.parentElement.removeChild(Rt),Rt=null);let{marker:o,onConfirm:r,onCancel:l}=u,h=I=>{if(!I)return"";let T=document.createElement("div");return T.textContent=I,T.innerHTML},d=o.label||o.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">
|
|
@@ -42,24 +42,24 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
42
42
|
<button class="edgepdf-marker-delete-popup-close" aria-label="Close">\xD7</button>
|
|
43
43
|
</div>
|
|
44
44
|
<div class="edgepdf-marker-delete-popup-body">
|
|
45
|
-
<p>Are you sure you want to delete <strong>${
|
|
45
|
+
<p>Are you sure you want to delete <strong>${h(d)}</strong>? This action cannot be undone.</p>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="edgepdf-marker-delete-popup-footer">
|
|
48
48
|
<button class="edgepdf-marker-delete-button edgepdf-marker-delete-button-cancel">Cancel</button>
|
|
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),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=`
|
|
52
|
+
`;let g=f.querySelector(".edgepdf-marker-delete-popup-overlay"),_=f.querySelector(".edgepdf-marker-delete-popup-close"),b=f.querySelector(".edgepdf-marker-delete-button-cancel"),x=f.querySelector(".edgepdf-marker-delete-button-confirm"),v=I=>{I.key==="Escape"&&(w(),l())};document.addEventListener("keydown",v);let w=()=>{document.removeEventListener("keydown",v),f.parentElement&&f.parentElement.removeChild(f),Rt===f&&(Rt=null)},O=()=>{w(),l()};return g.addEventListener("click",I=>{I.stopPropagation(),O()}),_.addEventListener("click",I=>{I.stopPropagation(),O()}),b.addEventListener("click",I=>{I.stopPropagation(),O()}),x.addEventListener("click",I=>{I.stopPropagation(),w(),r()}),document.body.appendChild(f),Rt=f,setTimeout(()=>{b.focus()},0),f}var Ce=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(o){if(!o.map)throw new Error("Map instance is required");if(!o.coordinateMapper)throw new Error("Coordinate mapper is required");if(!o.imageInfo)throw new Error("Image info is required");this.map=o.map,this.coordinateMapper=o.coordinateMapper,this.imageInfo=o.imageInfo,this.markerLayerGroup=nt.layerGroup().addTo(this.map)}createMarker(o){if(!o.position&&!o.imageCoords)throw new Error("Either position or imageCoords must be provided");let r,l;if(o.position){r=o.position;let _=this.coordinateMapper.leafletToImage(r);if(!_.withinBounds)throw new Error(`Leaflet coordinates [${r[0]}, ${r[1]}] are out of bounds`);l={x:_.x,y:_.y}}else if(o.imageCoords){if(l=o.imageCoords,l.x<0||l.x>this.imageInfo.width||l.y<0||l.y>this.imageInfo.height)throw new Error(`Image coordinates {x: ${l.x}, y: ${l.y}} are out of bounds`);r=this.coordinateMapper.imageToLeaflet(l)}else throw new Error("Either position or imageCoords must be provided");let h=this.map.getZoom(),d=o.id||this.generateMarkerId(),f={id:d,position:r,x:l.x,y:l.y,zoom:h,label:o.label,description:o.description,href:o.href,target:o.target,showLabel:o.showLabel??!0,iconType:o.iconType||"pin-gray",referenceId:o.referenceId,draggable:o.draggable,editable:o.editable,deletable:o.deletable};this.validateMarker(f);let g=this.createLeafletMarker(f);return this.setupMarkerInteractions(g,f),this.markers.set(d,f),this.leafletMarkers.set(d,g),this.markerLayerGroup.addLayer(g),f}getMarker(o){return this.markers.get(o)||null}getAllMarkers(){return Array.from(this.markers.values())}exportMarkers(){return{markers:this.getAllMarkers(),exportedAt:new Date().toISOString(),version:"1.0.0"}}importMarkers(o,r={}){let{clearExisting:l=!1,validateCoordinates:h=!0}=r,d=[];if(!o||typeof o!="object")throw new Error("Invalid marker data: data must be an object");if(!Array.isArray(o.markers))throw new Error("Invalid marker data: markers must be an array");l&&this.removeAllMarkers();let f=0;for(let g=0;g<o.markers.length;g++){let _=o.markers[g];try{this.validateMarkerData(_),h&&this.validateMarkerCoordinates(_),this.createMarker({id:_.id,imageCoords:{x:_.x,y:_.y},label:_.label,description:_.description,href:_.href,target:_.target,showLabel:_.showLabel,iconType:_.iconType,referenceId:_.referenceId,draggable:_.draggable,editable:_.editable,deletable:_.deletable}),f++}catch(b){let x=b instanceof Error?b.message:"Unknown error";d.push(`Marker ${g+1} (${_.id||"unknown"}): ${x}`)}}return{success:d.length===0,importedCount:f,errors:d}}removeMarker(o){let r=this.markers.get(o),l=this.leafletMarkers.get(o);return!r||!l?!1:(this.markerLayerGroup.removeLayer(l),this.removeActiveMarkerOverlay(o),this.activeMarkerId===o&&this.setActiveMarker(null),this.markers.delete(o),this.leafletMarkers.delete(o),!0)}removeAllMarkers(){this.markerLayerGroup.clearLayers(),this.markers.clear(),this.leafletMarkers.clear(),this.activeMarkerOverlays.clear(),this.setActiveMarker(null)}updateMarkerPosition(o,r){let l=this.markers.get(o),h=this.leafletMarkers.get(o);if(!l||!h)return!1;let d=this.coordinateMapper.leafletToImage(r);if(!d.withinBounds)throw new Error(`Leaflet coordinates [${r[0]}, ${r[1]}] are out of bounds`);l.position=r,l.x=d.x,l.y=d.y,l.zoom=this.map.getZoom(),h.setLatLng([r[0],r[1]]);let f=this.activeMarkerOverlays.get(o);return f&&f.setLatLng([r[0],r[1]]),!0}updateMarker(o,r){let l=this.markers.get(o),h=this.leafletMarkers.get(o);if(!l||!h)return!1;if(r.label!==void 0&&(l.label=r.label),r.description!==void 0&&(l.description=r.description),r.href!==void 0&&(l.href=r.href),r.target!==void 0&&(l.target=r.target),r.showLabel!==void 0&&(l.showLabel=r.showLabel),r.iconType!==void 0){l.iconType=r.iconType;let d=this.createCustomIcon(r.iconType);h.setIcon(d)}if(r.referenceId!==void 0&&(l.referenceId=r.referenceId),r.draggable!==void 0){l.draggable=r.draggable;let d=l.draggable!==void 0?l.draggable:this.interactionConfig.draggable??!1;h.dragging&&(d?h.dragging.enable():h.dragging.disable()),this.setupMarkerInteractions(h,l)}return r.editable!==void 0&&(l.editable=r.editable),r.deletable!==void 0&&(l.deletable=r.deletable),this.updateLeafletMarkerDisplay(h,l),!0}getMarkerCount(){return this.markers.size}hasMarker(o){return this.markers.has(o)}setInteractionConfig(o){this.interactionConfig={...this.interactionConfig,...o},this.leafletMarkers.forEach((r,l)=>{let h=this.markers.get(l);if(h){let d=h.draggable!==void 0?h.draggable:this.interactionConfig.draggable??!1;if(r.dragging&&(d?r.dragging.enable():r.dragging.disable()),this.setupMarkerInteractions(r,h),this.interactionConfig.showPopups){let f=this.createPopupContent(h);r.setPopupContent(f)}}})}getInteractionConfig(){return{...this.interactionConfig}}selectMarker(o){let r=this.markers.get(o);return r?(this.interactionConfig.multiSelect||this.deselectAllMarkers(),this.selectedIds.add(o),this.updateMarkerSelectionVisual(o,!0),this.emitEvent("select",r,void 0),this.setActiveMarker(o),!0):!1}deselectMarker(o){let r=this.markers.get(o);return r?(this.selectedIds.delete(o),this.updateMarkerSelectionVisual(o,!1),this.emitEvent("deselect",r,void 0),this.activeMarkerId===o&&this.setActiveMarker(null),!0):!1}deselectAllMarkers(){let o=Array.from(this.selectedIds);this.selectedIds.clear(),o.forEach(r=>{let l=this.markers.get(r);l&&(this.updateMarkerSelectionVisual(r,!1),this.emitEvent("deselect",l,void 0))}),this.setActiveMarker(null)}getSelectionState(){return{selectedIds:Array.from(this.selectedIds),multiSelect:this.interactionConfig.multiSelect??!1}}isMarkerSelected(o){return this.selectedIds.has(o)}setActiveMarker(o){if(o===null){let h=this.activeMarkerId;if(this.activeMarkerId=null,h){this.removeActiveMarkerOverlay(h);let d=this.leafletMarkers.get(h);d&&d.isPopupOpen()&&d.closePopup()}return this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(null),!0}let r=this.markers.get(o);if(!r)return!1;if(this.activeMarkerId&&this.activeMarkerId!==o){this.removeActiveMarkerOverlay(this.activeMarkerId);let h=this.leafletMarkers.get(this.activeMarkerId);h&&h.isPopupOpen()&&h.closePopup()}let l=this.leafletMarkers.get(o);return l&&l.isPopupOpen()&&l.closePopup(),this.activeMarkerId=o,this.addActiveMarkerOverlay(o),this.interactionConfig.onActiveMarkerChange&&this.interactionConfig.onActiveMarkerChange(r),!0}getActiveMarker(){return this.activeMarkerId&&this.markers.get(this.activeMarkerId)||null}deleteMarker(o){let r=this.markers.get(o);return r?(this.emitEvent("delete",r,void 0),this.removeMarker(o)):!1}on(o,r){this.eventListeners.has(o)||this.eventListeners.set(o,new Set);let l=this.eventListeners.get(o);return l&&l.add(r),()=>{this.off(o,r)}}off(o,r){let l=this.eventListeners.get(o);l&&l.delete(r)}removeAllListeners(o){o?this.eventListeners.delete(o):this.eventListeners.clear()}setDefaultIconType(o){this.defaultIconType=o}getDefaultIconType(){return this.defaultIconType}setIconBasePath(o){this.iconBasePath=o.endsWith("/")?o:`${o}/`}getIconBasePath(){return this.iconBasePath}updateMarkerIcon(o,r){let l=this.markers.get(o),h=this.leafletMarkers.get(o);if(!l||!h)return!1;l.iconType=r;let d=this.createCustomIcon(r);return h.setIcon(d),!0}updateAllMarkerIcons(o){this.markers.forEach((r,l)=>{this.updateMarkerIcon(l,o)})}focusMarker(o,r){let l=null;if(typeof o=="string"?l=this.getMarker(o):l=o,!l)return console.warn(`Marker not found: ${o}`),!1;let h=r?.zoom??l.zoom??2,d=this.imageInfo.minZoom??0,f=this.imageInfo.maxZoom??5,g=Math.max(d,Math.min(f,h)),_=[l.position[0],l.position[1]],b=r?.animate!==!1,x=r?.duration??.5,v=(r?.offsetRight??0)-(r?.offsetLeft??0),w=(r?.offsetBottom??0)-(r?.offsetTop??0);if(v!==0||w!==0){let O=this.map.getZoom(),I=O!==g;I&&this.map.setZoom(g,{animate:!1});let T=this.map.latLngToContainerPoint(_),U=nt.point(T.x+v,T.y+w),xt=this.map.containerPointToLatLng(U);I&&b&&this.map.setZoom(O,{animate:!1}),b?this.map.flyTo(xt,g,{duration:x}):this.map.setView(xt,g)}else b?this.map.flyTo(_,g,{duration:x}):this.map.setView(_,g);return!0}dispose(){this.removeAllListeners(),this.removeAllMarkers(),this.markerLayerGroup&&this.map.removeLayer(this.markerLayerGroup)}createCustomIcon(o){let r=`${this.iconBasePath}${o}.png`;return nt.icon({iconUrl:r,iconSize:[Zt.WIDTH,Zt.HEIGHT],iconAnchor:[Zt.ANCHOR_X,Zt.ANCHOR_Y],popupAnchor:[0,0],shadowUrl:void 0,shadowSize:void 0,shadowAnchor:void 0})}createLeafletMarker(o){let r=o.iconType||"pin-gray",l=this.createCustomIcon(r),h={title:o.label,icon:l};(o.draggable!==void 0?o.draggable:this.interactionConfig.draggable??!1)&&(h.draggable=!0);let f=nt.marker([o.position[0],o.position[1]],h);if(this.interactionConfig.showTooltips&&o.label&&o.showLabel&&f.bindTooltip(o.label,{permanent:!1,direction:"top",offset:[0,-30],className:"edgepdf-marker-tooltip"}),this.interactionConfig.showPopups){let g=this.createPopupContent(o);f.bindPopup(g)}return f}setupMarkerInteractions(o,r){o.off("click"),o.off("dragstart"),o.off("drag"),o.off("dragend"),o.on("click",()=>{this.handleMarkerClick(r)}),(r.draggable!==void 0?r.draggable:this.interactionConfig.draggable??!1)&&(o.on("dragstart",()=>{this.emitEvent("dragstart",r,r.position)}),o.on("drag",()=>{let h=[o.getLatLng().lat,o.getLatLng().lng];this.emitEvent("drag",r,h)}),o.on("dragend",()=>{let h=[o.getLatLng().lat,o.getLatLng().lng];try{this.updateMarkerPosition(r.id,h),this.emitEvent("dragend",r,h)}catch(d){o.setLatLng([r.position[0],r.position[1]]),console.warn("Marker drag ended at invalid position, reverted",d)}}))}handleMarkerClick(o){this.emitEvent("click",o,o.position),this.setActiveMarker(o.id);let r=this.leafletMarkers.get(o.id);r&&r.isPopupOpen()&&r.closePopup(),this.interactionConfig.selectable&&(this.selectedIds.has(o.id)?this.deselectMarker(o.id):this.selectMarker(o.id))}updateMarkerSelectionVisual(o,r){}addActiveMarkerOverlay(o){this.removeActiveMarkerOverlay(o);let r=this.markers.get(o),l=this.leafletMarkers.get(o);if(!r||!l)return;let h=40,d=1,f=Zt.WIDTH/2-Zt.ANCHOR_X,g=Zt.HEIGHT/2-Zt.ANCHOR_Y,_=h/2-f,b=h/2-g,x=`
|
|
53
53
|
<div style="
|
|
54
|
-
width: ${
|
|
55
|
-
height: ${
|
|
56
|
-
border: ${
|
|
54
|
+
width: ${h}px;
|
|
55
|
+
height: ${h}px;
|
|
56
|
+
border: ${d}px solid #1976d2;
|
|
57
57
|
border-radius: 4px;
|
|
58
58
|
box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
|
|
59
59
|
pointer-events: none;
|
|
60
60
|
position: relative;
|
|
61
61
|
"></div>
|
|
62
|
-
`,v=
|
|
62
|
+
`,v=nt.marker([r.position[0],r.position[1]],{icon:nt.divIcon({html:x,className:"edgepdf-active-marker-overlay",iconSize:[h,h],iconAnchor:[_,b]}),interactive:!1,zIndexOffset:500});this.activeMarkerOverlays.set(o,v),this.markerLayerGroup.addLayer(v),l.on("drag",()=>{let w=l.getLatLng();v.setLatLng(w)})}removeActiveMarkerOverlay(o){let r=this.activeMarkerOverlays.get(o);r&&(this.markerLayerGroup.removeLayer(r),this.activeMarkerOverlays.delete(o))}emitEvent(o,r,l){let h=this.eventListeners.get(o);if(h){let d={type:o,marker:r,coordinates:l};h.forEach(f=>{try{f(d)}catch(g){console.error(`Error in marker event listener for ${o}:`,g)}})}}escapeHtml(o){if(!o)return"";let r=document.createElement("div");return r.textContent=o,r.innerHTML}createPopupContent(o){let r="";if(o.description){let l=this.escapeHtml(o.description);if(o.href){let h=this.escapeHtml(o.href),d=this.escapeHtml(o.target||"_self");r=`<a href="${h}" target="${d}">${l}</a>`}else r=l}else o.label?r=this.escapeHtml(o.label):r='<span style="color: #666; font-style: italic;">Marker</span>';return!r||r.trim()===""?'<div style="padding: 4px;">Marker</div>':r}updateLeafletMarkerDisplay(o,r){if(this.interactionConfig.showTooltips&&r.label&&r.showLabel?o.getTooltip()?o.setTooltipContent(r.label):o.bindTooltip(r.label,{permanent:!1,direction:"top",offset:[0,-15],className:"edgepdf-marker-tooltip"}):o.unbindTooltip(),this.interactionConfig.showPopups){let l=this.createPopupContent(r);o.setPopupContent(l)}else o.unbindPopup()}async handleEdit(o){if(this.interactionConfig.onEdit){try{let r=await Promise.resolve(this.interactionConfig.onEdit(o));r&&(this.updateMarker(o.id,{label:r.label,href:r.href,description:r.description,target:r.target}),this.emitEvent("edit",r,void 0))}catch(r){console.error("Error in custom edit handler:",r)}return}Ro({marker:o,onSave:r=>{this.updateMarker(o.id,r);let l=this.getMarker(o.id);l&&this.emitEvent("edit",l,void 0)},onCancel:()=>{}})}async handleDelete(o){if(this.interactionConfig.onDelete){try{await Promise.resolve(this.interactionConfig.onDelete(o))&&this.deleteMarker(o.id)}catch(r){console.error("Error in custom delete handler:",r)}return}No({marker:o,onConfirm:()=>{this.deleteMarker(o.id)},onCancel:()=>{}})}handleMarkerEdit(o){this.handleEdit(o)}handleMarkerDelete(o){this.handleDelete(o)}validateMarker(o){if(!o.id||o.id.trim()==="")throw new Error("Marker ID is required");if(!o.position||o.position.length!==2)throw new Error("Marker position must be a valid Leaflet coordinate pair");if(typeof o.x!="number"||typeof o.y!="number")throw new Error("Marker image coordinates must be numbers");if(o.x<0||o.x>this.imageInfo.width)throw new Error(`Marker X coordinate (${o.x}) is out of bounds [0, ${this.imageInfo.width}]`);if(o.y<0||o.y>this.imageInfo.height)throw new Error(`Marker Y coordinate (${o.y}) is out of bounds [0, ${this.imageInfo.height}]`);if(typeof o.zoom!="number"||o.zoom<0)throw new Error("Marker zoom level must be a non-negative number")}validateMarkerData(o){if(!o||typeof o!="object")throw new Error("Marker data must be an object");let r=o;if(!r.id||typeof r.id!="string"||r.id.trim()==="")throw new Error("Marker ID is required and must be a non-empty string");if(typeof r.x!="number"||typeof r.y!="number"||isNaN(r.x)||isNaN(r.y))throw new Error("Marker image coordinates (x, y) must be valid numbers");if(!r.position||!Array.isArray(r.position)||r.position.length!==2||typeof r.position[0]!="number"||typeof r.position[1]!="number")throw new Error("Marker position must be a valid Leaflet coordinate pair [lat, lng]");if(typeof r.zoom!="number"||r.zoom<0)throw new Error("Marker zoom level must be a non-negative number");if(r.label!==void 0&&typeof r.label!="string")throw new Error("Marker label must be a string if provided");if(r.description!==void 0&&typeof r.description!="string")throw new Error("Marker description must be a string if provided");if(r.href!==void 0&&typeof r.href!="string")throw new Error("Marker href must be a string if provided");if(r.target!==void 0&&typeof r.target!="string")throw new Error("Marker target must be a string if provided");if(r.showLabel!==void 0&&typeof r.showLabel!="boolean")throw new Error("Marker showLabel must be a boolean if provided")}validateMarkerCoordinates(o){if(o.x<0||o.x>this.imageInfo.width)throw new Error(`Marker X coordinate (${o.x}) is out of bounds [0, ${this.imageInfo.width}]`);if(o.y<0||o.y>this.imageInfo.height)throw new Error(`Marker Y coordinate (${o.y}) is out of bounds [0, ${this.imageInfo.height}]`);if(!this.coordinateMapper.leafletToImage(o.position).withinBounds)throw new Error(`Marker Leaflet coordinates [${o.position[0]}, ${o.position[1]}] are out of bounds`)}generateMarkerId(){return`marker-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}};function Ho(){return`
|
|
63
63
|
<svg
|
|
64
64
|
xmlns="http://www.w3.org/2000/svg"
|
|
65
65
|
height="24"
|
|
@@ -82,7 +82,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
82
82
|
stroke-width="5"
|
|
83
83
|
/>
|
|
84
84
|
</svg>
|
|
85
|
-
`.trim()}function
|
|
85
|
+
`.trim()}function Uo(){return`
|
|
86
86
|
<svg
|
|
87
87
|
xmlns="http://www.w3.org/2000/svg"
|
|
88
88
|
viewBox="0 0 200 200"
|
|
@@ -98,7 +98,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
98
98
|
style="stroke: #000; stroke-miterlimit: 10; stroke-width: 3;"
|
|
99
99
|
/>
|
|
100
100
|
</svg>
|
|
101
|
-
`.trim()}function
|
|
101
|
+
`.trim()}function jo(){return`
|
|
102
102
|
<svg
|
|
103
103
|
xmlns="http://www.w3.org/2000/svg"
|
|
104
104
|
height="24"
|
|
@@ -149,7 +149,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
149
149
|
stroke-linecap="round"
|
|
150
150
|
/>
|
|
151
151
|
</svg>
|
|
152
|
-
`.trim()}function
|
|
152
|
+
`.trim()}function Wo(){return`
|
|
153
153
|
<svg
|
|
154
154
|
xmlns="http://www.w3.org/2000/svg"
|
|
155
155
|
height="24"
|
|
@@ -191,7 +191,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
191
191
|
stroke-linecap="round"
|
|
192
192
|
/>
|
|
193
193
|
</svg>
|
|
194
|
-
`.trim()}function
|
|
194
|
+
`.trim()}function Fo(u,o){let r=document.createElement("div");r.className="edgepdf-marker-action-controls",r.setAttribute("role","group"),r.setAttribute("aria-label","Marker action controls"),r.style.cssText=`
|
|
195
195
|
position: absolute;
|
|
196
196
|
top: 1rem;
|
|
197
197
|
left: 1rem;
|
|
@@ -199,7 +199,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
199
199
|
display: none; /* Hidden by default, shown when marker is active */
|
|
200
200
|
flex-direction: column;
|
|
201
201
|
gap: 0.5rem;
|
|
202
|
-
`;let
|
|
202
|
+
`;let l=document.createElement("button");l.className="edgepdf-marker-action-button edgepdf-marker-action-edit",l.setAttribute("aria-label","Edit marker"),l.setAttribute("title","Edit marker"),l.innerHTML=Ho(),l.style.cssText=`
|
|
203
203
|
padding: 0.5rem;
|
|
204
204
|
background: #ffaa01;
|
|
205
205
|
border: none;
|
|
@@ -212,7 +212,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
212
212
|
height: 40px;
|
|
213
213
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
214
214
|
transition: all 0.2s ease;
|
|
215
|
-
`,
|
|
215
|
+
`,l.addEventListener("mouseenter",()=>{l.style.backgroundColor="#ffaa01",l.style.transform="scale(1.05)"}),l.addEventListener("mouseleave",()=>{l.style.backgroundColor="#ffaa01",l.style.transform="scale(1)"});let h=document.createElement("button");h.className="edgepdf-marker-action-button edgepdf-marker-action-delete",h.setAttribute("aria-label","Delete marker"),h.setAttribute("title","Delete marker"),h.innerHTML=Uo(),h.style.cssText=`
|
|
216
216
|
padding: 0.5rem;
|
|
217
217
|
background: #ffaa01;
|
|
218
218
|
border: none;
|
|
@@ -225,17 +225,17 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
225
225
|
height: 40px;
|
|
226
226
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
227
227
|
transition: all 0.2s ease;
|
|
228
|
-
`,
|
|
228
|
+
`,h.addEventListener("mouseenter",()=>{h.style.backgroundColor="#ffaa01",h.style.transform="scale(1.05)"}),h.addEventListener("mouseleave",()=>{h.style.backgroundColor="#ffaa01",h.style.transform="scale(1)"}),r.appendChild(l),r.appendChild(h),u.appendChild(r);let f=o.getInteractionConfig().onActiveMarkerChange;return o.setInteractionConfig({onActiveMarkerChange:g=>{console.log("onActiveMarkerChange",g);let _=o.getInteractionConfig(),b=g?.editable!==void 0?g.editable:_.showEditButton??!0,x=g?.deletable!==void 0?g.deletable:_.showDeleteButton??!0;g&&(b||x)?(r.style.display="flex",l.style.display=b?"flex":"none",h.style.display=x?"flex":"none",b?l.onclick=v=>{v.stopPropagation(),o.handleMarkerEdit(g)}:l.onclick=null,x?h.onclick=v=>{v.stopPropagation(),o.handleMarkerDelete(g)}:h.onclick=null):(r.style.display="none",l.onclick=null,h.onclick=null),f&&f(g)}}),r}function Gi(u,o,r){let l=r?.position??"top-right",h=u.querySelector(".edgepdf-zoom-controls");h&&h.remove();let d="1rem",f="auto",g="auto",_="auto";l==="top-left"?(d="1rem",_="1rem",f="auto",g="auto"):l==="top-right"?(d="1rem",f="1rem",_="auto",g="auto"):l==="bottom-left"?(g="1rem",_="1rem",d="auto",f="auto"):l==="bottom-right"&&(g="1rem",f="1rem",d="auto",_="auto");let b=document.createElement("div");b.className="edgepdf-zoom-controls",b.setAttribute("role","group"),b.setAttribute("aria-label","Zoom controls"),b.style.cssText=`
|
|
229
229
|
position: absolute;
|
|
230
|
-
top: ${
|
|
230
|
+
top: ${d};
|
|
231
231
|
right: ${f};
|
|
232
|
-
bottom: ${
|
|
233
|
-
left: ${
|
|
232
|
+
bottom: ${g};
|
|
233
|
+
left: ${_};
|
|
234
234
|
z-index: 1000;
|
|
235
235
|
display: flex;
|
|
236
236
|
flex-direction: column;
|
|
237
237
|
gap: 0.5rem;
|
|
238
|
-
`;let
|
|
238
|
+
`;let x=document.createElement("button");x.className="edgepdf-zoom-button edgepdf-zoom-in",x.setAttribute("aria-label","Zoom in"),x.setAttribute("title","Zoom in"),x.innerHTML=jo(),x.style.cssText=`
|
|
239
239
|
padding: 0.5rem;
|
|
240
240
|
background: #ffaa01;
|
|
241
241
|
border: none;
|
|
@@ -248,7 +248,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
248
248
|
height: 40px;
|
|
249
249
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
250
250
|
transition: all 0.2s ease;
|
|
251
|
-
`,
|
|
251
|
+
`,x.addEventListener("mouseenter",()=>{x.style.backgroundColor="#ffaa01",x.style.transform="scale(1.05)"}),x.addEventListener("mouseleave",()=>{x.style.backgroundColor="#ffaa01",x.style.transform="scale(1)"}),x.addEventListener("click",O=>{O.stopPropagation(),o.zoomIn(),w()});let v=document.createElement("button");v.className="edgepdf-zoom-button edgepdf-zoom-out",v.setAttribute("aria-label","Zoom out"),v.setAttribute("title","Zoom out"),v.innerHTML=Wo(),v.style.cssText=`
|
|
252
252
|
padding: 0.5rem;
|
|
253
253
|
background: #ffaa01;
|
|
254
254
|
border: none;
|
|
@@ -261,7 +261,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
261
261
|
height: 40px;
|
|
262
262
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
263
263
|
transition: all 0.2s ease;
|
|
264
|
-
`,v.addEventListener("mouseenter",()=>{v.style.backgroundColor="#ffaa01",v.style.transform="scale(1.05)"}),v.addEventListener("mouseleave",()=>{v.style.backgroundColor="#ffaa01",v.style.transform="scale(1)"}),v.addEventListener("click",
|
|
264
|
+
`,v.addEventListener("mouseenter",()=>{v.style.backgroundColor="#ffaa01",v.style.transform="scale(1.05)"}),v.addEventListener("mouseleave",()=>{v.style.backgroundColor="#ffaa01",v.style.transform="scale(1)"}),v.addEventListener("click",O=>{O.stopPropagation(),o.zoomOut(),w()});let w=()=>{let O=o.canZoomIn(),I=o.canZoomOut();x.disabled=!O,v.disabled=!I,O?(x.style.opacity="1",x.style.cursor="pointer"):(x.style.opacity="0.5",x.style.cursor="not-allowed"),I?(v.style.opacity="1",v.style.cursor="pointer"):(v.style.opacity="0.5",v.style.cursor="not-allowed")};return o.onZoomChange(()=>{w()}),b.appendChild(x),b.appendChild(v),u.appendChild(b),w(),b}var Yi=class{map=null;container;config;mapOptions;tileLayerManager=null;coordinateMapper=null;zoomController=null;markerManager=null;constructor(o){if(!o.container)throw new Error("Container element is required");if(!o.config)throw new Error("Viewer configuration is required");if(!o.config.tileUrl&&!o.config.pmtilesUrl)throw new Error("Either tileUrl or pmtilesUrl is required in configuration");if(!o.config.imageInfo)throw new Error("Image info is required in configuration");this.container=o.container,this.config=o.config,this.mapOptions=o.mapOptions}initialize(){if(this.map){console.warn("Map already initialized. Call dispose() before reinitializing.");return}try{this.coordinateMapper=new Pe(this.config.imageInfo);let o=this.coordinateMapper.createCustomCRS(),r=this.coordinateMapper.calculateMapBounds(),l=this.coordinateMapper.getImageCenter(),h=this.mapOptions?.center||[l.y,l.x],d=this.mapOptions?.zoom??this.calculateOptimalInitialZoom(),f={crs:o,center:h,zoom:d,minZoom:this.mapOptions?.minZoom??this.config.imageInfo.minZoom??0,maxZoom:this.mapOptions?.maxZoom??this.config.imageInfo.maxZoom??5,zoomControl:!1,attributionControl:!1,maxBounds:r,maxBoundsViscosity:1,zoomSnap:1,zoomDelta:1,wheelPxPerZoomLevel:60,...this.mapOptions};this.map=nt.map(this.container,f),!this.mapOptions?.center&&!this.mapOptions?.zoom&&this.map.setView([l.y,l.x],d),this.addTileLayer(),this.addSeamlessTileStyles(),this.zoomController=new ze({map:this.map,imageInfo:this.config.imageInfo}),this.map.setMinZoom(this.zoomController.getMinZoom()),this.map.setMaxZoom(this.zoomController.getMaxZoom()),this.markerManager=new Ce({map:this.map,coordinateMapper:this.coordinateMapper,imageInfo:this.config.imageInfo}),Fo(this.container,this.markerManager),Gi(this.container,this.zoomController),console.log("EdgePdfViewer initialized successfully",{bounds:r,center:[l.y,l.x],zoom:d,imageCenter:l})}catch(o){let r=o instanceof Error?o.message:"Unknown error";throw new Error(`Failed to initialize map: ${r}`)}}calculateOptimalInitialZoom(){let o=typeof window<"u"?window.innerWidth:1024,r=this.config.imageInfo.minZoom??0,l=this.config.imageInfo.maxZoom??5,h=r>=1?1:0,d;return o<=768?d=0+h:d=1+h,Math.max(r,Math.min(l,d))}addSeamlessTileStyles(){if(!(typeof document>"u")&&!document.getElementById("seamless-tiles-css")){let o=document.createElement("style");o.id="seamless-tiles-css",o.textContent=`
|
|
265
265
|
.seamless-tiles img, .leaflet-tile {
|
|
266
266
|
border: none !important;
|
|
267
267
|
outline: none !important;
|
|
@@ -271,7 +271,7 @@ var Oo=`@import"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;6
|
|
|
271
271
|
.leaflet-layer {
|
|
272
272
|
border: none !important;
|
|
273
273
|
}
|
|
274
|
-
`,document.head.appendChild(
|
|
274
|
+
`,document.head.appendChild(o)}}getMap(){return this.map}isInitialized(){return this.map!==null}addTileLayer(){if(!this.map)throw new Error("Map must be initialized before adding tile layer");try{this.tileLayerManager=new Te({tileUrl:this.config.tileUrl,pmtilesUrl:this.config.pmtilesUrl,imageInfo:this.config.imageInfo}),this.tileLayerManager.createTileLayer(this.map).addTo(this.map),console.log("Tile layer added to map successfully")}catch(o){let r=o instanceof Error?o.message:"Unknown error";throw new Error(`Failed to add tile layer: ${r}`)}}getTileLayerManager(){return this.tileLayerManager}getCoordinateMapper(){return this.coordinateMapper}getZoomController(){return this.zoomController}getMarkerManager(){return this.markerManager}focusMarker(o,r){return this.markerManager?this.markerManager.focusMarker(o,r):(console.warn("Marker manager not available"),!1)}dispose(){this.markerManager&&(this.markerManager.dispose(),this.markerManager=null),this.zoomController&&(this.zoomController.dispose(),this.zoomController=null),this.tileLayerManager&&this.map&&(this.tileLayerManager.removeTileLayer(this.map),this.tileLayerManager=null),this.map&&(this.map.remove(),this.map=null,console.log("EdgePdfViewer disposed successfully"))}};var Ki=class{baseUrl;constructor(o){this.baseUrl=o.replace(/\/$/,"")}getBaseUrl(){return this.baseUrl}buildUrl(o){let r=o.startsWith("/")?o:`/${o}`;return`${this.baseUrl}${r}`}getOriginPreviewPath(o){return Wi(o)}getOriginPreviewUrl(o){return this.buildUrl(Wi(o))}getOriginPreviewThumbnailPath(o){return Fi(o)}getOriginPreviewThumbnailUrl(o){return this.buildUrl(Fi(o))}getAnnotatedPreviewPath(o){return Vi(o)}getAnnotatedPreviewUrl(o){return this.buildUrl(Vi(o))}getAnnotatedThumbnailPath(o){return qi(o)}getAnnotatedThumbnailUrl(o){return this.buildUrl(qi(o))}isValidTileUrl(o){return Qe(o)}};export{Ki as CDNManager,Pe as CoordinateMapper,Yi as EdgePdfViewer,Ce as MarkerManager,Te as TileLayerManager,ze as ZoomController,Gi as createZoomControls};
|
|
275
275
|
/*! Bundled license information:
|
|
276
276
|
|
|
277
277
|
leaflet/dist/leaflet-src.js:
|