1/*! For license information please see 6411.32c3e2c17fd6d21d.js.LICENSE.txt */ 2(self.webpackChunkeltiempo=self.webpackChunkeltiempo||[]).push([[6411],{6411(t,e,i){"use strict";i.r(e),i.d(e,{plm_maps_viewer:()=>ue});var n=i(2483),o=i(4296).hp,r=i(8558);const s={htmlId:"map",minZoom:3,maxZoom:18,defaultAttribution:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">Leaflet</a> | © <a href="http://www.openstreetmap.org/copyright" rel="nofollow">OpenStreetMap</a>',defaultBaseLayer:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},defaultBoundaries:{zoomLimits:{minZoom:3,maxZoom:18},layerZoomLimits:{minZoom:3,maxZoom:18},mapLimits:{topRight:{latitude:-85,longitude:-180},bottomLeft:{latitude:85,longitude:180}}}},a={htmlId:"webglCanvas"},h={htmlId:"windImageCanvas"},l={opacity:.6,hide:0,tileSize:256,tileLoadingErrorEventName:"mapViewerTileLoadingError",allFramesDepth:"ALL_FRAMES"},u={zIndexOffset:1e3,popupAnchor:[0,0],maxZoom:18,defaultMarkerUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon.png"},c={EarthRadius:6378137,MinLatitude:-85.05112878,MaxLatitude:85.05112878,MinLongitude:-180,MaxLongitude:180};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self&&self;var d,p,f,_=(d=function(t,e){!function(t){var e="1.8.0";function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(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 r=0;function s(t){return"_leaflet_id"in t||(t._leaflet_id=++r),t._leaflet_id}function a(t,e,i){var n,o,r,s;return s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)},r}function h(t,e,i){var n=e[1],o=e[0],r=n-o;return t===n&&i?t:((t-o)%r+r)%r+o}function l(){return!1}function u(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return c(t).split(/\s+/)}function p(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function m(t,e){return t.replace(_,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function b(t){var e=+new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}var P=window.requestAnimationFrame||w("RequestAnimationFrame")||b,T=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,i){if(!i||P!==b)return P.call(window,o(t,e));t.call(e)}function M(t){t&&T.call(window,t)}var E={__proto__:null,extend:i,create:n,bind:o,get lastId(){return r},stamp:s,throttle:a,wrapNum:h,falseFn:l,formatNum:u,trim:c,splitWords:d,setOptions:p,getParamString:f,template:m,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:P,cancelFn:T,requestAnimFrame:C,cancelAnimFrame:M};function S(){}function z(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;
2e++)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)}}S.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=n(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&i(e,t.statics),t.includes&&(z(t.includes),i.apply(null,[r].concat(t.includes))),i(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?n(o.options):{},i(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return i(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var A={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=d(t);for(var o=1===arguments.length,r=0,s=t.length;r<s;r++)o?this._off(t[r]):this._off(t[r],e,i)}else delete this._events;return this},_on:function(t,e,i){if("function"==typeof e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},r=n,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===i)return;r.push(o)}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,i){var n,o,r;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if(i===this&&(i=void 0),"function"==typeof e){for(o=0,r=n.length;o<r;o++){var s=n[o];if(s.ctx===i&&s.fn===e)return this._firingCount&&(s.fn=l,this._events[t]=n=n.slice()),void n.splice(o,1)}console.warn("listener not found")}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,r=n.length;o<r;o++)n[o].fn=l;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var h=r[s];h.fn.call(h.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){"string"!=typeof t&&console.warn('"string" type argument expected');var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var r=o(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var k=S.extend(A);function O(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var B=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function R(t,e,i){return t instanceof O?t:g(t)?new O(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,i)}function I(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return!t||t instanceof I?t:new I(t,e)}function D(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function F(t,e){return t instanceof D?t:new D(t,e)}function N(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}
vendor: 4,045 bytes, line 2
2function U(t,e,i){return t instanceof N?t:g(t)&&"object"!=typeof t[0]?3===t.length?new N(t[0],t[1],t[2]):2===t.length?new N(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new N(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new N(t,e,i)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(R(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(R(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 O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(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=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var e=(t=R(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=R(t)).x===this.x&&t.y===this.y},contains:function(t){return t=R(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},I.prototype={extend:function(t){return t=R(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new O((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new O(this.min.x,this.max.y)},getTopRight:function(){return new O(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof O?R(t):Z(t))instanceof I?(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=Z(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>=e.x&&n.x<=i.x,s=o.y>=e.y&&n.y<=i.y;return r&&s},overlaps:function(t){t=Z(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>e.x&&n.x<i.x,s=o.y>e.y&&n.y<i.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},D.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof N)e=t,i=t;else{if(!(t instanceof D))return t?this.extend(U(t)||F(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new N(e.lat,e.lng),this._northEast=new N(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new D(new N(e.lat-n,e.lng-o),new N(i.lat+n,i.lng+o))},getCenter:function(){return new N((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 N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(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){t="number"==typeof t[0]||t instanceof N||"lat"in t?U(t):F(t);var e,i,n=this._southWest,o=this._northEast;
2return t instanceof D?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&n.lat<=i.lat,s=o.lng>=e.lng&&n.lng<=i.lng;return r&&s},overlaps:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&n.lat<i.lat,s=o.lng>e.lng&&n.lng<i.lng;return r&&s},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))},isValid:function(){return!(!this._southWest||!this._northEast)}},N.prototype={equals:function(t,e){return!!t&&(t=U(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return W.distance(this,U(t))},wrap:function(){return W.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 N(this.lat,this.lng,this.alt)}};var j,G={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);return new I(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new N(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;
2var r=t.getSouthWest(),s=t.getNorthEast();return new D(new N(r.lat-n,r.lng-o),new N(s.lat-n,s.lng-o))}},W=i({},G,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),s=Math.sin((e.lng-t.lng)*i/2),a=r*r+Math.cos(n)*Math.cos(o)*s*s,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),H=6378137,V={R:H,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),o=Math.sin(n*e);return new O(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(j=H*Math.PI,new I([-j,-j],[j,j]))};function q(t,e,i,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function Y(t,e,i,n){return new q(t,e,i,n)}q.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 O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var J=i({},W,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return Y(t,.5,-t,.5)}()}),X=i({},J,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t,e){var i,n,o,r,s,a,h="";for(i=0,o=t.length;i<o;i++){for(n=0,r=(s=t[i]).length;n<r;n++)h+=(n?"L":"M")+(a=s[n]).x+" "+a.y;h+=e?It.svg?"z":"x":""}return h||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),ot=Rt("webkit"),rt=Rt("android"),st=Rt("android 2")||Rt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ht=rt&&Rt("Google")&&at<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&Rt("chrome"),ct=Rt("gecko")&&!ot&&!lt&&!et,dt=!ut&&Rt("safari"),pt=Rt("phantom"),ft="OTransition"in tt,_t=0===navigator.platform.indexOf("Win"),mt=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,yt="MozPerspective"in tt,vt=!window.L_DISABLE_3D&&(mt||gt||yt)&&!ft&&!pt,wt="undefined"!=typeof orientation||Rt("mobile"),xt=wt&&ot,bt=wt&>,Lt=!window.PointerEvent&&window.MSPointerEvent,Pt=!(!window.PointerEvent&&!Lt),Tt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(Tt||Pt),Mt=wt&<,Et=wt&&ct,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,zt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(t){}return t}(),At=!!document.createElement("canvas").getContext,kt=!(!document.createElementNS||!K("svg").createSVGRect),Ot=!!kt&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Bt=!kt&&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&&"object"==typeof e.adj}catch(t){return!1}}();function Rt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var It={ie:et,ielt9:it,edge:nt,webkit:ot,android:rt,android23:st,androidStock:ht,opera:lt,chrome:ut,gecko:ct,safari:dt,phantom:pt,opera12:ft,win:_t,ie3d:mt,webkit3d:gt,gecko3d:yt,any3d:vt,mobile:wt,mobileWebkit:xt,mobileWebkit3d:bt,msPointer:Lt,pointer:Pt,touch:Ct,touchNative:Tt,mobileOpera:Mt,mobileGecko:Et,retina:St,passiveEvents:zt,canvas:At,svg:kt,vml:Bt,inlineSvg:Ot},Zt=It.msPointer?"MSPointerDown":"pointerdown",Dt=It.msPointer?"MSPointerMove":"pointermove",Ft=It.msPointer?"MSPointerUp":"pointerup",Nt=It.msPointer?"MSPointerCancel":"pointercancel",Ut={touchstart:Zt,touchmove:Dt,touchend:Ft,touchcancel:Nt},jt={touchstart:$t,touchmove:Kt,touchend:Kt,touchcancel:Kt},Gt={},Wt=!1;function Ht(t,e,i){return"touchstart"===e&&Xt(),jt[e]?(i=jt[e].bind(this,i),t.addEventListener(Ut[e],i,!1),i):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Vt(t,e,i){Ut[e]?t.removeEventListener(Ut[e],i,!1):console.warn("wrong event specified:",e)}function qt(t){Gt[t.pointerId]=t}function Yt(t){Gt[t.pointerId]&&(Gt[t.pointerId]=t)}function Jt(t){delete Gt[t.pointerId]}function Xt(){Wt||(document.addEventListener(Zt,qt,!0),document.addEventListener(
2Dt,Yt,!0),document.addEventListener(Ft,Jt,!0),document.addEventListener(Nt,Jt,!0),Wt=!0)}function Kt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Gt)e.touches.push(Gt[i]);e.changedTouches=[e],t(e)}}function $t(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&qe(e),Kt(t,e)}function Qt(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var te=200;function ee(t,e){t.addEventListener("dblclick",e);var i,n=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Date.now();o-n<=te?2===++i&&e(Qt(t)):i=1,n=o}}else i=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function ie(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var ne,oe,re,se,ae,he=Te(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),le=Te(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ue="webkitTransition"===le||"OTransition"===le?le+"End":"transitionend";function ce(t){return"string"==typeof t?document.getElementById(t):t}function de(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function pe(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function fe(t){var e=t.parentNode;e&&e.removeChild(t)}function _e(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function me(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ye(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=be(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ve(t,e){if(void 0!==t.classList)for(var i=d(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ye(t,e)){var r=be(t);xe(t,(r?r+" ":"")+e)}}function we(t,e){void 0!==t.classList?t.classList.remove(e):xe(t,c((" "+be(t)+" ").replace(" "+e+" "," ")))}function xe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function be(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Le(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Pe(t,e)}function Pe(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Te(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new O(0,0);t.style[he]=(It.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Me(t,e){t._leaflet_pos=e,It.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new O(0,0)}if("onselectstart"in document)ne=function(){Ze(window,"selectstart",qe)},oe=function(){Fe(window,"selectstart",qe)};else{var Se=Te(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ne=function(){if(Se){var t=document.documentElement.style;re=t[Se],t[Se]="none"}},oe=function(){Se&&(document.documentElement.style[Se]=re,re=void 0)}}function ze(){Ze(window,"dragstart",qe)}function Ae(){Fe(window,"dragstart",qe)}function ke(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Oe(),se=t,ae=t.style.outline,t.style.outline="none",Ze(window,"keydown",Oe))}function Oe(){se&&(se.style.outline=ae,se=void 0,ae=void 0,Fe(window,"keydown",Oe))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Re(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ie={__proto__:null,TRANSFORM:he,TRANSITION:le,TRANSITION_END:ue,get:ce,getStyle:de,create:pe,remove:fe,empty:_e,toFront:me,toBack:ge,hasClass:ye,addClass:ve,removeClass:we,setClass:xe,getClass:be,setOpacity:Le,testProp:Te,setTransform:Ce,setPosition:Me,getPosition:Ee,get disableTextSelection(){return ne},get enableTextSelection(){return oe},disableImageDrag:ze,enableImageDrag:Ae,preventOutline:ke,restoreOutline:Oe,getSizedParentNode:Be,getScale:Re};function Ze(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)je(t,o,e[o],i);else for(var r=0,s=(e=d(e)).length;r<s;r++)je(t,e[r],i,n);return this}var De="_leaflet_events";function Fe(t,e,i,n){if(1===arguments.length)Ne(t),delete t[De];else if(e&&"object"==typeof e)for(var o in e)Ge(t,o,e[o],i);else if(e=d(e),2===arguments.length)Ne(t,function(t){return-1!==y(e,t)});else for(var r=0,s=e.length;r<s;r++)Ge(t,e[r],i,n);return this}function Ne(t,e){for(var i in t[De]){var n=i.split(/\d/)[0];e&&!e(n)||Ge(t,n,null,null,i)}}
2var Ue={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function je(t,e,i,n){var o=e+s(i)+(n?"_"+s(n):"");if(t[De]&&t[De][o])return this;var r=function(e){return i.call(n||t,e||window.event)},a=r;!It.touchNative&&It.pointer&&0===e.indexOf("touch")?r=Ht(t,e,r):It.touch&&"dblclick"===e?r=ee(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ue[e]||e,r,!!It.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,$e(t,e)&&a(e)},t.addEventListener(Ue[e],r,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,r),t[De]=t[De]||{},t[De][o]=r}function Ge(t,e,i,n,o){o=o||e+s(i)+(n?"_"+s(n):"");var r=t[De]&&t[De][o];if(!r)return this;!It.touchNative&&It.pointer&&0===e.indexOf("touch")?Vt(t,e,r):It.touch&&"dblclick"===e?ie(t,r):"removeEventListener"in t?t.removeEventListener(Ue[e]||e,r,!1):t.detachEvent("on"+e,r),t[De][o]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function He(t){return je(t,"wheel",We),this}function Ve(t){return Ze(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function qe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return qe(t),We(t),this}function Je(t,e){if(!e)return new O(t.clientX,t.clientY);var i=Re(e),n=i.boundingClientRect;return new O((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Xe=It.win&&It.chrome?2*window.devicePixelRatio:It.gecko?window.devicePixelRatio:1;function Ke(t){return It.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Xe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail: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(t){return!1}return i!==t}var Qe={__proto__:null,on:Ze,off:Fe,stopPropagation:We,disableScrollPropagation:He,disableClickPropagation:Ve,preventDefault:qe,stop:Ye,getMousePosition:Je,getWheelDelta:Ke,isExternalTarget:$e,addListener:Ze,removeListener:Fe},ti=k.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=Ee(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=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;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(),Me(this._el,i),this.fire("step")},_complete:function(){M(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ei=k.extend({options:{crs:J,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=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(U(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=le&&It.any3d&&!It.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ze(this._proxy,ue,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(U(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration}
2,n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),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||(It.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(It.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof O?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var i=R(e.paddingTopLeft||e.padding||[0,0]),n=R(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};
2var r=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=F(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(e=e||{},!(t=R(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ti,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ve(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(!1===(i=i||{}).animate||!It.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=U(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),h=a*this.getZoomScale(s,e),l=o.distanceTo(n)||1,u=1.42,c=u*u;function d(t){var e=(h*h-a*a+(t?-1:1)*c*c*l*l)/(2*(t?h:a)*c*l),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function _(t){return p(t)/f(t)}var m=d(0);function g(t){return a*(f(m)/f(m+u*t))}function y(t){return a*(f(m)*_(m+u*t)-p(m))/c}function v(t){return 1-Math.pow(1-t,1.5)}var w=Date.now(),x=(d(1)-m)/u,b=i.duration?1e3*i.duration:1e3*x*.8;function L(){var i=(Date.now()-w)/b,r=v(i)*x;i<=1?(this._flyToFrame=C(L,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(y(r)/l)),s),this.getScaleZoom(a/g(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),L.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)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},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,F(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=R((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=R(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=Z([s.min.add(i),s.max.subtract(n)]),h=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;var l=r.subtract(a.getCenter()),u=a.extend(r).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),s=n.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new N(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var r={latlng:e,bounds:i,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)}},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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),fe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)fe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=pe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new D(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZo
2om?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=F(t),i=R(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),l=Z(this.project(a,n),this.project(s,n)).getSize(),u=It.any3d?this.options.zoomSnap:1,c=h.x/l.x,d=h.y/l.y,p=e?Math.max(c,d):Math.min(c,d);return n=this.getScaleZoom(p,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(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 I(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?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=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(U(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(R(t),e)},layerPointToLatLng:function(t){var e=R(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(U(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(U(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(U(t),U(e))},containerPointToLayerPoint:function(t){return R(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return R(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(R(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Je(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=ce(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ze(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&It.any3d,ve(t,"leaflet-container"+(It.touch?" leaflet-touch":"")+(It.retina?" leaflet-retina":"")+(It.ielt9?" leaflet-oldie":"")+(It.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=de(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),Me(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ve(t.markerPane,"leaflet-zoom-hide"),ve(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Me(this._mapPane,new O(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}
2,_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||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 M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Me(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[s(this._container)]=this;var e=t?Fe:Ze;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),It.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=C(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=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((i=this._targets[s(r)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!$e(r,t))break;if(n.push(i),o)break}if(r===this._container)break;r=r.parentNode}return n.length||a||o||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;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||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&ke(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var r=this._findEventTargets(t,e);if(n){for(var s=[],a=0;a<n.length;a++)n[a].listens(e,!0)&&s.push(n[a]);r=s.concat(r)}if(r.length){"contextmenu"===e&&qe(t);var h=r[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=h.getLatLng&&(!h._radius||h._radius<=10);l.containerPoint=u?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=u?h.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(a=0;a<r.length;a++)if(r[a].fire(e,l,!0),l.originalEvent._stopped||!1===r[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).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 Ee(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).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);
2return Z([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),o=this.getSize().divideBy(2),r=new I(n.subtract(o),n.add(o)),s=this._getBoundsOffset(r,i,e);return s.round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new I(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=Z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),r=n.max.subtract(t.max);return new O(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_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=It.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(){we(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=pe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=he,i=this._proxy.style[e];Ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){fe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(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||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(C(function(){this._moveStart(!0,!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,ve(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(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&we(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 ii(t,e){return new ei(t,e)}var ni=S.extend({options:{position:"topright"},initialize:function(t){p(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 ve(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(fe(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()}}),oi=function(t){return new ni(t)};ei.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this}
2,_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=pe("div",e+"control-container",this._container);function n(n,o){var r=e+n+" "+e+o;t[n+o]=pe("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)fe(this._controlCorners[t]);fe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ri=ni.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){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,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 ni.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(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ve(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?(ve(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):we(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return we(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=pe("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ve(e),He(e);var n=this._section=pe("section",t+"-list");i&&(this._map.on("click",this.collapse,this),Ze(e,{mouseenter:function(){Ze(n,"click",qe),this.expand(),setTimeout(function(){Fe(n,"click",qe)})},mouseleave:this.collapse},this));var o=this._layersLink=pe("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Ze(o,"click",qe),Ze(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=pe("div",t+"-base",n),this._separator=pe("div",t+"-separator",n),this._overlaysList=pe("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(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(o(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;_e(this._baseLayersList),_e(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>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(s(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"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,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(e),e.layerId=s(t.layer),Ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return i.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<n.length;r++)this._map.hasLayer(n[r])||this._map.addLayer(n[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}
2),si=function(t,e,i){return new ri(t,e,i)},ai=ni.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=pe("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,o){var r=pe("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Ve(r),Ze(r,"click",Ye),Ze(r,"click",o,this),Ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";we(this._zoomInButton,e),we(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ve(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ve(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});ei.mergeOptions({zoomControl:!0}),ei.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ai,this.addControl(this.zoomControl))});var hi=function(t){return new ai(t)},li=ni.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=pe("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=pe("div",e,i)),t.imperial&&(this._iScale=pe("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,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_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 e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ui=function(t){return new li(t)},ci='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',di=ni.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(It.inlineSvg?ci+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=pe("div","leaflet-control-attribution"),Ve(this._container),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> ')}}});ei.mergeOptions({attributionControl:!0}),ei.addInitHook(function(){this.options.attributionControl&&(new di).addTo(this)});var pi=function(t){return new di(t)};ni.Layers=ri,ni.Zoom=ai,ni.Scale=li,ni.Attribution=di,oi.layers=si,oi.zoom=hi,oi.scale=ui,oi.attribution=pi;var fi=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fi.addTo=function(t,e){return t.addHandler(e,this),this};var _i,mi={Events:A},gi=It.touch?"touchstart mousedown":"mousedown",yi=k.extend({options:{clickTolerance:3}
2,initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ze(this._dragStartTarget,gi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yi._dragging===this&&this.finishDrag(!0),Fe(this._dragStartTarget,gi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ye(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)yi._dragging===this&&this.finishDrag();else if(!(yi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(yi._dragging=this,this._preventOutline&&ke(this._element),ze(),ne(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Be(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Ee(this._element),this._parentScale=Re(i);var n="mousedown"===t.type;Ze(document,n?"mousemove":"touchmove",this._onMove,this),Ze(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new O(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,qe(t),this._moved||(this.fire("dragstart"),this._moved=!0,ve(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ve(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),Me(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){we(document.body,"leaflet-dragging"),this._lastTarget&&(we(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Fe(document,"mousemove touchmove",this._onMove,this),Fe(document,"mouseup touchend touchcancel",this._onUp,this),Ae(),oe(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,yi._dragging=!1}});function vi(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=bi(t=Pi(t,i),i)}function wi(t,e,i){return Math.sqrt(Si(t,e,i,!0))}function xi(t,e,i){return Si(t,e,i)}function bi(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,Li(t,n,e,0,i-1);var o,r=[];for(o=0;o<i;o++)n[o]&&r.push(t[o]);return r}function Li(t,e,i,n,o){var r,s,a,h=0;for(s=n+1;s<=o-1;s++)(a=Si(t[s],t[n],t[o],!0))>h&&(r=s,h=a);h>i&&(e[r]=1,Li(t,e,i,n,r),Li(t,e,i,r,o))}function Pi(t,e){for(var i=[t[0]],n=1,o=0,r=t.length;n<r;n++)Ei(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<r-1&&i.push(t[r-1]),i}function Ti(t,e,i,n,o){var r,s,a,h=n?_i:Mi(t,i),l=Mi(e,i);for(_i=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=Mi(s=Ci(t,e,r=h||l,i,o),i),r===h?(t=s,h=a):(e=s,l=a)}}function Ci(t,e,i,n,o){var r,s,a=e.x-t.x,h=e.y-t.y,l=n.min,u=n.max;return 8&i?(r=t.x+a*(u.y-t.y)/h,s=u.y):4&i?(r=t.x+a*(l.y-t.y)/h,s=l.y):2&i?(r=u.x,s=t.y+h*(u.x-t.x)/a):1&i&&(r=l.x,s=t.y+h*(l.x-t.x)/a),new O(r,s,o)}function Mi(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 Ei(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Si(t,e,i,n){var o,r=e.x,s=e.y,a=i.x-r,h=i.y-s,l=a*a+h*h;return l>0&&((o=((t.x-r)*a+(t.y-s)*h)/l)>1?(r=i.x,s=i.y):o>0&&(r+=a*o,s+=h*o)),a=t.x-r,h=t.y-s,n?a*a+h*h:new O(r,s)}function zi(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ai(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zi(t)}var ki={__proto__:null,simplify:vi,pointToSegmentDistance:wi,closestPointOnSegment:xi,clipSegment:Ti,_getEdgeIntersection:Ci,_getBitCode:Mi,_sqClosestPointOnSegment:Si,isFlat:zi,_flat:Ai};function Oi(t,e,i){var n,o,r,s,a,h,l,u,c,d=[1,4,2,8];for(o=0,l=t.length;o<l;o++)t[o]._code=Mi(t[o],e);for(s=0;s<4;s++){for(u=d[s],n=[],o=0,r=(l=t.length)-1;o<l;r=o++)a=t[o],h=t[r],a._code&u?h._code&u||((c=Ci(h,a,u,e,i))._code=Mi(c,e),n.push(c)):(h._code&u&&((c=Ci(h,a,u,e,i))._code=Mi(c,e),n.push(c)),n.push(a));t=n}return t}var Bi={__proto__:null,clipPolygon:Oi},Ri={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new I([-180,-90],[180,90])},Ii={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=r*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-s)/(1+s),r/2);return n=-i*Math.log(Math.max(a,1e-10)),new O(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(s),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=l=Math.PI/2-2*Math.atan(s*e)-a;return new N(a*i,t.x*i/n)}},Zi={__proto__:null,LonLat:Ri,Mercator:Ii,SphericalMercator:V},Di=i({},W,{code:"EPSG:3395",projection:Ii,transformation:function(){var t=.5/(Math.PI*Ii.R);return Y(t,.5,-t,.5)}()}),Fi=i({},W,{code:"EPSG:4326",projection:Ri,transformation:Y(1/180,1,-1/180,.5)}),Ni=i({},G,{projection:Ri,transformation:Y(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});G.Earth=W,G.EPSG3395=Di,G.EPSG3857=J,G.EPSG900913=X,G.EPSG4326=Fi,G.Simple=Ni;var Ui=k.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[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(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})}}});ei.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(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 s(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){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])}
2,_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(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 o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ji=Ui.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},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){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);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 s(t)}}),Gi=function(t,e){return new ji(t,e)},Wi=ji.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ji.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),ji.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 D;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Hi=function(t,e){return new Wi(t,e)},Vi=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(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("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=R(n),r=R("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return It.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function qi(t){return new Vi(t)}var Yi=Vi.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"string"!=typeof Yi.imagePath&&(Yi.imagePath=this._detectIconPath()),(this.options.imagePath||Yi.imagePath)+Vi.prototype._getIconUrl.call(this,t)}
2,_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=pe("div","leaflet-default-icon-path",document.body),e=de(t,"background-image")||de(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),Ji=fi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new yi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ve(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&&we(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,o=this._marker.options.autoPanPadding,r=Ee(e._icon),s=i.getPixelBounds(),a=i.getPixelOrigin(),h=Z(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!h.contains(r)){var l=R((Math.max(h.max.x,r.x)-h.max.x)/(s.max.x-h.max.x)-(Math.min(h.min.x,r.x)-h.min.x)/(s.min.x-h.min.x),(Math.max(h.max.y,r.y)-h.max.y)/(s.max.y-h.max.y)-(Math.min(h.min.y,r.y)-h.min.y)/(s.min.y-h.min.y)).multiplyBy(n);i.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Me(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(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&&(M(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Ee(e._icon),o=e._map.layerPointToLatLng(n);i&&Me(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){M(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xi=Ui.extend({options:{icon:new Yi,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){p(this,e),this._latlng=U(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=U(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),"IMG"===i.tagName&&(i.alt=t.alt||"")),ve(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}
2),this.options.autoPanOnFocus&&Ze(i,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ve(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Fe(this._icon,"focus",this._panOnFocus,this),fe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&fe(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Me(this._icon,t),this._shadow&&Me(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&&(ve(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ji)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ji(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&&Le(this._icon,t),this._shadow&&Le(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?R(e.iconSize):R(0,0),n=e.iconAnchor?R(e.iconAnchor):R(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 Ki(t,e){return new Xi(t,e)}var $i=Ui.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 p(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)}}),Qi=$i.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=U(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=U(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}
2,setStyle:function(t){var e=t&&t.radius||this._radius;return $i.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 I(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 tn(t,e){return new Qi(t,e)}var en=Qi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),p(this,e),this._latlng=U(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 D(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:$i.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===W.distance){var o=Math.PI/180,r=this._mRadius/W.R/o,s=i.project([e+r,t]),a=i.project([e-r,t]),h=s.add(a).divideBy(2),l=i.unproject(h).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(l*o))/(Math.cos(e*o)*Math.cos(l*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=h.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:h.x-i.project([l,t-u]).x,this._radiusY=h.y-s.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}});function nn(t,e,i){return new en(t,e,i)}var on=$i.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(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,i,n=1/0,o=null,r=Si,s=0,a=this._parts.length;s<a;s++)for(var h=this._parts[s],l=1,u=h.length;l<u;l++){var c=r(t,e=h[l-1],i=h[l],!0);c<n&&(n=c,o=r(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o}
2,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,s,a=this._rings[0],h=a.length;if(!h)return null;for(t=0,e=0;t<h-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<h-1;t++)if(o=a[t],r=a[t+1],(n+=i=o.distanceTo(r))>e)return s=(n-e)/i,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=U(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return zi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=zi(t),n=0,o=t.length;n<o;n++)i?(e[n]=U(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new I;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 O(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,o,r=t[0]instanceof N,s=t.length;if(r){for(o=[],n=0;n<s;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<s;n++)this._projectLatlngs(t[n],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;else{var e,i,n,o,r,s,a,h=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(i=0,r=(a=this._rings[e]).length;i<r-1;i++)(s=Ti(a[i],a[i+1],t,i,!0))&&(h[n]=h[n]||[],h[n].push(s[0]),s[1]===a[i+1]&&i!==r-2||(h[n].push(s[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=vi(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,o,r,s,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(n=0,o=(s=(a=this._parts[i]).length)-1;n<s;o=n++)if((e||0!==n)&&wi(t,a[o],a[n])<=h)return!0;return!1}});function rn(t,e){return new on(t,e)}on._flat=Ai;var sn=on.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
2,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,s,a,h,l=this._rings[0],u=l.length;if(!u)return null;for(r=s=a=0,t=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],o=i.y*n.x-n.y*i.x,s+=(i.x+n.x)*o,a+=(i.y+n.y)*o,r+=3*o;return h=0===r?l[0]:[s/r,a/r],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=on.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof N&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){on.prototype._setLatLngs.call(this,t),zi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new O(e,e);if(t=new I(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,r=this._rings.length;o<r;o++)(n=Oi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,r,s,a,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(h=(e=this._parts[o]).length)-1;r<h;s=r++)i=e[r],n=e[s],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||on.prototype._containsPoint.call(this,t,!0)}});function an(t,e){return new sn(t,e)}var hn=Wi.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=ln(t,r);return s?(s.feature=mn(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},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&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ln(t,e){var i,n,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,h=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||cn;if(!a&&!s)return null;switch(s.type){case"Point":return un(l,t,i=u(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)i=u(a[o]),h.push(un(l,t,i,e));return new Wi(h);case"LineString":case"MultiLineString":return n=dn(a,"LineString"===s.type?0:1,u),new on(n,e);case"Polygon":case"MultiPolygon":return n=dn(a,"Polygon"===s.type?1:2,u),new sn(n,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var c=ln({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new Wi(h);default:throw new Error("Invalid GeoJSON object.")}}function un(t,e,i,n){return t?t(e,i):new Xi(i,n&&n.markersInheritOptions&&n)}function cn(t){return new N(t[1],t[0],t[2])}function dn(t,e,i){for(var n,o=[],r=0,s=t.length;r<s;r++)n=e?dn(t[r],e-1,i):(i||cn)(t[r]),o.push(n);return o}function pn(t,e){return void 0!==(t=U(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function fn(t,e,i,n){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?fn(t[r],e-1,i,n):pn(t[r],n));return!e&&i&&o.push(o[0]),o}function _n(t,e){return t.feature?i({},t.feature,{geometry:e}):mn(e)}function mn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var gn={toGeoJSON:function(t){return _n(this,{type:"Point",coordinates:pn(this.getLatLng(),t)})}};function yn(t,e){return new hn(t,e)}Xi.include(gn),en.include(gn),Qi.include(gn),on.include({toGeoJSON:function(t){var e=!zi(this._latlngs);return _n(this,{type:(e?"Multi":"")+"LineString",coordinates:fn(this._latlngs,e?1:0,!1,t)})}}),sn.include({toGeoJSON:function(t){var e=!zi(this._latlngs),i=e&&!zi(this._latlngs[0]),n=fn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),_n(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),ji.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),_n(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var r=mn(o);"FeatureCollection"===r.type?n.push.apply(n,r.features):n.push(r)}}}),i?_n(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var vn=yn,wn=Ui.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""}
vendor: 6,847 bytes, line 2
2,initialize:function(t,e,i){this._url=t,this._bounds=F(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ve(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){fe(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&&me(this._image),this},bringToBack:function(){return this._map&&ge(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="IMG"===this._url.tagName,e=this._image=t?this._url:pe("img");ve(e,"leaflet-image-layer"),this._zoomAnimated&&ve(e,"leaflet-zoom-animated"),this.options.className&&ve(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(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;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Me(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Le(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),xn=function(t,e,i){return new wn(t,e,i)},bn=wn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:pe("video");if(ve(e,"leaflet-image-layer"),this._zoomAnimated&&ve(e,"leaflet-zoom-animated"),this.options.className&&ve(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],r=0;r<i.length;r++)n.push(i[r].src);this._url=i.length>0?n:[e.src]}else{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 a=pe("source");a.src=this._url[s],e.appendChild(a)}}}});function Ln(t,e,i){return new bn(t,e,i)}var Pn=wn.extend({_initImage:function(){var t=this._image=this._url;ve(t,"leaflet-image-layer"),this._zoomAnimated&&ve(t,"leaflet-zoom-animated"),this.options.className&&ve(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});function Tn(t,e,i){return new Pn(t,e,i)}var Cn=Ui.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,e){p(this,t),this._source=e},openOn:function(t){return(t=arguments.length?t:this._source._map).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&&Le(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Le(this._container,1),this.bringToFront(),this.options.interactive&&(ve(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Le(this._container,0),this._removeTimeout=setTimeout(o(fe,void 0,this._container),200)):fe(this._container),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=U(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&&me(this._container),this},bringToBack:function(){return this._map&&ge(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Wi){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)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=R(this.options.offset),i=this._getAnchor();this._zoomAnimated?Me(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});
2ei.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),Ui.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(p(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}});var Mn=Cn.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).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Cn.prototype.openOn.call(this,t)},onAdd:function(t){Cn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof $i||this._source.on("preclick",We))},onRemove:function(t){Cn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof $i||this._source.off("preclick",We))},getEvents:function(){var t=Cn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?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=pe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=pe("div",t+"-content-wrapper",e);if(this._contentNode=pe("div",t+"-content",i),Ve(e),He(this._contentNode),Ze(e,"contextmenu",We),this._tipContainer=pe("div",t+"-tip-container",e),this._tip=pe("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=pe("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>',Ze(n,"click",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,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",ve(t,r)):we(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Me(this._container,e.add(i))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,i=parseInt(de(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,o=this._containerWidth,r=new O(this._containerLeft,-n-this._containerBottom);r._add(Ee(this._container));var s=e.layerPointToContainerPoint(r),a=R(this.options.autoPanPadding),h=R(this.options.autoPanPaddingTopLeft||a),l=R(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;s.x+o+l.x>u.x&&(c=s.x+o-u.x+l.x),s.x-c-h.x<0&&(c=s.x-h.x),s.y+n+l.y>u.y&&(d=s.y+n-u.y+l.y),s.y-d-h.y<0&&(d=s.y-h.y),(c||d)&&e.fire("autopanstart").panBy([c,d],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),En=function(t,e){return new Mn(t,e)};ei.mergeOptions({closePopupOnClick:!0}),ei.include({openPopup:function(t,e,i){return this._initOverlay(Mn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Ui.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Mn,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._popup._prepareOpen(t)&&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()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof $i?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}
2},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Sn=Cn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Cn.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){Cn.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=Cn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=pe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,r=n.latLngToContainerPoint(n.getCenter()),s=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=R(this.options.offset),c=this._getAnchor();"top"===a?(e=h/2,i=l):"bottom"===a?(e=h/2,i=0):"center"===a?(e=h/2,i=l/2):"right"===a?(e=0,i=l/2):"left"===a?(e=h,i=l/2):s.x<r.x?(a="right",e=0,i=l/2):(a="left",e=h+2*(u.x+c.x),i=l/2),t=t.subtract(R(e,i,!0)).add(u).add(c),we(o,"leaflet-tooltip-right"),we(o,"leaflet-tooltip-left"),we(o,"leaflet-tooltip-top"),we(o,"leaflet-tooltip-bottom"),ve(o,"leaflet-tooltip-"+a),Me(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Le(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return R(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zn=function(t,e){return new Sn(t,e)};ei.include({openTooltip:function(t,e,i){return this._initOverlay(Sn,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Ui.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Sn,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._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),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},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var An=Vi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(_e(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=R(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function kn(t){return new An(t)}Vi.Default=Yi;var On=Ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:It.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){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),fe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(me(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ge(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=a(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 O?t:new O(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,r=i.length;o<r;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!It.ielt9){Le(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);Le(o.el,r),r<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(M(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=pe("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(void 0!==t){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)):(fe(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=pe("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).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)fe(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}
2,_retainParent:function(t,e,i,n){var o=Math.floor(t/2),r=Math.floor(e/2),s=i-1,a=new O(+o,+r);a.z=+s;var h=this._tileCoordsToKey(a),l=this._tiles[h];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),s>n&&this._retainParent(o,r,s,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new O(o,r);s.z=i+1;var a=this._tileCoordsToKey(s),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1<n&&this._retainChildren(o,r,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 void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&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),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();It.any3d?Ce(t.el,o,n):Me(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),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),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new I(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),r=o.getCenter(),s=[],a=this.options.keepBuffer,h=new I(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&h.contains(new O(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var d=o.min.x;d<=o.max.x;d++){var p=new O(d,c);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],_);this._level.el.appendChild(_)}}}}},_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 F(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),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new D(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 O(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(fe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ve(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,It.ielt9&&this.options.opacity<1&&Le(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),Me(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})}
2,_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.loaded=+new Date,this._map._fadeAnimated?(Le(i.el,0),M(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ve(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),It.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(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 Bn(t){return new On(t)}var Rn=On.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=p(this,e)).detectRetina&&It.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ze(i,"load",o(this._tileOnLoad,this,e,i)),Ze(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:It.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){It.ielt9?setTimeout(o(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;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_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).onload=l,e.onerror=l,!e.complete)){e.src=v;var i=this._tiles[t].coords;fe(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",v),On.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return On.prototype._tileReady.call(this,t,e,i)}});function In(t,e){return new Rn(t,e)}var Zn=Rn.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 n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var r=(e=p(this,e)).detectRetina&&It.retina?2:1,s=this.getTileSize();n.width=s.x*r,n.height=s.y*r,this.wmsParams=n},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,Rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=Z(i.project(e[0]),i.project(e[1])),o=n.min,r=n.max,s=(this._wmsVersion>=1.3&&this._crs===Fi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Rn.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Dn(t,e){return new Zn(t,e)}Rn.WMS=Zn,In.wms=Dn;var Fn=Ui.extend({options:{padding:.1},initialize:function(t){p(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ve(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),o=this._map.project(this._center,e),r=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));It.any3d?Ce(this._container,r,i):Me(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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)).roun
2d();this._bounds=new I(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Nn=Fn.extend({options:{tolerance:0},getEvents:function(){var t=Fn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Fn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ze(t,"mousemove",this._onMouseMove,this),Ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,fe(this._container),Fe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Fn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=It.retina?2:1;Me(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",It.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Fn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(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[s(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("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,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,o,r,s=t._parts,a=s.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=s[i].length;n<o;n++)r=s[i][n],h[n?"lineTo":"moveTo"](r.x,r.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&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&&0!==i.weight&&(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,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],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&&(we(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,r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ve(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}}
2,_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;i&&(i.prev=n,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;n&&(n.next=i,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 Un(t){return It.canvas?new Nn(t):null}var jn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn={_initContainer:function(){this._container=pe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Fn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=jn("shape");ve(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=jn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(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;fe(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=jn("stroke")),o.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&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=jn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.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,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){me(t._container)},_bringToBack:function(t){ge(t._container)}},Wn=It.vml?jn:K,Hn=Fn.extend({_initContainer:function(){this._container=Wn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){fe(this._container),Fe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Fn.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)),Me(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=Wn("path");t.options.className&&ve(e,t.options.className),t.options.interactive&&ve(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){fe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(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,$(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){me(t._path)},_bringToBack:function(t){ge(t._path)}});function Vn(t){return It.svg||It.vml?new Hn(t):null}It.vml&&Hn.include(Gn),ei.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("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Un(t)||Vn(t)}});var qn=sn.extend({initialize:function(t,e){sn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
2,_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Yn(t,e){return new qn(t,e)}Hn.create=Wn,Hn.pointsToPath=$,hn.geometryToLayer=ln,hn.coordsToLatLng=cn,hn.coordsToLatLngs=dn,hn.latLngToCoords=pn,hn.latLngsToCoords=fn,hn.getFeature=_n,hn.asFeature=mn,ei.mergeOptions({boxZoom:!0});var Jn=fi.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(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Fe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){fe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),ne(),ze(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ze(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=pe("div","leaflet-zoom-box",this._container),ve(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),i=e.getSize();Me(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(fe(this._box),we(this._container,"leaflet-crosshair")),oe(),Ae(),Fe(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ei.addInitHook("addHandler","boxZoom",Jn),ei.mergeOptions({doubleClickZoom:!0});var Xn=fi.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,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});ei.addInitHook("addHandler","doubleClickZoom",Xn),ei.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Kn=fi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new yi(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))}ve(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){we(this._map._container,"leaflet-grab"),we(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=Z(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,o=(n-e+i)%t+e-i,r=(n+e+i)%t-e-i,s=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_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 o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=i.easeLinearity,a=o.multiplyBy(s/r),h=a.distanceTo([0,0]),l=Math.min(i.inertiaMaxSpeed,h),u=a.multiplyBy(l/h),c=l/(i.inertiaDeceleration*s),d=u.multiplyBy(-c/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),C(function(){e.panBy(d,{duration:c,easeLinearity:s,noMoveStart:!0,animate:!0})}
2)):e.fire("moveend")}}});ei.addInitHook("addHandler","dragging",Kn),ei.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $n=fi.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"),Ze(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(),Fe(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,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Fe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=R(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ye(t)}}});ei.addInitHook("addHandler","keyboard",$n),ei.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Qn=fi.extend({addHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Fe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ke(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(o(this._performZoom,this),n),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});ei.addInitHook("addHandler","scrollWheelZoom",Qn);var to=600;ei.mergeOptions({tapHold:It.touchNative&&It.safari&&It.mobile,tapTolerance:15});var eo=fi.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Fe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",qe),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),to),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Fe(document,"touchend",qe),Fe(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Fe(document,"touchend touchcancel contextmenu",this._cancel,this),Fe(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(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)}});ei.addInitHook("addHandler","tapHold",eo),ei.mergeOptions({touchZoom:It.touch,bounceAtZoomLimits:!0});var io=fi.extend({addHooks:function(){ve(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){we(this._map._container,"leaflet-touch-zoom"),Fe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!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),"center"!==e.options.touchZoom&&(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(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),qe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r
2=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(a,this,!0),qe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Fe(document,"touchmove",this._onTouchMove,this),Fe(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))):this._zooming=!1}});ei.addInitHook("addHandler","touchZoom",io),ei.BoxZoom=Jn,ei.DoubleClickZoom=Xn,ei.Drag=Kn,ei.Keyboard=$n,ei.ScrollWheelZoom=Qn,ei.TapHold=eo,ei.TouchZoom=io,t.Bounds=I,t.Browser=It,t.CRS=G,t.Canvas=Nn,t.Circle=en,t.CircleMarker=Qi,t.Class=S,t.Control=ni,t.DivIcon=An,t.DivOverlay=Cn,t.DomEvent=Qe,t.DomUtil=Ie,t.Draggable=yi,t.Evented=k,t.FeatureGroup=Wi,t.GeoJSON=hn,t.GridLayer=On,t.Handler=fi,t.Icon=Vi,t.ImageOverlay=wn,t.LatLng=N,t.LatLngBounds=D,t.Layer=Ui,t.LayerGroup=ji,t.LineUtil=ki,t.Map=ei,t.Marker=Xi,t.Mixin=mi,t.Path=$i,t.Point=O,t.PolyUtil=Bi,t.Polygon=sn,t.Polyline=on,t.Popup=Mn,t.PosAnimation=ti,t.Projection=Zi,t.Rectangle=qn,t.Renderer=Fn,t.SVG=Hn,t.SVGOverlay=Pn,t.TileLayer=Rn,t.Tooltip=Sn,t.Transformation=q,t.Util=E,t.VideoOverlay=bn,t.bind=o,t.bounds=Z,t.canvas=Un,t.circle=nn,t.circleMarker=tn,t.control=oi,t.divIcon=kn,t.extend=i,t.featureGroup=Hi,t.geoJSON=yn,t.geoJson=vn,t.gridLayer=Bn,t.icon=qi,t.imageOverlay=xn,t.latLng=U,t.latLngBounds=F,t.layerGroup=Gi,t.map=ii,t.marker=Ki,t.point=R,t.polygon=an,t.polyline=rn,t.popup=En,t.rectangle=Yn,t.setOptions=p,t.stamp=s,t.svg=Vn,t.svgOverlay=Tn,t.tileLayer=In,t.tooltip=zn,t.transformation=Y,t.version=e,t.videoOverlay=Ln;var no=window.L;t.noConflict=function(){return window.L=no,this},window.L=t}(e)},d(f={path:p,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},f.exports),f.exports);const m=t=>{return t.icon?(n=t.icon,new _.Icon({iconUrl:n.url,iconSize:[n.size.width,n.size.height],popupAnchor:[0,-n.size.height/2]})):t.iconLabel?(i=t.iconLabel,_.divIcon({html:`<div><img src="${i.icon?i.icon:u.defaultMarkerUrl}" /></div><label>${i.label}</label>`,className:"poi-icon-label"})):(e=t.contentHTML,new _.DivIcon({html:e}));var e,i,n},g=t=>{const{latitude:e,longitude:i}=t.coords;t.maxZoom||(t.maxZoom=u.maxZoom);const n=new _.Marker([e,i],{icon:m(t),zIndexOffset:u.zIndexOffset}),o=(t=>{if(!t.contentPopupHTML)return null;const{latitude:e,longitude:i}=t.coords;return(new _.Popup).setContent(t.contentPopupHTML).setLatLng([e,i])})(t);return o&&n.bindPopup(o).openPopup(),{poi:t,marker:n}},y=t=>!("isConnected"in t)||t.isConnected,v=((t,e)=>{let i;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{i=0,t(...n)},e)}})(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(y))},2e3),w=t=>"function"==typeof t?t():t,x=(t,e)=>{const i=t.indexOf(e);i>=0&&(t[i]=t[t.length-1],t.length--)},{state:b,onChange:P}=((t,e)=>{const i=((t,e=(t,e)=>t!==e)=>{const i=w(t);let n=new Map(Object.entries(null!=i?i:{}));const o={dispose:[],get:[],set:[],reset:[]},r=()=>{var e;n=new Map(Object.entries(null!==(e=w(t))&&void 0!==e?e:{})),o.reset.forEach(t=>t())},s=t=>(o.get.forEach(e=>e(t)),n.get(t)),a=(t,i)=>{const r=n.get(t);e(i,r,t)&&(n.set(t,i),o.set.forEach(e=>e(t,i,r)))},h="undefined"==typeof Proxy?{}:new Proxy(i,{get:(t,e)=>s(e),ownKeys:t=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>n.has(e),set:(t,e,i)=>(a(e,i),!0)}),l=(t,e)=>(o[t].push(e),()=>{x(o[t],e)});return{state:h,get:s,set:a,on:l,onChange:(e,i)=>{const n=l("set",(t,n)=>{t===e&&i(n)}),o=l("reset",()=>i(w(t)[e]));return()=>{n(),o()}},use:(...t)=>{const e=t.reduce((t,e)=>(e.set&&t.push(l("set",e.set)),e.get&&t.push(l("get",e.get)),e.reset&&t.push(l("reset",e.reset)),e.dispose&&t.push(l("dispose",e.dispose)),t),[]);return()=>e.forEach(t=>t())},dispose:()=>{o.dispose.forEach(t=>t()),r()},reset:r,forceUpdate:t=>{const e=n.get(t);o.set.forEach(i=>
2i(t,e,e))}}})(t,e);return i.use((()=>{if("function"!=typeof n.g)return{};const t=new Map;return{dispose:()=>t.clear(),get:e=>{const i=(0,n.g)();i&&((t,e,i)=>{const n=t.get(e);n?n.includes(i)||n.push(i):t.set(e,[i])})(t,e,i)},set:e=>{const i=t.get(e);i&&t.set(e,i.filter(n.f)),v(t)},reset:()=>{t.forEach(t=>t.forEach(n.f)),v(t)}}})()),i})({currentFrame:0,weatherForecast:[],weatherMergedForecast:[],webGLForecast:[]});P("weatherForecast",t=>{b.weatherMergedForecast=[...t].sort((t,e)=>t.epoch-e.epoch)});const T=navigator.userAgent;function C(){return/\b(iPad|iPhone|iPod)\b/.test(T)&&/WebKit/.test(T)&&!/Edge/.test(T)&&!window.MSStream}function M(t,e,i){let n="";for(let o=t;o>0;o--){let t=0;const r=1<<o-1;0!==(e&r)&&t++,0!==(i&r)&&(t+=2),n+=t}return n}function E(t){return Object.keys(t).map(e=>t[e]).map(t=>Object.assign({},t.coords))}function S(t){return Object.keys(t).map(e=>t[e].el).filter(t=>t.firstChild).map(t=>t.firstChild)}class z{constructor(){this.images={},this.tileSize=l.tileSize,this.createOffscreenCanvas()}cleanUp(){this.images={}}addImage(t,e,i){const n=`${e.x}:${e.y}:${e.z}`;this.images[n]={img:t,coords:e,size:i}}createOffscreenCanvas(){const t=_.DomUtil.create("canvas","leaflet-tile");t.id="offscreen",t.style.display="none",this.offscreenCanvas=t}checkTileConsistency(t){const e=E(t._tiles),i=S(t._tiles);if(e.length===i.length)return cancelAnimationFrame(this.animationFrame),this.smoothLayers(e,i);this.animationFrame=requestAnimationFrame(()=>this.checkTileConsistency(t))}loadEventCallback({target:t},e){cancelAnimationFrame(this.animationFrame),e?this.animationFrame=requestAnimationFrame(()=>this.checkTileConsistency(t)):this.images={}}smoothLayers(t,e,i=!1){const n=t.map(t=>t.x),o=t.map(t=>t.y),r=Math.min(...n),s=Math.min(...o),a=Math.max(...n),h=Math.max(...o),l=(a-r+1)*this.tileSize,u=(h-s+1)*this.tileSize;this.offscreenCanvas.width=l,this.offscreenCanvas.height=u;const c=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0});c.clearRect(0,0,l,u),t.forEach(t=>{const i=`${t.x}:${t.y}:${t.z}`,n=(t.x-r)*this.tileSize,o=(t.y-s)*this.tileSize;if(!e.find(t=>t.getAttribute("coords")===i)||!this.images[i])return;const a=this.images[i].img;c.drawImage(a,n,o,this.tileSize,this.tileSize)});const d=C()?2:3;C()?function(t,e,i,n){const o=t.getImageData(0,0,e,i),r=o.data;let s,a=2*n+1,h=1/(a*a),l=[];for(let t=0;t<r.length;t+=4){let e=r[t+3]/255;l.push({r:r[t]*e,g:r[t+1]*e,b:r[t+2]*e,a:e})}for(let t=0;t<l.length;t++){let o=Math.floor(t/e),a=t%e,u=0,c=0,d=0,p=0;for(let t=o-n;t<=o+n;t++)for(let o=a-n;o<=a+n;o++){let n=Math.max(0,Math.min(o,e-1));s=l[Math.max(0,Math.min(t,i-1))*e+n],u+=s.r*h,c+=s.g*h,d+=s.b*h,p+=s.a*h}p>0?(u/=p,c/=p,d/=p):u=c=d=0,r[4*t]=u,r[4*t+1]=c,r[4*t+2]=d,r[4*t+3]=255*p}t.putImageData(o,0,0)}(c,l,u,d):(c.filter=`blur(${d}px)`,c.drawImage(this.offscreenCanvas,0,0,l,u)),t.forEach(t=>{const e=`${t.x}:${t.y}:${t.z}`,n=document.querySelector(`canvas[coords="${e}"]`);if(!n)return;if("true"===n.getAttribute("already-smoothed")&&!i)return;const o=n.getContext("2d"),a=(t.x-r)*this.tileSize,h=(t.y-s)*this.tileSize;_.Util.requestAnimFrame(()=>{i&&o.clearRect(0,0,this.tileSize,this.tileSize),o.drawImage(this.offscreenCanvas,a,h,this.tileSize,this.tileSize,0,0,this.tileSize,this.tileSize)}),n.setAttribute("already-smoothed","true")})}}const A=t=>{try{const{origin:e}=new URL(t);return e}catch(e){throw console.error(`Invalid URL: ${t} provided.`),new Error(`Invalid URL: ${t} provided.`)}};_.TileLayer.WeatherLayer=_.TileLayer.extend({initialize(t){var e,i,n,o,r;this.layerTipe="Weather",this.map=t.map,this.postProcessor=new z,this.tileSmoothing=null!==(e=t.tileSmoothing)&&void 0!==e&&e,this.firstLoad=!0,this.preloadFramesDepth=Boolean(null===(i=null==t?void 0:t.preloadFrames)||void 0===i?void 0:i.ALL_FRAMES)?b.weatherMergedForecast.length:null!==(o=null===(n=t.preloadFrames)||void 0===n?void 0:n.depth)&&void 0!==o?o:0;this.limitZoom=null!==(r=t.max_zoom_level)&&void 0!==r?r:8;try{this.url=t.url,this.urlOrigin=A(t.url)}catch(e){throw console.error(`Invalid URL: ${t.url} provided when initializing Weather Layer.`),e}this.onTileLoadingError=t.onTileLoadingError,this.setOpacity(t.opacity?t.opacity:l.opacity),_.TileLayer.prototype.initialize.call(this,t),this.tileSmoothing&&this.on("load",t=>this.postProcessor.loadEventCallback(t,this.lazyTileRenderingEnabled())),this.map.on("zoomend",()=>this.preloadNextSetOfTiles()),this.on("load",()=>{this.firstLoad&&this.preloadFrames(),this.firstLoad=!1})},preloadFrames(){if(!this.preloadFramesDepth)return;const t=E(this._tiles);for(let e=b.currentFrame+2;e<this.preloadFramesDepth;e++)t.forEach(t=>setTimeout(()=>this.loadCache(t,e).catch(()=>{}),1))},getTileSize:()=>new _.Point(l.tileSize,l.tileSize,!1),lazyTileRenderingEnabled(){return!!this.tileSmoothing&&this._tileZoom>this.limitZoom}
2,getTiles(t,e,i){const n=function(t,e,i){const n=Math.PI*t/180,o=Math.pow(2,i);return{x:Math.floor(o*((e+180)/360)),y:Math.floor(o*(1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2),z:i}}(t,e,i),o=[];for(let t=n.x-1;t<=n.x+1;t++)for(let e=n.y-1;e<=n.y+1;e++)o.push({x:t,y:e,z:i});return o.push({x:n.x-2,y:n.y-1,z:i}),o.push({x:n.x-2,y:n.y,z:i}),o.push({x:n.x-2,y:n.y+1,z:i}),o.push({x:n.x+2,y:n.y-1,z:i}),o.push({x:n.x+2,y:n.y,z:i}),o.push({x:n.x+2,y:n.y+1,z:i}),o},preloadNextSetOfTiles(){const t=this.map.getCenter(),e=this._tileZoom+1;setTimeout(()=>{this.getTiles(t.lat,t.lng,e).forEach(t=>this.loadCache(t,b.currentFrame))},0)},addPostProcessingImage(t,e,i){this.lazyTileRenderingEnabled()&&this.postProcessor.addImage(t,e,i)},createTile(t){const e=_.DomUtil.create("div","leaflet-tile"),i=this.getTileSize();e.style.width=i.x,e.style.height=i.y;const n=_.DomUtil.create("canvas");n.width=i.x,n.height=i.y,n.setAttribute("coords",`${t.x}:${t.y}:${t.z}`),this.clearCanvas(n);const o=n.getContext("2d");return this.loadImage(t,b.currentFrame).then(r=>{this.addPostProcessingImage(r,t,i),o.drawImage(r,0,0,i.x,i.y),e.appendChild(n)}),this.loadCache(t,b.currentFrame+1),e},drawImageOnTile(t,e){const i=t.el.querySelector("canvas");this.clearCanvas(i);i.getContext("2d").drawImage(t.el.querySelector(`img[data-index="${e}"]`),0,0)},loadImage(t,e){return new Promise((i,n)=>{const{x:o,y:r,z:s}=t,a=M(s,o,r),h=b.weatherMergedForecast[e].url.replace("{quadkey}",a),l=new Image;l.src=`${this.urlOrigin}${h}`,l.style.position="absolute",l.style.opacity="0",l.setAttribute("crossOrigin","anonymous"),l.setAttribute("data-index",e.toString()),l.onload=()=>i(l),l.onerror=n})},loadFrame(t){const e=Object.keys(this._tiles).length,i=this.getTileSize();let n=0;const o=o=>r=>{if(this.lazyTileRenderingEnabled())return n++,this.addPostProcessingImage(r,o.coords,i),void(n===e&&this.postProcessor.smoothLayers(E(this._tiles),S(this._tiles),!0));o.el.appendChild(r),_.Util.requestAnimFrame(()=>{this.drawImageOnTile(o,t)}
2)};for(const e in this._tiles){const i=this._tiles[e];if(i.current&&i.active){if(i.el.querySelector(`img[data-index="${t}"]`)){_.Util.requestAnimFrame(()=>{this.drawImageOnTile(i,t)});continue}this.loadImage(i.coords,t).then(o(i))}this.loadCache(i.coords,t+1)}},lazyLoadFrame(t){for(const e in this._tiles){const i=this._tiles[e];this.loadCache(i.coords,t)}},loadCache(t,e){return new Promise((i,n)=>{const{x:o,y:r,z:s}=t,a=M(s,o,r);if(!b.weatherMergedForecast[e])return;const h=b.weatherMergedForecast[e].url.replace("{quadkey}",a),l=new Image;l.style.position="absolute",l.style.opacity="0",l.setAttribute("data-index",e.toString()),l.src=`${this.urlOrigin}${h}`,l.onload=()=>i(l),l.onerror=n})},clearCanvas(t){const e=t.getContext("2d");e.beginPath(),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.width,t.height),e.restore()}});function k(t,e,i){const n=t.createShader(e);if(t.shaderSource(n,i),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function O(t,e,i){const n=t.createProgram(),o=k(t,t.VERTEX_SHADER,e),r=k(t,t.FRAGMENT_SHADER,i);if(t.attachShader(n,o),t.attachShader(n,r),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS))throw new Error(t.getProgramInfoLog(n));const s={program:n},a=t.getProgramParameter(n,t.ACTIVE_ATTRIBUTES);for(let e=0;e<a;e++){const i=t.getActiveAttrib(n,e);s[i.name]=t.getAttribLocation(n,i.name)}const h=t.getProgramParameter(n,t.ACTIVE_UNIFORMS);for(let e=0;e<h;e++){const i=t.getActiveUniform(n,e);s[i.name]=t.getUniformLocation(n,i.name)}return s}function B(t,e,i,n,o){const r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),i instanceof Uint8Array?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,n,o,0,t.RGBA,t.UNSIGNED_BYTE,i):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i),t.bindTexture(t.TEXTURE_2D,null),r}function R(t,e,i){t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e)}function I(t,e){const i=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,i),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW),i}function Z(t,e,i,n){t.bindBuffer(t.ARRAY_BUFFER,e),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,n,t.FLOAT,!1,0,0)}function D(t,e,i){t.bindFramebuffer(t.FRAMEBUFFER,e),i&&t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0)}const F="precision mediump float;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_tex_pos;\n\nvoid main() {\n v_tex_pos = a_pos;\n gl_Position = vec4(1.0 - 2.0 * a_pos, 0, 1);\n}\n",N={0:"#FFFFFF",.1:"#FFFFFF",.2:"#FFFFFF",.3:"#FFFFFF",.4:"#FFFFFF",.5:"#FFFFFF",.6:"#FFFFFF",1:"#FFFFFF"},U={fadeOpacity:.983,speedFactor:.26,dropRate:.03,dropRateBump:0,particleSize:1.5,numParticles:3e3,opacity:1},j=function(t,e){const i=Object.assign({},U,e);this.gl=t,this.fadeOpacity=i.fadeOpacity,this.speedFactor=i.speedFactor,this.dropRate=i.dropRate,this.dropRateBump=i.dropRateBump,this.numParticles=i.numParticles,this.particleSize=i.particleSize,this.opacity=i.opacity,this.drawProgram=O(t,"precision mediump float;\n\nuniform float u_particle_size;\nattribute float a_index;\n\nuniform sampler2D u_particles;\nuniform float u_particles_res;\n\nvarying highp vec2 v_particle_pos;\n\nvoid main() {\n vec4 color = texture2D(u_particles, vec2(\n fract(a_index / u_particles_res),\n floor(a_index / u_particles_res) / u_particles_res));\n\n // decode current particle position from the pixel's RGBA value\n v_particle_pos = vec2(\n color.r / 255.0 + color.b,\n color.g / 255.0 + color.a);\n\n gl_PointSize = u_particle_size;\n gl_Position = vec4(2.0 * v_particle_pos.x - 1.0, 1.0 - 2.0 * v_particle_pos.y, 0, 1);\n}\n","precision mediump float;\n\nuniform sampler2D u_wind;\nuniform vec2 u_wind_min;\nuniform vec2 u_wind_max;\nuniform sampler2D u_color_ramp;\n\nvarying vec2 v_particle_pos;\n\nvoid main() {\n vec2 velocity = mix(u_wind_min, u_wind_max, texture2D(u_wind, v_particle_pos).rg);\n float speed_t = length(velocity) / length(u_wind_max);\n\n // color ramp is encoded in a 16x16 texture\n vec2 ramp_pos = vec2(\n fract(16.0 * speed_t),\n floor(16.0 * speed_t) / 16.0);\n\n gl_FragColor = texture2D(u_color_ramp, ramp_pos);\n}\n"),this.screenProgram=O(t,F,"precision mediump float;\n\nuniform sampler2D u_screen;\nuniform float u_opacity;\n\nvarying highp vec2 v_tex_pos;\n\nvoid main() {\n vec4 color = texture2D(u_screen, 1.0 - v_tex_pos);\n // a hack to guarantee opacity fade out even with a value close to 1.0\n gl_FragColor = vec4(floor(255.0 * color * u_opacity) / 255.0);\n}\n"),this.updateProgram=O(t,F,"precision highp float;\n\nuniform sampler2D u_particles;\nuniform sampler2D u_wind;\nuniform vec2 u_wind_res;\nuniform vec2 u_wind_min;\nuniform vec2 u_wind_max;\nuniform float u_rand_seed;\nuniform float u_speed_factor;\nuniform float u_drop_rate;\nuniform float u_drop_rate_bump;\n\nvarying vec2 v_tex_pos;\n\n// pseudo-random generator\nconst vec3 rand_constants = vec3(12.9898, 78.233, 4375.85453);\nfloat rand(const vec2 co) {\nfloat t = dot(rand_constants.xy, c
2o);\nreturn fract(sin(t) * (rand_constants.z + t));\n}\n\n// wind speed lookup; use manual bilinear filtering based on 4 adjacent pixels for smooth interpolation\nvec2 lookup_wind(const vec2 uv) {\n// return texture2D(u_wind, uv).rg; // lower-res hardware filtering\nvec2 px = 1.0 / u_wind_res;\nvec2 vc = (floor(uv * u_wind_res)) * px;\nvec2 f = fract(uv * u_wind_res);\nvec2 tl = texture2D(u_wind, vc).rg;\nvec2 tr = texture2D(u_wind, vc + vec2(px.x, 0)).rg;\nvec2 bl = texture2D(u_wind, vc + vec2(0, px.y)).rg;\nvec2 br = texture2D(u_wind, vc + px).rg;\nreturn mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\n\nvoid main() {\nvec4 color = texture2D(u_particles, v_tex_pos);\nvec2 pos = vec2(\ncolor.r / 255.0 + color.b,\ncolor.g / 255.0 + color.a); // decode particle position from pixel RGBA\n\nvec2 temp = mix(u_wind_min, u_wind_max, lookup_wind(pos));\nfloat vecvx = temp.x;\nfloat vecvy = temp.y;\nvec2 velocity = vec2(vecvx, vecvy);\nfloat vel_lin = abs(sqrt(velocity.x*velocity.x + velocity.y*velocity.y));\n\nif(vel_lin > 20.0){\n velocity.x=velocity.x*(20.0/vel_lin);\n velocity.y=velocity.y*(20.0/vel_lin);\n}else if(vel_lin < 4.0){\n velocity.x=velocity.x*(4.0/vel_lin);\n velocity.y=velocity.y*(4.0/vel_lin);\n}\nfloat speed_t = length(velocity) / length(u_wind_max);\n\nvec2 offset = vec2(velocity.x, -velocity.y) * 0.0001 * u_speed_factor;\n\n// update particle position, wrapping around the date line\npos = fract(1.0 + pos + offset);\n\n// a random seed to use for the particle drop\nvec2 seed = (pos + v_tex_pos) * u_rand_seed;\n\n// drop rate is a chance a particle will restart at random position, to avoid degeneration\nfloat drop_rate = u_drop_rate + speed_t * u_drop_rate_bump;\nfloat drop = step(1.0 - drop_rate, rand(seed));\n\nvec2 random_pos = vec2(\nrand(seed + 1.3),\nrand(seed + 2.1));\npos = mix(pos, random_pos, drop);\n\n// encode the new particle position back into RGBA\ngl_FragColor = vec4(\nfract(pos * 255.0),\nfloor(pos * 255.0) / 255.0);\n}\n"),this.quadBuffer=I(t,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),this.framebuffer=t.createFramebuffer(),this.setColorRamp(N),this.resize()},G={numParticles:{}};j.prototype.resize=function(){const t=this.gl,e=new Uint8Array(t.canvas.width*t.canvas.height*4);this.backgroundTexture=B(t,t.NEAREST,e,t.canvas.width,t.canvas.height),this.screenTexture=B(t,t.NEAREST,e,t.canvas.width,t.canvas.height)},j.prototype.setColorRamp=function(t){this.colorRampTexture=B(this.gl,this.gl.LINEAR,function(t){const e=document.createElement("canvas"),i=e.getContext("2d");e.width=256,e.height=1;const n=i.createLinearGradient(0,0,256,0);for(const e in t)n.addColorStop(+e,t[e]);return i.fillStyle=n,i.fillRect(0,0,256,1),new Uint8Array(i.getImageData(0,0,256,1).data)}(t),16,16)},G.numParticles.set=function(t){const e=this.gl,i=this.particleStateResolution=Math.ceil(Math.sqrt(t));this._numParticles=i*i;const n=new Uint8Array(4*this._numParticles);for(let t=0;t<n.length;t++)n[t]=Math.floor(256*Math.random());this.particleStateTexture0=B(e,e.NEAREST,n,i,i),this.particleStateTexture1=B(e,e.NEAREST,n,i,i);const o=new Float32Array(this._numParticles);for(let t=0;t<this._numParticles;t++)o[t]=t;this.particleIndexBuffer=I(e,o)},G.numParticles.get=function(){return this._numParticles},j.prototype.setWind=function(t){this.windData=t,this.windTexture=B(this.gl,this.gl.LINEAR,t.image)},j.prototype.draw=function(){const t=this.gl;t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),R(t,this.windTexture,0),R(t,this.particleStateTexture0,1),this.drawScreen(),this.updateParticles()},j.prototype.drawScreen=function(){const t=this.gl;D(t,this.framebuffer,this.screenTexture),t.viewport(0,0,t.canvas.width,t.canvas.height),this.drawTexture(this.backgroundTexture,this.fadeOpacity),this.drawParticles(),D(t,null),t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA),this.drawTexture(this.screenTexture,this.opacity),t.disable(t.BLEND);const e=this.backgroundTexture;this.backgroundTexture=this.screenTexture,this.screenTexture=e},j.prototype.drawTexture=function(t,e){const i=this.gl,n=this.screenProgram;i.useProgram(n.program),Z(i,this.quadBuffer,n.a_pos,2),R(i,t,2),i.uniform1i(n.u_screen,2),i.uniform1f(n.u_opacity,e),i.drawArrays(i.TRIANGLES,0,6)},j.prototype.drawParticles=function(){const t=this.gl,e=this.drawProgram;t.useProgram(e.program),Z(t,this.particleIndexBuffer,e.a_index,1),R(t,this.colorRampTexture,2),t.uniform1i(e.u_wind,0),t.uniform1i(e.u_particles,1
2),t.uniform1i(e.u_color_ramp,2),t.uniform1f(e.u_particle_size,this.particleSize),t.uniform1f(e.u_particles_res,this.particleStateResolution),t.uniform2f(e.u_wind_min,this.windData.uMin,this.windData.vMin),t.uniform2f(e.u_wind_max,this.windData.uMax,this.windData.vMax),t.drawArrays(t.POINTS,0,this._numParticles)},j.prototype.updateParticles=function(){const t=this.gl;D(t,this.framebuffer,this.particleStateTexture1),t.viewport(0,0,this.particleStateResolution,this.particleStateResolution);const e=this.updateProgram;t.useProgram(e.program),Z(t,this.quadBuffer,e.a_pos,2),t.uniform1i(e.u_wind,0),t.uniform1i(e.u_particles,1),t.uniform1f(e.u_rand_seed,Math.random()),t.uniform2f(e.u_wind_res,this.windData.width,this.windData.height),t.uniform2f(e.u_wind_min,this.windData.uMin,this.windData.vMin),t.uniform2f(e.u_wind_max,this.windData.uMax,this.windData.vMax),t.uniform1f(e.u_speed_factor,this.speedFactor),t.uniform1f(e.u_particle_size,this.particleSize),t.uniform1f(e.u_drop_rate,this.dropRate),t.uniform1f(e.u_drop_rate_bump,this.dropRateBump),t.drawArrays(t.TRIANGLES,0,6);const i=this.particleStateTexture0;this.particleStateTexture0=this.particleStateTexture1,this.particleStateTexture1=i},Object.defineProperties(j.prototype,G);const W=(t,e,i)=>t<=e?e:t>=i?i:t,H=(t,e,i)=>{const n=Math.floor((t+180)/360*Math.pow(2,e));return i?n+1:n},V=(t,e,i)=>{const n=Math.floor((1-Math.log(Math.tan(t*Math.PI/180)+1/Math.cos(t*Math.PI/180))/Math.PI)/2*Math.pow(2,e));return i?n-1:n},q=()=>{const t=document.querySelector("plm-maps-viewer"),e=document.querySelector(".leaflet-tile-pane"),i=document.querySelector(".leaflet-webgllayer");document.querySelector(`#${a.htmlId}`).style.display="block",t.lastElementChild.classList.contains("leaflet-webgllayer")&&t.removeChild(i),e.appendChild(i)},Y=()=>{const t=document.querySelector("plm-maps-viewer"),e=document.querySelector(".leaflet-tile-pane"),i=document.querySelector(".leaflet-webgllayer");document.querySelector(`#${a.htmlId}`).style.display="none",e.lastElementChild.classList.contains("leaflet-webgllayer")&&e.removeChild(i),t.appendChild(i)},J=t=>t.split("/")[1],X=t=>t.split("/")[3],K=t=>{const e=document.querySelector(`#${t}`);return e.setAttribute("class","leaflet-tile-container leaflet-zoom-animated plm-maps-viewer"),e};_.TileLayer.WebGL=_.TileLayer.extend({initialize(t){this.layerTipe="WebGL";try{this.urlOrigin=A(t.url)}catch(t){throw console.error("Invalid URL provided when initializing WebGL Layer."),t}this.windConfig=t.windConfig,this.opacity=t.opacity,this.canvas=K(a.htmlId),this.tileSize=l.tileSize,this.onTileLoadingError=t.onTileLoadingError,this.requestAnimationFrame=null,this.map=t.map,this.maxZoom=5,this.windData={image:null,uMin:-128,uMax:127,vMin:-128,vMax:127,width:0,height:0},q(),this.initializeWebGL(),_.TileLayer.prototype.initialize.call(this,t)},initializeWebGL(){const t=document.querySelector(".plm-maps-viewer");this.canvas.width=t.clientWidth,this.canvas.height=t.clientHeight,this.windGL=new j(this.canvas.getContext("webgl",{antialiasing:!1}),Object.assign({},this.windConfig,this.opacity)),this.zoom=this.map.getZoom(),this.tiles=[],this.fitCanvasToMap(),this.drawViewportWindImage(b.currentFrame),this.render()},createTile(t,e){const i=_.DomUtil.create("div","leaflet-tile");return setTimeout(()=>e(null,i),0),i},loadFrame(t){this.drawViewportWindImage(t)},async drawViewportWindImage(t){t>=b.webGLForecast.length&&(t=b.webGLForecast.length-1),this.tiles=await this.fetchTiles(t),this.drawTiles();const e=this.getStartingViewportXYPoi(),i=new Image;i.onload=()=>{const t=new Image;this.windData.image=t,t.onload=()=>this.windGL.setWind(this.windData),t.onerror=this.onTileLoadingError,t.src=this.cropImage(i,e.x,e.y)},i.onerror=this.onTileLoadingError,i.src=this.windCanvas.toDataURL("image/png")},render(){this.requestAnimationFrame&&cancelAnimationFrame(this.requestAnimationFrame);const t=()=>{var e;(null===(e=this.windGL)||void 0===e?void 0:e.windData)&&this.windGL.draw(),this.requestAnimationFrame=requestAnimationFrame(t)};t()},fitCanvasToMap(){const t=document.querySelector(".leaflet-map-pane"),e=getComputedStyle(t).transform.match(/matrix.*\((.+)\)/)[1].split(", "),i=e[4],n=e[5];document.getElementById(a.htmlId).style.transform=`translate3d(${-i}px, ${-n}px, 0px)`},fetchTiles(t){this.zoom=this.map.getZoom();const{nwCX:e,nwCY:i}=this.getMapBounds(),n=this.createXyMapMatrix().map(({x:n,y:o})=>{const r=((t,e,i)=>{let n="";for(let o=t;o>0;o--){let t=0,r=1<<o-1;0!=(e&r)&&t++,0!=(i&r)&&(t+=2),n+=t}return n})(this.zoom,e+n,i+o);return{key:r,x:n*this.tileSize,y:o*this.tileSize,src:this.getQuadkeyURL(r,t)}});return new Promise((t,e)=>{const i=n.map(({src:t})=>this.onImageLoaded(t));return Promise.all(i).then(e=>{t(n.map((t,i)=>(t.img=e[i],t)))}).catch(t=>e(t))})},drawTiles(){const{nwCY:t,seCY:e}=this.getMapBounds(),i=e-t+1,n=this.tiles.length/i;this.windCanvas=K(h.htmlId),this.windCanvas.width=n*this.tileSize,this.windCanvas.height=i*this.tileSize,this.windData.width=this.canvas.width,this.windData.height=this.canvas.height;const o=this.windCanvas.getContext("2d");
2this.tiles.forEach(t=>{o.drawImage(t.img,t.x,t.y)})},cropImage(t,e,i){const n=document.createElement("canvas"),o=n.getContext("2d");return n.width=this.canvas.width,n.height=this.canvas.height,o.drawImage(t,e,i,this.canvas.width,this.canvas.height,0,0,this.canvas.width,this.canvas.height),n.toDataURL()},onImageLoaded:t=>new Promise((e,i)=>{const n=new Image;n.src=t,n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=i}),getQuadkeyURL(t,e){const i=b.webGLForecast[e].url;return`${this.urlOrigin}${i.replace("{quadkey}",t)}`},getMapBounds(){const t=this.map.getBounds(),e=t.getNorthWest(),i=t.getSouthEast(),n=this.map.getZoom();return{nwCX:Math.max(H(e.lng,n,!0)-1,0),nwCY:Math.max(V(e.lat,n,!1),0),seCX:H(i.lng,n,!0),seCY:V(i.lat,n,!1)}},getStartingViewportXYPoi(){const t=(t=>{let e=0,i=0;const n=t.length;for(let o=n;o>0;o--){const r=1<<o-1;switch(t[n-o]){case"0":break;case"1":e|=r;break;case"2":i|=r;break;case"3":e|=r,i|=r}}return{z:n,x:e,y:i}})(this.tiles[0].key),e=((t,e,i)=>{let n={x:256*t,y:256*e};return i&&(n.x+=128,n.y+=128),n})(t.x,t.y,!1),i=((t,e,i)=>{t=W(t,c.MinLatitude,c.MaxLatitude);let n=((e=W(e,c.MinLongitude,c.MaxLongitude))+180)/360,o=Math.sin(t*Math.PI/180),r=.5-Math.log((1+o)/(1-o))/(4*Math.PI),s=(t=>256<<t)(i),a={x:0,y:0};return a.x=Math.trunc(W(n*s+.5,0,s-1)),a.y=Math.trunc(W(r*s+.5,0,s-1)),a})(this.map.getBounds().getNorthWest().lat,this.map.getBounds().getNorthWest().lng,this.zoom);return{x:i.x-e.x||0,y:i.y-e.y||0}},createXyMapMatrix(){const{nwCX:t,nwCY:e,seCX:i,seCY:n}=this.getMapBounds(),o=i-t,r=n-e+1;return Array.from({length:r},(t,e)=>Array.from({length:o},(t,i)=>({x:i,y:e}))).flat()}});const $=t=>{const e=new CustomEvent(l.tileLoadingErrorEventName,{detail:t.path[0].src});window.dispatchEvent(e)},Q=(t,e,i)=>{return n={opacity:t.opacity?t.opacity:l.opacity,url:t.url,map:i,tileSmoothing:t.tileSmoothing,preloadFrames:t.preloadFrames,onTileLoadingError:$,max_zoom_level:e.bounds.max_zoom_level},new _.TileLayer.WeatherLayer(n);var n},tt=(t,e)=>{return i={url:e.url,windConfig:e.windConfig||{},opacity:e.opacity?e.opacity:l.hide,map:t,onTileLoadingError:$},new _.TileLayer.WebGL(i);var i};var et,it=function(t,e){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return t.apply(e,i)}},nt=Object.prototype.toString,ot=(et=Object.create(null),function(t){var e=nt.call(t);return et[e]||(et[e]=e.slice(8,-1).toLowerCase())});function rt(t){return t=t.toLowerCase(),function(e){return ot(e)===t}}function st(t){return Array.isArray(t)}function at(t){return void 0===t}var ht=rt("ArrayBuffer");function lt(t){return null!==t&&"object"==typeof t}function ut(t){if("object"!==ot(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var ct=rt("Date"),dt=rt("File"),pt=rt("Blob"),ft=rt("FileList");function _t(t){return"[object Function]"===nt.call(t)}var mt=rt("URLSearchParams");function gt(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),st(t))for(var i=0,n=t.length;i<n;i++)e.call(null,t[i],i,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var yt,vt=(yt="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return yt&&t instanceof yt}),wt={isArray:st,isArrayBuffer:ht,isBuffer:function(t){return null!==t&&!at(t)&&null!==t.constructor&&!at(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||nt.call(t)===e||_t(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&ht(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:lt,isPlainObject:ut,isUndefined:at,isDate:ct,isFile:dt,isBlob:pt,isFunction:_t,isStream:function(t){return lt(t)&&_t(t.pipe)},isURLSearchParams:mt,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}
2,forEach:gt,merge:function t(){var e={};function i(i,n){ut(e[n])&&ut(i)?e[n]=t(e[n],i):ut(i)?e[n]=t({},i):st(i)?e[n]=i.slice():e[n]=i}for(var n=0,o=arguments.length;n<o;n++)gt(arguments[n],i);return e},extend:function(t,e,i){return gt(e,function(e,n){t[n]=i&&"function"==typeof e?it(e,i):e}),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,i,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,i&&Object.assign(t.prototype,i)},toFlatObject:function(t,e,i){var n,o,r,s={};e=e||{};do{for(o=(n=Object.getOwnPropertyNames(t)).length;o-- >0;)s[r=n[o]]||(e[r]=t[r],s[r]=!0);t=Object.getPrototypeOf(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},kindOf:ot,kindOfTest:rt,endsWith:function(t,e,i){t=String(t),(void 0===i||i>t.length)&&(i=t.length),i-=e.length;var n=t.indexOf(e,i);return-1!==n&&n===i},toArray:function(t){if(!t)return null;var e=t.length;if(at(e))return null;for(var i=new Array(e);e-- >0;)i[e]=t[e];return i},isTypedArray:vt,isFileList:ft};function xt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var bt=function(t,e,i){if(!e)return t;var n;if(i)n=i(e);else if(wt.isURLSearchParams(e))n=e.toString();else{var o=[];wt.forEach(e,function(t,e){null!=t&&(wt.isArray(t)?e+="[]":t=[t],wt.forEach(t,function(t){wt.isDate(t)?t=t.toISOString():wt.isObject(t)&&(t=JSON.stringify(t)),o.push(xt(e)+"="+xt(t))}))}),n=o.join("&")}if(n){var r=t.indexOf("#");-1!==r&&(t=t.slice(0,r)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t};function Lt(){this.handlers=[]}Lt.prototype.use=function(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},Lt.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Lt.prototype.forEach=function(t){wt.forEach(this.handlers,function(e){null!==e&&t(e)})};var Pt=Lt,Tt=function(t,e){wt.forEach(t,function(i,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[n])})};function Ct(t,e,i,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}wt.inherits(Ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Mt=Ct.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(t){Et[t]={value:t}}),Object.defineProperties(Ct,Et),Object.defineProperty(Mt,"isAxiosError",{value:!0}),Ct.from=function(t,e,i,n,o,r){var s=Object.create(Mt);return wt.toFlatObject(t,s,function(t){return t!==Error.prototype}),Ct.call(s,t.message,e,i,n,o),s.name=t.name,r&&Object.assign(s,r),s};var St=Ct,zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var At=function(t,e){e=e||new FormData;var i=[];function n(t){return null===t?"":wt.isDate(t)?t.toISOString():wt.isArrayBuffer(t)||wt.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):o.from(t):t}return function t(o,r){if(wt.isPlainObject(o)||wt.isArray(o)){if(-1!==i.indexOf(o))throw Error("Circular reference detected in "+r);i.push(o),wt.forEach(o,function(i,o){if(!wt.isUndefined(i)){var s,a=r?r+"."+o:o;if(i&&!r&&"object"==typeof i)if(wt.endsWith(o,"{}"))i=JSON.stringify(i);else if(wt.endsWith(o,"[]")&&(s=wt.toArray(i)))return void s.forEach(function(t){!wt.isUndefined(t)&&e.append(a,n(t))});t(i,a)}}),i.pop()}else e.append(r,n(o))}(t),e},kt=wt.isStandardBrowserEnv()?{write:function(t,e,i,n,o,r){var s=[];s.push(t+"="+encodeURIComponent(e)),wt.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),wt.isString(n)&&s.push("path="+n),wt.isString(o)&&s.push("domain="+o),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Ot=function(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e},Bt=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Rt=wt.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(t){var n=t;return e&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(e){var i=wt.isString(e)?n(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0};function It(t){St.call(this,t??"canceled",St.ERR_CANCELED),this.name="CanceledError"}wt.inherits(It,St,{__CANCEL__:!0});var Zt=It,Dt=function(t){return new Promise(function(e,i){var n,o=t.data,r=t.headers,s=t.responseType;function a(){t.cancelToken&&t.cancelToken.unsubscribe(n),t.signal&&t.signal.removeEventListener("abort",n)}wt.isFormData(o)&&wt.isStandardBrowserEnv()&&delete r["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",u=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.Authorization="Basic "+btoa(l+":"+u)}var c=Ot(t.baseURL,t.url);function d(){if(h){var n,o,r,l,u,c="getAllResponseHeaders"in h?(n=h.getAllResponseHeaders(),u={},n?(wt.forEach(n.split("\n"),function(t){if(l=t.indexOf(":"),o=wt.trim(t.substr(0,l)).toLowerCase(),r=wt.trim(t.substr(l+1)),o){if(u[o]&&Bt.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([r]):u[o]?u[o]+", "+r:r}}
2),u):u):null;!function(t,e,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?e(new St("Request failed with status code "+i.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}(function(t){e(t),a()},function(t){i(t),a()},{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:c,config:t,request:h}),h=null}}if(h.open(t.method.toUpperCase(),bt(c,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,"onloadend"in h?h.onloadend=d:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(d)},h.onabort=function(){h&&(i(new St("Request aborted",St.ECONNABORTED,t,h)),h=null)},h.onerror=function(){i(new St("Network Error",St.ERR_NETWORK,t,h,h)),h=null},h.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||zt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(new St(e,n.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,t,h)),h=null},wt.isStandardBrowserEnv()){var p=(t.withCredentials||Rt(c))&&t.xsrfCookieName?kt.read(t.xsrfCookieName):void 0;p&&(r[t.xsrfHeaderName]=p)}"setRequestHeader"in h&&wt.forEach(r,function(t,e){void 0===o&&"content-type"===e.toLowerCase()?delete r[e]:h.setRequestHeader(e,t)}
2),wt.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),s&&"json"!==s&&(h.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(n=function(t){h&&(i(!t||t&&t.type?new Zt:t),h.abort(),h=null)},t.cancelToken&&t.cancelToken.subscribe(n),t.signal&&(t.signal.aborted?n():t.signal.addEventListener("abort",n))),o||(o=null);var f,_=(f=/^([-+\w]{1,25})(:?\/\/|:)/.exec(c))&&f[1]||"";_&&-1===["http","https","file"].indexOf(_)?i(new St("Unsupported protocol "+_+":",St.ERR_BAD_REQUEST,t)):h.send(o)})},Ft={"Content-Type":"application/x-www-form-urlencoded"};function Nt(t,e){!wt.isUndefined(t)&&wt.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Ut,jt={transitional:zt,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(Ut=Dt),Ut),transformRequest:[function(t,e){if(Tt(e,"Accept"),Tt(e,"Content-Type"),wt.isFormData(t)||wt.isArrayBuffer(t)||wt.isBuffer(t)||wt.isStream(t)||wt.isFile(t)||wt.isBlob(t))return t;if(wt.isArrayBufferView(t))return t.buffer;if(wt.isURLSearchParams(t))return Nt(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var i,n=wt.isObject(t),o=e&&e["Content-Type"];if((i=wt.isFileList(t))||n&&"multipart/form-data"===o){var r=this.env&&this.env.FormData;return At(i?{"files[]":t}:t,r&&new r)}return n||"application/json"===o?(Nt(e,"application/json"),function(t,e,i){if(wt.isString(t))try{return(e||JSON.parse)(t),wt.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(i||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||jt.transitional,i=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,o=!i&&"json"===this.responseType;if(o||n&&wt.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw St.from(t,St.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};wt.forEach(["delete","get","head"],function(t){jt.headers[t]={}}),wt.forEach(["post","put","patch"],function(t){jt.headers[t]=wt.merge(Ft)});var Gt=jt,Wt=function(t,e,i){var n=this||Gt;return wt.forEach(i,function(i){t=i.call(n,t,e)}),t},Ht=function(t){return!(!t||!t.__CANCEL__)};function Vt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Zt}var qt=function(t){return Vt(t),t.headers=t.headers||{},t.data=Wt.call(t,t.data,t.headers,t.transformRequest),t.headers=wt.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),wt.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Gt.adapter)(t).then(function(e){return Vt(t),e.data=Wt.call(t,e.data,e.headers,t.transformResponse),e},function(e){return Ht(e)||(Vt(t),e&&e.response&&(e.response.data=Wt.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})},Yt=function(t,e){e=e||{};var i={};function n(t,e){return wt.isPlainObject(t)&&wt.isPlainObject(e)?wt.merge(t,e):wt.isPlainObject(e)?wt.merge({},e):wt.isArray(e)?e.slice():e}function o(i){return wt.isUndefined(e[i])?wt.isUndefined(t[i])?void 0:n(void 0,t[i]):n(t[i],e[i])}function r(t){if(!wt.isUndefined(e[t]))return n(void 0,e[t])}function s(i){return wt.isUndefined(e[i])?wt.isUndefined(t[i])?void 0:n(void 0,t[i]):n(void 0,e[i])}function a(i){return i in e?n(t[i],e[i]):i in t?n(void 0,t[i]):void 0}var h={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return wt.forEach(Object.keys(t).concat(Object.keys(e)),function(t){var e=h[t]||o,n=e(t);wt.isUndefined(n)&&e!==a||(i[t]=n)}),i},Jt="0.27.2",Xt=Jt,Kt={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Kt[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var $t={};
2Kt.transitional=function(t,e,i){function n(t,e){return"[Axios v"+Xt+"] Transitional option '"+t+"'"+e+(i?". "+i:"")}return function(i,o,r){if(!1===t)throw new St(n(o," has been removed"+(e?" in "+e:"")),St.ERR_DEPRECATED);return e&&!$t[o]&&($t[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(i,o,r)}};var Qt={assertOptions:function(t,e,i){if("object"!=typeof t)throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),o=n.length;o-- >0;){var r=n[o],s=e[r];if(s){var a=t[r],h=void 0===a||s(a,r,t);if(!0!==h)throw new St("option "+r+" must be "+h,St.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new St("Unknown option "+r,St.ERR_BAD_OPTION)}},validators:Kt},te=Qt.validators;function ee(t){this.defaults=t,this.interceptors={request:new Pt,response:new Pt}}ee.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=Yt(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var i=e.transitional;void 0!==i&&Qt.assertOptions(i,{silentJSONParsing:te.transitional(te.boolean),forcedJSONParsing:te.transitional(te.boolean),clarifyTimeoutError:te.transitional(te.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))});var r,s=[];if(this.interceptors.response.forEach(function(t){s.push(t.fulfilled,t.rejected)}),!o){var a=[qt,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),r=Promise.resolve(e);a.length;)r=r.then(a.shift(),a.shift());return r}for(var h=e;n.length;){var l=n.shift(),u=n.shift();try{h=l(h)}catch(t){u(t);break}}try{r=qt(h)}catch(t){return Promise.reject(t)}for(;s.length;)r=r.then(s.shift(),s.shift());return r},ee.prototype.getUri=function(t){t=Yt(this.defaults,t);var e=Ot(t.baseURL,t.url);return bt(e,t.params,t.paramsSerializer)},wt.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(e,i){return this.request(Yt(i||{},{method:t,url:e,data:(i||{}).data}))}}),wt.forEach(["post","put","patch"],function(t){function e(e){return function(i,n,o){return this.request(Yt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}ee.prototype[t]=e(),ee.prototype[t+"Form"]=e(!0)});var ie=ee;function ne(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var i=this;this.promise.then(function(t){if(i._listeners){var e,n=i._listeners.length;for(e=0;e<n;e++)i._listeners[e](t);i._listeners=null}}),this.promise.then=function(t){var e,n=new Promise(function(t){i.subscribe(t),e=t}).then(t);return n.cancel=function(){i.unsubscribe(e)},n},t(function(t){i.reason||(i.reason=new Zt(t),e(i.reason))})}ne.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ne.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},ne.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},ne.source=function(){var t;return{token:new ne(function(e){t=e}),cancel:t}};var oe=ne;var re=function t(e){var i=new ie(e),n=it(ie.prototype.request,i);return wt.extend(n,ie.prototype,i),wt.extend(n,i),n.create=function(i){return t(Yt(e,i))},n}(Gt);re.Axios=ie,re.CanceledError=Zt,re.CancelToken=oe,re.isCancel=Ht,re.VERSION=Jt,re.toFormData=At,re.AxiosError=St,re.Cancel=re.CanceledError,re.all=function(t){return Promise.all(t)},re.spread=function(t){return function(e){return t.apply(null,e)}},re.isAxiosError=function(t){return wt.isObject(t)&&!0===t.isAxiosError};var se=re,ae=re;se.default=ae;var he=se;_.FeatureGroup.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:_.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){_.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=_.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=_.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};const e=_.DomUtil.TRANSITION&&this.options.animate;_.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster
2=e?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof _.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();let e=t;const i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof _.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!_.Util.isArray(t))return this.addLayer(t);const i=this._featureGroup,n=this._nonPointGroup,o=this.options.chunkedLoading,r=this.options.chunkInterval,s=this.options.chunkProgress;let a,h=t.length,l=0,u=!0;if(this._map){const c=(new Date).getTime(),d=_.bind(function(){const p=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();l<h;l++){if(o&&l%200==0){if((new Date).getTime()-p>r)break}if(a=t[l],a instanceof _.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(a,t),h=t.length;else if(a.getLatLng){if(!this.hasLayer(a)&&(this._addLayer(a,this._maxZoom),e||this.fire("layeradd",{layer:a}),a.__parent&&2===a.__parent.getChildCount())){const t=a.__parent.getAllChildMarkers(),e=t[0]===a?t[1]:t[0];i.removeLayer(e)}}else n.addLayer(a),e||this.fire("layeradd",{layer:a})}s&&s(l,h,(new Date).getTime()-c),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else{const e=this._needsClustering;for(;l<h;l++)a=t[l],a instanceof _.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(a,t),h=t.length):a.getLatLng?this.hasLayer(a)||e.push(a):n.addLayer(a)}return this},removeLayers:function(t){let e,i,n=t.length;const o=this._featureGroup,r=this._nonPointGroup;let s=!0;if(!this._map){for(e=0;e<n;e++)i=t[e],i instanceof _.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();const o=t.slice();let r=n;for(e=0;e<r;e++)i=o[e],i instanceof _.LayerGroup?(this._extractNonGroupLayers(i,o),r=o.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)i=t[e],i instanceof _.LayerGroup?(s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){const t=new _.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(let e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){const i=this._needsClustering.slice(),n=this._needsRemoving;let o,r,s;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(i),r=i.length-1;r>=0;r--){for(o=!0,s=n.length-1;s>=0;s--)if(n[s].layer===i[r]){o=!1;break}o&&t.call(e,i[r])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){const t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){let e=null;return t=parseInt(t,10),this.eachLayer(function(i){_.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;let e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){const i=this._map;"function"!=typeof e&&(e=function(){});const n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){let e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw new Error("Map has no maxZoom specified");for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){let e=t;for(;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(let i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){const i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(;e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){const e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}}
2,_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){const e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){const n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,s=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);let h=t.__parent;const l=h._markers;let u;for(this._arraySplice(l,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)e&&h._childCount<=1?(u=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,s.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(u,s.project(u.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(u),u.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(u))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof _.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}_.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return _.FeatureGroup.prototype.listens.call(this,t,e)||_.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){const e=t.getChildCount();let i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new _.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new _.Point(40,40)})},_bindEvents:function(){const t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||n||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){const e=t.layer;let i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){const e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new _.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){const t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,o=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(this._inZoomAnimation)return;const t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t},_generateInitialClusters:function(){let t=Math.ceil(this._map.getMaxZoom());const e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius;let n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(let i=t;i>=e;i--)this._gridClusters[i]=new _.DistanceGrid(n(i)),this._gridUnclustered[i]=new _.DistanceGrid(n(i));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){const i=this._gridClusters,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());let r,s;
2for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=o;e--){r=this._map.project(t.getLatLng(),e);let o=i[e].getNearObject(r);if(o)return o._addChild(t),void(t.__parent=o);if(o=n[e].getNearObject(r),o){const n=o.__parent;n&&this._removeLayer(o,!1);const r=new this._markerCluster(this,e,o,t);i[e].addObject(r,this._map.project(r._cLatLng,e)),o.__parent=r,t.__parent=r;let a=r;for(s=e-1;s>n._zoom;s--)a=new this._markerCluster(this,s,a),i[s].addObject(a,this._map.project(o.getLatLng(),s));return n._addChild(a),void this._removeFromGridUnclustered(o,e)}n[e].addObject(t,r)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof _.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(_.bind(this._processQueue,this),300))},_processQueue:function(){for(let t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){const t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?_.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){const e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();const t=e.getAllChildMarkers();this._featureGroup.removeLayer(t[0]),this._featureGroup.removeLayer(t[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){const i=t.getLayers();let n,o=0;for(e=e||[];o<i.length;o++)n=i[o],n instanceof _.LayerGroup?this._extractNonGroupLayers(n,e):e.push(n);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}}),_.FeatureGroup.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.FeatureGroup.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){const i=this._getExpandedVisibleBounds(),n=this._featureGroup,o=Math.floor(this._map.getMinZoom());let r;this._ignoreMove=!0,this._topClusterLevel._recursively(i,t,o,function(o){let s=o._latlng;const a=o._markers;let h;for(i.contains(s)||(s=null),o._isSingleParent()&&t+1===e?(n.removeLayer(o),o._recursivelyAddChildrenToMap(null,e,i)):(o.clusterHide(),o._recursivelyAddChildrenToMap(s,e,i)),r=a.length-1;r>=0;r--)h=a[r],i.contains(h._latlng)||n.removeLayer(h)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(i,e),n.eachLayer(function(t){t instanceof _.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(i,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(i,t,o,function(t){n.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){const i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}}
2,_animationZoomOutSingle:function(t,e,i){const n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);const r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){const e=t._markers[0];this._ignoreMove=!0,e.setLatLng(e.getLatLng()),this._ignoreMove=!1,e.clusterShow&&e.clusterShow()}else t._recursively(n,i,o,function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)});r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({options:_.Icon.prototype.options,initialize:function(t,e,i,n){_.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new _.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(let i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(let i=this._markers.length-1;i>=0;i--)e&&this._markers[i].__dragStart||t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){let e=this._childClusters.slice();const i=this._group._map,n=i.getBoundsZoom(this._bounds);let o=this._zoom+1;const r=i.getZoom();let s;for(;e.length>0&&n>o;){o++;let t=[];for(s=0;s<e.length;s++)t=t.concat(e[s]._childClusters);e=t}n>
2o?this._group._map.setView(this._latlng,o):n<=r?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){const t=new _.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof _.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){const t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){const t=this._markers,e=this._childClusters;let i=0,n=0;const o=this._childCount;let r,s,a,h;if(0!==o){for(this._resetBounds(),r=0;r<t.length;r++)a=t[r]._latlng,this._bounds.extend(a),i+=a.lat,n+=a.lng;for(r=0;r<e.length;r++)s=e[r],s._boundsNeedUpdate&&s._recalculateBounds(),this._bounds.extend(s._bounds),a=s._wLatLng,h=s._childCount,i+=a.lat*h,n+=a.lng*h;this._latlng=this._wLatLng=new _.LatLng(i/o,n/o),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){const i=t._markers;let n,o;for(n=i.length-1;n>=0;n--)o=i[n],o._icon&&(o._setPos(e),o.clusterHide())},function(t){const i=t._childClusters;let n,o;for(n=i.length-1;n>=0;n--)o=i[n],o._icon&&(o._setPos(e),o.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(let e=n._markers.length-1;e>=0;e--){const o=n._markers[e];i.contains(o._latlng)&&(t&&(o._backupLatlng=o.getLatLng(),o.setLatLng(t),o.clusterHide&&o.clusterHide()),n._group._featureGroup.addLayer(o))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(t-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let e=this._childClusters.length-1;e>=0;e--)this._childClusters[e]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){let o,r;this._recursively(t,e-1,i-1,function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){const r=this._childClusters,s=this._zoom;let a,h;if(e<=s&&(n&&n(this),o&&s===i&&o(this)),s<e||s<i)for(a=r.length-1;a>=0;a--)h=r[a],h._boundsNeedUpdate&&h._recalculateBounds(),t.intersects(h._bounds)&&h._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){const t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),_.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(t,e){const i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},s=r[i]=r[i]||[],a=_.Util.stamp(t);this._objectPoint[a]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){const i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},s=r[i]=r[i]||[];let a,h;for(delete this._objectPoint[_.Util.stamp(t)],a=0,h=s.length;a<h;a++)if(s[a]===t)return s.splice(a,1),1===h&&delete r[i],!0},eachObject:function(t,e){let i,n,o,r,s,a,h;const l=this._grid;for(i in l)for(n in s=l[i],s)for(a=s[n],o=0,r=a.length;o<r;o++)h=t.call(e,a[o]),h&&(o--,r--)},getNearObject:function(t){const e=this._getCoord(t.x),i=this._getCoord(t.y);let n,o,r,s,a,h,l,u;const c=this._objectPoint;let d=this._sqCellSize,p=null;for(n=i-1;n<=i+1;n++)if(s=this._grid[n],s)for(o=e-1;o<=e+1;o++)if(a=s[o],a)for(r=0,h=a.length;r<h;r++)l=a[r],u=this._sqDist(c[_.Util.stamp(l)],t),(u<d||u<=d&&null===p)&&(d=u,p=l);return p},_getCoord:function(t){const e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){const i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},_.QuickHull={getDistant:function(t,e){const i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){let i=0,n=null;const o=[];let r,s,a;for(r=e.length-1;r>=0;r--)s=e[r],a=this.getDistant(s,t),a>0&&(o.push(s),a>i&&(i=a,n=s));return{maxPoint:n,newPoints:o}},buildConvexHull:function(t,e){let i=[];const n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)),i):[t[0]]},getConvexHull:function(t){let e,i=!1,n=!1,o=!1,r=!1,s=null,a=null,h=null,l=null,u=null,c=null;for(e=t.length-1;e>=0;e--){const u=t[e];(!1===i||u.lat>i)&&(s=u,i=u.lat),(!1===n||u.lat<n)&&(a=u,n=u.lat),(!1===o||u.lng>o)&&(h=u,o=u.lng),(!1===r||u.lng<r)&&(l=u,r=u.lng)}return n!==i?(c=a,u=s):(c=l,u=h),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))}},_.MarkerCluster.include({getConvexHull:function(){const t=this.getAllChildMarkers(),e=[];let i,n;for(n=t.length-1;n>=0;n--)i=t[n].getLatLng(),e.push(i);return _.QuickHull.getConvexHull(e)}}),_.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied===this||this._group._inZoomAnimation)return;const t=this.getAllChildMarkers(null,!0),e=this._group._map.latLngToLayerPoint(this._latlng);let i;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?i=this._group.options.spiderfyShapePositions(t.length,e):t.length>=this._circleSpiralSwitchover?i=this._generatePointsSpiral(t.length,e):(e.y+=10,i=this._generatePointsCircle(t.length,e)),this._animationSpiderfy(t,i)},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){let i=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI;const n=this._2PI/t,o=[];let r,s;for(i=Math.max(i,35),o.length=t,r=0;r<t;r++)s=this._circleStartAngle+r*n,o[r]=new _.Point(e.x+i*Math.cos(s),e.y+i*Math.sin(s))._round();return o},_generatePointsSpiral:function(t,e){const i=this._group.options.spiderfyDistanceMultiplier;let n=i*this._spiralLengthStart;const o=i*this._spiralFootSeparation,r=i*this._spiralLengthFactor*this._2PI;let s=0;const a=[];let h;for(a.length=t,h=t;h>=0;
2h--)h<t&&(a[h]=new _.Point(e.x+n*Math.cos(s),e.y+n*Math.sin(s))._round()),s+=o/n+5e-4*h,n+=r/s;return a},_noanimationUnspiderfy:function(){const t=this._group,e=t._map,i=t._featureGroup,n=this.getAllChildMarkers(null,!0);let o,r;for(t._ignoreMove=!0,this.setOpacity(1),r=n.length-1;r>=0;r--)o=n[r],i.removeLayer(o),o._preSpiderfyLatlng&&(o.setLatLng(o._preSpiderfyLatlng),delete o._preSpiderfyLatlng),o.setZIndexOffset&&o.setZIndexOffset(0),o._spiderLeg&&(e.removeLayer(o._spiderLeg),delete o._spiderLeg);t.fire("unspiderfied",{cluster:this,markers:n}),t._ignoreMove=!1,t._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(t,e){const i=this._group,n=i._map,o=i._featureGroup,r=this._group.options.spiderLegPolylineOptions;let s,a,h,l;for(i._ignoreMove=!0,s=0;s<t.length;s++)l=n.layerPointToLatLng(e[s]),a=t[s],h=new _.Polyline([this._latlng,l],r),n.addLayer(h),a._spiderLeg=h,a._preSpiderfyLatlng=a._latlng,a.setLatLng(l),a.setZIndexOffset&&a.setZIndexOffset(1e6),o.addLayer(a);this.setOpacity(.3),i._ignoreMove=!1,i.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(t,e){const i=this,n=this._group,o=n._map,r=n._featureGroup,s=this._latlng,a=o.latLngToLayerPoint(s),h=_.Path.SVG,l=_.extend({},this._group.options.spiderLegPolylineOptions);let u,c,d,p,f,m,g=l.opacity;for(void 0===g&&(g=_.FeatureGroup.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),h?(l.opacity=0,l.className=(l.className||"")+" leaflet-cluster-spider-leg"):l.opacity=g,n._ignoreMove=!0,u=0;u<t.length;u++)c=t[u],m=o.layerPointToLatLng(e[u]),d=new _.Polyline([s,m],l),o.addLayer(d),c._spiderLeg=d,h&&(p=d._path,f=p.getTotalLength()+.1,p.style.strokeDasharray=f,p.style.strokeDashoffset=f),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),r.addLayer(c),c._setPos&&c._setPos(a);for(n._forceLayout(),n._animationStart(),u=t.length-1;u>=0;u--)m=o.layerPointToLatLng(e[u]),c=t[u],c._preSpiderfyLatlng=c._latlng,c.setLatLng(m),c.clusterShow&&c.clusterShow(),h&&(d=c._spiderLeg,p=d._path,p.style.strokeDashoffset=0,d.setStyle({opacity:g}));this.setOpacity(.3),n._ignoreMove=!1,setTimeout(function(){n._animationEnd(),n.fire("spiderfied",{cluster:i,markers:t})},200)},_animationUnspiderfy:function(t){const e=this,i=this._group,n=i._map,o=i._featureGroup,r=t?n._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):n.latLngToLayerPoint(this._latlng),s=this.getAllChildMarkers(null,!0),a=_.Path.SVG;let h,l,u,c,d,p;for(i._ignoreMove=!0,i._animationStart(),this.setOpacity(1),l=s.length-1;l>=0;l--)h=s[l],h._preSpiderfyLatlng&&(h.closePopup(),h.setLatLng(h._preSpiderfyLatlng),delete h._preSpiderfyLatlng,p=!0,h._setPos&&(h._setPos(r),p=!1),h.clusterHide&&(h.clusterHide(),p=!1),p&&o.removeLayer(h),a&&(u=h._spiderLeg,c=u._path,d=c.getTotalLength()+.1,c.style.strokeDashoffset=d,u.setStyle({opacity:0}
2)));i._ignoreMove=!1,setTimeout(function(){let t=0;for(l=s.length-1;l>=0;l--)h=s[l],h._spiderLeg&&t++;for(l=s.length-1;l>=0;l--)h=s[l],h._spiderLeg&&(h.clusterShow&&h.clusterShow(),h.setZIndexOffset&&h.setZIndexOffset(0),t>1&&o.removeLayer(h),n.removeLayer(h._spiderLeg),delete h._spiderLeg);i._animationEnd(),i.fire("unspiderfied",{cluster:e,markers:s})},200)}}),_.FeatureGroup.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){_.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),_.FeatureGroup.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof _.FeatureGroup.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof _.LayerGroup?t=t._layers:t instanceof _.MarkerCluster?t=t.getAllChildMarkers():t instanceof _.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){let e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){let e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),_.Marker.include({refreshIconOptions:function(t,e){const i=this.options.icon;return _.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}});class le{constructor(t){this.weatherLayers=[],this.WebGLLayers=[],this.poisLayers=new _.FeatureGroup,this.currentPositionLayer=new _.FeatureGroup,this.poisMarkers=[],this.poisClusterOptions={enabled:!1,style:""},this.boundaries=s.defaultBoundaries,this.geoJsonLayer=new _.GeoJSON,this.fitToPoisBounds=t=>{this.leafletMap.fitBounds(t.getBounds())};const e=_.latLng(-85,-180),i=_.latLng(85,180),n=_.latLngBounds(e,i);this.leafletMap=new _.Map(t.elementHtmlToAppend,{maxBounds:n,zoomControl:!1,scrollWheelZoom:!0,maxBoundsViscosity:1,attributionControl:!1,minZoom:t.zoom.min,maxZoom:t.zoom.max}),this.setZoom(t.zoom.current),this.setView(t.center),this.leafletMap.on("movestart",()=>this.stopAnimation()).on("zoomend",()=>{var t;const e=this.leafletMap.getZoom();this.showPois();document.querySelector("plm-maps-viewer").zoom=e;let i="none";e<this.boundaries.layerZoomLimits.minZoom?i="minZoom":e>this.boundaries.layerZoomLimits.maxZoom&&(i="maxZoom"),null===(t=this.zoomCallback)||void 0===t||t.call(this,e,i)}).on("click",t=>{var e;null===(e=this.clickCallback)||void 0===e||e.call(this,{latitude:t.latlng.lat,longitude:t.latlng.lng})}).on("resize",t=>{var e;null===(e=this.resizeCallback)||void 0===e||e.call(this,{width:t.newSize.x,height:t.newSize.y})}).on("dragend",()=>{var t;null===(t=this.dragCallback)||void 0===t||t.call(this)}).on("moveend",()=>{this.WebGLLayers.forEach(t=>{Y(),q(),t.initializeWebGL()})}).on("layerremove",t=>
2{if("Weather"===t.layer.layerTipe){const e=b.weatherForecast.filter(e=>X(t.layer.url)!==J(e.url));b.weatherForecast=e}"WebGL"===t.layer.layerTipe&&(t.layer.windGL=null,t.layer.canvas&&Y())})}static configure(t){return new le(t)}onZoom(t){return this.zoomCallback=t,this}onClick(t){return this.clickCallback=t,this}onDrag(t){return this.dragCallback=t,this}onResize(t){return this.resizeCallback=t,this}onPoiClick(t){return this.poiClickCallback=t,this}onSetWeatherLayers(t){return this.addWeatherLayers(t),this}onSetWebGLLayers(t){return this.addWebGLLayers(t),this}addAttribution(t){return _.control.attribution({position:"bottomright",prefix:!1}).addTo(this.leafletMap),this.leafletMap.attributionControl.addAttribution(t),this}addBaseLayer(t){return this.baseLayer=(t=>_.tileLayer(t.url))(t),this.baseLayer.addTo(this.leafletMap),this}lazyLoadNextFrame(t){this.weatherLayers.forEach(e=>{e.lazyLoadFrame(t+1)})}getLayers(t){const e=[],i=async function(t){const e=await Promise.all(t.map(t=>he.get(t).catch(()=>t)));return Promise.all(e.map(t=>t))}(t.map(t=>t.url)).then(i=>(t.forEach((t,n)=>{e.push({layer:t,latest:i[n].data?i[n].data.latest:[],data:i[n].data})}),e));return i}setMapBoundsByLayer(t,e){if("prop"===this.boundariesType)return;const i=e.bounds;t.limitZoom?this.setBoundaries({zoomLimits:{minZoom:i.min_zoom_level,maxZoom:i.max_zoom_level},layerZoomLimits:{minZoom:i.min_zoom_level,maxZoom:i.max_zoom_level}}):this.setBoundaries({layerZoomLimits:{minZoom:i.min_zoom_level,maxZoom:i.max_zoom_level}}),t.limitMapBounds&&this.setBoundaries({mapLimits:{topRight:{latitude:i.latitudeTop,longitude:i.longitudeRight},bottomLeft:{latitude:i.latitudeBottom,longitude:i.longitudeLeft}}})}addWeatherLayers(t,e){e&&(this.weatherLayersCallback=e);return this.getLayers(t).then(t=>{e(t),this.weatherLayers=t.filter(t=>t.latest.length>0).map(t=>(b.weatherForecast=b.weatherForecast.concat([...t.latest].reverse()),this.setMapBoundsByLayer(t.layer,t.data),Q(t.layer,t.data,this.leafletMap))),this.weatherLayers.forEach(t=>t.addTo(this.leafletMap)),this.lazyLoadNextFrame(b.currentFrame)}),this}addWebGLLayers(t,e){e&&(this.WebGLLayersCallback=e);return this.getLayers(t).then(t=>{e(t),this.WebGLLayers=t.filter(t=>t.latest.length>0).map(t=>(b.webGLForecast=[...t.latest].sort((t,e)=>t.epoch-e.epoch),this.setMapBoundsByLayer(t.layer,t.data),tt(this.leafletMap,t.layer))),this.WebGLLayers.forEach(t=>t.addTo(this.leafletMap))}),this}addGeoJson(t){return this.setGeoJson(t),this}addCurrentPosition(t){return t?(this.currentPositionMarker=g(t),this.addCurrentPositionLayer(),this):this}addPois(t){return 0===t.pois.length||(this.poisMarkers=t.pois.map(g),this.poisMarkers.forEach(t=>t.marker.on("click",()=>{var e;return null===(e=this.poiClickCallback)||void 0===e?void 0:e.call(this,t.poi)})),this.addPoisLayer(),this.showPois(),t.autoCenter&&this.fitToPoisBounds(this.poisLayers)),this}addPoisClusterOptions(t){return t?(this.poisClusterOptions=t,this.showPois(),this):this}addBoundaries(t){return this.setBoundaries(t),this}addBoundariesType(t){return this.setBoundariesType(t),this}build(){return this}setView(t){t&&this.leafletMap.setView({lat:t.latitude,lng:t.longitude})}setZoomLimits(t,e){t&&e&&(e<t||(this.boundaries.zoomLimits.minZoom=t>s.minZoom?t:s.minZoom,this.boundaries.zoomLimits.maxZoom=e<s.maxZoom?e:s.maxZoom,this.leafletMap.setMinZoom(this.boundaries.zoomLimits.minZoom),this.leafletMap.setMaxZoom(this.boundaries.zoomLimits.maxZoom)))}setLayerZoomLimits(t,e){t&&e&&(e<t||(this.boundaries.layerZoomLimits.minZoom=t>s.minZoom?t:s.minZoom,this.boundaries.layerZoomLimits.maxZoom=e<s.maxZoom?e:s.maxZoom))}setAttribution(t){this.leafletMap.attributionControl.remove(),this.addAttribution(t)}
2setMapBounds(t,e,i,n){if(null==e||null==n||null==t||null==i)return;const o=_.latLng(e,n),r=_.latLng(t,i),s=_.latLngBounds(o,r);this.leafletMap.setMaxBounds(s)}setZoom(t){t&&this.leafletMap.setZoom(t)}setWeatherLayers(t){this.clearWeatherLayers(),this.addWeatherLayers(t,this.weatherLayersCallback)}setWebGLLayers(t){this.clearWebGLLayers(),this.addWebGLLayers(t,this.WebGLLayersCallback)}setGeoJson(t){this.geoJsonLayer.clearLayers(),this.addGeoJsonLayer(t)}setCurrentPosition(t){console.log("setCurrentPosition",t),this.addCurrentPosition(t)}setPois(t){this.addPois(t)}setPoisClusterOptions(t){console.log("setPoisClusterOptions",t),this.addPoisClusterOptions(t)}setBoundaries(t){t.zoomLimits&&this.setZoomLimits(t.zoomLimits.minZoom,t.zoomLimits.maxZoom),t.layerZoomLimits&&this.setLayerZoomLimits(t.layerZoomLimits.minZoom,t.layerZoomLimits.maxZoom),t.mapLimits&&this.setMapBounds(t.mapLimits.bottomLeft.latitude,t.mapLimits.topRight.latitude,t.mapLimits.bottomLeft.longitude,t.mapLimits.topRight.longitude)}setBoundariesType(t){this.boundariesType=t}playAnimation(){this.interval||(this.interval=setInterval(()=>{b.currentFrame>=b.weatherMergedForecast.length?this.stopAnimation():(b.currentFrame++,this.requestForFrame(b.currentFrame))},500))}goToFrame(t){this.stopAnimation(),this.requestForFrame(t),b.currentFrame=t}stopAnimation(){clearInterval(this.interval),this.interval=null}requestForFrame(t){if(t<b.weatherMergedForecast.length){const e=b.weatherMergedForecast[t];this.weatherLayers.forEach(i=>{X(i.url)===J(e.url)&&i.loadFrame(t)}),window.dispatchEvent(new CustomEvent("mapViewerAnimationFrame",{detail:{frame:t,epoch:b.weatherMergedForecast[t].epoch}}))}t%5==0&&this.WebGLLayers.forEach(e=>{e.loadFrame(t)})}addCurrentPositionLayer(){this.leafletMap.hasLayer(this.currentPositionLayer)&&this.leafletMap.removeLayer(this.currentPositionLayer),this.currentPositionLayer=new _.FeatureGroup,this.currentPositionLayer.clearLayers(),this.currentPositionLayer.addTo(this.leafletMap)}addPoisLayer(){this.leafletMap.hasLayer(this.poisLayers)&&this.leafletMap.removeLayer(this.poisLayers),this.poisClusterOptions.enabled?this.createClusterLayer():this.createFeatureGroupLayer()}addGeoJsonLayer(t){this.leafletMap.hasLayer(this.geoJsonLayer)&&this.leafletMap.removeLayer(this.geoJsonLayer),this.createGeoJsonLayer(t)}createFeatureGroupLayer(){this.poisLayers=new _.FeatureGroup,this.poisLayers.clearLayers(),this.poisLayers.addTo(this.leafletMap)}createClusterLayer(){var t;this.poisLayers=(t={showCoverageOnHover:!1,spiderfyOnMaxZoom:!1,iconCreateFunction:t=>_.divIcon({html:`<div style="${this.poisClusterOptions.style}" class="marker-cluster"><span>${t.getChildCount()}</span></div>`})},new _.FeatureGroup.MarkerClusterGroup(t)),this.poisLayers.clearLayers(),this.poisLayers.addTo(this.leafletMap)}createGeoJsonLayer(t){t&&(this.geoJsonLayer=new _.GeoJSON(t,{style:function(t){if(t.properties&&t.properties.style)return JSON.parse(t.properties.style)},onEachFeature:function(t,e){t.properties&&t.properties.popupContent&&e.bindPopup(t.properties.popupContent)}}),this.geoJsonLayer.clearLayers(),this.geoJsonLayer.addTo(this.leafletMap),this.geoJsonLayer.addData(t))}showPois(){const t=this.leafletMap.getZoom();this.currentPositionMarker&&(this.currentPositionMarker.poi.minZoom<=t||this.currentPositionMarker.poi.maxZoom&&this.currentPositionMarker.poi.maxZoom>=t?this.currentPositionLayer.addLayer(this.currentPositionMarker.marker):this.currentPositionLayer.removeLayer(this.currentPositionMarker.marker)),this.poisMarkers.forEach(e=>{e.poi.minZoom<=t||e.poi.maxZoom&&e.poi.maxZoom>=t?this.poisLayers.hasLayer(e.marker)||this.poisLayers.addLayer(e.marker):this.poisLayers.hasLayer(e.marker)&&this.poisLayers.removeLayer(e.marker)})}clearWeatherLayers(){this.weatherLayers.forEach(t=>this.leafletMap.removeLayer(t))}clearWebGLLayers(){this.WebGLLayers.forEach(t=>this.leafletMap.removeLayer(t))}}const ue=class{constructor(t){(0,n.r)(this,t),this.mapViewerZoomChanged=(0,n.c)(this,"mapViewerZoomChanged",7),this.mapViewerClicked=(0,n.c)(this,"mapViewerClicked",7),this.mapViewerResized=(0,n.c)(this,"mapViewerResized",7),this.mapViewerDragged=(0,n.c)(this,"mapViewerDragged",7),this.mapViewerPoiClicked=(0,n.c)(this,"mapViewerPoiClicked",7),this.mapViewerLayersChanged=(0,n.c)(this,"mapViewerLayersChanged",7),this.mapViewerWebGLLayersChanged=(0,n.c)(this,"mapViewerWebGLLayersChanged",7),this.zoom=void 0,this.center=void 0,this.attribution=s.defaultAttribution,this.urlBaseLayer=s.defaultBaseLayer,this.urlLayers=[],this.urlWebGLLayers=[],this.currentPosition=void 0,this.pois={pois:[],autoCenter:!1},this.poisClusterOptions={enabled:!1,style:""},this.boundaries=void 0,this.boundariesType=null,this.geoJson=void 0}componentDidLoad(){this.map=le.configure({center:this.center,elementHtmlToAppend:s.htmlId,zoom:{min:3,max:18,current:this.zoom}}).addAttribution(this.attribution).addBaseLayer(this.urlBaseLayer).addWeatherLayers(this.urlLayers,t=>this.mapViewerLayersChanged.emit(t)).addWebGLLayers(this.urlWebGLLayers,t=>this.mapViewerWebGLLayersChanged.emit(t)).addPoisClusterOptions(this.poisClusterOptions).addCurrentPosition(this.currentPosition).addPois(this.pois).addGeoJson(this.geoJson).onZoom((t,e)=>this.mapViewerZoomChanged.emit({zoom:t,limitExceeded:e})).onClick(t=>
2this.mapViewerClicked.emit(t)).onResize(t=>this.mapViewerResized.emit(t)).onDrag(()=>this.mapViewerDragged.emit()).onPoiClick(t=>this.mapViewerPoiClicked.emit(t)).build()}setView(){var t;null===(t=this.map)||void 0===t||t.setView(this.center)}setZoom(){var t;null===(t=this.map)||void 0===t||t.setZoom(this.zoom)}setAttribution(){var t;null===(t=this.map)||void 0===t||t.setAttribution(this.attribution)}setUrlLayers(){var t;null===(t=this.map)||void 0===t||t.setWeatherLayers(this.urlLayers)}setUrlWebGLLayers(){var t;null===(t=this.map)||void 0===t||t.setWebGLLayers(this.urlWebGLLayers)}setCurrentPosition(){var t;null===(t=this.map)||void 0===t||t.setCurrentPosition(this.currentPosition)}setPois(){var t;null===(t=this.map)||void 0===t||t.setPois(this.pois)}setPoisCluster(){var t;null===(t=this.map)||void 0===t||t.setPoisClusterOptions(this.poisClusterOptions)}setBoundaries(){var t;null===(t=this.map)||void 0===t||t.setBoundaries(this.boundaries)}setBoundariesType(){var t;null===(t=this.map)||void 0===t||t.setBoundariesType(this.boundariesType)}setGeoJson(){var t;null===(t=this.map)||void 0===t||t.setGeoJson(this.geoJson)}playAnimation(){var t;null===(t=this.map)||void 0===t||t.playAnimation()}goToFrame(t){var e;null===(e=this.map)||void 0===e||e.goToFrame(t.detail)}stopAnimation(){var t;null===(t=this.map)||void 0===t||t.stopAnimation()}render(){return(0,n.h)(n.H,null,(0,n.h)("div",{id:s.htmlId,class:"plm-maps-viewer"}),(0,n.h)("canvas",{id:h.htmlId}),(0,n.h)("div",{class:"leaflet-layer leaflet-webgllayer"},(0,n.h)("canvas",{id:a.htmlId,style:{display:"none"}})))}static get watchers(){return{center:["setView"],zoom:["setZoom"],attribution:["setAttribution"],urlLayers:["setUrlLayers"],urlWebGLLayers:["setUrlWebGLLayers"],currentPosition:["setCurrentPosition"],pois:["setPois"],poisClusterOptions:["setPoisCluster"],boundaries:["setBoundaries"],boundariesType:["setBoundariesType"],geoJson:["setGeoJson"]}}};ue.style='.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.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, 0.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 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.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 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,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:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;
2display:block;text-align:center;text-decoration:none;color:black}.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:bold 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 rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);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(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);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-control-attribution svg{display:inline !important}.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;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.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,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:17px 0;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:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.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;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.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=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.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 rgba(0,0,0,0.4)}.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;color-adjust:exact}}:root{--marker-cluster-color:#99999960}.marker-cluster{border-radius:100%;background-color:var(--marker-cluster-color);padding:10px;transform:translate(-30%, -30%);width:12px;height:12px;display:flex;justify-content:center;align-items:center}.poi-icon-label{min-width:max-content}.poi-icon-label div{display:flex;justify-content:center}.leaflet-popup-content-wrapper{background:none;box-shadow:none}.leaflet-popup-tip{display:none}.leaflet-popup-close-button{display:none}.leaflet-div-icon{background:none;border:none}
2.map-viewer__container{width:100%;height:100%}#windImageCanvas{display:none}#map{width:100%;height:100%}'},5350(t,e){"use strict";e.byteLength=function(t){var e=a(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,r=a(t),s=r[0],h=r[1],l=new o(function(t,e,i){return 3*(e+i)/4-i}(0,s,h)),u=0,c=h>0?s-4:s;for(i=0;i<c;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===h&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,l[u++]=255&e);1===h&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,h=n-o;a<h;a+=s)r.push(l(t,a,a+s>h?h:a+s));1===o?(e=t[n-1],r.push(i[e>>2]+i[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],r.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return r.join("")};for(var i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=r[s],n[r.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function h(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function l(t,e,i){for(var n,o=[],r=e;r<i;r+=3)n=(t[r]<<16&16711680)+(t[r+1]<<8&65280)+(255&t[r+2]),o.push(h(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4296(t,e,i){"use strict";var n=i(5350),o=i(7947),r=i(934);function s(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=h.prototype:(null===t&&(t=new h(e)),t.length=e),t}function h(t,e,i){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return l(this,t,e,i)}function l(t,e,i,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,n){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,i):new Uint8Array(e,i,n);h.TYPED_ARRAY_SUPPORT?(t=e).__proto__=h.prototype:t=d(t,e);return t}(t,e,i,n):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!h.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|f(e,i);t=a(t,n);var o=t.write(e,i);o!==n&&(t=t.slice(0,o));return t}(t,e,i):function(t,e){if(h.isBuffer(e)){var i=0|p(e.length);return 0===(t=a(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):d(t,e);if("Buffer"===e.type&&r(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(u(e),t=a(t,e<0?0:0|p(e)),!h.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|p(e.length);t=a(t,i);for(var n=0;n<i;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function f(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return j(t).length;default:if(n)return U(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,i){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,i);case"utf8":case"utf-8":return C(this,e,i);case"ascii":return E(this,e,i);case"latin1":case"binary":return S(this,e,i);case"base64":return T(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function g(t,e,i,n,o){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=o?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(o)return-1;i=t.length-1}else if(i<0){if(!o)return-1;i=0}if("string"==typeof e&&(e=h.from(e,n)),h.isBuffer(e))return 0===e.length?-1:y(t,e,i,n,o);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,n,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,n,o){var r,s=1,a=t.length,h=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,i/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(r=i;r<a;r++)if(l(t,r)===l(e,-1===u?0:r-u)){if(-1===u&&(u=r),r-u+1===h)return u*s}else-1!==u&&(r-=r-u),u=-1}else for(i+h>
vendor: 4,505 bytes, line 2
2a&&(i=a-h),r=i;r>=0;r--){for(var c=!0,d=0;d<h;d++)if(l(t,r+d)!==l(e,d)){c=!1;break}if(c)return r}return-1}function v(t,e,i,n){i=Number(i)||0;var o=t.length-i;n?(n=Number(n))>o&&(n=o):n=o;var r=e.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[i+s]=a}return s}function w(t,e,i,n){return G(U(e,t.length-i),t,i,n)}function x(t,e,i,n){return G(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,n)}function b(t,e,i,n){return x(t,e,i,n)}function L(t,e,i,n){return G(j(e),t,i,n)}function P(t,e,i,n){return G(function(t,e){for(var i,n,o,r=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(i=t.charCodeAt(s))>>8,o=i%256,r.push(o),r.push(n);return r}(e,t.length-i),t,i,n)}function T(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function C(t,e,i){i=Math.min(t.length,i);for(var n=[],o=e;o<i;){var r,s,a,h,l=t[o],u=null,c=l>239?4:l>223?3:l>191?2:1;if(o+c<=i)switch(c){case 1:l<128&&(u=l);break;case 2:128==(192&(r=t[o+1]))&&(h=(31&l)<<6|63&r)>127&&(u=h);break;case 3:r=t[o+1],s=t[o+2],128==(192&r)&&128==(192&s)&&(h=(15&l)<<12|(63&r)<<6|63&s)>2047&&(h<55296||h>57343)&&(u=h);break;case 4:r=t[o+1],s=t[o+2],a=t[o+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(h=(15&l)<<18|(63&r)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(u=h)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=c}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var i="",n=0;for(;n<e;)i+=String.fromCharCode.apply(String,t.slice(n,n+=M));return i}(n)}e.hp=h,e.IS=50,h.TYPED_ARRAY_SUPPORT=void 0!==i.g.TYPED_ARRAY_SUPPORT?i.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),s(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,e,i){return l(null,t,e,i)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,e,i){return function(t,e,i,n){return u(e),e<=0?a(t,e):void 0!==i?"string"==typeof n?a(t,e).fill(i,n):a(t,e).fill(i):a(t,e)}(null,t,e,i)},h.allocUnsafe=function(t){return c(null,t)},h.allocUnsafeSlow=function(t){return c(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,e){if(!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,o=0,r=Math.min(i,n);o<r;++o)if(t[o]!==e[o]){i=t[o],n=e[o];break}return i<n?-1:n<i?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=h.allocUnsafe(e),o=0;for(i=0;i<t.length;++i){var s=t[i];if(!h.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},h.byteLength=f,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):_.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",i=e.IS;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"}
vendor: 4,117 bytes, line 2
2,h.prototype.compare=function(t,e,i,n,o){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||i>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=i)return 0;if(n>=o)return-1;if(e>=i)return 1;if(this===t)return 0;for(var r=(o>>>=0)-(n>>>=0),s=(i>>>=0)-(e>>>=0),a=Math.min(r,s),l=this.slice(n,o),u=t.slice(e,i),c=0;c<a;++c)if(l[c]!==u[c]){r=l[c],s=u[c];break}return r<s?-1:s<r?1:0},h.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},h.prototype.indexOf=function(t,e,i){return g(this,t,e,i,!0)},h.prototype.lastIndexOf=function(t,e,i){return g(this,t,e,i,!1)},h.prototype.write=function(t,e,i,n){if(void 0===e)n="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)n=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var o=this.length-e;if((void 0===i||i>o)&&(i=o),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,t,e,i);case"utf8":case"utf-8":return w(this,t,e,i);case"ascii":return x(this,t,e,i);case"latin1":case"binary":return b(this,t,e,i);case"base64":return L(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function E(t,e,i){var n="";i=Math.min(t.length,i);for(var o=e;o<i;++o)n+=String.fromCharCode(127&t[o]);return n}function S(t,e,i){var n="";i=Math.min(t.length,i);for(var o=e;o<i;++o)n+=String.fromCharCode(t[o]);return n}function z(t,e,i){var n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);for(var o="",r=e;r<i;++r)o+=N(t[r]);return o}function A(t,e,i){for(var n=t.slice(e,i),o="",r=0;r<n.length;r+=2)o+=String.fromCharCode(n[r]+256*n[r+1]);return o}function k(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,i,n,o,r){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<r)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function B(t,e,i,n){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-i,2);o<r;++o)t[i+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function R(t,e,i,n){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-i,4);o<r;++o)t[i+o]=e>>>8*(n?o:3-o)&255}function I(t,e,i,n,o,r){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Z(t,e,i,n,r){return r||I(t,0,i,4),o.write(t,e,i,n,23,4),i+4}function D(t,e,i,n,r){return r||I(t,0,i,8),o.write(t,e,i,n,52,8),i+8}h.prototype.slice=function(t,e){var i,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),h.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=h.prototype;else{var o=e-t;i=new h(o,void 0);for(var r=0;r<o;++r)i[r]=this[r+t]}return i},h.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||k(t,e,this.length);for(var n=this[t],o=1,r=0;++r<e&&(o*=256);)n+=this[t+r]*o;return n},h.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||k(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},h.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])}
vendor: 4,060 bytes, line 2
2,h.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||k(t,e,this.length);for(var n=this[t],o=1,r=0;++r<e&&(o*=256);)n+=this[t+r]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},h.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||k(t,e,this.length);for(var n=e,o=1,r=this[t+--n];n>0&&(o*=256);)r+=this[t+--n]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},h.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||O(this,t,e,i,Math.pow(2,8*i)-1,0);var o=1,r=0;for(this[e]=255&t;++r<i&&(o*=256);)this[e+r]=t/o&255;return e+i},h.prototype.writeUIntBE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||O(this,t,e,i,Math.pow(2,8*i)-1,0);var o=i-1,r=1;for(this[e+o]=255&t;--o>=0&&(r*=256);)this[e+o]=t/r&255;return e+i},h.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},h.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},h.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},h.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},h.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*i-1);O(this,t,e,i,o-1,-o)}var r=0,s=1,a=0;for(this[e]=255&t;++r<i&&(s*=256);)t<0&&0===a&&0!==this[e+r-1]&&(a=1),this[e+r]=(t/s|0)-a&255;return e+i},h.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*i-1);O(this,t,e,i,o-1,-o)}var r=i-1,s=1,a=0;for(this[e+r]=255&t;--r>=0&&(s*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/s|0)-a&255;return e+i},h.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},h.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},h.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},h.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},h.prototype.writeFloatLE=function(t,e,i){return Z(this,t,e,!0,i)},h.prototype.writeFloatBE=function(t,e,i){return Z(this,t,e,!1,i)},h.prototype.writeDoubleLE=function(t,e,i){return D(this,t,e,!0,i)}
vendor: 5,125 bytes, line 2
2,h.prototype.writeDoubleBE=function(t,e,i){return D(this,t,e,!1,i)},h.prototype.copy=function(t,e,i,n){if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);var o,r=n-i;if(this===t&&i<e&&e<n)for(o=r-1;o>=0;--o)t[o+e]=this[o+i];else if(r<1e3||!h.TYPED_ARRAY_SUPPORT)for(o=0;o<r;++o)t[o+e]=this[o+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+r),e);return r},h.prototype.fill=function(t,e,i,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var r;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(r=e;r<i;++r)this[r]=t;else{var s=h.isBuffer(t)?t:U(new h(t,n).toString()),a=s.length;for(r=0;r<i-e;++r)this[r+e]=s[r%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var i;e=e||1/0;for(var n=t.length,o=null,r=[],s=0;s<n;++s){if((i=t.charCodeAt(s))>55295&&i<57344){if(!o){if(i>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=i;continue}if(i<56320){(e-=3)>-1&&r.push(239,191,189),o=i;continue}i=65536+(o-55296<<10|i-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,i<128){if((e-=1)<0)break;r.push(i)}else if(i<2048){if((e-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,i,n){for(var o=0;o<n&&!(o+i>=e.length||o>=t.length);++o)e[o+i]=t[o];return o}},7947(t,e){e.read=function(t,e,i,n,o){var r,s,a=8*o-n-1,h=(1<<a)-1,l=h>>1,u=-7,c=i?o-1:0,d=i?-1:1,p=t[e+c];for(c+=d,r=p&(1<<-u)-1,p>>=-u,u+=a;u>0;r=256*r+t[e+c],c+=d,u-=8);for(s=r&(1<<-u)-1,r>>=-u,u+=n;u>0;s=256*s+t[e+c],c+=d,u-=8);if(0===r)r=1-l;else{if(r===h)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),r-=l}return(p?-1:1)*s*Math.pow(2,r-n)},e.write=function(t,e,i,n,o,r){var s,a,h,l=8*r-o-1,u=(1<<l)-1,c=u>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:r-1,f=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+c>=1?d/h:d*Math.pow(2,1-c))*h>=2&&(s++,h/=2),s+c>=u?(a=0,s=u):s+c>=1?(a=(e*h-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[i+p]=255&a,p+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;t[i+p]=255&s,p+=f,s/=256,l-=8);t[i+p-f]|=128*_}},934(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},8558(t){var e,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(t){i=r}}();var a,h=[],l=!1,u=-1;function c(){l&&a&&(l=!1,a.length?h=a.concat(h):u=-1,h.length&&d())}function d(){if(!l){var t=s(c);l=!0;for(var e=h.length;e;){for(a=h,h=[];++u<e;)a&&a[u].run();u=-1,e=h.length}a=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===r||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new p(t,e)),1!==h.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.