Files
2026-02-20 12:55:10 +01:00

1 line
438 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32322,(t,e,i)=>{t.e,function(t){"use strict";function e(t){var e,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(e in r=arguments[i])t[e]=r[e];return t}var i,n,r,o,s,a,l,h,u,p,c=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function d(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 _=0;function f(t){return"_leaflet_id"in t||(t._leaflet_id=++_),t._leaflet_id}function m(t,e,i){var n,r,o,s;return s=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)}}function g(t,e,i){var n=e[1],r=e[0],o=n-r;return t===n&&i?t:((t-r)%o+o)%o+r}function y(){return!1}function v(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function b(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function k(t){return b(t).split(/\s+/)}function M(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?c(t.options):{}),e)t.options[i]=e[i];return t.options}function x(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var w=/\{ *([\w_ -]+) *\}/g;function C(t,e){return t.replace(w,function(t,i){var n=e[i];if(void 0===n)throw Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var P=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function E(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return -1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function S(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var B=0;function O(t){var e=+new Date,i=Math.max(0,16-(e-B));return B=e+i,window.setTimeout(t,i)}var D=window.requestAnimationFrame||S("RequestAnimationFrame")||O,R=window.cancelAnimationFrame||S("CancelAnimationFrame")||S("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function I(t,e,i){if(!i||D!==O)return D.call(window,d(t,e));t.call(e)}function A(t){t&&R.call(window,t)}function z(){}z.extend=function(t){var i=function(){M(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=i.__super__=this.prototype,r=c(n);for(var o in r.constructor=i,i.prototype=r,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&e(i,t.statics),t.includes&&(function(t){if("u">typeof L&&L&&L.Mixin){t=P(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",Error().stack)}}(t.includes),e.apply(null,[r].concat(t.includes))),e(r,t),delete r.statics,delete r.includes,r.options&&(r.options=n.options?c(n.options):{},e(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},i},z.include=function(t){var i=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},z.mergeOptions=function(t){return e(this.prototype.options,t),this},z.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 N={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=k(t);for(var r=0,o=t.length;r<o;r++)this._on(t[r],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=k(t);for(var r=1==arguments.length,o=0,s=t.length;o<s;o++)r?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var r={fn:e,ctx:i};n&&(r.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(r)}},_off:function(t,e,i){if(this._events&&(n=this._events[t])){if(1==arguments.length){if(this._firingCount)for(r=0,o=n.length;r<o;r++)n[r].fn=y;delete this._events[t];return}if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);var n,r,o,s=this._listens(t,e,i);if(!1!==s){var a=n[s];this._firingCount&&(a.fn=y,this._events[t]=n=n.slice()),n.splice(s,1)}}},fire:function(t,i,n){if(!this.listens(t,n))return this;var r=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,a=o.length;s<a;s++){var l=o[s],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,r)}this._firingCount--}}return n&&this._propagateEvent(r),this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var r=e;"function"!=typeof e&&(n=!!e,r=void 0,i=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,r,i))return!0;if(n){for(var s in this._eventParents)if(this._eventParents[s].listens(t,e,i,n))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var r=0,o=n.length;r<o;r++)if(n[r].fn===e&&n[r].ctx===i)return r;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else{t=k(t);for(var r=0,o=t.length;r<o;r++)this._on(t[r],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[f(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[f(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};N.addEventListener=N.on,N.removeEventListener=N.clearAllEventListeners=N.off,N.addOneTimeEventListener=N.once,N.fireEvent=N.fire,N.hasEventListeners=N.listens;var j=z.extend(N);function G(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var Z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function F(t,e,i){return t instanceof G?t:P(t)?new G(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new G(t.x,t.y):new G(t,e,i)}function U(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function V(t,e){return!t||t instanceof U?t:new U(t,e)}function H(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function q(t,e){return t instanceof H?t:new H(t,e)}function K(t,e,i){if(isNaN(t)||isNaN(e))throw Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function W(t,e,i){return t instanceof K?t:P(t)&&"object"!=typeof t[0]?3===t.length?new K(t[0],t[1],t[2]):2===t.length?new K(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new K(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new K(t,e,i)}G.prototype={clone:function(){return new G(this.x,this.y)},add:function(t){return this.clone()._add(F(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(F(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 G(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new G(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=Z(this.x),this.y=Z(this.y),this},distanceTo:function(t){var e=(t=F(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=F(t)).x===this.x&&t.y===this.y},contains:function(t){return Math.abs((t=F(t)).x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+v(this.x)+", "+v(this.y)+")"}},U.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof G||"number"==typeof t[0]||"x"in t)e=i=F(t);else if(e=(t=V(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return F((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return F(this.min.x,this.max.y)},getTopRight:function(){return F(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 G?F(t):V(t))instanceof U?(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=V(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>=e.x&&n.x<=i.x,s=r.y>=e.y&&n.y<=i.y;return o&&s},overlaps:function(t){t=V(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>e.x&&n.x<i.x,s=r.y>e.y&&n.y<i.y;return o&&s},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,r=Math.abs(e.y-i.y)*t;return V(F(e.x-n,e.y-r),F(i.x+n,i.y+r))},equals:function(t){return!!t&&(t=V(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},H.prototype={extend:function(t){var e,i,n=this._southWest,r=this._northEast;if(t instanceof K)e=t,i=t;else if(!(t instanceof H))return t?this.extend(W(t)||q(t)):this;else if(e=t._southWest,i=t._northEast,!e||!i)return this;return n||r?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),r.lat=Math.max(i.lat,r.lat),r.lng=Math.max(i.lng,r.lng)):(this._southWest=new K(e.lat,e.lng),this._northEast=new K(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,r=Math.abs(e.lng-i.lng)*t;return new H(new K(e.lat-n,e.lng-r),new K(i.lat+n,i.lng+r))},getCenter:function(){return new K((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 K(this.getNorth(),this.getWest())},getSouthEast:function(){return new K(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 K||"lat"in t?W(t):q(t);var e,i,n=this._southWest,r=this._northEast;return t instanceof H?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&n.lat<=i.lat,s=r.lng>=e.lng&&n.lng<=i.lng;return o&&s},overlaps:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&n.lat<i.lat,s=r.lng>e.lng&&n.lng<i.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=q(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!!(this._southWest&&this._northEast)}},K.prototype={equals:function(t,e){return!!t&&(t=W(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("+v(this.lat,t)+", "+v(this.lng,t)+")"},distanceTo:function(t){return X.distance(this,W(t))},wrap:function(){return X.wrapLatLng(this)},toBounds:function(t){var e=180*t/0x2637f09,i=e/Math.cos(Math.PI/180*this.lat);return q([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new K(this.lat,this.lng,this.alt)}};var Y={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 U(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?g(t.lng,this.wrapLng,!0):t.lng;return new K(this.wrapLat?g(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,r=e.lng-i.lng;if(0===n&&0===r)return t;var o=t.getSouthWest(),s=t.getNorthEast();return new H(new K(o.lat-n,o.lng-r),new K(s.lat-n,s.lng-r))}},X=e({},Y,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),s=Math.sin((e.lng-t.lng)*i/2),a=o*o+Math.cos(n)*Math.cos(r)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),J={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.sin(Math.max(Math.min(i,t.lat),-i)*e);return new G(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new K((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new U([-(l=6378137*Math.PI),-l],[l,l])};function $(t,e,i,n){if(P(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=n}function Q(t,e,i,n){return new $(t,e,i,n)}$.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(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 G((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var tt=e({},X,{code:"EPSG:3857",projection:J,transformation:Q(h=.5/(Math.PI*J.R),.5,-h,.5)}),te=e({},tt,{code:"EPSG:900913"});function ti(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function tn(t,e){var i,n,r,o,s,a,l="";for(i=0,r=t.length;i<r;i++){for(n=0,o=(s=t[i]).length;n<o;n++)a=s[n],l+=(n?"L":"M")+a.x+" "+a.y;l+=e?tA.svg?"z":"x":""}return l||"M0 0"}var tr=document.documentElement.style,to="ActiveXObject"in window,ts=to&&!document.addEventListener,ta="msLaunchUri"in navigator&&!("documentMode"in document),tl=tI("webkit"),th=tI("android"),tu=tI("android 2")||tI("android 3"),tp=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),tc=th&&tI("Google")&&tp<537&&!("AudioNode"in window),td=!!window.opera,t_=!ta&&tI("chrome"),tf=tI("gecko")&&!tl&&!td&&!to,tm=!t_&&tI("safari"),tg=tI("phantom"),ty="OTransition"in tr,tv=0===navigator.platform.indexOf("Win"),tL=to&&"transition"in tr,tb="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!tu,tk="MozPerspective"in tr,tM=!window.L_DISABLE_3D&&(tL||tb||tk)&&!ty&&!tg,tx="u">typeof orientation||tI("mobile"),tw=!window.PointerEvent&&window.MSPointerEvent,tC=!!(window.PointerEvent||tw),tP="ontouchstart"in window||!!window.TouchEvent,tE=!window.L_NO_TOUCH&&(tP||tC),tT=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,tS=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch(t){}return t}(),tB=!!document.createElement("canvas").getContext,tO=!!(document.createElementNS&&ti("svg").createSVGRect),tD=!!tO&&((u=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(u.firstChild&&u.firstChild.namespaceURI)),tR=!tO&&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 tI(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var tA={ie:to,ielt9:ts,edge:ta,webkit:tl,android:th,android23:tu,androidStock:tc,opera:td,chrome:t_,gecko:tf,safari:tm,phantom:tg,opera12:ty,win:tv,ie3d:tL,webkit3d:tb,gecko3d:tk,any3d:tM,mobile:tx,mobileWebkit:tx&&tl,mobileWebkit3d:tx&&tb,msPointer:tw,pointer:tC,touch:tE,touchNative:tP,mobileOpera:tx&&td,mobileGecko:tx&&tf,retina:tT,passiveEvents:tS,canvas:tB,svg:tO,vml:tR,inlineSvg:tD,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},tz=tA.msPointer?"MSPointerDown":"pointerdown",tN=tA.msPointer?"MSPointerMove":"pointermove",tj=tA.msPointer?"MSPointerUp":"pointerup",tG=tA.msPointer?"MSPointerCancel":"pointercancel",tZ={touchstart:tz,touchmove:tN,touchend:tj,touchcancel:tG},tF={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ek(e),tW(t,e)},touchmove:tW,touchend:tW,touchcancel:tW},tU={},tV=!1;function tH(t){tU[t.pointerId]=t}function tq(t){tU[t.pointerId]&&(tU[t.pointerId]=t)}function tK(t){delete tU[t.pointerId]}function tW(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],tU)e.touches.push(tU[i]);e.changedTouches=[e],t(e)}}var tY=ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),tX=ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tJ="webkitTransition"===tX||"OTransition"===tX?tX+"End":"transitionend";function t$(t){return"string"==typeof t?document.getElementById(t):t}function tQ(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 t0(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function t1(t){var e=t.parentNode;e&&e.removeChild(t)}function t2(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function t3(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function t4(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function t8(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=t7(t);return i.length>0&&RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function t5(t,e){if(void 0!==t.classList)for(var i=k(e),n=0,r=i.length;n<r;n++)t.classList.add(i[n]);else if(!t8(t,e)){var o=t7(t);t9(t,(o?o+" ":"")+e)}}function t6(t,e){void 0!==t.classList?t.classList.remove(e):t9(t,b((" "+t7(t)+" ").replace(" "+e+" "," ")))}function t9(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function t7(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function et(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(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+")"}(t,e)}function ee(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ei(t,e,i){var n=e||new G(0,0);t.style[tY]=(tA.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function en(t,e){t._leaflet_pos=e,tA.any3d?ei(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function er(t){return t._leaflet_pos||new G(0,0)}if("onselectstart"in document)i=function(){ec(window,"selectstart",ek)},n=function(){e_(window,"selectstart",ek)};else{var eo=ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);i=function(){if(eo){var t=document.documentElement.style;r=t[eo],t[eo]="none"}},n=function(){eo&&(document.documentElement.style[eo]=r,r=void 0)}}function es(){ec(window,"dragstart",ek)}function ea(){e_(window,"dragstart",ek)}function el(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(eh(),o=t,s=t.style.outlineStyle,t.style.outlineStyle="none",ec(window,"keydown",eh))}function eh(){o&&(o.style.outlineStyle=s,o=void 0,s=void 0,e_(window,"keydown",eh))}function eu(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body)return t}function ep(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function ec(t,e,i,n){if(e&&"object"==typeof e)for(var r in e)eg(t,r,e[r],i);else{e=k(e);for(var o=0,s=e.length;o<s;o++)eg(t,e[o],i,n)}return this}var ed="_leaflet_events";function e_(t,e,i,n){if(1==arguments.length)ef(t),delete t[ed];else if(e&&"object"==typeof e)for(var r in e)ey(t,r,e[r],i);else if(e=k(e),2==arguments.length)ef(t,function(t){return -1!==E(e,t)});else for(var o=0,s=e.length;o<s;o++)ey(t,e[o],i,n);return this}function ef(t,e){for(var i in t[ed]){var n=i.split(/\d/)[0];(!e||e(n))&&ey(t,n,null,null,i)}}var em={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function eg(t,e,i,n){var r=e+f(i)+(n?"_"+f(n):"");if(t[ed]&&t[ed][r])return this;var o=function(e){return i.call(n||t,e||window.event)},s=o;!tA.touchNative&&tA.pointer&&0===e.indexOf("touch")?o=function(t,e,i){return("touchstart"===e&&(tV||(document.addEventListener(tz,tH,!0),document.addEventListener(tN,tq,!0),document.addEventListener(tj,tK,!0),document.addEventListener(tG,tK,!0),tV=!0)),tF[e])?(i=tF[e].bind(this,i),t.addEventListener(tZ[e],i,!1),i):(console.warn("wrong event specified:",e),y)}(t,e,o):tA.touch&&"dblclick"===e?o=function(t,e){t.addEventListener("dblclick",e);var i,n=0;function r(t){if(1!==t.detail){i=t.detail;return}if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var r=ex(t);if(!r.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||r.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var o=Date.now();o-n<=200?2==++i&&e(function(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}(t)):i=1,n=o}}}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(em[e]||e,o,!!tA.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){eE(t,e=e||window.event)&&s(e)},t.addEventListener(em[e],o,!1)):t.addEventListener(e,s,!1):t.attachEvent("on"+e,o),t[ed]=t[ed]||{},t[ed][r]=o}function ey(t,e,i,n,r){r=r||e+f(i)+(n?"_"+f(n):"");var o=t[ed]&&t[ed][r];if(!o)return this;!tA.touchNative&&tA.pointer&&0===e.indexOf("touch")?tZ[e]?t.removeEventListener(tZ[e],o,!1):console.warn("wrong event specified:",e):tA.touch&&"dblclick"===e?(t.removeEventListener("dblclick",o.dblclick),t.removeEventListener("click",o.simDblclick)):"removeEventListener"in t?t.removeEventListener(em[e]||e,o,!1):t.detachEvent("on"+e,o),t[ed][r]=null}function ev(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function eL(t){return eg(t,"wheel",ev),this}function eb(t){return ec(t,"mousedown touchstart dblclick contextmenu",ev),t._leaflet_disable_click=!0,this}function ek(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function eM(t){return ek(t),ev(t),this}function ex(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function ew(t,e){if(!e)return new G(t.clientX,t.clientY);var i=ep(e),n=i.boundingClientRect;return new G((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var eC=tA.linux&&tA.chrome?window.devicePixelRatio:tA.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function eP(t){return tA.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/eC: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&&32765>Math.abs(t.detail)?-(20*t.detail):t.detail?-(60*(t.detail/32765)):0}function eE(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 eT=j.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=er(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=I(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(),en(this._el,i),this.fire("step")},_complete:function(){A(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),eS=j.extend({options:{crs:tt,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=M(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=d(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(W(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=tX&&tA.any3d&&!tA.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ec(this._proxy,tJ,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,n){return(i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(W(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan)))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i,n.pan&&n.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(tA.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(tA.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=(t instanceof G?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/n),s=this.containerPointToLatLng(r.add(o));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():q(t);var i=F(e.paddingTopLeft||e.padding||[0,0]),n=F(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var o=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),r),a=this.project(t.getNorthEast(),r);return{center:this.unproject(s.add(a).divideBy(2).add(o),r),zoom:r}},fitBounds:function(t,e){if(!(t=q(t)).isValid())throw Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=F(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new eT,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){t5(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||!tA.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),r=this.project(t),o=this.getSize(),s=this._zoom;t=W(t),e=void 0===e?s:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(s,e),h=r.distanceTo(n)||1;function u(t){var e=(l*l-a*a+(t?-1:1)*4.0658689599999995*h*h)/(2*(t?l:a)*2.0164*h),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 c(t){return(Math.exp(t)+Math.exp(-t))/2}var d=u(0),_=Date.now(),f=(u(1)-d)/1.42,m=i.duration?1e3*i.duration:1e3*f*.8;function g(){var i,o=(Date.now()-_)/m,l=(1-Math.pow(1-o,1.5))*f;o<=1?(this._flyToFrame=I(g,this),this._move(this.unproject(n.add(r.subtract(n).multiplyBy(a*(c(d)*(p(i=d+1.42*l)/c(i))-p(d))/2.0164/h)),s),this.getScaleZoom(a/(a*(c(d)/c(d+1.42*l))),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),g.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=q(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid())?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return(this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom))?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return(this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom))?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,q(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=F((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=F(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(t),s=this.getPixelBounds(),a=V([s.min.add(i),s.max.subtract(n)]),l=a.getSize();if(!a.contains(o)){this._enforcingBounds=!0;var h=o.subtract(a.getCenter()),u=a.extend(o).getSize().subtract(l);r.x+=h.x<0?-u.x:u.x,r.y+=h.y<0?-u.y:u.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=i.divideBy(2).round(),o=n.divideBy(2).round(),s=r.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,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=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=d(this._handleGeolocationResponse,this),n=d(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,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 K(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var r=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(r,n.maxZoom):r)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(o[s]=t.coords[s]);this.fire("locationfound",o)}},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(){var t;if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw 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}for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),t1(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)t1(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=t0("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.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new H(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._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=q(t),i=F(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=V(this.project(a,n),this.project(s,n)).getSize(),u=tA.any3d?this.options.zoomSnap:1,p=l.x/h.x,c=l.y/h.y,d=e?Math.max(p,c):Math.min(p,c);return n=this.getScaleZoom(d,n),u&&(n=u/100*Math.round(n/(u/100)),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(r,Math.min(o,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(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 U(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(W(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(F(t),e)},layerPointToLatLng:function(t){var e=F(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(W(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(W(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(q(t))},distance:function(t,e){return this.options.crs.distance(W(t),W(e))},containerPointToLayerPoint:function(t){return F(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return F(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(F(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(t)))},mouseEventToContainerPoint:function(t){return ew(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=t$(t);if(e){if(e._leaflet_id)throw Error("Map container is already initialized.")}else throw Error("Map container not found.");ec(e,"scroll",this._onScroll,this),this._containerId=f(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&tA.any3d,t5(t,"leaflet-container"+(tA.touch?" leaflet-touch":"")+(tA.retina?" leaflet-retina":"")+(tA.ielt9?" leaflet-oldie":"")+(tA.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=tQ(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==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),en(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t5(t.markerPane,"leaflet-zoom-hide"),t5(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){en(this._mapPane,new G(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,i)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((r||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 A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){en(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 Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[f(this._container)]=this;var e=t?e_:ec;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),tA.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=I(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=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((i=this._targets[f(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)&&(r&&!eE(o,t)||(n.push(i),r)))break;if(o===this._container)break;o=o.parentNode}return!n.length&&!s&&!r&&this.listens(e,!0)&&(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&el(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var r=e({},t);r.type="preclick",this._fireDOMEvent(r,r.type,n)}var o=this._findEventTargets(t,i);if(n){for(var s=[],a=0;a<n.length;a++)n[a].listens(i,!0)&&s.push(n[a]);o=s.concat(o)}if(o.length){"contextmenu"===i&&ek(t);var l=o[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=u?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<o.length;a++)if(o[a].fire(i,h,!0),h.originalEvent._stopped||!1===o[a].options.bubblingMouseEvents&&-1!==E(this._mouseEvents,i))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 er(this._mapPane)||new G(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);return V([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),r=this.getSize().divideBy(2),o=new U(n.subtract(r),n.add(r)),s=this._getBoundsOffset(o,i,e);return 1>=Math.abs(s.x)&&1>=Math.abs(s.y)?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new U(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=V(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),o=n.max.subtract(t.max);return new G(this._rebound(r.x,-o.x),this._rebound(r.y,-o.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=tA.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(){t6(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=t0("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=this._proxy.style[tY];ei(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[tY]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){t1(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ei(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),r=this._getCenterOffset(t)._divideBy(1-1/n);return(!0===i.animate||!!this.getSize().contains(r))&&(I(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,t5(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(d(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&t6(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))}}),eB=z.extend({options:{position:"topright"},initialize:function(t){M(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 t5(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&&(t1(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),eO=function(t){return new eB(t)};eS.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=t0("div",e+"control-container",this._container);function n(n,r){t[n+r]=t0("div",e+n+" "+e+r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)t1(this._controlCorners[t]);t1(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var eD=eB.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:+(n<i)}},initialize:function(t,e,i){for(var n in M(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!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 eB.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(f(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){t5(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?(t5(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):t6(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return t6(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=t0("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),eb(e),eL(e);var n=this._section=t0("section",t+"-list");i&&(this._map.on("click",this.collapse,this),ec(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=t0("a",t+"-toggle",e);r.href="#",r.title="Layers",r.setAttribute("role","button"),ec(r,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){ek(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=t0("div",t+"-base",n),this._separator=t0("div",t+"-separator",n),this._overlaysList=t0("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&f(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(d(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;t2(this._baseLayersList),t2(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,r=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,r+=+!n.overlay;return this.options.hideSingleBase&&(t=t&&r>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(f(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=document.createElement("div");return i.innerHTML='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i.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_"+f(this),n),this._layerControlInputs.push(e),e.layerId=f(t.layer),ec(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("span");return i.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),r=i.length-1;r>=0;r--)t=i[r],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},_expandSafely:function(){var t=this._section;this._preventClick=!0,ec(t,"click",ek),this.expand();var e=this;setTimeout(function(){e_(t,"click",ek),e._preventClick=!1})}}),eR=eB.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=t0("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,r){var o=t0("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),eb(o),ec(o,"click",eM),ec(o,"click",r,this),ec(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";t6(this._zoomInButton,e),t6(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(t5(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(t5(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});eS.mergeOptions({zoomControl:!0}),eS.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new eR,this.addControl(this.zoomControl))});var eI=eB.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=t0("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=t0("div",e,i)),t.imperial&&(this._iScale=t0("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);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,n,r=3.2808399*t;r>5280?(e=r/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(r),this._updateScale(this._iScale,n+" ft",n/r))},_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)}}),eA=eB.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(tA.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){M(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=t0("div","leaflet-control-attribution"),eb(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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),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> ')}}});eS.mergeOptions({attributionControl:!0}),eS.addInitHook(function(){this.options.attributionControl&&new eA().addTo(this)}),eB.Layers=eD,eB.Zoom=eR,eB.Scale=eI,eB.Attribution=eA,eO.layers=function(t,e,i){return new eD(t,e,i)},eO.zoom=function(t){return new eR(t)},eO.scale=function(t){return new eI(t)},eO.attribution=function(t){return new eA(t)};var ez=z.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},enabled:function(){return!!this._enabled}});ez.addTo=function(t,e){return t.addHandler(e,this),this};var eN=tA.touch?"touchstart mousedown":"mousedown",ej=j.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){M(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ec(this._dragStartTarget,eN,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ej._dragging===this&&this.finishDrag(!0),e_(this._dragStartTarget,eN,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(!this._enabled||(this._moved=!1,t8(this._element,"leaflet-zoom-anim")))){if(t.touches&&1!==t.touches.length){ej._dragging===this&&this.finishDrag();return}if(!ej._dragging&&!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(ej._dragging=this,this._preventOutline&&el(this._element),es(),i(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,n=eu(this._element);this._startPoint=new G(e.clientX,e.clientY),this._startPos=er(this._element),this._parentScale=ep(n);var r="mousedown"===t.type;ec(document,r?"mousemove":"touchmove",this._onMove,this),ec(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new G(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,ek(t),this._moved||(this.fire("dragstart"),this._moved=!0,t5(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),t5(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),en(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){t6(document.body,"leaflet-dragging"),this._lastTarget&&(t6(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),e_(document,"mousemove touchmove",this._onMove,this),e_(document,"mouseup touchend touchcancel",this._onUp,this),ea(),n();var e=this._moved&&this._moving;this._moving=!1,ej._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function eG(t,e,i){var n,r,o,s,a,l,h,u,p,c=[1,4,2,8];for(r=0,h=t.length;r<h;r++)t[r]._code=eK(t[r],e);for(s=0;s<4;s++){for(r=0,u=c[s],n=[],o=(h=t.length)-1;r<h;o=r++)a=t[r],l=t[o],a._code&u?l._code&u||((p=eq(l,a,u,e,i))._code=eK(p,e),n.push(p)):(l._code&u&&((p=eq(l,a,u,e,i))._code=eK(p,e),n.push(p)),n.push(a));t=n}return t}function eZ(t,e){if(!t||0===t.length)throw Error("latlngs not passed");eY(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var i,n,r,o,s,a,l,h,u,p=W([0,0]),c=q(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(p=eF(t));var d=t.length,_=[];for(i=0;i<d;i++){var f=W(t[i]);_.push(e.project(W([f.lat-p.lat,f.lng-p.lng])))}for(i=0,a=l=h=0,n=d-1;i<d;n=i++)r=_[i],o=_[n],s=r.y*o.x-o.y*r.x,l+=(r.x+o.x)*s,h+=(r.y+o.y)*s,a+=3*s;u=0===a?_[0]:[l/a,h/a];var m=e.unproject(F(u));return W([m.lat+p.lat,m.lng+p.lng])}function eF(t){for(var e=0,i=0,n=0,r=0;r<t.length;r++){var o=W(t[r]);e+=o.lat,i+=o.lng,n++}return W([e/n,i/n])}function eU(t,e){if(!e||!t.length)return t.slice();var i=e*e;return function(t,e){var i=t.length,n=new("u">typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,r,o){var s,a,l,h=0;for(a=r+1;a<=o-1;a++)(l=eW(e[a],e[r],e[o],!0))>h&&(s=a,h=l);h>n&&(i[s]=1,t(e,i,n,r,s),t(e,i,n,s,o))}(t,n,e,0,i-1);var r,o=[];for(r=0;r<i;r++)n[r]&&o.push(t[r]);return o}(t=function(t,e){for(var i=[t[0]],n=1,r=0,o=t.length;n<o;n++)(function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n})(t[n],t[r])>e&&(i.push(t[n]),r=n);return r<o-1&&i.push(t[o-1]),i}(t,i),i)}function eV(t,e,i){return Math.sqrt(eW(t,e,i,!0))}function eH(t,e,i,n,r){var o,s,l,h=n?a:eK(t,i),u=eK(e,i);for(a=u;;){if(!(h|u))return[t,e];if(h&u)return!1;l=eK(s=eq(t,e,o=h||u,i,r),i),o===h?(t=s,h=l):(e=s,u=l)}}function eq(t,e,i,n,r){var o,s,a=e.x-t.x,l=e.y-t.y,h=n.min,u=n.max;return 8&i?(o=t.x+a*(u.y-t.y)/l,s=u.y):4&i?(o=t.x+a*(h.y-t.y)/l,s=h.y):2&i?(o=u.x,s=t.y+l*(u.x-t.x)/a):1&i&&(o=h.x,s=t.y+l*(h.x-t.x)/a),new G(o,s,r)}function eK(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 eW(t,e,i,n){var r,o=e.x,s=e.y,a=i.x-o,l=i.y-s,h=a*a+l*l;return h>0&&((r=((t.x-o)*a+(t.y-s)*l)/h)>1?(o=i.x,s=i.y):r>0&&(o+=a*r,s+=l*r)),a=t.x-o,l=t.y-s,n?a*a+l*l:new G(o,s)}function eY(t){return!P(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function eX(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),eY(t)}function eJ(t,e){if(!t||0===t.length)throw Error("latlngs not passed");eY(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var i,n,r,o,s,a,l,h,u=W([0,0]),p=q(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(u=eF(t));var c=t.length,d=[];for(i=0;i<c;i++){var _=W(t[i]);d.push(e.project(W([_.lat-u.lat,_.lng-u.lng])))}for(i=0,n=0;i<c-1;i++)n+=d[i].distanceTo(d[i+1])/2;if(0===n)h=d[0];else for(i=0,o=0;i<c-1;i++)if(s=d[i],a=d[i+1],(o+=r=s.distanceTo(a))>n){l=(o-n)/r,h=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var f=e.unproject(F(h));return W([f.lat+u.lat,f.lng+u.lng])}var e$={project:function(t){return new G(t.lng,t.lat)},unproject:function(t){return new K(t.y,t.x)},bounds:new U([-180,-90],[180,90])},eQ={R:6378137,R_MINOR:6356752.314245179,bounds:new U([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),s=o*Math.sin(n);return n=-i*Math.log(Math.max(Math.tan(Math.PI/4-n/2)/Math.pow((1-s)/(1+s),o/2),1e-10)),new G(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),s=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(s),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)h=Math.PI/2-2*Math.atan(s*(e=Math.pow((1-(e=o*Math.sin(a)))/(1+e),o/2)))-a,a+=h;return new K(a*i,t.x*i/n)}},e0=e({},X,{code:"EPSG:3395",projection:eQ,transformation:Q(p=.5/(Math.PI*eQ.R),.5,-p,.5)}),e1=e({},X,{code:"EPSG:4326",projection:e$,transformation:Q(1/180,1,-1/180,.5)}),e2=e({},Y,{projection:e$,transformation:Q(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});Y.Earth=X,Y.EPSG3395=e0,Y.EPSG3857=tt,Y.EPSG900913=te,Y.EPSG4326=e1,Y.Simple=e2;var e3=j.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[f(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[f(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})}}});eS.include({addLayer:function(t){if(!t._layerAdd)throw Error("The provided object is not a Layer.");var e=f(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=f(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},hasLayer:function(t){return f(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?P(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[f(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=f(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 r=this._zoomBoundLayers[n].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.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 e4=e3.extend({initialize:function(t,e){var i,n;if(M(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 f(t)}}),e8=e4.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e4.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),e4.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 H;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),e5=z.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){M(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 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 r=F(n),o=F("shadow"===e&&i.shadowAnchor||i.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return tA.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),e6=e5.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 e6.imagePath&&(e6.imagePath=this._detectIconPath()),(this.options.imagePath||e6.imagePath)+e5.prototype._getIconUrl.call(this,t)},_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=t0("div","leaflet-default-icon-path",document.body),e=tQ(t,"background-image")||tQ(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):""}}),e9=ez.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ej(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t5(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&&t6(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,r=this._marker.options.autoPanPadding,o=er(e._icon),s=i.getPixelBounds(),a=i.getPixelOrigin(),l=V(s.min._subtract(a).add(r),s.max._subtract(a).subtract(r));if(!l.contains(o)){var h=F((Math.max(l.max.x,o.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),en(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=I(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&&(A(this._panRequest),this._panRequest=I(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=er(e._icon),r=e._map.layerPointToLatLng(n);i&&en(i,n),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){A(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),e7=e3.extend({options:{icon:new e6,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){M(this,e),this._latlng=W(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=W(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||"")),t5(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ec(i,"focus",this._panOnFocus,this);var r=t.icon.createShadow(this._shadow),o=!1;r!==this._shadow&&(this._removeShadow(),o=!0),r&&(t5(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&e_(this._icon,"focus",this._panOnFocus,this),t1(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&t1(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&en(this._icon,t),this._shadow&&en(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&&(t5(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),e9)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new e9(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&&et(this._icon,t),this._shadow&&et(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?F(e.iconSize):F(0,0),n=e.iconAnchor?F(e.iconAnchor):F(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}}),it=e3.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 M(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)}}),ie=it.extend({options:{fill:!0,radius:10},initialize:function(t,e){M(this,e),this._latlng=W(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=W(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return it.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 U(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()}}),ii=ie.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),M(this,i),this._latlng=W(t),isNaN(this.options.radius))throw 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 H(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:it.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===X.distance){var r=Math.PI/180,o=this._mRadius/X.R/r,s=i.project([e+o,t]),a=i.project([e-o,t]),l=s.add(a).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(o*r)-Math.sin(e*r)*Math.sin(h*r))/(Math.cos(e*r)*Math.cos(h*r)))/r;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-i.project([h,t-u]).x,this._radiusY=l.y-s.y}else{var p=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(p).x}this._updateBounds()}}),ir=it.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){M(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,r=null,o=eW,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],h=1,u=l.length;h<u;h++){var p=o(t,e=l[h-1],i=l[h],!0);p<n&&(n=p,r=o(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw Error("Must add layer to map before using getCenter()");return eJ(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=W(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new H,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return eY(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=eY(t),n=0,r=t.length;n<r;n++)i?(e[n]=W(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new U;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 G(t,t);this._rawPxBounds&&(this._pxBounds=new U([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof K,s=t.length;if(o){for(n=0,r=[];n<s;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}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;return}var e,i,n,r,o,s,a,l=this._parts;for(e=0,n=0,r=this._rings.length;e<r;e++)for(i=0,o=(a=this._rings[e]).length;i<o-1;i++)(s=eH(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(s[0]),(s[1]!==a[i+1]||i===o-2)&&(l[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]=eU(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,r,o,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,r=(s=(a=this._parts[i]).length)-1;n<s;r=n++)if((e||0!==n)&&eV(t,a[r],a[n])<=l)return!0;return!1}});ir._flat=eX;var io=ir.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw Error("Must add layer to map before using getCenter()");return eZ(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ir.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof K&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ir.prototype._setLatLngs.call(this,t),eY(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return eY(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new G(e,e);if(t=new U(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){this._parts=this._rings;return}for(var n,r=0,o=this._rings.length;r<o;r++)(n=eG(this._rings[r],t,!0)).length&&this._parts.push(n)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,r,o,s,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,a=this._parts.length;r<a;r++)for(o=0,s=(l=(e=this._parts[r]).length)-1;o<l;s=o++)i=e[o],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&&(h=!h);return h||ir.prototype._containsPoint.call(this,t,!0)}}),is=e8.extend({initialize:function(t,e){M(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=P(t)?t:t.features;if(r){for(e=0,i=r.length;e<i;e++)((n=r[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=ia(t,o);return s?(s.feature=i_(t),s.defaultOptions=s.options,this.resetStyle(s),o.onEachFeature&&o.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},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 ia(t,e){var i,n,r,o="Feature"===t.type?t.geometry:t,s=o?o.coordinates:null,a=[],l=e&&e.pointToLayer,h=e&&e.coordsToLatLng||ih;if(!s&&!o)return null;switch(o.type){case"Point":return il(l,t,i=h(s),e);case"MultiPoint":for(n=0,r=s.length;n<r;n++)i=h(s[n]),a.push(il(l,t,i,e));return new e8(a);case"LineString":case"MultiLineString":return new ir(iu(s,+("LineString"!==o.type),h),e);case"Polygon":case"MultiPolygon":return new io(iu(s,"Polygon"===o.type?1:2,h),e);case"GeometryCollection":for(n=0,r=o.geometries.length;n<r;n++){var u=ia({geometry:o.geometries[n],type:"Feature",properties:t.properties},e);u&&a.push(u)}return new e8(a);case"FeatureCollection":for(n=0,r=o.features.length;n<r;n++){var p=ia(o.features[n],e);p&&a.push(p)}return new e8(a);default:throw Error("Invalid GeoJSON object.")}}function il(t,e,i,n){return t?t(e,i):new e7(i,n&&n.markersInheritOptions&&n)}function ih(t){return new K(t[1],t[0],t[2])}function iu(t,e,i){for(var n=[],r=0,o=t.length;r<o;r++)n.push(e?iu(t[r],e-1,i):(i||ih)(t[r]));return n}function ip(t,e){return void 0!==(t=W(t)).alt?[v(t.lng,e),v(t.lat,e),v(t.alt,e)]:[v(t.lng,e),v(t.lat,e)]}function ic(t,e,i,n){for(var r=[],o=0,s=t.length;o<s;o++)r.push(e?ic(t[o],eY(t[o])?0:e-1,i,n):ip(t[o],n));return!e&&i&&r.length>0&&r.push(r[0].slice()),r}function id(t,i){return t.feature?e({},t.feature,{geometry:i}):i_(i)}function i_(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var im={toGeoJSON:function(t){return id(this,{type:"Point",coordinates:ip(this.getLatLng(),t)})}};function ig(t,e){return new is(t,e)}e7.include(im),ii.include(im),ie.include(im),ir.include({toGeoJSON:function(t){var e=!eY(this._latlngs),i=ic(this._latlngs,+!!e,!1,t);return id(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),io.include({toGeoJSON:function(t){var e=!eY(this._latlngs),i=e&&!eY(this._latlngs[0]),n=ic(this._latlngs,i?2:+!!e,!0,t);return e||(n=[n]),id(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),e4.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),id(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 r=e.toGeoJSON(t);if(i)n.push(r.geometry);else{var o=i_(r);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i)?id(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var iy=e3.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=q(e),M(this,i)},onAdd:function(){!this._image&&(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(t5(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){t1(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&&t3(this._image),this},bringToBack:function(){return this._map&&t4(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:t0("img");if(t5(e,"leaflet-image-layer"),this._zoomAnimated&&t5(e,"leaflet-zoom-animated"),this.options.className&&t5(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=d(this.fire,this,"load"),e.onerror=d(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;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ei(this._image,i,e)},_reset:function(){var t=this._image,e=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();en(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){et(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()}}),iv=iy.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:t0("video");if(t5(e,"leaflet-image-layer"),this._zoomAnimated&&t5(e,"leaflet-zoom-animated"),this.options.className&&t5(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=d(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];return}P(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 o=0;o<this._url.length;o++){var s=t0("source");s.src=this._url[o],e.appendChild(s)}}}),iL=iy.extend({_initImage:function(){var t=this._image=this._url;t5(t,"leaflet-image-layer"),this._zoomAnimated&&t5(t,"leaflet-zoom-animated"),this.options.className&&t5(t,this.options.className),t.onselectstart=y,t.onmousemove=y}}),ib=e3.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof K||P(t))?(this._latlng=W(t),M(this,e)):(M(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&et(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&et(this._container,1),this.bringToFront(),this.options.interactive&&(t5(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(et(this._container,0),this._removeTimeout=setTimeout(d(t1,void 0,this._container),200)):t1(this._container),this.options.interactive&&(t6(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=W(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&&t3(this._container),this},bringToBack:function(){return this._map&&t4(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof e8){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="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=F(this.options.offset),i=this._getAnchor();this._zoomAnimated?en(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});eS.include({_initOverlay:function(t,e,i,n){var r=e;return r instanceof t||(r=new t(n).setContent(e)),i&&r.setLatLng(i),r}}),e3.include({_initOverlay:function(t,e,i,n){var r=i;return r instanceof t?(M(r,n),r._source=this):(r=e&&!n?e:new t(n,this)).setContent(i),r}});var ik=ib.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,ib.prototype.openOn.call(this,t)},onAdd:function(t){ib.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof it||this._source.on("preclick",ev))},onRemove:function(t){ib.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof it||this._source.off("preclick",ev))},getEvents:function(){var t=ib.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=t0("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=t0("div",t+"-content-wrapper",e);if(this._contentNode=t0("div",t+"-content",i),eb(e),eL(this._contentNode),ec(e,"contextmenu",ev),this._tipContainer=t0("div",t+"-tip-container",e),this._tip=t0("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=t0("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',ec(n,"click",function(t){ek(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;e.width=(i=Math.max(i=Math.min(i,this.options.maxWidth),this.options.minWidth))+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";r&&n>r?(e.height=r+"px",t5(t,o)):t6(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();en(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(tQ(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,r=new G(this._containerLeft,-i-this._containerBottom);r._add(er(this._container));var o=t.layerPointToContainerPoint(r),s=F(this.options.autoPanPadding),a=F(this.options.autoPanPaddingTopLeft||s),l=F(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),u=0,p=0;o.x+n+l.x>h.x&&(u=o.x+n-h.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+i+l.y>h.y&&(p=o.y+i-h.y+l.y),o.y-p-a.y<0&&(p=o.y-a.y),(u||p)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,p]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});eS.mergeOptions({closePopupOnClick:!0}),eS.include({openPopup:function(t,e,i){return this._initOverlay(ik,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),e3.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ik,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof e8||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){eM(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof it))return void(this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng));this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var iM=ib.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){ib.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){ib.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=ib.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=t0("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,r=this._container,o=n.latLngToContainerPoint(n.getCenter()),s=n.layerPointToContainerPoint(t),a=this.options.direction,l=r.offsetWidth,h=r.offsetHeight,u=F(this.options.offset),p=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):("center"===a?e=l/2:"right"===a?e=0:"left"===a?e=l:s.x<o.x?(a="right",e=0):(a="left",e=l+(u.x+p.x)*2),i=h/2),t=t.subtract(F(e,i,!0)).add(u).add(p),t6(r,"leaflet-tooltip-right"),t6(r,"leaflet-tooltip-left"),t6(r,"leaflet-tooltip-top"),t6(r,"leaflet-tooltip-bottom"),t5(r,"leaflet-tooltip-"+a),en(r,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&et(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return F(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});eS.include({openTooltip:function(t,e,i){return this._initOverlay(iM,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),e3.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(iM,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={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners():e.add=this._addFocusListeners),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[t?"off":"on"](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof e8||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(ec(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),ec(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e,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 ix=e5.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?(t2(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=F(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});e5.Default=e6;var iw=e3.extend({options:{tileSize:256,opacity:1,updateWhenIdle:tA.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){M(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),t1(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(t3(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(t4(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=m(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 G?t:new G(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),r=0,o=i.length;r<o;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!tA.ielt9){et(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var r=this._tiles[n];if(r.current&&r.loaded){var o=Math.min(1,(t-r.loaded)/200);et(r.el,o),o<1?e=!0:(r.active?i=!0:this._onOpaqueTile(r),r.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(A(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=t0("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)):(t1(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],r=this._map;return n||((n=this._levels[t]={}).el=t0("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,r.getCenter(),r.getZoom()),y(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)return void this._removeAllTiles();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)t1(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),s=i-1,a=new G(+r,+o);a.z=+s;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),s>n&&this._retainParent(r,o,s,n))},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var s=new G(r,o);s.z=i+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];if(l&&l.active){l.retain=!0;continue}l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(r,o,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 r=Math.round(e);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var o=this.options.updateWhenZooming&&r!==this._tileZoom;(!n||o)&&(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&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),r=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();tA.any3d?ei(t.el,r,n):en(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),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),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new U(r.subtract(o),r.add(o))},_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),r=this._pxBoundsToTileRange(n),o=r.getCenter(),s=[],a=this.options.keepBuffer,l=new U(r.getBottomLeft().subtract([a,-a]),r.getTopRight().add([a,-a]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new G(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)return void this._setView(t,i);for(var p=r.min.y;p<=r.max.y;p++)for(var c=r.min.x;c<=r.max.x;c++){var d=new G(c,p);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:s.push(d)}}if(s.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(c=0;c<s.length;c++)this._addTile(s[c],f);this._level.el.appendChild(f)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return q(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(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 G(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(t1(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){t5(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,tA.ielt9&&this.options.opacity<1&&et(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),d(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&I(d(this._tileReady,this,t,null,r)),en(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(et(i.el,0),A(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(t5(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tA.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new G(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new U(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}}),iC=iw.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=M(this,e)).detectRetina&&tA.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl: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 ec(i,"load",d(this._tileOnLoad,this,e,i)),ec(i,"error",d(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.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:tA.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&&(i.y=n),i["-y"]=n}return C(this._url,e(i,this.options))},_tileOnLoad:function(t,e){tA.ielt9?setTimeout(d(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=y,e.onerror=y,!e.complete)){e.src=T;var i=this._tiles[t].coords;t1(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",T),iw.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==T))return iw.prototype._tileReady.call(this,t,e,i)}});function iP(t,e){return new iC(t,e)}var iE=iC.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,i){this._url=t;var n=e({},this.defaultWmsParams);for(var r in i)r in this.options||(n[r]=i[r]);var o=(i=M(this,i)).detectRetina&&tA.retina?2:1,s=this.getTileSize();n.width=s.x*o,n.height=s.y*o,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,iC.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=V(i.project(e[0]),i.project(e[1])),r=n.min,o=n.max,s=(this._wmsVersion>=1.3&&this._crs===e1?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),a=iC.prototype.getTileUrl.call(this,t);return a+x(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});iC.WMS=iE,iP.wms=function(t,e){return new iE(t,e)};var iT=e3.extend({options:{padding:.1},initialize:function(t){M(this,t),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),t5(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),r=this._map.project(this._center,e),o=n.multiplyBy(-i).add(r).subtract(this._map._getNewPixelOrigin(t,e));tA.any3d?ei(this._container,o,i):en(this._container,o)},_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)).round();this._bounds=new U(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),iS=iT.extend({options:{tolerance:0},getEvents:function(){var t=iT.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){iT.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ec(t,"mousemove",this._onMouseMove,this),ec(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ec(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){A(this._redrawRequest),delete this._ctx,t1(this._container),e_(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){iT.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=tA.retina?2:1;en(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",tA.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){iT.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[f(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[f(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(/[, ]+/),r=[];for(i=0;i<n.length;i++){if(isNaN(e=Number(n[i])))return;r.push(e)}t.options._dashArray=r}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||I(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new U,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,r,o,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,r=s[i].length;n<r;n++)o=s[i][n],l[n?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==r&&(i.save(),i.scale(1,r)),i.beginPath(),i.arc(e.x,e.y/r,n,0,2*Math.PI,!1),1!==r&&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),r=this._drawFirst;r;r=r.next)(e=r.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&&(t6(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&&(t5(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(d(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;if(!i)return;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;if(!n)return;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 iB(t){return tA.canvas?new iS(t):null}var iO=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">')}}(),iD=tA.vml?iO:ti,iR=iT.extend({_initContainer:function(){this._container=iD("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=iD("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){t1(this._container),e_(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){iT.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)),en(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=iD("path");t.options.className&&t5(e,t.options.className),t.options.interactive&&t5(e,"leaflet-interactive"),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){t1(t._path),t.removeInteractiveTarget(t._path),delete this._layers[f(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,tn(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,r="a"+i+","+n+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+r+2*i+",0 "+r+-(2*i)+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){t3(t._path)},_bringToBack:function(t){t4(t._path)}});function iI(t){return tA.svg||tA.vml?new iR(t):null}tA.vml&&iR.include({_initContainer:function(){this._container=t0("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(iT.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=iO("shape");t5(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=iO("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[f(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;t1(e),t.removeInteractiveTarget(e),delete this._layers[f(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e||(e=t._stroke=iO("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=P(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=iO("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.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){t3(t._container)},_bringToBack:function(t){t4(t._container)}}),eS.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&&iB(t)||iI(t)}});var iA=io.extend({initialize:function(t,e){io.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=q(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});iR.create=iD,iR.pointsToPath=tn,is.geometryToLayer=ia,is.coordsToLatLng=ih,is.coordsToLatLngs=iu,is.latLngToCoords=ip,is.latLngsToCoords=ic,is.getFeature=id,is.asFeature=i_,eS.mergeOptions({boxZoom:!0});var iz=ez.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(){ec(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){e_(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){t1(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(),i(),es(),this._startPoint=this._map.mouseEventToContainerPoint(t),ec(document,{contextmenu:eM,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=t0("div","leaflet-zoom-box",this._container),t5(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new U(this._point,this._startPoint),i=e.getSize();en(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(t1(this._box),t6(this._container,"leaflet-crosshair")),n(),ea(),e_(document,{contextmenu:eM,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(d(this._resetState,this),0);var e=new H(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())}});eS.addInitHook("addHandler","boxZoom",iz),eS.mergeOptions({doubleClickZoom:!0});var iN=ez.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,r=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});eS.addInitHook("addHandler","doubleClickZoom",iN),eS.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ij=ez.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ej(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))}t5(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){t6(this._map._container,"leaflet-grab"),t6(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=q(this._map.options.maxBounds);this._offsetLimit=V(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,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,s=Math.abs(r+i)<Math.abs(o+i)?r:o;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 r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,s=i.easeLinearity,a=r.multiplyBy(s/o),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=a.multiplyBy(h/l),p=h/(i.inertiaDeceleration*s),c=u.multiplyBy(-p/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),I(function(){e.panBy(c,{duration:p,easeLinearity:s,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});eS.addInitHook("addHandler","dragging",ij),eS.mergeOptions({keyboard:!0,keyboardPanDelta:80});var iG=ez.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"),ec(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(),e_(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={},r=this.keyCodes;for(e=0,i=r.left.length;e<i;e++)n[r.left[e]]=[-1*t,0];for(e=0,i=r.right.length;e<i;e++)n[r.right[e]]=[t,0];for(e=0,i=r.down.length;e<i;e++)n[r.down[e]]=[0,t];for(e=0,i=r.up.length;e<i;e++)n[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},r=this.keyCodes;for(e=0,i=r.zoomIn.length;e<i;e++)n[r.zoomIn[e]]=t;for(e=0,i=r.zoomOut.length;e<i;e++)n[r.zoomOut[e]]=-t},_addHooks:function(){ec(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){e_(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){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=F(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(F(e),n.options.maxBounds)),n.options.worldCopyJump){var r=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(r)}else n.panBy(e)}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()}eM(t)}}});eS.addInitHook("addHandler","keyboard",iG),eS.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var iZ=ez.extend({addHooks:function(){ec(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){e_(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=eP(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(d(this._performZoom,this),n),eM(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,r=i?Math.ceil(n/i)*i:n,o=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});eS.addInitHook("addHandler","scrollWheelZoom",iZ),eS.mergeOptions({tapHold:tA.touchNative&&tA.safari&&tA.mobile,tapTolerance:15});var iF=ez.extend({addHooks:function(){ec(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){e_(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 G(e.clientX,e.clientY),this._holdTimeout=setTimeout(d(function(){this._cancel(),this._isTapValid()&&(ec(document,"touchend",ek),ec(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),ec(document,"touchend touchcancel contextmenu",this._cancel,this),ec(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){e_(document,"touchend",ek),e_(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),e_(document,"touchend touchcancel contextmenu",this._cancel,this),e_(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new G(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)}});eS.addInitHook("addHandler","tapHold",iF),eS.mergeOptions({touchZoom:tA.touch,bounceAtZoomLimits:!0});var iU=ez.extend({addHooks:function(){t5(this._map._container,"leaflet-touch-zoom"),ec(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){t6(this._map._container,"leaflet-touch-zoom"),e_(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(),ec(document,"touchmove",this._onTouchMove,this),ec(document,"touchend touchcancel",this._onTouchEnd,this),ek(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=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 o=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===o.x&&0===o.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),A(this._animRequest);var s=d(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(s,this,!0),ek(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,A(this._animRequest),e_(document,"touchmove",this._onTouchMove,this),e_(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))}});eS.addInitHook("addHandler","touchZoom",iU),eS.BoxZoom=iz,eS.DoubleClickZoom=iN,eS.Drag=ij,eS.Keyboard=iG,eS.ScrollWheelZoom=iZ,eS.TapHold=iF,eS.TouchZoom=iU,t.Bounds=U,t.Browser=tA,t.CRS=Y,t.Canvas=iS,t.Circle=ii,t.CircleMarker=ie,t.Class=z,t.Control=eB,t.DivIcon=ix,t.DivOverlay=ib,t.DomEvent={__proto__:null,on:ec,off:e_,stopPropagation:ev,disableScrollPropagation:eL,disableClickPropagation:eb,preventDefault:ek,stop:eM,getPropagationPath:ex,getMousePosition:ew,getWheelDelta:eP,isExternalTarget:eE,addListener:ec,removeListener:e_},t.DomUtil={__proto__:null,TRANSFORM:tY,TRANSITION:tX,TRANSITION_END:tJ,get:t$,getStyle:tQ,create:t0,remove:t1,empty:t2,toFront:t3,toBack:t4,hasClass:t8,addClass:t5,removeClass:t6,setClass:t9,getClass:t7,setOpacity:et,testProp:ee,setTransform:ei,setPosition:en,getPosition:er,get disableTextSelection(){return i},get enableTextSelection(){return n},disableImageDrag:es,enableImageDrag:ea,preventOutline:el,restoreOutline:eh,getSizedParentNode:eu,getScale:ep},t.Draggable=ej,t.Evented=j,t.FeatureGroup=e8,t.GeoJSON=is,t.GridLayer=iw,t.Handler=ez,t.Icon=e5,t.ImageOverlay=iy,t.LatLng=K,t.LatLngBounds=H,t.Layer=e3,t.LayerGroup=e4,t.LineUtil={__proto__:null,simplify:eU,pointToSegmentDistance:eV,closestPointOnSegment:function(t,e,i){return eW(t,e,i)},clipSegment:eH,_getEdgeIntersection:eq,_getBitCode:eK,_sqClosestPointOnSegment:eW,isFlat:eY,_flat:eX,polylineCenter:eJ},t.Map=eS,t.Marker=e7,t.Mixin={Events:N},t.Path=it,t.Point=G,t.PolyUtil={__proto__:null,clipPolygon:eG,polygonCenter:eZ,centroid:eF},t.Polygon=io,t.Polyline=ir,t.Popup=ik,t.PosAnimation=eT,t.Projection={__proto__:null,LonLat:e$,Mercator:eQ,SphericalMercator:J},t.Rectangle=iA,t.Renderer=iT,t.SVG=iR,t.SVGOverlay=iL,t.TileLayer=iC,t.Tooltip=iM,t.Transformation=$,t.Util={__proto__:null,extend:e,create:c,bind:d,get lastId(){return _},stamp:f,throttle:m,wrapNum:g,falseFn:y,formatNum:v,trim:b,splitWords:k,setOptions:M,getParamString:x,template:C,isArray:P,indexOf:E,emptyImageUrl:T,requestFn:D,cancelFn:R,requestAnimFrame:I,cancelAnimFrame:A},t.VideoOverlay=iv,t.bind=d,t.bounds=V,t.canvas=iB,t.circle=function(t,e,i){return new ii(t,e,i)},t.circleMarker=function(t,e){return new ie(t,e)},t.control=eO,t.divIcon=function(t){return new ix(t)},t.extend=e,t.featureGroup=function(t,e){return new e8(t,e)},t.geoJSON=ig,t.geoJson=ig,t.gridLayer=function(t){return new iw(t)},t.icon=function(t){return new e5(t)},t.imageOverlay=function(t,e,i){return new iy(t,e,i)},t.latLng=W,t.latLngBounds=q,t.layerGroup=function(t,e){return new e4(t,e)},t.map=function(t,e){return new eS(t,e)},t.marker=function(t,e){return new e7(t,e)},t.point=F,t.polygon=function(t,e){return new io(t,e)},t.polyline=function(t,e){return new ir(t,e)},t.popup=function(t,e){return new ik(t,e)},t.rectangle=function(t,e){return new iA(t,e)},t.setOptions=M,t.stamp=f,t.svg=iI,t.svgOverlay=function(t,e,i){return new iL(t,e,i)},t.tileLayer=iP,t.tooltip=function(t,e){return new iM(t,e)},t.transformation=Q,t.version="1.9.4",t.videoOverlay=function(t,e,i){return new iv(t,e,i)};var iV=window.L;t.noConflict=function(){return window.L=iV,this},window.L=t}(i)},15258,(t,e,i)=>{t.e,function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.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();var e=t,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 L.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._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,r=this._nonPointGroup,o=this.options.chunkedLoading,s=this.options.chunkInterval,a=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var p=new Date().getTime(),c=L.bind(function(){var d=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(o&&h%200==0&&new Date().getTime()-d>s);h++){if((i=t[h])instanceof L.LayerGroup){u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;continue}if(!i.getLatLng){r.addLayer(i),e||this.fire("layeradd",{layer:i});continue}if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),f=_[0]===i?_[1]:_[0];n.removeLayer(f)}}a&&a(h,l,new Date().getTime()-p),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(c,this.options.chunkDelay)},this);c()}else for(var d=this._needsClustering;h<l;h++){if((i=t[h])instanceof L.LayerGroup){u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;continue}if(!i.getLatLng){r.addLayer(i);continue}this.hasLayer(i)||d.push(i)}return this},removeLayers:function(t){var e,i,n=t.length,r=this._featureGroup,o=this._nonPointGroup,s=!0;if(!this._map){for(e=0;e<n;e++){if((i=t[e])instanceof L.LayerGroup){s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length;continue}this._arraySplice(this._needsClustering,i),o.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();var a=t.slice(),l=n;for(e=0;e<l;e++){if((i=a[e])instanceof L.LayerGroup){this._extractNonGroupLayers(i,a),l=a.length;continue}this._unspiderfyLayer(i)}}for(e=0;e<n;e++){if((i=t[e])instanceof L.LayerGroup){s&&(t=t.slice(),s=!1),this._extractNonGroupLayers(i,t),n=t.length;continue}if(!i.__parent){o.removeLayer(i),this.fire("layerremove",{layer:i});continue}this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var 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){var i,n,r,o=this._needsClustering.slice(),s=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(o),n=o.length-1;n>=0;n--){for(i=!0,r=s.length-1;r>=0;r--)if(s[r].layer===o[n]){i=!1;break}i&&t.call(e,o[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).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){var i=this._map;"function"!=typeof e&&(e=function(){});var 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){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"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]).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){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());e>=r&&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){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,o=this._featureGroup,s=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,s.project(h._cLatLng,h._zoom)),r[h._zoom].addObject(l,s.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(o.removeLayer(h),i||o.addLayer(l))):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 L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return e<10?i+="small":e<100?i+="medium":i+="large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom;(e||n||r)&&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){var e=t.layer,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){var e=this._map;!this._inZoomAnimation&&(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.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(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,r=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),r.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var 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(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,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(var r=t;r>=e;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,r=this._gridClusters,o=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=s;e--){i=this._map.project(t.getLatLng(),e);var a=r[e].getNearObject(i);if(a){a._addChild(t),t.__parent=a;return}if(a=o[e].getNearObject(i)){var l=a.__parent;l&&this._removeLayer(a,!1);var h=new this._markerCluster(this,e,a,t);r[e].addObject(h,this._map.project(h._cLatLng,e)),a.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));l._addChild(u),this._removeFromGridUnclustered(a,e);return}o[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var 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?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var 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();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),r=0;for(e=e||[];r<n.length;r++){if((i=n[r])instanceof L.LayerGroup){this._extractNonGroupLayers(i,e);continue}e.push(i)}return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(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){var i,n=this._getExpandedVisibleBounds(),r=this._featureGroup,o=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,o,function(o){var s,a=o._latlng,l=o._markers;for(n.contains(a)||(a=null),o._isSingleParent()&&t+1===e?(r.removeLayer(o),o._recursivelyAddChildrenToMap(null,e,n)):(o.clusterHide(),o._recursivelyAddChildrenToMap(a,e,n)),i=l.length-1;i>=0;i--)s=l[i],n.contains(s._latlng)||r.removeLayer(s)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),r.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,o,function(t){r.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){var 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)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,e+1,i);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var s=t._markers[0];this._ignoreMove=!0,s.setLatLng(s.getLatLng()),this._ignoreMove=!1,s.clusterShow&&s.clusterShow()}else t._recursively(n,i,r,function(t){t._recursivelyRemoveChildrenFromMap(n,r,e+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.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 L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),o=this._zoom+1,s=n.getZoom();i.length>0&&r>o;){o++;var a=[];for(e=0;e<i.length;e++)a=a.concat(i[e]._childClusters);i=a}r>o?this._group._map.setView(this._latlng,o):r<=s?this._group._map.setView(this._latlng,s+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.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 L.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(){var 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(){var t,e,i,n,r=this._markers,o=this._childClusters,s=0,a=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<r.length;t++)i=r[t]._latlng,this._bounds.extend(i),s+=i.lat,a+=i.lng;for(t=0;t<o.length;t++)(e=o[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,s+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(s/l,a/l),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){var i,n,r=t._markers;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,r=t._childClusters;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(r){r._recursivelyAnimateChildrenIn(t,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(t,e,i)):r.clusterHide(),r._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(var r=n._markers.length-1;r>=0;r--){var o=n._markers[r];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(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,o;this._recursively(t,e-1,i-1,function(t){for(o=t._markers.length-1;o>=0;o--)r=t._markers[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(t){for(o=t._childClusters.length-1;o>=0;o--)r=t._childClusters[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(t,e,i,n,r){var o,s,a=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),r&&l===i&&r(this)),l<e||l<i)for(o=a.length-1;o>=0;o--)(s=a[o])._boundsNeedUpdate&&s._recalculateBounds(),t.intersects(s._bounds)&&s._recursively(t,e,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},s=o[i]=o[i]||[],a=L.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){var i,n,r=this._getCoord(e.x),o=this._getCoord(e.y),s=this._grid,a=s[o]=s[o]||{},l=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete a[r],!0},eachObject:function(t,e){var i,n,r,o,s,a,l=this._grid;for(i in l)for(n in s=l[i])for(r=0,o=(a=s[n]).length;r<o;r++)t.call(e,a[r])&&(r--,o--)},getNearObject:function(t){var e,i,n,r,o,s,a,l,h=this._getCoord(t.x),u=this._getCoord(t.y),p=this._objectPoint,c=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(r=this._grid[e]){for(i=h-1;i<=h+1;i++)if(o=r[i])for(n=0,s=o.length;n<s;n++)a=o[n],((l=this._sqDist(p[L.Util.stamp(a)],t))<c||l<=c&&null===d)&&(c=l,d=a)}return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var 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){var i,n,r,o=0,s=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],(r=this.getDistant(n,t))>0&&(a.push(n),r>o&&(o=r,s=n));return{maxPoint:s,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,r=!1,o=!1,s=null,a=null,l=null,h=null,u=null,p=null;for(e=t.length-1;e>=0;e--){var c=t[e];(!1===i||c.lat>i)&&(s=c,i=c.lat),(!1===n||c.lat<n)&&(a=c,n=c.lat),(!1===r||c.lng>r)&&(l=c,r=c.lng),(!1===o||c.lng<o)&&(h=c,o=c.lng)}return n!==i?(p=a,u=s):(p=h,u=l),[].concat(this.buildConvexHull([p,u],t),this.buildConvexHull([u,p],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.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){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,o=this._2PI/t,s=[];for(i=0,r=Math.max(r,35),s.length=t;i<t;i++)n=this._circleStartAngle+i*o,s[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return s},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,o=n*this._spiralFootSeparation,s=n*this._spiralLengthFactor*this._2PI,a=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+r*Math.cos(a),e.y+r*Math.sin(a))._round()),a+=o/r+5e-4*i,r+=s/a;return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,r=i._featureGroup,o=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=o.length-1;e>=0;e--)t=o[e],r.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,r,o,s=this._group,a=s._map,l=s._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(i=0,s._ignoreMove=!0;i<t.length;i++)o=a.layerPointToLatLng(e[i]),n=t[i],r=new L.Polyline([this._latlng,o],h),a.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(o),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),s._ignoreMove=!1,s.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,r,o,s,a,l=this,h=this._group,u=h._map,p=h._featureGroup,c=this._latlng,d=u.latLngToLayerPoint(c),_=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),_?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],a=u.layerPointToLatLng(e[i]),r=new L.Polyline([c,a],f),u.addLayer(r),n._spiderLeg=r,_&&(s=(o=r._path).getTotalLength()+.1,o.style.strokeDasharray=s,o.style.strokeDashoffset=s),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),p.addLayer(n),n._setPos&&n._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)a=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),_&&((o=(r=n._spiderLeg)._path).style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,r,o,s,a=this,l=this._group,h=l._map,u=l._featureGroup,p=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=c.length-1;i>=0;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,s=!0,e._setPos&&(e._setPos(p),s=!1),e.clusterHide&&(e.clusterHide(),s=!1),s&&u.removeLayer(e),d&&(o=(r=(n=e._spiderLeg)._path).getTotalLength()+.1,r.style.strokeDashoffset=o,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:a,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.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)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(i)},70462,(t,e,i)=>{"use strict";(()=>{var n=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),u=(t,e,i)=>(i=null!=t?n(a(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let a of s(e))l.call(t,a)||a===i||r(t,a,{get:()=>e[a],enumerable:!(n=o(e,a))||n.enumerable});return t})(!e&&t&&t.__esModule?i:r(i,"default",{value:t,enumerable:!0}),t)),p=h((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),c=h((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),d=h((t,e)=>{var i=c();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return -1}}),_=h((t,e)=>{var i=d(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,r=i(e,t);return!(r<0)&&(r==e.length-1?e.pop():n.call(e,r,1),--this.size,!0)}}),f=h((t,e)=>{var i=d();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),m=h((t,e)=>{var i=d();e.exports=function(t){return i(this.__data__,t)>-1}}),g=h((t,e)=>{var i=d();e.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}}),y=h((t,e)=>{var i=p(),n=_(),r=f(),o=m(),s=g();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=i,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,e.exports=a}),v=h((t,e)=>{var i=y();e.exports=function(){this.__data__=new i,this.size=0}}),b=h((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),k=h((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),M=h((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),x=h((e,i)=>{i.exports=t.g&&t.g.Object===Object&&t.g}),w=h((t,e)=>{var i=x(),n="object"==typeof self&&self&&self.Object===Object&&self;e.exports=i||n||Function("return this")()}),C=h((t,e)=>{e.exports=w().Symbol}),P=h((t,e)=>{var i=C(),n=Object.prototype,r=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;e.exports=function(t){var e=r.call(t,s),i=t[s];try{t[s]=void 0;var n=!0}catch{}var a=o.call(t);return n&&(e?t[s]=i:delete t[s]),a}}),E=h((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),T=h((t,e)=>{var i=C(),n=P(),r=E(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):r(t)}}),S=h((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),B=h((t,e)=>{var i=T(),n=S();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),O=h((t,e)=>{e.exports=w()["__core-js_shared__"]}),D=h((t,e)=>{var i,n=O(),r=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!r&&r in t}}),R=h((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),I=h((t,e)=>{var i=B(),n=D(),r=S(),o=R(),s=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,h=a.hasOwnProperty,u=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!r(t)||n(t))&&(i(t)?u:s).test(o(t))}}),A=h((t,e)=>{e.exports=function(t,e){return t?.[e]}}),z=h((t,e)=>{var i=I(),n=A();e.exports=function(t,e){var r=n(t,e);return i(r)?r:void 0}}),N=h((t,e)=>{e.exports=z()(w(),"Map")}),j=h((t,e)=>{e.exports=z()(Object,"create")}),G=h((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),Z=h((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}}),F=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0}}),U=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),V=h((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),H=h((t,e)=>{var i=G(),n=Z(),r=F(),o=U(),s=V();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=i,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,e.exports=a}),q=h((t,e)=>{var i=H(),n=y(),r=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||n),string:new i}}}),K=h((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),W=h((t,e)=>{var i=K();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),Y=h((t,e)=>{var i=W();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=!!e,e}}),X=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).get(t)}}),J=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).has(t)}}),$=h((t,e)=>{var i=W();e.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this}}),Q=h((t,e)=>{var i=q(),n=Y(),r=X(),o=J(),s=$();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=i,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,e.exports=a}),tt=h((t,e)=>{var i=y(),n=N(),r=Q();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var s=o.__data__;if(!n||s.length<199)return s.push([t,e]),this.size=++o.size,this;o=this.__data__=new r(s)}return o.set(t,e),this.size=o.size,this}}),te=h((t,e)=>{var i=y(),n=v(),r=b(),o=k(),s=M(),a=tt();function l(t){var e=this.__data__=new i(t);this.size=e.size}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l}),ti=h((t,e)=>{var i=z();e.exports=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}()}),tn=h((t,e)=>{var i=ti();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),tr=h((t,e)=>{var i=tn(),n=c();e.exports=function(t,e,r){(void 0===r||n(t[e],r))&&(void 0!==r||e in t)||i(t,e,r)}}),to=h((t,e)=>{e.exports=function(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===i(o[l],l,o))break}return e}}}),ts=h((t,e)=>{e.exports=to()()}),ta=h((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n?i.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=s?s(i):new t.constructor(i);return t.copy(n),n}}),tl=h((t,e)=>{e.exports=w().Uint8Array}),th=h((t,e)=>{var i=tl();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),tu=h((t,e)=>{var i=th();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),tp=h((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}}),tc=h((t,e)=>{var i=S(),n=Object.create;e.exports=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}()}),td=h((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),t_=h((t,e)=>{e.exports=td()(Object.getPrototypeOf,Object)}),tf=h((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),tm=h((t,e)=>{var i=tc(),n=t_(),r=tf();e.exports=function(t){return"function"!=typeof t.constructor||r(t)?{}:i(n(t))}}),tg=h((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),ty=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),tv=h((t,e)=>{var i=ty(),n=tg(),r=Object.prototype,o=r.hasOwnProperty,s=r.propertyIsEnumerable;e.exports=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!s.call(t,"callee")}}),tL=h((t,e)=>{e.exports=Array.isArray}),tb=h((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}}),tk=h((t,e)=>{var i=B(),n=tb();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),tM=h((t,e)=>{var i=tk(),n=tg();e.exports=function(t){return n(t)&&i(t)}}),tx=h((t,e)=>{e.exports=function(){return!1}}),tw=h((t,e)=>{var i=w(),n=tx(),r="object"==typeof t&&t&&!t.nodeType&&t,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0;e.exports=(s?s.isBuffer:void 0)||n}),tC=h((t,e)=>{var i=T(),n=t_(),r=tg(),o=Object.prototype,s=Function.prototype.toString,a=o.hasOwnProperty,l=s.call(Object);e.exports=function(t){if(!r(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=a.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&s.call(o)==l}}),tP=h((t,e)=>{var i=T(),n=tb(),r=tg(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return r(t)&&n(t.length)&&!!o[i(t)]}}),tE=h((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),tT=h((t,e)=>{var i=x(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n&&i.process;e.exports=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch{}}()}),tS=h((t,e)=>{var i=tP(),n=tE(),r=tT(),o=r&&r.isTypedArray;e.exports=o?n(o):i}),tB=h((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),tO=h((t,e)=>{var i=tn(),n=c(),r=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var s=t[e];r.call(t,e)&&n(s,o)&&(void 0!==o||e in t)||i(t,e,o)}}),tD=h((t,e)=>{var i=tO(),n=tn();e.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,l=e.length;++a<l;){var h=e[a],u=o?o(r[h],t[h],h,r,t):void 0;void 0===u&&(u=t[h]),s?n(r,h,u):i(r,h,u)}return r}}),tR=h((t,e)=>{e.exports=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}}),tI=h((t,e)=>{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??0x1fffffffffffff)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}}),tA=h((t,e)=>{var i=tR(),n=tv(),r=tL(),o=tw(),s=tI(),a=tS(),l=Object.prototype.hasOwnProperty;e.exports=function(t,e){var h=r(t),u=!h&&n(t),p=!h&&!u&&o(t),c=!h&&!u&&!p&&a(t),d=h||u||p||c,_=d?i(t.length,String):[],f=_.length;for(var m in t)(e||l.call(t,m))&&!(d&&("length"==m||p&&("offset"==m||"parent"==m)||c&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,f)))&&_.push(m);return _}}),tz=h((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),tN=h((t,e)=>{var i=S(),n=tf(),r=tz(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return r(t);var e=n(t),s=[];for(var a in t)"constructor"==a&&(e||!o.call(t,a))||s.push(a);return s}}),tj=h((t,e)=>{var i=tA(),n=tN(),r=tk();e.exports=function(t){return r(t)?i(t,!0):n(t)}}),tG=h((t,e)=>{var i=tD(),n=tj();e.exports=function(t){return i(t,n(t))}}),tZ=h((t,e)=>{var i=tr(),n=ta(),r=tu(),o=tp(),s=tm(),a=tv(),l=tL(),h=tM(),u=tw(),p=B(),c=S(),d=tC(),_=tS(),f=tB(),m=tG();e.exports=function(t,e,g,y,v,b,k){var M=f(t,g),x=f(e,g),w=k.get(x);if(w)return void i(t,g,w);var C=b?b(M,x,g+"",t,e,k):void 0,P=void 0===C;if(P){var E=l(x),T=!E&&u(x),S=!E&&!T&&_(x);C=x,E||T||S?l(M)?C=M:h(M)?C=o(M):T?(P=!1,C=n(x,!0)):S?(P=!1,C=r(x,!0)):C=[]:d(x)||a(x)?(C=M,a(M)?C=m(M):(!c(M)||p(M))&&(C=s(x))):P=!1}P&&(k.set(x,C),v(C,x,y,b,k),k.delete(x)),i(t,g,C)}}),tF=h((t,e)=>{var i=te(),n=tr(),r=ts(),o=tZ(),s=S(),a=tj(),l=tB();e.exports=function t(e,h,u,p,c){e!==h&&r(h,function(r,a){if(c||(c=new i),s(r))o(e,h,a,u,t,p,c);else{var d=p?p(l(e,a),r,a+"",e,h,c):void 0;void 0===d&&(d=r),n(e,a,d)}},a)}}),tU=h((t,e)=>{e.exports=function(t){return t}}),tV=h((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),tH=h((t,e)=>{var i=tV(),n=Math.max;e.exports=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=n(o.length-e,0),l=Array(a);++s<a;)l[s]=o[e+s];s=-1;for(var h=Array(e+1);++s<e;)h[s]=o[s];return h[e]=r(l),i(t,this,h)}}}),tq=h((t,e)=>{e.exports=function(t){return function(){return t}}}),tK=h((t,e)=>{var i=tq(),n=ti(),r=tU();e.exports=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:r}),tW=h((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var r=i(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),tY=h((t,e)=>{var i=tK();e.exports=tW()(i)}),tX=h((t,e)=>{var i=tU(),n=tH(),r=tY();e.exports=function(t,e){return r(n(t,e,i),t+"")}}),tJ=h((t,e)=>{var i=c(),n=tk(),r=tI(),o=S();e.exports=function(t,e,s){if(!o(s))return!1;var a=typeof e;return("number"==a?!!(n(s)&&r(e,s.length)):"string"==a&&e in s)&&i(s[e],t)}}),t$=h((t,e)=>{var i=tX(),n=tJ();e.exports=function(t){return i(function(e,i){var r=-1,o=i.length,s=o>1?i[o-1]:void 0,a=o>2?i[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&n(i[0],i[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r<o;){var l=i[r];l&&t(e,l,r,s)}return e})}}),tQ=h((t,e)=>{var i=tF();e.exports=t$()(function(t,e,n){i(t,e,n)})}),t0=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),t1=h((t,e)=>{var i=tL(),n=t0(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var s=typeof t;return!!("number"==s||"symbol"==s||"boolean"==s||null==t||n(t))||o.test(t)||!r.test(t)||null!=e&&t in Object(e)}}),t2=h((t,e)=>{var i=Q();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(n.Cache||i),r}n.Cache=i,e.exports=n}),t3=h((t,e)=>{var i=t2();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),t4=h((t,e)=>{var i=t3(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g;e.exports=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(r,"$1"):i||t)}),e})}),t8=h((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i<n;)r[i]=e(t[i],i,t);return r}}),t5=h((t,e)=>{var i=C(),n=t8(),r=tL(),o=t0(),s=1/0,a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(r(e))return n(e,t)+"";if(o(e))return l?l.call(e):"";var i=e+"";return"0"==i&&1/e==-s?"-0":i}}),t6=h((t,e)=>{var i=t5();e.exports=function(t){return null==t?"":i(t)}}),t9=h((t,e)=>{var i=tL(),n=t1(),r=t4(),o=t6();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:r(o(t))}}),t7=h((t,e)=>{var i=t0(),n=1/0;e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-n?"-0":e}}),et=h((t,e)=>{var i=t9(),n=t7();e.exports=function(t,e){e=i(e,t);for(var r=0,o=e.length;null!=t&&r<o;)t=t[n(e[r++])];return r&&r==o?t:void 0}}),ee=h((t,e)=>{var i=et();e.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}}),ei=h((n,r)=>{var o,s;let a;o=n,s=function(){function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return t<e?-1:+(t>e)}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,r){r||(r=c(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s<i;s++){var a=t.children[s];o(r,t.leaf?n(a):a)}return r}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function s(t,e){return t.minX-e.minX}function a(t,e){return t.minY-e.minY}function l(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function c(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,o,s){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var l=n+Math.ceil((r-n)/o/2)*o;(function e(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1),c=Math.max(r,Math.floor(n-l*u/a+p)),d=Math.min(o,Math.floor(n+(a-l)*u/a+p));e(i,n,c,d,s)}var _=i[n],f=r,m=o;for(t(i,r,n),s(i[o],_)>0&&t(i,r,o);f<m;){for(t(i,f,m),f++,m--;0>s(i[f],_);)f++;for(;s(i[m],_)>0;)m--}0===s(i[r],_)?t(i,r,m):t(i,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}})(i,l,n||0,r||i.length-1,s||e),a.push(n,l,l,r)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?n(s):s;p(t,a)&&(e.leaf?i.push(s):u(t,a)?this._all(s,i):r.push(s))}e=r.pop()}return i},i.prototype.collides=function(t){var e=this.data;if(!p(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],o=e.leaf?this.toBBox(r):r;if(p(t,o)){if(e.leaf||u(t,o))return!0;i.push(r)}}e=i.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=c([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var i,n,r,o=this.data,s=this.toBBox(t),a=[],l=[];o||a.length;){if(o||(o=a.pop(),n=a[a.length-1],i=l.pop(),r=!0),o.leaf){var h=function(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return -1}(t,o.children,e);if(-1!==h)return o.children.splice(h,1),a.push(o),this._condense(a),this}r||o.leaf||!u(o,s)?n?(i++,o=n.children[i],r=!1):o=null:(a.push(o),l.push(i),i=0,n=o,o=o.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},i.prototype._build=function(t,e,i,r){var o,s=i-e+1,a=this._maxEntries;if(s<=a)return n(o=c(t.slice(e,i+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(o=c([])).leaf=!1,o.height=r;var l=Math.ceil(s/a),h=l*Math.ceil(Math.sqrt(a));d(t,e,i,h,this.compareMinX);for(var u=e;u<=i;u+=h){var p=Math.min(u+h-1,i);d(t,u,p,l,this.compareMinY);for(var _=u;_<=p;_+=l){var f=Math.min(_+l-1,p);o.children.push(this._build(t,_,f,r-1))}}return n(o,this.toBBox),o},i.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var h=e.children[a],u=l(h),p=(Math.max(h.maxX,t.maxX)-Math.min(h.minX,t.minX))*(Math.max(h.maxY,t.maxY)-Math.min(h.minY,t.minY))-u;p<o?(o=p,r=u<r?u:r,s=h):p===o&&u<r&&(r=u,s=h)}e=s||e.children[0]}return e},i.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(n,this.data,e,r);for(s.children.push(t),o(s,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},i.prototype._split=function(t,e){var i=t[e],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);var s=this._chooseSplitIndex(i,o,r),a=c(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,n(i,this.toBBox),n(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},i.prototype._splitRoot=function(t,e){this.data=c([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,i){for(var n,o,s,a,h,u=1/0,p=1/0,c=e;c<=i-e;c++){var d=r(t,0,c,this.toBBox),_=r(t,c,i,this.toBBox),f=(o=void 0,s=void 0,a=void 0,o=Math.max(d.minX,_.minX),s=Math.max(d.minY,_.minY),Math.max(0,(a=Math.min(d.maxX,_.maxX))-o)*Math.max(0,Math.min(d.maxY,_.maxY)-s)),m=l(d)+l(_);f<u?(u=f,n=c,p=m<p?m:p):f===u&&m<p&&(p=m,n=c)}return n||i-e},i.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:s,r=t.leaf?this.compareMinY:a;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},i.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,a=r(t,0,e,s),l=r(t,i-e,i,s),u=h(a)+h(l),p=e;p<i-e;p++){var c=t.children[p];o(a,t.leaf?s(c):c),u+=h(a)}for(var d=i-e-1;d>=e;d--){var _=t.children[d];o(l,t.leaf?s(_):_),u+=h(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)o(e[n],t)},i.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():n(t[e],this.toBBox)},i},"object"==typeof n&&"u">typeof r?r.exports=s():"function"==typeof define&&define.amd?void 0!==(a=s(t.r,i,e))&&t.v(a):(o=o||self).RBush=s()});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(this===null)throw TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],r=0;r<i;r++)if(t.call(n,e[r],r,e))return r;return -1},Array.prototype.find=Array.prototype.find||function(t){if(this===null)throw TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],r=0;r<i;r++){var o=e[r];if(t.call(n,o,r,e))return o}},"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e<arguments.length;e++){var i=arguments[e];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(this==null)throw TypeError('"this" is null or not defined');var i,n=Object(this),r=n.length>>>0;if(0===r)return!1;for(var o=0|e,s=Math.max(o>=0?o:r-Math.abs(o),0);s<r;){if((i=n[s])===t||"number"==typeof i&&"number"==typeof t&&isNaN(i)&&isNaN(t))return!0;s++}return!1}});var en=u(tQ()),er={tooltips:{placeMarker:"Clique para colocar marcador",placeMarkerTouch:"Toque no mapa para colocar um marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},eo={en:{tooltips:{placeMarker:"Click to place marker",placeMarkerTouch:"Tap the map to place a marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},de:{tooltips:{placeMarker:"Platziere den Marker mit Klick",placeMarkerTouch:"Tippe auf die Karte, um einen Marker zu platzieren",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},it:{tooltips:{placeMarker:"Clicca per posizionare un Marker",placeMarkerTouch:"Tocca la mappa per posizionare un marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},id:{tooltips:{placeMarker:"Klik untuk menempatkan marker",placeMarkerTouch:"Ketuk peta untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},ro:{tooltips:{placeMarker:"Adaugă un punct",placeMarkerTouch:"Atingeți harta pentru a plasa un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},ru:{tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",placeMarkerTouch:"Коснитесь карты, чтобы разместить маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},es:{tooltips:{placeMarker:"Presiona para colocar un marcador",placeMarkerTouch:"Toca el mapa para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},nl:{tooltips:{placeMarker:"Klik om een marker te plaatsen",placeMarkerTouch:"Tik op de kaart om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},fr:{tooltips:{placeMarker:"Cliquez pour placer un marqueur",placeMarkerTouch:"Appuyez sur la carte pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},pt:er,pt_br:{tooltips:{placeMarker:"Clique para posicionar o marcador",placeMarkerTouch:"Toque no mapa para posicionar um marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},pt_pt:er,zh:{tooltips:{placeMarker:"单击放置标记",placeMarkerTouch:"点击地图放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},zh_tw:{tooltips:{placeMarker:"單擊放置標記",placeMarkerTouch:"點擊地圖放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},pl:{tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",placeMarkerTouch:"Dotknij mapę, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},sv:{tooltips:{placeMarker:"Klicka för att placera markör",placeMarkerTouch:"Tryck på kartan för att placera en markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},el:{tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",placeMarkerTouch:"Πατήστε στο χάρτη για να τοποθετήσετε δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},hu:{tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",placeMarkerTouch:"Érintse meg a térképet a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},da:{tooltips:{placeMarker:"Tryk for at placere en markør",placeMarkerTouch:"Tryk på kortet for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},no:{tooltips:{placeMarker:"Klikk for å plassere punkt",placeMarkerTouch:"Trykk på kartet for å plassere et punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},fa:{tooltips:{placeMarker:"کلیک برای جانمایی نشان",placeMarkerTouch:"روی نقشه ضربه بزنید تا نشان بگذارید",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایه‌ها",dragButton:"جابجایی لایه‌ها",cutButton:"برش لایه‌ها",deleteButton:"حذف لایه‌ها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایه‌ها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاس‌گذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},ua:{tooltips:{placeMarker:"Натисніть, щоб нанести маркер",placeMarkerTouch:"Торкніться карти, щоб розмістити маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},tr:{tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",placeMarkerTouch:"İşaretçi yerleştirmek için haritaya dokunun",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},cz:{tooltips:{placeMarker:"Kliknutím vytvoříte značku",placeMarkerTouch:"Klepnutím na mapu umístíte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},ja:{tooltips:{placeMarker:"クリックしてマーカーを配置",placeMarkerTouch:"地図をタップしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},fi:{tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",placeMarkerTouch:"Napauta karttaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},ko:{tooltips:{placeMarker:"마커 위치를 클릭하세요",placeMarkerTouch:"지도를 탭하여 마커를 배치하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},ky:{tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",placeMarkerTouch:"Маркерди жайгаштыруу үчүн картага тийиңиз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}}},es=u(tQ()),ea={_fireDrawStart(t="Draw",e={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},t,e)},_fireDrawEnd(t="Draw",e={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},t,e)},_fireCreate(t,e="Draw",i={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:t,layer:t},e,i)},_fireCenterPlaced(t="Draw",e={}){let i="Draw"===t?this._layer:void 0,n="Draw"!==t?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:i,layer:n,latlng:this._layer.getLatLng()},t,e)},_fireCut(t,e,i,n="Draw",r={}){this.__fire(t,"pm:cut",{shape:this._shape,layer:e,originalLayer:i},n,r)},_fireEdit(t=this._layer,e="Edit",i={}){this.__fire(t,"pm:edit",{layer:this._layer,shape:this.getShape()},e,i)},_fireEnable(t="Edit",e={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDisable(t="Edit",e={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},t,e)},_fireUpdate(t="Edit",e={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},t,e)},_fireMarkerDragStart(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDrag(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDragEnd(t,e,i,n="Edit",r={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e,intersectionReset:i},n,r)},_fireDragStart(t="Edit",e={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},t,e)},_fireDrag(t,e="Edit",i={}){this.__fire(this._layer,"pm:drag",{...t,shape:this.getShape()},e,i)},_fireDragEnd(t="Edit",e={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragEnable(t="Edit",e={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragDisable(t="Edit",e={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},t,e)},_fireRemove(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:this.getShape()},i,n)},_fireVertexAdded(t,e,i,n="Edit",r={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:t,indexPath:e,latlng:i,shape:this.getShape()},n,r)},_fireVertexRemoved(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:t,indexPath:e,shape:this.getShape()},i,n)},_fireVertexClick(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireIntersect(t,e=this._layer,i="Edit",n={}){this.__fire(e,"pm:intersect",{layer:this._layer,intersection:t,shape:this.getShape()},i,n)},_fireLayerReset(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:t,shape:this.getShape()},e,i)},_fireTextChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:t,shape:this.getShape()},e,i)},_fireTextFocus(t="Edit",e={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},t,e)},_fireTextBlur(t="Edit",e={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},t,e)},_fireSnapDrag(t,e,i="Snapping",n={}){this.__fire(t,"pm:snapdrag",e,i,n)},_fireSnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:snap",e,i,n)},_fireUnsnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:unsnap",e,i,n)},_fireRotationEnable(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},i,n)},_fireRotationDisable(t,e="Rotation",i={}){this.__fire(t,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},e,i)},_fireRotationStart(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:e},i,n)},_fireRotation(t,e,i,n=this._rotationLayer,r="Rotation",o={}){this.__fire(t,"pm:rotate",{layer:n,helpLayer:this._layer,startAngle:this._startAngle,angle:n.pm.getAngle(),angleDiff:e,oldLatLngs:i,newLatLngs:n.getLatLngs()},r,o)},_fireRotationEnd(t,e,i,n="Rotation",r={}){this.__fire(t,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:e,angle:this._rotationLayer.pm.getAngle(),originLatLngs:i,newLatLngs:this._rotationLayer.getLatLngs()},n,r)},_fireActionClick(t,e,i,n="Toolbar",r={}){this.__fire(this._map,"pm:actionclick",{text:t.text,action:t,btnName:e,button:i},n,r)},_fireButtonClick(t,e,i="Toolbar",n={}){this.__fire(this._map,"pm:buttonclick",{btnName:t,button:e},i,n)},_fireLangChange(t,e,i,n,r="Global",o={}){this.__fire(this.map,"pm:langchange",{oldLang:t,activeLang:e,fallback:i,translations:n},r,o)},_fireGlobalDragModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalEditModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalRemovalModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalCutModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},t,e)},_fireGlobalDrawModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},t,e)},_fireGlobalRotateModeToggled(t="Global",e={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},t,e)},_fireRemoveLayerGroup(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:void 0},i,n)},_fireKeyeventEvent(t,e,i,n="Global",r={}){this.__fire(this.map,"pm:keyevent",{event:t,eventType:e,focusOn:i},n,r)},__fire(t,e,i,n,r={}){i=(0,es.default)(i,r,{source:n}),L.PM.Utils._fireEvent(t,e,i)}},el=u(ee());function eh(t){let e=L.PM.activeLang;return(0,el.default)(eo[e],t)||(0,el.default)(eo.en,t)||t}function eu(t){for(let e=0;e<t.length;e+=1){let i=t[e];if(Array.isArray(i)){if(eu(i))return!0}else if(null!=i&&""!==i)return!0}return!1}function ep(t){return t.reduce((t,e)=>{if(0!==e.length){let i=Array.isArray(e)?ep(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function ec(t,e,i,n,r=!0){let o,s,a=[];for(let l=0;l<i;l+=1){if(r)o=function(t,e,i){let{a:n,b:r,f:o}={a:L.CRS.Earth.R,b:6356752.3142,f:.0033528106647474805},s=t.lng,a=t.lat,l=Math.PI,h=e*l/180,u=Math.sin(h),p=Math.cos(h),c=(1-o)*Math.tan(a*l/180),d=1/Math.sqrt(1+c*c),_=c*d,f=Math.atan2(c,p),m=d*u,g=1-m*m,y=g*(n*n-r*r)/(r*r),v=1+y/16384*(4096+y*(-768+y*(320-175*y))),b=y/1024*(256+y*(-128+y*(74-47*y))),k=i/(r*v),M=2*Math.PI,x,w,C;for(;Math.abs(k-M)>1e-12;){x=Math.cos(2*f+k);let t=b*(w=Math.sin(k))*(x+b/4*((C=Math.cos(k))*(-1+2*x*x)-b/6*x*(-3+4*w*w)*(-3+4*x*x)));M=k,k=i/(r*v)+t}let P=_*w-d*C*p,E=Math.atan2(_*C+d*w*p,(1-o)*Math.sqrt(m*m+P*P)),T=o/16*g*(4+o*(4-3*g)),S=Math.atan2(w*u,d*C-_*w*p)-(1-T)*o*m*(k+T*w*(x+T*C*(-1+2*x*x)));return L.latLng(s+180*S/l,180*E/l)}(t,360*l/i+n,e),s=L.latLng(o.lng,o.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,r=t.lng+Math.sin(2*l*Math.PI/i)*e;s=L.latLng(n,r)}a.push(s)}return a}function ed(t,e,i){let n=t.latLngToContainerPoint(e),r=t.latLngToContainerPoint(i),o=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI+90;return o+360*(o<0)}function e_(t,e,i,n){let r=ed(t,e,i);return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,r=180/Math.PI,{R:o}=L.CRS.Earth,s=t.lng*n,a=t.lat*n,l=e*n,h=Math.sin(a),u=Math.cos(a),p=Math.cos(i/o),c=Math.sin(i/o),d=Math.asin(h*p+u*c*Math.cos(l)),_=s+Math.atan2(Math.sin(l)*c*u,p-h*Math.sin(d)),f=(_*=r)-360,m=_<-180?_+360:_;return _=_>180?f:m,L.latLng([d*r,_])}(e,r,n)}function ef(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function em(t,e){if(e.options.crs?.projection?.MAX_LATITUDE){let i=e.options.crs?.projection?.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function eg(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var ey=L.Class.extend({includes:[{_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},{_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},{_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},{_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},ea],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard={_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_handleEscapeKey(t){let e=this.map.pm;return!!e.getGlobalOptions().exitModeOnEscape&&!!(e.globalDrawModeEnabled()||e.globalEditModeEnabled()||e.globalDragModeEnabled()||e.globalRemovalModeEnabled()||e.globalRotateModeEnabled()||e.globalCutModeEnabled())&&(t.preventDefault(),e.globalDrawModeEnabled()&&e.disableDraw(),e.globalEditModeEnabled()&&e.disableGlobalEditMode(),e.globalDragModeEnabled()&&e.disableGlobalDragMode(),e.globalRemovalModeEnabled()&&e.disableGlobalRemovalMode(),e.globalRotateModeEnabled()&&e.disableGlobalRotateMode(),e.globalCutModeEnabled()&&e.disableGlobalCutMode(),!0)},_handleEnterKey(t){let e=this.map.pm;if(!e.getGlobalOptions().finishOnEnter)return!1;let i=e.Draw.getActiveShape();if(!i)return!1;let n=e.Draw[i];return!!n&&!!n._finishShape&&!!this._canFinishShape(n,i)&&(t.preventDefault(),n._finishShape(),!0)},_canFinishShape(t,e){if(["Marker","CircleMarker","Text"].includes(e))return!1;if("Rectangle"===e)return void 0!==t._startMarker;if("Circle"===e)return t._centerMarker&&t._layerGroup?.hasLayer(t._centerMarker);if(t._layer&&t._layer.getLatLngs){let i=t._layer.getLatLngs();if("Line"===e)return(i.flat?i.flat():i).length>=2;if("Polygon"===e||"Cut"===e)return i.length>=3}return!1},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e),"keydown"===t.type&&("Escape"===t.key&&this._handleEscapeKey(t),"Enter"===t.key&&this._handleEnterKey(t))},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){return this._lastEvents.current?.event.shiftKey},isAltKeyPressed(){return this._lastEvents.current?.event.altKey},isCtrlKeyPressed(){return this._lastEvents.current?.event.ctrlKey},isMetaKeyPressed(){return this._lastEvents.current?.event.metaKey},getPressedKey(){return this._lastEvents.current?.event.key}},this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0,exitModeOnEscape:!1,finishOnEnter:!1},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){t=function(t,e){if(e[t=t.trim().toLowerCase()])return t;let i=t.replace(/[-_\s]/g,"_").match(/^([a-z]{2,3})(?:_([a-z]{2,3}))?$/);if(i){let t=[];for(let n of(i[2]&&t.push(`${i[1]}_${i[2]}`),t.push(i[1]),t))if(e[n])return n}return t}(t,eo);let n=L.PM.activeLang;e&&(eo[t]=(0,en.default)(eo[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,eo[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,en.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){eg(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&eg(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{(i=document.createEvent("MouseEvents")).initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),ev=L.Control.extend({includes:[ea],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return"boolean"==typeof t?this._button.toggleStatus=t:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),this._button.disabled||(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let r=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,s={cancel:{text:eh("actions.cancel"),title:eh("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:eh("actions.removeLastVertex"),title:eh("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n="string"==typeof i?i:i.name,o;if(s[n])o=s[n];else{if(!i.text)return o;o=i}let a=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${n}`,r);if(a.setAttribute("role","button"),a.setAttribute("tabindex","0"),a.href="#",o.title&&(a.title=o.title),a.innerHTML=o.text,L.DomEvent.disableClickPropagation(a),L.DomEvent.on(a,"click",L.DomEvent.stop),o._node=a,!t.disabled&&o.onClick){let e=e=>{e.preventDefault();let i="",{buttons:n}=this._map.pm.Toolbar;for(let e in n)if(n[e]._button===t){i=e;break}this._fireActionClick(o,i,t)};L.DomEvent.addListener(a,"click",e,this),L.DomEvent.addListener(a,"click",o.onClick,this),L.DomEvent.addListener(a,"click",()=>this._updateActiveAction(t))}return o}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let a=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&a.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(a,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){t._preparedActions?.forEach(t=>{t?._node&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=ev;var eL=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){"u">typeof t.editPolygon&&(t.editMode=t.editPolygon),"u">typeof t.deleteLayer&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},deleteControl(t){let e=this._btnNameMapping(t);this.buttons[e]&&(this.buttons[e].remove(),delete this.buttons[e])},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t],this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:eh("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:eh("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:eh("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:eh("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},r={title:eh("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:eh("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:eh("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},a={title:eh("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},l={title:eh("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},h={title:eh("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={title:eh("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},p={className:"control-icon leaflet-pm-icon-text",title:eh("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(r)),this._addButton("drawText",new L.Control.PMButton(p)),this._addButton("editMode",new L.Control.PMButton(s)),this._addButton("dragMode",new L.Control.PMButton(a)),this._addButton("cutPolygon",new L.Control.PMButton(l)),this._addButton("removalMode",new L.Control.PMButton(h)),this._addButton("rotateMode",new L.Control.PMButton(u))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];for(let i in!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool))),t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(e)"object"!=typeof e&&(e={name:e});else throw TypeError("Button has no name");let i=this._btnNameMapping(t);if(!e.name)throw TypeError("Button has no name");if(this.buttons[e.name])throw TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw TypeError("Button has no name");if(this.buttons[t.name])throw TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),t.block&&"draw"!==t.block||(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];n._button.tool!==t&&("draw"!==t||n._button.tool)||(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),r={};i.forEach(t=>{n[t]&&(r[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),this.map.pm.Toolbar.buttons=r,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw TypeError("No name passed");if(!e)throw TypeError("No actions passed");if(!this.buttons[i])throw TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),eb=u(tQ()),ek={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){t&&(t.target._snapped=!1),delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t,e=!1){let i,n,r=t.target;if(r._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),t?.originalEvent?.altKey||this._map?.pm?.Keyboard.isAltKeyPressed())return!1;if(e){if(!this._otherSnapLayers||0===this._otherSnapLayers.length)return!1;n=this._otherSnapLayers}else void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),n=this._snapList;if(n.length<=0)return!1;let o=this._calcClosestLayer(r.getLatLng(),n);if(0===Object.keys(o).length)return!1;i=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment?o.latlng:this._checkPrioritiySnapping(o);let s=this.options.snapDistance,a={marker:r,shape:this._shape,snapLatLng:i,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(a.marker,a),this._fireSnapDrag(this._layer,a),o.distance<s){r._orgLatLng=r.getLatLng(),r.setLatLng(i),r._snapped=!0,r._snapInfo=a;let t=()=>{this._snapLatLng=i,this._fireSnap(r,a),this._fireSnap(this._layer,a)},e=this._snapLatLng||{},n=i||{};(e.lat!==n.lat||e.lng!==n.lng)&&t()}else this._snapLatLng&&(this._unsnap(a),r._snapped=!1,r._snapInfo=void 0,this._fireUnsnap(a.marker,a),this._fireUnsnap(this._layer,a));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=(t=(t=t.filter(t=>this._layer!==t)).filter(t=>t._latlng||t._latlngs&&eu(t._latlngs))).filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],r={};e.forEach((e,o)=>{if(e._parentCopy&&e._parentCopy===this._layer||e.getLatLngs?.().flat(5).length<2)return;let s=this._calcLayerDistances(t,e);if(s.distance=Math.floor(s.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,s.latlng])}1===i&&(void 0===r.distance||s.distance-5<=r.distance)?(s.distance+5<r.distance&&(n=[]),(r=s).layer=e,n.push(r)):1!==i&&(r={},(r=s).layer=e,n.push(r))}),1!==i&&(n=n.sort((t,e)=>t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,r=e instanceof L.Polygon;if(n){let n=e.getLatLng();return{latlng:{...n},distance:this._getDistance(i,n,t)}}return this._calcLatLngDistances(t,e.getLatLngs(),i,r)},_calcLatLngDistances(t,e,i,n=!1){let r,o,s,a=e=>{e.forEach((l,h)=>{if(Array.isArray(l))return void a(l);if(this.options.snapSegment){let r;r=n?h+1===e.length?0:h+1:h+1===e.length?void 0:h+1;let a=e[r];if(a){let e=this._getDistanceToSegment(i,t,l,a);(void 0===o||e<o)&&(o=e,s=[l,a])}}else{let e=this._getDistance(i,t,l);(void 0===o||e<o)&&(o=e,r=l)}})};return a(e),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(i,t,s[0],s[1])},segment:s,distance:o}:{latlng:r,distance:o}},_getClosestLayerByPriority(t,e=1){t=t.sort((t,e)=>t._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,r={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{r[t]||(n+=1,r[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n=Object.keys(e),r,o=n.length-1,s={};for(;o>=0;)s[(r=n[o]).toLowerCase()]=e[r],o-=1;function a(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(e,n)=>{let r,o;if("instanceofShape"===t){if(r=a(e.layer).toLowerCase(),o=a(n.layer).toLowerCase(),!r||!o)return 0}else{if(!e.hasOwnProperty(t)||!n.hasOwnProperty(t))return 0;r=e[t].toLowerCase(),o=n[t].toLowerCase()}let l=r in s?s[r]:Number.MAX_SAFE_INTEGER,h=o in s?s[o]:Number.MAX_SAFE_INTEGER,u=0;return l<h?u=-1:l>h&&(u=1),"desc"===i?-1*u:u}}("instanceofShape",r)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],r=t.latlng,o=r;if(this.options.snapVertex){let t=this._getDistance(e,i,r),s=this._getDistance(e,n,r),a=t<s?i:n,l=t<s?t:s;if(this.options.snapMiddle){let o=L.PM.Utils.calcMiddleLatLng(e,i,n),h=this._getDistance(e,o,r);h<t&&h<s&&(a=o,l=h)}l<this.options.snapDistance&&(o=a)}return{...o}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(t,e,i,n){let r=t.getMaxZoom();r===1/0&&(r=t.getZoom());let o=t.project(e,r),s=t.project(i,r),a=t.project(n,r),l=L.LineUtil.closestPointOnSegment(o,s,a);return t.unproject(l,r)},_getDistanceToSegment(t,e,i,n){let r=t.latLngToContainerPoint(e),o=t.latLngToContainerPoint(i),s=t.latLngToContainerPoint(n);return L.LineUtil.pointToSegmentDistance(r,o,s)},_getDistance:(t,e,i)=>t.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},eM=L.Class.extend({includes:[ek,ea],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){e?this.options.pathOptions=(0,eb.default)(this.options.pathOptions,t):this.options.pathOptions=t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});eM.Marker=eM.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker",this._layerIsDragging=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._isTouchDevice=!(!window.matchMedia||!window.matchMedia("(pointer: coarse)").matches),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._isTouchDevice?(this._createTouchHint(),this._hintMarker=L.marker(this._map.getCenter(),{...this.options.markerStyle,opacity:0,interactive:!1}),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0):(this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.on("mousemove",this._syncHintMarker,this)),this._layer=this._hintMarker,this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._isTouchDevice?(this._removeTouchHint(),this._hintMarker=null):(this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this)),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this._layerIsDragging||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){this.options.markerStyle?.icon&&this._hintMarker?.setIcon(this.options.markerStyle.icon)},_createTouchHint(){this.options.tooltips&&(this._touchHint=L.DomUtil.create("div","leaflet-pm-touch-hint"),this._touchHint.textContent=eh("tooltips.placeMarkerTouch"),this._map.getContainer().appendChild(this._touchHint))},_removeTouchHint(){this._touchHint&&this._touchHint.parentNode&&(this._touchHint.parentNode.removeChild(this._touchHint),this._touchHint=null)}});var ex={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999};function ew(t,e,i={}){let n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function eC(t,e,i={}){if(!t)throw Error("coordinates is required");if(!Array.isArray(t))throw Error("coordinates must be an Array");if(t.length<2)throw Error("coordinates must be at least 2 numbers long");if(!eB(t[0])||!eB(t[1]))throw Error("coordinates must contain numbers");return ew({type:"Point",coordinates:t},e,i)}function eP(t,e,i={}){if(t.length<2)throw Error("coordinates must be an array of two or more positions");return ew({type:"LineString",coordinates:t},e,i)}function eE(t,e={}){let i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function eT(t){return t%(2*Math.PI)*180/Math.PI}function eS(t){return t%360*Math.PI/180}function eB(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}var eO=function(t){let e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat(...i.coordinates);else if("Polygon"===i.type)e=i.coordinates;else throw Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return e.forEach(t=>{e.forEach(e=>{for(let i=0;i<t.length-1;i++)for(let r=i;r<e.length-1;r++){if(t===e&&(1===Math.abs(i-r)||0===i&&r===t.length-2&&t[i][0]===t[t.length-1][0]&&t[i][1]===t[t.length-1][1]))continue;let o=function(t,e,i,n,r,o,s,a){let l,h,u,p,c,d={x:null,y:null,onLine1:!1,onLine2:!1};return 0==(l=(a-o)*(i-t)-(s-r)*(n-e))?null!==d.x&&null!==d.y&&d:(h=e-o,u=t-r,p=(s-r)*h-(a-o)*u,c=(i-t)*h-(n-e)*u,h=p/l,u=c/l,d.x=t+h*(i-t),d.y=e+h*(n-e),h>=0&&h<=1&&(d.onLine1=!0),u>=0&&u<=1&&(d.onLine2=!0),!!d.onLine1&&!!d.onLine2&&[d.x,d.y])}(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[r][0],e[r][1],e[r+1][0],e[r+1][1]);o&&n.features.push(eC([o[0],o[1]]))}})}),n};eM.Line=eM.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){(this._hintMarker.setLatLng(t.latlng),this.options.snappable)?(t.target=this._hintMarker,this._handleSnapping(t)):this._otherSnapLayers&&this._otherSnapLayers.length>0&&(t.target=this._hintMarker,this._handleSnapping(t,!0)),this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=eO(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let r=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(r,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let r=t[t.length-1],o=e.indexOf(r.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=1?eh("tooltips.continueLine"):eh("tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){this._layer?.setStyle(this.options.templineStyle),this._hintline?.setStyle(this.options.hintlineStyle)}}),eM.Polygon=eM.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=2?eh("tooltips.continueLine"):eh("tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),eM.Rectangle=eM.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:+!!this.options.cursorMarker}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(eh("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t));let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=em(this._startMarker.getLatLng(),this._map),e=em(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{i.equals(t,1e-8)||i.equals(e,1e-8)||n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))},setStyle(){this._layer?.setStyle(this.options.pathOptions)}}),eM.CircleMarker=eM.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(eh("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?i=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},r=new this._BaseCircleClass(e,n);this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),r.pm&&r.pm._updateHiddenPolyCircle(),this._fireCreate(r);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?t=e_(this._map,e,t,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(t=e_(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){let t={};L.extend(t,this.options.templineStyle),this.options[this._editableOption]&&(t.radius=0),this._layer?.setStyle(t),this._hintline?.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),eM.Circle=eM.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var eD=class{constructor(t=[],e=eR){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;let t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:i}=this,n=e[t];for(;t>0;){let r=t-1>>1,o=e[r];if(i(n,o)>=0)break;e[t]=o,t=r}e[t]=n}_down(t){let{data:e,compare:i}=this,n=this.length>>1,r=e[t];for(;t<n;){let n=(t<<1)+1,o=e[n],s=n+1;if(s<this.length&&0>i(e[s],o)&&(n=s,o=e[s]),i(o,r)>=0)break;e[t]=o,t=n}e[t]=r}};function eR(t,e){return t<e?-1:+(t>e)}function eI(t,e){return t.p.x>e.p.x?1:t.p.x<e.p.x?-1:t.p.y!==e.p.y?t.p.y>e.p.y?1:-1:1}function eA(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<e.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==e.rightSweepEvent.p.y?t.rightSweepEvent.p.y<e.rightSweepEvent.p.y?1:-1:1}var ez=class{constructor(t,e,i,n){this.p={x:t[0],y:t[1]},this.featureId=e,this.ringId=i,this.eventId=n,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(t){return this.p.x===t.p.x&&this.p.y===t.p.y}},eN=0,ej=0,eG=0;function eZ(t,e){let i="Feature"===t.type?t.geometry:t,n=i.coordinates;("Polygon"===i.type||"MultiLineString"===i.type)&&(n=[n]),"LineString"===i.type&&(n=[[n]]);for(let t=0;t<n.length;t++)for(let i=0;i<n[t].length;i++){let r=n[t][i][0],o=null;ej+=1;for(let s=0;s<n[t][i].length-1;s++){o=n[t][i][s+1];let a=new ez(r,eN,ej,eG),l=new ez(o,eN,ej,eG+1);a.otherEvent=l,l.otherEvent=a,eI(a,l)>0?(l.isLeftEndpoint=!0,a.isLeftEndpoint=!1):(a.isLeftEndpoint=!0,l.isLeftEndpoint=!1),e.push(a),e.push(l),r=o,eG+=1}}eN+=1}var eF=class{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}},eU=function(t,e){let i=new eD([],eI);return function(t,e){if("FeatureCollection"===t.type){let i=t.features;for(let t=0;t<i.length;t++)eZ(i[t],e)}else eZ(t,e)}(t,i),function(t,e){e=e||!1;let i=[],n=new eD([],eA);for(;t.length;){let r=t.pop();if(r.isLeftEndpoint){let t=new eF(r);for(let o=0;o<n.data.length;o++){let s=n.data[o];if(e&&s.leftSweepEvent.featureId===r.featureId)continue;let a=function(t,e){if(null===t||null===e||t.leftSweepEvent.ringId===e.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.rightSweepEvent)||t.leftSweepEvent.isSamePoint(e.leftSweepEvent)||t.leftSweepEvent.isSamePoint(e.rightSweepEvent)))return!1;let i=t.leftSweepEvent.p.x,n=t.leftSweepEvent.p.y,r=t.rightSweepEvent.p.x,o=t.rightSweepEvent.p.y,s=e.leftSweepEvent.p.x,a=e.leftSweepEvent.p.y,l=e.rightSweepEvent.p.x,h=e.rightSweepEvent.p.y,u=(h-a)*(r-i)-(l-s)*(o-n);if(0===u)return!1;let p=((l-s)*(n-a)-(h-a)*(i-s))/u,c=((r-i)*(n-a)-(o-n)*(i-s))/u;return p>=0&&p<=1&&c>=0&&c<=1&&[i+p*(r-i),n+p*(o-n)]}(t,s);!1!==a&&i.push(a)}n.push(t)}else!1===r.isLeftEndpoint&&n.pop()}return i}(i,e)};function eV(t,e,i={}){let{removeDuplicates:n=!0,ignoreSelfIntersections:r=!0}=i,o=[];"FeatureCollection"===t.type?o=o.concat(t.features):"Feature"===t.type?o.push(t):("LineString"===t.type||"Polygon"===t.type||"MultiLineString"===t.type||"MultiPolygon"===t.type)&&o.push(ew(t)),"FeatureCollection"===e.type?o=o.concat(e.features):"Feature"===e.type?o.push(e):("LineString"===e.type||"Polygon"===e.type||"MultiLineString"===e.type||"MultiPolygon"===e.type)&&o.push(ew(e));let s=eU(eE(o),r),a=[];if(n){let t={};s.forEach(e=>{let i=e.join(",");t[i]||(t[i]=!0,a.push(e))})}else a=s;return eE(a.map(t=>eC(t)))}var eH=u(ei(),1);function eq(t,e,i){if(null!==t)for(var n,r,o,s,a,l,h,u,p=0,c=0,d=t.type,_="FeatureCollection"===d,f="Feature"===d,m=_?t.features.length:1,g=0;g<m;g++){a=(u=!!(h=_?t.features[g].geometry:f?t.geometry:t)&&"GeometryCollection"===h.type)?h.geometries.length:1;for(var y=0;y<a;y++){var v=0,b=0;if(null!==(s=u?h.geometries[y]:h)){l=s.coordinates;var k=s.type;switch(p=i&&("Polygon"===k||"MultiPolygon"===k)?1:0,k){case null:break;case"Point":if(!1===e(l,c,g,v,b))return!1;c++,v++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(!1===e(l[n],c,g,v,b))return!1;c++,"MultiPoint"===k&&v++}"LineString"===k&&v++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(r=0;r<l[n].length-p;r++){if(!1===e(l[n][r],c,g,v,b))return!1;c++}"MultiLineString"===k&&v++,"Polygon"===k&&b++}"Polygon"===k&&v++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(b=0,r=0;r<l[n].length;r++){for(o=0;o<l[n][r].length-p;o++){if(!1===e(l[n][r][o],c,g,v,b))return!1;c++}b++}v++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===eq(s.geometries[n],e,i))return!1;break;default:throw Error("Unknown Geometry Type")}}}}}function eK(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function eW(t,e){!function(t,e){var i,n,r,o,s,a,l,h,u,p,c=0,d="FeatureCollection"===t.type,_="Feature"===t.type,f=d?t.features.length:1;for(i=0;i<f;i++){for(a=d?t.features[i].geometry:_?t.geometry:t,h=d?t.features[i].properties:_?t.properties:{},u=d?t.features[i].bbox:_?t.bbox:void 0,p=d?t.features[i].id:_?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,r=0;r<s;r++){if(null===(o=l?a.geometries[r]:a)){if(!1===e(null,c,h,u,p))return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,c,h,u,p))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],c,h,u,p))return!1;break;default:throw Error("Unknown Geometry Type")}}c++}}(t,function(t,i,n,r,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(ew(t,n,{bbox:r,id:o}),i,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++)if(!1===e(ew({type:s,coordinates:t.coordinates[l]},n),i,l))return!1})}function eY(t,e={}){if(null!=t.bbox&&!0!==e.recompute)return t.bbox;let i=[1/0,1/0,-1/0,-1/0];return eq(t,t=>{i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[0]&&(i[2]=t[0]),i[3]<t[1]&&(i[3]=t[1])}),i}function eX(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=eY(t);else if("FeatureCollection"===t.type)e=eY(t);else throw Error("invalid geojson");return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}}var eJ=class{constructor(t=9){this.tree=new eH.default(t),this.tree.toBBox=eX}insert(t){if("Feature"!==t.type)throw Error("invalid feature");return t.bbox=t.bbox?t.bbox:eY(t),this.tree.insert(t),this}load(t){var e=[];return Array.isArray(t)?t.forEach(function(t){if("Feature"!==t.type)throw Error("invalid features");t.bbox=t.bbox?t.bbox:eY(t),e.push(t)}):eK(t,function(t){if("Feature"!==t.type)throw Error("invalid features");t.bbox=t.bbox?t.bbox:eY(t),e.push(t)}),this.tree.load(e),this}remove(t,e){if("Feature"!==t.type)throw Error("invalid feature");return t.bbox=t.bbox?t.bbox:eY(t),this.tree.remove(t,e),this}clear(){return this.tree.clear(),this}search(t){return eE(this.tree.search(eX(t)))}collides(t){return this.tree.collides(eX(t))}all(){return eE(this.tree.all())}toJSON(){return this.tree.toJSON()}fromJSON(t){return this.tree.fromJSON(t),this}};function e$(t){if(!t)throw Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return[...t.geometry.coordinates];if("Point"===t.type)return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw Error("coord must be GeoJSON Point or an Array of numbers")}function eQ(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function e0(t){return"Feature"===t.type?t.geometry:t}function e1(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function e2(t,e,i={}){var n=e$(t),r=e$(e),o=Math.pow(Math.sin(eS(r[1]-n[1])/2),2)+Math.pow(Math.sin(eS(r[0]-n[0])/2),2)*Math.cos(eS(n[1]))*Math.cos(eS(r[1]));return function(t,e="kilometers"){let i=ex[e];if(!i)throw Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)),i.units)}var e3=Object.defineProperty,e4=Object.defineProperties,e8=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertySymbols,e6=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,e7=(t,e,i)=>e in t?e3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,it=(t,e)=>{for(var i in e||(e={}))e6.call(e,i)&&e7(t,i,e[i]);if(e5)for(var i of e5(e))e9.call(e,i)&&e7(t,i,e[i]);return t},ie=(t,e)=>e4(t,e8(e));function ii(t,e){let[i,n,r]=t,[o,s,a]=e;return i*o+n*s+r*a}function ir(t,e){let[i,n,r]=t,[o,s,a]=e;return[n*a-r*s,r*o-i*a,i*s-n*o]}function io(t){let e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2));return[t[0]/e,t[1]/e,t[2]/e]}function is(t){let e=eS(t[1]),i=eS(t[0]);return[Math.cos(e)*Math.cos(i),Math.cos(e)*Math.sin(i),Math.sin(e)]}function ia(t,e){if(!t)throw Error("line is required");if(!e)throw Error("splitter is required");let i=e1(t),n=e1(e);if("LineString"!==i)throw Error("line must be LineString");if("FeatureCollection"===n)throw Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw Error("splitter cannot be a GeometryCollection");var r=function(t,e){if(!(null!==(i=e=e??{})&&"object"==typeof i&&!Array.isArray(i)))throw Error("options is invalid");var i,n=e.precision,r=e.coordinates,o=e.mutate;if(n=null==n||isNaN(n)?6:n,r=null==r||isNaN(r)?3:r,!t)throw Error("<geojson> is required");if("number"!=typeof n)throw Error("<precision> must be a number");if("number"!=typeof r)throw Error("<coordinates> must be a number");(!1===o||void 0===o)&&(t=JSON.parse(JSON.stringify(t)));var s=Math.pow(10,n);return eq(t,function(t){var e=t,i=s,n=r;e.length>n&&e.splice(n,e.length);for(var o=0;o<e.length;o++)e[o]=Math.round(e[o]*i)/i}),t}(e,{precision:7});switch("Feature"!==t.type&&(t=ew(t)),n){case"Point":return ih(t,r);case"MultiPoint":return il(t,r);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return il(t,eV(t,r,{ignoreSelfIntersections:!0}))}}function il(t,e){var i=[],n=new eJ(void 0);return eW(e,function(e){if(i.forEach(function(t,e){t.id=e}),i.length){var r=n.search(e);if(r.features.length){var o=iu(e,r);i=i.filter(function(t){return t.id!==o.id}),n.remove(o),eK(ih(o,e),function(t){i.push(t),n.insert(t)})}}else i=ih(t,e).features,n.load(eE(i))}),eE(i)}function ih(t,e){var i,n,r,o=[],s=eQ(t)[0],a=eQ(t)[t.geometry.coordinates.length-1];if(ip(s,e$(e))||ip(a,e$(e)))return eE([t]);var l=new eJ(void 0),h=function(t){if(!t)throw Error("geojson is required");let e=[];return eW(t,t=>{var i=t,n=e;let r=[],o=i.geometry;if(null!==o){switch(o.type){case"Polygon":r=eQ(o);break;case"LineString":r=[eQ(o)]}r.forEach(t=>{var e,r;let o;(e=t,r=i.properties,o=[],e.reduce((t,e)=>{var i,n;let s,a,l,h,u=eP([t,e],r);return i=t,n=e,s=i[0],a=i[1],u.bbox=[s<(l=n[0])?s:l,a<(h=n[1])?a:h,s>l?s:l,a>h?a:h],o.push(u),e}),o).forEach(t=>{t.id=n.length,n.push(t)})})}}),eE(e)}(t);l.load(h);var u=l.search(e);if(!u.features.length)return eE([t]);var p=iu(e,u),c=(i=function(t,i,n){var r=eQ(i)[1],s=e$(e);return n===p.id?(t.push(s),o.push(eP(t)),ip(s,r)?[s]:[s,r]):(t.push(r),t)},r=n=[s],eK(h,function(t,e){r=0===e&&void 0===n?t:i(r,t,e)}),r);return c.length>1&&o.push(eP(c)),eE(o)}function iu(t,e){if(!e.features.length)throw Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return eK(e,function(e){var r=function(t,e,i={}){if(!t||!e)throw Error("lines and inputPoint are required arguments");let n=e$(e),r=eC([1/0,1/0],{lineStringIndex:-1,segmentIndex:-1,totalDistance:-1,lineDistance:-1,segmentDistance:-1,pointDistance:1/0,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),o=0,s=0,a=-1;return eW(t,function(t,l,h){a!==h&&(a=h,s=0);let u=eQ(t),p=u.length-2;for(let t=0;t<u.length-1;t++){let a=eC(u[t]),l=e$(a),c=eC(u[t+1]),d=e$(c),_=e2(a,c,i),f,m;d[0]===n[0]&&d[1]===n[1]?[f,m]=[d,!0]:l[0]===n[0]&&l[1]===n[1]?[f,m]=[l,!1]:[f,m]=function(t,e,i){let n=is(t),r=is(e),o=is(i),s=ir(n,r);if(0===s[0]&&0===s[1]&&0===s[2])return ii(n,r)>0?[[...e],!0]:[[...i],!1];let a=ir(s,o);if(0===a[0]&&0===a[1]&&0===a[2])return[[...e],!0];let l=io(ir(a,s)),h=[-l[0],-l[1],-l[2]],u=ii(o,l)>ii(o,h)?l:h,p=io(s),c=ii(ir(n,u),p),d=ii(ir(u,r),p);return c>=0&&d>=0?[function(t){let[e,i,n]=t,r=eT(Math.asin(Math.min(Math.max(n,-1),1)));return[eT(Math.atan2(i,e)),r]}(u),!1]:ii(n,o)>ii(r,o)?[[...t],!1]:[[...e],!0]}(l,d,n);let g=e2(e,f,i);if(g<r.properties.pointDistance){let e=e2(a,f,i);(r=eC(f,{lineStringIndex:h,segmentIndex:m&&t+1<=p?t+1:t,totalDistance:o+e,lineDistance:s+e,segmentDistance:e,pointDistance:g,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0})).properties=ie(it({},r.properties),{multiFeatureIndex:r.properties.lineStringIndex,index:r.properties.segmentIndex,location:r.properties.totalDistance,dist:r.properties.pointDistance})}o+=_,s+=_}}),r}(e,t).properties.dist;r<n&&(i=e,n=r)}),i}function ip(t,e){return t[0]===e[0]&&t[1]===e[1]}var ic=(3+8881784197001252e-31)*11102230246251565e-32;function id(t,e,i,n,r){let o,s,a,l,h=e[0],u=n[0],p=0,c=0;u>h==u>-h?(o=h,h=e[++p]):(o=u,u=n[++c]);let d=0;if(p<t&&c<i)for(u>h==u>-h?(s=h+o,a=o-(s-h),h=e[++p]):(s=u+o,a=o-(s-u),u=n[++c]),o=s,0!==a&&(r[d++]=a);p<t&&c<i;)u>h==u>-h?(l=(s=o+h)-o,a=o-(s-l)+(h-l),h=e[++p]):(l=(s=o+u)-o,a=o-(s-l)+(u-l),u=n[++c]),o=s,0!==a&&(r[d++]=a);for(;p<t;)l=(s=o+h)-o,a=o-(s-l)+(h-l),h=e[++p],o=s,0!==a&&(r[d++]=a);for(;c<i;)l=(s=o+u)-o,a=o-(s-l)+(u-l),u=n[++c],o=s,0!==a&&(r[d++]=a);return(0!==o||0===d)&&(r[d++]=o),d}function i_(t){return new Float64Array(t)}var im=(3+17763568394002505e-31)*11102230246251565e-32,ig=(2+13322676295501878e-31)*11102230246251565e-32,iy=(9+7105427357601002e-30)*11102230246251565e-32*11102230246251565e-32,iv=i_(4),iL=i_(8),ib=i_(12),ik=i_(16),iM=i_(4);function ix(t,e,i={}){if(!t)throw Error("point is required");if(!e)throw Error("polygon is required");let n=e$(t),r=e0(e),o=r.type,s=e.bbox,a=r.coordinates;if(s&&!1==(h=n,(u=s)[0]<=h[0]&&u[1]<=h[1]&&u[2]>=h[0]&&u[3]>=h[1]))return!1;"Polygon"===o&&(a=[a]);let l=!1;for(var h,u,p=0;p<a.length;++p){let t=function(t,e){var i,n,r,o,s,a,l,h,u,p=0,c=t[0],d=t[1],_=e.length;for(i=0;i<_;i++){n=0;var f=e[i],m=f.length-1;if((h=f[0])[0]!==f[m][0]&&h[1]!==f[m][1])throw Error("First and last coordinates in a ring must be the same");for(o=h[0]-c,s=h[1]-d;n<m;n++){if(a=(u=f[n+1])[0]-c,l=u[1]-d,0===s&&0===l){if(a<=0&&o>=0||o<=0&&a>=0)return 0}else if(l>=0&&s<=0||l<=0&&s>=0){if(0===(r=function(t,e,i,n,r,o){let s=(e-0)*(i-0),a=(t-0)*(n-0),l=s-a,h=Math.abs(s+a);return Math.abs(l)>=im*h?l:-function(t,e,i,n,r,o,s){let a,l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,C=t-0,P=i-0,E=e-0,T=n-0;b=C*T,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=E*P,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iv[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iv[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iv[2]=y-(w-p)+(g-p),iv[3]=w;let S=function(t,e){let i=e[0];for(let t=1;t<4;t++)i+=e[t];return i}(0,iv),B=ig*s;if(S>=B||-S>=B||(p=t-C,a=t-(C+p)+(p-0),p=i-P,h=i-(P+p)+(p-0),p=e-E,l=e-(E+p)+(p-0),p=n-T,u=n-(T+p)+(p-0),0===a&&0===l&&0===h&&0===u)||(B=iy*s+ic*Math.abs(S),(S+=C*u+T*a-(E*h+P*l))>=B||-S>=B))return S;b=a*T,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=l*P,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let O=id(4,iv,4,iM,iL);b=C*u,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=E*h,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let D=id(O,iL,4,iM,ib);b=a*u,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=l*h,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let R=id(D,ib,4,iM,ik);return ik[R-1]}(t,e,i,n,0,0,h)}(o,a,s,l,0,0)))return 0;(r>0&&l>0&&s<=0||r<0&&l<=0&&s>0)&&p++}h=u,s=l,o=a}}return p%2!=0}(n,a[p]);if(0===t)return!i.ignoreBoundary;t&&(l=!0)}return l}function iw(t,e,i={}){let n=e$(t),r=eQ(e);for(let t=0;t<r.length-1;t++){let e=!1;if(i.ignoreEndVertices&&(0===t&&(e="start"),t===r.length-2&&(e="end"),0===t&&t+1===r.length-1&&(e="both")),function(t,e,i,n,r){let o=i[0],s=i[1],a=t[0],l=t[1],h=e[0],u=e[1],p=i[0]-a,c=i[1]-l,d=h-a,_=u-l,f=p*_-c*d;if(null!==r){if(Math.abs(f)>r)return!1}else if(0!==f)return!1;return Math.abs(d)===Math.abs(_)&&0===Math.abs(d)?!n&&i[0]===t[0]&&i[1]===t[1]:n?"start"===n?Math.abs(d)>=Math.abs(_)?d>0?a<o&&o<=h:h<=o&&o<a:_>0?l<s&&s<=u:u<=s&&s<l:"end"===n?Math.abs(d)>=Math.abs(_)?d>0?a<=o&&o<h:h<o&&o<=a:_>0?l<=s&&s<u:u<s&&s<=l:"both"===n&&(Math.abs(d)>=Math.abs(_)?d>0?a<o&&o<h:h<o&&o<a:_>0?l<s&&s<u:u<s&&s<l):Math.abs(d)>=Math.abs(_)?d>0?a<=o&&o<=h:h<=o&&o<=a:_>0?l<=s&&s<=u:u<=s&&s<=l}(r[t],r[t+1],n,e,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1}function iC(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry||!iP(eY(t),eY(e)))return!1;for(let i of e0(e).coordinates)for(let e of i)if(!ix(e,t))return!1;return!0}function iP(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function iE(t,e){return t[0]===e[0]&&t[1]===e[1]}i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(8),i_(8),i_(8),i_(4),i_(8),i_(8),i_(8),i_(12),i_(192),i_(192),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(8),i_(8),i_(8),i_(8),i_(8),i_(8),i_(8),i_(8),i_(8),i_(4),i_(4),i_(4),i_(8),i_(16),i_(16),i_(16),i_(32),i_(32),i_(48),i_(64),i_(1152),i_(1152),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(4),i_(24),i_(24),i_(24),i_(24),i_(24),i_(24),i_(24),i_(24),i_(24),i_(24),i_(1152),i_(1152),i_(1152),i_(1152),i_(1152),i_(2304),i_(2304),i_(3456),i_(5760),i_(8),i_(8),i_(8),i_(16),i_(24),i_(48),i_(48),i_(96),i_(192),i_(384),i_(384),i_(384),i_(768),i_(96),i_(96),i_(96),i_(1152);var iT=function(t,e){let i=e0(t),n=e0(e),r=i.type,o=n.type,s=i.coordinates,a=n.coordinates;switch(r){case"Point":if("Point"===o)return iE(s,a);throw Error("feature2 "+o+" geometry not supported");case"MultiPoint":switch(o){case"Point":var l,h,u=i,p=n;let c,d=!1;for(c=0;c<u.coordinates.length;c++)if(iE(u.coordinates[c],p.coordinates)){d=!0;break}return d;case"MultiPoint":var _=i,f=n;for(let t of f.coordinates){let e=!1;for(let i of _.coordinates)if(iE(t,i)){e=!0;break}if(!e)return!1}return!0;default:throw Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return iw(n,i,{ignoreEndVertices:!0});case"LineString":var m=i,g=n;let y=!1;for(let t of g.coordinates)if(iw({type:"Point",coordinates:t},m,{ignoreEndVertices:!0})&&(y=!0),!iw({type:"Point",coordinates:t},m,{ignoreEndVertices:!1}))return!1;return y;case"MultiPoint":var v=i,b=n;let k=!1;for(let t of b.coordinates)if(iw(t,v,{ignoreEndVertices:!0})&&(k=!0),!iw(t,v))return!1;return!!k;default:throw Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return ix(n,i,{ignoreBoundary:!0});case"LineString":var M,x,w,C=i,P=n;if(!iP(eY(C),eY(P)))return!1;for(let t of P.coordinates)if(!ix(t,C))return!1;let E=!1;for(let t of function(t,e){let i=t.coordinates,n=[];for(let t=0;t<i.length-1;t++){let r=eP([i[t],i[t+1]]),o=ia(r,ew(e));0===o.features.length?n.push(r):n.push(...o.features)}return eE(n)}(P,C).features){let e=(x=t.geometry.coordinates[0],w=t.geometry.coordinates[1],[(x[0]+w[0])/2,(x[1]+w[1])/2]);if(!ix(e,C))return!1;!E&&ix(e,C,{ignoreBoundary:!0})&&(E=!0)}return E;case"Polygon":return iC(i,n);case"MultiPoint":var T=i,S=n;for(let t of S.coordinates)if(!ix(t,T,{ignoreBoundary:!0}))return!1;return!0;case"MultiPolygon":return M=i,n.coordinates.every(t=>iC(M,{type:"Polygon",coordinates:t}));default:throw Error("feature2 "+o+" geometry not supported")}case"MultiPolygon":if("Polygon"===o){return l=i,h=n,l.coordinates.some(t=>iC({type:"Polygon",coordinates:t},h))}throw Error("feature2 "+o+" geometry not supported");default:throw Error("feature1 "+r+" geometry not supported")}},iS=u(ee()),iB=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,iO=Math.ceil,iD=Math.floor,iR="[BigNumber Error] ",iI=iR+"Number primitive has more than 15 significant digits: ",iA=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function iz(t){var e=0|t;return t>0||t===e?e:e-1}function iN(t){for(var e,i,n=1,r=t.length,o=t[0]+"";n<r;){for(i=14-(e=t[n++]+"").length;i--;e="0"+e);o+=e}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function ij(t,e){var i,n,r=t.c,o=e.c,s=t.s,a=e.s,l=t.e,h=e.e;if(!s||!a)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-a:s;if(s!=a)return s;if(i=s<0,n=l==h,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>h^i?1:-1;for(a=(l=r.length)<(h=o.length)?l:h,s=0;s<a;s++)if(r[s]!=o[s])return r[s]>o[s]^i?1:-1;return l==h?0:l>h^i?1:-1}function iG(t,e,i,n){if(t<e||t>i||t!==iD(t))throw Error(iR+(n||"Argument")+("number"==typeof t?t<e||t>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function iZ(t){var e=t.c.length-1;return iz(t.e/14)==e&&t.c[e]%2!=0}function iF(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function iU(t,e,i){var n,r;if(e<0){for(r=i+".";++e;r+=i);t=r+t}else if(n=t.length,++e>n){for(r=i,e-=n;--e;r+=i);t+=r}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var iV=function t(e){var i,n,r,o,s,a,l,h,u,p=C.prototype={constructor:C,toString:null,valueOf:null},c=new C(1),d=20,_=4,f=-7,m=21,g=-1e7,y=1e7,v=!1,b=1,k=0,M={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},x="0123456789abcdefghijklmnopqrstuvwxyz",w=!0;function C(t,e){var i,n,r,o,s,a,l,p,c=this;if(!(c instanceof C))return new C(t,e);if(null==e){if(t&&!0===t._isBigNumber){c.s=t.s,!t.c||t.e>y?c.c=c.e=null:t.e<g?c.c=[c.e=0]:(c.e=t.e,c.c=t.c.slice());return}if((a="number"==typeof t)&&0*t==0){if(c.s=1/t<0?(t=-t,-1):1,t===~~t){for(o=0,s=t;s>=10;s/=10,o++);o>y?c.c=c.e=null:(c.e=o,c.c=[t]);return}p=String(t)}else{if(!iB.test(p=String(t)))return u(c,p,a);c.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(o=p.indexOf("."))>-1&&(p=p.replace(".","")),(s=p.search(/e/i))>0?(o<0&&(o=s),o+=+p.slice(s+1),p=p.substring(0,s)):o<0&&(o=p.length)}else{if(iG(e,2,x.length,"Base"),10==e&&w)return S(c=new C(t),d+c.e+1,_);if(p=String(t),a="number"==typeof t){if(0*t!=0)return u(c,p,a,e);if(c.s=1/t<0?(p=p.slice(1),-1):1,C.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(iI+t)}else c.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(i=x.slice(0,e),o=s=0,l=p.length;s<l;s++)if(0>i.indexOf(n=p.charAt(s))){if("."==n){if(s>o){o=l;continue}}else if(!r&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){r=!0,s=-1,o=0;continue}return u(c,String(t),a,e)}a=!1,(o=(p=h(p,e,10,c.s)).indexOf("."))>-1?p=p.replace(".",""):o=p.length}for(s=0;48===p.charCodeAt(s);s++);for(l=p.length;48===p.charCodeAt(--l););if(p=p.slice(s,++l)){if(l-=s,a&&C.DEBUG&&l>15&&(t>0x1fffffffffffff||t!==iD(t)))throw Error(iI+c.s*t);if((o=o-s-1)>y)c.c=c.e=null;else if(o<g)c.c=[c.e=0];else{if(c.e=o,c.c=[],s=(o+1)%14,o<0&&(s+=14),s<l){for(s&&c.c.push(+p.slice(0,s)),l-=14;s<l;)c.c.push(+p.slice(s,s+=14));s=14-(p=p.slice(s)).length}else s-=l;for(;s--;p+="0");c.c.push(+p)}}else c.c=[c.e=0]}function P(t,e,i,n){var r,o,s,a,l;if(null==i?i=_:iG(i,0,8),!t.c)return t.toString();if(r=t.c[0],s=t.e,null==e)l=iN(t.c),l=1==n||2==n&&(s<=f||s>=m)?iF(l,s):iU(l,s,"0");else if(o=(t=S(new C(t),e,i)).e,a=(l=iN(t.c)).length,1==n||2==n&&(e<=o||o<=f)){for(;a<e;l+="0",a++);l=iF(l,o)}else if(e-=s+(2===n&&o>s),l=iU(l,o,"0"),o+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=o-a)>0)for(o+1==a&&(l+=".");e--;l+="0");return t.s<0&&r?"-"+l:l}function E(t,e){for(var i,n,r=1,o=new C(t[0]);r<t.length;r++)(n=new C(t[r])).s&&(i=ij(o,n))!==e&&(0!==i||o.s!==e)||(o=n);return o}function T(t,e,i){for(var n=1,r=e.length;!e[--r];e.pop());for(r=e[0];r>=10;r/=10,n++);return(i=n+14*i-1)>y?t.c=t.e=null:i<g?t.c=[t.e=0]:(t.e=i,t.c=e),t}function S(t,e,i,n){var r,o,s,a,l,h,u,p=t.c;if(p){t:{for(r=1,a=p[0];a>=10;a/=10,r++);if((o=e-r)<0)o+=14,s=e,u=iD((l=p[h=0])/iA[r-s-1]%10);else if((h=iO((o+1)/14))>=p.length)if(n){for(;p.length<=h;p.push(0));l=u=0,r=1,o%=14,s=o-14+1}else break t;else{for(l=a=p[h],r=1;a>=10;a/=10,r++);o%=14,u=(s=o-14+r)<0?0:iD(l/iA[r-s-1]%10)}if(n=n||e<0||null!=p[h+1]||(s<0?l:l%iA[r-s-1]),n=i<4?(u||n)&&(0==i||i==(t.s<0?3:2)):u>5||5==u&&(4==i||n||6==i&&(o>0?s>0?l/iA[r-s]:0:p[h-1])%10&1||i==(t.s<0?8:7)),e<1||!p[0])return p.length=0,n?(e-=t.e+1,p[0]=iA[(14-e%14)%14],t.e=-e||0):p[0]=t.e=0,t;if(0==o?(p.length=h,a=1,h--):(p.length=h+1,a=iA[14-o],p[h]=s>0?iD(l/iA[r-s]%iA[s])*a:0),n)for(;;)if(0==h){for(o=1,s=p[0];s>=10;s/=10,o++);for(s=p[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[h]+=a,1e14!=p[h])break;p[h--]=0,a=1}for(o=p.length;0===p[--o];p.pop());}t.e>y?t.c=t.e=null:t.e<g&&(t.c=[t.e=0])}return t}function B(t){var e,i=t.e;return null===i?t.toString():(e=iN(t.c),e=i<=f||i>=m?iF(e,i):iU(e,i,"0"),t.s<0?"-"+e:e)}return C.clone=t,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(t){var e,i;if(null!=t)if("object"==typeof t){if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(iG(i=t[e],0,1e9,e),d=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(iG(i=t[e],0,8,e),_=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(iG(i[0],-1e9,0,e),iG(i[1],0,1e9,e),f=i[0],m=i[1]):(iG(i,-1e9,1e9,e),f=-(m=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)iG(i[0],-1e9,-1,e),iG(i[1],1,1e9,e),g=i[0],y=i[1];else if(iG(i,-1e9,1e9,e),i)g=-(y=i<0?-i:i);else throw Error(iR+e+" cannot be zero: "+i);if(t.hasOwnProperty(e="CRYPTO"))if(!!(i=t[e])===i)if(i)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))v=i;else throw v=!i,Error(iR+"crypto unavailable");else v=i;else throw Error(iR+e+" not true or false: "+i);if(t.hasOwnProperty(e="MODULO_MODE")&&(iG(i=t[e],0,9,e),b=i),t.hasOwnProperty(e="POW_PRECISION")&&(iG(i=t[e],0,1e9,e),k=i),t.hasOwnProperty(e="FORMAT"))if("object"==typeof(i=t[e]))M=i;else throw Error(iR+e+" not an object: "+i);if(t.hasOwnProperty(e="ALPHABET"))if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(iR+e+" invalid: "+i);else w="0123456789"==i.slice(0,10),x=i}else throw Error(iR+"Object expected: "+t);return{DECIMAL_PLACES:d,ROUNDING_MODE:_,EXPONENTIAL_AT:[f,m],RANGE:[g,y],CRYPTO:v,MODULO_MODE:b,POW_PRECISION:k,FORMAT:M,ALPHABET:x}},C.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!C.DEBUG)return!0;var e,i,n=t.c,r=t.e,o=t.s;t:if("[object Array]"==({}).toString.call(n)){if((1===o||-1===o)&&r>=-1e9&&r<=1e9&&r===iD(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break t}if((e=(r+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((i=n[e])<0||i>=1e14||i!==iD(i))break t;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===o||1===o||-1===o))return!0;throw Error(iR+"Invalid BigNumber: "+t)},C.maximum=C.max=function(){return E(arguments,-1)},C.minimum=C.min=function(){return E(arguments,1)},i=0x20000000000000*Math.random()&2097151?function(){return iD(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},C.random=function(t){var e,n,r,o,s,a=0,l=[],h=new C(c);if(null==t?t=d:iG(t,0,1e9),o=iO(t/14),v)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(s=131072*e[a]+(e[a+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[a]=n[0],e[a+1]=n[1]):(l.push(s%1e14),a+=2);a=o/2}else if(crypto.randomBytes){for(e=crypto.randomBytes(o*=7);a<o;)(s=(31&e[a])*0x1000000000000+0x10000000000*e[a+1]+0x100000000*e[a+2]+0x1000000*e[a+3]+(e[a+4]<<16)+(e[a+5]<<8)+e[a+6])>=9e15?crypto.randomBytes(7).copy(e,a):(l.push(s%1e14),a+=7);a=o/7}else throw v=!1,Error(iR+"crypto unavailable");if(!v)for(;a<o;)(s=i())<9e15&&(l[a++]=s%1e14);for(o=l[--a],t%=14,o&&t&&(s=iA[14-t],l[a]=iD(o/s)*s);0===l[a];l.pop(),a--);if(a<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=14);for(a=1,s=l[0];s>=10;s/=10,a++);a<14&&(r-=14-a)}return h.e=r,h.c=l,h},C.sum=function(){for(var t=1,e=arguments,i=new C(e[0]);t<e.length;)i=i.plus(e[t++]);return i},h=function(){var t="0123456789";function e(t,e,i,n){for(var r,o,s=[0],a=0,l=t.length;a<l;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),r=0;r<s.length;r++)s[r]>i-1&&(null==s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}return function(i,n,r,o,s){var a,h,u,p,c,f,m,g,y=i.indexOf("."),v=d,b=_;for(y>=0&&(p=k,k=0,i=i.replace(".",""),f=(g=new C(n)).pow(i.length-y),k=p,g.c=e(iU(iN(f.c),f.e,"0"),10,r,t),g.e=g.c.length),u=p=(m=e(i,n,r,s?(a=x,t):(a=t,x))).length;0==m[--p];m.pop());if(!m[0])return a.charAt(0);if(y<0?--u:(f.c=m,f.e=u,f.s=o,m=(f=l(f,g,v,b,r)).c,c=f.r,u=f.e),y=m[h=u+v+1],p=r/2,c=c||h<0||null!=m[h+1],c=b<4?(null!=y||c)&&(0==b||b==(f.s<0?3:2)):y>p||y==p&&(4==b||c||6==b&&1&m[h-1]||b==(f.s<0?8:7)),h<1||!m[0])i=c?iU(a.charAt(1),-v,a.charAt(0)):a.charAt(0);else{if(m.length=h,c)for(--r;++m[--h]>r;)m[h]=0,h||(++u,m=[1].concat(m));for(p=m.length;!m[--p];);for(y=0,i="";y<=p;i+=a.charAt(m[y++]));i=iU(i,u,a.charAt(0))}return i}}(),l=function(){function t(t,e,i){var n,r,o,s,a=0,l=t.length,h=e%1e7,u=e/1e7|0;for(t=t.slice();l--;)n=u*(o=t[l]%1e7)+(s=t[l]/1e7|0)*h,a=((r=h*o+n%1e7*1e7+a)/i|0)+(n/1e7|0)+u*s,t[l]=r%i;return a&&(t=[a].concat(t)),t}function e(t,e,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(t[r]!=e[r]){o=t[r]>e[r]?1:-1;break}return o}function i(t,e,i,n){for(var r=0;i--;)t[i]-=r,r=+(t[i]<e[i]),t[i]=r*n+t[i]-e[i];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,r,o,s,a){var l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,P=n.s==r.s?1:-1,E=n.c,T=r.c;if(!E||!E[0]||!T||!T[0])return new C(!n.s||!r.s||(E?T&&E[0]==T[0]:!T)?NaN:E&&0==E[0]||!T?0*P:P/0);for(m=(f=new C(P)).c=[],P=o+(h=n.e-r.e)+1,a||(a=1e14,h=iz(n.e/14)-iz(r.e/14),P=P/14|0),u=0;T[u]==(E[u]||0);u++);if(T[u]>(E[u]||0)&&h--,P<0)m.push(1),p=!0;else{for(k=E.length,x=T.length,u=0,P+=2,(c=iD(a/(T[0]+1)))>1&&(T=t(T,c,a),E=t(E,c,a),x=T.length,k=E.length),b=x,y=(g=E.slice(0,x)).length;y<x;g[y++]=0);w=[0].concat(w=T.slice()),M=T[0],T[1]>=a/2&&M++;do{if(c=0,(l=e(T,g,x,y))<0){if(v=g[0],x!=y&&(v=v*a+(g[1]||0)),(c=iD(v/M))>1)for(c>=a&&(c=a-1),_=(d=t(T,c,a)).length,y=g.length;1==e(d,g,_,y);)c--,i(d,x<_?w:T,_,a),_=d.length,l=1;else 0==c&&(l=c=1),_=(d=T.slice()).length;if(_<y&&(d=[0].concat(d)),i(g,d,y,a),y=g.length,-1==l)for(;1>e(T,g,x,y);)c++,i(g,x<y?w:T,y,a),y=g.length}else 0===l&&(c++,g=[0]);m[u++]=c,g[0]?g[y++]=E[b]||0:(g=[E[b]],y=1)}while((b++<k||null!=g[0])&&P--)p=null!=g[0],m[0]||m.splice(0,1)}if(1e14==a){for(u=1,P=m[0];P>=10;P/=10,u++);S(f,o+(f.e=u+14*h-1)+1,s,p)}else f.e=h,f.r=+p;return f}}(),n=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,o=/^\.([^.]+)$/,s=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g,u=function(t,e,i,l){var h,u=i?e:e.replace(a,"");if(s.test(u))t.s=isNaN(u)?null:u<0?-1:1;else{if(!i&&(u=u.replace(n,function(t,e,i){return h="x"==(i=i.toLowerCase())?16:"b"==i?2:8,l&&l!=h?t:e}),l&&(h=l,u=u.replace(r,"$1").replace(o,"0.$1")),e!=u))return new C(u,h);if(C.DEBUG)throw Error(iR+"Not a"+(l?" base "+l:"")+" number: "+e);t.s=null}t.c=t.e=null},p.absoluteValue=p.abs=function(){var t=new C(this);return t.s<0&&(t.s=1),t},p.comparedTo=function(t,e){return ij(this,new C(t,e))},p.decimalPlaces=p.dp=function(t,e){var i,n,r;if(null!=t)return iG(t,0,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t+this.e+1,e);if(!(i=this.c))return null;if(n=((r=i.length-1)-iz(this.e/14))*14,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(t,e){return l(this,new C(t,e),d,_)},p.dividedToIntegerBy=p.idiv=function(t,e){return l(this,new C(t,e),0,1)},p.exponentiatedBy=p.pow=function(t,e){var i,n,r,o,s,a,l,h,u,p=this;if((t=new C(t)).c&&!t.isInteger())throw Error(iR+"Exponent not an integer: "+B(t));if(null!=e&&(e=new C(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return u=new C(Math.pow(+B(p),a?t.s*(2-iZ(t)):+B(t))),e?u.mod(e):u;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new C(NaN);(n=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&iZ(t)?-0:0,p.e>-1&&(o=1/o),new C(l?1/o:o);k&&(o=iO(k/14+2))}for(a?(i=new C(.5),l&&(t.s=1),h=iZ(t)):h=(r=Math.abs(+B(t)))%2,u=new C(c);;){if(h){if(!(u=u.times(p)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(r){if(0===(r=iD(r/2)))break;h=r%2}else if(S(t=t.times(i),t.e+1,1),t.e>14)h=iZ(t);else{if(0==(r=+B(t)))break;h=r%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?u:(l&&(u=c.div(u)),e?u.mod(e):o?S(u,k,_,s):u)},p.integerValue=function(t){var e=new C(this);return null==t?t=_:iG(t,0,8),S(e,e.e+1,t)},p.isEqualTo=p.eq=function(t,e){return 0===ij(this,new C(t,e))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(t,e){return ij(this,new C(t,e))>0},p.isGreaterThanOrEqualTo=p.gte=function(t,e){return 1===(e=ij(this,new C(t,e)))||0===e},p.isInteger=function(){return!!this.c&&iz(this.e/14)>this.c.length-2},p.isLessThan=p.lt=function(t,e){return 0>ij(this,new C(t,e))},p.isLessThanOrEqualTo=p.lte=function(t,e){return -1===(e=ij(this,new C(t,e)))||0===e},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(t,e){var i,n,r,o,s=this.s;if(e=(t=new C(t,e)).s,!s||!e)return new C(NaN);if(s!=e)return t.s=-e,this.plus(t);var a=this.e/14,l=t.e/14,h=this.c,u=t.c;if(!a||!l){if(!h||!u)return h?(t.s=-e,t):new C(u?this:NaN);if(!h[0]||!u[0])return u[0]?(t.s=-e,t):new C(h[0]?this:3==_?-0:0)}if(a=iz(a),l=iz(l),h=h.slice(),s=a-l){for((o=s<0)?(s=-s,r=h):(l=a,r=u),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(n=(o=(s=h.length)<(e=u.length))?s:e,s=e=0;e<n;e++)if(h[e]!=u[e]){o=h[e]<u[e];break}if(o&&(r=h,h=u,u=r,t.s=-t.s),(e=(n=u.length)-(i=h.length))>0)for(;e--;h[i++]=0);for(e=1e14-1;n>s;){if(h[--n]<u[n]){for(i=n;i&&!h[--i];h[i]=e);--h[i],h[n]+=1e14}h[n]-=u[n]}for(;0==h[0];h.splice(0,1),--l);return h[0]?T(t,h,l):(t.s=3==_?-1:1,t.c=[t.e=0],t)},p.modulo=p.mod=function(t,e){var i,n;return t=new C(t,e),this.c&&t.s&&(!t.c||t.c[0])?t.c&&(!this.c||this.c[0])?(9==b?(n=t.s,t.s=1,i=l(this,t,0,3),t.s=n,i.s*=n):i=l(this,t,0,b),(t=this.minus(i.times(t))).c[0]||1!=b||(t.s=this.s),t):new C(this):new C(NaN)},p.multipliedBy=p.times=function(t,e){var i,n,r,o,s,a,l,h,u,p,c,d,_,f=this.c,m=(t=new C(t,e)).c;if(!f||!m||!f[0]||!m[0])return this.s&&t.s&&(!f||f[0]||m)&&(!m||m[0]||f)?(t.s*=this.s,f&&m?(t.c=[0],t.e=0):t.c=t.e=null):t.c=t.e=t.s=null,t;for(n=iz(this.e/14)+iz(t.e/14),t.s*=this.s,(l=f.length)<(p=m.length)&&(_=f,f=m,m=_,r=l,l=p,p=r),r=l+p,_=[];r--;_.push(0));for(r=p;--r>=0;){for(i=0,c=m[r]%1e7,d=m[r]/1e7|0,o=r+(s=l);o>r;)a=d*(h=f[--s]%1e7)+(u=f[s]/1e7|0)*c,i=((h=c*h+a%1e7*1e7+_[o]+i)/1e14|0)+(a/1e7|0)+d*u,_[o--]=h%1e14;_[o]=i}return i?++n:_.splice(0,1),T(t,_,n)},p.negated=function(){var t=new C(this);return t.s=-t.s||null,t},p.plus=function(t,e){var i,n=this.s;if(e=(t=new C(t,e)).s,!n||!e)return new C(NaN);if(n!=e)return t.s=-e,this.minus(t);var r=this.e/14,o=t.e/14,s=this.c,a=t.c;if(!r||!o){if(!s||!a)return new C(n/0);if(!s[0]||!a[0])return a[0]?t:new C(s[0]?this:0*n)}if(r=iz(r),o=iz(o),s=s.slice(),n=r-o){for(n>0?(o=r,i=a):(n=-n,i=s),i.reverse();n--;i.push(0));i.reverse()}for((n=s.length)-(e=a.length)<0&&(i=a,a=s,s=i,e=n),n=0;e;)n=(s[--e]=s[e]+a[e]+n)/1e14|0,s[e]=1e14===s[e]?0:s[e]%1e14;return n&&(s=[n].concat(s),++o),T(t,s,o)},p.precision=p.sd=function(t,e){var i,n,r;if(null!=t&&!!t!==t)return iG(t,1,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t,e);if(!(i=this.c))return null;if(n=14*(r=i.length-1)+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return t&&this.e+1>n&&(n=this.e+1),n},p.shiftedBy=function(t){return iG(t,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+t)},p.squareRoot=p.sqrt=function(){var t,e,i,n,r,o=this.c,s=this.s,a=this.e,h=d+4,u=new C("0.5");if(1!==s||!o||!o[0])return new C(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+B(this)))||s==1/0?(((e=iN(o)).length+a)%2==0&&(e+="0"),s=Math.sqrt(+e),a=iz((a+1)/2)-(a<0||a%2),i=new C(e=s==1/0?"5e"+a:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+a)):i=new C(s+""),i.c[0]){for((s=(a=i.e)+h)<3&&(s=0);;)if(r=i,i=u.times(r.plus(l(this,r,h,1))),iN(r.c).slice(0,s)===(e=iN(i.c)).slice(0,s))if(i.e<a&&--s,"9999"!=(e=e.slice(s-3,s+1))&&(n||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(S(i,i.e+d+2,1),t=!i.times(i).eq(this));break}else{if(!n&&(S(r,r.e+d+2,0),r.times(r).eq(this))){i=r;break}h+=4,s+=4,n=1}}return S(i,i.e+d+1,_,t)},p.toExponential=function(t,e){return null!=t&&(iG(t,0,1e9),t++),P(this,t,e,1)},p.toFixed=function(t,e){return null!=t&&(iG(t,0,1e9),t=t+this.e+1),P(this,t,e)},p.toFormat=function(t,e,i){var n;if(null==i)null!=t&&e&&"object"==typeof e?(i=e,e=null):t&&"object"==typeof t?(i=t,t=e=null):i=M;else if("object"!=typeof i)throw Error(iR+"Argument not an object: "+i);if(n=this.toFixed(t,e),this.c){var r,o=n.split("."),s=+i.groupSize,a=+i.secondaryGroupSize,l=i.groupSeparator||"",h=o[0],u=o[1],p=this.s<0,c=p?h.slice(1):h,d=c.length;if(a&&(r=s,s=a,a=r,d-=r),s>0&&d>0){for(r=d%s||s,h=c.substr(0,r);r<d;r+=s)h+=l+c.substr(r,s);a>0&&(h+=l+c.slice(r)),p&&(h="-"+h)}n=u?h+(i.decimalSeparator||"")+((a=+i.fractionGroupSize)?u.replace(RegExp("\\d{"+a+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):u):h}return(i.prefix||"")+n+(i.suffix||"")},p.toFraction=function(t){var e,i,n,r,o,s,a,h,u,p,d,f,m=this.c;if(null!=t&&(!(a=new C(t)).isInteger()&&(a.c||1!==a.s)||a.lt(c)))throw Error(iR+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+B(a));if(!m)return new C(this);for(e=new C(c),u=i=new C(c),n=h=new C(c),f=iN(m),o=e.e=f.length-this.e-1,e.c[0]=iA[(s=o%14)<0?14+s:s],t=!t||a.comparedTo(e)>0?o>0?e:u:a,s=y,y=1/0,a=new C(f),h.c[0]=0;p=l(a,e,0,1),1!=(r=i.plus(p.times(n))).comparedTo(t);)i=n,n=r,u=h.plus(p.times(r=u)),h=r,e=a.minus(p.times(r=e)),a=r;return r=l(t.minus(i),n,0,1),h=h.plus(r.times(u)),i=i.plus(r.times(n)),h.s=u.s=this.s,o*=2,d=1>l(u,n,o,_).minus(this).abs().comparedTo(l(h,i,o,_).minus(this).abs())?[u,n]:[h,i],y=s,d},p.toNumber=function(){return+B(this)},p.toPrecision=function(t,e){return null!=t&&iG(t,1,1e9),P(this,t,e,2)},p.toString=function(t){var e,i=this,n=i.s,r=i.e;return null===r?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=r<=f||r>=m?iF(iN(i.c),r):iU(iN(i.c),r,"0"):10===t&&w?e=iU(iN((i=S(new C(i),d+r+1,_)).c),i.e,"0"):(iG(t,2,x.length,"Base"),e=h(iU(iN(i.c),r,"0"),10,t,n,!0)),n<0&&i.c[0]&&(e="-"+e)),e},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=e&&C.set(e),C}(),iH=class{key;left=null;right=null;constructor(t){this.key=t}},iq=class extends iH{constructor(t){super(t)}},iK=class{size=0;modificationCount=0;splayCount=0;splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i=null,n=null,r=null,o=null,s=e,a=this.compare,l;for(;;)if((l=a(s.key,t))>0){let e=s.left;if(null==e||(l=a(e.key,t))>0&&(s.left=e.right,e.right=s,null==(e=(s=e).left)))break;null==i?n=s:i.left=s,i=s,s=e}else if(l<0){let e=s.right;if(null==e||(l=a(e.key,t))<0&&(s.right=e.left,e.left=s,null==(e=(s=e).right)))break;null==r?o=s:r.right=s,r=s,s=e}else break;return null!=r&&(r.right=s.left,s.left=o),null!=i&&(i.left=s.right,s.right=n),this.root!==s&&(this.root=s,this.splayCount++),l}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,i=(e=t).left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,i=(e=t).right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;(e=this.splayMax(n)).right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;if(null==i){this.root=t;return}e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:+(t>e)}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},iW=class t extends iK{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e=this[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value,i.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(0>this.splay(t))return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)i=(e=i).right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)i=(e=i).left;return e.key}retainAll(e){let i=new t(this.compare,this.validKey),n=this.modificationCount;for(let t of e){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(t)&&0==this.splay(t)&&i.add(this.root.key)}i.size!=this.size&&(this.root=i.root,this.size=i.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)&&i.add(t);return i}difference(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)||i.add(t);return i}union(t){let e=this.clone();return e.addAll(t),e}clone(){let e=new t(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(t){if(null==t)return null;let e=new iq(t.key);return function t(e,i){let n,r;do{if(n=e.left,r=e.right,null!=n){let e=new iq(n.key);i.left=e,t(n,e)}if(null!=r){let t=new iq(r.key);i.right=t,e=r,i=t}}while(null!=r)}(t,e),e}toSet(){return this.clone()}entries(){return new iJ(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new iX(this.wrap())}[Symbol.toStringTag]="[object Set]"},iY=class{tree;path=[];modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},iX=class extends iY{getValue(t){return t.key}},iJ=class extends iY{getValue(t){return[t.key,t.key]}},i$=t=>()=>t,iQ=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):i$(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)},i0=t=>t,i1=t=>{let e;return{set:t=>{i2=i1(t)},reset:()=>i1(t),compare:iQ(t),snap:(t=>{if(t){let e=new iW(iQ(t)),i=new iW(iQ(t)),n=t=>{let n,r;return{x:(n=t.x,e.addAndReturn(n)),y:(r=t.y,i.addAndReturn(r))}};return n({x:new iV(0),y:new iV(0)}),n}return i0})(t),orient:(e=t?(e,i,n,r,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(r.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):i$(!1),(t,i,n)=>{let r=t.x,o=t.y,s=n.x,a=n.y,l=o.minus(a).times(i.x.minus(s)).minus(r.minus(s).times(i.y.minus(a)));return e(l,r,o,s,a)?0:l.comparedTo(0)})}},i2=i1(),i3=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),i4=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},i8=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),i5=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),i6=t=>i5(t,t).sqrt(),i9=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},i7=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},nt=class t{point;isLeft;segment;otherSE;consumedBy;static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:na.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:+!!t.y.isGreaterThan(e.y)}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw Error("Tried to link already linked events");let e=t.point.events;for(let t=0,i=e.length;t<i;t++){let i=e[t];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let e=0;e<t;e++){let i=this.point.events[e];if(void 0===i.segment.consumedBy)for(let n=e+1;n<t;n++){let t=this.point.events[n];void 0===t.consumedBy&&i.otherSE.point.events===t.otherSE.point.events&&i.segment.consume(t.segment)}}}getAvailableLinkedEvents(){let t=[];for(let e=0,i=this.point.events.length;e<i;e++){let i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let e=new Map,i=i=>{var n,r,o,s,a,l;let h,u,p,c,d=i.otherSE;e.set(i,{sine:(n=this.point,r=t.point,o=d.point,h={x:r.x.minus(n.x),y:r.y.minus(n.y)},i8(u={x:o.x.minus(n.x),y:o.y.minus(n.y)},h).div(i6(u)).div(i6(h))),cosine:(s=this.point,a=t.point,l=d.point,p={x:a.x.minus(s.x),y:a.y.minus(s.y)},i5(c={x:l.x.minus(s.x),y:l.y.minus(s.y)},p).div(i6(c)).div(i6(p)))})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:r,cosine:o}=e.get(t),{sine:s,cosine:a}=e.get(n);return r.isGreaterThanOrEqualTo(0)&&s.isGreaterThanOrEqualTo(0)?o.isLessThan(a)?1:o.isGreaterThan(a)?-1:0:r.isLessThan(0)&&s.isLessThan(0)?o.isLessThan(a)?-1:+!!o.isGreaterThan(a):s.isLessThan(r)?-1:+!!s.isGreaterThan(r)}}},ne=class t{events;poly;_isExteriorRing;_enclosingRing;static factory(e){let i=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];if(!r.isInResult()||r.ringOut)continue;let o=null,s=r.leftSE,a=r.rightSE,l=[s],h=s.point,u=[];for(;o=s,s=a,l.push(s),s.point!==h;)for(;;){let e=s.getAvailableLinkedEvents();if(0===e.length){let t=l[0].point,e=l[l.length-1].point;throw Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){a=e[0].otherSE;break}let n=null;for(let t=0,e=u.length;t<e;t++)if(u[t].point===s.point){n=t;break}if(null!==n){let e=u.splice(n)[0],r=l.splice(e.index);r.unshift(r[0].otherSE),i.push(new t(r.reverse()));continue}u.push({index:l.length,point:s.point});let r=s.getLeftmostComparator(o);a=e.sort(r)[0].otherSE;break}i.push(new t(l))}return i}constructor(t){this.events=t;for(let e=0,i=t.length;e<i;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point,e=[t];for(let i=1,n=this.events.length-1;i<n;i++){let n=this.events[i].point,r=this.events[i+1].point;0!==i2.orient(n,t,r)&&(e.push(n),t=n)}if(1===e.length)return null;let i=e[0],n=e[1];0===i2.orient(i,t,n)&&e.shift(),e.push(e[0]);let r=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,s=this.isExteriorRing()?e.length:-1,a=[];for(let t=o;t!=s;t+=r)a.push([e[t].x.toNumber(),e[t].y.toNumber()]);return a}isExteriorRing(){if(void 0===this._isExteriorRing){let t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let e=1,i=this.events.length;e<i;e++){let i=this.events[e];nt.compare(t,i)>0&&(t=i)}let e=t.segment.prevInResult(),i=e?e.prevInResult():null;for(;;){if(!e)return null;if(!i)return e.ringOut;if(i.ringOut!==e.ringOut)return i.ringOut?.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut?.enclosingRing();i=(e=i.prevInResult())?e.prevInResult():null}}},ni=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let t=0,i=this.interiorRings.length;t<i;t++){let i=this.interiorRings[t].getGeom();null!==i&&e.push(i)}return e}},nn=class{rings;polys;constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}_composePolys(t){let e=[];for(let i=0,n=t.length;i<n;i++){let n=t[i];if(!n.poly)if(n.isExteriorRing())e.push(new ni(n));else{let t=n.enclosingRing();t?.poly||e.push(new ni(t)),t?.poly?.addInterior(n)}}return e}},nr=class{queue;tree;segments;constructor(t,e=na.compare){this.queue=t,this.tree=new iW(e),this.segments=[]}process(t){let e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),i;t.isLeft&&this.tree.add(e);let n=e,r=e;do n=this.tree.lastBefore(n);while(null!=n&&null!=n.consumedBy)do r=this.tree.firstAfter(r);while(null!=r&&null!=r.consumedBy)if(t.isLeft){let o=null;if(n){let t=n.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!n.isAnEndpoint(t))){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}let s=null;if(r){let t=r.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(s=t),!r.isAnEndpoint(t))){let e=this._splitSafely(r,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}if(null!==o||null!==s){let t=null;t=null===o?s:null===s||0>=nt.comparePoints(o,s)?o:s,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let t=0,e=n.length;t<e;t++)i.push(n[t])}i.length>0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&r){let t=n.getIntersection(r);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}if(!r.isAnEndpoint(t)){let e=this._splitSafely(r,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}}this.tree.delete(e)}return i}_splitSafely(t,e){this.tree.delete(t);let i=t.rightSE;this.queue.delete(i);let n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.add(t),n}},no=new class{type;numMultiPolys;run(t,e,i){no.type=t;let n=[new nu(e,!0)];for(let t=0,e=i.length;t<e;t++)n.push(new nu(i[t],!1));if(no.numMultiPolys=n.length,"difference"===no.type){let t=n[0],e=1;for(;e<n.length;)null!==i4(n[e].bbox,t.bbox)?e++:n.splice(e,1)}if("intersection"===no.type)for(let t=0,e=n.length;t<e;t++){let e=n[t];for(let i=t+1,r=n.length;i<r;i++)if(null===i4(e.bbox,n[i].bbox))return[]}let r=new iW(nt.compare);for(let t=0,e=n.length;t<e;t++){let e=n[t].getSweepEvents();for(let t=0,i=e.length;t<i;t++)r.add(e[t])}let o=new nr(r),s=null;for(0!=r.size&&(s=r.first(),r.delete(s));s;){let t=o.process(s);for(let e=0,i=t.length;e<i;e++){let i=t[e];void 0===i.consumedBy&&r.add(i)}0!=r.size?(s=r.first(),r.delete(s)):s=null}return i2.reset(),new nn(ne.factory(o.segments)).getGeom()}},ns=0,na=class t{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(t,e){let i=t.leftSE.point.x,n=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(i))return 1;if(r.isLessThan(n))return -1;let s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,h=e.rightSE.point.y;if(i.isLessThan(n)){if(a.isLessThan(s)&&a.isLessThan(l))return 1;if(a.isGreaterThan(s)&&a.isGreaterThan(l))return -1;let i=t.comparePoint(e.leftSE.point);if(i<0)return 1;if(i>0)return -1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(s.isLessThan(a)&&s.isLessThan(h))return -1;if(s.isGreaterThan(a)&&s.isGreaterThan(h))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(s.isLessThan(a))return -1;if(s.isGreaterThan(a))return 1;if(r.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(r.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return -1}if(!r.eq(o)){let t=l.minus(s),e=r.minus(i),u=h.minus(a),p=o.minus(n);if(t.isGreaterThan(e)&&u.isLessThan(p))return 1;if(t.isLessThan(e)&&u.isGreaterThan(p))return -1}return r.isGreaterThan(o)?1:r.isLessThan(o)||l.isLessThan(h)?-1:l.isGreaterThan(h)?1:t.id<e.id?-1:+(t.id>e.id)}constructor(t,e,i,n){this.id=++ns,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=n}static fromRing(e,i,n){let r,o,s,a=nt.comparePoints(e,i);if(a<0)r=e,o=i,s=1;else if(a>0)r=i,o=e,s=-1;else throw Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);return new t(new nt(r,!0),new nt(o,!1),[n],[s])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return i2.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=i4(e,i);if(null===n)return null;let r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=i3(e,s)&&0===this.comparePoint(s),h=i3(i,r)&&0===t.comparePoint(r),u=i3(e,a)&&0===this.comparePoint(a),p=i3(i,o)&&0===t.comparePoint(o);if(h&&l)return p&&!u?o:!p&&u?a:null;if(h)return u&&r.x.eq(a.x)&&r.y.eq(a.y)?null:r;if(l)return p&&o.x.eq(s.x)&&o.y.eq(s.y)?null:s;if(p&&u)return null;if(p)return o;if(u)return a;let c=((t,e,i,n)=>{if(e.x.isZero())return i7(i,n,t.x);if(n.x.isZero())return i7(t,e,i.x);if(e.y.isZero())return i9(i,n,t.y);if(n.y.isZero())return i9(t,e,i.y);let r=i8(e,n);if(r.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},s=i8(o,e).div(r),a=i8(o,n).div(r),l=t.x.plus(a.times(e.x)),h=i.x.plus(s.times(n.x)),u=t.y.plus(a.times(e.y)),p=i.y.plus(s.times(n.y));return{x:l.plus(h).div(2),y:u.plus(p).div(2)}})(r,this.vector(),s,t.vector());return null!==c&&i3(n,c)?i2.snap(c):null}split(e){let i=[],n=void 0!==e.events,r=new nt(e,!0),o=new nt(e,!1),s=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(r);let a=new t(r,s,this.rings.slice(),this.windings.slice());return nt.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),nt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t<e;t++)this.windings[t]*=-1}consume(e){let i=this,n=e;for(;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let r=t.compare(i,n);if(0!==r){if(r>0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t<e;t++){let e=n.rings[t],r=n.windings[t],o=i.rings.indexOf(e);-1===o?(i.rings.push(e),i.windings.push(r)):i.windings[o]+=r}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys;for(let t=0,n=this.rings.length;t<n;t++){let n=this.rings[t],r=this.windings[t],o=e.indexOf(n);-1===o?(e.push(n),i.push(r)):i[o]+=r}let r=[],o=[];for(let t=0,n=e.length;t<n;t++){if(0===i[t])continue;let n=e[t],s=n.poly;if(-1===o.indexOf(s))if(n.isExterior)r.push(s);else{-1===o.indexOf(s)&&o.push(s);let t=r.indexOf(n.poly);-1!==t&&r.splice(t,1)}}for(let t=0,e=r.length;t<e;t++){let e=r[t].multiPoly;-1===n.indexOf(e)&&n.push(e)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;let t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(no.type){case"union":{let i=0===t.length,n=0===e.length;this._isInResult=i!==n;break}case"intersection":{let i,n;t.length<e.length?(i=t.length,n=e.length):(i=e.length,n=t.length),this._isInResult=n===no.numMultiPolys&&i<n;break}case"xor":{let i=Math.abs(t.length-e.length);this._isInResult=i%2==1;break}case"difference":{let i=t=>1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e)}}return this._isInResult}},nl=class{poly;isExterior;segments;bbox;constructor(t,e,i){if(!Array.isArray(t)||0===t.length||(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1]))throw Error("Input geometry is not a valid Polygon or MultiPolygon");let n=i2.snap({x:new iV(t[0][0]),y:new iV(t[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let e=1,i=t.length;e<i;e++){if("number"!=typeof t[e][0]||"number"!=typeof t[e][1])throw Error("Input geometry is not a valid Polygon or MultiPolygon");let i=i2.snap({x:new iV(t[e][0]),y:new iV(t[e][1])});i.x.eq(r.x)&&i.y.eq(r.y)||(this.segments.push(na.fromRing(r,i,this)),i.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.x),i.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.y),i.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.x),i.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.y),r=i)}n.x.eq(r.x)&&n.y.eq(r.y)||this.segments.push(na.fromRing(r,n,this))}getSweepEvents(){let t=[];for(let e=0,i=this.segments.length;e<i;e++){let i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}},nh=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(t,e){if(!Array.isArray(t))throw Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new nl(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let e=1,i=t.length;e<i;e++){let i=new nl(t[e],this,!1);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.interiorRings.push(i)}this.multiPoly=e}getSweepEvents(){let t=this.exteriorRing.getSweepEvents();for(let e=0,i=this.interiorRings.length;e<i;e++){let i=this.interiorRings[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},nu=class{isSubject;polys;bbox;constructor(t,e){if(!Array.isArray(t))throw Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:new iV(1/0),y:new iV(1/0)},ur:{x:new iV(-1/0),y:new iV(-1/0)}};for(let e=0,i=t.length;e<i;e++){let i=new nh(t[e],this);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.polys.push(i)}this.isSubject=e}getSweepEvents(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}};function np(t){let e={type:"Feature"};return e.geometry=t,e}function nc(t){return"Feature"===t.type?t.geometry:t}function nd(t){return t&&t.geometry&&t.geometry.coordinates?t.geometry.coordinates:t}function n_(t){return np({type:"Polygon",coordinates:t})}function nf(t){return np({type:"MultiPolygon",coordinates:t})}i2.set,eM.Cut=eM.Polygon.extend({initialize(t){this._map=t,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);e._latlngInfos=this._layer._latlngInfo,this.cut(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:t,originalLayer:e})=>{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut))||!(this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{var i,n;let r,o,s,a=!!eV(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return a||e instanceof L.Polyline&&!(e instanceof L.Polygon)?a:(i=t.toGeoJSON(15),n=e.toGeoJSON(15),r=nc(i),o=nc(n),s=((t,...e)=>no.run("intersection",t,e))(r.coordinates,o.coordinates),0!==s.length&&(1===s.length?!!n_(s[0]):!!nf(s)))}catch{return e instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){let t=(n=L.polygon(e.getLatLngs())).getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,r=this._calcClosestLayer(i,[n]);if(r&&r.segment&&r.distance<this.options.snapDistance){let{segment:e}=r;if(e&&2===e.length){let{indexPath:n,parentPath:r,newIndex:o}=L.PM.Utils._getIndexFromSegment(t,e);(n.length>1?(0,iS.default)(t,r):t).splice(o,0,i)}}}})}else n=e;let r=this._cutLayer(t,n),o=L.geoJSON(r,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let s=o.addTo(this._map.pm._getContainingLayer());if(s.pm.enable(e.pm.options),s.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),s.getLayers&&0===s.getLayers().length&&this._map.pm.removeLayer({target:s}),s instanceof L.LayerGroup&&s.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(s),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:s,originalLayer:e})})},_cutLayer(t,e){var i,n,r;let o=L.geoJSON(),s;if(e instanceof L.Polygon){let r,o,a;i=e.toGeoJSON(15),n=t.toGeoJSON(15),r=nc(i),o=nc(n),s=0===(a=((t,...e)=>no.run("difference",t,e))(r.coordinates,o.coordinates)).length?null:1===a.length?n_(a[0]):nf(a)}else{let i,n,a,l,h=((r=e)instanceof L.Polyline&&(r=r.toGeoJSON(15)),a=function t(e){return Array.isArray(e)?1+t(e[0]):-1}(n=nd(r)),l=[],a>1?n.forEach(t=>{l.push(np({type:"LineString",coordinates:t}))}):l.push(r),l);h.forEach(e=>{let i=ia(e,t.toGeoJSON(15));(i&&i.features.length>0?L.geoJSON(i):L.geoJSON(e)).getLayers().forEach(e=>{iT(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(o)})}),s=h.length>1?(i=[],o.eachLayer(t=>{i.push(nd(t.toGeoJSON(15)))}),np({type:"MultiLineString",coordinates:i})):o.toGeoJSON(15)}return s},_change:L.Util.falseFn}),eM.Text=eM.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),this._hintMarker?.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarkerAfterMoving,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t))},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),this.options.textOptions?.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let i=this._createTextIcon(this.textArea),n=new L.Marker(e,{textMarker:!0,_textMarkerOverPM:!0,icon:i});if(this._setPane(n,"markerPane"),this._finishLayer(n),n.pm||(n.options.draggable=!1),n.addTo(this._map.pm._getContainingLayer()),n.pm){n.pm.textArea=this.textArea,L.setOptions(n.pm,{removeIfEmpty:this.options.textOptions?.removeIfEmpty??!0});let t=this.options.textOptions?.focusAfterDraw??!0;n.pm._createTextMarker(t),this.options.textOptions?.text&&n.pm.setText(this.options.textOptions.text)}this._fireCreate(n),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var nm=u(ee());function ng(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function ny(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var nv=L.Class.extend({includes:[{enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,eg(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,eg(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return -1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i={lat:e.lat-this._tempDragCoord.lat,lng:e.lng-this._tempDragCoord.lng},n=t=>t.map(t=>{if(Array.isArray(t))return n(t);let e={lat:t.lat+i.lat,lng:t.lng+i.lng};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=n([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=n([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=n([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=n(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable)).forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))}),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},ek,{_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=ng(this._map,this._rotationOriginLatLng),this._rotationStartPoint=ng(this._map,t.target.getLatLng()),this._initialRotateLatLng=ef(this._layer),this._startAngle=this.getAngle();let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=ng(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,r=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(r,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,nm.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let s=ef(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(r,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let a=180*r/Math.PI,l=(a=a<0?a+360:a)+this._startAngle;this._setAngle(l),this._rotationLayer.pm._setAngle(l),this._fireRotation(this._rotationLayer,a,s),this._fireRotation(this._map,a,s),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=ef(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,r){let o=ng(r,i);return this._matrix=n.clone().rotate(t,o).flip(),function t(e,i,n){var r;let o=n.getMaxZoom();if(o===1/0&&(o=n.getZoom()),L.Util.isArray(e)){let r=[];return e.forEach(e=>{r.push(t(e,i,n))}),r}return e instanceof L.LatLng?(r=o,n.unproject(i.transform(n.project(e,r)),r)):null}(e,this._matrix,r)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){this.options.allowRotation?(this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(ed(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0),this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=ef(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)):this.disableRotate()},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=Math.PI/180*t;this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let r=this.getAngle()-e;r=r<0?r+360:r,this._startAngle=e,this._fireRotation(this._layer,r,i,this._layer),this._fireRotation(this._map||this._layer._map,r,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ea],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},r="";return"move"===t?r="moveVertexValidation":"add"===t?r="addVertexValidation":"remove"===t&&(r="removeVertexValidation"),this.options[r]&&"function"==typeof this.options[r]&&!this.options[r](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});nv.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));let e=t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(e,100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);let i=t=>{t.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(i,100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){return this._map||this._layers.find(t=>!!t._map)?._map||null},getLayers(t=!1,e=!0,i=!0,n=[]){let r=[];return t?this._layerGroup.getLayers().forEach(t=>{r.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),r=r.concat(t.pm.getLayers(!0,!0,!0,n)))}):r=this._layerGroup.getLayers(),i&&(r=r.filter(t=>!(t instanceof L.LayerGroup))),e&&(r=(r=(r=r.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),r},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),nv.Marker=nv.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){(L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this),this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragStart(){this._map.pm.Draw.Marker._layerIsDragging=!0},_onMarkerDragEnd(){this._map.pm.Draw.Marker._layerIsDragging=!1},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var nL=u(ee());nv.Line=nv.extend({includes:[{filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return -1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e<i))},_preventRenderMarkers:!1,_preventRenderingMarkers(t){this._preventRenderMarkers=!!t}}],_shape:"Line",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:("#f00000ff"!==this._layer.options.color?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(t){return this.enabled()?this.disable():this.enable(t),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let t=this._map,e=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(t),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let i=t=>{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let r=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[r])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),r=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(r),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;(e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t))?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),r=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:s,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),l=o.length>1?(0,nL.default)(r,a):r,h=o.length>1?(0,nL.default)(this._markers,a):this._markers;l.splice(s+1,0,n),h.splice(s+1,0,t),this._layer.setLatLngs(r),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e=this._layer,i,n;if(i=!this.options.allowSelfIntersection&&(n=eO(this._layer.toGeoJSON(15))).features.length>0){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return i;t?this._flashLayer():(e.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(n)}else e.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return i},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let s=n.length>1?(0,nL.default)(i,o):i,a=n.length>1?(0,nL.default)(this._markers,o):this._markers,l=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!l&&(s.length<=2||this.isPolygon()&&s.length<=3))return void this._flashLayer();s.splice(r,1),this._layer.setLatLngs(i),this.isPolygon()&&s.length<=2&&s.splice(0,s.length);let h=!1;if(s.length<=1&&(s.splice(0,s.length),o.length>1&&n.length>1&&(i=ep(i)),this._layer.setLatLngs(i),this._initMarkers(),h=!0),eu(i)||this._layer.remove(),i=ep(i),this._layer.setLatLngs(i),this._markers=ep(this._markers),!h&&(a=n.length>1?(0,nL.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),a)){let t,e;if(this.isPolygon()?(t=(r+1)%a.length,e=(r+(a.length-1))%a.length):(e=r-1<0?void 0:r-1,t=r+1>=a.length?void 0:r+1),t!==e){let i=a[e],n=a[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}a.splice(r,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=n.length>1?(0,nL.default)(e,o):e;i.alt=s[r].alt,s.splice(r,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),r=e.length>1?(0,nL.default)(this._markers,n):this._markers,o=(i+1)%r.length,s=(i+(r.length-1))%r.length;return{prevMarker:r[s],nextMarker:r[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)},_onMarkerDragStart(t){let e=t.target;if(this._preventRenderingMarkers(!0),this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,nL.default)(this._markers,r):this._markers,s=(n+1)%o.length,a=(n+(o.length-1))%o.length,l=e.getLatLng(),h=o[a].getLatLng(),u=o[s].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,u);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,h);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(this._preventRenderingMarkers(!1),!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let r=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,r),r){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(t,i);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),nv.Polygon=nv.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)}}),nv.Rectangle=nv.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target;e._oppositeCornerLatLng=this._cornerMarkers.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else console.error("The layer has no LatLngs")},_findCorners(){void 0===this._angle&&this.setInitAngle(ed(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),nv.CircleMarker=nv.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?e=e_(this._map,t,e,this._getMinDistanceInMeter(t)):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(e=e_(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.Circle=nv.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.ImageOverlay=nv.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),nv.Text=nv.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),document.removeEventListener("click",this._documentClickThis,{capture:!0}),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&(this._documentClickThis=this._documentClickThis||this._documentClick.bind(this),document.addEventListener("click",this._documentClickThis,{capture:!0}))},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var nb=function(t,e,i,n,r,o){this._matrix=[t,e,i,n,r,o]};nb.init=()=>new L.PM.Matrix(1,0,0,1,0,0),nb.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){let e,i;return void 0===t?new L.Point(this._matrix[4],this._matrix[5]):("number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i))},scale(t,e){let i,n;return void 0===t?new L.Point(this._matrix[0],this._matrix[3]):(e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y))},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,r,o){let s=[[],[],[]],a=this._matrix,l=[[a[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]],h=[[t,i,r],[e,n,o],[0,0,1]],u;t&&t instanceof L.PM.Matrix&&(h=[[(a=t._matrix)[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]]);for(let t=0;t<3;t+=1)for(let e=0;e<3;e+=1){u=0;for(let i=0;i<3;i+=1)u+=l[t][i]*h[i][e];s[t][e]=u}return this._matrix=[s[0][0],s[1][0],s[0][1],s[1][1],s[0][2],s[1][2]],this}},L.PM=L.PM||{version:"2.19.2",Map:ey,Toolbar:eL,Draw:eM,Edit:nv,Utils:{calcMiddleLatLng(t,e,i){let n=t.project(e),r=t.project(i);return t.unproject(n._add(r)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=(e=(e=e.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)},circleToPolygon(t,e=60,i=!0){let n=ec(t.getLatLng(),t.getRadius(),e,0,i),r=[];for(let t=0;t<n.length;t+=1){let e=[n[t].lat,n[t].lng];r.push(e)}return L.polygon(r,t.options)},disablePopup(t){t.getPopup()&&(t._tempPopupCopy=t.getPopup(),t.unbindPopup())},enablePopup(t){t._tempPopupCopy&&(t.bindPopup(t._tempPopupCopy),delete t._tempPopupCopy)},_fireEvent(t,e,i,n=!1){t.fire(e,i,n);let{groups:r}=this.getAllParentGroups(t);r.forEach(t=>{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let r in t._eventParents)if(-1===e.indexOf(r)){e.push(r);let o=t._eventParents[r];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||new Date().getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:new Date().getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:ec,getTranslation:eh,findDeepCoordIndex(t,e,i=!0){let n,r=t=>(o,s)=>{let a=t.concat(s);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=a,!0}else if(o.lat&&L.latLng(o).equals(e))return n=a,!0;return Array.isArray(o)&&o.some(r(a))};t.some(r([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(r,o)=>{let s=t.concat(o);return r._leaflet_id===e._leaflet_id?(i=s,!0):Array.isArray(r)&&r.some(n(s))};t.some(n([]));let r={};return i&&(r={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),r},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),r=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==r&&(r+=1),{indexA:i,indexB:n,newIndex:r,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let r=ng(n,t),o=ng(n,e),s=i*Math.PI/180,a=Math.cos(s),l=Math.sin(s),h=(o.x-r.x)*a+(o.y-r.y)*l,u=(o.y-r.y)*a-(o.x-r.x)*l,p=h*a+r.x,c=h*l+r.y,d=-u*l+r.x,_=u*a+r.y;return[ny(n,r),ny(n,{x:p,y:c}),ny(n,o),ny(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),r=L.point(n.x+t,n.y);return e.distance(e.unproject(r),i)}},Matrix:nb,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e=this._map.mouseEventToLayerPoint(t),i,n;for(let r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(n=i);n&&(L.DomEvent.fakeStop(t),this._fireEvent([n],t))}}),L.PM.initialize()})()},80094,t=>{"use strict";var e=t.i(43476),i=t.i(32322);t.i(15258),t.i(70462);var n=t.i(71645);function r({members:t,onPolygonChange:r,clearTrigger:o,loadPolygon:s}){let a=(0,n.useRef)(null),l=(0,n.useRef)(null),h=(0,n.useRef)(null),u=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!a.current||l.current)return;let t=i.default.map(a.current).setView([46.5,2.5],6);i.default.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t);let e=i.default.markerClusterGroup();return t.addLayer(e),t.pm&&(t.pm.addControls({position:"topleft",drawCircle:!1,drawCircleMarker:!1,drawMarker:!1,drawPolyline:!1,drawText:!1,editMode:!1,dragMode:!1,cutPolygon:!1,rotateMode:!1}),t.pm.setLang("fr")),t.on("pm:create",e=>{u.current&&t.removeLayer(u.current),u.current=e.layer,r(e.layer.getLatLngs()[0].map(t=>[t.lat,t.lng]))}),t.on("pm:remove",()=>{u.current=null,r(null)}),l.current=t,h.current=e,()=>{t.remove(),l.current=null,h.current=null}},[]),(0,n.useEffect)(()=>{o&&l.current&&u.current&&(l.current.removeLayer(u.current),u.current=null,r(null))},[o]),(0,n.useEffect)(()=>{let t=l.current;if(!t||!s)return;u.current&&(t.removeLayer(u.current),u.current=null);let e=s.coords.map(([t,e])=>i.default.latLng(t,e)),n=i.default.polygon(e,{color:"#3388ff"}).addTo(t);u.current=n,t.fitBounds(n.getBounds(),{padding:[20,20]}),r(s.coords)},[s]),(0,n.useEffect)(()=>{let e=h.current;if(!e)return;e.clearLayers();let n=t.map(t=>i.default.circleMarker([t.lat,t.lon],{radius:6,color:"#f59e0b",fillColor:"#f59e0b",fillOpacity:.7}).bindPopup(`<strong>${t.title||t.pubkey.slice(0,8)}</strong>${t.city?"<br>"+t.city:""}`));e.addLayers(n)},[t]),(0,e.jsx)("div",{ref:a,style:{height:"500px",width:"100%",borderRadius:"0.75rem"}})}t.s(["default",()=>r])},5618,t=>{t.n(t.i(80094))}]);