1/* @preserve 2 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com 3 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 4 */(function($,vt){typeof exports=="object"&&typeof module<"u"?vt(exports):typeof define=="function"&&define.amd?define(["exports"],vt):vt(($=typeof globalThis<"u"?globalThis:$||self).leaflet={})})(this,function($){"use strict";function vt(t){for(var n,s,l=1,c=arguments.length;l<c;l++)for(n in s=arguments[l])t[n]=s[n];return t}var ui=Object.create||function(t){return _.prototype=t,new _};function _(){}function y(t,n){var s,l=Array.prototype.slice;return t.bind?t.bind.apply(t,l.call(arguments,1)):(s=l.call(arguments,2),function(){return t.apply(n,s.length?s.concat(l.call(arguments)):arguments)})}var M=0;function v(t){return"_leaflet_id"in t||(t._leaflet_id=++M),t._leaflet_id}function j(t,n,s){var l,c,g=function(){l=!1,c&&(A.apply(s,c),c=!1)},A=function(){l?c=arguments:(t.apply(s,arguments),setTimeout(g,n),l=!0)};return A}function H(t,c,s){var l=c[1],c=c[0],g=l-c;return t===l&&s?t:((t-c)%g+g)%g+c}function U(){return!1}function tt(t,n){return n===!1?t:(n=Math.pow(10,n===void 0?6:n),Math.round(t*n)/n)}function rt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function it(t){return rt(t).split(/\s+/)}function lt(t,n){for(var s in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?ui(t.options):{}),n)t.options[s]=n[s];return t.options}function Jt(t,n,s){var l,c=[];for(l in t)c.push(encodeURIComponent(s?l.toUpperCase():l)+"="+encodeURIComponent(t[l]));return(n&&n.indexOf("?")!==-1?"&":"?")+c.join("&")}var Mt=/\{ *([\w_ -]+) *\}/g;function $t(t,n){return t.replace(Mt,function(s,l){if(l=n[l],l===void 0)throw new Error("No value provided for variable "+s);return l=typeof l=="function"?l(n):l})}var It=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function he(t,n){for(var s=0;s<t.length;s++)if(t[s]===n)return s;return-1}var re="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function bi(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var vn=0;function He(t){var n=+new Date,s=Math.max(0,16-(n-vn));return vn=n+s,window.setTimeout(t,s)}var Ci=window.requestAnimationFrame||bi("RequestAnimationFrame")||He,nr=window.cancelAnimationFrame||bi("CancelAnimationFrame")||bi("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function te(t,n,s){if(!s||Ci!==He)return Ci.call(window,y(t,n));t.call(n)}function Kt(t){t&&nr.call(window,t)}var Ke={__proto__:null,extend:vt,create:ui,bind:y,get lastId(){return M},stamp:v,throttle:j,wrapNum:H,falseFn:U,formatNum:tt,trim:rt,splitWords:it,setOptions:lt,getParamString:Jt,template:$t,isArray:It,indexOf:he,emptyImageUrl:re,requestFn:Ci,cancelFn:nr,requestAnimFrame:te,cancelAnimFrame:Kt};function fe(){}fe.extend=function(t){function n(){lt(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var s,l=n.__super__=this.prototype,c=ui(l);for(s in(c.constructor=n).prototype=c,this)Object.prototype.hasOwnProperty.call(this,s)&&s!=="prototype"&&s!=="__super__"&&(n[s]=this[s]);if(t.statics&&vt(n,t.statics),t.includes){var g=t.includes;if(typeof L<"u"&&L&&L.Mixin){g=It(g)?g:[g];for(var A=0;A<g.length;
vendor: 15,807 bytes, line 4
4A++)g[A]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}vt.apply(null,[c].concat(t.includes))}return vt(c,t),delete c.statics,delete c.includes,c.options&&(c.options=l.options?ui(l.options):{},vt(c.options,t.options)),c._initHooks=[],c.callInitHooks=function(){if(!this._initHooksCalled){l.callInitHooks&&l.callInitHooks.call(this),this._initHooksCalled=!0;for(var P=0,V=c._initHooks.length;P<V;P++)c._initHooks[P].call(this)}},n},fe.include=function(t){var n=this.prototype.options;return vt(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},fe.mergeOptions=function(t){return vt(this.prototype.options,t),this},fe.addInitHook=function(t){var n=Array.prototype.slice.call(arguments,1),s=typeof t=="function"?t:function(){this[t].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};var oe={on:function(t,n,s){if(typeof t=="object")for(var l in t)this._on(l,t[l],n);else for(var c=0,g=(t=it(t)).length;c<g;c++)this._on(t[c],n,s);return this},off:function(t,n,s){if(arguments.length)if(typeof t=="object")for(var l in t)this._off(l,t[l],n);else{t=it(t);for(var c=arguments.length===1,g=0,A=t.length;g<A;g++)c?this._off(t[g]):this._off(t[g],n,s)}else delete this._events;return this},_on:function(t,n,s,l){typeof n!="function"?console.warn("wrong listener type: "+typeof n):this._listens(t,n,s)===!1&&(n={fn:n,ctx:s=s===this?void 0:s},l&&(n.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(n))},_off:function(t,n,s){var l,c,g;if(this._events&&(l=this._events[t]))if(arguments.length===1){if(this._firingCount)for(c=0,g=l.length;c<g;c++)l[c].fn=U;delete this._events[t]}else typeof n!="function"?console.warn("wrong listener type: "+typeof n):(n=this._listens(t,n,s))!==!1&&(s=l[n],this._firingCount&&(s.fn=U,this._events[t]=l=l.slice()),l.splice(n,1))},fire:function(t,n,s){if(this.listens(t,s)){var l=vt({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var c=this._events[t];if(c){this._firingCount=this._firingCount+1||1;for(var g=0,A=c.length;g<A;g++){var P=c[g],V=P.fn;P.once&&this.off(t,V,P.ctx),V.call(P.ctx||this,l)}this._firingCount--}}s&&this._propagateEvent(l)}return this},listens:function(t,n,s,l){typeof t!="string"&&console.warn('"string" type argument expected');var c=n,g=(typeof n!="function"&&(l=!!n,s=c=void 0),this._events&&this._events[t]);if(g&&g.length&&this._listens(t,c,s)!==!1)return!0;if(l){for(var A in this._eventParents)if(this._eventParents[A].listens(t,n,s,l))return!0}return!1},_listens:function(t,n,s){if(this._events){var l=this._events[t]||[];if(!n)return!!l.length;s===this&&(s=void 0);for(var c=0,g=l.length;c<g;c++)if(l[c].fn===n&&l[c].ctx===s)return c}return!1},once:function(t,n,s){if(typeof t=="object")for(var l in t)this._on(l,t[l],n,!0);else for(var c=0,g=(t=it(t)).length;c<g;c++)this._on(t[c],n,s,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[v(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[v(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,vt({layer:t.target,propagatedFrom:t.target},t),!0)}},xi=(oe.addEventListener=oe.on,oe.removeEventListener=oe.clearAllEventListeners=oe.off,oe.addOneTimeEventListener=oe.once,oe.fireEvent=oe.fire,oe.hasEventListeners=oe.listens,fe.extend(oe));function pt(t,n,s){this.x=s?Math.round(t):t,this.y=s?Math.round(n):n}var rr=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function ht(t,n,s){return t instanceof pt?t:It(t)?new pt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new pt(t.x,t.y):new pt(t,n,s)}function St(t,n){if(t)for(var s=n?[t,n]:t,l=0,c=s.length;l<c;l++)this.extend(s[l])}function Qt(t,n){return!t||t instanceof St?t:new St(t,n)}function Zt(t,n){if(t)for(var s=n?[t,n]:t,l=0,c=s.length;l<c;l++)this.extend(s[l])}function zt(t,n){return t instanceof Zt?t:new Zt(t,n)}function wt(t,n,s){if(isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n,s!==void 0&&(this.alt=+s)}function Lt(t,n,s){return t instanceof wt?t:It(t)&&typeof t[0]!="object"?t.length===3?new wt(t[0],t[1],t[2]):t.length===2?new wt(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new wt(t.lat,"lng"in t?t.lng:t.lon,t.alt):n===void 0?null:new wt(t,n,s)}pt.prototype={clone:function(){return new pt(this.x,this.y)},add:function(t){return this.clone()._add(ht(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(ht(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 pt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new pt(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=rr(this.x),this.y=rr(this.y),this},distanceTo:function(s){var n=(s=ht(s)).x-this.x,s=s.y-this.y;return Math.sqrt(n*n+s*s)},equals:function(t){return(t=ht(t)).x===this.x&&t.y===this.y},contains:function(t){return t=ht(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+tt(this.x)+", "+tt(this.y)+")"}},St.prototype={extend:function(t){var n,s;if(t){if(t instanceof pt||typeof t[0]=="number"||"x"in t)n=s=ht(t);else if(n=(t=Qt(t)).min,s=t.max,!n||!s)return this;this.min||this.max?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)):(this.min=n.clone(),this.max=s.clone())}return this},getCenter:function(t){return ht((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return ht(this.min.x,this.max.y)},getTopRight:function(){return ht(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 n,s;return(t=(typeof t[0]=="number"||t instanceof pt?ht:Qt)(t))instanceof St?(n=t.min,s=t.max):n=s=t,n.x>=this.min.x&&s.x<=this.max.x&&n.y>=this.min.y&&s.y<=this.max.y},intersects:function(g){g=Qt(g);var n=this.min,s=this.max,l=g.min,g=g.max,c=g.x>=n.x&&l.x<=s.x,g=g.y>=n.y&&l.y<=s.y;return c&&g},overlaps:function(g){g=Qt(g);var n=this.min,s=this.max,l=g.min,g=g.max,c=g.x>n.x&&l.x<s.x,g=g.y>n.y&&l.y<s.y;return c&&g},isValid:function(){return!(!this.min||!this.max)},pad:function(c){var n=this.min,s=this.max,l=Math.abs(n.x-s.x)*c,c=Math.abs(n.y-s.y)*c;return Qt(ht(n.x-l,n.y-c),ht(s.x+l,s.y+c))},equals:function(t){return!!t&&(t=Qt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},Zt.prototype={extend:function(t){var n,s,l=this._southWest,c=this._northEast;if(t instanceof wt)s=n=t;else{if(!(t instanceof Zt))return t?this.extend(Lt(t)||zt(t)):this;if(n=t._southWest,s=t._northEast,!n||!s)return this}return l||c?(l.lat=Math.min(n.lat,l.lat),l.lng=Math.min(n.lng,l.lng),c.lat=Math.max(s.lat,c.lat),c.lng=Math.max(s.lng,c.lng)):(this._southWest=new wt(n.lat,n.lng),this._northEast=new wt(s.lat,s.lng)),this},pad:function(c){var n=this._southWest,s=this._northEast,l=Math.abs(n.lat-s.lat)*c,c=Math.abs(n.lng-s.lng)*c;return new Zt(new wt(n.lat-l,n.lng-c),new wt(s.lat+l,s.lng+c))},getCenter:function(){return new wt((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 wt(this.getNorth(),this.getWest())},getSouthEast:function(){return new wt(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=(typeof t[0]=="number"||t instanceof wt||"lat"in t?Lt:zt)(t);var n,s,l=this._southWest,c=this._northEast;return t instanceof Zt?(n=t.getSouthWest(),s=t.getNorthEast()):n=s=t,n.lat>=l.lat&&s.lat<=c.lat&&n.lng>=l.lng&&s.lng<=c.lng},intersects:function(g){g=zt(g);var n=this._southWest,s=this._northEast,l=g.getSouthWest(),g=g.getNorthEast(),c=g.lat>=n.lat&&l.lat<=s.lat,g=g.lng>=n.lng&&l.lng<=s.lng;return c&&g},overlaps:function(g){g=zt(g);var n=this._southWest,s=this._northEast,l=g.getSouthWest(),g=g.getNorthEast(),c=g.lat>n.lat&&l.lat<s.lat,g=g.lng>n.lng&&l.lng<s.lng;return c&&g},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,n){return!!t&&(t=zt(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n))},isValid:function(){return!(!this._southWest||!this._northEast)}};var Pe={latLngToPoint:function(t,n){return t=this.projection.project(t),n=this.scale(n),this.transformation._transform(t,n)},pointToLatLng:function(t,n){return n=this.scale(n),t=this.transformation.untransform(t,n),this.projection.unproject(t)},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){var n;return this.infinite?null:(n=this.projection.bounds,t=this.scale(t),new St(this.transformation.transform(n.min,t),this.transformation.transform(n.max,t)))},infinite:!(wt.prototype={equals:function(t,n){return!!t&&(t=Lt(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(n===void 0?1e-9:n))},toString:function(t){return"LatLng("+tt(this.lat,t)+", "+tt(this.lng,t)+")"},distanceTo:function(t){return Re.distance(this,Lt(t))},wrap:function(){return Re.wrapLatLng(this)},toBounds:function(n){var n=180*n/40075017,s=n/Math.cos(Math.PI/180*this.lat);return zt([this.lat-n,this.lng-s],[this.lat+n,this.lng+s])},clone:function(){return new wt(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var n=this.wrapLng?H(t.lng,this.wrapLng,!0):t.lng;return new wt(this.wrapLat?H(t.lat,this.wrapLat,!0):t.lat,n,t.alt)},wrapLatLngBounds:function(t){var l=t.getCenter(),n=this.wrapLatLng(l),s=l.lat-n.lat,l=l.lng-n.lng;return s==0&&l==0?t:(n=t.getSouthWest(),t=t.getNorthEast(),new Zt(new wt(n.lat-s,n.lng-l),new wt(t.lat-s,t.lng-l)))}},Re=vt({},Pe,{wrapLng:[-180,180],R:6371e3,distance:function(A,g){var P=Math.PI/180,s=A.lat*P,l=g.lat*P,c=Math.sin((g.lat-A.lat)*P/2),g=Math.sin((g.lng-A.lng)*P/2),A=c*c+Math.cos(s)*Math.cos(l)*g*g,P=2*Math.atan2(Math.sqrt(A),Math.sqrt(1-A));return this.R*P}}),ye=6378137,ye={R:ye,MAX_LATITUDE:85.0511287798,project:function(t){var n=Math.PI/180,s=this.MAX_LATITUDE,s=Math.max(Math.min(s,t.lat),-s),s=Math.sin(s*n);return new pt(this.R*t.lng*n,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var n=180/Math.PI;return new wt((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*n,t.x*n/this.R)},bounds:new St([-(ye=ye*Math.PI),-ye],[ye,ye])};function Ln(t,n,s,l){It(t)?(this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3]):(this._a=t,this._b=n,this._c=s,this._d=l)}function ki(t,n,s,l){return new Ln(t,n,s,l)}Ln.prototype={transform:function(t,n){return this._transform(t.clone(),n)},_transform:function(t,n){return t.x=(n=n||1)*(this._a*t.x+this._b),t.y=n*(this._c*t.y+this._d),t},untransform:function(t,n){return new pt((t.x/(n=n||1)-this._b)/this._a,(t.y/n-this._d)/this._c)}};var Ie=vt({},Re,{code:"EPSG:3857",projection:ye,transformation:ki(Ie=.5/(Math.PI*ye.R),.5,-Ie,.5)}),Jr=vt({},Ie,{code:"EPSG:900913"});function or(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function sr(t,n){for(var s,l,c,g,A="",P=0,V=t.length;P<V;P++){for(s=0,l=(c=t[P]).length;s<l;s++)A+=(s?"L":"M")+(g=c[s]).x+" "+g.y;A+=n?ut.svg?"z":"x":""}return A||"M0 0"}var xe=document.documentElement.style,li="ActiveXObject"in window,Nn=li&&!document.addEventListener,se="msLaunchUri"in navigator&&!("documentMode"in document),Ri=ve("webkit"),tn=ve("android"),en=ve("android 2")||ve("android 3"),Qe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Qe=tn&&ve("Google")&&Qe<537&&!("AudioNode"in window),ti=!!window.opera,nn=!se&&ve("chrome"),Mi=ve("gecko")&&!Ri&&!ti&&!li,Vn=!nn&&ve("safari"),rn=ve("phantom"),ee="OTransition"in xe,wi=navigator.platform.indexOf("Win")===0,hn=li&&"transition"in xe,Ui="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!en,xe="MozPerspective"in xe,_n=!window.L_DISABLE_3D&&(hn||Ui||xe)&&!ee&&!rn,Oe=typeof orientation<"u"||ve("mobile"),mn=Oe&&Ri,oi=Oe&&Ui,je=!window.PointerEvent&&window.MSPointerEvent,Ge=!(!window.PointerEvent&&!je),ar="ontouchstart"in window||!!window.TouchEvent,ur=!window.L_NO_TOUCH&&(ar||Ge),bn=Oe&&ti,lr=Oe&&Mi,$r=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Qr=(function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",U,n),window.removeEventListener("testPassiveEventSupport",U,n)}catch{}return t})(),to=!!document.createElement("canvas").getContext,Cn=!(!document.createElementNS||!or("svg").createSVGRect),qi=!!Cn&&((qi=document.createElement("div")).innerHTML="<svg/>",(qi.firstChild&&qi.firstChild.namespaceURI)==="http://www.w3.org/2000/svg");function ve(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var ut={ie:li,ielt9:Nn,edge:se,webkit:Ri,android:tn,android23:en,androidStock:Qe,opera:ti,chrome:nn,gecko:Mi,safari:Vn,phantom:rn,opera12:ee,win:wi,ie3d:hn,webkit3d:Ui,gecko3d:xe,any3d:_n,mobile:Oe,mobileWebkit:mn,mobileWebkit3d:oi,msPointer:je,pointer:Ge,touch:ur,touchNative:ar,mobileOpera:bn,mobileGecko:lr,retina:$r,passiveEvents:Qr,canvas:to,svg:Cn,vml:!Cn&&(function(){try{var t=document.createElement("div"),n=(t.innerHTML='<v:shape adj="1"/>',t.firstChild);return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),inlineSvg:qi,mac:navigator.platform.indexOf("Mac")===0,linux:navigator.platform.indexOf("Linux")===0},hr=ut.msPointer?"MSPointerDown":"pointerdown",pr=ut.msPointer?"MSPointerMove":"pointermove",xn=ut.msPointer?"MSPointerUp":"pointerup",kn=ut.msPointer?"MSPointerCancel":"pointercancel",Mn={touchstart:hr,touchmove:pr,touchend:xn,touchcancel:kn},qe={touchstart:function(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Ut(n),Wi(t,n)},touchmove:Wi,touchend:Wi,touchcancel:Wi},hi={},wn=!1;function Ei(t,n,s){return n!=="touchstart"||wn||(document.addEventListener(hr,cr,!0),document.addEventListener(pr,En,!0),document.addEventListener(xn,dr,!0),document.addEventListener(kn,dr,!0),wn=!0),qe[n]?(s=qe[n].bind(this,s),t.addEventListener(Mn[n],s,!1),s):(console.warn("wrong event specified:",n),U)}function cr(t){hi[t.pointerId]=t}function En(t){hi[t.pointerId]&&(hi[t.pointerId]=t)}function dr(t){delete hi[t.pointerId]}function Wi(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){for(var s in n.touches=[],hi)n.touches.push(hi[s]);n.changedTouches=[n],t(n)}}var _r=200;function eo(t,n){t.addEventListener("dblclick",n);var s,l=0;function c(g){var A;
4g.detail!==1?s=g.detail:g.pointerType==="mouse"||g.sourceCapabilities&&!g.sourceCapabilities.firesTouchEvents||(A=yr(g)).some(function(P){return P instanceof HTMLLabelElement&&P.attributes.for})&&!A.some(function(P){return P instanceof HTMLInputElement||P instanceof HTMLSelectElement})||((A=Date.now())-l<=_r?++s===2&&n((function(P){var V,Q,ot={};for(Q in P)V=P[Q],ot[Q]=V&&V.bind?V.bind(P):V;return(P=ot).type="dblclick",ot.detail=2,ot.isTrusted=!1,ot._simulated=!0,ot})(g)):s=1,l=A)}return t.addEventListener("click",c),{dblclick:n,simDblclick:c}}var Bn,pi,Bi,Pi,Ai,Pn,An=$i(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Di=$i(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Dn=Di==="webkitTransition"||Di==="OTransition"?Di+"End":"transitionend";function mr(t){return typeof t=="string"?document.getElementById(t):t}function Si(t,n){var s=t.style[n]||t.currentStyle&&t.currentStyle[n];return(s=s&&s!=="auto"||!document.defaultView?s:(t=document.defaultView.getComputedStyle(t,null))?t[n]:null)==="auto"?null:s}function Ct(t,n,s){return t=document.createElement(t),t.className=n||"",s&&s.appendChild(t),t}function Tt(t){var n=t.parentNode;n&&n.removeChild(t)}function Yi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ci(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function di(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function Xi(t,n){return t.classList!==void 0?t.classList.contains(n):0<(t=Ji(t)).length&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(t)}function yt(t,n){var s;if(t.classList!==void 0)for(var l=it(n),c=0,g=l.length;c<g;c++)t.classList.add(l[c]);else Xi(t,n)||Sn(t,((s=Ji(t))?s+" ":"")+n)}function Ft(t,n){t.classList!==void 0?t.classList.remove(n):Sn(t,rt((" "+Ji(t)+" ").replace(" "+n+" "," ")))}function Sn(t,n){t.className.baseVal===void 0?t.className=n:t.className.baseVal=n}function Ji(t){return(t=t.correspondingElement?t.correspondingElement:t).className.baseVal===void 0?t.className:t.className.baseVal}function pe(t,n){if("opacity"in t.style)t.style.opacity=n;else if("filter"in t.style){var s=!1,l="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(l)}catch{if(n===1)return}n=Math.round(100*n),s?(s.Enabled=n!==100,s.Opacity=n):t.style.filter+=" progid:"+l+"(opacity="+n+")"}}function $i(t){for(var n=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in n)return t[s];return!1}function We(t,n,s){n=n||new pt(0,0),t.style[An]=(ut.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(s?" scale("+s+")":"")}function Nt(t,n){t._leaflet_pos=n,ut.any3d?We(t,n):(t.style.left=n.x+"px",t.style.top=n.y+"px")}function Ye(t){return t._leaflet_pos||new pt(0,0)}function Ti(){ct(window,"dragstart",Ut)}function Oi(){Bt(window,"dragstart",Ut)}function Tn(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Qi(),Pn=(Ai=t).style.outlineStyle,t.style.outlineStyle="none",ct(window,"keydown",Qi))}function Qi(){Ai&&(Ai.style.outlineStyle=Pn,Pn=Ai=void 0,Bt(window,"keydown",Qi))}function fr(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function On(t){var n=t.getBoundingClientRect();return{x:n.width/t.offsetWidth||1,y:n.height/t.offsetHeight||1,boundingClientRect:n}}Pi="onselectstart"in document?(Bi=function(){ct(window,"selectstart",Ut)},function(){Bt(window,"selectstart",Ut)}):(pi=$i(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Bi=function(){var t;pi&&(t=document.documentElement.style,Bn=t[pi],t[pi]="none")},function(){pi&&(document.documentElement.style[pi]=Bn,Bn=void 0)}),li={__proto__:null,TRANSFORM:An,TRANSITION:Di,TRANSITION_END:Dn,get:mr,getStyle:Si,create:Ct,remove:Tt,empty:Yi,toFront:ci,toBack:di,hasClass:Xi,addClass:yt,removeClass:Ft,setClass:Sn,getClass:Ji,setOpacity:pe,testProp:$i,setTransform:We,setPosition:Nt,getPosition:Ye,get disableTextSelection(){return Bi},get enableTextSelection(){return Pi},disableImageDrag:Ti,enableImageDrag:Oi,preventOutline:Tn,restoreOutline:Qi,getSizedParentNode:fr,getScale:On};function ct(t,n,s,l){if(n&&typeof n=="object")for(var c in n)Rn(t,c,n[c],s);else for(var g=0,A=(n=it(n)).length;g<A;g++)Rn(t,n[g],s,l);return this}var Le="_leaflet_events";function Bt(t,n,s,l){if(arguments.length===1)gr(t),delete t[Le];else if(n&&typeof n=="object")for(var c in n)_i(t,c,n[c],s);else if(n=it(n),arguments.length===2)gr(t,function(P){return he(n,P)!==-1});else for(var g=0,A=n.length;g<A;g++)_i(t,n[g],s,l);return this}function gr(t,n){for(var s in t[Le]){var l=s.split(/\d/)[0];n&&!n(l)||_i(t,l,null,null,s)}}
vendor: 4,322 bytes, line 4
4var Fn={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Rn(t,n,s,l){var c,g,A=n+v(s)+(l?"_"+v(l):"");t[Le]&&t[Le][A]||(g=c=function(P){return s.call(l||t,P||window.event)},!ut.touchNative&&ut.pointer&&n.indexOf("touch")===0?c=Ei(t,n,c):ut.touch&&n==="dblclick"?c=eo(t,c):"addEventListener"in t?n==="touchstart"||n==="touchmove"||n==="wheel"||n==="mousewheel"?t.addEventListener(Fn[n]||n,c,!!ut.passiveEvents&&{passive:!1}):n==="mouseenter"||n==="mouseleave"?t.addEventListener(Fn[n],c=function(P){P=P||window.event,zn(t,P)&&g(P)},!1):t.addEventListener(n,g,!1):t.attachEvent("on"+n,c),t[Le]=t[Le]||{},t[Le][A]=c)}function _i(t,n,P,l,c){c=c||n+v(P)+(l?"_"+v(l):"");var g,A,P=t[Le]&&t[Le][c];P&&(!ut.touchNative&&ut.pointer&&n.indexOf("touch")===0?(l=t,A=P,Mn[g=n]?l.removeEventListener(Mn[g],A,!1):console.warn("wrong event specified:",g)):ut.touch&&n==="dblclick"?(l=P,(A=t).removeEventListener("dblclick",l.dblclick),A.removeEventListener("click",l.simDblclick)):"removeEventListener"in t?t.removeEventListener(Fn[n]||n,P,!1):t.detachEvent("on"+n,P),t[Le][c]=null)}function Xe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function In(t){return Rn(t,"wheel",Xe),this}function mi(t){return ct(t,"mousedown touchstart dblclick contextmenu",Xe),t._leaflet_disable_click=!0,this}function Ut(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Je(t){return Ut(t),Xe(t),this}function yr(t){if(t.composedPath)return t.composedPath();for(var n=[],s=t.target;s;)n.push(s),s=s.parentNode;return n}function vr(t,n){var s,l;return n?(l=(s=On(n)).boundingClientRect,new pt((t.clientX-l.left)/s.x-n.clientLeft,(t.clientY-l.top)/s.y-n.clientTop)):new pt(t.clientX,t.clientY)}var io=ut.linux&&ut.chrome?window.devicePixelRatio:ut.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function Lr(t){return ut.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/io:t.deltaY&&t.deltaMode===1?20*-t.deltaY:t.deltaY&&t.deltaMode===2?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function zn(t,n){var s=n.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch{return!1}return s!==t}var Nn={__proto__:null,on:ct,off:Bt,stopPropagation:Xe,disableScrollPropagation:In,disableClickPropagation:mi,preventDefault:Ut,stop:Je,getPropagationPath:yr,getMousePosition:vr,getWheelDelta:Lr,isExternalTarget:zn,addListener:ct,removeListener:Bt},br=xi.extend({run:function(t,n,s,l){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(l||.5,.2),this._startPos=Ye(t),this._offset=n.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=te(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,s=1e3*this._duration;n<s?this._runFrame(this._easeOut(n/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,n){t=this._startPos.add(this._offset.multiplyBy(t)),n&&t._round(),Nt(this._el,t),this.fire("step")},_complete:function(){Kt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),bt=xi.extend({options:{crs:Ie,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,n){n=lt(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=y(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.zoom!==void 0&&(this._zoom=this._limitZoom(n.zoom)),n.center&&n.zoom!==void 0&&this.setView(Lt(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Di&&ut.any3d&&!ut.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ct(this._proxy,Dn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
4,setView:function(t,n,s){return n=n===void 0?this._zoom:this._limitZoom(n),t=this._limitCenter(Lt(t),n,this.options.maxBounds),s=s||{},this._stop(),this._loaded&&!s.reset&&s!==!0&&(s.animate!==void 0&&(s.zoom=vt({animate:s.animate},s.zoom),s.pan=vt({animate:s.animate,duration:s.duration},s.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,s.zoom):this._tryAnimatedPan(t,s.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n,s.pan&&s.pan.noMoveStart),this)},setZoom:function(t,n){return this._loaded?this.setView(this.getCenter(),t,{zoom:n}):(this._zoom=t,this)},zoomIn:function(t,n){return t=t||(ut.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,n)},zoomOut:function(t,n){return t=t||(ut.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,n)},setZoomAround:function(c,n,s){var g=this.getZoomScale(n),l=this.getSize().divideBy(2),c=(c instanceof pt?c:this.latLngToContainerPoint(c)).subtract(l).multiplyBy(1-1/g),g=this.containerPointToLatLng(l.add(c));return this.setView(g,n,{zoom:s})},_getBoundsCenterZoom:function(t,n){n=n||{},t=t.getBounds?t.getBounds():zt(t);var s=ht(n.paddingTopLeft||n.padding||[0,0]),l=ht(n.paddingBottomRight||n.padding||[0,0]),c=this.getBoundsZoom(t,!1,s.add(l));return(c=typeof n.maxZoom=="number"?Math.min(n.maxZoom,c):c)===1/0?{center:t.getCenter(),zoom:c}
vendor: 7,026 bytes, line 4
4:(n=l.subtract(s).divideBy(2),l=this.project(t.getSouthWest(),c),s=this.project(t.getNorthEast(),c),{center:this.unproject(l.add(s).divideBy(2).add(n),c),zoom:c})},fitBounds:function(t,n){if((t=zt(t)).isValid())return t=this._getBoundsCenterZoom(t,n),this.setView(t.center,t.zoom,n);throw new Error("Bounds are not valid.")},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,n){return this.setView(t,this._zoom,{pan:n})},panBy:function(t,n){var s;return n=n||{},(t=ht(t).round()).x||t.y?(n.animate===!0||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new br,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),n.animate!==!1?(yt(this._mapPane,"leaflet-pan-anim"),s=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,s,n.duration||.25,n.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend")},flyTo:function(t,n,s){if((s=s||{}).animate===!1||!ut.any3d)return this.setView(t,n,s);this._stop();var l=this.project(this.getCenter()),c=this.project(t),g=this.getSize(),A=this._zoom,P=(t=Lt(t),n=n===void 0?A:n,Math.max(g.x,g.y)),V=P*this.getZoomScale(A,n),Q=c.distanceTo(l)||1,ot=1.42,mt=ot*ot;function ft(kt){return kt=(V*V-P*P+(kt?-1:1)*mt*mt*Q*Q)/(2*(kt?V:P)*mt*Q),kt=Math.sqrt(kt*kt+1)-kt,kt<1e-9?-18:Math.log(kt)}function At(kt){return(Math.exp(kt)-Math.exp(-kt))/2}function Ot(kt){return(Math.exp(kt)+Math.exp(-kt))/2}var Vt=ft(0);function ae(kt){return P*(Ot(Vt)*(At(kt=Vt+ot*kt)/Ot(kt))-At(Vt))/mt}var Ir=Date.now(),zr=(ft(1)-Vt)/ot,no=s.duration?1e3*s.duration:1e3*zr*.8;return this._moveStart(!0,s.noMoveStart),function kt(){var ke=(Date.now()-Ir)/no,Vi=(1-Math.pow(1-ke,1.5))*zr;ke<=1?(this._flyToFrame=te(kt,this),this._move(this.unproject(l.add(c.subtract(l).multiplyBy(ae(Vi)/Q)),A),this.getScaleZoom(P/(ke=Vi,P*(Ot(Vt)/Ot(Vt+ot*ke))),A),{flyTo:!0})):this._move(t,n)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,n){return t=this._getBoundsCenterZoom(t,n),this.flyTo(t.center,t.zoom,n)},setMaxBounds:function(t){return t=zt(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 n=this.options.minZoom;return this.options.minZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var n=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(l,n){this._enforcingBounds=!0;var s=this.getCenter(),l=this._limitCenter(s,this._zoom,zt(l));return s.equals(l)||this.panTo(l,n),this._enforcingBounds=!1,this},panInside:function(c,n){var g=ht((n=n||{}).paddingTopLeft||n.padding||[0,0]),s=ht(n.paddingBottomRight||n.padding||[0,0]),l=this.project(this.getCenter()),c=this.project(c),A=this.getPixelBounds(),g=Qt([A.min.add(g),A.max.subtract(s)]),A=g.getSize();return g.contains(c)||(this._enforcingBounds=!0,s=c.subtract(g.getCenter()),g=g.extend(c).getSize().subtract(A),l.x+=s.x<0?-g.x:g.x,l.y+=s.y<0?-g.y:g.y,this.panTo(this.unproject(l),n),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=vt({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize(),s=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),c=n.divideBy(2).round(),l=s.divideBy(2).round(),c=c.subtract(l);return c.x||c.y?(t.animate&&t.pan?this.panBy(c):(t.pan&&this._rawPanBy(c),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(y(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var n,s;return t=this._locateOptions=vt({timeout:1e4,watch:!1},t),"geolocation"in navigator?(n=y(this._handleGeolocationResponse,this),s=y(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var n;this._container._leaflet_id&&(n=t.code,t=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n,s,l=new wt(t.coords.latitude,t.coords.longitude),c=l.toBounds(2*t.coords.accuracy),g=this._locateOptions,A=(g.setView&&(n=this.getBoundsZoom(c),this.setView(l,g.maxZoom?Math.min(n,g.maxZoom):n)),{latlng:l,bounds:c,timestamp:t.timestamp});for(s in t.coords)typeof t.coords[s]=="number"&&(A[s]=t.coords[s]);this.fire("locationfound",A)}},addHandler:function(t,n){return n&&(n=this[t]=new n(this),this._handlers.push(n),this.options[t]&&n.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Tt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Kt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)Tt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){return n=Ct("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n||this._mapPane),t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Zt(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZo
vendor: 6,238 bytes, line 4
4om===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(V,n,P){V=zt(V),P=ht(P||[0,0]);var Q=this.getZoom()||0,l=this.getMinZoom(),c=this.getMaxZoom(),g=V.getNorthWest(),V=V.getSouthEast(),P=this.getSize().subtract(P),V=Qt(this.project(V,Q),this.project(g,Q)).getSize(),g=ut.any3d?this.options.zoomSnap:1,A=P.x/V.x,P=P.y/V.y,V=n?Math.max(A,P):Math.min(A,P),Q=this.getScaleZoom(V,Q);return g&&(Q=Math.round(Q/(g/100))*(g/100),Q=n?Math.ceil(Q/g)*g:Math.floor(Q/g)*g),Math.max(l,Math.min(c,Q))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new pt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){return t=this._getTopLeftPoint(t,n),new St(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var s=this.options.crs;return n=n===void 0?this._zoom:n,s.scale(t)/s.scale(n)},getScaleZoom:function(l,n){var s=this.options.crs,l=(n=n===void 0?this._zoom:n,s.zoom(l*s.scale(n)));return isNaN(l)?1/0:l},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Lt(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(ht(t),n)},layerPointToLatLng:function(t){return t=ht(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(Lt(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Lt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(zt(t))},distance:function(t,n){return this.options.crs.distance(Lt(t),Lt(n))},containerPointToLayerPoint:function(t){return ht(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return ht(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(ht(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Lt(t)))},mouseEventToContainerPoint:function(t){return vr(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(t=this._container=mr(t),!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");ct(t,"scroll",this._onScroll,this),this._containerId=v(t)},_initLayout:function(){var t=this._container,n=(this._fadeAnimated=this.options.fadeAnimation&&ut.any3d,yt(t,"leaflet-container"+(ut.touch?" leaflet-touch":"")+(ut.retina?" leaflet-retina":"")+(ut.ielt9?" leaflet-oldie":"")+(ut.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Si(t,"position"));n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Nt(this._mapPane,new pt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(yt(t.markerPane,"leaflet-zoom-hide"),yt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,s){Nt(this._mapPane,new pt(0,0));var l=!this._loaded,c=(this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset"),this._zoom!==n);this._moveStart(c,s)._move(t,n)._moveEnd(c),this.fire("viewreset"),l&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,s,l){n===void 0&&(n=this._zoom);var c=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),l?s&&s.pinch&&this.fire("zoom",s):((c||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Kt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Nt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var n=t?Bt:ct;n((this._targets[v(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),ut.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Kt(this._resizeRequest),this._resizeRequest=te(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,n){for(var s,l=[],c=n==="mouseout"||n==="mouseover",g=t.target||t.srcElement,A=!1;g;){if((s=this._targets[v(g)])&&(n==="click"||n==="preclick")&&this._draggableMoved(s)){A=!0;break}if(s&&s.listens(n,!0)&&(c&&!zn(g,t)||(l.push(s),c))||g===this._container)break;g=g.parentNode}return l=l.length||A||c||!this.listens(n,!0)?l:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n,s=t.target||t.srcElement;!this._loaded||s._leaflet_disable_events||t.type==="click"&&this._isCl
4ickDisabled(s)||((n=t.type)==="mousedown"&&Tn(s),this._fireDOMEvent(t,n))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,s){t.type==="click"&&((P=vt({},t)).type="preclick",this._fireDOMEvent(P,P.type,s));var l=this._findEventTargets(t,n);if(s){for(var c=[],g=0;g<s.length;g++)s[g].listens(n,!0)&&c.push(s[g]);l=c.concat(l)}if(l.length){n==="contextmenu"&&Ut(t);var A,P=l[0],V={originalEvent:t};for(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"&&(A=P.getLatLng&&(!P._radius||P._radius<=10),V.containerPoint=A?this.latLngToContainerPoint(P.getLatLng()):this.mouseEventToContainerPoint(t),V.layerPoint=this.containerPointToLayerPoint(V.containerPoint),V.latlng=A?P.getLatLng():this.layerPointToLatLng(V.layerPoint)),g=0;g<l.length;g++)if(l[g].fire(n,V,!0),V.originalEvent._stopped||l[g].options.bubblingMouseEvents===!1&&he(this._mouseEvents,n)!==-1)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,n=this._handlers.length;t<n;t++)this._handlers[t].disable()},whenReady:function(t,n){return this._loaded?t.call(n||this,{target:this}):this.on("load",t,n),this},_getMapPanePos:function(){return Ye(this._mapPane)||new pt(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,n){return(t&&n!==void 0?this._getNewPixelOrigin(t,n):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,n){var s=this.getSize()._divideBy(2);return this.project(t,n)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,n,s){return s=this._getNewPixelOrigin(s,n),this.project(t,n)._subtract(s)},_latLngBoundsToNewLayerBounds:function(t,n,s){return s=this._getNewPixelOrigin(s,n),Qt([this.project(t.getSouthWest
vendor: 41,297 bytes, line 4
4(),n)._subtract(s),this.project(t.getNorthWest(),n)._subtract(s),this.project(t.getSouthEast(),n)._subtract(s),this.project(t.getNorthEast(),n)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,n,s){var l,c;return!s||(l=this.project(t,n),c=this.getSize().divideBy(2),c=new St(l.subtract(c),l.add(c)),c=this._getBoundsOffset(c,s,n),Math.abs(c.x)<=1&&Math.abs(c.y)<=1)?t:this.unproject(l.add(c),n)},_limitOffset:function(t,n){var s;return n?(s=new St((s=this.getPixelBounds()).min.add(t),s.max.add(t)),t.add(this._getBoundsOffset(s,n))):t},_getBoundsOffset:function(t,n,s){return n=Qt(this.project(n.getNorthEast(),s),this.project(n.getSouthWest(),s)),s=n.min.subtract(t.min),n=n.max.subtract(t.max),new pt(this._rebound(s.x,-n.x),this._rebound(s.y,-n.y))},_rebound:function(t,n){return 0<t+n?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),s=this.getMaxZoom(),l=ut.any3d?this.options.zoomSnap:1;return l&&(t=Math.round(t/l)*l),Math.max(n,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){return t=this._getCenterOffset(t)._trunc(),!((n&&n.animate)!==!0&&!this.getSize().contains(t))&&(this.panBy(t,n),!0)},_createAnimProxy:function(){var t=this._proxy=Ct("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var s=An,l=this._proxy.style[s];We(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),l===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Tt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();We(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,s){if(!this._animatingZoom){if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var l=this.getZoomScale(n),l=this._getCenterOffset(t)._divideBy(1-1/l);if(s.animate!==!0&&!this.getSize().contains(l))return!1;te(function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,n,!0)},this)}return!0},_animateZoom:function(t,n,s,l){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,yt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:l}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(y(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ft(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fi(t){return new ge(t)}var ge=fe.extend({options:{position:"topright"},initialize:function(t){lt(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var n=this._container=this.onAdd(l),s=this.getPosition(),l=l._controlCorners[s];return yt(n,"leaflet-control"),s.indexOf("bottom")!==-1?l.insertBefore(n,l.firstChild):l.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(Tt(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&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}}),jn=(bt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",s=this._controlContainer=Ct("div",n+"control-container",this._container);function l(c,g){t[c+g]=Ct("div",n+c+" "+n+g,s)}l("top","left"),l("top","right"),l("bottom","left"),l("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Tt(this._controlCorners[t]);Tt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),ge.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,s,l){return s<l?-1:l<s?1:0}},initialize:function(t,n,s){for(var l in lt(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[l],l);for(l in n)this._addLayer(n[l],l,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ge.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,n){return this._addLayer(t,n),this._map?this._update():this},addOverlay:function(t,n){return this._addLayer(t,n,!0),this._map?this._update():this},removeLayer:function(t){return t.off("add remove",this._onLayerChange,this),t=this._getLayer(v(t)),t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){yt(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?(yt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Ft(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ft(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=Ct("div",t),s=this.options.collapsed,l=(n.setAttribute("aria-haspopup",!0),mi(n),In(n),this._section=Ct("section",t+"-list")),c=(s&&(this._map.on("click",this.collapse,this),ct(n,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),this._layersLink=Ct("a",t+"-toggle",n));c.href="#",c.title="Layers",c.setAttribute("role","button"),ct(c,{keydown:function(g){g.keyCode===13&&this._expandSafely()},click:function(g){Ut(g),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=Ct("div",t+"-base",l),this._separator=Ct("div",t+"-separator",l),this._overlaysList=Ct("div",t+"-overlays",l),n.appendChild(l)},_getLayer:function(t){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&v(this._layers[n].layer)===t)return this._layers[n]},_addLayer:function(t,n,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:n,overlay:s}),this.options.sortLayers&&this._layers.sort(y(function(l,c){return this.options.sortFunction(l.layer,c.layer,l.name,c.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(this._container){Yi(this._baseLayersList),Yi(this._overlaysList),this._layerControlInputs=[];for(var t,n,s,l=0,c=0;c<this._layers.length;c++)s=this._layers[c],this._addItem(s),n=n||s.overlay,t=t||!s.overlay,l+=s.overlay?0:1;this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<l)?"":"none"),this._separator.style.display=n&&t?"":"none"}return this},_onLayerChange:function(s){this._handlingClick||this._update();var n=this._getLayer(v(s.target)),s=n.overlay?s.type==="add"?"overlayadd":"overlayremove":s.type==="add"?"baselayerchange":null;s&&this._map.fire(s,n)},_createRadioElement:function(t,n){return t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(n?' checked="checked"':"")+"/>",n=document.createElement("div"),n.innerHTML=t,n.firstChild},_addItem:function(t){var n,s=document.createElement("label"),l=this._map.hasLayer(t.layer),l=(t.overlay?((n=document.createElement("input")).type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=l):n=this._createRadioElement("leaflet-base-layers_"+v(this),l),this._layerControlInputs.push(n),n.layerId=v(t.layer),ct(n,"click",this._onInputClick,this),document.createElement("span")),c=(l.innerHTML=" "+t.name,document.createElement("span"));return s.appendChild(c),c.appendChild(n),c.appendChild(l),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(s),this._checkDisabledLayers(),s},_onInputClick:function(){if(!this._preventClick){var t,n,s=this._layerControlInputs,l=[],c=[];this._handlingClick=!0;for(var g=s.length-1;0<=g;g--)t=s[g],n=this._getLayer(t.layerId).layer,t.checked?l.push(n):t.checked||c.push(n);for(g=0;g<c.length;g++)this._map.hasLayer(c[g])&&this._map.removeLayer(c[g]);for(g=0;g<l.length;g++)this._map.hasLayer(l[g])||this._map.addLayer(l[g]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,n,s=this._layerControlInputs,l=this._map.getZoom(),c=s.length-1;0<=c;c--)t=s[c],n=this._getLayer(t.layerId).layer,t.disabled=n.options.minZoom!==void 0&&l<n.options.minZoom||n.options.maxZoom!==void 0&&l>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,n=(this._preventClick=!0,ct(t,"click",Ut),this.expand(),this);setTimeout(function(){Bt(t,"click",Ut),n._preventClick=!1})}})),Gn=ge.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",s=Ct("div",n+" leaflet-bar"),l=this.options;return this._zoomInButton=this._createButton(l.zoomInText,l.zoomInTitle,n+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(l.zoomOutText,l.zoomOutTitle,n+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},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,n,s,l,c){return s=Ct("a",s,l),s.innerHTML=t,s.href="#",s.title=n,s.setAttribute("role","button"),s.setAttribute("aria-label",n),mi(s),ct(s,"click",Je),ct(s,"click",c,this),ct(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";Ft(this._zoomInButton,n),Ft(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(yt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(yt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Cr=(bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Gn,this.addControl(this.zoomControl))}),ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",s=Ct("div",n),l=this.options;return this._addScales(l,n+"-line",s),t.on(l.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,s){t.metric&&(this._mScale=Ct("div",n,s)),t.imperial&&(this._iScale=Ct("div",n,s))},_update:function(){var n=this._map,t=n.getSize().y/2,n=n.distance(n.containerPointToLatLng([0,t]),n.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t);this._updateScale(this._mScale,n<1e3?n+" m":n/1e3+" km",n/t)},_updateImperial:function(l){var n,s,l=3.2808399*l;5280<l?(s=this._getRoundNum(n=l/5280),this._updateScale(this._iScale,s+" mi",s/n)):(s=this._getRoundNum(l),this._updateScale(this._iScale,s+" ft",s/l))},_updateScale:function(t,n,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=n},_getRoundNum:function(s){var n=Math.pow(10,(Math.floor(s)+"").length-1),s=s/n;return n*(s=10<=s?10:5<=s?5:3<=s?3:2<=s?2:1)}})),Zn=ge.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(ut.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){lt(this,t),this._attributions={}},onAdd:function(t){for(var n in(t.attributionControl=this)._container=Ct("div","leaflet-control-attribution"),mi(this._container),t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].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,n=[];for(t in this._attributions)this._attributions[t]&&n.push(t);var s=[];this.options.prefix&&s.push(this.options.prefix),n.length&&s.push(n.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}}),se=(bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new Zn().addTo(this)}),ge.Layers=jn,ge.Zoom=Gn,ge.Scale=Cr,ge.Attribution=Zn,Fi.layers=function(t,n,s){return new jn(t,n,s)},Fi.zoom=function(t){return new Gn(t)},Fi.scale=function(t){return new Cr(t)},Fi.attribution=function(t){return new Zn(t)},fe.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}})),Ri=(se.addTo=function(t,n){return t.addHandler(n,this),this},{Events:oe}),xr=ut.touch?"touchstart mousedown":"mousedown",ze=xi.extend({options:{clickTolerance:3},initialize:function(t,n,s,l){lt(this,l),this._element=t,this._dragStartTarget=n||t,this._preventOutline=s},enable:function(){this._enabled||(ct(this._dragStartTarget,xr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ze._dragging===this&&this.finishDrag(!0),Bt(this._dragStartTarget,xr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var n,s;this._enabled&&(this._moved=!1,Xi(this._element,"leaflet-zoom-anim")||(t.touches&&t.touches.length!==1?ze._dragging===this&&this.finishDrag():ze._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches||((ze._dragging=this)._preventOutline&&Tn(this._element),Ti(),Bi(),this._moving||(this.fire("down"),s=t.touches?t.touches[0]:t,n=fr(this._element),this._startPoint=new pt(s.clientX,s.clientY),this._startPos=Ye(this._element),this._parentScale=On(n),s=t.type==="mousedown",ct(document,s?"mousemove":"touchmove",this._onMove,this),ct(document,s?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var n;this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:!(n=new pt((n=t.touches&&t.touches.length===1?t.touches[0]:t).clientX,n.clientY)._subtract(this._startPoint)).x&&!n.y||Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ut(t),this._moved||(this.fire("dragstart"),this._moved=!0,yt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),yt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Nt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Ft(document.body,"leaflet-dragging"),this._lastTarget&&(Ft(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Bt(document,"mousemove touchmove",this._onMove,this),Bt(document,"mouseup touchend touchcancel",this._onUp,this),Oi(),Pi();var n=this._moved&&this._moving;this._moving=!1,ze._dragging=!1,n&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function kr(t,n,s){for(var l,c,g,A,P,V,Q,ot=[1,4,2,8],mt=0,ft=t.length;mt<ft;mt++)t[mt]._code=$e(t[mt],n);for(g=0;g<4;g++){for(V=ot[g],l=[],mt=0,c=(ft=t.length)-1;mt<ft;c=mt++)A=t[mt],P=t[c],A._code&V?P._code&V||((Q=Ae(P,A,V,n,s))._code=$e(Q,n),l.push(Q)):(P._code&V&&((Q=Ae(P,A,V,n,s))._code=$e(Q,n),l.push(Q)),l.push(A));t=l}return t}function Mr(t,n){var s,l,c,g,A,P,V;if(!t||t.length===0)throw new Error("latlngs not passed");ce(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);for(var Q=Lt([0,0]),ot=zt(t),mt=(ot.getNorthWest().distanceTo(ot.getSouthWest())*ot.getNorthEast().distanceTo(ot.getNorthWest())<1700&&(Q=Un(t)),t.length),ft=[],At=0;At<mt;At++){var Ot=Lt(t[At]);ft.push(n.project(Lt([Ot.lat-Q.lat,Ot.lng-Q.lng])))}for(At=A=P=V=0,s=mt-1;At<mt;s=At++)l=ft[At],c=ft[s],g=l.y*c.x-c.y*l.x,P+=(l.x+c.x)*g,V+=(l.y+c.y)*g,A+=3*g;return ot=A===0?ft[0]:[P/A,V/A],ot=n.unproject(ht(ot)),Lt([ot.lat+Q.lat,ot.lng+Q.lng])}function Un(t){for(var n=0,s=0,l=0,c=0;c<t.length;c++){var g=Lt(t[c]);n+=g.lat,s+=g.lng,l++}return Lt([n/l,s/l])}var wr,tn={__proto__:null,clipPolygon:kr,polygonCenter:Mr,centroid:Un};function Er(t,n){if(n&&t.length){var s=t=(function(P,V){for(var Q=[P[0]],ot=1,mt=0,ft=P.length;ot<ft;ot++)(function(At,ae){var Vt=ae.x-At.x,ae=ae.y-At.y;return Vt*Vt+ae*ae})(P[ot],P[mt])>V&&(Q.push(P[ot]),mt=ot);return mt<ft-1&&Q.push(P[ft-1]),Q})(t,n=n*n),l=s.length,c=new(typeof Uint8Array<"u"?Uint8Array:Array)(l);c[0]=c[l-1]=1,(function P(V,Q,ot,mt,ft){var At,Ot,Vt,ae=0;for(Ot=mt+1;Ot<=ft-1;Ot++)Vt=Ii(V[Ot],V[mt],V[ft],!0),ae<Vt&&(At=Ot,ae=Vt);ot<ae&&(Q[At]=1,P(V,Q,ot,mt,At),P(V,Q,ot,At,ft))})(s,c,n,0,l-1);var g,A=[];for(g=0;g<l;g++)c[g]&&A.push(s[g]);return A}return t.slice()}function Br(t,n,s){return Math.sqrt(Ii(t,n,s,!0))}function Pr(t,n,s,l,c){var g,A,P,V=l?wr:$e(t,s),Q=$e(n,s);for(wr=Q;;){if(!(V|Q))return[t,n];if(V&Q)return!1;P=$e(A=Ae(t,n,g=V||Q,s,c),s),g===V?(t=A,V=P):(n=A,Q=P)}}function Ae(t,V,s,ot,c){var g,A,P=V.x-t.x,V=V.y-t.y,Q=ot.min,ot=ot.max;return 8&s?(g=t.x+P*(ot.y-t.y)/V,A=ot.y):4&s?(g=t.x+P*(Q.y-t.y)/V,A=Q.y):2&s?(g=ot.x,A=t.y+V*(ot.x-t.x)/P):1&s&&(g=Q.x,A=t.y+V*(Q.x-t.x)/P),new pt(g,A,c)}function $e(t,n){var s=0;return t.x<n.min.x?s|=1:t.x>n.max.x&&(s|=2),t.y<n.min.y?s|=4:t.y>n.max.y&&(s|=8),s}function Ii(t,g,s,l){var c=g.x,g=g.y,A=s.x-c,P=s.y-g,V=A*A+P*P;return 0<V&&(1<(V=((t.x-c)*A+(t.y-g)*P)/V)?(c=s.x,g=s.y):0<V&&(c+=A*V,g+=P*V)),A=t.x-c,P=t.y-g,l?A*A+P*P:new pt(c,g)}function ce(t){return!It(t[0])||typeof t[0][0]!="object"&&t[0][0]!==void 0}function Ar(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ce(t)}function Dr(t,n){var s,l,c,g,A,P;if(!t||t.length===0)throw new Error("latlngs not passed");ce(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);for(var V=Lt([0,0]),Q=zt(t),ot=(Q.getNorthWest().distanceTo(Q.getSouthWest())*Q.getNorthEast().distanceTo(Q.getNorthWest())<1700&&(V=Un(t)),t.length),mt=[],ft=0;ft<ot;ft++){var At=Lt(t[ft]);mt.push(n.project(Lt([At.lat-V.lat,At.lng-V.lng])))}for(s=ft=0;ft<ot-1;ft++)s+=mt[ft].distanceTo(mt[ft+1])/2;if(s===0)P=mt[0];else for(l=ft=0;ft<ot-1;ft++)if(c=mt[ft],g=mt[ft+1],s<(l+=A=c.distanceTo(g))){P=[g.x-(A=(l-s)/A)*(g.x-c.x),g.y-A*(g.y-c.y)];break}return Q=n.unproject(ht(P)),Lt([Q.lat+V.lat,Q.lng+V.lng])}var en={__proto__:null,simplify:Er,pointToSegmentDistance:Br,closestPointOnSegment:function(t,n,s){return Ii(t,n,s)},clipSegment:Pr,_getEdgeIntersection:Ae,_getBitCode:$e,_sqClosestPointOnSegment:Ii,isFlat:ce,_flat:Ar,polylineCenter:Dr},Qe={project:function(t){return new pt(t.lng,t.lat)},unproject:function(t){return new wt(t.y,t.x)},bounds:new St([-180,-90],[180,90])},ti={R:6378137,R_MINOR:6356752314245179e-9,bounds:new St([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,s=this.R,g=t.lat*n,l=this.R_MINOR/s,l=Math.sqrt(1-l*l),c=l*Math.sin(g),c=Math.tan(Math.PI/4-g/2)/Math.pow((1-c)/(1+c),l/2),g=-s*Math.log(Math.max(c,1e-10));return new pt(t.lng*n*s,g)},unproject:function(t){for(var n,s=180/Math.PI,l=this.R,c=this.R_MINOR/l,g=Math.sqrt(1-c*c),A=Math.exp(-t.y/l),P=Math.PI/2-2*Math.atan(A),V=0,Q=.1;V<15&&1e-7<Math.abs(Q);V++)n=g*Math.sin(P),n=Math.pow((1-n)/(1+n),g/2),P+=Q=Math.PI/2-2*Math.atan(A*n)-P;return new wt(P*s,t.x*s/l)}},nn={__proto__:null,LonLat:Qe,Mercator:ti,SphericalMercator:ye},Vn=vt({},Re,{code:"EPSG:3395",projection:ti,transformation:ki(Mi=.5/(Math.PI*ti.R),.5,-Mi,.5)}),zi=vt({},Re,{code:"EPSG:4326",projection:Qe,transformation:ki(1/180,1,-1/180,.5)}),rn=vt({},Pe,{projection:Qe,transformation:ki(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,l){var s=l.lng-t.lng,l=l.lat-t.lat;return Math.sqrt(s*s+l*l)},infinite:!0}),ee=(Pe.Earth=Re,Pe.EPSG3395=Vn,Pe.EPSG3857=Ie,Pe.EPSG900913=Jr,Pe.EPSG4326=zi,Pe.Simple=rn,xi.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[v(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[v(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n,s=t.target;s.hasLayer(this)&&(this._map=s,this._zoomAnimated=s._zoomAnimated,this.getEvents&&(n=this.getEvents(),s.on(n,this),this.once("remove",function(){s.off(n,this)},this)),this.onAdd(s),this.fire("add"),s.fire("layeradd",{layer:this}))}})),ei=(bt.include({addLayer:function(t){var n;if(t._layerAdd)return n=v(t),this._layers[n]||((this._layers[n]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this;throw new Error("The provided object is not a Layer.")},removeLayer:function(t){var n=v(t);return this._layers[n]&&(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return v(t)in this._layers},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);return this},_addLayers:function(t){for(var n=0,s=(t=t?It(t)?t:[t]:[]).length;n<s;n++)this.addLayer(t[n])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[v(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=v(t),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,n=1/0,s=-1/0,l=this._getZoomSpan();for(t in this._zoomBoundLayers)var c=this._zoomBoundLayers[t].options,n=c.minZoom===void 0?n:Math.min(n,c.minZoom),s=c.maxZoom===void 0?s:Math.max(s,c.maxZoom);this._layersMaxZoom=s===-1/0?void 0:s,this._layersMinZoom=n===1/0?void 0:n,l!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),ee.extend({initialize:function(t,n){var s,l;if(lt(this,n),this._layers={},t)for(s=0,l=t.length;s<l;s++)this.addLayer(t[s])},addLayer:function(t){var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){return t=t in this._layers?t:this.getLayerId(t),this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return(typeof t=="number"?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var n,s,l=Array.prototype.slice.call(arguments,1);for(n in this._layers)(s=this._layers[n])[t]&&s[t].apply(s,l);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);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:v})),dt=ei.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ei.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ei.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,n=new Zt;for(t in this._layers){var s=this._layers[t];n.extend(s.getBounds?s.getBounds():s.getLatLng())}return n}}),fi=fe.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){lt(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,n){var s=this._getIconUrl(t);if(s)return s=this._createImg(s,n&&n.tagName==="IMG"?n:null),this._setIconStyles(s,t),!this.options.crossOrigin&&this.options.crossOrigin!==""||(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s;if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null},_setIconStyles:function(t,n){var s=this.options,l=s[n+"Size"],l=ht(l=typeof l=="number"?[l,l]:l),c=ht(n==="shadow"&&s.shadowAnchor||s.iconAnchor||l&&l.divideBy(2,!0));t.className="leaflet-marker-"+n+" "+(s.className||""),c&&(t.style.marginLeft=-c.x+"px",t.style.marginTop=-c.y+"px"),l&&(t.style.width=l.x+"px",t.style.height=l.y+"px")},_createImg:function(t,n){return(n=n||document.createElement("img")).src=t,n},_getIconUrl:function(t){return ut.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ii=fi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof ii.imagePath!="string"&&(ii.imagePath=this._detectIconPath()),(this.options.imagePath||ii.imagePath)+fi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){function n(s,l,c){return(l=l.exec(s))&&l[c]}return(t=n(t,/^url\((['"])?(.+)\1\)$/,2))&&n(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=Ct("div","leaflet-default-icon-path",document.body),n=Si(t,"background-image")||Si(t,"backgroundImage");return document.body.removeChild(t),(n=this._stripUrl(n))?n:(t=document.querySelector('link[href$="leaflet.css"]'))?t.href.substring(0,t.href.length-11-1):""}}),Ni=se.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ze(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),yt(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&&Ft(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var n=this._marker,s=n._map,l=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,g=Ye(n._icon),A=s.getPixelBounds(),P=s.getPixelOrigin(),P=Qt(A.min._subtract(P).add(c),A.max._subtract(P).subtract(c));P.contains(g)||(c=ht((Math.max(P.max.x,g.x)-P.max.x)/(A.max.x-P.max.x)-(Math.min(P.min.x,g.x)-P.min.x)/(A.min.x-P.min.x),(Math.max(P.max.y,g.y)-P.max.y)/(A.max.y-P.max.y)-(Math.min(P.min.y,g.y)-P.min.y)/(A.min.y-P.min.y)).multiplyBy(l),s.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),Nt(n._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=te(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&&(Kt(this._panRequest),this._panRequest=te(this._adjustPan.bind(this,t)))},_onDrag:function(t){var n=this._marker,s=n._shadow,l=Ye(n._icon),c=n._map.layerPointToLatLng(l);s&&Nt(s,l),n._latlng=c,t.latlng=c,t.oldLatLng=this._oldLatLng,n.fire("move",t).fire("drag",t)},_onDragEnd:function(t){Kt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),on=ee.extend({options:{icon:new ii,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,n){lt(this,n),this._latlng=Lt(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 n=this._latlng;return this._latlng=Lt(t),this.update(),this.fire("move",{oldLatLng:n,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(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),l=t.icon.createIcon(this._icon),s=!1,l=(l!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(l.title=t.title),l.tagName==="IMG"&&(l.alt=t.alt||"")),yt(l,n),t.keyboard&&(l.tabIndex="0",l.setAttribute("role","button")),this._icon=l,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ct(l,"focus",this._panOnFocus,this),t.icon.createShadow(this._shadow)),c=!1;l!==this._shadow&&(this._removeShadow(),c=!0),l&&(yt(l,n),l.alt=""),this._shadow=l,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),l&&c&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Bt(this._icon,"focus",this._panOnFocus,this),Tt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Tt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Nt(this._icon,t),this._shadow&&Nt(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){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round(),this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(yt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ni&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ni(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&&pe(this._icon,t),this._shadow&&pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t,n,s=this._map;s&&(t=(n=this.options.icon.options).iconSize?ht(n.iconSize):ht(0,0),n=n.iconAnchor?ht(n.iconAnchor):ht(0,0),s.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:t.subtract(n)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),De=ee.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 lt(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)}}),sn=De.extend({options:{fill:!0,radius:10},initialize:function(t,n){lt(this,n),this._latlng=Lt(t),this._radius=this.options.radius},setLatLng:function(t){var n=this._latlng;return this._latlng=Lt(t),this.redraw(),this.fire("move",{oldLatLng:n,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 n=t&&t.radius||this._radius;return De.prototype.setStyle.call(this,t),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var s=this._radius,t=this._radiusY||s,n=this._clickTolerance(),s=[s+n,t+n];this._pxBounds=new St(this._point.subtract(s),this._point.add(s))},_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()}}),ji=sn.extend({initialize:function(t,n,s){if(lt(this,n=typeof n=="number"?vt({},s,{radius:n}):n),this._latlng=Lt(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new Zt(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:De.prototype.setStyle,_project:function(){var t,n,s,l,c,g=this._latlng.lng,A=this._latlng.lat,P=this._map,V=P.options.crs;V.distance===Re.distance?(l=Math.PI/180,c=this._mRadius/Re.R/l,t=P.project([A+c,g]),n=P.project([A-c,g]),n=t.add(n).divideBy(2),s=P.unproject(n).lat,l=Math.acos((Math.cos(c*l)-Math.sin(A*l)*Math.sin(s*l))/(Math.cos(A*l)*Math.cos(s*l)))/l,!isNaN(l)&&l!==0||(l=c/Math.cos(Math.PI/180*A)),this._point=n.subtract(P.getPixelOrigin()),this._radius=isNaN(l)?0:n.x-P.project([s,g-l]).x,this._radiusY=n.y-t.y):(c=V.unproject(V.project(this._latlng).subtract([this._mRadius,0])),this._point=P.latLngToLayerPoint(this._latlng),this._radius=this._point.x-P.latLngToLayerPoint(c).x),this._updateBounds()}}),de=De.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,n){lt(this,n),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 n=1/0,s=null,l=Ii,c=0,g=this._parts.length;c<g;c++)for(var A=this._parts[c],P=1,V=A.length;P<V;P++){var Q,ot,mt=l(t,Q=A[P-1],ot=A[P],!0);mt<n&&(n=mt,s=l(t,Q,ot))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(this._map)return Dr(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},getBounds:function(){return this._bounds},addLatLng:function(t,n){return n=n||this._defaultShape(),t=Lt(t),n.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Zt,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ce(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var n=[],s=ce(t),l=0,c=t.length;l<c;l++)s?(n[l]=Lt(t[l]),this._bounds.extend(n[l])):n[l]=this._convertLatLngs(t[l]);return n},_project:function(){var t=new St;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(),t=new pt(t,t);this._rawPxBounds&&(this._pxBounds=new St([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(t,n,s){var l,c,g=t[0]instanceof wt,A=t.length;if(g){for(c=[],l=0;l<A;l++)c[l]=this._map.latLngToLayerPoint(t[l]),s.extend(c[l]);n.push(c)}else for(l=0;l<A;l++)this._projectLatlngs(t[l],n,s)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s,l,c,g=this._parts,A=0,P=0,V=this._rings.length;A<V;A++)for(n=0,s=(c=this._rings[A]).length;n<s-1;n++)(l=Pr(c[n],c[n+1],t,n,!0))&&(g[P]=g[P]||[],g[P].push(l[0]),l[1]===c[n+1]&&n!==s-2||(g[P].push(l[1]),P++))},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,s=0,l=t.length;s<l;s++)t[s]=Er(t[s],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,n){var s,l,c,g,A,P,V=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(t)){for(s=0,g=this._parts.length;s<g;s++)for(l=0,c=(A=(P=this._parts[s]).length)-1;l<A;c=l++)if((n||l!==0)&&Br(t,P[c],P[l])<=V)return!0}return!1}});de._flat=Ar;var gi=de.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(this._map)return Mr(this._defaultShape(),this._map.options.crs);
vendor: 7,319 bytes, line 4
4throw new Error("Must add layer to map before using getCenter()")},_convertLatLngs:function(n){var n=de.prototype._convertLatLngs.call(this,n),s=n.length;return 2<=s&&n[0]instanceof wt&&n[0].equals(n[s-1])&&n.pop(),n},_setLatLngs:function(t){de.prototype._setLatLngs.call(this,t),ce(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(ce(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var n=this._renderer._bounds,t=this.options.weight,t=new pt(t,t),n=new St(n.min.subtract(t),n.max.add(t));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(n))if(this.options.noClip)this._parts=this._rings;else for(var s,l=0,c=this._rings.length;l<c;l++)(s=kr(this._rings[l],n,!0)).length&&this._parts.push(s)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var n,s,l,c,g,A,P,V,Q=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(c=0,P=this._parts.length;c<P;c++)for(g=0,A=(V=(n=this._parts[c]).length)-1;g<V;A=g++)s=n[g],l=n[A],s.y>t.y!=l.y>t.y&&t.x<(l.x-s.x)*(t.y-s.y)/(l.y-s.y)+s.x&&(Q=!Q);return Q||de.prototype._containsPoint.call(this,t,!0)}}),qt=dt.extend({initialize:function(t,n){lt(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n,s,l,c=It(t)?t:t.features;if(c){for(n=0,s=c.length;n<s;n++)((l=c[n]).geometries||l.geometry||l.features||l.coordinates)&&this.addData(l);return this}var g,A=this.options;return(!A.filter||A.filter(t))&&(g=Gi(t,A))?(g.feature=ln(t),g.defaultOptions=g.options,this.resetStyle(g),A.onEachFeature&&A.onEachFeature(t,g),this.addLayer(g)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=vt({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(n){this._setLayerStyle(n,t)},this)},_setLayerStyle:function(t,n){t.setStyle&&(typeof n=="function"&&(n=n(t.feature)),t.setStyle(n))}});function Gi(t,n){var s,l,c,g,A=t.type==="Feature"?t.geometry:t,P=A?A.coordinates:null,V=[],Q=n&&n.pointToLayer,ot=n&&n.coordsToLatLng||Hn;if(!P&&!A)return null;switch(A.type){case"Point":return ni(Q,t,s=ot(P),n);case"MultiPoint":for(c=0,g=P.length;c<g;c++)s=ot(P[c]),V.push(ni(Q,t,s,n));return new dt(V);case"LineString":case"MultiLineString":return l=an(P,A.type==="LineString"?0:1,ot),new de(l,n);case"Polygon":case"MultiPolygon":return l=an(P,A.type==="Polygon"?1:2,ot),new gi(l,n);case"GeometryCollection":for(c=0,g=A.geometries.length;c<g;c++){var mt=Gi({geometry:A.geometries[c],type:"Feature",properties:t.properties},n);mt&&V.push(mt)}return new dt(V);case"FeatureCollection":for(c=0,g=A.features.length;c<g;c++){var ft=Gi(A.features[c],n);ft&&V.push(ft)}return new dt(V);default:throw new Error("Invalid GeoJSON object.")}}function ni(t,n,s,l){return t?t(n,s):new on(s,l&&l.markersInheritOptions&&l)}function Hn(t){return new wt(t[1],t[0],t[2])}function an(t,n,s){for(var l,c=[],g=0,A=t.length;g<A;g++)l=n?an(t[g],n-1,s):(s||Hn)(t[g]),c.push(l);return c}function Kn(t,n){return(t=Lt(t)).alt!==void 0?[tt(t.lng,n),tt(t.lat,n),tt(t.alt,n)]:[tt(t.lng,n),tt(t.lat,n)]}function un(t,n,s,l){for(var c=[],g=0,A=t.length;g<A;g++)c.push(n?un(t[g],ce(t[g])?0:n-1,s,l):Kn(t[g],l));return!n&&s&&0<c.length&&c.push(c[0].slice()),c}function yi(t,n){return t.feature?vt({},t.feature,{geometry:n}):ln(n)}function ln(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}wi={toGeoJSON:function(t){return yi(this,{type:"Point",coordinates:Kn(this.getLatLng(),t)})}};function Sr(t,n){return new qt(t,n)}on.include(wi),ji.include(wi),sn.include(wi),de.include({toGeoJSON:function(t){var n=!ce(this._latlngs);return yi(this,{type:(n?"Multi":"")+"LineString",coordinates:un(this._latlngs,n?1:0,!1,t)})}}),gi.include({toGeoJSON:function(l){var n=!ce(this._latlngs),s=n&&!ce(this._latlngs[0]),l=un(this._latlngs,s?2:n?1:0,!0,l);return yi(this,{type:(s?"Multi":"")+"Polygon",coordinates:l=n?l:[l]})}}),ei.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(s){n.push(s.toGeoJSON(t).geometry.coordinates)}),yi(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n,s,l=this.feature&&this.feature.geometry&&this.feature.geometry.type;return l==="MultiPoint"?this.toMultiPoint(t):(n=l==="GeometryCollection",s=[],this.eachLayer(function(c){c.toGeoJSON&&(c=c.toGeoJSON(t),n?s.push(c.geometry):(c=ln(c)).type==="FeatureCollection"?s.push.apply(s,c.features):s.push(c))}),n?yi(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s})}});var hn=Sr,pn=ee.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,s){this._url=t,this._bounds=zt(n),lt(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(yt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Tt(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&&ci(this._image),this},bringToBack:function(){return this._map&&di(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=zt(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:Ct("img");yt(n,"leaflet-image-layer"),this._zoomAnimated&&yt(n,"leaflet-zoom-animated"),this.options.className&&yt(n,this.options.className),n.onselectstart=U,n.onmousemove=U,n.onload=y(this.fire,this,"load"),n.onerror=y(this._overlayOnError,this,"error"),!this.options.crossOrigin&&this.options.crossOrigin!==""||(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=n.src:(n.src=this._url,n.alt=this.options.alt)},_animateZoom:function(s){var n=this._map.getZoomScale(s.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,s.zoom,s.center).min;We(this._image,s,n)},_reset:function(){var t=this._image,n=new St(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=n.getSize();Nt(t,n.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),qn=pn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 5,596 bytes, line 4
4ine:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:Ct("video");if(yt(n,"leaflet-image-layer"),this._zoomAnimated&&yt(n,"leaflet-zoom-animated"),this.options.className&&yt(n,this.options.className),n.onselectstart=U,n.onmousemove=U,n.onloadeddata=y(this.fire,this,"load"),t){for(var s=n.getElementsByTagName("source"),l=[],c=0;c<s.length;c++)l.push(s[c].src);this._url=0<s.length?l:[n.src]}else{It(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var g=0;g<this._url.length;g++){var A=Ct("source");A.src=this._url[g],n.appendChild(A)}}}}),Tr=pn.extend({_initImage:function(){var t=this._image=this._url;yt(t,"leaflet-image-layer"),this._zoomAnimated&&yt(t,"leaflet-zoom-animated"),this.options.className&&yt(t,this.options.className),t.onselectstart=U,t.onmousemove=U}}),Pt=ee.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,n){t&&(t instanceof wt||It(t))?(this._latlng=Lt(t),lt(this,n)):(lt(this,t),this._source=n),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&pe(this._container,1),this.bringToFront(),this.options.interactive&&(yt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(pe(this._container,0),this._removeTimeout=setTimeout(y(Tt,void 0,this._container),200)):Tt(this._container),this.options.interactive&&(Ft(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Lt(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&&ci(this._container),this},bringToBack:function(){return this._map&&di(this._container),this},_prepareOpen:function(t){if(!(s=this._source)._map)return!1;if(s instanceof dt){var n,s=null,l=this._source._layers;for(n in l)if(l[n]._map){s=l[n];break}if(!s)return!1;this._source=s}if(!t)if(s.getCenter)t=s.getCenter();else if(s.getLatLng)t=s.getLatLng();else{if(!s.getBounds)throw new Error("Unable to get source layer LatLng.");t=s.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,n=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof n=="string")t.innerHTML=n;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){var t,n,s;this._map&&(n=this._map.latLngToLayerPoint(this._latlng),t=ht(this.options.offset),s=this._getAnchor(),this._zoomAnimated?Nt(this._container,n.add(s)):t=t.add(n).add(s),n=this._containerBottom=-t.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+t.x,this._container.style.bottom=n+"px",this._container.style.left=s+"px")},_getAnchor:function(){return[0,0]}}),Wt=(bt.include({_initOverlay:function(t,n,s,l){var c=n;return c instanceof t||(c=new t(l).setContent(n)),s&&c.setLatLng(s),c}}),ee.include({_initOverlay:function(t,n,s,l){var c=s;return c instanceof t?(lt(c,l),c._source=this):(c=n&&!l?n:new t(l,this)).setContent(s),c}}),Pt.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Pt.prototype.openOn.call(this,t)},onAdd:function(t){Pt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof De||this._source.on("preclick",Xe))},onRemove:function(t){Pt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof De||this._source.off("preclick",Xe))},getEvents:function(){var t=Pt.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&
vendor: 31,000 bytes, line 4
4(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",n=this._container=Ct("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=Ct("div",t+"-content-wrapper",n);this._contentNode=Ct("div",t+"-content",s),mi(n),In(this._contentNode),ct(n,"contextmenu",Xe),this._tipContainer=Ct("div",t+"-tip-container",n),this._tip=Ct("div",t+"-tip",this._tipContainer),this.options.closeButton&&((s=this._closeButton=Ct("a",t+"-close-button",n)).setAttribute("role","button"),s.setAttribute("aria-label","Close popup"),s.href="#close",s.innerHTML='<span aria-hidden="true">×</span>',ct(s,"click",function(l){Ut(l),this.close()},this))},_updateLayout:function(){var t=this._contentNode,n=t.style,s=(n.width="",n.whiteSpace="nowrap",t.offsetWidth),s=Math.min(s,this.options.maxWidth),s=(s=Math.max(s,this.options.minWidth),n.width=s+1+"px",n.whiteSpace="",n.height="",t.offsetHeight),l=this.options.maxHeight,c="leaflet-popup-scrolled";(l&&l<s?(n.height=l+"px",yt):Ft)(t,c),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var n=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),s=this._getAnchor();Nt(this._container,n.add(s))},_adjustPan:function(){var t,n,s,l,c,g,A,P;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(t=this._map,n=parseInt(Si(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+n,P=this._containerWidth,(s=new pt(this._containerLeft,-n-this._containerBottom))._add(Ye(this._container)),s=t.layerPointToContainerPoint(s),c=ht(this.options.autoPanPadding),l=ht(this.options.autoPanPaddingTopLeft||c),c=ht(this.options.autoPanPaddingBottomRight||c),g=t.getSize(),A=0,s.x+P+c.x>g.x&&(A=s.x+P-g.x+c.x),s.x-A-l.x<(P=0)&&(A=s.x-l.x),s.y+n+c.y>g.y&&(P=s.y+n-g.y+c.y),s.y-P-l.y<0&&(P=s.y-l.y),(A||P)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([A,P]))))},_getAnchor:function(){return ht(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),cn=(bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(t,n,s){return this._initOverlay(Wt,t,n,s).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ee.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Wt,this._popup,t,n),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 dt||(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){var n;this._popup&&this._map&&(Je(t),n=t.layer||t.target,this._popup._source!==n||n instanceof De?(this._popup._source=n,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}}),Pt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pt.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){Pt.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=Pt.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=Ct("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+v(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,Q=this._map,s=this._container,l=Q.latLngToContainerPoint(Q.getCenter()),Q=Q.layerPointToContainerPoint(t),c=this.options.direction,g=s.offsetWidth,A=s.offsetHeight,P=ht(this.options.offset),V=this._getAnchor(),Q=c==="top"?(n=g/2,A):c==="bottom"?(n=g/2,0):(n=c==="center"?g/2:c==="right"?0:c==="left"?g:Q.x<l.x?(c="right",0):(c="left",g+2*(P.x+V.x)),A/2);t=t.subtract(ht(n,Q,!0)).add(P).add(V),Ft(s,"leaflet-tooltip-right"),Ft(s,"leaflet-tooltip-left"),Ft(s,"leaflet-tooltip-top"),Ft(s,"leaflet-tooltip-bottom"),yt(s,"leaflet-tooltip-"+c),Nt(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&pe(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),this._setPosition(t)},_getAnchor:function(){return ht(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),Se=(bt.include({openTooltip:function(t,n,s){return this._initOverlay(cn,t,n,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ee.include({bindTooltip:function(t,n){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(cn,this._tooltip,t,n),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){var n,s;!t&&this._tooltipHandlersAdded||(n=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[n](s),this._tooltipHandlersAdded=!t)},openTooltip:function(t){return this._tooltip&&(this instanceof dt||(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 n=typeof t.getElement=="function"&&t.getElement();n&&(ct(n,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),ct(n,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){t=typeof t.getElement=="function"&&t.getElement(),t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){var n;this._tooltip&&this._map&&(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag?(this._openOnceFlag=!0,(n=this)._map.once("moveend",function(){n._openOnceFlag=!1,n._openTooltip(t)})):(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip:function(t){var n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),n=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(n)}}),fi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(n){var n=n&&n.tagName==="DIV"?n:document.createElement("div"),s=this.options;return s.html instanceof Element?(Yi(n),n.appendChild(s.html)):n.innerHTML=s.html!==!1?s.html:"",s.bgPos&&(s=ht(s.bgPos),n.style.backgroundPosition=-s.x+"px "+-s.y+"px"),this._setIconStyles(n,"icon"),n},createShadow:function(){return null}}));fi.Default=ii;var be=ee.extend({options:{tileSize:256,opacity:1,updateWhenIdle:ut.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){lt(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),Tt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ci(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(di(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(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),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=j(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 pt?t:new pt(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var n,s=this.getPane().children,l=-t(-1/0,1/0),c=0,g=s.length;c<g;c++)n=s[c].style.zIndex,s[c]!==this._container&&n&&(l=t(l,+n));isFinite(l)&&(this.options.zIndex=l+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ut.ielt9){pe(this._container,this.options.opacity);var t,n=+new Date,s=!1,l=!1;for(t in this._tiles){var c,g=this._tiles[t];g.current&&g.loaded&&(c=Math.min(1,(n-g.loaded)/200),pe(g.el,c),c<1?s=!0:(g.active?l=!0:this._onOpaqueTile(g),g.active=!0))}l&&!this._noPrune&&this._pruneTiles(),s&&(Kt(this._fadeFrame),this._fadeFrame=te(this._updateOpacity,this))}},_onOpaqueTile:U,_initContainer:function(){this._container||(this._container=Ct("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,n=this.options.maxZoom;if(t!==void 0){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=n-Math.abs(t-s),this._onUpdateLevel(s)):(Tt(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var l=this._levels[t],c=this._map;return l||((l=this._levels[t]={}).el=Ct("div","leaflet-tile-container leaflet-zoom-animated",this._container),l.el.style.zIndex=n,l.origin=c.project(c.unproject(c.getPixelOrigin()),t).round(),l.zoom=t,this._setZoomTransform(l,c.getCenter(),c.getZoom()),U(l.el.offsetWidth),this._onCreateLevel(l)),this._level=l}},_onUpdateLevel:U,_onRemoveLevel:U,_onCreateLevel:U,_pruneTiles:function(){if(this._map){var t,n,s,l=this._map.getZoom();if(l>this.options.maxZoom||l<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(s=this._tiles[t]).retain=s.current;for(t in this._tiles)(s=this._tiles[t]).current&&!s.active&&(n=s.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 n in this._tiles)this._tiles[n].coords.z===t&&this._removeTile(n)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)Tt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,g,A,l){var c=Math.floor(c/2),g=Math.floor(g/2),A=A-1,P=new pt(+c,+g),P=(P.z=A,this._tileCoordsToKey(P)),P=this._tiles[P];return P&&P.active?P.retain=!0:(P&&P.loaded&&(P.retain=!0),l<A&&this._retainParent(c,g,A,l))},_retainChildren:function(t,n,s,l){for(var c=2*t;c<2*t+2;c++)for(var g=2*n;g<2*n+2;g++){var A=new pt(c,g),A=(A.z=s+1,this._tileCoordsToKey(A)),A=this._tiles[A];A&&A.active?A.retain=!0:(A&&A.loaded&&(A.retain=!0),s+1<l&&this._retainChildren(c,g,s+1,l))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var n=this.options;return n.minNativeZoom!==void 0&&t<n.minNativeZoom?n.minNativeZoom:n.maxNativeZoom!==void 0&&n.maxNativeZoom<t?n.maxNativeZoom:t},_setView:function(t,n,s,l){var c=Math.round(n),c=this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?void 0:this._clampZoom(c),g=this.options.updateWhenZooming&&c!==this._tileZoom;l&&!g||(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,n)},_setZoomTransforms:function(t,n){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,n)},_setZoomTransform:function(t,c,s){var l=this._map.getZoomScale(s,t.zoom),c=t.origin.multiplyBy(l).subtract(this._map._getNewPixelOrigin(c,s)).round();ut.any3d?We(t.el,c,l):Nt(t.el,c)},_resetGrid:function(){var t=this._map,n=t.options.crs,s=this._tileSize=this.getTileSize(),l=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],l).x/s.x),Math.ceil(t.project([0,n.wrapLng[1]],l).x/s.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],l).y/s.x),Math.ceil(t.project([n.wrapLat[1],0],l).y/s.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(s){var l=this._map,n=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),n=l.getZoomScale(n,this._tileZoom),s=l.project(s,this._tileZoom).floor(),l=l.getSize().divideBy(2*n);return new St(s.subtract(l),s.add(l))},_update:function(t){var n=this._map;if(n){var s=this._clampZoom(n.getZoom());if(t===void 0&&(t=n.getCenter()),this._tileZoom!==void 0){var l,n=this._getTiledPixelBounds(t),c=this._pxBoundsToTileRange(n),g=c.getCenter(),A=[],n=this.options.keepBuffer,P=new St(c.getBottomLeft().subtract([n,-n]),c.getTopRight().add([n,-n]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(l in this._tiles){var V=this._tiles[l].coords;V.z===this._tileZoom&&P.contains(new pt(V.x,V.y))||(this._tiles[l].current=!1)}if(1<Math.abs(s-this._tileZoom))this._setView(t,s);else{for(var Q=c.min.y;Q<=c.max.y;Q++)for(var ot=c.min.x;ot<=c.max.x;ot++){var mt,ft=new pt(ot,Q);ft.z=this._tileZoom,this._isValidTile(ft)&&((mt=this._tiles[this._tileCoordsToKey(ft)])?mt.current=!0:A.push(ft))}if(A.sort(function(Vt,ae){return Vt.distanceTo(g)-ae.distanceTo(g)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));for(var At=document.createDocumentFragment(),ot=0;ot<A.length;ot++)this._addTile(A[ot],At);this._level.el.appendChild(At)}}}}},_isValidTile:function(t){var n=this._map.options.crs;if(!n.infinite){var s=this._globalTileRange;if(!n.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!n.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}return!this.options.bounds||(n=this._tileCoordsToBounds(t),zt(this.options.bounds).overlaps(n))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,l=this.getTileSize(),s=t.scaleBy(l),l=s.add(l);return[n.unproject(s,t.z),n.unproject(l,t.z)]},_tileCoordsToBounds:function(t){return t=this._tileCoordsToNwSe(t),t=new Zt(t[0],t[1]),t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(n){var n=n.split(":"),s=new pt(+n[0],+n[1]);return s.z=+n[2],s},_removeTile:function(t){var n=this._tiles[t];n&&(Tt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){yt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=U,t.onmousemove=U,ut.ielt9&&this.options.opacity<1&&pe(t,this.options.opacity)},_addTile:function(t,n){var s=this._getTilePos(t),l=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),y(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&te(y(this._tileReady,this,t,null,c)),Nt(c,s),this._tiles[l]={el:c,coords:t,current:!0},n.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,n,s){n&&this.fire("tileerror",{error:n,tile:s,coords:t});var l=this._tileCoordsToKey(t);(s=this._tiles[l])&&(s.loaded=+new Date,this._map._fadeAnimated?(pe(s.el,0),Kt(this._fadeFrame),this._fadeFrame=te(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),n||(yt(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ut.ielt9||!this._map._fadeAnimated?te(this._pruneTiles,this):setTimeout(y(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new pt(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new St(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Te=be.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,(n=lt(this,n)).detectRetina&&ut.retina&&0<n.maxZoom?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var s=document.createElement("img");return ct(s,"load",y(this._tileOnLoad,this,n,s)),ct(s,"error",y(this._tileOnError,this,n,s)),!this.options.crossOrigin&&this.options.crossOrigin!==""||(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var n={r:ut.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(n.y=t),n["-y"]=t),$t(this._url,vt(n,this.options))},_tileOnLoad:function(t,n){ut.ielt9?setTimeout(y(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,s){var l=this.options.errorTileUrl;l&&n.getAttribute("src")!==l&&(n.src=l),t(s,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom;return(t=this.options.zoomReverse?n-t:t)+this.options.zoomOffset},_getSubdomain:function(t){return t=Math.abs(t.x+t.y)%this.options.subdomains.length,this.options.subdomains[t]},_abortLoading:function(){var t,n,s;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((s=this._tiles[t].el).onload=U,s.onerror=U,s.complete||(s.src=re,n=this._tiles[t].coords,Tt(s),delete this._tiles[t],this.fire("tileabort",{tile:s,coords:n})))},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",re),be.prototype._removeTile.call(this,t)},_tileReady:function(t,n,s){if(this._map&&(!s||s.getAttribute("src")!==re))return be.prototype._tileReady.call(this,t,n,s)}});function _e(t,n){return new Te(t,n)}var Or=Te.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,n){this._url=c;var s,l=vt({},this.defaultWmsParams);for(s in n)s in this.options||(l[s]=n[s]);var c=(n=lt(this,n)).detectRetina&&ut.retina?2:1,g=this.getTileSize();l.width=g.x*c,l.height=g.y*c,this.wmsParams=l},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[n]=this._crs.code,Te.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),s=this._crs,s=Qt(s.project(n[0]),s.project(n[1])),n=s.min,s=s.max,n=(1.3<=this._wmsVersion&&this._crs===zi?[n.y,n.x,s.y,s.x]:[n.x,n.y,s.x,s.y]).join(","),s=Te.prototype.getTileUrl.call(this,t);return s+Jt(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+n},setParams:function(t,n){return vt(this.wmsParams,t),n||this.redraw(),this}});Te.WMS=Or,_e.wms=function(t,n){return new Or(t,n)};var Ce=ee.extend({options:{padding:.1},initialize:function(t){lt(this,t),v(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),yt(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,n){var s=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),l=this._map.project(this._center,n),c=c.multiplyBy(-s).add(l).subtract(this._map._getNewPixelOrigin(t,n));ut.any3d?We(this._container,c,s):Nt(this._container,c)},_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,n=this._map.getSize(),s=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new St(s,s.add(n.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ri=Ce.extend({options:{tolerance:0},getEvents:function(){var t=Ce.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ce.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ct(t,"mousemove",this._onMouseMove,this),ct(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ct(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){Kt(this._redrawRequest),delete this._ctx,Tt(this._container),Bt(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(){var t,n,s,l;this._map._animatingZoom&&this._bounds||(Ce.prototype._update.call(this),t=this._bounds,n=this._container,s=t.getSize(),l=ut.retina?2:1,Nt(n,t.min),n.width=l*s.x,n.height=l*s.y,n.style.width=s.x+"px",n.style.height=s.y+"px",ut.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Ce.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),t=(this._layers[v(t)]=t)._order={layer:t,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var s=t._order,n=s.next,s=s.prev;n?n.prev=s:this._drawLast=s,s?s.next=n:this._drawFirst=n,delete t._order,delete this._layers[v(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){for(var n,s=t.options.dashArray.split(/[, ]+/),l=[],c=0;c<s.length;c++){if(n=Number(s[c]),isNaN(n))return;l.push(n)}t.options._dashArray=l}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||te(this._redraw,this))},_extendRedrawBounds:function(t){var n;t._pxBounds&&(n=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new St,this._redrawBounds.extend(t._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(t._pxBounds.max.add([n,n])))},_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,n=this._redrawBounds;n?(t=n.getSize(),this._ctx.clearRect(n.min.x,n.min.y,t.x,t.y)):(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,n,s=this._redrawBounds;this._ctx.save(),s&&(n=s.getSize(),this._ctx.beginPath(),this._ctx.rect(s.min.x,s.min.y,n.x,n.y),this._ctx.clip()),this._drawing=!0;for(var l=this._drawFirst;l;l=l.next)t=l.layer,(!s||t._pxBounds&&t._pxBounds.intersects(s))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,n){if(this._drawing){var s,l,c,g,A=t._parts,P=A.length,V=this._ctx;if(P){for(V.beginPath(),s=0;s<P;s++){for(l=0,c=A[s].length;l<c;l++)g=A[s][l],V[l?"lineTo":"moveTo"](g.x,g.y);n&&V.closePath()}this._fillStroke(V,t)}}},_updateCircle:function(t){var n,s,l,c;this._drawing&&!t._empty()&&(n=t._point,s=this._ctx,l=Math.max(Math.round(t._radius),1),(c=(Math.max(Math.round(t._radiusY),1)||l)/l)!=1&&(s.save(),s.scale(1,c)),s.beginPath(),s.arc(n.x,n.y/c,l,0,2*Math.PI,!1),c!=1&&s.restore(),this._fillStroke(s,t))},_fillStroke:function(t,n){var s=n.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&s.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var n,s,l=this._map.mouseEventToLayerPoint(t),c=this._drawFirst;c;c=c.next)(n=c.layer).options.interactive&&n._containsPoint(l)&&((t.type==="click"||t.type==="preclick")&&this._map._draggableMoved(n)||(s=n));this._fireEvent(!!s&&[s],t)},_onMouseMove:function(t){var n;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(n=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,n))},_handleMouseOut:function(t){var n=this._hoveredLayer;n&&(Ft(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,n){if(!this._mouseHoverThrottled){for(var s,l,c=this._drawFirst;c;c=c.next)(s=c.layer).options.interactive&&s._containsPoint(n)&&(l=s);l!==this._hoveredLayer&&(this._handleMouseOut(t),l&&(yt(this._container,"leaflet-interactive"),this._fireEvent([l],t,"mouseover"),this._hoveredLayer=l)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(y(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,n,s){this._map._fireDOMEvent(n,s||n.type,t)},_bringToFront:function(t){var n,s,l=t._order;l&&(n=l.next,s=l.prev,n&&((n.prev=s)?s.next=n:n&&(this._drawFirst=n),l.prev=this._drawLast,(this._drawLast.next=l).next=null,this._drawLast=l,this._requestRedraw(t)))},_bringToBack:function(t){var n,s,l=t._order;l&&(n=l.next,(s=l.prev)&&((s.next=n)?n.prev=s:s&&(this._drawLast=s),l.prev=null,l.next=this._drawFirst,this._drawFirst.prev=l,this._drawFirst=l,this._requestRedraw(t)))}});function Wn(t){return ut.canvas?new ri(t):null}var Zi=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Ui={_initContainer:function(){this._container=Ct("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ce.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Zi("shape");yt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Zi("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Tt(n),t.removeInteractiveTarget(n),delete this._layers[v(t)]},_updateStyle:function(t){var n=t._stroke,s=t._fill,l=t.options,c=t._container;
vendor: 3,810 bytes, line 4
4c.stroked=!!l.stroke,c.filled=!!l.fill,l.stroke?(n=n||(t._stroke=Zi("stroke")),c.appendChild(n),n.weight=l.weight+"px",n.color=l.color,n.opacity=l.opacity,l.dashArray?n.dashStyle=It(l.dashArray)?l.dashArray.join(" "):l.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=l.lineCap.replace("butt","flat"),n.joinstyle=l.lineJoin):n&&(c.removeChild(n),t._stroke=null),l.fill?(s=s||(t._fill=Zi("fill")),c.appendChild(s),s.color=l.fillColor||l.color,s.opacity=l.fillOpacity):s&&(c.removeChild(s),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),s=Math.round(t._radius),l=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+s+","+l+" 0,23592600")},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){ci(t._container)},_bringToBack:function(t){di(t._container)}},dn=ut.vml?Zi:or,Ne=Ce.extend({_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Tt(this._container),Bt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,n,s;this._map._animatingZoom&&this._bounds||(Ce.prototype._update.call(this),n=(t=this._bounds).getSize(),s=this._container,this._svgSize&&this._svgSize.equals(n)||(this._svgSize=n,s.setAttribute("width",n.x),s.setAttribute("height",n.y)),Nt(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update"))},_initPath:function(t){var n=t._path=dn("path");t.options.className&&yt(n,t.options.className),t.options.interactive&&yt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Tt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[v(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(s){var n=s._path,s=s.options;n&&(s.stroke?(n.setAttribute("stroke",s.color),n.setAttribute("stroke-opacity",s.opacity),n.setAttribute("stroke-width",s.weight),n.setAttribute("stroke-linecap",s.lineCap),n.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?n.setAttribute("stroke-dasharray",s.dashArray):n.removeAttribute("stroke-dasharray"),s.dashOffset?n.setAttribute("stroke-dashoffset",s.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),s.fill?(n.setAttribute("fill",s.fillColor||s.color),n.setAttribute("fill-opacity",s.fillOpacity),n.setAttribute("fill-rule",s.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,sr(t._parts,n))},_updateCircle:function(t){var l=t._point,n=Math.max(Math.round(t._radius),1),s="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",l=t._empty()?"M0 0":"M"+(l.x-n)+","+l.y+s+2*n+",0 "+s+2*-n+",0 ";this._setPath(t,l)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){ci(t._path)},_bringToBack:function(t){di(t._path)}});function Yn(t){return ut.svg||ut.vml?new Ne(t):null}ut.vml&&Ne.include(Ui),bt.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var n;return t!=="overlayPane"&&t!==void 0&&((n=this._paneRenderers[t])===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n)},_createRenderer:function(t){return this.options.preferCanvas&&Wn(t)||Yn(t)}});var Fr=gi.extend({initialize:function(t,n){gi.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
vendor: 11,980 bytes, line 4
4,_boundsToLatLngs:function(t){return[(t=zt(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Ne.create=dn,Ne.pointsToPath=sr,qt.geometryToLayer=Gi,qt.coordsToLatLng=Hn,qt.coordsToLatLngs=an,qt.latLngToCoords=Kn,qt.latLngsToCoords=un,qt.getFeature=yi,qt.asFeature=ln,bt.mergeOptions({boxZoom:!0});var xe=se.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(){ct(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Bt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Tt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Bi(),Ti(),this._startPoint=this._map.mouseEventToContainerPoint(t),ct(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=Ct("div","leaflet-zoom-box",this._container),yt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var n=new St(this._point,this._startPoint),s=n.getSize();Nt(this._box,n.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(Tt(this._box),Ft(this._container,"leaflet-crosshair")),Pi(),Oi(),Bt(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){t.which!==1&&t.button!==1||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(y(this._resetState,this),0),t=new Zt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),_n=(bt.addInitHook("addHandler","boxZoom",xe),bt.mergeOptions({doubleClickZoom:!0}),se.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,l=n.getZoom(),s=n.options.zoomDelta,l=t.originalEvent.shiftKey?l-s:l+s;n.options.doubleClickZoom==="center"?n.setZoom(l):n.setZoomAround(t.containerPoint,l)}})),Oe=(bt.addInitHook("addHandler","doubleClickZoom",_n),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),se.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ze(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))),yt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ft(this._map._container,"leaflet-grab"),Ft(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,n=this._map;n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=zt(this._map.options.maxBounds),this._offsetLimit=Qt(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var n,s;this._map.options.inertia&&(n=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(s),this._times.push(n),this._prunePositions(n)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){var t,n;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit,t.x<n.min.x&&(t.x=this._viscousLimit(t.x,n.min.x)),t.y<n.min.y&&(t.y=this._viscousLimit(t.y,n.min.y)),t.x>n.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var c=this._worldWidth,t=Math.round(c/2),n=this._initialWorldOffset,l=this._draggable._newPos.x,s=(l-t+n)%c+t-n,l=(l+t+n)%c-t-n,c=Math.abs(s+n)<Math.abs(l+n)?s:l;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=c},_onDragEnd:function(t){var n,s,l,c,g=this._map,A=g.options,P=!A.inertia||t.noInertia||this._times.length<2;g.fire("dragend",t),!P&&(this._prunePositions(+new Date),t=this._lastPos.subtract(this._positions[0]),P=(this._lastTime-this._times[0])/1e3,n=A.easeLinearity,P=(t=t.multiplyBy(n/P)).distanceTo([0,0]),s=Math.min(A.inertiaMaxSpeed,P),t=t.multiplyBy(s/P),l=s/(A.inertiaDeceleration*n),(c=t.multiplyBy(-l/2).round()).x||c.y)?(c=g._limitOffset(c,g.options.maxBounds),te(function(){g.panBy(c,{duration:l,easeLinearity:n,noMoveStart:!0,animate:!0})})):g.fire("moveend")}})),mn=(bt.addInitHook("addHandler","dragging",Oe),bt.mergeOptions({keyboard:!0,keyboardPanDelta:80}),se.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"),ct(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(),Bt(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(){var t,n,s;this._focused||(s=document.body,t=document.documentElement,n=s.scrollTop||t.scrollTop,s=s.scrollLeft||t.scrollLeft,this._map._container.focus(),window.scrollTo(s,n))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var n=this._panKeys={},s=this.keyCodes,l=0,c=s.left.length;l<c;l++)n[s.left[l]]=[-1*t,0];for(l=0,c=s.right.length;l<c;l++)n[s.right[l]]=[t,0];for(l=0,c=s.down.length;l<c;l++)n[s.down[l]]=[0,t];for(l=0,c=s.up.length;l<c;l++)n[s.up[l]]=[0,-1*t]},_setZoomDelta:function(t){for(var n=this._zoomKeys={},s=this.keyCodes,l=0,c=s.zoomIn.length;l<c;l++)n[s.zoomIn[l]]=t;for(l=0,c=s.zoomOut.length;l<c;l++)n[s.zoomOut[l]]=-t},_addHooks:function(){ct(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Bt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var n,s,l=t.keyCode,c=this._map;if(l in this._panKeys)c._panAnim&&c._panAnim._inProgress||(s=this._panKeys[l],t.shiftKey&&(s=ht(s).multiplyBy(3)),c.options.maxBounds&&(s=c._limitOffset(ht(s),c.options.maxBounds)),c.options.worldCopyJump?(n=c.wrapLatLng(c.unproject(c.project(c.getCenter()).add(s))),c.panTo(n)):c.panBy(s));else if(l in this._zoomKeys)c.setZoom(c.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[l]);else{if(l!==27||!c._popup||!c._popup.options.closeOnEscapeKey)return;c.closePopup()}Je(t)}}})),oi=(bt.addInitHook("addHandler","keyboard",mn),bt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),se.extend({addHooks:function(){ct(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Bt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var s=Lr(t),n=this._map.options.wheelDebounceTime,s=(this._delta+=s,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date),Math.max(n-(+new Date-this._startTime),0));clearTimeout(this._timer),this._timer=setTimeout(y(this._performZoom,this),s),Je(t)},_performZoom:function(){var t=this._map,n=t.getZoom(),s=this._map.options.zoomSnap||0,l=(t._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel)),l=4*Math.log(2/(1+Math.exp(-Math.abs(l))))/Math.LN2,s=s?Math.ceil(l/s)*s:l,l=t._limitZoom(n+(0<this._delta?s:-s))-n;this._delta=0,this._startTime=null,l&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+l):t.setZoomAround(this._lastMousePos,n+l))}})),je=(bt.addInitHook("addHandler","scrollWheelZoom",oi),bt.mergeOptions({tapHold:ut.touchNative&&ut.safari&&ut.mobile,tapTolerance:15}),se.extend({addHooks:function(){ct(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Bt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){var n;clearTimeout(this._holdTimeout),t.touches.length===1&&(n=t.touches[0],this._startPos=this._newPos=new pt(n.clientX,n.clientY),this._holdTimeout=setTimeout(y(function(){this._cancel(),this._isTapValid()&&(ct(document,"touchend",Ut),ct(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),600),ct(document,"touchend touchcancel contextmenu",this._cancel,this),ct(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function t(){Bt(document,"touchend",Ut),Bt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Bt(document,"touchend touchcancel contextmenu",this._cancel,this),Bt(document,"touchmove",this._onMove,this)},_onMove:function(t){t=t.touches[0],this._newPos=new pt(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY}),t._simulated=!0,n.target.dispatchEvent(t)}})),Ge=(bt.addInitHook("addHandler","tapHold",je),bt.mergeOptions({touchZoom:ut.touch,bounceAtZoomLimits:!0}),se.extend({addHooks:function(){yt(this._map._container,"leaflet-touch-zoom"),ct(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ft(this._map._container,"leaflet-touch-zoom"),Bt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n,s,l=this._map;!t.touches||t.touches.length!==2||l._animatingZoom||this._zooming||(n=l.mouseEventToContainerPoint(t.touches[0]),s=l.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),ct(document,"touchmove",this._onTouchMove,this),ct(document,"touchend touchcancel",this._onTouchEnd,this),Ut(t))},_onTouchMove:function(t){if(t.touches&&t.touches.length===2&&this._zooming){var n=this._map,s=n.mou
4seEventToContainerPoint(t.touches[0]),l=n.mouseEventToContainerPoint(t.touches[1]),c=s.distanceTo(l)/this._startDist;if(this._zoom=n.getScaleZoom(c,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&c<1||this._zoom>n.getMaxZoom()&&1<c)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,c==1)return}else{if(s=s._add(l)._divideBy(2)._subtract(this._centerPoint),c==1&&s.x===0&&s.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),Kt(this._animRequest),l=y(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0),this._animRequest=te(l,this,!0),Ut(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,Kt(this._animRequest),Bt(document,"touchmove",this._onTouchMove,this),Bt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),Rr=(bt.addInitHook("addHandler","touchZoom",Ge),bt.BoxZoom=xe,bt.DoubleClickZoom=_n,bt.Drag=Oe,bt.Keyboard=mn,bt.ScrollWheelZoom=oi,bt.TapHold=je,bt.TouchZoom=Ge,$.Bounds=St,$.Browser=ut,$.CRS=Pe,$.Canvas=ri,$.Circle=ji,$.CircleMarker=sn,$.Class=fe,$.Control=ge,$.DivIcon=Se,$.DivOverlay=Pt,$.DomEvent=Nn,$.DomUtil=li,$.Draggable=ze,$.Evented=xi,$.FeatureGroup=dt,$.GeoJSON=qt,$.GridLayer=be,$.Handler=se,$.Icon=fi,$.ImageOverlay=pn,$.LatLng=wt,$.LatLngBounds=Zt,$.Layer=ee,$.LayerGroup=ei,$.LineUtil=en,$.Map=bt,$.Marker=on,$.Mixin=Ri,$.Path=De,$.Point=pt,$.PolyUtil=tn,$.Polygon=gi,$.Polyline=de,$.Popup=Wt,$.PosAnimation=br,$.Projection=nn,$.Rectangle=Fr,$.Renderer=Ce,$.SVG=Ne,$.SVGOverlay=Tr,$.TileLayer=Te,$.Tooltip=cn,$.Transformation=Ln,$.Util=Ke,$.VideoOverlay=qn,$.bind=y,$.bounds=Qt,$.canvas=Wn,$.circle=function(t,n,s){return new ji(t,n,s)},$.circleMarker=function(t,n){return new sn(t,n)},$.control=Fi,$.divIcon=function(t){return new Se(t)},$.extend=vt,$.featureGroup=function(t,n){return new dt(t,n)},$.geoJSON=Sr,$.geoJson=hn,$.gridLayer=function(t){return new be(t)},$.icon=function(t){return new fi(t)},$.imageOverlay=function(t,n,s){return new pn(t,n,s)},$.latLng=Lt,$.latLngBounds=zt,$.layerGroup=function(t,n){return new ei(t,n)},$.map=function(t,n){return new bt(t,n)},$.marker=function(t,n){return new on(t,n)},$.point=ht,$.polygon=function(t,n){return new gi(t,n)},$.polyline=function(t,n){return new de(t,n)},$.popup=function(t,n){return new Wt(t,n)},$.rectangle=function(t,n){return new Fr(t,n)},$.setOptions=lt,$.stamp=v,$.svg=Yn,$.svgOverlay=function(t,n,s){return new Tr(t,n,s)},$.tileLayer=_e,$.tooltip=function(t,n){return new cn(t,n)},$.transformation=ki,$.version="1.9.4",$.videoOverlay=function(t,n,s){return new qn(t,n,s)},window.L);$.noConflict=function(){return window.L=Rr,this},window.L=$}),(function($,vt){typeof exports=="object"&&typeof module<"u"?vt(exports):typeof define=="function"&&define.amd?define(["exports"],vt):vt((($=$||self).Leaflet=$.Leaflet||{},$.Leaflet.markercluster={}))})(this,function($){"use strict";var vt=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(_){L.Util.setOptions(this,_),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 y=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,y?this._withAnimation:this._noAnimation),this._markerCluster
vendor: 30,205 bytes, line 4
4=y?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(_){if(_ instanceof L.LayerGroup)return this.addLayers([_]);if(!_.getLatLng)return this._nonPointGroup.addLayer(_),this.fire("layeradd",{layer:_}),this;if(!this._map)return this._needsClustering.push(_),this.fire("layeradd",{layer:_}),this;if(this.hasLayer(_))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(_,this._maxZoom),this.fire("layeradd",{layer:_}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var y=_,M=this._zoom;if(_.__parent)for(;y.__parent._zoom>=M;)y=y.__parent;return this._currentShownBounds.contains(y.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(_,y):this._animationAddLayerNonAnimated(_,y)),this},removeLayer:function(_){return _ instanceof L.LayerGroup?this.removeLayers([_]):(_.getLatLng?this._map?_.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(_)),this._removeLayer(_,!0),this.fire("layerremove",{layer:_}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),_.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(_)&&(this._featureGroup.removeLayer(_),_.clusterShow&&_.clusterShow())):(!this._arraySplice(this._needsClustering,_)&&this.hasLayer(_)&&this._needsRemoving.push({layer:_,latlng:_._latlng}),this.fire("layerremove",{layer:_})):(this._nonPointGroup.removeLayer(_),this.fire("layerremove",{layer:_})),this)},addLayers:function(_,y){if(!L.Util.isArray(_))return this.addLayer(_);var M,v=this._featureGroup,j=this._nonPointGroup,H=this.options.chunkedLoading,U=this.options.chunkInterval,tt=this.options.chunkProgress,rt=_.length,it=0,lt=!0;if(this._map){var Jt=new Date().getTime(),Mt=L.bind(function(){var It=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();it<rt;it++){if(H&&it%200==0){var he=new Date().getTime()-It;if(U<he)break}if((M=_[it])instanceof L.LayerGroup)lt&&(_=_.slice(),lt=!1),this._extractNonGroupLayers(M,_),rt=_.length;else if(M.getLatLng){if(!this.hasLayer(M)&&(this._addLayer(M,this._maxZoom),y||this.fire("layeradd",{layer:M}),M.__parent&&M.__parent.getChildCount()===2)){var re=M.__parent.getAllChildMarkers(),bi=re[0]===M?re[1]:re[0];v.removeLayer(bi)}}else j.addLayer(M),y||this.fire("layeradd",{layer:M})}tt&&tt(it,rt,new Date().getTime()-Jt),it===rt?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(Mt,this.options.chunkDelay)},this);Mt()}else for(var $t=this._needsClustering;it<rt;it++)(M=_[it])instanceof L.LayerGroup?(lt&&(_=_.slice(),lt=!1),this._extractNonGroupLayers(M,_),rt=_.length):M.getLatLng?this.hasLayer(M)||$t.push(M):j.addLayer(M);return this},removeLayers:function(_){var y,M,v=_.length,j=this._featureGroup,H=this._nonPointGroup,U=!0;if(!this._map){for(y=0;y<v;y++)(M=_[y])instanceof L.LayerGroup?(U&&(_=_.slice(),U=!1),this._extractNonGroupLayers(M,_),v=_.length):(this._arraySplice(this._needsClustering,M),H.removeLayer(M),this.hasLayer(M)&&this._needsRemoving.push({layer:M,latlng:M._latlng}),this.fire("layerremove",{layer:M}));return this}if(this._unspiderfy){this._unspiderfy();var tt=_.slice(),rt=v;for(y=0;y<rt;y++)(M=tt[y])instanceof L.LayerGroup?(this._extractNonGroupLayers(M,tt),rt=tt.length):this._unspiderfyLayer(M)}for(y=0;y<v;y++)(M=_[y])instanceof L.LayerGroup?(U&&(_=_.slice(),U=!1),this._extractNonGroupLayers(M,_),v=_.length):M.__parent?(this._removeLayer(M,!0,!0),this.fire("layerremove",{layer:M}),j.hasLayer(M)&&(j.removeLayer(M),M.clusterShow&&M.clusterShow())):(H.removeLayer(M),this.fire("layerremove",{layer:M}));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(_){_.off(this._childMarkerEventHandlers,this),delete _.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var _=new L.LatLngBounds;this._topClusterLevel&&_.extend(this._topClusterLevel._bounds);for(var y=this._needsClustering.length-1;0<=y;y--)_.extend(this._needsClustering[y].getLatLng());return _.extend(this._nonPointGroup.getBounds()),_},eachLayer:function(_,y){var M,v,j,H=this._needsClustering.slice(),U=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(H),v=H.length-1;0<=v;v--){for(M=!0,j=U.length-1;0<=j;j--)if(U[j].layer===H[v]){M=!1;break}M&&_.call(y,H[v])}this._nonPointGroup.eachLayer(_,y)},getLayers:function(){var _=[];return this.eachLayer(function(y){_.push(y)}),_},getLayer:function(_){var y=null;return _=parseInt(_,10),this.eachLayer(function(M){L.stamp(M)===_&&(y=M)}),y},hasLayer:function(_){if(!_)return!1;var y,M=this._needsClustering;for(y=M.length-1;0<=y;y--)if(M[y]===_)return!0;for(y=(M=this._needsRemoving).length-1;0<=y;y--)if(M[y].layer===_)return!1;return!(!_.__parent||_.__parent._group!==this)||this._nonPointGroup.hasLayer(_)},zoomToShowLayer:function(_,y){var M=this._map;typeof y!="function"&&(y=function(){});var v=function(){!M.hasLayer(_)&&!M.hasLayer(_.__parent)||this._inZoomAnimation||(this._map.off("moveend",v,this),this.off("animationend",v,this),M.hasLayer(_)?y():_.__parent._icon&&(this.once("spiderfied",y,this),_.__parent.spiderfy()))};_._icon&&this._map.getBounds().contains(_.getLatLng())?y():_.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",v,this),this._map.panTo(_.getLatLng())):(this._map.on("moveend",v,this),this.on("animationend",v,this),_.__parent.zoomToBounds())},onAdd:function(_){var y,M,v;if(this._map=_,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(_),this._nonPointGroup.addTo(_),this._gridClusters||this._generateInitialClusters(),this._maxLat=_.options.crs.projection.MAX_LATITUDE,y=0,M=this._needsRemoving.length;y<M;y++)(v=this._needsRemoving[y]).newlatlng=v.layer._latlng,v.layer._latlng=v.latlng;for(y=0,M=this._needsRemoving.length;y<M;y++)v=this._needsRemoving[y],this._removeLayer(v.layer,!0),v.layer._latlng=v.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(),M=this._needsClustering,this._needsClustering=[],this.addLayers(M,!0)},onRemove:function(_){_.off("zoomend",this._zoomEnd,this),_.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(_){for(var y=_;y&&!y._icon;)y=y.__parent;return y||null},_arraySplice:function(_,y){for(var M=_.length-1;0<=M;M--)if(_[M]===y)return _.splice(M,1),!0},_removeFromGridUnclustered:function(_,y){for(var M=this._map,v=this._gridUnclustered,j=Math.floor(this._map.getMinZoom());j<=y&&v[y].removeObject(_,M.project(_.getLatLng(),y));y--);},_childMarkerDragStart:function(_){_.target.__dragStart=_.target._latlng},_childMarkerMoved:function(_){if(!this._ignoreMove&&!_.target.__dragStart){var y=_.target._popup&&_.target._popup.isOpen();this._moveChild(_.target,_.oldLatLng,_.latlng),y&&_.target.openPopup()}},_moveChild:function(_,y,M){_._latlng=y,this.removeLayer(_),_._latlng=M,this.addLayer(_)},_childMarkerDragEnd:function(_){var y=_.target.__dragStart;delete _.target.__dragStart,y&&this._moveChild(_.target,y,_.target._latlng)},_removeLayer:function(_,y,M){var v=this._gridClusters,j=this._gridUnclustered,H=this._featureGroup,U=this._map,tt=Math.floor(this._map.getMinZoom());y&&this._removeFromGridUnclustered(_,this._maxZoom);var rt,it=_.__parent,lt=it._markers;for(this._arraySplice(lt,_);it&&(it._childCount--,it._boundsNeedUpdate=!0,!(it._zoom<tt));)y&&it._childCount<=1?(rt=it._markers[0]===_?it._markers[1]:it._markers[0],v[it._zoom].removeObject(it,U.project(it._cLatLng,it._zoom)),j[it._zoom].addObject(rt,U.project(rt.getLatLng(),it._zoom)),this._arraySplice(it.__parent._childClusters,it),it.__parent._markers.push(rt),rt.__parent=it.__parent,it._icon&&(H.removeLayer(it),M||H.addLayer(rt))):it._iconNeedsUpdate=!0,it=it.__parent;delete _.__parent},_isOrIsParent:function(_,y){for(;y;){if(_===y)return!0;y=y.parentNode}return!1},fire:function(_,y,M){if(y&&y.layer instanceof L.MarkerCluster){if(y.originalEvent&&this._isOrIsParent(y.layer._icon,y.originalEvent.relatedTarget))return;_="cluster"+_}L.FeatureGroup.prototype.fire.call(this,_,y,M)},listens:function(_,y){return L.FeatureGroup.prototype.listens.call(this,_,y)||L.FeatureGroup.prototype.listens.call(this,"cluster"+_,y)},_defaultIconCreateFunction:function(_){var y=_.getChildCount(),M=" marker-cluster-";return M+=y<10?"small":y<100?"medium":"large",new L.DivIcon({html:"<div><span>"+y+"</span></div>",className:"marker-cluster"+M,iconSize:new L.Point(40,40)})},_bindEvents:function(){var _=this._map,y=this.options.spiderfyOnMaxZoom,M=this.options.showCoverageOnHover,v=this.options.zoomToBoundsOnClick,j=this.options.spiderfyOnEveryZoom;(y||v||j)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),M&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),_.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(_){var y=_.layer,M=y;if(_.type!=="clusterkeypress"||!_.originalEvent||_.originalEvent.keyCode===13){for(;M._childClusters.length===1;)M=M._childClusters[0];M._zoom===this._maxZoom&&M._childCount===y._childCount&&this.options.spiderfyOnMaxZoom?y.spiderfy():this.options.zoomToBoundsOnClick&&y.zoomToBounds(),this.options.spiderfyOnEveryZoom&&y.spiderfy(),_.originalEvent&&_.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(_){var y=this._map;this._inZoomAnimation||(this._shownPolygon&&y.removeLayer(this._shownPolygon),2<_.layer.getChildCount()&&_.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(_.layer.getConvexHull(),this.options.polygonOptions),y.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var _=this.options.spiderfyOnMaxZoom,y=this.options.showCoverageOnHover,M=this.options.zoomToBoundsOnClick,v=this.options.spiderfyOnEveryZoom,j=this._map;(_||M||v)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),y&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),j.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 _=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,_),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),_),this._currentShownBounds=_}},_generateInitialClusters:function(){var _=Math.ceil(this._map.getMaxZoom()),y=Math.floor(this._map.getMinZoom()),M=this.options.maxClusterRadius,v=M;typeof M!="function"&&(v=function(){return M}),this.options.disableClusteringAtZoom!==null&&(_=this.options.disableClusteringAtZoom-1),this._maxZoom=_,this._gridClusters={},this._gridUnclustered={};for(var j=_;y<=j;j--)this._gridClusters[j]=new L.DistanceGrid(v(j)),this._gridUnclustered[j]=new L.DistanceGrid(v(j));this._topClusterLevel=new this._markerCluster(this,y-1)},_addLayer:function(_,y){var M,v,j=this._gridClusters,H=this._gridUnclustered,U=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(_),_.on(this._childMarkerEventHandlers,this);U<=y;y--){M=this._map.project(_.getLatLng(),y);var tt=j[y].getNearObject(M);if(tt)return tt._addChild(_),void(_.__parent=tt);if(tt=H[y].getNearObject(M)){var rt=tt.__parent;rt&&this._removeLayer(tt,!1);var it=new this._markerCluster(this,y,tt,_);j[y].addObject(it,this._map.project(it._cLatLng,y)),tt.__parent=it;var lt=_.__parent=it;for(v=y-1;v>rt._zoom;v--)lt=new this._markerCluster(this,v,lt),j[v].addObject(lt,this._map.project(tt.getLatLng(),v));return rt._addChild(lt),void this._removeFromGridUnclustered(tt,y)}H[y].addObject(_,M)}this._topClusterLevel._addChild(_),_.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(_){_ instanceof L.MarkerCluster&&_._iconNeedsUpdate&&_._updateIcon()})},_enqueue:function(_){this._queue.push(_),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var _=0;_<this._queue.length;_++)this._queue[_].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var _=Math.round(this._map._zoom);this._processQueue(),this._zoom<_&&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,_)):this._zoom>_?(this._animationStart(),this._animationZoomOut(this._zoom,_)):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(_){var y=this._maxLat;return y!==void 0&&(_.getNorth()>=y&&(_._northEast.lat=1/0),_.getSouth()<=-y&&(_._southWest.lat=-1/0)),_},_animationAddLayerNonAnimated:function(_,y){if(y===_)this._featureGroup.addLayer(_);else if(y._childCount===2){y._addToMap();var M=y.getAllChildMarkers();this._featureGroup.removeLayer(M[0]),this._featureGroup.removeLayer(M[1])}else y._updateIcon()},_extractNonGroupLayers:function(_,y){var M,v=_.getLayers(),j=0;for(y=y||[];j<v.length;j++)(M=v[j])instanceof L.LayerGroup?this._extractNonGroupLayers(M,y):y.push(M);return y},_overrideMarkerIcon:function(_){return _.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[_]}})}});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(_,y){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),_),this._topClusterLevel._recursivelyAddChildrenToMap(null,y,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(_,y){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),_),this._topClusterLevel._recursivelyAddChildrenToMap(null,y,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(_,y){this._animationAddLayerNonAnimated(_,y)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(_,y){var M,v=this._getExpandedVisibleBounds(),j=this._featureGroup,H=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(v,_,H,function(U){var tt,rt=U._latlng,it=U._markers;for(v.contains(rt)||(rt=null),U._isSingleParent()&&_+1===y?(j.removeLayer(U),U._recursivelyAddChildrenToMap(null,y,v)):(U.clusterHide(),U._recursivelyAddChildrenToMap(rt,y,v)),M=it.length-1;0<=M;M--)tt=it[M],v.contains(tt._latlng)||j.removeLayer(tt)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(v,y),j.eachLayer(function(U){U instanceof L.MarkerCluster||!U._icon||U.clusterShow()}),this._topClusterLevel._recursively(v,_,y,function(U){U._recursivelyRestoreChildPositions(y)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(v,_,H,function(U){j.removeLayer(U),U.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(_,y){this._animationZoomOutSingle(this._topClusterLevel,_-1,y),this._topClusterLevel._recursivelyAddChildrenToMap(null,y,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),_,this._getExpandedVisibleBounds())},_animationAddLayer:function(_,y){var M=this,v=this._featureGroup;v.addLayer(_),y!==_&&(2<y._childCount?(y._updateIcon(),this._forceLayout(),this._animationStart(),_._setPos(this._map.latLngToLayerPoint(y.getLatLng())),_.clusterHide(),this._enqueue(function(){v.removeLayer(_),_.clusterShow(),M._animationEnd()})):(this._forceLayout(),M._animationStart(),M._animationZoomOutSingle(y,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(_,y,M){var v=this._getExpandedVisibleBounds(),j=Math.floor(this._map.getMinZoom());_._recursivelyAnimateChildrenInAndAddSelfToMap(v,j,y+1,M);var H=this;this._forceLayout(),_._recursivelyBecomeVisible(v,M),this._enqueue(function(){if(_._childCount===1){var U=_._markers[0];this._ignoreMove=!0,U.setLatLng(U.getLatLng()),this._ignoreMove=!1,U.clusterShow&&U.clusterShow()}else _._recursively(v,M,j,function(tt){tt._recursivelyRemoveChildrenFromMap(v,j,y+1)});H._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(_){return new L.MarkerClusterGroup(_)};var ui=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(_,y,M,v){L.Marker.prototype.initialize.call(this,M?M._cLatLng||M.getLatLng():new L.LatLng(0,0),{icon:this,pane:_.options.clusterPane}),this._group=_,this._zoom=y,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,M&&this._addChild(M),v&&this._addChild(v)},getAllChildMarkers:function(_,y){_=_||[];for(var M=this._childClusters.length-1;0<=M;M--)this._childClusters[M].getAllChildMarkers(_,y);for(var v=this._markers.length-1;0<=v;v--)y&&this._markers[v].__dragStart||_.push(this._markers[v]);return _},getChildCount:function(){return this._childCount},zoomToBounds:function(_){for(var y,M=this._childClusters.slice(),v=this._group._map,j=v.getBoundsZoom(this._bounds),H=this._zoom+1,U=v.getZoom();0<M.length&&H<j;){H++;var tt=[];for(y=0;y<M.length;y++)tt=tt.concat(M[y]._childClusters);M=tt}H<j?this._group._map.setView(this._latlng,H):j<=U?this._group._map.setView(this._latlng,U+1):this._group._map.fitBounds(this._bounds,_)},getBounds:function(){var _=new L.LatLngBounds;return _.extend(this._bounds),_},_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(_,y){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(_),_ instanceof L.MarkerCluster?(y||(this._childClusters.push(_),_.__parent=this),this._childCount+=_._childCount):(y||this._markers.push(_),this._childCount++),this.__parent&&this.__parent._addChild(_,!0)},_setClusterCenter:function(_){this._cLatLng||(this._cLatLng=_._cLatLng||_._latlng)},_resetBounds:function(){var _=this._bounds;_._southWest&&(_._southWest.lat=1/0,_._southWest.lng=1/0),_._northEast&&(_._northEast.lat=-1/0,_._northEast.lng=-1/0)},_recalculateBounds:function(){var _,y,M,v,j=this._markers,H=this._childClusters,U=0,tt=0,rt=this._childCount;if(rt!==0){for(this._resetBounds(),_=0;_<j.length;_++)M=j[_]._latlng,this._bounds.extend(M),U+=M.lat,tt+=M.lng;for(_=0;_<H.length;_++)(y=H[_])._boundsNeedUpdate&&y._recalculateBounds(),this._bounds.extend(y._bounds),M=y._wLatLng,v=y._childCount,U+=M.lat*v,tt+=M.lng*v;this._latlng=this._wLatLng=new L.LatLng(U/rt,tt/rt),this._boundsNeedUpdate=!1}},_addToMap:function(_){_&&(this._backupLatlng=this._latlng,this.setLatLng(_)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(_,y,M){this._recursively(_,this._group._map.getMinZoom(),M-1,function(v){var j,H,U=v._markers;for(j=U.length-1;0<=j;j--)(H=U[j])._icon&&(H._setPos(y),H.clusterHide())},function(v){var j,H,U=v._childClusters;for(j=U.length-1;0<=j;j--)(H=U[j])._icon&&(H._setPos(y),H.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(_,y,M,v){this._recursively(_,v,y,function(j){j._recursivelyAnimateChildrenIn(_,j._group._map.latLngToLayerPoint(j.getLatLng()).round(),M),j._isSingleParent()&&M-1===v?(j.clusterShow(),j._recursivelyRemoveChildrenFromMap(_,y,M)):j.clusterHide(),j._addToMap()})},_recursivelyBecomeVisible:function(_,y){this._recursively(_,this._group._map.getMinZoom(),y,null,function(M){M.clusterShow()})},_recursivelyAddChildrenToMap:function(_,y,M){this._recursively(M,this._group._map.getMinZoom()-1,y,function(v){if(y!==v._zoom)for(var j=v._markers.length-1;0<=j;j--){var H=v._markers[j];M.contains(H._latlng)&&(_&&(H._backupLatlng=H.getLatLng(),H.setLatLng(_),H.clusterHide&&H.clusterHide()),v._group._featureGroup.addLayer(H))}},function(v){v._addToMap(_)})},_recursivelyRestoreChildPositions:function(_){for(var y=this._markers.length-1;0<=y;y--){var M=this._markers[y];M._backupLatlng&&(M.setLatLng(M._backupLatlng),delete M._backupLatlng)}if(_-1===this._zoom)for(var v=this._childClusters.length-1;0<=v;v--)this._childClusters[v]._restorePosition();else for(var j=this._childClusters.length-1;0<=j;j--)this._childClusters[j]._recursivelyRestoreChildPositions(_)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(_,y,M,v){var j,H;this._recursively(_,y-1,M-1,function(U){for(H=U._markers.length-1;0<=H;H--)j=U._markers[H],v&&v.contains(j._latlng)||(U._group._featureGroup.removeLayer(j),j.clusterShow&&j.clusterShow())},function(U){for(H=U._childClusters.length-1;0<=H;H--)j=U._childClusters[H],v&&v.contains(j._latlng)||(U._group._featureGroup.removeLayer(j),j.clusterShow&&j.clusterShow())})},_recursively:function(_,y,M,v,j){var H,U,tt=this._childClusters,rt=this._zoom;if(y<=rt&&(v&&v(this),j&&rt===M&&j(this)),rt<y||rt<M)for(H=tt.length-1;0<=H;H--)(U=tt[H])._boundsNeedUpdate&&U._recalculateBounds(),_.intersects(U._bounds)&&U._recursively(_,y,M,v,j)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var _=this.options.opacity;return this.setOpacity(0),this.options.opacity=_,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(_){this._cellSize=_,this._sqCellSize=_*_,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(_,y){var M=this._getCoord(y.x),v=this._getCoord(y.y),j=this._grid,H=j[v]=j[v]||{},U=H[M]=H[M]||[],tt=L.Util.stamp(_);this._objectPoint[tt]=y,U.push(_)},updateObject:function(_,y){this.removeObject(_),this.addObject(_,y)},removeObject:function(_,y){var M,v,j=this._getCoord(y.x),H=this._getCoord(y.y),U=this._grid,tt=U[H]=U[H]||{},rt=tt[j]=tt[j]||[];for(delete this._objectPoint[L.Util.stamp(_)],M=0,v=rt.length;M<v;M++)if(rt[M]===_)return rt.splice(M,1),v===1&&delete tt[j],!0},eachObject:function(_,y){var M,v,j,H,U,tt,rt=this._grid;for(M in rt)for(v in U=rt[M])for(j=0,H=(tt=U[v]).length;j<H;j++)_.call(y,tt[j])&&(j--,H--)},getNearObject:function(_){var y,M,v,j,H,U,tt,rt,it=this._getCoord(_.x),lt=this._getCoord(_.y),Jt=this._objectPoint,Mt=this._sqCellSize,$t=null;for(y=lt-1;y<=lt+1;y++)if(j=this._grid[y]){for(M=it-1;M<=it+1;M++)if(H=j[M])for(v=0,U=H.length;v<U;v++)tt=H[v],((rt=this._sqDist(Jt[L.Util.stamp(tt)],_))<Mt||rt<=Mt&&$t===null)&&(Mt=rt,$t=tt)}return $t},_getCoord:function(_){var y=Math.floor(_/this._cellSize);return isFinite(y)?y:_},_sqDist:function(_,y){var M=y.x-_.x,v=y.y-_.y;return M*M+v*v}},L.QuickHull={getDistant:function(_,y){var M=y[1].lat-y[0].lat;return(y[0].lng-y[1].lng)*(_.lat-y[0].lat)+M*(_.lng-y[0].lng)},findMostDistantPointFromBaseLine:function(_,y){var M,v,j,H=0,U=null,tt=[];for(M=y.length-1;0<=M;M--)v=y[M],0<(j=this.getDistant(v,_))&&(tt.push(v),H<j&&(H=j,U=v));return{maxPoint:U,newPoints:tt}},buildConvexHull:function(_,y){var M=[],v=this.findMostDistantPointFromBaseLine(_,y);return v.maxPoint?M=(M=M.concat(this.buildConvexHull([_[0],v.maxPoint],v.newPoints))).concat(this.buildConvexHull([v.maxPoint,_[1]],v.newPoints)):[_[0]]},getConvexHull:function(_){var y,M=!1,v=!1,j=!1,H=!1,U=null,tt=null,rt=null,it=null,lt=null,Jt=null;for(y=_.length-1;0<=y;y--){var Mt=_[y];(M===!1||Mt.lat>M)&&(M=(U=Mt).lat),(v===!1||Mt.lat<v)&&(v=(tt=Mt).lat),(j===!1||Mt.lng>j)&&(j=(rt=Mt).lng),(H===!1||Mt.lng<H)&&(H=(it=Mt).lng)}return lt=v!==M?(Jt=tt,U):(Jt=it,rt),[].concat(this.buildConvexHull([Jt,lt],_),this.buildConvexHull([lt,Jt],_))}},L.MarkerCluster.include({getConvexHull:function(){var _,y,M=this.getAllChildMarkers(),v=[];for(y=M.length-1;0<=y;y--)_=M[y].getLatLng(),v.push(_);return L.QuickHull.getConvexHull(v)}}),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 _,y=this.getAllChildMarkers(null,!0),M=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),_=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(y.length,M):y.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(y.length,M):(M.y+=10,this._generatePointsCircle(y.length,M)),this._animationSpiderfy(y,_)}},unspiderfy:function(_){this._group._inZoomAnimation||(this._animationUnspiderfy(_),this._group._spiderfied=null)},_generatePointsCircle:function(_,y){var M,v,j=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+_)/this._2PI,H=this._2PI/_,U=[];for(j=Math.max(j,35),U.length=_,M=0;M<_;M++)v=this._circleStartAngle+M*H,U[M]=new L.Point(y.x+j*Math.cos(v),y.y+j*Math.sin(v))._round();return U},_generatePointsSpiral:function(_,y){var M,v=this._group.options.spiderfyDistanceMultiplier,j=v*this._spiralLengthStart,H=v*this._spiralFootSeparation,U=v*this._spiralLengthFactor*this._2PI,tt=0,rt=[];for(M=rt.length=_;0<=M;M--)M<_&&(rt[M]=new L.Point(y.x+j*Math.cos(tt),y.y+j*Math.sin(tt))._round()),j+=U/(tt+=H/j+5e-4*M);return rt},_noanimationUnspiderfy:function(){var _,y,M=this._group,v=M._map,j=M._featureGroup,H=this.getAllChildMarkers(null,!0);for(M._ignoreMove=!0,this.setOpacity(1),y=H.length-1;0<=y;y--)_=H[y],j.removeLayer(_),_._preSpiderfyLatlng&&(_.setLatLng(_._preSpiderfyLatlng),delete _._preSpiderfyLatlng),_.setZIndexOffset&&_.setZIndexOffset(0),_._spiderLeg&&(v.removeLayer(_._spiderLeg),delete _._spiderLeg);M.fire("unspiderfied",{cluster:this,markers:H}),M._ignoreMove=!1,M._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(_,y){var M,v,j,H,U=this._group,tt=U._map,rt=U._featureGroup,it=this._group.options.spiderLegPolylineOptions;for(U._ignoreMove=!0,M=0;M<_.length;M++)H=tt.layerPointToLatLng(y[M]),v=_[M],j=new L.Polyline([this._latlng,H],it),tt.addLayer(j),v._spiderLeg=j,v._preSpiderfyLatlng=v._latlng,v.setLatLng(H),v.setZIndexOffset&&v.setZIndexOffset(1e6),rt.addLayer(v);this.setOpacity(.3),U._ignoreMove=!1,U.fire("spiderfied",{cluster:this,markers:_})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(_,y){var M,v,j,H,U,tt,rt=this,it=this._group,lt=it._map,Jt=it._featureGroup,Mt=this._latlng,$t=lt.latLngToLayerPoint(Mt),It=L.Path.SVG,he=L.extend({},this._group.options.spiderLegPolylineOptions),re=he.opacity;for(re===void 0&&(re=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),It?(he.opacity=0,he.className=(he.className||"")+" leaflet-cluster-spider-leg"):he.opacity=re,it._ignoreMove=!0,M=0;M<_.length;M++)v=_[M],tt=lt.layerPointToLatLng(y[M]),j=new L.Polyline([Mt,tt],he),lt.addLayer(j),v._spiderLeg=j,It&&(U=(H=j._path).getTotalLength()+.1,H.style.strokeDasharray=U,H.style.strokeDashoffset=U),v.setZIndexOffset&&v.setZIndexOffset(1e6),v.clusterHide&&v.clusterHide(),Jt.addLayer(v),v._setPos&&v._setPos($t);for(it._forceLayout(),it._animationStart(),M=_.length-1;0<=M;M--)tt=lt.layerPointToLatLng(y[M]),(v=_[M])._preSpiderfyLatlng=v._latlng,v.setLatLng(tt),v.clusterShow&&v.clusterShow(),It&&((H=(j=v._spiderLeg)._path).style.strokeDashoffset=0,j.setStyle({opacity:re}));this.setOpacity(.3),it._ignoreMove=!1,setTimeout(function(){it._animationEnd(),it.fire("spiderfied",{cluster:rt,markers:_})},200)},_animationUnspiderfy:function(_){var y,M,v,j,H,U,tt=this,rt=this._group,it=rt._map,lt=rt._featureGroup,Jt=_?it._latLngToNewLayerPoint(this._latlng,_.zoom,_.center):it.latLngToLayerPoint(this._latlng),Mt=this.getAllChildMarkers(null,!0),$t=L.Path.SVG;for(rt._ignoreMove=!0,rt._animationStart(),this.setOpacity(1),M=Mt.length-1;0<=M;M--)(y=Mt[M])._preSpiderfyLatlng&&(y.closePopup(),y.setLatLng(y._preSpiderfyLatlng),delete y._preSpiderfyLatlng,U=!0,y._setPos&&(y._setPos(Jt),U=!1),y.clusterHide&&(y.clusterHide(),U=!1),U&<.removeLayer(y),$t&&(H=(j=(v=y._spiderLeg)._path).getTotalLength()+.1,j.style.strokeDashoffset=H,v.setStyle({opacity:0}
4)));rt._ignoreMove=!1,setTimeout(function(){var It=0;for(M=Mt.length-1;0<=M;M--)(y=Mt[M])._spiderLeg&&It++;for(M=Mt.length-1;0<=M;M--)(y=Mt[M])._spiderLeg&&(y.clusterShow&&y.clusterShow(),y.setZIndexOffset&&y.setZIndexOffset(0),1<It&<.removeLayer(y),it.removeLayer(y._spiderLeg),delete y._spiderLeg);rt._animationEnd(),rt.fire("unspiderfied",{cluster:tt,markers:Mt})},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(_){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(_))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(_){this._spiderfied&&this._spiderfied.unspiderfy(_)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(_){_._spiderLeg&&(this._featureGroup.removeLayer(_),_.clusterShow&&_.clusterShow(),_.setZIndexOffset&&_.setZIndexOffset(0),this._map.removeLayer(_._spiderLeg),delete _._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(_){return _?_ instanceof L.MarkerClusterGroup?_=_._topClusterLevel.getAllChildMarkers():_ instanceof L.LayerGroup?_=_._layers:_ instanceof L.MarkerCluster?_=_.getAllChildMarkers():_ instanceof L.Marker&&(_=[_]):_=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(_),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(_),this},_flagParentsIconsNeedUpdate:function(_){var y,M;for(y in _)for(M=_[y].__parent;M;)M._iconNeedsUpdate=!0,M=M.__parent},_refreshSingleMarkerModeMarkers:function(_){var y,M;for(y in _)M=_[y],this.hasLayer(M)&&M.setIcon(this._overrideMarkerIcon(M))}}),L.Marker.include({refreshIconOptions:function(_,y){var M=this.options.icon;return L.setOptions(M,_),this.setIcon(M),y&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),$.MarkerClusterGroup=vt,$.MarkerCluster=ui,Object.defineProperty($,"__esModule",{value:!0})}),(()=>{var $=Object.create,vt=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,y=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,v=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),j=(e,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of _(i))!M.call(e,a)&&a!==r&&vt(e,a,{get:()=>i[a],enumerable:!(o=ui(i,a))||o.enumerable});return e},H=(e,i,r)=>(r=e!=null?$(y(e)):{},j(i||!e||!e.__esModule?vt(r,"default",{value:e,enumerable:!0}):r,e)),U=v((e,i)=>{function r(){this.__data__=[],this.size=0}i.exports=r}),tt=v((e,i)=>{function r(o,a){return o===a||o!==o&&a!==a}i.exports=r}),rt=v((e,i)=>{var r=tt();function o(a,u){for(var h=a.length;h--;)if(r(a[h][0],u))return h;return-1}i.exports=o}),it=v((e,i)=>{var r=rt(),o=Array.prototype,a=o.splice;function u(h){var p=this.__data__,d=r(p,h);if(d<0)return!1;var m=p.length-1;return d==m?p.pop():a.call(p,d,1),--this.size,!0}i.exports=u}),lt=v((e,i)=>{var r=rt();function o(a){var u=this.__data__,h=r(u,a);return h<0?void 0:u[h][1]}i.exports=o}),Jt=v((e,i)=>{var r=rt();function o(a){return r(this.__data__,a)>-1}i.exports=o}),Mt=v((e,i)=>{var r=rt();function o(a,u){var h=this.__data__,p=r(h,a);return p<0?(++this.size,h.push([a,u])):h[p][1]=u,this}i.exports=o}),$t=v((e,i)=>{var r=U(),o=it(),a=lt(),u=Jt(),h=Mt();function p(d){var m=-1,w=d==null?0:d.length;for(this.clear();++m<w;
vendor: 3,704 bytes, line 4
4){var C=d[m];this.set(C[0],C[1])}}p.prototype.clear=r,p.prototype.delete=o,p.prototype.get=a,p.prototype.has=u,p.prototype.set=h,i.exports=p}),It=v((e,i)=>{var r=$t();function o(){this.__data__=new r,this.size=0}i.exports=o}),he=v((e,i)=>{function r(o){var a=this.__data__,u=a.delete(o);return this.size=a.size,u}i.exports=r}),re=v((e,i)=>{function r(o){return this.__data__.get(o)}i.exports=r}),bi=v((e,i)=>{function r(o){return this.__data__.has(o)}i.exports=r}),vn=v((e,i)=>{var r=typeof global=="object"&&global&&global.Object===Object&&global;i.exports=r}),He=v((e,i)=>{var r=vn(),o=typeof self=="object"&&self&&self.Object===Object&&self,a=r||o||Function("return this")();i.exports=a}),Ci=v((e,i)=>{var r=He(),o=r.Symbol;i.exports=o}),nr=v((e,i)=>{var r=Ci(),o=Object.prototype,a=o.hasOwnProperty,u=o.toString,h=r?r.toStringTag:void 0;function p(d){var m=a.call(d,h),w=d[h];try{d[h]=void 0;var C=!0}catch{}var S=u.call(d);return C&&(m?d[h]=w:delete d[h]),S}i.exports=p}),te=v((e,i)=>{var r=Object.prototype,o=r.toString;function a(u){return o.call(u)}i.exports=a}),Kt=v((e,i)=>{var r=Ci(),o=nr(),a=te(),u="[object Null]",h="[object Undefined]",p=r?r.toStringTag:void 0;function d(m){return m==null?m===void 0?h:u:p&&p in Object(m)?o(m):a(m)}i.exports=d}),Ke=v((e,i)=>{function r(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}i.exports=r}),fe=v((e,i)=>{var r=Kt(),o=Ke(),a="[object AsyncFunction]",u="[object Function]",h="[object GeneratorFunction]",p="[object Proxy]";function d(m){if(!o(m))return!1;var w=r(m);return w==u||w==h||w==a||w==p}i.exports=d}),oe=v((e,i)=>{var r=He(),o=r["__core-js_shared__"];i.exports=o}),xi=v((e,i)=>{var r=oe(),o=(function(){var u=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})();function a(u){return!!o&&o in u}i.exports=a}),pt=v((e,i)=>{var r=Function.prototype,o=r.toString;function a(u){if(u!=null){try{return o.call(u)}catch{}try{return u+""}catch{}}return""}i.exports=a}),rr=v((e,i)=>{var r=fe(),o=xi(),a=Ke(),u=pt(),h=/[\\^$.*+?()[\]{}|]/g,p=/^\[object .+?Constructor\]$/,d=Function.prototype,m=Object.prototype,w=d.toString,C=m.hasOwnProperty,S=RegExp("^"+w.call(C).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O(Z){if(!a(Z)||o(Z))return!1;var q=r(Z)?S:p;return q.test(u(Z))}i.exports=O}),ht=v((e,i)=>{function r(o,a){return o?.[a]}i.exports=r}),St=v((e,i)=>{var r=rr(),o=ht();function a(u,h){var p=o(u,h);return r(p)?p:void 0}i.exports=a}),Qt=v((e,i)=>{var r=St(),o=He(),a=r(o,"Map");i.exports=a}),Zt=v((e,i)=>{var r=St(),o=r(Object,"create");i.exports=o}),zt=v((e,i)=>{var r=Zt();function o(){this.__data__=r?r(null):{},this.size=0}i.exports=o}),wt=v((e,i)=>{function r(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}i.exports=r}),Lt=v((e,i)=>{var r=Zt(),o="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;function h(p){var d=this.__data__;if(r){var m=d[p];return m===o?void 0:m}return u.call(d,p)?d[p]:void 0}i.exports=h}),Pe=v((e,i)=>{var r=Zt(),o=Object.prototype,a=o.hasOwnProperty;function u(h){var p=this.__data__;return r?p[h]!==void 0:a.call(p,h)}i.exports=u}),Re=v((e,i)=>{var r=Zt(),o="__lodash_hash_undefined__";function a(u,h){var p=this.__data__;return this.size+=this.has(u)?0:1,p[u]=r&&h===void 0?o:h,this}i.exports=a}),ye=v((e,i)=>{var r=zt(),o=wt(),a=Lt(),u=Pe(),h=Re();function p(d){var m=-1,w=d==null?0:d.length;for(this.clear();++m<w;){var C=d[m];this.set(C[0],C[1])}}p.prototype.clear=r,p.prototype.delete=o,p.prototype.get=a,p.prototype.has=u,p.prototype.set=h,i.exports=p}),Ln=v((e,i)=>{var r=ye(),o=$t(),a=Qt();function u(){this.size=0,this.__data__={hash:new r,map:new(a||o),str
vendor: 5,026 bytes, line 4
4ing:new r}}i.exports=u}),ki=v((e,i)=>{function r(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}i.exports=r}),Ie=v((e,i)=>{var r=ki();function o(a,u){var h=a.__data__;return r(u)?h[typeof u=="string"?"string":"hash"]:h.map}i.exports=o}),Jr=v((e,i)=>{var r=Ie();function o(a){var u=r(this,a).delete(a);return this.size-=u?1:0,u}i.exports=o}),or=v((e,i)=>{var r=Ie();function o(a){return r(this,a).get(a)}i.exports=o}),sr=v((e,i)=>{var r=Ie();function o(a){return r(this,a).has(a)}i.exports=o}),li=v((e,i)=>{var r=Ie();function o(a,u){var h=r(this,a),p=h.size;return h.set(a,u),this.size+=h.size==p?0:1,this}i.exports=o}),Mi=v((e,i)=>{var r=Ln(),o=Jr(),a=or(),u=sr(),h=li();function p(d){var m=-1,w=d==null?0:d.length;for(this.clear();++m<w;){var C=d[m];this.set(C[0],C[1])}}p.prototype.clear=r,p.prototype.delete=o,p.prototype.get=a,p.prototype.has=u,p.prototype.set=h,i.exports=p}),wi=v((e,i)=>{var r=$t(),o=Qt(),a=Mi(),u=200;function h(p,d){var m=this.__data__;if(m instanceof r){var w=m.__data__;if(!o||w.length<u-1)return w.push([p,d]),this.size=++m.size,this;m=this.__data__=new a(w)}return m.set(p,d),this.size=m.size,this}i.exports=h}),ar=v((e,i)=>{var r=$t(),o=It(),a=he(),u=re(),h=bi(),p=wi();function d(m){var w=this.__data__=new r(m);this.size=w.size}d.prototype.clear=o,d.prototype.delete=a,d.prototype.get=u,d.prototype.has=h,d.prototype.set=p,i.exports=d}),ur=v((e,i)=>{var r=St(),o=(function(){try{var a=r(Object,"defineProperty");return a({},"",{}),a}catch{}})();i.exports=o}),bn=v((e,i)=>{var r=ur();function o(a,u,h){u=="__proto__"&&r?r(a,u,{configurable:!0,enumerable:!0,value:h,writable:!0}):a[u]=h}i.exports=o}),lr=v((e,i)=>{var r=bn(),o=tt();function a(u,h,p){(p!==void 0&&!o(u[h],p)||p===void 0&&!(h in u))&&r(u,h,p)}i.exports=a}),$r=v((e,i)=>{function r(o){return function(a,u,h){for(var p=-1,d=Object(a),m=h(a),w=m.length;w--;){var C=m[o?w:++p];if(u(d[C],C,d)===!1)break}return a}}i.exports=r}),Qr=v((e,i)=>{var r=$r(),o=r();i.exports=o}),to=v((e,i)=>{var r=He(),o=typeof e=="object"&&e&&!e.nodeType&&e,a=o&&typeof i=="object"&&i&&!i.nodeType&&i,u=a&&a.exports===o,h=u?r.Buffer:void 0,p=h?h.allocUnsafe:void 0;function d(m,w){if(w)return m.slice();var C=m.length,S=p?p(C):new m.constructor(C);return m.copy(S),S}i.exports=d}),Cn=v((e,i)=>{var r=He(),o=r.Uint8Array;i.exports=o}),qi=v((e,i)=>{var r=Cn();function o(a){var u=new a.constructor(a.byteLength);return new r(u).set(new r(a)),u}i.exports=o}),ve=v((e,i)=>{var r=qi();function o(a,u){var h=u?r(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.length)}i.exports=o}),ut=v((e,i)=>{function r(o,a){var u=-1,h=o.length;for(a||(a=Array(h));++u<h;)a[u]=o[u];return a}i.exports=r}),hr=v((e,i)=>{var r=Ke(),o=Object.create,a=(function(){function u(){}return function(h){if(!r(h))return{};if(o)return o(h);u.prototype=h;var p=new u;return u.prototype=void 0,p}})();i.exports=a}),pr=v((e,i)=>{function r(o,a){return function(u){return o(a(u))}}i.exports=r}),xn=v((e,i)=>{var r=pr(),o=r(Object.getPrototypeOf,Object);i.exports=o}),kn=v((e,i)=>{var r=Object.prototype;function o(a){var u=a&&a.constructor,h=typeof u=="function"&&u.prototype||r;return a===h}i.exports=o}),Mn=v((e,i)=>{var r=hr(),o=xn(),a=kn();function u(h){return typeof h.constructor=="function"&&!a(h)?r(o(h)):{}}i.exports=u}),qe=v((e,i)=>{function r(o){return o!=null&&typeof o=="object"}i.exports=r}),hi=v((e,i)=>{var r=Kt(),o=qe(),a="[object Arguments]";function u(h){return o(h)&&r(h)==a}i.exports=u}),wn=v((e,i)=>{var r=hi(),o=qe(),a=Object.prototype,u=a.hasOwnProperty,h=a.propertyIsEnumerable,p=r((function(){return arguments})())?r:function(d){return o(d)&&u.call(d,"callee")&&!h.call(d,"callee")};i.exports=p}),Ei=v((e,i)=>{var r=Array.isArray;i.exports=r}),cr=v((e,i)=>{var r=9007199254740991;function o(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=r}i.exports=o}),En=v((e,i)=>{var r=fe(),o=cr();function a(u){return u!=null&&o(u.length)&&!r(u)}i.exports=a}),dr=v((e,i)=>{var r=En(),o=qe();function a(u){return o(u)&&r(u)}i.exports=a}),Wi=v((e,i)=>{function r(){return!1}i.exports=r}),_r=v((e,i)=>{var r=He(),o=Wi(),a=typeof e=="object"&&e&&!e.nodeType&&e,u=a&&typeof i=="object"&&i&&!i.nodeType&&i,h=u&&u.exports===a,p=h?r.Buffer:void 0,d=p?p.isBuffer:void 0,m=d||o;i.exports=m}),eo=v((e,i)=>{var r=Kt(),o=xn(),a=qe(),u="[object Object]",h=Function.prototype,p=Object.prototype,d=h.toString,m=p.hasOwnProperty,w=d.call(Object);function C(S){if(!a(S)||r(S)!=u)return!1;var O=o(S);if(O===null)return!0;var Z=m.call(O,"constructor")&&O.constructor;return typeof Z=="function"&&Z instanceof Z&&d.call(Z)==w}i.exports=C}),Bn=v((e,i)=>{var r=Kt(),o=cr(),a=qe(),u="[object Arguments]",h="[object Array]",p="[object Boolean]",d="[object Date]",m="[object Error]",w="[object Function]",C="[object Map]",S="[object Number]",O="[object Object]",Z="[object RegExp]",q="[object Set]",et="[object String]",nt="[object WeakMap]",k="[object ArrayBuffer]",I="[object DataView]",G="[object Float32Array]",Y="[object Float64Array
4]",X="[object Int8Array]",J="[object Int16Array]",f="[object Int32Array]",b="[object Uint8Array]",x="[object Uint8ClampedArray]",D="[object Uint16Array]",B="[object Uint32Array]",E={};E[G]=E[Y]=E[X]=E[J]=E[f]=E[b]=E[x]=E[D]=E[B]=!0,E[u]=E[h]=E[k]=E[p]=E[I]=E[d]=E[m]=E[w]=E[C]=E[S]=E[O]=E[Z]=E[q]=E[et]=E[nt]=!1;function R(T){return a(T)&&o(T.length)&&!!E[r(T)]}i.exports=R}),pi=v((e,i)=>{function r(o){return function(a){return o(a)}}i.exports=r}),Bi=v((e,i)=>{var r=vn(),o=typeof e=="object"&&e&&!e.nodeType&&e,a=o&&typeof i=="object"&&i&&!i.nodeType&&i,u=a&&a.exports===o,h=u&&r.process,p=(function(){try{var d=a&&a.require&&a.require("util").types;return d||h&&h.binding&&h.binding("util")}catch{}})();i.exports=p}),Pi=v((e,i)=>{var r=Bn(),o=pi(),a=Bi(),u=a&&a.isTypedArray,h=u?o(u):r;i.exports=h}),Ai=v((e,i)=>{function r(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}i.exports=r}),Pn=v((e,i)=>{var r=bn(),o=tt(),a=Object.prototype,u=a.hasOwnProperty;function h(p,d,m){var w=p[d];(!(u.call(p,d)&&o(w,m))||m===void 0&&!(d in p))&&r(p,d,m)}i.exports=h}),An=v((e,i)=>{var r=Pn(),o=bn();function a(u,h,p,d){var m=!p;p||(p={});for(var w=-1,C=h.length;++w<C;){var S=h[w],O=d?d(p[S],u[S],S,p,u):void 0;O===void 0&&(O=u[S]),m?o(p,S,O):r(p,S,O)}return p}i.exports=a}),Di=v((e,i)=>{function r(o,a){for(var u=-1,h=Array(o);++u<o;)h[u]=a(u);return h}i.exports=r}),Dn=v((e,i)=>{var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;function a(u,h){var p=typeof u;return h=h??r,!!h&&(p=="number"||p!="symbol"&&o.test(u))&&u>-1&&u%1==0&&u<h}i.exports=a}),mr=v((e,i)=>{var r=Di(),o=wn(),a=Ei(),u=_r(),h=Dn(),p=Pi(),d=Object.prototype,m=d.hasOwnProperty;function w(C,S){var O=a(C),Z=!O&&o(C),q=!O&&!Z&&u(C),et=!O&&!Z&&!q&&p(C),nt=O||Z||q||et,k=nt?r(C.length,String):[],I=k.length;for(var G in C)(S||m.call(C,G))&&!(nt&&(G=="length"||q&&(G=="offset"||G=="parent")||et&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||h(G,I)))&&k.push(G);return k}i.exports=w}),Si=v((e,i)=>{function r(o){var a=[];if(o!=null)for(var u in Object(o))a.push(u);return a}i.exports=r}),Ct=v((e,i)=>{var r=Ke(),o=kn(),a=Si(),u=Object.prototype,h=u.hasOwnProperty;function p(d){if(!r(d))return a(d);var m=o(d),w=[];for(var C in d)C=="constructor"&&(m||!h.call(d,C))||w.push(C);return w}i.exports=p}),Tt=v((e,i)=>{var r=mr(),o=Ct(),a=En();function u(h){return a(h)?r(h,!0):o(h)}i.exports=u}),Yi=v((e,i)=>{var r=An(),o=Tt();function a(u){return r(u,o(u))}i.exports=a}),ci=v((e,i)=>{var r=lr(),o=to(),a=ve(),u=ut(),h=Mn(),p=wn(),d=Ei(),m=dr(),w=_r(),C=fe(),S=Ke(),O=eo(),Z=Pi(),q=Ai(),et=Yi();function nt(k,I,G,Y,X,J,f){var b=q(k,G),x=q(I,G),D=f.get(x);if(D){r(k,G,D);return}var B=J?J(b,x,G+"",k,I,f):void 0,E=B===void 0;if(E){var R=d(x),T=!R&&w(x),F=!R&&!T&&Z(x);B=x,R||T||F?d(b)?B=b:m(b)?B=u(b):T?(E=!1,B=o(x,!0)):F?(E=!1,B=a(x,!0)):B=[]:O(x)||p(x)?(B=b,p(b)?B=et(b):(!S(b)||C(b))&&(B=h(x))):E=!1}E&&(f.set(x,B),X(B,x,Y,J,f),f.delete(x)),r(k,G,B)}i.exports=nt}),di=v((e,i)=>{var r=ar(),o=lr(),a=Qr(),u=ci(),h=Ke(),p=Tt(),d=Ai();function m(w,C,S,O,Z){w!==C&&a(C,function(q,et){if(Z||(Z=new r),h(q))u(w,C,et,S,m,O,Z);else{var nt=O?O(d(w,et),q,et+"",w,C,Z):void 0;nt===void 0&&(nt=q),o(w,et,nt)}},p)}i.exports=m}),Xi=v((e,i)=>{function r(o){return o}i.exports=r}),yt=v((e,i)=>{function r(o,a,u){switch(u.length){case 0:return o.call(a);case 1:return o.call(a,u[0]);case 2:return o.call(a,u[0],u[1]);case 3:return o.call(a,u[0],u[1],u[2])}return o.apply(a,u)}i.exports=r}),Ft=v((e,i)=>{var r=yt(),o=Math.max;function a(u,h,p){return h=o(h===void 0?u.length-1:h,0),function(){for(var d=arguments,m=-1,w=o(d.length-h,0),C=Array(w);++m<w;)C[m]=d[h+m];m=-1;for(var S=Array(h+1);++m<h;)S[m]=d[m];return S[h]=p(C),r(u,this,S)}}i.exports=a}),Sn=v((e,i)=>{function r(o){return function(){return o}}i.exports=r}),Ji=v((e,i)=>{var r=Sn(),o=ur(),a=Xi(),u=o?function(h,p){return o(h,"toString",{configurable:!0,enumerable:!1,value:r(p),writable:!0})}:a;i.exports=u}),pe=v((e,i)=>{var r=800,o=16,a=Date.now;function u(h){var p=0,d=0;return function(){var m=a(),w=o-(m-d);if(d=m,w>0){if(++p>=r)return arguments[0]}else p=0;return h.apply(void 0,arguments)}}i.exports=u}),$i=v((e,i)=>{var r=Ji(),o=pe(),a=o(r);i.exports=a}),We=v((e,i)=>{var r=Xi(),o=Ft(),a=$i();function u(h,p){return a(o(h,p,r),h+"")}i.exports=u}),Nt=v((e,i)=>{var r=tt(),o=En(),a=Dn(),u=Ke();function h(p,d,m){if(!u(m))return!1;var w=typeof d;return(w=="number"?o(m)&&a(d,m.length):w=="string"&&d in m)?r(m[d],p):!1}i.exports=h}),Ye=v((e,i)=>{var r=We(),o=Nt();function a(u){return r(function(h,p){var d=-1,m=p.length,w=m>1?p[m-1]:void 0,C=m>2?p[2]:void 0;for(w=u.length>3&&typeof w=="function"?(m--,w):void 0,C&&o(p[0],p[1],C)&&(w=m<3?void 0:w,m=1),h=Object(h);++d<m;){var S=p[d];S&&u(h,S,d,w)}return h})}i.exports=a}),Ti=v((e,i)=>{var r=di(),o=Ye(),a=o(function(u,h,p){r(u,h,p)});i.exports=a}),Oi=v((e,i)=>{var r=Kt(),o=qe(),a="[object Symbol]";function u(h){return typeof h=="symbol"||o(h)&&r(h)==a}i.exports=u}),Tn=v((e,i)=>{var r=Ei(),o=Oi(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;function h(p,d){if(r(p))return!1;var m=typeof p;return m=="number"||m=="symbol"||m=="boolean"||p==null||o(p)?!0:u.test(p)||!a.test(p)||d!=null&&p in Object(d)}i.exports=h}),Qi=v((e,i)=>{var r=Mi(),o="Expected a function";function a(u,h){if(typeof u!="function"||h!=null&&typeof h!="function")throw new TypeError(o);var p=function(){var d=arguments,m=h?h.apply(this,d):d[0],w=p.cache;if(w.has(m))return w.get(m);var C=u.apply(this,d);return p.cache=w.set(m,C)||w,C};return p.cache=new(a.Cache||r),p}a.Cache=r,i.exports=a}),fr=v((e,i)=>{var r=Qi(),o=500;function a(u){var h=r(u,function(d){return p.size===o&&p.clear(),d}),p=h.cache;return h}i.exports=a}),On=v((e,i)=>{var r=fr(),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,u=r(function(h){var p=[];return h.charCodeAt(0)===46&&p.push(""),h.replace(o,function(d,m,w,
vendor: 10,361 bytes, line 4
4C){p.push(w?C.replace(a,"$1"):m||d)}),p});i.exports=u}),ct=v((e,i)=>{function r(o,a){for(var u=-1,h=o==null?0:o.length,p=Array(h);++u<h;)p[u]=a(o[u],u,o);return p}i.exports=r}),Le=v((e,i)=>{var r=Ci(),o=ct(),a=Ei(),u=Oi(),h=1/0,p=r?r.prototype:void 0,d=p?p.toString:void 0;function m(w){if(typeof w=="string")return w;if(a(w))return o(w,m)+"";if(u(w))return d?d.call(w):"";var C=w+"";return C=="0"&&1/w==-h?"-0":C}i.exports=m}),Bt=v((e,i)=>{var r=Le();function o(a){return a==null?"":r(a)}i.exports=o}),gr=v((e,i)=>{var r=Ei(),o=Tn(),a=On(),u=Bt();function h(p,d){return r(p)?p:o(p,d)?[p]:a(u(p))}i.exports=h}),Fn=v((e,i)=>{var r=Oi(),o=1/0;function a(u){if(typeof u=="string"||r(u))return u;var h=u+"";return h=="0"&&1/u==-o?"-0":h}i.exports=a}),Rn=v((e,i)=>{var r=gr(),o=Fn();function a(u,h){h=r(h,u);for(var p=0,d=h.length;u!=null&&p<d;)u=u[o(h[p++])];return p&&p==d?u:void 0}i.exports=a}),_i=v((e,i)=>{var r=Rn();function o(a,u,h){var p=a==null?void 0:r(a,u);return p===void 0?h:p}i.exports=o}),Xe=v((e,i)=>{(function(r,o){typeof e=="object"&&typeof i<"u"?i.exports=o():typeof define=="function"&&define.amd?define(o):(r=r||self).RBush=o()})(e,function(){"use strict";function r(k,I,G,Y,X){(function J(f,b,x,D,B){for(;D>x;){if(D-x>600){var E=D-x+1,R=b-x+1,T=Math.log(E),F=.5*Math.exp(2*T/3),N=.5*Math.sqrt(T*F*(E-F)/E)*(R-E/2<0?-1:1),z=Math.max(x,Math.floor(b-R*F/E+N)),K=Math.min(D,Math.floor(b+(E-R)*F/E+N));J(f,b,z,K,B)}var st=f[b],at=x,_t=D;for(o(f,x,b),B(f[D],st)>0&&o(f,x,D);at<_t;){for(o(f,at,_t),at++,_t--;B(f[at],st)<0;)at++;for(;B(f[_t],st)>0;)_t--}B(f[x],st)===0?o(f,x,_t):o(f,++_t,D),_t<=b&&(x=_t+1),b<=_t&&(D=_t-1)}})(k,I,G||0,Y||k.length-1,X||a)}function o(k,I,G){var Y=k[I];k[I]=k[G],k[G]=Y}function a(k,I){return k<I?-1:k>I?1:0}var u=function(k){k===void 0&&(k=9),this._maxEntries=Math.max(4,k),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function h(k,I,G){if(!G)return I.indexOf(k);for(var Y=0;Y<I.length;Y++)if(G(k,I[Y]))return Y;return-1}function p(k,I){d(k,0,k.children.length,I,k)}function d(k,I,G,Y,X){X||(X=et(null)),X.minX=1/0,X.minY=1/0,X.maxX=-1/0,X.maxY=-1/0;for(var J=I;J<G;J++){var f=k.children[J];m(X,k.leaf?Y(f):f)}return X}function m(k,I){return k.minX=Math.min(k.minX,I.minX),k.minY=Math.min(k.minY,I.minY),k.maxX=Math.max(k.maxX,I.maxX),k.maxY=Math.max(k.maxY,I.maxY),k}function w(k,I){return k.minX-I.minX}function C(k,I){return k.minY-I.minY}function S(k){return(k.maxX-k.minX)*(k.maxY-k.minY)}function O(k){return k.maxX-k.minX+(k.maxY-k.minY)}function Z(k,I){return k.minX<=I.minX&&k.minY<=I.minY&&I.maxX<=k.maxX&&I.maxY<=k.maxY}function q(k,I){return I.minX<=k.maxX&&I.minY<=k.maxY&&I.maxX>=k.minX&&I.maxY>=k.minY}function et(k){return{children:k,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function nt(k,I,G,Y,X){for(var J=[I,G];J.length;)if(!((G=J.pop())-(I=J.pop())<=Y)){var f=I+Math.ceil((G-I)/Y/2)*Y;r(k,f,I,G,X),J.push(I,f,f,G)}}return u.prototype.all=function(){return this._all(this.data,[])},u.prototype.search=function(k){var I=this.data,G=[];if(!q(k,I))return G;for(var Y=this.toBBox,X=[];I;){for(var J=0;J<I.children.length;J++){var f=I.children[J],b=I.leaf?Y(f):f;q(k,b)&&(I.leaf?G.push(f):Z(k,b)?this._all(f,G):X.push(f))}I=X.pop()}return G},u.prototype.collides=function(k){var I=this.data;if(!q(k,I))return!1;for(var G=[];I;){for(var Y=0;Y<I.children.length;Y++){var X=I.children[Y],J=I.leaf?this.toBBox(X):X;if(q(k,J)){if(I.leaf||Z(k,J))return!0;G.push(X)}}I=G.pop()}return!1},u.prototype.load=function(k){if(!k||!k.length)return this;if(k.length<this._minEntries){for(var I=0;I<k.length;I++)this.insert(k[I]);return this}var G=this._build(k.slice(),0,k.length-1,0);if(this.data.children.length)if(this.data.height===G.height)this._splitRoot(this.data,G);else{if(this.data.height<G.height){var Y=this.data;this.data=G,G=Y}this._insert(G,this.data.height-G.height-1,!0)}else this.data=G;return this},u.prototype.insert=function(k){return k&&this._insert(k,this.data.height-1),this},u.prototype.clear=function(){return this.data=et([]),this},u.prototype.remove=function(k,I){if(!k)return this;for(var G,Y,X,J=this.data,f=this.toBBox(k),b=[],x=[];J||b.length;){if(J||(J=b.pop(),Y=b[b.length-1],G=x.pop(),X=!0),J.leaf){var D=h(k,J.children,I);if(D!==-1)return J.children.splice(D,1),b.push(J),this._condense(b),this}X||J.leaf||!Z(J,f)?Y?(G++,J=Y.children[G],X=!1):J=null:(b.push(J),x.push(G),G=0,Y=J,J=J.children[0])}return this},u.prototype.toBBox=function(k){return k},u.prototype.compareMinX=function(k,I){return k.minX-I.minX},u.prototype.compareMinY=function(k,I){return k.minY-I.minY},u.prototype.toJSON=function(){return this.data},u.prototype.fromJSON=function(k){return this.data=k,this},u.prototype._all=function(k,I){for(var G=[];k;)k.leaf?I.push.apply(I,k.children):G.push.apply(G,k.children),k=G.pop();return I},u.prototype._build=function(k,I,G,Y){var X,J=G-I+1,f=this._maxEntries;if(J<=f)return p(X=et(k.slice(I,G+1)),this.toBBox),X;Y||(Y=Math.ceil(Math.log(J)/Math.log(f)),f=Math.ceil(J/Math.pow(f,Y-1))),(X=et([])).leaf=!1,X.height=Y;var b=Math.ceil(J/f),x=b*Math.ceil(Math.sqrt(f));nt(k,I,G,x,this.compareMinX);for(var D=I;D<=G;D+=x){var B=Math.min(D+x-1,G);nt(k,D,B,b,this.compareMinY);for(var E=D;E<=B;E+=b){var R=Math.min(E+b-1,B);X.children.push(this._build(k,E,R,Y-1))}}return p(X,this.toBBox),X},u.prototype._chooseSubtree=function(k,I,G,Y){for(;Y.push(I),!I.leaf&&Y.length-1!==G;){for(var X=1/0,J=1/0,f=void 0,b=0;b<I.children.length;b++){var x=I.children[b],D=S(x),B=(E=k,R=x,(Math.max(R.maxX,E.maxX)-Math.min(R.minX,E.minX))*(Math.max(R.maxY,E.maxY)-Math.min(R.minY,E.minY))-D);B<J?(J=B,X=D<X?D:X,f=x):B===J&&D<X&&(X=D,f=x)}I=f||I.children[0]}var E,R;return I},u.prototype._insert=function(k,I,G){var Y=G?k:this.toBBox(k),X=[],J=this._chooseSubtree(Y,this.data,I,X);for(J.children.push(k),m(J,Y);I>=0&&X[I].children.length>this._maxEntries;)this._split(X,I),I--;this._adjustParentBBoxes(Y,X,I)},u.prototype._split=function(k,I){var G=k[I],Y=G.children.length,X=this._minEntries;this._chooseSplitAxis(G,X,Y);var J=this._chooseSplitIndex(G,X,Y),f=et(G.children.splice(J,G.children.length-J));f.height=G.height,f.leaf=G.leaf,p(G,this.toBBox),p(f,this.toBBox),I?k[I-1].children.push(f):this._splitRoot(G,f)},u.prototype._splitRoot=function(k,I){this.data=et([k,I]),this.data.height=k.height+1,this.data.leaf=!1,p(this.data,this.toBBox)},u.prototype._chooseSplitIndex=function(k,I,G){for(var Y,X,J,f,b,x,D,B=1/0,E=1/0,R=I;R<=G-I;R++){var T=d(k,0,R,this.toBBox),F=d(k,R,G,this.toBBox),N=(X=T,J=F,f=void 0,b=void 0,x=void 0,D=void 0,f=Math.max(X.minX,J.minX),b=Math.max(X.minY,J.minY),x=Math.min(X.maxX,J.maxX),D=Math.min(X.maxY,J.maxY),Math.max(0,x-f)*Math.max(0,D-b)),z=S(T)+S(F);N<B?(B=N,Y=R,E=z<E?z:E):N===B&&z<E&&(E=z,Y=R)}return Y||G-I},u.prototype._chooseSplitAxis=function(k,I,G){var Y=k.leaf?this.compareMinX:w,X=k.leaf?this.compareMinY:C;this._allDistMargin(k,I,G,Y)<this._allDistMargin(k,I,G,X)&&k.children.sort(Y)},u.prototype._allDistMargin=function(k,I,G,Y){k.children.sort(Y);for(var X=this.toBBox,J=d(k,0,I,X),f=d(k,G-I,G,X),b=O(J)+O(f),x=I;x<G-I;x++){var D=k.children[x];m(J,k.leaf?X(D):D),b+=O(J)}for(var B=G-I-1;B>=I;B--){var E=k.children[B];m(f,k.leaf?X(E):E),b+=O(f)}return b},u.prototype._adjustParentBBoxes=function(k,I,G){for(var Y=G;Y>=0;Y--)m(I[Y],k)},u.prototype._condense=function(k){for(var I=k.length-1,G=void 0;I>=0;I--)k[I].children.length===0?I>0?(G=k[I-1].children).splice(G.indexOf(k[I]),1):this.clear():p(k[I],this.toBBox)},u})});Array.prototype.findIndex=Array.prototype.findIndex||function(e){if(this===null)throw new TypeError("Array.prototype.findIndex called on null or undefined");if(typeof e!="function")throw new TypeError("callback must be a function");for(var i=Object(this),r=i.length>>>0,o=arguments[1],a=0;a<r;a++)if(e.call(o,i[a],a,i))return a;return-1},Array.prototype.find=Array.prototype.find||function(e){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof e!="function")throw new TypeError("callback must be a function");for(var i=Object(this),r=i.length>>>0,o=arguments[1],a=0;a<r;a++){var u=i[a];if(e.call(o,u,a,i))return u}},typeof Object.assign!="function"&&(Object.assign=function(e){"use strict";if(e==null)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var i=1;i<arguments.length;i++){var r=arguments[i];if(r!=null)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}),(function(e){e.forEach(function(i){i.hasOwnProperty("remove")||Object.defineProperty(i,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype]),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,i){if(this==null)throw new TypeError('"this" is null or not defined');var r=Object(this),o=r.length>>>0;if(o===0)return!1;var a=i|0,u=Math.max(a>=0?a:o-Math.abs(a),0);function h(p,d){return p===d||typeof p=="number"&&typeof d=="number"&&isNaN(p)&&isNaN(d)}for(;u<o;){if(h(r[u],e))return!0;u++}return!1}});var In={name:"@geoman-io/leaflet-geoman-free",version:"2.19.3",description:"A Leaflet Plugin For Editing Geometry Layers in Leaflet 1.0",keywords:["leaflet","geoman","polygon management","geometry editing","map data","map overlay","polygon","geojson","leaflet-draw","data-field-geojson","ui-leaflet-draw"],files:["dist/leaflet-geoman.js","dist/leaflet-geoman.min.js","dist/leaflet-geoman.css","dist/leaflet-geoman.d.ts","dist/leaflet-geoman.js.map","dist/leaflet-geoman.css.map"],main:"dist/leaflet-geoman.js",module:"dist/leaflet-geoman.js",types:"dist/leaflet-geoman.d.ts",exports:{".":{types:"./dist/leaflet-geoman.d.ts",import:"./dist/leaflet-geoman.js",require:"./dist/leaflet-geoman.js",default:"./dist/leaflet-geoman.js"},"./dist/leaflet-geoman.css":"./dist/leaflet-geoman.css"},dependencies:{"@turf/boolean-contains":"^7.3.3","@turf/kinks":"^7.3.3","@turf/line-intersect":"^7.3.3","@turf/line-split":"^7.3.3",lodash:"4.18.1","polyclip-ts":"^0.16.8"},devDependencies:{"@types/leaflet":"^1.9.21","@vitest/coverage-v8":"^4.0.18","cross-env":"^10.1.0",cypress:"^15.9.0",esbuild:"^0.27.2",oxlint:"^1.0.0",oxfmt:"^0.32.0",husky:"^9.1.7",leaflet:"1.9.4","lint-staged":"^16.2.7","prosthetic-hand":"1.4.0",typescript:"^5.9.3",vitest:"^4.0.18"}
4,peerDependencies:{leaflet:"^1.2.0"},engines:{node:">=18.0.0"},scripts:{start:"npm run dev",dev:"cross-env DEV=true node bundle.mjs",build:"node bundle.mjs",test:"cypress run --browser chrome","test:unit":"vitest run","test:unit:watch":"vitest","test:unit:coverage":"vitest run --coverage","test:all":"npm run test:unit && npm run test",cypress:"cypress open",prepare:"npm run build && husky",lint:"oxlint src demo --fix && oxfmt --write src demo","lint:check":"oxlint src demo && oxfmt --check src demo",typecheck:"tsc --noEmit"},repository:{type:"git",url:"git://github.com/geoman-io/leaflet-geoman.git"},author:{name:"Geoman.io",email:"[email protected]",url:"http://geoman.io"},license:"MIT",bugs:{url:"https://github.com/geoman-io/leaflet-geoman/issues"},homepage:"https://geoman.io","lint-staged":{"*.js":"oxlint --fix","*.{js,css}":"oxfmt --write"}},mi=H(Ti()),Ut={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"}},Je={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\xF6schen"},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\xF6schen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verkn\xFCpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"L\xE4nge",segmentLength:"Segment L\xE4nge",area:"Fl\xE4che",radius:"Radius",perimeter:"Umfang",height:"H\xF6he",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},yr={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"}},vr={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 Ling
4karan",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},io={tooltips:{placeMarker:"Adaug\u0103 un punct",placeMarkerTouch:"Atinge\u021Bi harta pentru a plasa un punct",firstVertex:"Apas\u0103 aici pentru a ad\u0103uga primul Vertex",continueLine:"Apas\u0103 aici pentru a continua desenul",finishLine:"Apas\u0103 pe orice obiect pentru a finisa desenul",finishPoly:"Apas\u0103 pe primul obiect pentru a finisa",finishRect:"Apas\u0103 pentru a finisa",startCircle:"Apas\u0103 pentru a desena un cerc",finishCircle:"Apas\u0103 pentru a finisa un cerc",placeCircleMarker:"Adaug\u0103 un punct"},actions:{finish:"Termin\u0103",cancel:"Anuleaz\u0103",removeLastVertex:"\u0218terge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaug\u0103 o bulin\u0103",drawPolyButton:"Deseneaz\u0103 un poligon",drawLineButton:"Deseneaz\u0103 o linie",drawCircleButton:"Deseneaz\u0103 un cerc",drawRectButton:"Deseneaz\u0103 un dreptunghi",editButton:"Editeaz\u0103 straturile",dragButton:"Mut\u0103 straturile",cutButton:"Taie straturile",deleteButton:"\u0218terge straturile",drawCircleMarkerButton:"Deseneaz\u0103 marcatorul cercului",snappingButton:"Fixa\u021Bi marcatorul glisat pe alte straturi \u0219i v\xE2rfuri",pinningButton:"Fixa\u021Bi v\xE2rfurile partajate \xEEmpreun\u0103",rotateButton:"Roti\u021Bi stratul"}},Lr={tooltips:{placeMarker:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043C\u0430\u0440\u043A\u0435\u0440",placeMarkerTouch:"\u041A\u043E\u0441\u043D\u0438\u0442\u0435\u0441\u044C \u043A\u0430\u0440\u0442\u044B, \u0447\u0442\u043E\u0431\u044B \u0440\u0430\u0437\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043C\u0430\u0440\u043A\u0435\u0440",firstVertex:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043F\u0435\u0440\u0432\u044B\u0439 \u043E\u0431\u044A\u0435\u043A\u0442",continueLine:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435",finishLine:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043B\u044E\u0431\u043E\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440 \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F",finishPoly:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0435\u0440\u0432\u0443\u044E \u0442\u043E\u0447\u043A\u0443, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u044C",finishRect:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u044C",startCircle:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0435\u043D\u0442\u0440 \u043A\u0440\u0443\u0433\u0430",finishCircle:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0434\u0430\u0442\u044C \u0440\u0430\u0434\u0438\u0443\u0441",placeCircleMarker:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043A\u0440\u0443\u0433\u043E\u0432\u043E\u0439 \u043C\u0430\u0440\u043A\u0435\u0440"},actions:{finish:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",removeLastVertex:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435"},buttonTitles:{drawMarkerButton:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043C\u0430\u0440\u043A\u0435\u0440",drawPolyButton:"\u0420\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0438\u0433\u043E\u043D",drawLineButton:"\u0420\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u043A\u0440\u0438\u0432\u0443\u044
4E",drawCircleButton:"\u0420\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u043A\u0440\u0443\u0433",drawRectButton:"\u0420\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A",editButton:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u043E\u0439",dragButton:"\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 \u0441\u043B\u043E\u0439",cutButton:"\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C \u0441\u043B\u043E\u0439",deleteButton:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043B\u043E\u0439",drawCircleMarkerButton:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0440\u0443\u0433\u043E\u0432\u043E\u0439 \u043C\u0430\u0440\u043A\u0435\u0440",snappingButton:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043F\u0435\u0440\u0435\u0442\u0430\u0441\u043A\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u043C\u0430\u0440\u043A\u0435\u0440 \u043A \u0434\u0440\u0443\u0433\u0438\u043C \u0441\u043B\u043E\u044F\u043C \u0438 \u0432\u0435\u0440\u0448\u0438\u043D\u0430\u043C",pinningButton:"\u0421\u0432\u044F\u0437\u0430\u0442\u044C \u043E\u0431\u0449\u0438\u0435 \u0442\u043E\u0447\u043A\u0438 \u0432\u043C\u0435\u0441\u0442\u0435",rotateButton:"\u041F\u043E\u0432\u043E\u0440\u043E\u0442 \u0441\u043B\u043E\u044F"}},zn={tooltips:{placeMarker:"Presiona para colocar un marcador",placeMarkerTouch:"Toca el mapa para colocar un marcador",firstVertex:"Presiona para colocar el primer v\xE9rtice",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\xEDrculo",finishCircle:"Presiona para finalizar el c\xEDrculo",placeCircleMarker:"Presiona para colocar un marcador de c\xEDrculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar \xFAltimo v\xE9rtice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Pol\xEDgono",drawLineButton:"Dibujar L\xEDnea",drawCircleButton:"Dibujar C\xEDrculo",drawRectButton:"Dibujar Rect\xE1ngulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de C\xEDrculo",snappingButton:"El marcador de Snap arrastrado a otras capas y v\xE9rtices",pinningButton:"Fijar juntos los v\xE9rtices compartidos",rotateButton:"Rotar capa"}},Nn={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\xEBindigen",finishPoly:"Klik op het eerst punt om te be\xEBindigen",finishRect:"Klik om te be\xEBindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te be\xEBindigen",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"}},br={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 \xE0 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:"\xC9diter des calques",dragButton:"D\xE9placer 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:"\xC9pingler ensemble les s
4ommets partag\xE9s",rotateButton:"Tourner des calques"}},bt={tooltips:{placeMarker:"\u5355\u51FB\u653E\u7F6E\u6807\u8BB0",placeMarkerTouch:"\u70B9\u51FB\u5730\u56FE\u653E\u7F6E\u6807\u8BB0",firstVertex:"\u5355\u51FB\u653E\u7F6E\u9996\u4E2A\u9876\u70B9",continueLine:"\u5355\u51FB\u7EE7\u7EED\u7ED8\u5236",finishLine:"\u5355\u51FB\u4EFB\u4F55\u5B58\u5728\u7684\u6807\u8BB0\u4EE5\u5B8C\u6210",finishPoly:"\u5355\u51FB\u7B2C\u4E00\u4E2A\u6807\u8BB0\u4EE5\u5B8C\u6210",finishRect:"\u5355\u51FB\u5B8C\u6210",startCircle:"\u5355\u51FB\u653E\u7F6E\u5706\u5FC3",finishCircle:"\u5355\u51FB\u5B8C\u6210\u5706\u5F62",placeCircleMarker:"\u70B9\u51FB\u653E\u7F6E\u5706\u5F62\u6807\u8BB0"},actions:{finish:"\u5B8C\u6210",cancel:"\u53D6\u6D88",removeLastVertex:"\u79FB\u9664\u6700\u540E\u7684\u9876\u70B9"},buttonTitles:{drawMarkerButton:"\u7ED8\u5236\u6807\u8BB0",drawPolyButton:"\u7ED8\u5236\u591A\u8FB9\u5F62",drawLineButton:"\u7ED8\u5236\u7EBF\u6BB5",drawCircleButton:"\u7ED8\u5236\u5706\u5F62",drawRectButton:"\u7ED8\u5236\u957F\u65B9\u5F62",editButton:"\u7F16\u8F91\u56FE\u5C42",dragButton:"\u62D6\u62FD\u56FE\u5C42",cutButton:"\u526A\u5207\u56FE\u5C42",deleteButton:"\u5220\u9664\u56FE\u5C42",drawCircleMarkerButton:"\u753B\u5706\u5708\u6807\u8BB0",snappingButton:"\u5C06\u62D6\u52A8\u7684\u6807\u8BB0\u6355\u6349\u5230\u5176\u4ED6\u56FE\u5C42\u548C\u9876\u70B9",pinningButton:"\u5C06\u5171\u4EAB\u9876\u70B9\u56FA\u5B9A\u5728\u4E00\u8D77",rotateButton:"\u65CB\u8F6C\u56FE\u5C42"}},Fi={tooltips:{placeMarker:"\u55AE\u64CA\u653E\u7F6E\u6A19\u8A18",placeMarkerTouch:"\u9EDE\u64CA\u5730\u5716\u653E\u7F6E\u6A19\u8A18",firstVertex:"\u55AE\u64CA\u653E\u7F6E\u7B2C\u4E00\u500B\u9802\u9EDE",continueLine:"\u55AE\u64CA\u7E7C\u7E8C\u7E6A\u88FD",finishLine:"\u55AE\u64CA\u4EFB\u4F55\u5B58\u5728\u7684\u6A19\u8A18\u4EE5\u5B8C\u6210",finishPoly:"\u55AE\u64CA\u7B2C\u4E00\u500B\u6A19\u8A18\u4EE5\u5B8C\u6210",finishRect:"\u55AE\u64CA\u5B8C\u6210",startCircle:"\u55AE\u64CA\u653E\u7F6E\u5713\u5FC3",finishCircle:"\u55AE\u64CA\u5B8C\u6210\u5713\u5F62",placeCircleMarker:"\u9EDE\u64CA\u653E\u7F6E\u5713\u5F62\u6A19\u8A18"},actions:{finish:"\u5B8C\u6210",cancel:"\u53D6\u6D88",removeLastVertex:"\u79FB\u9664\u6700\u5F8C\u4E00\u500B\u9802\u9EDE"},buttonTitles:{drawMarkerButton:"\u653E\u7F6E\u6A19\u8A18",drawPolyButton:"\u7E6A\u88FD\u591A\u908A\u5F62",drawLineButton:"\u7E6A\u88FD\u7DDA\u6BB5",drawCircleButton:"\u7E6A\u88FD\u5713\u5F62",drawRectButton:"\u7E6A\u88FD\u65B9\u5F62",editButton:"\u7DE8\u8F2F\u5716\u5F62",dragButton:"\u79FB\u52D5\u5716\u5F62",cutButton:"\u88C1\u5207\u5716\u5F62",deleteButton:"\u522A\u9664\u5716\u5F62",drawCircleMarkerButton:"\u756B\u5713\u5708\u6A19\u8A18",snappingButton:"\u5C07\u62D6\u52D5\u7684\u6A19\u8A18\u5C0D\u9F4A\u5230\u5176\u4ED6\u5716\u5C64\u548C\u9802\u9EDE",pinningButton:"\u5C07\u5171\u4EAB\u9802\u9EDE\u56FA\u5B9A\u5728\u4E00\u8D77",rotateButton:"\u65CB\u8F49\u5716\u5F62"}},ge={tooltips:{placeMarker:"Clique para posicionar o marcador",placeMarkerTouch:"Toque no mapa para posicionar um marcador",firstVertex:"Clique para posicionar o primeiro v\xE9rtice",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\xEDrculo",finishCircle:"Clique para finalizar o c\xEDrculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover \xFAltimo v\xE9rtice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Pol\xEDgonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar C\xEDrculo",drawRectButton:"Desenhar Ret\xE2ngulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de C\xEDrculo",snappingButton:"Ajustar marcador arrastado a outras camadas e v\xE9rtices",pinningButton:"Unir v\xE9rtices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Tra\xE7ado Autom\xE1tico de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"\xC1rea",radius:"Raio",perimeter:"Per\xEDmetro",height:"Altura",width:"Largura",coordinates:"Posi\xE7\xE3o",coordinatesMarker:"Marcador de Posi\xE7\xE3o"}},jn={tooltips:{placeMarker:"Clique para colocar marcador",placeMarkerTouch:"Toque no mapa para colocar um marcador",firstVertex:"Clique para colocar primeiro v\xE9rtice",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\xEDrculo",finishCircle:"Clique para terminar o c\xEDrculo",placeCircleMarker:"Clique para colocar marcador de c\xEDrculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover \xDAltimo V\xE9rtice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Pol\xEDgonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar C\xEDrculo",drawRectButton:"Desenhar Ret\xE2ngulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de C\xEDrculo",snappingButton:"Ajustar marcador arrastado a outras camadas e v\xE9rtices",pinningButton:"Unir v\xE9rtices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Tra\xE7ado Autom\xE1tico de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"\xC1rea",radius:"Raio",perimeter:"Per\xEDmetro",height:"Altura",width:"Largura",coordinates:"Posi\xE7\xE3o",coordinatesMarker:"Marcador de Posi\xE7\xE3o"}},Gn={tooltips:{placeMarker:"Kliknij, aby umie\u015Bci\u0107 znacznik",placeMarkerTouch:"Dotknij map\u0119, aby umie\u015Bci\u0107 znacznik",firstVertex:"Kliknij, aby umie\u015Bci\u0107 pierwszy wierzcho\u0142ek",continueLine:"Kliknij, aby kontynuowa\u0107 rysowanie",finishLine:"Kliknij dowolny istniej\u0105cy znacznik, aby zako\u0144czy\u0107",finishPoly:"Kliknij pierwszy znacznik, aby zako\u0144czy\u0107",finishRect:"Kliknij, aby zako\u0144czy\u0107",startCircle:"Kliknij, aby umie\u015Bci\u0107 \u015Brodek okr\u0119gu",finishCircle:"Kliknij, aby zako\u0144czy\u0107 okr\u0105g",placeCircleMarker:"Kliknij, aby umie\u015Bci\u0107 znacznik okr\u0119gu",placeText:"Kliknij, aby umie\u015Bci\u0107 tekst"},actions:{finish:"Zako\u0144cz",cancel:"Anuluj",removeLastVertex:"Usu\u0144 ostatni wierzcho\u0142ek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielok\u0105t",drawLineButton:"Rysuj lini\u0119",drawCircleButton:"Rysuj okr\u0105g",drawRectButton:"Rysuj prostok\u0105t",editButton:"Edytuj warstwy",dragButton:"Przeci\u0105gnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usu\u0144 warstwy",drawCircleMarkerButton:"Rysuj znacznik okr\u0105g\u0142y",snappingButton:"Przyci\u0105gnij przenoszony znacznik do innych warstw i wierzcho\u0142k\xF3w",pinningButton:"Przypnij wsp\xF3lne wierzcho\u0142ki razem",rotateButton:"Obr\xF3\u0107 warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne \u015Bledzenie linii"},measurements:{totalLength:"D\u0142ugo\u015B\u0107",segmentLength:"D\u0142ugo\u015B\u0107 odcinka",area:"Obszar",radius:"Promie\u0144",perimeter:"Obw\xF3d",height:"Wysoko\u015B\u0107",width:"Szeroko\u015B\u0107",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},Cr={tooltips:{placeMarker:"Klicka f\xF6r att placera mark\xF6r",placeMarkerTouch:"Tryck p\xE5 kartan f\xF6r att placera en mark\xF6r",firstVertex:"Klicka f\xF6r att placera f\xF6rsta h\xF6rnet",continueLine:"Klicka f\xF6r att forts\xE4tta rita",finishLine:"Klicka p\xE5 en existerande punkt f\xF6r att slutf\xF6ra",finishPoly:"Klicka p\xE5 den f\xF6rsta punkten f\xF6r att slutf\xF6ra",finishRect:"Klicka f\xF6r att slutf\xF6ra",startCircle:"Klicka f\xF6r att placera cirkelns centrum",finishCircle:"Klicka f\xF6r att slutf\xF6ra cirkeln",placeCircleMarker:"Klicka f\xF6r att placera cirkelmark\xF6r"},actions:{finish:"Slutf\xF6r",cancel:"Avbryt",removeLastVertex:"Ta bort sista h\xF6rnet"},buttonTitles:{drawMarkerButton:"Rita Mark\xF6r",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\xF6r",snappingButton:"Sn\xE4pp dra mark\xF6ren till andra lager och h\xF6rn",pinningButton:"F\xE4st delade h\xF6rn tillsammans",rotateButton:"Rotera lagret"}},Zn={tooltips:{placeMarker:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u
403B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u0394\u03B5\u03AF\u03BA\u03C4\u03B7",placeMarkerTouch:"\u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03C3\u03C4\u03BF \u03C7\u03AC\u03C1\u03C4\u03B7 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u03B4\u03B5\u03AF\u03BA\u03C4\u03B7",firstVertex:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03BF \u03C0\u03C1\u03CE\u03C4\u03BF \u03C3\u03B7\u03BC\u03B5\u03AF\u03BF",continueLine:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C3\u03C5\u03BD\u03B5\u03C7\u03AF\u03C3\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03C3\u03C7\u03B5\u03B4\u03B9\u03AC\u03B6\u03B5\u03C4\u03B5",finishLine:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03C3\u03B5 \u03BF\u03C0\u03BF\u03B9\u03BF\u03BD\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03C5\u03C0\u03AC\u03C1\u03C7\u03BF\u03BD \u03C3\u03B7\u03BC\u03B5\u03AF\u03BF \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BF\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03C9\u03B8\u03B5\u03AF",finishPoly:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03C3\u03C4\u03BF \u03C0\u03C1\u03CE\u03C4\u03BF \u03C3\u03B7\u03BC\u03B5\u03AF\u03BF \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03C3\u03B5\u03C4\u03B5",finishRect:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03C3\u03B5\u03C4\u03B5",startCircle:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u03BA\u03AD\u03BD\u03C4\u03C1\u03BF \u039A\u03CD\u03BA\u03BB\u03BF\u03C5",finishCircle:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BF\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03CE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03BF\u03BD \u039A\u03CD\u03BA\u03BB\u03BF",placeCircleMarker:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u039A\u03C5\u03BA\u03BB\u03B9\u03BA\u03CC \u0394\u03B5\u03AF\u03BA\u03C4\u03B7"},actions:{finish:"\u03A4\u03AD\u03BB\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",removeLastVertex:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03C4\u03B5\u03BB\u03B5\u03C5\u03C4\u03B1\u03AF\u03BF\u03C5 \u03C3\u03B7\u03BC\u03B5\u03AF\u03BF\u03C5"},buttonTitles:{drawMarkerButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u0394\u03B5\u03AF\u03BA\u03C4\u03B7",drawPolyButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u03A0\u03BF\u03BB\u03C5\u03B3\u03CE\u03BD\u03BF\u03C5",drawLineButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u0393\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2",drawCircleButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u039A\u03CD\u03BA\u03BB\u03BF\u03C5",drawRectButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u039F\u03C1\u03B8\u03BF\u03B3\u03C9\u03BD\u03AF\u03BF\u03C5",editButton:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u0395\u03C0\u03B9\u03C0\u03AD\u03B4\u03C9\u03BD",dragButton:"\u039C\u03B5\u03C4\u03B1\u03C6\u03BF\u03C1\u03AC \u0395\u03C0\u03B9\u03C0\u03AD\u03B4\u03C9\u03BD",cutButton:"\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE \u0395\u03C0\u03B9\u03C0\u03AD\u03B4\u03C9\u03BD",deleteButton:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u0395\u03C0\u03B9\u03C0\u03AD\u03B4\u03C9\u03BD",drawCircleMarkerButton:"\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u039A\u03C5\u03BA\u03BB\u03B9\u03BA\u03BF\u03CD \u0394\u03B5\u03AF\u03BA\u03C4\u03B7",snappingButton:"\u03A0\u03C1\u03BF\u03C3\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03C4\u03BF\u03C5 \u0394\u03B5\u03AF\u03BA\u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C6\u03BF\u03C1\u03AC\u03C2 \u03C3\u03B5 \u03AC\u03BB\u03BB\u03B1 \u0395\u03C0\u03AF\u03C0\u03B5\u03B4\u03B1 \u03BA\u03B1\u03B9 \u039A\u03BF\u03C1\u03C5\u03C6\u03AD\u03C2",pinningButton:"\u03A0\u03B5\u03C1\u03B9\u03BA\u03BF\u03C0\u03AE \u03BA\u03BF\u03B9\u03BD\u03CE\u03BD \u03BA\u03BF\u03C1\u03C5\u03C6\u03CE\u03BD \u03BC\u03B1\u03B6\u03AF",rotateButton:"\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03C4\u03B5 \u03C4\u03BF \u03C3\u03C4\u03C1\u03CE\u03BC\u03B1"}},se={tooltips:{placeMarker:"Kattintson a jel\xF6l\u0151 elhelyez\xE9s\xE9hez",placeMarkerTouch:"\xC9rintse meg a t\xE9rk\xE9pet a jel\xF6l\u0151 elhelyez\xE9s\xE9hez",firstVertex:"Kattintson az els\u0151 pont elhelyez\xE9s\xE9hez",continueLine:"Kattintson a k\xF6vetkez\u0151 pont elhelyez\xE9s\xE9hez",finishLine:"A befejez\xE9shez kattintson egy megl\xE9v\u0151 pontra",finishPoly:"A befejez\xE9shez kattintson az els\u0151 pontra",finishRect:"Kattintson a befejez\xE9shez",startCircle:"Kattintson a k\xF6r k\xF6z\xE9ppontj\xE1nak elhelyez\xE9s\xE9hez",finishCircle:"Kattintson a k\xF6r befejez\xE9s\xE9hez",placeCircleMarker:"Kattintson a k\xF6rjel\xF6l\u0151 elhelyez\xE9s\xE9hez"},actions:{finish:"Befejez\xE9s",cancel:"M\xE9gse",removeLastVertex:"Utols\xF3 pont elt\xE1vol\xEDt\xE1sa"},buttonTitles:{drawMarkerButton:"Jel\xF6l\u0151 rajzol\xE1sa",drawPolyButton:"Poligon rajzol\xE1sa",drawLineButton:"Vonal rajzol\xE1sa",drawCircleButton:"K\xF6r rajzol\xE1sa",drawRectButton:"N\xE9gyzet rajzol\xE1sa",editButton:"Elemek szerkeszt\xE9se",dragButton:"Elemek mozgat\xE1sa",cutButton:"Elemek v\xE1g\xE1sa",deleteButton:"Elemek t\xF6rl\xE9se",drawCircleMarkerButton:"K\xF6r jel\xF6l\u0151 rajzol\xE1sa",snappingButton:"Kapcsolja a jel\xF6lt\u0151t m\xE1sik elemhez vagy ponthoz",pinningButton:"K\xF6z\xF6s pontok \xF6sszek\xF6t\xE9se",rotateButton:"F\xF3lia elforgat\xE1sa"}},Ri={tooltips:{placeMarker:"Tryk for at placere en mark\xF8r",placeMarkerTouch:"Tryk p\xE5 kortet for at placere en mark\xF8r",firstVertex:"Tryk for at placere det f\xF8rste punkt",continueLine:"Tryk for at forts\xE6tte linjen",finishLine:"Tryk p\xE5 et eksisterende punkt for at afslutte",finishPoly:"Tryk p\xE5 det f\xF8rste 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\xF8r"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer mark\xF8r",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Tr\xE6k",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmark\xF8r",snappingButton:"Fastg\xF8r trukket mark\xF8r til andre elementer",pinningButton:"Sammenl\xE6g delte elementer",rotateButton:"Roter laget"}},xr={tooltips:{placeMarker:"Klikk for \xE5 plassere punkt",placeMarkerTouch:"Trykk p\xE5 kartet for \xE5 plassere et punkt",firstVertex:"Klikk for \xE5 plassere f\xF8rste punkt",continueLine:"Klikk for \xE5 tegne videre",finishLine:"Klikk p\xE5 et eksisterende punkt for \xE5 fullf\xF8re",finishPoly:"Klikk f\xF8rste punkt for \xE5 fullf\xF8re",finishRect:"Klikk for \xE5 fullf\xF8re",startCircle:"Klikk for \xE5 sette sirkel midtpunkt",finishCircle:"Klikk for \xE5 fullf\xF8re sirkel",placeCircleMarker:"Klikk for \xE5 plassere sirkel",placeText:"Klikk for \xE5 plassere tekst"},actions:{finish:"Fullf\xF8r",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\xE9r objekter",drawTextButton:"Tegn tekst",scaleButton:"Skal\xE9r objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Omr\xE5de",radiu
4s:"Radius",perimeter:"Omriss",height:"H\xF8yde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmark\xF8r"}},ze={tooltips:{placeMarker:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u062C\u0627\u0646\u0645\u0627\u06CC\u06CC \u0646\u0634\u0627\u0646",placeMarkerTouch:"\u0631\u0648\u06CC \u0646\u0642\u0634\u0647 \u0636\u0631\u0628\u0647 \u0628\u0632\u0646\u06CC\u062F \u062A\u0627 \u0646\u0634\u0627\u0646 \u0628\u06AF\u0630\u0627\u0631\u06CC\u062F",firstVertex:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u0631\u0633\u0645 \u0627\u0648\u0644\u06CC\u0646 \u0631\u0623\u0633",continueLine:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u0627\u062F\u0627\u0645\u0647 \u0631\u0633\u0645",finishLine:"\u06A9\u0644\u06CC\u06A9 \u0631\u0648\u06CC \u0647\u0631 \u0646\u0634\u0627\u0646 \u0645\u0648\u062C\u0648\u062F \u0628\u0631\u0627\u06CC \u067E\u0627\u06CC\u0627\u0646",finishPoly:"\u06A9\u0644\u06CC\u06A9 \u0631\u0648\u06CC \u0627\u0648\u0644\u06CC\u0646 \u0646\u0634\u0627\u0646 \u0628\u0631\u0627\u06CC \u067E\u0627\u06CC\u0627\u0646",finishRect:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u067E\u0627\u06CC\u0627\u0646",startCircle:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u0631\u0633\u0645 \u0645\u0631\u06A9\u0632 \u062F\u0627\u06CC\u0631\u0647",finishCircle:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u067E\u0627\u06CC\u0627\u0646 \u0631\u0633\u0645 \u062F\u0627\u06CC\u0631\u0647",placeCircleMarker:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u0631\u0633\u0645 \u0646\u0634\u0627\u0646 \u062F\u0627\u06CC\u0631\u0647",placeText:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u0646\u0648\u0634\u062A\u0646 \u0645\u062A\u0646"},actions:{finish:"\u067E\u0627\u06CC\u0627\u0646",cancel:"\u0644\u0641\u0648",removeLastVertex:"\u062D\u0630\u0641 \u0622\u062E\u0631\u06CC\u0646 \u0631\u0623\u0633"},buttonTitles:{drawMarkerButton:"\u062F\u0631\u062C \u0646\u0634\u0627\u0646",drawPolyButton:"\u0631\u0633\u0645 \u0686\u0646\u062F\u0636\u0644\u0639\u06CC",drawLineButton:"\u0631\u0633\u0645 \u062E\u0637",drawCircleButton:"\u0631\u0633\u0645 \u062F\u0627\u06CC\u0631\u0647",drawRectButton:"\u0631\u0633\u0645 \u0686\u0647\u0627\u0631\u0636\u0644\u0639\u06CC",editButton:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u0627\u06CC\u0647\u200C\u0647\u0627",dragButton:"\u062C\u0627\u0628\u062C\u0627\u06CC\u06CC \u0644\u0627\u06CC\u0647\u200C\u0647\u0627",cutButton:"\u0628\u0631\u0634 \u0644\u0627\u06CC\u0647\u200C\u0647\u0627",deleteButton:"\u062D\u0630\u0641 \u0644\u0627\u06CC\u0647\u200C\u0647\u0627",drawCircleMarkerButton:"\u0631\u0633\u0645 \u0646\u0634\u0627\u0646 \u062F\u0627\u06CC\u0631\u0647",snappingButton:"\u0646\u0634\u0627\u0646\u06AF\u0631 \u0631\u0627 \u0628\u0647 \u0644\u0627\u06CC\u0647\u200C\u0647\u0627 \u0648 \u0631\u0626\u0648\u0633 \u062F\u06CC\u06AF\u0631 \u0628\u06A9\u0634\u06CC\u062F",pinningButton:"\u0631\u0626\u0648\u0633 \u0645\u0634\u062A\u0631\u06A9 \u0631\u0627 \u0628\u0627 \u0647\u0645 \u067E\u06CC\u0646 \u06A9\u0646\u06CC\u062F",rotateButton:"\u0686\u0631\u062E\u0634 \u0644\u0627\u06CC\u0647",drawTextButton:"\u0631\u0633\u0645 \u0645\u062A\u0646",scaleButton:"\u0645\u0642\u06CC\u0627\u0633\u200C\u06AF\u0630\u0627\u0631\u06CC",autoTracingButton:"\u0631\u062F\u06CC\u0627\u0628 \u062E\u0648\u062F\u06A9\u0627\u0631"},measurements:{totalLength:"\u0637\u0648\u0644",segmentLength:"\u0637\u0648\u0644 \u0628\u062E\u0634",area:"\u0646\u0627\u062D\u06CC\u0647",radius:"\u0634\u0639\u0627\u0639",perimeter:"\u0645\u062D\u06CC\u0637",height:"\u0627\u0631\u062A\u0641\u0627\u0639",width:"\u0639\u0631\u0636",coordinates:"\u0645\u0648\u0642\u0639\u06CC\u062A",coordinatesMarker:"\u0645\u0648\u0642\u0639\u06CC\u062A \u0646\u0634\u0627\u0646"}},kr={tooltips:{placeMarker:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043C\u0430\u0440\u043A\u0435\u0440",placeMarkerTouch:"\u0422\u043E\u0440\u043A\u043D\u0456\u0442\u044C\u0441\u044F \u043A\u0430\u0440\u0442\u0438, \u0449\u043E\u0431 \u0440\u043E\u0437\u043C\u0456\u0441\u0442\u0438\u0442\u0438 \u043C\u0430\u0440\u043A\u0435\u0440",firstVertex:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043F\u0435\u0440\u0448\u0443 \u0432\u0435\u0440\u0448\u0438\u043D\u0443",continueLine:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u0440\u043E\u0434\u043E\u0432\u0436\u0438\u0442\u0438 \u043C\u0430\u043B\u044E\u0432\u0430\u0442\u0438",finishLine:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0439 \u0456\u0441\u043D\u0443\u044
4E\u0447\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440 \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u044F",finishPoly:"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u043F\u0435\u0440\u0448\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440, \u0449\u043E\u0431 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0438",finishRect:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0438",startCircle:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0434\u043E\u0434\u0430\u0442\u0438 \u0446\u0435\u043D\u0442\u0440 \u043A\u043E\u043B\u0430",finishCircle:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0438 \u043A\u043E\u043B\u043E",placeCircleMarker:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043D\u0430\u043D\u0435\u0441\u0442\u0438 \u043A\u0440\u0443\u0433\u043E\u0432\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440"},actions:{finish:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0438",cancel:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",removeLastVertex:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044E \u0432\u0435\u0440\u0448\u0438\u043D\u0443"},buttonTitles:{drawMarkerButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043C\u0430\u0440\u043A\u0435\u0440",drawPolyButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043F\u043E\u043B\u0456\u0433\u043E\u043D",drawLineButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043A\u0440\u0438\u0432\u0443",drawCircleButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043A\u043E\u043B\u043E",drawRectButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043F\u0440\u044F\u043C\u043E\u043A\u0443\u0442\u043D\u0438\u043A",editButton:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0448\u0430\u0440\u0438",dragButton:"\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 \u0448\u0430\u0440\u0438",cutButton:"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0448\u0430\u0440\u0438",deleteButton:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0448\u0430\u0440\u0438",drawCircleMarkerButton:"\u041C\u0430\u043B\u044E\u0432\u0430\u0442\u0438 \u043A\u0440\u0443\u0433\u043E\u0432\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440",snappingButton:"\u041F\u0440\u0438\u0432\u2019\u044F\u0437\u0430\u0442\u0438 \u043F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0443\u0442\u0438\u0439 \u043C\u0430\u0440\u043A\u0435\u0440 \u0434\u043E \u0456\u043D\u0448\u0438\u0445 \u0448\u0430\u0440\u0456\u0432 \u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043D",pinningButton:"\u0417\u0432'\u044F\u0437\u0430\u0442\u0438 \u0441\u043F\u0456\u043B\u044C\u043D\u0456 \u0432\u0435\u0440\u0448\u0438\u043D\u0438 \u0440\u0430\u0437\u043E\u043C",rotateButton:"\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438 \u0448\u0430\u0440"}},Mr={tooltips:{placeMarker:"\u0130\u015Faret\xE7i yerle\u015Ftirmek i\xE7in t\u0131klay\u0131n",placeMarkerTouch:"\u0130\u015Faret\xE7i yerle\u015Ftirmek i\xE7in haritaya dokunun",firstVertex:"\u0130lk tepe noktas\u0131n\u0131 yerle\u015Ftirmek i\xE7in t\u0131klay\u0131n",continueLine:"\xC7izime devam etmek i\xE7in t\u0131klay\u0131n",finishLine:"Bitirmek i\xE7in mevcut herhangi bir i\u015Faret\xE7iyi t\u0131klay\u0131n",finishPoly:"Bitirmek i\xE7in ilk i\u015Faret\xE7iyi t\u0131klay\u0131n",finishRect:"Bitirmek i\xE7in t\u0131klay\u0131n",startCircle:"Daire merkezine yerle\u015Ftirmek i\xE7in t\u0131klay\u0131n",finishCircle:"Daireyi bitirmek i\xE7in t\u0131klay\u0131n",placeCircleMarker:"Daire i\u015Faret\xE7isi yerle\u015Ftirmek i\xE7in t\u0131klay\u0131n"},actions:{finish:"Bitir",cancel:"\u0130ptal",removeLastVertex:"Son k\xF6\u015Feyi kald\u0131r"},buttonTitles:{drawMarkerButton:"\xC7izim \u0130\u015Faret\xE7isi",drawPolyButton:"\xC7okgenler \xE7iz",drawLineButton:"\xC7oklu \xE7izgi \xE7iz",drawCircleButton:"\xC7ember \xE7iz",drawRectButton:"Dikd\xF6rtgen \xE7iz",editButton:"Katmanlar\u0131 d\xFCzenle",dragButton:"Katmanlar\u0131 s\xFCr\xFCkle",cutButton:"Katmanlar\u0131 kes",deleteButton:"Katmanlar\u0131 kald\u0131r",drawCircleMarkerButton:"Daire i\u015Faret\xE7isi \xE7iz",snappingButton:"S\xFCr\xFCklenen i\u015Faret\xE7iyi di\u011Fer katmanlara ve k\xF6\u015Felere yap\u0131\u015Ft\u0131r",pinningButton:"Payla\u015F\u0131lan k\xF6\u015Feleri birbirine sabitle",rotateButton:"Katman\u0131 d\xF6nd\xFCr"}},Un={tooltips:{placeMarker:"Kliknut\xEDm vytvo\u0159\xEDte zna\u010Dku",placeMarkerTouch:"Klepnut\xEDm na mapu um\xEDst\xEDte zna\u010Dku",firstVertex:"Kliknut\xEDm vytvo\u0159\xEDte prvn\xED objekt",continueLine:"Kliknut\xEDm pokra\u010Dujte v kreslen\xED",finishLine:"Kliknut\xED na libovol
4nou existuj\xEDc\xED zna\u010Dku pro dokon\u010Den\xED",finishPoly:"Vyberte prvn\xED bod pro dokon\u010Den\xED",finishRect:"Klikn\u011Bte pro dokon\u010Den\xED",startCircle:"Kliknut\xEDm p\u0159idejte st\u0159ed kruhu",finishCircle:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0434\u0430\u0442\u044C \u0440\u0430\u0434\u0438\u0443\u0441",placeCircleMarker:"Kliknut\xEDm nastavte polom\u011Br"},actions:{finish:"Dokon\u010Dit",cancel:"Zru\u0161it",removeLastVertex:"Zru\u0161it posledn\xED akci"},buttonTitles:{drawMarkerButton:"P\u0159idat zna\u010Dku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit k\u0159ivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obd\xE9ln\xEDk",editButton:"Upravit vrstvu",dragButton:"P\u0159eneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"P\u0159idat kruhovou zna\u010Dku",snappingButton:"Nav\xE1zat ta\u017Enou zna\u010Dku k dal\u0161\xEDm vrstv\xE1m a vrchol\u016Fm",pinningButton:"Spojit spole\u010Dn\xE9 body dohromady",rotateButton:"Oto\u010Dte vrstvu"}},wr={tooltips:{placeMarker:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30DE\u30FC\u30AB\u30FC\u3092\u914D\u7F6E",placeMarkerTouch:"\u5730\u56F3\u3092\u30BF\u30C3\u30D7\u3057\u3066\u30DE\u30FC\u30AB\u30FC\u3092\u914D\u7F6E",firstVertex:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u6700\u521D\u306E\u9802\u70B9\u3092\u914D\u7F6E",continueLine:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u63CF\u753B\u3092\u7D9A\u3051\u308B",finishLine:"\u4EFB\u610F\u306E\u30DE\u30FC\u30AB\u30FC\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7D42\u4E86",finishPoly:"\u6700\u521D\u306E\u30DE\u30FC\u30AB\u30FC\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7D42\u4E86",finishRect:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7D42\u4E86",startCircle:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u5186\u306E\u4E2D\u5FC3\u3092\u914D\u7F6E",finishCircle:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u5186\u306E\u63CF\u753B\u3092\u7D42\u4E86",placeCircleMarker:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u5186\u30DE\u30FC\u30AB\u30FC\u3092\u914D\u7F6E",placeText:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30C6\u30AD\u30B9\u30C8\u3092\u914D\u7F6E"},actions:{finish:"\u7D42\u4E86",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",removeLastVertex:"\u6700\u5F8C\u306E\u9802\u70B9\u3092\u524A\u9664"},buttonTitles:{drawMarkerButton:"\u30DE\u30FC\u30AB\u30FC\u3092\u63CF\u753B",drawPolyButton:"\u30DD\u30EA\u30B4\u30F3\u3092\u63CF\u753B",drawLineButton:"\u6298\u308C\u7DDA\u3092\u63CF\u753B",drawCircleButton:"\u5186\u3092\u63CF\u753B",drawRectButton:"\u77E9\u5F62\u3092\u63CF\u753B",editButton:"\u30EC\u30A4\u30E4\u30FC\u3092\u7DE8\u96C6",dragButton:"\u30EC\u30A4\u30E4\u30FC\u3092\u30C9\u30E9\u30C3\u30B0",cutButton:"\u30EC\u30A4\u30E4\u30FC\u3092\u5207\u308A\u53D6\u308A",deleteButton:"\u30EC\u30A4\u30E4\u30FC\u3092\u524A\u9664",drawCircleMarkerButton:"\u5186\u30DE\u30FC\u30AB\u30FC\u3092\u63CF\u753B",snappingButton:"\u30C9\u30E9\u30C3\u30B0\u3057\u305F\u30DE\u30FC\u30AB\u30FC\u3092\u4ED6\u306E\u30EC\u30A4\u30E4\u30FC\u3084\u9802\u70B9\u306B\u30B9\u30CA\u30C3\u30D7\u3059\u308B",pinningButton:"\u5171\u6709\u3059\u308B\u9802\u70B9\u3092\u540C\u6642\u306B\u52D5\u304B\u3059",rotateButton:"\u30EC\u30A4\u30E4\u30FC\u3092\u56DE\u8EE2",drawTextButton:"\u30C6\u30AD\u30B9\u30C8\u3092\u63CF\u753B"}},tn={tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",placeMarkerTouch:"Napauta karttaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimm\xE4isen osuuden",continueLine:"Klikkaa jatkaaksesi piirt\xE4mist\xE4",finishLine:"Klikkaa olemassa olevaa merkki\xE4 lopettaaksesi",finishPoly:"Klikkaa ensimm\xE4ist\xE4 merkki\xE4 lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyr\xE4n keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyr\xE4n",placeCircleMarker:"Klikkaa asettaaksesi ympyr\xE4merkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirr\xE4 merkkej\xE4",drawPolyButton:"Piirr\xE4 monikulmioita",drawLineButton:"Piirr\xE4 viivoja",drawCircleButton:"Piirr\xE4 ympyr\xE4",drawRectButton:"Piirr\xE4 neliskulmioita",editButton:"Muokkaa",dragButton:"Siirr\xE4",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirr\xE4 ympyr\xE4merkki",snappingButton:"Kiinnit\xE4 siirrett\xE4v\xE4 merkki toisiin muotoihin",pinningButton:"Kiinnit\xE4 jaetut muodot yhteen",rotateButton:"K\xE4\xE4nn\xE4",drawTextButton:"Piirr\xE4 teksti\xE4"}},Er={tooltips:{placeMarker:"\uB9C8\uCEE4 \uC704\uCE58\uB97C \uD074\uB9AD\uD558\uC138\uC694",placeMarkerTouch:"\uC9C0\uB3C4\uB97C \uD0ED\uD558\uC5EC \uB9C8\uCEE4\uB97C \uBC30\uCE58\uD558\uC138\uC694",firstVertex:"\uCCAB\uBC88\uC9F8 \uAF2D\uC9C0\uC810 \uC704\uCE58\uC744 \uD074\uB9AD\uD558\uC138\uC694",continueLine:"\uACC4\uC18D \uADF8\uB9AC\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694",finishLine:"\uB05D\uB0B4\uB824\uBA74 \uAE30\uC874 \uB9C8\uCEE4\uB97C \uD074\uB9AD\uD558\uC138\uC694",finishPoly:"\uB05D\uB0B4\uB824\uBA74 \uCC98\uC74C \uB9C8\uCEE4\uB97C \uD074\uB9AD\uD558\uC138\uC694",finishRect:"\uB05D\uB0B4\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694",startCircle:"\uC6D0\uC758 \uC911\uC2EC\uC774 \uB420 \uC704\uCE58\uB97C \uD074\uB9AD\uD558\uC138\uC694",finishCircle:"\uC6D0\uC744 \uB05D\uB0B4\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694",placeCircleMarker:"\uC6D0 \uB9C8\uCEE4 \uC704\uCE58\uB97C \uD074\uB9AD\uD558\uC138\uC694",placeText:"\uD14D\uC2A4\uD2B8 \uC704\uCE58\uB97C \uD074\uB9AD\uD558\uC138\uC694"},actions:{finish:"\uB05D\uB0B4\uAE30",cancel:"\uCDE8\uC18C",removeLastVertex:"\uB9C8\uC9C0\uB9C9 \uAF2D\uC9C0\uC810 \uC81C\uAC70"},buttonTitles:{drawMarkerButton:"\uB9C8\uCEE4 \uADF8\uB9AC\uAE30",drawPolyButton:"\uB2E4\uAC01\uD615 \uADF8\uB9AC\uAE30",drawLineButton:"\uB2E4\uAC01\uC120 \uADF8\uB9AC\uAE30",drawCircleButton:"\uC6D0 \uADF8\uB9AC\uAE30",drawRectButton:"\uC9C1\uC0AC\uAC01\uD615 \uADF8\uB9AC\uAE30",editButton:"\uB808\uC774\uC5B4 \uD3B8\uC9D1\uD558\uAE30",dragButton:"\uB808\uC774\uC5B4 \uB04C\uAE30",cutButton:"\uB808\uC774\uC5B4 \uC790\uB974\uAE30",deleteButton:"\uB808\uC774\uC5B4 \uC81C\uAC70\uD558\uAE30",drawCircleMarkerButton:"\uC6D0 \uB9C8\uCEE4 \uADF8\uB9AC\uAE30",snappingButton:"\uC7A1\uC544\uB048 \uB9C8\uCEE4\uB97C \uB2E4\uB978 \uB808\uC774\uC5B4 \uBC0F \uAF2D\uC9C0\uC810\uC5D0 \uB4E4\uB7EC\uBD99\uAC8C \uD558\uAE30",pinningButton:"\uACF5\uC720 \uAF2D\uC9C0\uC810\uC744 \uD568\uAED8 \uCC0D\uAE30",rotateButton:"\uB808\uC774\uC5B4 \uD68C\uC804\uD558\uAE30",drawTextButton:"\uD14D\uC2A4\uD2B8 \uADF8\uB9AC\uAE30"}},Br={tooltips:{placeMarker:"\u041C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",placeMarkerTouch:"\u041C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443 \u04AF\u0447\u04AF\u043D \u043A\u0430\u0440\u0442\u0430\u0433\u0430 \u0442\u0438\u0439\u0438\u04A3\u0438\u0437",firstVertex:"\u0411\u0438\u0440\u0438\u043D\u0447\u0438 \u0447\u043E\u043A\u0443\u043D\u0443 \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443\u043D\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",continueLine:"\u0421\u04AF\u0440\u04E9\u0442 \u0442\u0430\u0440\u0442\u0443\u0443\u043D\u0443 \u0443\u043B\u0430\u043D\u0442\u0443\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",finishLine:"\u0410\u044F\u043A\u0442\u043E\u043E \u04AF\u0447\u04AF\u043D \u0443\u0447\u0443\u0440\u0434\u0430\u0433\u044B \u043C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",finishPoly:"\u0411\u04AF\u0442\u04AF\u0440\u04AF\u04AF \u04AF\u0447\u04AF\u043D \u0431\u0438\u0440\u0438\u043D\u0447\u0438 \u043C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",finishRect:"\u0411\u04AF\u0442\u04AF\u0440\u04AF\u04AF \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",startCircle:"\u0410\u0439\u043B\u0430\u043D\u0430\u043D\u044B\u043D \u0431\u043E\u0440\u0431\u043E\u0440\u0443\u043D \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443\u043D\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",finishCircle:"\u0410\u0439\u043B\u0430\u043D\u0430\u043D\u044B \u0431\u04AF\u0442\u04AF\u0440\u04AF\u04AF \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",placeCircleMarker:"\u0422\u0435\u0433\u0435\u0440\u0435\u043A \u043C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437",placeText:"\u0422\u0435\u043A\u0441\u0442\u0442\u0438 \u0436\u0430\u0439\u0433\u0430\u0448\u0442\u044B\u0440\u0443\u0443 \u04AF\u0447\u04AF\u043D \u0431\u0430\u0441\u044B\u04A3\u044B\u0437"},actions:{finish:"\u0410\u044F\u0433\u044B",cancel:"\u0416\u043E\u043A \u043A\u044B\u043B\u0443\u0443",removeLastVertex:"\u0410\u043A\u044B\u0440\u043A\u044B \u0447\u043E\u043A\u0443\u043D\u0443 \u04E9\u0447\u04AF\u0440\u04AF\u04AF"},buttonTitles:{drawMarkerButton:"\u041C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0447\u0438\u0437\u0443\u0443",drawPolyButton:"\u041F\u043E\u043B\u0438\u0433\u043E\u043D \u0447\u0438\u0437\u0443\u0443",drawLineButton:"\u041F\u043E\u043B\u0438\u043B\u0438\u043D\u0438\u044F \u0447\u0438\u0437\u0443\u0443",drawCircleButton:"\u0414\u0430\u0439\u044B\u043D\u0434\u044B \u0447\u0438\u0437\u0443\u0443",drawRectButton:"\u041F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A \u0447\u0438\u0437\u0443\u0443",editButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443 \u0442\u04AF\u0437\u04E9\u0442\u04AF\u04AF",dragButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443 \u043A\u0430\u0440\u0430\u043F \u0441\u04AF\u0439\u043B\u04E9\u04AF",cutButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443\u043D \u0431\u0430\u0448\u044B\u043D \u043A\u0435\u0441\u04AF\u04AF",deleteButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443\u043D \u04E9\u0447\u04AF\u0440\u04AF\u04AF",drawCircleMarkerButton:"\u0414\u0430\u0439\u044B\u043D\u0434\u044B \u043C\u0430\u0440\u043A\u0435\u0440\u0434\u0438 \u0447\u0438\u0437\u0443\u0443",snappingButton:"\u0411\u0430\u0448\u043A\u0430 \u0441\u043B\u043E\u043E\u043F\u0442\u043E\u0440\u0434\u0443\u043D \u0436\u0430\u043D\u0430 \u0432\u0435\u0440\u0442\u0435\u043A\u0441\u0442\u0435\u0440\u0434\u0438\u043D \u0430\u0440\u0430\u0441\u044B\u043D\u0430 \u0447\u0435\u043A\u0438\u043B\u0434\u04E9\u04E9",pinningButton:"\u0411\u04E9\u043B\u04AF\u0448\u043A\u04E9\u043D \u0432\u0435\u0440\u0442\u0435\u043A\u0441\u0442\u0435\u0440\u0434\u0438 \u0431\u0438\u0440\u0433\u0435 \u0442\u0443\u0442\u0443\u0448\u0442\u0443\u0440\u0443\u0443",rotateButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443\u043D \u04E9\u0437\u0433\u04E9\u0440\u0442\u04AF\u04AF",drawTextButton:"\u0422\u0435\u043A\u0441\u0442 \u0447\u0438\u0437\u0443\u0443",scaleButton:"\u0421\u043B\u043E\u043E\u043F\u0442\u0443\u043D \u04E9\u043B\u0447\u04E9\u043C\u04AF\u043D \u04E9\u0437\u0433\u04E9\u0440\u0442\u04AF\u04AF",autoTracingButton:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0442\u044B\u043A \u0442\u0438\u0437\u043C\u0435\u0433\u0438 \u0447\u0438\u0437\u0443\u0443"},measurements:{totalLength:"\u0423\u0437\u0443\u043D\u0434\u0443\u043A",segmentLength:"\u0421\u0435\u0433\u043C\u0435\u043D\u0442 \u0443\u0437\u0443\u043D\u0434\u0443\u0433\u0443",area:"\u0410\u0439\u043C\u0430\u043A",radius:"\u0420\u0430\u0434\u0438\u0443\u0441",perimeter:"\u041F\u0435\u0440\u0438\u043C\u0435\u0442\u0440",height:"\u0414\u0438\u0430\u043C\u0435\u0442\u0440",width:"\u041A\u0435\u043D\u0447\u0438\u043B\u0438\u043A",coordinates:"\u041A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u0442\u0430\u0440",coordinatesMarker:"\u041C\u0430\u0440\u043A\u0435\u0440\u0434\u0438\u043D \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u0442\u0430\u0440\u044B"}},Pr=jn,Ae={en:Ut,de:Je,it:yr,id:vr,ro:io,ru:Lr,es:zn,nl:Nn,fr:br,pt:Pr,pt_br:ge,pt_pt:jn,zh:bt,zh_tw:Fi,pl:Gn,sv:Cr,el:Zn,hu:se,da:Ri,no:xr,fa:ze,ua:kr,tr:Mr,cz:Un,ja:wr,fi:tn,ko:Er,ky:Br},$e={_globalEditModeEnabled:!1,enableGlobalEditMode(e){let i={...e};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEac
vendor: 14,532 bytes, line 4
4h(r=>{this._isRelevantForEdit(r)&&r.pm.enable(i)}),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(e=>{e.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(e=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(e)},handleLayerAdditionInGlobalEditMode(){let e=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let i in e){let r=e[i];this._isRelevantForEdit(r)&&r.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:e}){this._addedLayersEdit[L.stamp(e)]=e},_isRelevantForEdit(e){return e.pm&&!(e instanceof L.LayerGroup)&&(!L.PM.optIn&&!e.options.pmIgnore||L.PM.optIn&&e.options.pmIgnore===!1)&&!e._pmTempLayer&&e.pm.options.allowEditing}},Ii=$e,ce={_globalDragModeEnabled:!1,enableGlobalDragMode(){let e=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},e.forEach(i=>{this._isRelevantForDrag(i)&&i.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 e=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,e.forEach(i=>{i.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 e=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let i in e){let r=e[i];this._isRelevantForDrag(r)&&r.pm.enableLayerDrag()}},_layerAddedDrag({layer:e}){this._addedLayersDrag[L.stamp(e)]=e},_isRelevantForDrag(e){return e.pm&&!(e instanceof L.LayerGroup)&&(!L.PM.optIn&&!e.options.pmIgnore||L.PM.optIn&&e.options.pmIgnore===!1)&&!e._pmTempLayer&&e.pm.options.draggable}},Ar=ce,Dr={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(e=>{this._isRelevantForRemoval(e)&&(e.pm.enabled()&&e.pm.disable(),e.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(e=>{e.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(e){let i=e.target;this._isRelevantForRemoval(i)&&!i.pm.dragging()&&(i.removeFrom(this.map.pm._getContainingLayer()),i.remove(),i instanceof L.LayerGroup?(this._fireRemoveLayerGroup(i),this._fireRemoveLayerGroup(this.map,i)):(i.pm._fireRemove(i),i.pm._fireRemove(this.map,i)))},_isRelevantForRemoval(e){return e.pm&&!(e instanceof L.LayerGroup)&&(!L.PM.optIn&&!e.options.pmIgnore||L.PM.optIn&&e.options.pmIgnore===!1)&&!e._pmTempLayer&&e.pm.options.allowRemoval},handleLayerAdditionInGlobalRemovalMode(){let e=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let i in e){let r=e[i];this._isRelevantForRemoval(r)&&(r.pm.enabled()&&r.pm.disable(),r.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:e}){this._addedLayersRemoval[L.stamp(e)]=e}},en=Dr,Qe={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(e=>e instanceof L.Polyline).forEach(e=>{this._isRelevantForRotate(e)&&e.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(e=>e instanceof L.Polyline).forEach(e=>{e.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(e){return e.pm&&e instanceof L.Polyline&&!(e instanceof L.LayerGroup)&&(!L.PM.optIn&&!e.options.pmIgnore||L.PM.optIn&&e.options.pmIgnore===!1)&&!e._pmTempLayer&&e.pm.options.allowRotation},handleLayerAdditionInGlobalRotateMode(){let e=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let i in e){let r=e[i];this._isRelevantForRemoval(r)&&r.pm.enableRotate()}},_layerAddedRotate({layer:e}){this._addedLayersRotate[L.stamp(e)]=e}},ti=Qe,nn=H(Ti()),Vn={_fireDrawStart(e="Draw",i={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},e,i)},_fireDrawEnd(e="Draw",i={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},e,i)},_fireCreate(e,i="Draw",r={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:e,layer:e},i,r)},_fireCenterPlaced(e="Draw",i={}){let r=e==="Draw"?this._layer:void 0,o=e!=="Draw"?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:r,layer:o,latlng:this._layer.getLatLng()},e,i)},_fireCut(e,i,r,o="Draw",a={}){this.__fire(e,"pm:cut",{shape:this._shape,layer:i,originalLayer:r},o,a)},_fireEdit(e=this._layer,i="Edit",r={}){this.__fire(e,"pm:edit",{layer:this._layer,shape:this.getShape()},i,r)},_fireEnable(e="Edit",i={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},e,i)},_fireDisable(e="Edit",i={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},e,i)},_fireUpdate(e="Edit",i={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},e,i)},_fireMarkerDragStart(e,i=void 0,r="Edit",o={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:i},r,o)},_fireMarkerDrag(e,i=void 0,r="Edit",o={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:i},r,o)},_fireMarkerDragEnd(e,i=void 0,r=void 0,o="Edit",a={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:i,intersectionReset:r},o,a)},_fireDragStart(e="Edit",i={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},e,i)},_fireDrag(e,i="Edit",r={}){this.__fire(this._layer,"pm:drag",{...e,shape:this.getShape()},i,r)},_fireDragEnd(e="Edit",i={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},e,i)},_fireDragEnable(e="Edit",i={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},e,i)},_fireDragDisable(e="Edit",i={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},e,i)},_fireRemove(e,i=e,r="Edit",o={}){this.__fire(e,"pm:remove",{layer:i,shape:this.getShape()},r,o)},_fireVertexAdded(e,i,r,o="Edit",a={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:e,indexPath:i,latlng:r,shape:this.getShape()},o,a)},_fireVertexRemoved(e,i,r="Edit",o={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:e,indexPath:i,shape:this.getShape()},r,o)},_fireVertexClick(e,i,r="Edit",o={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:e,indexPath:i,shape:this.getShape()},r,o)},_fireIntersect(e,i=this._layer,r="Edit",o={}){this.__fire(i,"pm:intersect",{layer:this._layer,intersection:e,shape:this.getShape()},r,o)},_fireLayerReset(e,i,r="Edit",o={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:e,indexPath:i,shape:this.getShape()},r,o)},_fireChange(e,i="Edit",r={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:e,shape:this.getShape()},i,r)},_fireTextChange(e,i="Edit",r={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:e,shape:this.getShape()},i,r)},_fireTextFocus(e="Edit",i={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},e,i)},_fireTextBlur(e="Edit",i={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},e,i)},_fireSnapDrag(e,i,r="Snapping",o={}){this.__fire(e,"pm:snapdrag",i,r,o)},_fireSnap(e,i,r="Snapping",o={}){this.__fire(e,"pm:snap",i,r,o)},_fireUnsnap(e,i,r="Snapping",o={}){this.__fire(e,"pm:unsnap",i,r,o)},_fireRotationEnable(e,i,r="Rotation",o={}){this.__fire(e,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},r,o)},_fireRotationDisable(e,i="Rotation",r={}){this.__fire(e,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},i,r)},_fireRotationStart(e,i,r="Rotation",o={}){this.__fire(e,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:i},r,o)},_fireRotation(e,i,r,o=this._rotationLayer,a="Rotation",u={}){this.__fire(e,"pm:rotate",{layer:o,helpLayer:this._layer,startAngle:this._startAngle,angle:o.pm.getAngle(),angleDiff:i,oldLatLngs:r,newLatLngs:o.getLatLngs()},a,u)},_fireRotationEnd(e,i,r,o="Rotation",a={}){this.__fire(e,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:i,angle:this._rotationLayer.pm.getAngle(),originLatLngs:r,newLatLngs:this._rotationLayer.getLatLngs()},o,a)},_fireActionClick(e,i,r,o="Toolbar",a={}){this.__fire(this._map,"pm:actionclick",{text:e.text,action:e,btnName:i,button:r},o,a)},_fireButtonClick(e,i,r="Toolbar",o={}){this.__fire(this._map,"pm:buttonclick",{btnName:e,button:i},r,o)},_fireLangChange(e,i,r,o,a="Global",u={}){this.__fire(this.map,"pm:langchange",{oldLang:e,activeLang:i,fallback:r,translations:o},a,u)},_fireGlobalDragModeToggled(e,i="Global",r={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:e,map:this.map},i,r)},_fireGlobalEditModeToggled(e,i="Global",r={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:e,map:this.map},i,r)},_fireGlobalRemovalModeToggled(e,i="Global",r={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:e,map:this.map},i,r)},_fireGlobalCutModeToggled(e="Global",i={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},e,i)},_fireGlobalDrawModeToggled(e="Global",i={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},e,i)},_fireGlobalRotateModeToggled(e="Global",i={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},e,i)},_fireRemoveLayerGroup(e,i=e,r="Edit",o={}){this.__fire(e,"pm:remove",{layer:i,shape:void 0},r,o)},_fireKeyeventEvent(e,i,r,o="Global",a={}){this.__fire(this.map,"pm:keyevent",{event:e,eventType:i,focusOn:r},o,a)},__fire(e,i,r,o,a={}){r=(0,nn.default)(r,a,{source:o}),L.PM.Utils._fireEvent(e,i,r)}},zi=Vn,rn=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(e){this.map=e,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),e.once("unload",this._unbindKeyListenerEvents,this)},_handleEscapeKey(e){let i=this.map.pm;return!i.getGlobalOptions().exitModeOnEscape||!(i.globalDrawModeEnabled()||i.globalEditModeEnabled()||i.globalDragModeEnabled()||i.globalRemovalModeEnabled()||i.globalRotateModeEnabled()||i.globalCutModeEnabled())?!1:(e.preventDefault(),i.globalDrawModeEnabled()&&i.disableDraw(),i.globalEditModeEnabled()&&i.disableGlobalEditMode(),i.globalDragModeEnabled()&&i.disableGlobalDragMode(),i.globalRemovalModeEnabled()&&i.disableGlobalRemovalMode(),i.globalRotateModeEnabled()&&i.disableGlobalRotateMode(),i.globalCutModeEnabled()&&i.disableGlobalCutMode(),!0)},_handleEnterKey(e){let i=this.map.pm;if(!i.getGlobalOptions().finishOnEnter)return!1;let r=i.Draw.getActiveShape();if(!r)return!1;let o=i.Draw[r];return!o||!o._finishShape||!this._canFinishShape(o,r)?!1:(e.preventDefault(),o._finishShape(),!0)},_canFinishShape(e,i){if(["Marker","CircleMarker","Text"].includes(i))return!1;if(i==="Rectangle")return e._startMarker!==void 0;if(i==="Circle")return e._centerMarker&&e._layerGroup?.hasLayer(e._centerMarker);if(e._layer&&e._layer.getLatLngs){let r=e._layer.getLatLngs();if(i==="Line")return(r.flat?r.flat():r).length>=2;if(i==="Polygon"||i==="Cut")return r.length>=3}return!1},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(e){let i="document";this.map.getContainer().contains(e.target)&&(i="map");let r={event:e,eventType:e.type,focusOn:i};this._lastEvents[e.type]=r,this._lastEvents.current=r,this.map.pm._fireKeyeventEvent(e,e.type,i),e.type==="
4keydown"&&(e.key==="Escape"&&this._handleEscapeKey(e),e.key==="Enter"&&this._handleEnterKey(e))},_onBlur(e){e.altKey=!1;let i={event:e,eventType:e.type,focusOn:"document"};this._lastEvents[e.type]=i,this._lastEvents.current=i},getLastKeyEvent(e="current"){return this._lastEvents[e]},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}}),ee=rn,ei=H(_i());function dt(e){let i=L.PM.activeLang;return(0,ei.default)(Ae[i],e)||(0,ei.default)(Ae.en,e)||e}function fi(){return window.matchMedia?!window.matchMedia("(pointer: coarse)").matches:!0}function ii(e){for(let i=0;i<e.length;i+=1){let r=e[i];if(Array.isArray(r)){if(ii(r))return!0}else if(r!=null&&r!=="")return!0}return!1}function Ni(e){return e.reduce((i,r)=>{if(r.length!==0){let o=Array.isArray(r)?Ni(r):r;Array.isArray(o)?o.length!==0&&i.push(o):i.push(o)}return i},[])}function on(e,i,r){let o={a:L.CRS.Earth.R,b:63567523142e-4,f:.0033528106647474805},{a,b:u,f:h}=o,p=e.lng,d=e.lat,m=r,w=Math.PI,C=i*w/180,S=Math.sin(C),O=Math.cos(C),Z=(1-h)*Math.tan(d*w/180),q=1/Math.sqrt(1+Z*Z),et=Z*q,nt=Math.atan2(Z,O),k=q*S,I=1-k*k,G=I*(a*a-u*u)/(u*u),Y=1+G/16384*(4096+G*(-768+G*(320-175*G))),X=G/1024*(256+G*(-128+G*(74-47*G))),J=m/(u*Y),f=2*Math.PI,b,x,D;for(;Math.abs(J-f)>1e-12;){b=Math.cos(2*nt+J),x=Math.sin(J),D=Math.cos(J);let K=X*x*(b+X/4*(D*(-1+2*b*b)-X/6*b*(-3+4*x*x)*(-3+4*b*b)));f=J,J=m/(u*Y)+K}let B=et*x-q*D*O,E=Math.atan2(et*D+q*x*O,(1-h)*Math.sqrt(k*k+B*B)),R=Math.atan2(x*S,q*D-et*x*O),T=h/16*I*(4+h*(4-3*I)),F=R-(1-T)*h*k*(J+T*x*(b+T*D*(-1+2*b*b))),N=p+F*180/w,z=E*180/w;return L.latLng(N,z)}function De(e,i,r,o,a=!0){let u,h,p,d=[];for(let m=0;m<r;m+=1){if(a)u=m*360/r+o,h=on(e,u,i),p=L.latLng(h.lng,h.lat);else{let w=e.lat+Math.cos(2*m*Math.PI/r)*i,C=e.lng+Math.sin(2*m*Math.PI/r)*i;p=L.latLng(w,C)}d.push(p)}return d}function sn(e,i,r){i=(i+360)%360;let o=Math.PI/180,a=180/Math.PI,{R:u}=L.CRS.Earth,h=e.lng*o,p=e.lat*o,d=i*o,m=Math.sin(p),w=Math.cos(p),C=Math.cos(r/u),S=Math.sin(r/u),O=Math.asin(m*C+w*S*Math.cos(d)),Z=h+Math.atan2(Math.sin(d)*S*w,C-m*Math.sin(O));Z*=a;let q=Z-360,et=Z<-180?Z+360:Z;return Z=Z>180?q:et,L.latLng([O*a,Z])}function ji(e,i,r){let o=e.latLngToContainerPoint(i),a=e.latLngToContainerPoint(r),u=Math.atan2(a.y-o.y,a.x-o.x)*180/Math.PI+90;return u+=u<0?360:0,u}function de(e,i,r,o){let a=ji(e,i,r);return sn(i,a,o)}function gi(e,i,r="asc"){if(!i||Object.keys(i).length===0)return(d,m)=>d-m;let o=Object.keys(i),a,u=o.length-1,h={};for(;u>=0;)a=o[u],h[a.toLowerCase()]=i[a],u-=1;function p(d){if(d instanceof L.Marker)return"Marker";if(d instanceof L.Circle)return"Circle";if(d instanceof L.CircleMarker)return"CircleMarker";if(d instanceof L.Rectangle)return"Rectangle";if(d instanceof L.Polygon)return"Polygon";if(d instanceof L.Polyline)return"Line"}return(d,m)=>{let w,C;if(e==="instanceofShape"){if(w=p(d.layer).toLowerCase(),C=p(m.layer).toLowerCase(),!w||!C)return 0}else{if(!d.hasOwnProperty(e)||!m.hasOwnProperty(e))return 0;w=d[e].toLowerCase(),C=m[e].toLowerCase()}let S=w in h?h[w]:Number.MAX_SAFE_INTEGER,O=C in h?h[C]:Number.MAX_SAFE_INTEGER,Z=0;return S<O?Z=-1:S>O&&(Z=1),r==="desc"?Z*-1:Z}}function qt(e,i=e.getLatLngs()){return e instanceof L.Polygon?L.polygon(i).getLatLngs():L.polyline(i).getLatLngs()}function Gi(e,i){if(i.options.crs?.projection?.MAX_LATITUDE){let r=i.options.crs?.projection?.MAX_LATITUDE;e.lat=Math.max(Math.min(r,e.lat),-r)}return e}function ni(e){return e.options.renderer||e._map&&(e._map._getPaneRenderer(e.options.pane)||e._map.options.renderer||e._map._renderer)||e._renderer}function Hn(e,i){if(e=e.trim().toLowerCase(),i[e])return e;let r=e.replace(/[-_\s]/g,"_").match(/^([a-z]{2,3})(?:_([a-z]{2,3}))?$/);if(r){let o=[];r[2]&&o.push(`${r[1]}_${r[2]}`),o.push(r[1]);
vendor: 18,348 bytes, line 4
4for(let a of o)if(i[a])return a}return e}var an=L.Class.extend({includes:[Ii,Ar,en,ti,zi],initialize(e){this.map=e,this.Draw=new L.PM.Draw(e),this.Toolbar=new L.PM.Toolbar(e),this.Keyboard=ee(),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(e)},setLang(e="en",i,r="en"){e=Hn(e,Ae);let o=L.PM.activeLang;i&&(Ae[e]=(0,mi.default)(Ae[r],i)),L.PM.activeLang=e,this.map.pm.Toolbar.reinit(),this._fireLangChange(o,e,r,Ae[e])},addControls(e){this.Toolbar.addControls(e)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(e="Polygon",i){e==="Poly"&&(e="Polygon"),this.Draw.enable(e,i)},disableDraw(e="Polygon"){e==="Poly"&&(e="Polygon"),this.Draw.disable(e)},setPathOptions(e,i={}){let r=i.ignoreShapes||[],o=i.merge||!1;this.map.pm.Draw.shapes.forEach(a=>{r.indexOf(a)===-1&&this.map.pm.Draw[a].setPathOptions(e,o)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(e){let i=(0,mi.default)(this.globalOptions,e);i.editable&&(i.resizeableCircleMarker=i.editable,delete i.editable);let r=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!i.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),r=!0);let o=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!i.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),o=!0),this.map.pm.Draw.shapes.forEach(a=>{this.map.pm.Draw[a].setOptions(i)}),r&&this.map.pm.Draw.CircleMarker.enable(),o&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(a=>{a.pm.setOptions(i)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=i,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(e=>{e.pm.enabled()&&e.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(e){return this.Draw.Cut.enable(e)},toggleGlobalCutMode(e){return this.Draw.Cut.toggle(e)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(e=!1){let i=L.PM.Utils.findLayers(this.map);if(!e)return i;let r=L.featureGroup();return r._pmTempLayer=!0,i.forEach(o=>{r.addLayer(o)}),r},getGeomanDrawLayers(e=!1){let i=L.PM.Utils.findLayers(this.map).filter(o=>o._drawnByGeoman===!0);if(!e)return i;let r=L.featureGroup();return r._pmTempLayer=!0,i.forEach(o=>{r.addLayer(o)}),r},_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(e){this._touchEventCounter===0&&(L.DomEvent.on(e,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(e,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(e){this._touchEventCounter===1&&(L.DomEvent.off(e,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(e,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(e){ni(this.map)._onMouseMove(this._createMouseEvent("mousemove",e))},_canvasTouchClick(e){let i="";e.type==="touchstart"||e.type==="pointerdown"?i="mousedown":(e.type==="touchend"||e.type==="pointerup"||e.type==="touchcancel"||e.type==="pointercancel")&&(i="mouseup"),i&&ni(this.map)._onClick(this._createMouseEvent(i,e))},_createMouseEvent(e,i){let r,o=i.touches[0]||i.changedTouches[0];try{r=new MouseEvent(e,{bubbles:i.bubbles,cancelable:i.cancelable,view:i.view,detail:o.detail,screenX:o.screenX,screenY:o.screenY,clientX:o.clientX,clientY:o.clientY,ctrlKey:i.ctrlKey,altKey:i.altKey,shiftKey:i.shiftKey,metaKey:i.metaKey,button:i.button,relatedTarget:i.relatedTarget})}catch{r=document.createEvent("MouseEvents"),r.initMouseEvent(e,i.bubbles,i.cancelable,i.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget)}return r}}),Kn=an,un=L.Control.extend({includes:[zi],options:{position:"topleft",disableByOtherButtons:!0},initialize(e){this._button=L.Util.extend({},this.options,e)},onAdd(e){return this._map=e,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):this._button.tool==="edit"?this._container=this._map.pm.Toolbar.editContainer:this._button.tool==="options"?this._container=this._map.pm.Toolbar.optionsContainer:this._button.tool==="custom"?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let e=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),e?e.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(e){return typeof e=="boolean"?this._button.toggleStatus=e: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(e){e&&e.preventDefault(),!this._button.disabled&&(this._button.onClick(e,{button:this,event:e}),this._clicked(e),this._button.afterClick(e,{button:this,event:e}))},_makeButton(e){let i=this.options.position.indexOf("right")>-1?"pos-right":"",r=L.DomUtil.create("div",`button-container ${i}`,this._container);e.title&&r.setAttribute("title",e.title);let o=L.DomUtil.create("a","leaflet-buttons-control-button",r);o.setAttribute("role","button"),o.setAttribute("tabindex","0"),o.href="#";let a=L.DomUtil.create("div",`leaflet-pm-actions-container ${i}`,r),u=e.actions,h={cancel:{text:dt("actions.cancel"),title:dt("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:dt("actions.finish"),title:dt("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:dt("actions.removeLastVertex"),title:dt("actions.removeLastVertex"),onClick(){this._map.pm.Draw[e.jsClass]._removeLastVertex()}},finish:{text:dt("actions.finish"),title:dt("actions.finish"),onClick(d){this._map.pm.Draw[e.jsClass]._finishShape(d)}}};e._preparedActions=u.map(d=>{let m=typeof d=="string"?d:d.name,w;if(h[m])w=h[m];else if(d.text)w=d;else return w;let C=L.DomUtil.create("a",`leaflet-pm-action ${i} action-${m}`,a);if(C.setAttribute("role","button"),C.setAttribute("tabindex","0"),C.href="#",w.title&&(C.title=w.title),C.innerHTML=w.text,L.DomEvent.disableClickPropagation(C),L.DomEvent.on(C,"click",L.DomEvent.stop),w._node=C,!e.disabled&&w.onClick){let S=O=>{O.preventDefault();let Z="",{buttons:q}=this._map.pm.Toolbar;for(let et in q)if(q[et]._button===e){Z=et;break}this._fireActionClick(w,Z,e)};L.DomEvent.addListener(C,"click",S,this),L.DomEvent.addListener(C,"click",w.onClick,this),L.DomEvent.addListener(C,"click",()=>this._updateActiveAction(e))}return w}),this._updateActiveAction(e),e.toggleStatus&&L.DomUtil.addClass(r,"active");let p=L.DomUtil.create("div","control-icon",o);return e.iconUrl&&p.setAttribute("src",e.iconUrl),e.className&&L.DomUtil.addClass(p,e.className),L.DomEvent.disableClickPropagation(o),L.DomEvent.on(o,"click",L.DomEvent.stop),e.disabled||(L.DomEvent.addListener(o,"click",this._onBtnClick,this),L.DomEvent.addListener(o,"click",this._triggerClick,this)),e.disabled&&(L.DomUtil.addClass(o,"pm-disabled"),o.setAttribute("aria-disabled","true")),r},_applyStyleClasses(){this._container&&(!this._button.toggleStatus||this._button.cssToggle===!1?(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")):(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let e="",{buttons:i}=this._map.pm.Toolbar;for(let r in i)if(i[r]._button===this._button){e=r;break}this._fireButtonClick(e,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let e="pm-disabled",i=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(i,e),i.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(i,e),i.setAttribute("aria-disabled","false"))},_updateActiveAction(e){e._preparedActions?.forEach(i=>{i?._node&&(i.isActive&&i.isActive.call(this)?L.DomUtil.addClass(i._node,"active-action"):L.DomUtil.removeClass(i._node,"active-action"))})}}),yi=un;L.Control.PMButton=yi;var ln=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(e){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(e)},reinit(){let e=this.isVisible;this.removeControls(),this._defineButtons(),e&&this.addControls()},init(e){this.map=e,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(e){let i=`${e}Container`;return this[i]||(this[i]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${e} leaflet-bar leaflet-control`)),this[i]},getButtons(){return this.buttons},addControls(e=this.options){typeof e.editPolygon<"u"&&(e.editMode=e.editPolygon),typeof e.deleteLayer<"u"&&(e.removalMode=e.deleteLayer),L.Util.setOptions(this,e),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let e=this.getButtons(),i={geomanIcons:{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 r in e){let o=e[r];L.Util.setOptions(o,{className:i.geomanIcons[r]})}},removeControls(){let e=this.getButtons();for(let i in e)e[i].remove();this.isVisible=!1},deleteControl(e){let i=this._btnNameMapping(e);this.buttons[i]&&(this.buttons[i].remove(),delete this.buttons[i])},toggleControls(e=this.options){this.isVisible?this.removeControls():this.addControls(e)},_addButton(e,i){return this.buttons[e]=i,this.options[e]=!!this.options[e]||!1,this.buttons[e]},triggerClickOnToggledButtons(e){for(let i in this.buttons){let r=this.buttons[i];r._button.disableByOtherButtons&&r!==e&&r.toggled()&&r._triggerClick()}},toggleButton(e,i,r=!0){e==="editPolygon"&&(e="editMode"),e==="deleteLayer"&&(e="removalMode");let o=e;return r&&this.triggerClickOnToggledButtons(this.buttons[o]),this.buttons[o]?this.buttons[o].toggle(i):!1},_defineButtons(){let e={className:"control-icon leaflet-pm-icon-marker",title:dt("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},i={title:dt("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},r={className:"control-icon leaflet-pm-icon-polyline",title:dt("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},o={title:dt("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:dt("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},u={title:dt("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},h={title:dt("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"]},p={title:dt("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"]},d={title:dt("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.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"]},m={title:dt("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"]},w={title:dt("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"]},C={className:"control-icon leaflet-pm-icon-text",title:dt("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(S,O)=>{this.map.pm.Draw[O.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(e)),this._addButton("drawPolyline",new L.Control.PMButton(r)),this._addButton("drawRectangle",new L.Control.PMButton(u)),this._addButton("drawPolygon",new L.Control.PMButton(i)),this._addButton("drawCircle",new L.Control.PMButton(o)),this._addButton("drawCircleMarker",new L.Control.PMButton(a)),this._addButton("drawText",new L.Control.PMButton(C)),this._addButton("editMode",new L.Control.PMButton(h)),this._addButton("dragMode",new L.Control.PMButton(p)),this._addButton("cutPolygon",new L.Control.PMButton(d)),this._addButton("removalMode",new L.Control.PMButton(m)),this._addButton("rotateMode",new L.Control.PMButton(w))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let e=this.getButtons(),i=[];this.options.drawControls===!1&&(i=i.concat(Object.keys(e).filter(r=>!e[r]._button.tool))),this.options.editControls===!1&&(i=i.concat(Object.keys(e).filter(r=>e[r]._button.tool==="edit"))),this.options.optionsControls===!1&&(i=i.concat(Object.keys(e).filter(r=>e[r]._button.tool==="options"))),this.options.customControls===!1&&(i=i.concat(Object.keys(e).filter(r=>e[r]._button.tool==="custom")));for(let r in e)if(this.options[r]&&i.indexOf(r)===-1){let o=e[r]._button.tool;o||(o="draw"),e[r].setPosition(this._getBtnPosition(o)),e[r].addTo(this.map)}},_getBtnPosition(e){return this.options.positions&&this.options.positions[e]?this.options.positions[e]:this.options.position},setBlockPosition(e,i){this.options.positions[e]=i,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(e,i){if(i)typeof i!="object"&&(i={name:i});else throw new TypeError("Button has no name");let r=this._btnNameMapping(e);if(!i.name)throw new TypeError("Button has no name");if(this.buttons[i.name])throw new TypeError("Button with this name already exists");let o=this.map.pm.Draw.createNewDrawInstance(i.name,r);i={...this.buttons[r]._button,...i};let a=this.createCustomControl(i);return{drawInstance:o,control:a}},createCustomControl(e){if(!e.name)throw new TypeError("Button has no name");if(this.buttons[e.name])throw new TypeError("Button with this name already exists");e.onClick||(e.onClick=()=>{}),e.afterClick||(e.afterClick=()=>{}),e.toggle!==!1&&(e.toggle=!0),e.block&&(e.block=e.block.toLowerCase()),(!e.block||e.block==="draw")&&(e.block=""),e.className?e.className.indexOf("control-icon")===-1&&(e.className=`control-icon ${e.className}
4`):e.className="control-icon";let i={tool:e.block,className:e.className,title:e.title||"",jsClass:e.name,onClick:e.onClick,afterClick:e.afterClick,doToggle:e.toggle,toggleStatus:!1,disableOtherButtons:e.disableOtherButtons??!0,disableByOtherButtons:e.disableByOtherButtons??!0,cssToggle:e.toggle,position:this.options.position,actions:e.actions||[],disabled:!!e.disabled};this.options[e.name]!==!1&&(this.options[e.name]=!0);let r=this._addButton(e.name,new L.Control.PMButton(i));return this.changeControlOrder(),r},controlExists(e){return!!this.getButton(e)},getButton(e){return this.getButtons()[e]},getButtonsInBlock(e){let i={};if(e)for(let r in this.getButtons()){let o=this.getButtons()[r];(o._button.tool===e||e==="draw"&&!o._button.tool)&&(i[r]=o)}return i},changeControlOrder(e=[]){let i=this._shapeMapping(),r=[];e.forEach(u=>{i[u]?r.push(i[u]):r.push(u)});let o=this.getButtons(),a={};r.forEach(u=>{o[u]&&(a[u]=o[u])}),Object.keys(o).filter(u=>!o[u]._button.tool||o[u]._button.tool==="draw").forEach(u=>{r.indexOf(u)===-1&&(a[u]=o[u])}),Object.keys(o).filter(u=>o[u]._button.tool==="edit").forEach(u=>{r.indexOf(u)===-1&&(a[u]=o[u])}),Object.keys(o).filter(u=>o[u]._button.tool==="options").forEach(u=>{r.indexOf(u)===-1&&(a[u]=o[u])}),Object.keys(o).filter(u=>o[u]._button.tool==="custom").forEach(u=>{r.indexOf(u)===-1&&(a[u]=o[u])}),Object.keys(o).forEach(u=>{r.indexOf(u)===-1&&(a[u]=o[u])}),this.map.pm.Toolbar.buttons=a,this._showHideButtons()},getControlOrder(){let e=this.getButtons(),i=[];for(let r in e)i.push(r);return i},changeActionsOfControl(e,i){let r=this._btnNameMapping(e);if(!r)throw new TypeError("No name passed");if(!i)throw new TypeError("No actions passed");if(!this.buttons[r])throw new TypeError("Button with this name not exists");this.buttons[r]._button.actions=i,this.changeControlOrder()},setButtonDisabled(e,i){let r=this._btnNameMapping(e);i?this.buttons[r].disable():this.buttons[r].enable()},_shapeMapping(){return{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(e){let i=this._shapeMapping();return i[e]?i[e]:e}}),Sr=ln,hn=H(Ti()),pn={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0: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(e){e.forEach(i=>{if(Array.isArray(i)){this._assignEvents(i);return}i.off("drag",this._handleSnapping,this),i.on("drag",this._handleSnapping,this),i.off("dragend",this._cleanupSnapping,this),i.on("dragend",this._cleanupSnapping,this)})},_cleanupSnapping(e){if(e){let i=e.target;i._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(i=>{i.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(e,i=!1){let r=e.target;if(r._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),e?.originalEvent?.altKey||this._map?.pm?.Keyboard.isAltKeyPressed())return!1;let o;if(i){if(!this._otherSnapLayers||this._otherSnapLayers.length===0)return!1;o=this._otherSnapLayers}else this._snapList===void 0&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),o=this._snapList;if(o.length<=0)return!1;let a=this._calcClosestLayer(r.getLatLng(),o);if(Object.keys(a).length===0)return!1;let u=a.layer instanceof L.Marker||a.layer instanceof L.CircleMarker||!this.options.snapSegment,h;u?h=a.latlng:h=this._checkPrioritiySnapping(a);let p=this.options.snapDistance,d={marker:r,shape:this._shape,snapLatLng:h,segment:a.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:a.layer,distance:a.distance};if(this._fireSnapDrag(d.marker,d),this._fireSnapDrag(this._layer,d),a.distance<p){r._orgLatLng=r.getLatLng(),r.setLatLng(h),r._snapped=!0,r._snapInfo=d;let m=()=>{this._snapLatLng=h,this._fireSnap(r,d),this._fireSnap(this._layer,d)},w=this._snapLatLng||{},C=h||{};(w.lat!==C.lat||w.lng!==C.lng)&&m()}else this._snapLatLng&&(this._unsnap(d),r._snapped=!1,r._snapInfo=void 0,this._fireUnsnap(d.marker,d),this._fireUnsnap(this._layer,d));return!0},_createSnapList(){let e=[],i=[],r=this._map;r.off("layerremove",this._handleSnapLayerRemoval,this),r.on("layerremove",this._handleSnapLayerRemoval,this),r.eachLayer(o=>
vendor: 57,528 bytes, line 4
4{if((o instanceof L.Polyline||o instanceof L.Marker||o instanceof L.CircleMarker||o instanceof L.ImageOverlay)&&o.options.snapIgnore!==!0){if(o.options.snapIgnore===void 0&&(!L.PM.optIn&&o.options.pmIgnore===!0||L.PM.optIn&&o.options.pmIgnore!==!1))return;(o instanceof L.Circle||o instanceof L.CircleMarker)&&o.pm&&o.pm._hiddenPolyCircle?e.push(o.pm._hiddenPolyCircle):o instanceof L.ImageOverlay&&(o=L.rectangle(o.getBounds())),e.push(o);let a=L.polyline([],{color:"red",pmIgnore:!0});a._pmTempLayer=!0,i.push(a),(o instanceof L.Circle||o instanceof L.CircleMarker)&&i.push(a)}}),e=e.filter(o=>this._layer!==o),e=e.filter(o=>o._latlng||o._latlngs&&ii(o._latlngs)),e=e.filter(o=>!o._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let o=L.polyline([],{color:"red",pmIgnore:!0});o._pmTempLayer=!0,i.push(o)}),this._snapList=e.concat(this._otherSnapLayers)):this._snapList=e,this.debugIndicatorLines=i},_handleSnapLayerRemoval({layer:e}){if(!e._leaflet_id)return;let i=this._snapList.findIndex(r=>r._leaflet_id===e._leaflet_id);i>-1&&this._snapList.splice(i,1)},_calcClosestLayer(e,i){return this._calcClosestLayers(e,i,1)[0]},_calcClosestLayers(e,i,r=1){let o=[],a={};i.forEach((h,p)=>{if(h._parentCopy&&h._parentCopy===this._layer||h.getLatLngs?.().flat(5).length<2)return;let d=this._calcLayerDistances(e,h);if(d.distance=Math.floor(d.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[p]){let m=L.polyline([],{color:"red",pmIgnore:!0});m._pmTempLayer=!0,this.debugIndicatorLines[p]=m}this.debugIndicatorLines[p].setLatLngs([e,d.latlng])}r===1&&(a.distance===void 0||d.distance-5<=a.distance)?(d.distance+5<a.distance&&(o=[]),a=d,a.layer=h,o.push(a)):r!==1&&(a={},a=d,a.layer=h,o.push(a))}),r!==1&&(o=o.sort((h,p)=>h.distance-p.distance)),r===-1&&(r=o.length);let u=this._getClosestLayerByPriority(o,r);return L.Util.isArray(u)?u:[u]},_calcLayerDistances(e,i){let r=this._map,o=i instanceof L.Marker||i instanceof L.CircleMarker,a=i instanceof L.Polygon,u=e;if(o){let h=i.getLatLng();return{latlng:{...h},distance:this._getDistance(r,h,u)}}return this._calcLatLngDistances(u,i.getLatLngs(),r,a)},_calcLatLngDistances(e,i,r,o=!1){let a,u,h,p=d=>{d.forEach((m,w)=>{if(Array.isArray(m)){p(m);return}if(this.options.snapSegment){let C=m,S;o?S=w+1===d.length?0:w+1:S=w+1===d.length?void 0:w+1;let O=d[S];if(O){let Z=this._getDistanceToSegment(r,e,C,O);(u===void 0||Z<u)&&(u=Z,h=[C,O])}}else{let C=this._getDistance(r,e,m);(u===void 0||C<u)&&(u=C,a=m)}})};return p(i),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(r,e,h[0],h[1])},segment:h,distance:u}:{latlng:a,distance:u}},_getClosestLayerByPriority(e,i=1){e=e.sort((h,p)=>h._leaflet_id-p._leaflet_id);let r=["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],o=this._map.pm.globalOptions.snappingOrder||[],a=0,u={};return o.concat(r).forEach(h=>{u[h]||(a+=1,u[h]=a)}),e.sort(gi("instanceofShape",u)),i===1?e[0]||{}:e.slice(0,i)},_checkPrioritiySnapping(e){let i=this._map,r=e.segment[0],o=e.segment[1],a=e.latlng,u=a;if(this.options.snapVertex){let h=this._getDistance(i,r,a),p=this._getDistance(i,o,a),d=h<p?r:o,m=h<p?h:p;if(this.options.snapMiddle){let C=L.PM.Utils.calcMiddleLatLng(i,r,o),S=this._getDistance(i,C,a);S<h&&S<p&&(d=C,m=S)}let w=this.options.snapDistance;m<w&&(u=d)}return{...u}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(e,i,r,o){let a=e.getMaxZoom();a===1/0&&(a=e.getZoom());let u=e.project(i,a),h=e.project(r,a),p=e.project(o,a),d=L.LineUtil.closestPointOnSegment(u,h,p);return e.unproject(d,a)},_getDistanceToSegment(e,i,r,o){let a=e.latLngToContainerPoint(i),u=e.latLngToContainerPoint(r),h=e.latLngToContainerPoint(o);return L.LineUtil.pointToSegmentDistance(a,u,h)},_getDistance(e,i,r){return e.latLngToContainerPoint(i).distanceTo(e.latLngToContainerPoint(r))}},qn=pn,Tr=L.Class.extend({includes:[qn,zi],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(e){L.Util.setOptions(this,e),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(e){let i=new L.Icon.Default;i.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=i,this._map=e,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(r=>{this[r]=new L.PM.Draw[r](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(e,i=!1){i?this.options.pathOptions=(0,hn.default)(this.options.pathOptions,e):this.options.pathOptions=e},getShapes(){return this.shapes},getShape(){return this._shape},enable(e,i){if(!e)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[e].enable(i)},disable(){this.shapes.forEach(e=>{this[e].disable()})},addControls(){this.shapes.forEach(e=>{this[e].addButton()})},getActiveShape(){let e;return this.shapes.forEach(i=>{this[i]._enabled&&(e=i)}),e},_setGlobalDrawMode(){this._shape==="Cut"?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let e=[];this._map.eachLayer(i=>{(i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.Circle||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&(i._pmTempLayer||e.push(i))}),this._enabled?e.forEach(i=>{L.PM.Utils.disablePopup(i)}):e.forEach(i=>{L.PM.Utils.enablePopup(i)})},createNewDrawInstance(e,i){let r=this._getShapeFromBtnName(i);if(this[e])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[r])throw new TypeError(`There is no class L.PM.Draw.${r}`);return this[e]=new L.PM.Draw[r](this._map),this[e].toolbarButtonName=e,this[e]._shape=e,this.shapes.push(e),this[i]&&this[e].setOptions(this[i].options),this[e].setOptions(this[e].options),this[e]},_getShapeFromBtnName(e){let i={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 i[e]?i[e]:this[e]?this[e]._shape:e},_finishLayer(e){e.pm&&(e.pm.setOptions(this.options),e.pm._shape=this._shape,e.pm._map=this._map),this._addDrawnLayerProp(e)},_addDrawnLayerProp(e){e._drawnByGeoman=!0},_setPane(e,i){i==="layerPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":i==="vertexPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":i==="markerPane"&&(e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return(this._map||this._layer._map).pm.getGeomanLayers().length===0}}),Pt=Tr;Pt.Marker=Pt.extend({initialize(e){this._map=e,this._shape="Marker",this.toolbarButtonName="drawMarker",this._layerIsDragging=!1},enable(e){L.Util.setOptions(this,e),this._enabled=!0,this._isTouchDevice=!fi(),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(dt("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(i=>{this.isRelevantMarker(i)&&i.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(e=>{this.isRelevantMarker(e)&&e.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(e){this.enabled()?this.disable():this.enable(e)},isRelevantMarker(e){return e instanceof L.Marker&&e.pm&&!e._pmTempLayer&&!e.pm._initTextMarker},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this.options.snappable){let i=e;i.target=this._hintMarker,this._handleSnapping(i)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(e){if(!e.latlng||this._layerIsDragging||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng(),r=new L.Marker(i,this.options.markerStyle);this._setPane(r,"markerPane"),this._finishLayer(r),r.pm||(r.options.draggable=!1),r.addTo(this._map.pm._getContainingLayer()),r.pm&&this.options.markerEditable?r.pm.enable():r.dragging&&r.dragging.disable(),this._fireCreate(r),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=dt("tooltips.placeMarkerTouch"),this._map.getContainer().appendChild(this._touchHint))},_removeTouchHint(){this._touchHint&&this._touchHint.parentNode&&(this._touchHint.parentNode.removeChild(this._touchHint),this._touchHint=null)}});var Wt=63710088e-1,cn={centimeters:Wt*100,centimetres:Wt*100,degrees:360/(2*Math.PI),feet:Wt*3.28084,inches:Wt*39.37,kilometers:Wt/1e3,kilometres:Wt/1e3,meters:Wt,metres:Wt,miles:Wt/1609.344,millimeters:Wt*1e3,millimetres:Wt*1e3,nauticalmiles:Wt/1852,radians:1,yards:Wt*1.0936};function Se(e,i,r={}){let o={type:"Feature"};return(r.id===0||r.id)&&(o.id=r.id),r.bbox&&(o.bbox=r.bbox),o.properties=i||{},o.geometry=e,o}function be(e,i,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Wn(e[0])||!Wn(e[1]))throw new Error("coordinates must contain numbers");return Se({type:"Point",coordinates:e},i,r)}function Te(e,i,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return Se({type:"LineString",coordinates:e},i,r)}function _e(e,i={}){let r={type:"FeatureCollection"};return i.id&&(r.id=i.id),i.bbox&&(r.bbox=i.bbox),r.features=e,r}function Or(e,i="kilometers"){let r=cn[i];if(!r)throw new Error(i+" units is invalid");return e*r}function Ce(e){return e%(2*Math.PI)*180/Math.PI}function ri(e){return e%360*Math.PI/180}function Wn(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Zi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ui(e){let i,r,o={type:"FeatureCollection",features:[]};if(e.type==="Feature"?r=e.geometry:r=e,r.type==="LineString")i=[r.coordinates];else if(r.type==="MultiLineString")i=r.coordinates;else if(r.type==="MultiPolygon")i=[].concat(...r.coordinates);else if(r.type==="Polygon")i=r.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return i.forEach(a=>{i.forEach(u=>{for(let h=0;h<a.length-1;h++)for(let p=h;p<u.length-1;p++){if(a===u&&(Math.abs(h-p)===1||h===0&&p===a.length-2&&a[h][0]===a[a.length-1][0]&&a[h][1]===a[a.length-1][1]))continue;let d=dn(a[h][0],a[h][1],a[h+1][0],a[h+1][1],u[p][0],u[p][1],u[p+1][0],u[p+1][1]);d&&o.features.push(be([d[0],d[1]]))}})}),o}function dn(e,i,r,o,a,u,h,p){let d,m,w,C,S,O={x:null,y:null,onLine1:!1,onLine2:!1};return d=(p-u)*(r-e)-(h-a)*(o-i),d===0?O.x!==null&&O.y!==null?O:!1:(m=i-u,w=e-a,C=(h-a)*m-(p-u)*w,S=(r-e)*m-(o-i)*w,m=C/d,w=S/d,O.x=e+m*(r-e),O.y=i+m*(o-i),m>=0&&m<=1&&(O.onLine1=!0),w>=0&&w<=1&&(O.onLine2=!0),O.onLine1&&O.onLine2?[O.x,O.y]:!1)}var Ne=Ui;Pt.Line=Pt.extend({initialize(e){this._map=e,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(e){L.Util.setOptions(this,e),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(dt("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&&this.options.finishOn!=="snap"&&this._map.on(this.options.finishOn,this._finishShape,this),this.options.finishOn==="dblclick"&&(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&&this.options.finishOn!=="snap"&&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(e){this.enabled()?this.disable():this.enable(e)},_syncHintLine(){let e=this._layer.getLatLngs();if(e.length>0){let i=e[e.length-1];this._hintline.setLatLngs([i,this._hintMarker.getLatLng()])}},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this.options.snappable){let r=e;r.target=this._hintMarker,this._handleSnapping(r)}else if(this._otherSnapLayers&&this._otherSnapLayers.length>0){let r=e;r.target=this._hintMarker,this._handleSnapping(r,!0)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let i=this._layer._defaultShape().slice();i.push(this._hintMarker.getLatLng()),this._change(i)},hasSelfIntersection(){return Ne(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(e,i){let r=L.polyline(this._layer.getLatLngs());e&&(i||(i=this._hintMarker.getLatLng()),r.addLatLng(i));let o=Ne(r.toGeoJSON(15));this._doesSelfIntersect=o.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(o,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(e){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,e.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng(),r=this._layer.getLatLngs(),o=r[r.length-1];if(i.equals(r[0])||r.length>0&&i.equals(o)){this._finishShape();return}this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:i,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(i);let a=this._createMarker(i);this._setTooltipText(),this._setHintLineAfterNewVertex(i),this._fireVertexAdded(a,void 0,i,"Draw"),this._change(this._layer.getLatLngs()),this.options.finishOn==="snap"&&this._hintMarker._snapped&&this._finishShape(e)},_setHintLineAfterNewVertex(e){this._hintline.setLatLngs([e,e])},_removeLastVertex(){let e=this._markers;if(e.length<=1){this.disable();return}let i=this._layer.getLatLngs(),r=e[e.length-1],{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(e,r);e.pop(),this._layerGroup.removeLayer(r);let a=e[e.length-1],u=i.indexOf(a.getLatLng());i=i.slice(0,u+1),this._layer.setLatLngs(i),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(r,o,"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 e=this._layer.getLatLngs();if(e.length<=1)return;let i=L.polyline(e,this.options.pathOptions);this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._fireCreate(i),this.options.snappable&&this._cleanupSnapping();let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))},_createMarker(e){let i=new L.Marker(e,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._pmTempLayer=!0,this._layerGroup.addLayer(i),this._markers.push(i),i.on("click",this._finishShape,this),i},_setTooltipText(){let{length:e}=this._layer.getLatLngs().flat(),i="";e<=1?i=dt("tooltips.continueLine"):i=dt("tooltips.finishLine"),this._hintMarker.setTooltipContent(i)},_change(e){this._fireChange(e,"Draw")},setStyle(){this._layer?.setStyle(this.options.templineStyle),this._hintline?.setStyle(this.options.hintlineStyle)}}),Pt.Polygon=Pt.Line.extend({initialize(e){this._map=e,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(e){L.PM.Draw.Line.prototype.enable.call(this,e),this._layer.pm._shape="Polygon"},_createMarker(e){let i=new L.Marker(e,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._pmTempLayer=!0,this._layerGroup.addLayer(i),this._markers.push(i),this._layer.getLatLngs().flat().length===1?(i.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(i)-1,this.options.snappable&&this._cleanupSnapping()):i.on("click",()=>1),i},_setTooltipText(){let{length:e}=this._layer.getLatLngs().flat(),i="";e<=2?i=dt("tooltips.continueLine"):i=dt("tooltips.finishPoly"),this._hintMarker.setTooltipContent(i)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let e=this._layer.getLatLngs();if(e.length<=2)return;let i=L.polygon(e,this.options.pathOptions);this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._fireCreate(i),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))}}),Pt.Rectangle=Pt.extend({initialize(e){this._map=e,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(e){if(L.Util.setOptions(this,e),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?1:0}),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(dt("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let i=0;i<2;i+=1){let r=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(r,"vertexPane"),r._pmTempLayer=!0,this._layerGroup.addLayer(r),this._styleMarkers.push(r)}}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(e){this.enabled()?this.disable():this.enable(e)},_placeStartingMarkers(e){this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(i),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(r=>{L.DomUtil.addClass(r._icon,"visible"),r.setLatLng(i)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(dt("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let e=this._startMarker.getLatLng();e&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([e,e]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this.options.snappable){let r=e;r.target=this._hintMarker,this._handleSnapping(r)}let i=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(i,"Draw")},_syncRectangleSize(){let e=Gi(this._startMarker.getLatLng(),this._map),i=Gi(this._hintMarker.getLatLng(),this._map),r=L.PM.Utils._getRotatedRectangle(e,i,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(r),this.options.cursorMarker&&this._styleMarkers){let o=[];r.forEach(a=>{!a.equals(e,1e-8)&&!a.equals(i,1e-8)&&o.push(a)}),o.forEach((a,u)=>{try{this._styleMarkers[u].setLatLng(a)}catch{}})}},_findCorners(){let e=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(e[0],e[2],this.options.rectangleAngle||0,this._map)},_finishShape(e){e?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng(),r=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||r.equals(i))return;let o=L.rectangle([r,i],this.options.pathOptions);if(this.options.rectangleAngle){let u=L.PM.Utils._getRotatedRectangle(r,i,this.options.rectangleAngle||0,this._map);o.setLatLngs(u),o.pm&&o.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(o,"layerPane"),this._finishLayer(o),o.addTo(this._map.pm._getContainingLayer()),this._fireCreate(o);let a=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(a))},setStyle(){this._layer?.setStyle(this.options.pathOptions)}}),Pt.CircleMarker=Pt.extend({initialize(e){this._map=e,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(e){if(L.Util.setOptions(this,e),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 i={};L.extend(i,this.options.templineStyle),i.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),i),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(dt("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(dt("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(e=>{this.isRelevantMarker(e)&&e.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(e=>{this.isRelevantMarker(e)&&e.pm.disable()})},enabled(){return this._enabled},toggle(e){this.enabled()?this.disable():this.enable(e)},_placeCenterMarker(e){this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let i=this._hintMarker.getLatLng();this._centerMarker.setLatLng(i),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let e=this._centerMarker.getLatLng();e&&(this._layer.setLatLng(e),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(dt("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let e=this._centerMarker.getLatLng(),i=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([e,i])},_syncCircleRadius(){let e=this._centerMarker.getLatLng(),i=this._hintMarker.getLatLng(),r=this._distanceCalculation(e,i);this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(r)},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let r=e;r.target=this._hintMarker,this._handleSnapping(r)}this._handleHintMarkerSnapping();let i=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(i,"Draw")},isRelevantMarker(e){return e instanceof L.CircleMarker&&!(e instanceof L.Circle)&&e.pm&&!e._pmTempLayer},_createMarker(e){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!e.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng(),r=new this._BaseCircleClass(i,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(r),this._fireCreate(r),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(e){e.pm&&this.options.markerEditable&&e.pm.enable()},_finishShape(e){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;e?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(e.latlng);let i=this._centerMarker.getLatLng(),r=this._defaultRadius;if(this.options[this._editableOption]){let h=this._hintMarker.getLatLng();r=this._distanceCalculation(i,h),this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?r=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]&&(r=this.options[this._maxRadiusOption])}let o={...this.options.pathOptions,radius:r},a=new this._BaseCircleClass(i,o);this._setPane(a,"layerPane"),this._finishLayer(a),a.addTo(this._map.pm._getContainingLayer()),a.pm&&a.pm._updateHiddenPolyCircle(),this._fireCreate(a);let u=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(u))},_getNewDestinationOfHintMarker(){let e=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return e;let i=this._centerMarker.getLatLng(),r=this._distanceCalculation(i,e);this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?e=de(this._map,i,e,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]&&(e=de(this._map,i,e,this._getMaxDistanceInMeter()))}return e},_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 e=this._centerMarker.getLatLng(),i=this._hintMarker.getLatLng(),r=this._distanceCalculation(e,i);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){let e={};L.extend(e,this.options.templineStyle),this.options[this._editableOption]&&(e.radius=0),this._layer?.setStyle(e),this._hintline?.setStyle(this.options.hintlineStyle)},_distanceCalculation(e,i){return this._map.project(e).distanceTo(this._map.project(i))}}),Pt.Circle=Pt.CircleMarker.extend({initialize(e){this._map=e,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(e,i){return this._map.distance(e,i)}});var Yn=class{constructor(e=[],i=Fr){if(this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;let e=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:i,compare:r}=this,o=i[e];for(;e>0;){let a=e-1>>1,u=i[a];if(r(o,u)>=0)break;i[e]=u,e=a}i[e]=o}_down(e){let{data:i,compare:r}=this,o=this.length>>1,a=i[e];for(;e<o;){let u=(e<<1)+1,h=i[u],p=u+1;if(p<this.length&&r(i[p],h)<0&&(u=p,h=i[p]),r(h,a)>=0)break;i[e]=h,e=u}i[e]=a}};function Fr(e,i){return e<i?-1:e>i?1:0}function xe(e,i){return e.p.x>i.p.x?1:e.p.x<i.p.x?-1:e.p.y!==i.p.y?e.p.y>i.p.y?1:-1:1}function _n(e,i){return e.rightSweepEvent.p.x>i.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<i.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==i.rightSweepEvent.p.y?e.rightSweepEvent.p.y<i.rightSweepEvent.p.y?1:-1:1}var Oe=class{constructor(e,i,r,o){this.p={x:e[0],y:e[1]},this.featureId=i,this.ringId=r,this.eventId=o,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(e){return this.p.x===e.p.x&&this.p.y===e.p.y}};function mn(e,i){if(e.type==="FeatureCollection"){let r=e.features;for(let o=0;o<r.length;o++)Rr(r[o],i)}else Rr(e,i)}var oi=0,je=0,Ge=0;function Rr(e,i){let r=e.type==="Feature"?e.geometry:e,o=r.coordinates;(r.type==="Polygon"||r.type==="MultiLineString")&&(o=[o]),r.type==="LineString"&&(o=[[o]]);for(let a=0;a<o.length;a++)for(let u=0;u<o[a].length;u++){let h=o[a][u][0],p=null;je=je+1;for(let d=0;d<o[a][u].length-1;d++){p=o[a][u][d+1];let m=new Oe(h,oi,je,Ge),w=new Oe(p,oi,je,Ge+1);m.otherEvent=w,w.otherEvent=m,xe(m,w)>0?(w.isLeftEndpoint=!0,m.isLeftEndpoint=!1):(m.isLeftEndpoint=!0,w.isLeftEndpoint=!1),i.push(m),i.push(w),h=p,Ge=Ge+1}}oi=oi+1}var t=class{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}};function n(e,i){if(e===null||i===null||e.leftSweepEvent.ringId===i.leftSweepEvent.ringId&&(e.rightSweepEvent.isSamePoint(i.leftSweepEvent)||e.rightSweepEvent.isSamePoint(i.leftSweepEvent)||e.rightSweepEvent.isSamePoint(i.rightSweepEvent)||e.leftSweepEvent.isSamePoint(i.leftSweepEvent)||e.leftSweepEvent.isSamePoint(i.rightSweepEvent)))return!1;let r=e.leftSweepEvent.p.x,o=e.leftSweepEvent.p.y,a=e.rightSweepEvent.p.x,u=e.rightSweepEvent.p.y,h=i.leftSweepEvent.p.x,p=i.leftSweepEvent.p.y,d=i.rightSweepEvent.p.x,m=i.rightSweepEvent.p.y,w=(m-p)*(a-r)-(d-h)*(u-o),C=(d-h)*(o-p)-(m-p)*(r-h),S=(a-r)*(o-p)-(u-o)*(r-h);if(w===0)return!1;let O=C/w,Z=S/w;if(O>=0&&O<=1&&Z>=0&&Z<=1){let q=r+O*(a-r),et=o+O*(u-o);return[q,et]}return!1}function s(e,i){i=i||!1;let r=[],o=new Yn([],_n);for(;e.length;){let a=e.pop();if(a.isLeftEndpoint){let u=new t(a);for(let h=0;h<o.data.length;h++){let p=o.data[h];if(i&&p.leftSweepEvent.featureId===a.featureId)continue;let d=n(u,p);d!==!1&&r.push(d)}o.push(u)}else a.isLeftEndpoint===!1&&o.pop()}return r}function l(e,i){let r=new Yn([],xe);return mn(e,r),s(r,i)}var c=l,g=c;function A(e,i,r={}){let{removeDuplicates:o=!0,ignoreSelfIntersections:a=!0}=r,u=[];e.type==="FeatureCollection"?u=u.concat(e.features):e.type==="Feature"?u.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&u.push(Se(e)),i.type==="FeatureCollection"?u=u.concat(i.features):i.type==="Feature"?u.push(i):(i.type==="LineString"||i.type==="Polygon"||i.type==="MultiLineString"||i.type==="MultiPolygon")&&u.push(Se(i));let h=g(_e(u),a),p=[];if(o){let d={};h.forEach(m=>{let w=m.join(",");d[w]||(d[w]=!0,p.push(m))})}else p=h;return _e(p.map(d=>be(d)))}var P=A,V=H(Xe(),1);function Q(e,i,r){if(e!==null)for(var o,a,u,h,p,d,m,w=0,C=0,S,O=e.type,Z=O==="FeatureCollection",q=O==="Feature",et=Z?e.features.length:1,nt=0;nt<et;nt++){m=Z?e.features[nt].geometry:q?e.geometry:e,S=m?m.type==="GeometryCollection":!1,p=S?m.geometries.length:1;for(var k=0;k<p;k++){var I=0,G=0;if(h=S?m.geometries[k]:m,h!==null){d=h.coordinates;var Y=h.type;switch(w=r&&(Y==="Polygon"||Y==="MultiPolygon")?1:0,Y){case null:break;case"Point":if(i(d,C,nt,I,G)===!1)return!1;C++,I++;break;case"LineString":case"MultiPoint":for(o=0;o<d.length;o++){if(i(d[o],C,nt,I,G)===!1)return!1;C++,Y==="MultiPoint"&&I++}Y==="LineString"&&I++;break;case"Polygon":case"MultiLineString":for(o=0;o<d.length;o++){for(a=0;a<d[o].length-w;a++){if(i(d[o][a],C,nt,I,G)===!1)return!1;C++}Y==="MultiLineString"&&I++,Y==="Polygon"&&G++}Y==="Polygon"&&I++;break;case"MultiPolygon":for(o=0;o<d.length;o++){for(G=0,a=0;a<d[o].length;a++){for(u=0;u<d[o][a].length-w;u++){if(i(d[o][a][u],C,nt,I,G)===!1)return!1;C++}G++}I++}break;case"GeometryCollection":for(o=0;o<h.geometries.length;o++)if(Q(h.geometries[o],i,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ot(e,i){if(e.type==="Feature")i(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&i(e.features[r],r)!==!1;r++);}function mt(e,i,r){var o=r;return ot(e,function(a,u){u===0&&r===void 0?o=a:o=i(o,a,u)}),o}function ft(e,i){var r,o,a,u,h,p,d,m,w,C,S=0,O=e.type==="FeatureCollection",Z=e.type==="Feature",q=O?e.features.length:1;for(r=0;r<q;r++){for(p=O?e.features[r].geometry:Z?e.geometry:e,m=O?e.features[r].properties:Z?e.properties:{},w=O?e.features[r].bbox:Z?e.bbox:void 0,C=O?e.features[r].id:Z?e.id:void 0,d=p?p.type==="GeometryCollection":!1,h=d?p.geometries.length:1,a=0;a<h;a++){if(u=d?p.geometries[a]:p,u===null){if(i(null,S,m,w,C)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(i(u,S,m,w,C)===!1)return!1;break}case"GeometryCollection":{for(o=0;o<u.geometries.length;o++)if(i(u.geometries[o],S,m,w,C)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}S++}}function At(e,i){ft(e,function(r,o,a,u,h){var p=r===null?null:r.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return i(Se(r,a,{bbox:u,id:h}),o,0)===!1?!1:void 0}var d;switch(p){case"MultiPoint":d="Point";break;case"MultiLineString":d="LineString";break;case"MultiPolygon":d="Polygon";break}for(var m=0;m<r.coordinates.length;m++){var w=r.coordinates[m],C={type:d,coordinates:w};if(i(Se(C,a),o,m)===!1)return!1}})}function Ot(e,i={}){if(e.bbox!=null&&i.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return Q(e,o=>{r[0]>o[0]&&(r[0]=o[0]),r[1]>o[1]&&(r[1]=o[1]),r[2]<o[0]&&(r[2]=o[0]),r[3]<o[1]&&(r[3]=o[1])}),r}function Vt(e){var i;if(e.bbox)i=e.bbox;else if(Array.isArray(e)&&e.length===4)i=e;else if(Array.isArray(e)&&e.length===6)i=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")i=Ot(e);else if(e.type==="FeatureCollection")i=Ot(e);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}}var ae=class{constructor(e=9){this.tree=new V.default(e),this.tree.toBBox=Vt}insert(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Ot(e),this.tree.insert(e),this}load(e){var i=[];return Array.isArray(e)?e.forEach(function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:Ot(r),i.push(r)}):ot(e,function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:Ot(r),i.push(r)}),this.tree.load(i),this}remove(e,i){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Ot(e),this.tree.remove(e,i),this}clear(){return this.tree.clear(),this}search(e){var i=this.tree.search(Vt(e));return _e(i)}collides(e){return this.tree.collides(Vt(e))}all(){let e=this.tree.all();return _e(e)}toJSON(){return this.tree.toJSON()}fromJSON(e){return this.tree.fromJSON(e),this}};function Ir(e){return new ae(e)}function zr(e,i){if(i=i??{},!Zi(i))throw new Error("options is invalid");var r=i.precision,o=i.coordinates,a=i.mutate;if(r=r==null||isNaN(r)?6:r,o=o==null||isNaN(o)?3:o,!e)throw new Error("<geojson> is required");if(typeof r!="number")throw new Error("<precision> must be a number");if(typeof o!="number")throw new Error("<coordinates> must be a number");(a===!1||a===void 0)&&(e=JSON.parse(JSON.stringify(e)));var u=Math.pow(10,r);return Q(e,function(h){no(h,u,o)}),e}function no(e,i,r){e.length>r&&e.splice(r,e.length);for(var o=0;o<e.length;o++)e[o]=Math.round(e[o]*i)/i;return e}function kt(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return[...e.geometry.coordinates];if(e.type==="Point")return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ke(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Vi(e){return e.type==="Feature"?e.geometry:e}function Co(e,i){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function Yo(e){if(!e)throw new Error("geojson is required");let i=[];return At(e,r=>{Xo(r,i)}),_e(i)}function Xo(e,i){let r=[],o=e.geometry;if(o!==null){switch(o.type){case"Polygon":r=ke(o);break;case"LineString":r=[ke(o)]}r.forEach(a=>{Jo(a,e.properties).forEach(u=>{u.id=i.length,i.push(u)})})}}function Jo(e,i){let r=[];return e.reduce((o,a)=>{let u=Te([o,a],i);return u.bbox=$o(o,a),r.push(u),a}),r}function $o(e,i){let r=e[0],o=e[1],a=i[0],u=i[1],h=r<a?r:a,p=o<u?o:u,d=r>a?r:a,m=o>u?o:u;return[h,p,d,m]}function ro(e,i,r={}){var o=kt(e),a=kt(i),u=ri(a[1]-o[1]),h=ri(a[0]-o[0]),p=ri(o[1]),d=ri(a[1]),m=Math.pow(Math.sin(u/2),2)+Math.pow(Math.sin(h/2),2)*Math.cos(p)*Math.cos(d);return Or(2*Math.atan2(Math.sqrt(m),Math.sqrt(1-m)),r.units)}var Qo=Object.defineProperty,ts=Object.defineProperties,es=Object.getOwnPropertyDescriptors,xo=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,ko=(e,i,r)=>i in e?Qo(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,rs=(e,i)=>{for(var r in i||(i={}))is.call(i,r)&&ko(e,r,i[r]);if(xo)for(var r of xo(i))ns.call(i,r)&&ko(e,r,i[r]);return e},os=(e,i)=>ts(e,es(i));function ss(e,i,r={}){if(!e||!i)throw new Error("lines and inputPoint are required arguments");let o=kt(i),a=be([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}),u=0,h=0,p=-1;return At(e,function(d,m,w){p!==w&&(p=w,h=0);let C=ke(d);for(let S=0;S<C.length-1;S++){let O=be(C[S]),Z=kt(O),q=be(C[S+1]),et=kt(q),nt=ro(O,q,r),k,I;et[0]===o[0]&&et[1]===o[1]?[k,I]=[et,!0]:Z[0]===o[0]&&Z[1]===o[1]?[k,I]=[Z,!1]:[k,I]=ls(Z,et,o);let G=ro(i,k,r);if(G<a.properties.pointDistance){let Y=ro(O,k,r);a=be(k,{lineStringIndex:w,segmentIndex:I?S+1:S,totalDistance:u+Y,lineDistance:h+Y,segmentDistance:Y,pointDistance:G,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),a.properties=os(rs({},a.properties),{multiFeatureIndex:a.properties.lineStringIndex,index:a.properties.segmentIndex,location:a.properties.totalDistance,dist:a.properties.pointDistance})}u+=nt,h+=nt}}),a}function Hi(e,i){let[r,o,a]=e,[u,h,p]=i;return r*u+o*h+a*p}function Xn(e,i){let[r,o,a]=e,[u,h,p]=i;return[o*p-a*h,a*u-r*p,r*h-o*u]}function as(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2))}function Mo(e){let i=as(e);return[e[0]/i,e[1]/i,e[2]/i]}function oo(e){let i=ri(e[1]),r=ri(e[0]);return[Math.cos(i)*Math.cos(r),Math.cos(i)*Math.sin(r),Math.sin(i)]}function us(e){let[i,r,o]=e,a=Math.min(Math.max(o,-1),1),u=Ce(Math.asin(a));return[Ce(Math.atan2(r,i)),u]}function ls(e,i,r){let o=oo(e),a=oo(i),u=oo(r),h=Xn(o,a);if(h[0]===0&&h[1]===0&&h[2]===0)return Hi(o,a)>0?[[...i],!0]:[[...r],!1];let p=Xn(h,u);if(p[0]===0&&p[1]===0&&p[2]===0)return[[...i],!0];let d=Xn(p,h),m=Mo(d),w=[-m[0],-m[1],-m[2]],C=Hi(u,m)>Hi(u,w)?m:w,S=Mo(h),O=Hi(Xn(o,C),S),Z=Hi(Xn(C,a),S);return O>=0&&Z>=0?[us(C),!1]:Hi(o,u)>Hi(a,u)?[[...e],!1]:[[...i],!0]}function wo(e,i){if(!e)throw new Error("line is required");if(!i)throw new Error("splitter is required");let r=Co(e),o=Co(i);if(r!=="LineString")throw new Error("line must be LineString");if(o==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(o==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var a=zr(i,{precision:7});switch(e.type!=="Feature"&&(e=Se(e)),o){case"Point":return so(e,a);case"MultiPoint":return Eo(e,a);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Eo(e,A(e,a,{ignoreSelfIntersections:!0}))}}function Eo(e,i){var r=[],o=Ir();return At(i,function(a){if(r.forEach(function(p,d){p.id=d}),!r.length)r=so(e,a).features,o.load(_e(r));else{var u=o.search(a);if(u.features.length){var h=Bo(a,u);r=r.filter(function(p){return p.id!==h.id}),o.remove(h),ot(so(h,a),function(p){r.push(p),o.insert(p)})}}}),_e(r)}function so(e,i){var r=[],o=ke(e)[0],a=ke(e)[e.geometry.coordinates.length-1];if(ao(o,kt(i))||ao(a,kt(i)))return _e([e]);var u=Ir(),h=Yo(e);u.load(h);var p=u.search(i);if(!p.features.length)return _e([e]);var d=Bo(i,p),m=[o],w=mt(h,function(C,S,O){var Z=ke(S)[1],q=kt(i);return O===d.id?(C.push(q),r.push(Te(C)),ao(q,Z)?[q]:[q,Z]):(C.push(Z),C)},m);return w.length>1&&r.push(Te(w)),_e(r)}function Bo(e,i){if(!i.features.length)throw new Error("lines must contain features");if(i.features.length===1)return i.features[0];var r,o=1/0;return ot(i,function(a){var u=ss(a,e),h=u.properties.dist;h<o&&(r=a,o=h)}),r}function ao(e,i){return e[0]===i[0]&&e[1]===i[1]}var hs=wo,Et=11102230246251565e-32,ie=134217729,ps=(3+8*Et)*Et;function uo(e,i,r,o,a){let u,h,p,d,m=i[0],w=o[0],C=0,S=0;w>m==w>-m?(u=m,m=i[++C]):(u=w,w=o[++S]);let O=0;if(C<e&&S<r)for(w>m==w>-m?(h=m+u,p=u-(h-m),m=i[++C]):(h=w+u,p=u-(h-w),w=o[++S]),u=h,p!==0&&(a[O++]=p);C<e&&S<r;)w>m==w>-m?(h=u+m,d=h-u,p=u-(h-d)+(m-d),m=i[++C]):(h=u+w,d=h-u,p=u-(h-d)+(w-d),w=o[++S]),u=h,p!==0&&(a[O++]=p);for(;C<e;)h=u+m,d=h-u,p=u-(h-d)+(m-d),m=i[++C],u=h,p!==0&&(a[O++]=p);for(;S<r;)h=u+w,d=h-u,p=u-(h-d)+(w-d),w=o[++S],u=h,p!==0&&(a[O++]=p);return(u!==0||O===0)&&(a[O++]=u),O}function cs(e,i){let r=i[0];for(let o=1;o<e;o++)r+=i[o];return r}function W(e){return new Float64Array(e)}var ds=(3+16*Et)*Et,_s=(2+12*Et)*Et,ms=(9+64*Et)*Et*Et,fn=W(4),Po=W(8),Ao=W(12),Do=W(16),ue=W(4);function fs(e,i,r,o,a,u,h){let p,d,m,w,C,S,O,Z,q,et,nt,k,I,G,Y,X,J,f,b=e-a,x=r-a,D=i-u,B=o-u;G=b*B,S=ie*b,O=S-(S-b),Z=b-O,S=ie*B,q=S-(S-B),et=B-q,Y=Z*et-(G-O*q-Z*q-O*et),X=D*x,S=ie*D,O=S-(S-D),Z=D-O,S=ie*x,q=S-(S-x),et=x-q,J=Z*et-(X-O*q-Z*q-O*et),nt=Y-J,C=Y-nt,fn[0]=Y-(nt+C)+(C-J),k=G+nt,C=k-G,I=G-(k-C)+(nt-C),nt=I-X,C=I-nt,fn[1]=I-(nt+C)+(C-X),f=k+nt,C=f-k,fn[2]=k-(f-C)+(nt-C),fn[3]=f;let E=cs(4,fn),R=_s*h;if(E>=R||-E>=R||(C=e-b,p=e-(b+C)+(C-a),C=r-x,m=r-(x+C)+(C-a),C=i-D,d=i-(D+C)+(C-u),C=o-B,w=o-(B+C)+(C-u),p===0&&d===0&&m===0&&w===0)||(R=ms*h+ps*Math.abs(E),E+=b*w+B*p-(D*m+x*d),E>=R||-E>=R))return E;G=p*B,S=ie*p,O=S-(S-p),Z=p-O,S=ie*B,q=S-(S-B),et=B-q,Y=Z*et-(G-O*q-Z*q-O*et),X=d*x,S=ie*d,O=S-(S-d),Z=d-O,S=ie*x,q=S-(S-x),et=x-q,J=Z*et-(X-O*q-Z*q-O*et),nt=Y-J,C=Y-nt,ue[0]=Y-(nt+C)+(C-J),k=G+nt,C=k-G,I=G-(k-C)+(nt-C),nt=I-X,C=I-nt,ue[1]=I-(nt+C)+(C-X),f=k+nt,C=f-k,ue[2]=k-(f-C)+(nt-C),ue[3]=f;let T=uo(4,fn,4,ue,Po);G=b*w,S=ie*b,O=S-(S-b),Z=b-O,S=ie*w,q=S-(S-w),et=w-q,Y=Z*et-(G-O*q-Z*q-O*et),X=D*m,S=ie*D,O=S-(S-D),Z=D-O,S=ie*m,q=S-(S-m),et=m-q,J=Z*et-(X-O*q-Z*q-O*et),nt=Y-J,C=Y-nt,ue[0]=Y-(nt+C)+(C-J),k=G+nt,C=k-G,I=G-(k-C)+(nt-C),nt=I-X,C=I-nt,ue[1]=I-(nt+C)+(C-X),f=k+nt,C=f-k,ue[2]=k-(f-C)+(nt-C),ue[3]=f;let F=uo(T,Po,4,ue,Ao);G=p*w,S=ie*p,O=S-(S-p),Z=p-O,S=ie*w,q=S-(S-w),et=w-q,Y=Z*et-(G-O*q-Z*q-O*et),X=d*m,S=ie*d,O=S-(S-d),Z=d-O,S=ie*m,q=S-(S-m),et=m-q,J=Z*et-(X-O*q-Z*q-O*et),nt=Y-J,C=Y-nt,ue[0]=Y-(nt+C)+(C-J),k=G+nt,C=k-G,I=G-(k-C)+(nt-C),nt=I-X,C=I-nt,ue[1]=I-(nt+C)+(C-X),f=k+nt,C=f-k,ue[2]=k-(f-C)+(nt-C),ue[3]=f;let N=uo(F,Ao,4,ue,Do);return Do[N-1]}function gs(e,i,r,o,a,u){let h=(i-u)*(r-a),p=(e-a)*(o-u),d=h-p,m=Math.abs(h+p);return Math.abs(d)>=ds*m?d:-fs(e,i,r,o,a,u,m)}var ya=(7+56*Et)*Et,va=(3+28*Et)*Et,La=(26+288*Et)*Et*Et,ba=W(4),Ca=W(4),xa=W(4),ka=W(4),Ma=W(4),wa=W(4),Ea=W(4),Ba=W(4),Pa=W(4),Aa=W(8),Da=W(8),Sa=W(8),Ta=W(4),Oa=W(8),Fa=W(8),Ra=W(8),Ia=W(12),za=W(192),Na=W(192),ja=(10+96*Et)*Et,Ga=(4+48*Et)*Et,Za=(44+576*Et)*Et*Et,Ua=W(4),Va=W(4),Ha=W(4),Ka=W(4),qa=W(4),Wa=W(4),Ya=W(4),Xa=W(4),Ja=W(8),$a=W(8),Qa=W(8),tu=W(8),eu=W(8),iu=W(8),nu=W(8),ru=W(8),ou=W(8),su=W(4),au=W(4),uu=W(4),lu=W(8),hu=W(16),pu=W(16),cu=W(16),du=W(32),_u=W(32),mu=W(48),fu=W(64),gu=W(1152),yu=W(1152),vu=(16+224*Et)*Et,Lu=(5+72*Et)*Et,bu=(71+1408*Et)*Et*Et,Cu=W(4),xu=W(4),ku=W(4),Mu=W(4),wu=W(4),Eu=W(4),Bu=W(4),Pu=W(4),Au=W(4),Du=W(4),Su=W(24),Tu=W(24),Ou=W(24),Fu=W(24),Ru=W(24),Iu=W(24),zu=W(24),Nu=W(24),ju=W(24),Gu=W(24),Zu=W(1152),Uu=W(1152),Vu=W(1152),Hu=W(1152),Ku=W(1152),qu=W(2304),Wu=W(2304),Yu=W(3456),Xu=W(5760),Ju=W(8),$u=W(8),Qu=W(8),tl=W(16),el=W(24),il=W(48),nl=W(48),rl=W(96),ol=W(192),sl=W(384),al=W(384),ul=W(384),ll=W(768),hl=W(96),pl=W(96),cl=W(96),dl=W(1152);function ys(e,i){var r,o,a=0,u,h,p,d,m,w,C,S=e[0],O=e[1],Z=i.length;for(r=0;r<Z;r++){o=0;var q=i[r],et=q.length-1;if(w=q[0],w[0]!==q[et][0]&&w[1]!==q[et][1])throw new Error("First and last coordinates in a ring must be the same");for(h=w[0]-S,p=w[1]-O,o;o<et;o++){if(C=q[o+1],d=C[0]-S,m=C[1]-O,p===0&&m===0){if(d<=0&&h>=0||h<=0&&d>=0)return 0}else if(m>=0&&p<=0||m<=0&&p>=0){if(u=gs(h,d,p,m,0,0),u===0)return 0;(u>0&&m>0&&p<=0||u<0&&m<=0&&p>0)&&a++}w=C,p=m,h=d}}return a%2!==0}function gn(e,i,r={}){if(!e)throw new Error("point is required");if(!i)throw new Error("polygon is required");let o=kt(e),a=Vi(i),u=a.type,h=i.bbox,p=a.coordinates;if(h&&vs(o,h)===!1)return!1;u==="Polygon"&&(p=[p]);let d=!1;for(var m=0;m<p.length;++m){let w=ys(o,p[m]);if(w===0)return!r.ignoreBoundary;w&&(d=!0)}return d}function vs(e,i){return i[0]<=e[0]&&i[1]<=e[1]&&i[2]>=e[0]&&i[3]>=e[1]}function Jn(e,i,r={}){let o=kt(e),a=ke(i);for(let u=0;u<a.length-1;u++){let h=!1;if(r.ignoreEndVertices&&(u===0&&(h="start"),u===a.length-2&&(h="end"),u===0&&u+1===a.length-1&&(h="both")),Ls(a[u],a[u+1],o,h,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function Ls(e,i,r,o,a){let u=r[0],h=r[1],p=e[0],d=e[1],m=i[0],w=i[1],C=r[0]-p,S=r[1]-d,O=m-p,Z=w-d,q=C*Z-S*O;if(a!==null){if(Math.abs(q)>a)return!1}else if(q!==0)return!1;if(Math.abs(O)===Math.abs(Z)&&Math.abs(O)===0)return o?!1:r[0]===e[0]&&r[1]===e[1];if(o){if(o==="start")return Math.abs(O)>=Math.abs(Z)?O>0?p<u&&u<=m:m<=u&&u<p:Z>0?d<h&&h<=w:w<=h&&h<d;if(o==="end")return Math.abs(O)>=Math.abs(Z)?O>0?p<=u&&u<m:m<u&&u<=p:Z>0?d<=h&&h<w:w<h&&h<=d;if(o==="both")return Math.abs(O)>=Math.abs(Z)?O>0?p<u&&u<m:m<u&&u<p:Z>0?d<h&&h<w:w<h&&h<d}else return Math.abs(O)>=Math.abs(Z)?O>0?p<=u&&u<=m:m<=u&&u<=p:Z>0?d<=h&&h<=w:w<=h&&h<=d;return!1}function bs(e,i){let r=Vi(e),o=Vi(i),a=r.type,u=o.type,h=r.coordinates,p=o.coordinates;switch(a){case"Point":if(u==="Point")return ho(h,p);throw new Error("feature2 "+u+" geometry not supported");case"MultiPoint":switch(u){case"Point":return ks(r,o);case"MultiPoint":return Ms(r,o);default:throw new Error("feature2 "+u+" geometry not supported")}case"LineString":switch(u){case"Point":return Jn(o,r,{ignoreEndVertices:!0});case"LineString":return Bs(r,o);case"MultiPoint":return ws(r,o);default:throw new Error("feature2 "+u+" geometry not supported")}case"Polygon":switch(u){case"Point":return gn(o,r,{ignoreBoundary:!0});case"LineString":return As(r,o);case"Polygon":return lo(r,o);case"MultiPoint":return Es(r,o);case"MultiPolygon":return xs(r,o);default:throw new Error("feature2 "+u+" geometry not supported")}case"MultiPolygon":if(u==="Polygon")return Cs(r,o);throw new Error("feature2 "+u+" geometry not supported");default:throw new Error("feature1 "+a+" geometry not supported")}}function Cs(e,i){return e.coordinates.some(r=>lo({type:"Polygon",coordinates:r},i))}function xs(e,i){return i.coordinates.every(r=>lo(e,{type:"Polygon",coordinates:r}))}function ks(e,i){let r,o=!1;for(r=0;r<e.coordinates.length;r++)if(ho(e.coordinates[r],i.coordinates)){o=!0;break}return o}function Ms(e,i){for(let r of i.coordinates){let o=!1;for(let a of e.coordinates)if(ho(r,a)){o=!0;break}if(!o)return!1}return!0}function ws(e,i){let r=!1;for(let o of i.coordinates)if(Jn(o,e,{ignoreEndVertices:!0})&&(r=!0),!Jn(o,e))return!1;return!!r}function Es(e,i){for(let r of i.coordinates)if(!gn(r,e,{ignoreBoundary:!0}))return!1;return!0}function Bs(e,i){let r=!1;for(let o of i.coordinates)if(Jn({type:"Point",coordinates:o},e,{ignoreEndVertices:!0})&&(r=!0),!Jn({type:"Point",coordinates:o},e,{ignoreEndVertices:!1}))return!1;return r}function Ps(e,i){let r=e.coordinates,o=[];for(let a=0;a<r.length-1;a++){let u=Te([r[a],r[a+1]]),h=wo(u,Se(i));h.features.length===0?o.push(u):o.push(...h.features)}return _e(o)}function As(e,i){let r=Ot(e),o=Ot(i);if(!So(r,o))return!1;for(let h of i.coordinates)if(!gn(h,e))return!1;let a=!1,u=Ps(i,e);for(let h of u.features){let p=Ds(h.geometry.coordinates[0],h.geometry.coordinates[1]);if(!gn(p,e))return!1;!a&&gn(p,e,{ignoreBoundary:!0})&&(a=!0)}return a}function lo(e,i){if(e.type==="Feature"&&e.geometry===null||i.type==="Feature"&&i.geometry===null)return!1;let r=Ot(e),o=Ot(i);if(!So(r,o))return!1;let a=Vi(i).coordinates;for(let u of a)for(let h of u)if(!gn(h,e))return!1;return!0}function So(e,i){return!(e[0]>i[0]||e[2]<i[2]||e[1]>i[1]||e[3]<i[3])}function ho(e,i){return e[0]===i[0]&&e[1]===i[1]}function Ds(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}var Ss=bs,Ts=H(_i()),Os=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,po=Math.ceil,Me=Math.floor,me="[BigNumber Error] ",To=me+"Number primitive has more than 15 significant digits: ",Fe=1e14,gt=14,co=9007199254740991,_o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],vi=1e7,Yt=1e9;function Oo(e){var i,r,o,a=k.prototype={constructor:k,toString:null,valueOf:null},u=new k(1),h=20,p=4,d=-7,m=21,w=-1e7,C=1e7,S=!1,O=1,Z=0,q={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},et="0123456789abcdefghijklmnopqrstuvwxyz",nt=!0;function k(f,b){var x,D,B,E,R,T,F,N,z=this;if(!(z instanceof k))return new k(f,b);if(b==null){if(f&&f._isBigNumber===!0){z.s=f.s,!f.c||f.e>C?z.c=z.e=null:f.e<w?z.c=[z.e=0]:(z.e=f.e,z.c=f.c.slice());return}if((T=typeof f=="number")&&f*0==0){if(z.s=1/f<0?(f=-f,-1):1,f===~~f){for(E=0,R=f;R>=10;R/=10,E++);E>C?z.c=z.e=null:(z.e=E,z.c=[f]);return}N=String(f)}else{if(!Os.test(N=String(f)))return o(z,N,T);z.s=N.charCodeAt(0)==45?(N=N.slice(1),-1):1}(E=N.indexOf("."))>-1&&(N=N.replace(".","")),(R=N.search(/e/i))>0?(E<0&&(E=R),E+=+N.slice(R+1),N=N.substring(0,R)):E<0&&(E=N.length)}else{if(Rt(b,2,et.length,"Base"),b==10&&nt)return z=new k(f),X(z,h+z.e+1,p);if(N=String(f),T=typeof f=="number"){if(f*0!=0)return o(z,N,T,b);if(z.s=1/f<0?(N=N.slice(1),-1):1,k.DEBUG&&N.replace(/^0\.0*|\./,"").length>15)throw Error(To+f)}else z.s=N.charCodeAt(0)===45?(N=N.slice(1),-1):1;for(x=et.slice(0,b),E=R=0,F=N.length;R<F;R++)if(x.indexOf(D=N.charAt(R))<0){if(D=="."){if(R>E){E=F;continue}}else if(!B&&(N==N.toUpperCase()&&(N=N.toLowerCase())||N==N.toLowerCase()&&(N=N.toUpperCase()))){B=!0,R=-1,E=0;continue}return o(z,String(f),T,b)}T=!1,N=r(N,b,10,z.s),(E=N.indexOf("."))>-1?N=N.replace(".",""):E=N.length}for(R=0;
vendor: 8,948 bytes, line 4
4N.charCodeAt(R)===48;R++);for(F=N.length;N.charCodeAt(--F)===48;);if(N=N.slice(R,++F)){if(F-=R,T&&k.DEBUG&&F>15&&(f>co||f!==Me(f)))throw Error(To+z.s*f);if((E=E-R-1)>C)z.c=z.e=null;else if(E<w)z.c=[z.e=0];else{if(z.e=E,z.c=[],R=(E+1)%gt,E<0&&(R+=gt),R<F){for(R&&z.c.push(+N.slice(0,R)),F-=gt;R<F;)z.c.push(+N.slice(R,R+=gt));R=gt-(N=N.slice(R)).length}else R-=F;for(;R--;N+="0");z.c.push(+N)}}else z.c=[z.e=0]}k.clone=Oo,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(f){var b,x;if(f!=null)if(typeof f=="object"){if(f.hasOwnProperty(b="DECIMAL_PLACES")&&(x=f[b],Rt(x,0,Yt,b),h=x),f.hasOwnProperty(b="ROUNDING_MODE")&&(x=f[b],Rt(x,0,8,b),p=x),f.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=f[b],x&&x.pop?(Rt(x[0],-Yt,0,b),Rt(x[1],0,Yt,b),d=x[0],m=x[1]):(Rt(x,-Yt,Yt,b),d=-(m=x<0?-x:x))),f.hasOwnProperty(b="RANGE"))if(x=f[b],x&&x.pop)Rt(x[0],-Yt,-1,b),Rt(x[1],1,Yt,b),w=x[0],C=x[1];else if(Rt(x,-Yt,Yt,b),x)w=-(C=x<0?-x:x);else throw Error(me+b+" cannot be zero: "+x);if(f.hasOwnProperty(b="CRYPTO"))if(x=f[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))S=x;else throw S=!x,Error(me+"crypto unavailable");else S=x;else throw Error(me+b+" not true or false: "+x);if(f.hasOwnProperty(b="MODULO_MODE")&&(x=f[b],Rt(x,0,9,b),O=x),f.hasOwnProperty(b="POW_PRECISION")&&(x=f[b],Rt(x,0,Yt,b),Z=x),f.hasOwnProperty(b="FORMAT"))if(x=f[b],typeof x=="object")q=x;else throw Error(me+b+" not an object: "+x);if(f.hasOwnProperty(b="ALPHABET"))if(x=f[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))nt=x.slice(0,10)=="0123456789",et=x;else throw Error(me+b+" invalid: "+x)}else throw Error(me+"Object expected: "+f);return{DECIMAL_PLACES:h,ROUNDING_MODE:p,EXPONENTIAL_AT:[d,m],RANGE:[w,C],CRYPTO:S,MODULO_MODE:O,POW_PRECISION:Z,FORMAT:q,ALPHABET:et}},k.isBigNumber=function(f){if(!f||f._isBigNumber!==!0)return!1;if(!k.DEBUG)return!0;var b,x,D=f.c,B=f.e,E=f.s;t:if({}.toString.call(D)=="[object Array]"){if((E===1||E===-1)&&B>=-Yt&&B<=Yt&&B===Me(B)){if(D[0]===0){if(B===0&&D.length===1)return!0;break t}if(b=(B+1)%gt,b<1&&(b+=gt),String(D[0]).length==b){for(b=0;b<D.length;b++)if(x=D[b],x<0||x>=Fe||x!==Me(x))break t;if(x!==0)return!0}}}else if(D===null&&B===null&&(E===null||E===1||E===-1))return!0;throw Error(me+"Invalid BigNumber: "+f)},k.maximum=k.max=function(){return G(arguments,-1)},k.minimum=k.min=function(){return G(arguments,1)},k.random=(function(){var f=9007199254740992,b=Math.random()*f&2097151?function(){return Me(Math.random()*f)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var D,B,E,R,T,F=0,N=[],z=new k(u);if(x==null?x=h:Rt(x,0,Yt),R=po(x/gt),S)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(R*=2));F<R;)T=D[F]*131072+(D[F+1]>>>11),T>=9e15?(B=crypto.getRandomValues(new Uint32Array(2)),D[F]=B[0],D[F+1]=B[1]):(N.push(T%1e14),F+=2);F=R/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(R*=7);F<R;)T=(D[F]&31)*281474976710656+D[F+1]*1099511627776+D[F+2]*4294967296+D[F+3]*16777216+(D[F+4]<<16)+(D[F+5]<<8)+D[F+6],T>=9e15?crypto.randomBytes(7).copy(D,F):(N.push(T%1e14),F+=7);F=R/7}else throw S=!1,Error(me+"crypto unavailable");if(!S)for(;F<R;)T=b(),T<9e15&&(N[F++]=T%1e14);for(R=N[--F],x%=gt,R&&x&&(T=_o[gt-x],N[F]=Me(R/T)*T);N[F]===0;N.pop(),F--);if(F<0)N=[E=0];else{for(E=-1;N[0]===0;N.splice(0,1),E-=gt);for(F=1,T=N[0];T>=10;T/=10,F++);F<gt&&(E-=gt-F)}return z.e=E,z.c=N,z}})(),k.sum=function(){for(var f=1,b=arguments,x=new k(b[0]);f<b.length;)x=x.plus(b[f++]);return x},r=(function(){var f="0123456789";function b(x,D,B,E){for(var R,T=[0],F,N=0,z=x.length;N<z;){for(F=T.length;F--;T[F]*=D);for(T[0]+=E.indexOf(x.charAt(N++)),R=0;R<T.length;R++)T[R]>B-1&&(T[R+1]==null&&(T[R+1]=0),T[R+1]+=T[R]/B|0,T[R]%=B)}return T.reverse()}return function(x,D,B,E,R){var T,F,N,z,K,st,at,_t,jt=x.indexOf("."),Ht=h,xt=p;for(jt>=0&&(z=Z,Z=0,x=x.replace(".",""),_t=new k(D),st=_t.pow(x.length-jt),Z=z,_t.c=b(si(Ee(st.c),st.e,"0"),10,B,f),_t.e=_t.c.length),at=b(x,D,B,R?(T=et,f):(T=f,et)),N=z=at.length;at[--z]==0;at.pop());if(!at[0])return T.charAt(0);if(jt<0?--N:(st.c=at,st.e=N,st.s=E,st=i(st,_t,Ht,xt,B),at=st.c,K=st.r,N=st.e),F=N+Ht+1,jt=at[F],z=B/2,K=K||F<0||at[F+1]!=null,K=xt<4?(jt!=null||K)&&(xt==0||xt==(st.s<0?3:2)):jt>z||jt==z&&(xt==4||K||xt==6&&at[F-1]&1||xt==(st.s<0?8:7)),F<1||!at[0])x=K?si(T.charAt(1),-Ht,T.charAt(0)):T.charAt(0);else{if(at.length=F,K)for(--B;++at[--F]>B;)at[F]=0,F||(++N,at=[1].concat(at));for(z=at.length;!at[--z];);for(jt=0,x="";jt<=z;x+=T.charAt(at[jt++]));x=si(x,N,T.charAt(0))}return x}})(),i=(function(){function f(D,B,E){var R,T,F,N,z=0,K=D.length,st=B%vi,at=B/vi|0;for(D=D.slice();K--;)F=D[K]%vi,N=D[K]/vi|0,R=at*F+N*st,T=st*F+R%vi*vi+z,z=(T/E|0)+(R/vi|0)+at*N,D[K]=T%E;return z&&(D=[z].concat(D)),D}function b(D,B,E,R){var T,F;if(E!=R)F=E>R?1:-1;else for(T=F=0;T<E;T++)if(D[T]!=B[T]){F=D[T]>B[T]?1:-1;break}return F}function x(D,B,E,R){for(var T=0;E--;)D[E]-=T,T=D[E]<B[E]?1:0,D[E]=T*R+D[E]-B[E];for(;!D[0]&&D.length>1;D.splice(0,1));}return function(D,B,E,R,T){var F,N,z,K,st,at,_t,jt,Ht,xt,Dt,ne,Yr,vo,Lo,Ve,er,Be=D.s==B.s?1:-1,le=D.c,Gt=B.c;if(!le||!le[0]||!Gt||!Gt[0])return new k(!D.s||!B.s||(le?Gt&&le[0]==Gt[0]:!Gt)?NaN:le&&le[0]==0||!Gt?Be*0:Be/0);for(jt=new k(Be),Ht=jt.c=[],N=D.e-B.e,Be=E+N+1,T||(T=Fe,N=we(D.e/gt)-we(B.e/gt),Be=Be/gt|0),z=0;Gt[z]==(le[z]||0);z++);if(Gt[z]>(le[z]||0)&&N--,Be<0)Ht.push(1),K=!0;else{for(vo=le.length,Ve=Gt.length,z=0,Be+=2,st=Me(T/(Gt[0]+1)),st>1&&(Gt=f(Gt,st,T),le=f(le,st,T),Ve=Gt.length,vo=le.length),Yr=Ve,xt=le.slice(0,Ve),Dt=xt.length;Dt<Ve;xt[Dt++]=0);er=Gt.slice(),er=[0].concat(er),Lo=Gt[0],Gt[1]>=T/2&&Lo++;do{if(st=0,F=b(Gt,xt,Ve,Dt),F<0){if(ne=xt[0],Ve!=Dt&&(ne=ne*T+(xt[1]||0)),st=Me(ne/Lo),st>1)for(st>=T&&(st=T-1),at=f(Gt,st,T),_t=at.length,Dt=xt.length;b(at,xt,_t,Dt)==1;)st--,x(at,Ve<_t?er:Gt,_t,T),_t=at.length,F=1;else st==0&&(F=st=1),at=Gt.slice(),_t=at.length;if(_t<Dt&&(at=[0].concat(at)),x(xt,at,Dt,T),Dt=xt.length,F==-1)for(;b(Gt,xt,Ve,Dt)<1;)st++,x(xt,Ve<Dt?er:Gt,Dt,T),Dt=xt.length}else F===0&&(st++,xt=[0]);Ht[z++]=st,xt[0]?xt[Dt++]=le[Yr]||0:(xt=[le[Yr]],Dt=1)}while((Yr++<vo||xt[0]!=null)&&Be--);K=xt[0]!=null,Ht[0]||Ht.splice(0,1)}if(T==Fe){for(z=1,Be=Ht[0];Be>=10;Be/=10,z++);X(jt,E+(jt.e=z+N*gt-1)+1,R,K)}else jt.e=N,jt.r=+K;return jt}})();function I(f,b,x,D){var B,E,R,T,F;if(x==null?x=p:Rt(x,0,8),!f.c)return f.toString();if(B=f.c[0],R=f.e,b==null)F=Ee(f.c),F=D==1||D==2&&(R<=d||R>=m)?jr(F,R):si(F,R,"0");else if(f=X(new k(f),b,x),E=f.e,F=Ee(f.c),T=F.length,D==1||D==2&&(b<=E||E<=d)){for(;T<b;F+="0",T++);F=jr(F,E)}else if(b-=R+(D===2&&E>R),F=si(F,E,"0"),E+1>T){if(--b>0)for(F+=".";b--;F+="0");}else if(b+=E-T,b>0)for(E+1==T&&(F+=".");b--;F+="0");return f.s<0&&B?"-"+F:F}function G(f,b){for(var x,D,B=1,E=new k(f[0]);B<f.length;B++)D=new k(f[B]),(!D.s||(x=Ki(E,D))===b||x===0&&E.s===b)&&(E=D);return E}function Y(f,b,x){for(var D=1,B=b.length;!b[--B];b.pop());for(B=b[0];B>=10;B/=10,D++);return(x=D+x*gt-1)>C?f.c=f.e=null:x<w?f.c=[f.e=0]:(f.e=x,f.c=b),f}o=(function(){var f=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,B=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(E,R,T,F){var N,z=T?R:R.replace(B,"");if(D.test(z))E.s=isNaN(z)?null:z<0?-1:1;else{if(!T&&(z=z.replace(f,function(K,st,at){return N=(at=at.toLowerCase())=="x"?16:at=="b"?2:8,!F||F==N?st:K}),F&&(N=F,z=z.replace(b,"$1").replace(x,"0.$1")),R!=z))return new k(z,N);if(k.DEBUG)throw Error(me+"Not a"+(F?" base "+F:"")+" number: "+R);E.s=null}E.c=E.e=null}})();function X(f,b,x,D){var B,E,R,T,F,N,z,K=f.c,st=_o;if(K){t:{for(B=1,T=K[0];T>=10;T/=10,B++);if(E=b-B,E<0)E+=gt,R=b,F=K[N=0],z=Me(F/st[B-R-1]%10);else if(N=po((E+1)/gt),N>=K.length)if(D){for(;K.length<=N;K.push(0));F=z=0,B=1,E%=gt,R=E-gt+1}else break t;else{for(F=T=K[N],B=1;T>=10;T/=10,B++);E%=gt,R=E-gt+B,z=R<0?0:Me(F/st[B-R-1]%10)}if(D=D||b<0||K[N+1]!=null||(R<0?F:F%st[B-R-1]),D=x<4?(z||D)&&(x==0||x==(f.s<0?3:2)):z>5||z==5&&(x==4||D||x==6&&(E>0?R>0?F/st[B-R]:0:K[N-1])%10&1||x==(f.s<0?8:7)),b<1||!K[0])return K.length=0,D?(b-=f.e+1,K[0]=st[(gt-b%gt)%gt],f.e=-b||0):K[0]=f.e=0,f;if(E==0?(K.length=N,T=1,N--):(K.length=N+1,T=st[gt-E],K[N]=R>0?Me(F/st[B-R]%st[R])*T:0),D)for(;;)if(N==0){for(E=1,R=K[0];R>=10;R/=10,E++);for(R=K[0]+=T,T=1;R>=10;R/=10,T++);E!=T&&(f.e++,K[0]==Fe&&(K[0]=1));break}else{if(K[N]+=T,K[N]!=Fe)break;K[N--]=0,T=1}for(E=K.length;K[--E]===0;K.pop());}f.e>C?f.c=f.e=null:f.e<w&&(f.c=[f.e=0])}return f}function J(f){var b,x=f.e;return x===null?f.toString():(b=Ee(f.c),b=x<=d||x>=m?jr(b,x):si(b,x,"0"),f.s<0?"-"+b:b)}return a.absoluteValue=a.abs=function(){var f=new k(this);return f.s<0&&(f.s=1),f},a.comparedTo=function(f,b){return Ki(this,new k(f,b))},a.decimalPlaces=a.dp=function(f,b){var x,D,B,E=this;if(f!=null)return Rt(f,0,Yt),b==null?b=p:Rt(b,0,8),X(new k(E),f+E.e+1,b);
vendor: 3,053 bytes, line 4
4if(!(x=E.c))return null;if(D=((B=x.length-1)-we(this.e/gt))*gt,B=x[B])for(;B%10==0;B/=10,D--);return D<0&&(D=0),D},a.dividedBy=a.div=function(f,b){return i(this,new k(f,b),h,p)},a.dividedToIntegerBy=a.idiv=function(f,b){return i(this,new k(f,b),0,1)},a.exponentiatedBy=a.pow=function(f,b){var x,D,B,E,R,T,F,N,z,K=this;if(f=new k(f),f.c&&!f.isInteger())throw Error(me+"Exponent not an integer: "+J(f));if(b!=null&&(b=new k(b)),T=f.e>14,!K.c||!K.c[0]||K.c[0]==1&&!K.e&&K.c.length==1||!f.c||!f.c[0])return z=new k(Math.pow(+J(K),T?f.s*(2-Nr(f)):+J(f))),b?z.mod(b):z;if(F=f.s<0,b){if(b.c?!b.c[0]:!b.s)return new k(NaN);D=!F&&K.isInteger()&&b.isInteger(),D&&(K=K.mod(b))}else{if(f.e>9&&(K.e>0||K.e<-1||(K.e==0?K.c[0]>1||T&&K.c[1]>=24e7:K.c[0]<8e13||T&&K.c[0]<=9999975e7)))return E=K.s<0&&Nr(f)?-0:0,K.e>-1&&(E=1/E),new k(F?1/E:E);Z&&(E=po(Z/gt+2))}for(T?(x=new k(.5),F&&(f.s=1),N=Nr(f)):(B=Math.abs(+J(f)),N=B%2),z=new k(u);;){if(N){if(z=z.times(K),!z.c)break;E?z.c.length>E&&(z.c.length=E):D&&(z=z.mod(b))}if(B){if(B=Me(B/2),B===0)break;N=B%2}else if(f=f.times(x),X(f,f.e+1,1),f.e>14)N=Nr(f);else{if(B=+J(f),B===0)break;N=B%2}K=K.times(K),E?K.c&&K.c.length>E&&(K.c.length=E):D&&(K=K.mod(b))}return D?z:(F&&(z=u.div(z)),b?z.mod(b):E?X(z,Z,p,R):z)},a.integerValue=function(f){var b=new k(this);return f==null?f=p:Rt(f,0,8),X(b,b.e+1,f)},a.isEqualTo=a.eq=function(f,b){return Ki(this,new k(f,b))===0},a.isFinite=function(){return!!this.c},a.isGreaterThan=a.gt=function(f,b){return Ki(this,new k(f,b))>0},a.isGreaterThanOrEqualTo=a.gte=function(f,b){return(b=Ki(this,new k(f,b)))===1||b===0},a.isInteger=function(){return!!this.c&&we(this.e/gt)>this.c.length-2},a.isLessThan=a.lt=function(f,b){return Ki(this,new k(f,b))<0},a.isLessThanOrEqualTo=a.lte=function(f,b){return(b=Ki(this,new k(f,b)))===-1||b===0},a.isNaN=function(){return!this.s},a.isNegative=function(){return this.s<0},a.isPositive=function(){return this.s>0},a.isZero=function(){return!!this.c&&this.c[0]==0},a.minus=function(f,b){var x,D,B,E,R=this,T=R.s;if(f=new k(f,b),b=f.s,!T||!b)return new k(NaN);if(T!=b)return f.s=-b,R.plus(f);var F=R.e/gt,N=f.e/gt,z=R.c,K=f.c;if(!F||!N){if(!z||!K)return z?(f.s=-b,f):new k(K?R:NaN);if(!z[0]||!K[0])return K[0]?(f.s=-b,f):new k(z[0]?R:p==3?-0:0)}if(F=we(F),N=we(N),z=z.slice(),T=F-N){for((E=T<0)?(T=-T,B=z):(N=F,B=K),B.reverse(),b=T;b--;B.push(0));B.reverse()}else for(D=(E=(T=z.length)<(b=K.length))?T:b,T=b=0;b<D;b++)if(z[b]!=K[b]){E=z[b]<K[b];break}if(E&&(B=z,z=K,K=B,f.s=-f.s),b=(D=K.length)-(x=z.length),b>0)for(;b--;z[x++]=0);for(b=Fe-1;D>T;){if(z[--D]<K[D]){for(x=D;x&&!z[--x];z[x]=b);--z[x],z[D]+=Fe}z[D]-=K[D]}for(;z[0]==0;z.splice(0,1),--N);return z[0]?Y(f,z,N):(f.s=p==3?-1:1,f.c=[f.e=0],f)},a.modulo=a.mod=function(f,b){var x,D,B=this;return f=new k(f,b),!B.c||!f.s||f.c&&!f.c[0]?new k(NaN):!f.c||B.c&&!B.c[0]?new k(B):(O==9?(D=f.s,f.s=1,x=i(B,f,0,3),f.s=D,x.s*=D):x=i(B,f,0,O),f=B.minus(x.times(f)),!f.c[0]&&O==1&&(f.s=B.s),f)},a.multipliedBy=a.times=function(f,b){var x,D,B,E,R,T,F,N,z,K,st,at,_t,jt,Ht,xt=this,Dt=xt.c,ne=(f=new k(f,b)).c;
vendor: 1,486 bytes, line 4
4if(!Dt||!ne||!Dt[0]||!ne[0])return!xt.s||!f.s||Dt&&!Dt[0]&&!ne||ne&&!ne[0]&&!Dt?f.c=f.e=f.s=null:(f.s*=xt.s,!Dt||!ne?f.c=f.e=null:(f.c=[0],f.e=0)),f;for(D=we(xt.e/gt)+we(f.e/gt),f.s*=xt.s,F=Dt.length,K=ne.length,F<K&&(_t=Dt,Dt=ne,ne=_t,B=F,F=K,K=B),B=F+K,_t=[];B--;_t.push(0));for(jt=Fe,Ht=vi,B=K;--B>=0;){for(x=0,st=ne[B]%Ht,at=ne[B]/Ht|0,R=F,E=B+R;E>B;)N=Dt[--R]%Ht,z=Dt[R]/Ht|0,T=at*N+z*st,N=st*N+T%Ht*Ht+_t[E]+x,x=(N/jt|0)+(T/Ht|0)+at*z,_t[E--]=N%jt;_t[E]=x}return x?++D:_t.splice(0,1),Y(f,_t,D)},a.negated=function(){var f=new k(this);return f.s=-f.s||null,f},a.plus=function(f,b){var x,D=this,B=D.s;if(f=new k(f,b),b=f.s,!B||!b)return new k(NaN);if(B!=b)return f.s=-b,D.minus(f);var E=D.e/gt,R=f.e/gt,T=D.c,F=f.c;if(!E||!R){if(!T||!F)return new k(B/0);if(!T[0]||!F[0])return F[0]?f:new k(T[0]?D:B*0)}if(E=we(E),R=we(R),T=T.slice(),B=E-R){for(B>0?(R=E,x=F):(B=-B,x=T),x.reverse();B--;x.push(0));x.reverse()}for(B=T.length,b=F.length,B-b<0&&(x=F,F=T,T=x,b=B),B=0;b;)B=(T[--b]=T[b]+F[b]+B)/Fe|0,T[b]=Fe===T[b]?0:T[b]%Fe;return B&&(T=[B].concat(T),++R),Y(f,T,R)},a.precision=a.sd=function(f,b){var x,D,B,E=this;if(f!=null&&f!==!!f)return Rt(f,1,Yt),b==null?b=p:Rt(b,0,8),X(new k(E),f,b);if(!(x=E.c))return null;if(B=x.length-1,D=B*gt+1,B=x[B]){for(;B%10==0;B/=10,D--);for(B=x[0];B>=10;B/=10,D++);}return f&&E.e+1>D&&(D=E.e+1),D},a.shiftedBy=function(f){return Rt(f,-co,co),this.times("1e"+f)},a.squareRoot=a.sqrt=function(){var f,b,x,D,B,E=this,R=E.c,T=E.s,F=E.e,N=h+4,z=new k("0.5");
vendor: 92,654 bytes, line 4
4if(T!==1||!R||!R[0])return new k(!T||T<0&&(!R||R[0])?NaN:R?E:1/0);if(T=Math.sqrt(+J(E)),T==0||T==1/0?(b=Ee(R),(b.length+F)%2==0&&(b+="0"),T=Math.sqrt(+b),F=we((F+1)/2)-(F<0||F%2),T==1/0?b="5e"+F:(b=T.toExponential(),b=b.slice(0,b.indexOf("e")+1)+F),x=new k(b)):x=new k(T+""),x.c[0]){for(F=x.e,T=F+N,T<3&&(T=0);;)if(B=x,x=z.times(B.plus(i(E,B,N,1))),Ee(B.c).slice(0,T)===(b=Ee(x.c)).slice(0,T))if(x.e<F&&--T,b=b.slice(T-3,T+1),b=="9999"||!D&&b=="4999"){if(!D&&(X(B,B.e+h+2,0),B.times(B).eq(E))){x=B;break}N+=4,T+=4,D=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(X(x,x.e+h+2,1),f=!x.times(x).eq(E));break}}return X(x,x.e+h+1,p,f)},a.toExponential=function(f,b){return f!=null&&(Rt(f,0,Yt),f++),I(this,f,b,1)},a.toFixed=function(f,b){return f!=null&&(Rt(f,0,Yt),f=f+this.e+1),I(this,f,b)},a.toFormat=function(f,b,x){var D,B=this;if(x==null)f!=null&&b&&typeof b=="object"?(x=b,b=null):f&&typeof f=="object"?(x=f,f=b=null):x=q;else if(typeof x!="object")throw Error(me+"Argument not an object: "+x);if(D=B.toFixed(f,b),B.c){var E,R=D.split("."),T=+x.groupSize,F=+x.secondaryGroupSize,N=x.groupSeparator||"",z=R[0],K=R[1],st=B.s<0,at=st?z.slice(1):z,_t=at.length;if(F&&(E=T,T=F,F=E,_t-=E),T>0&&_t>0){for(E=_t%T||T,z=at.substr(0,E);E<_t;E+=T)z+=N+at.substr(E,T);F>0&&(z+=N+at.slice(E)),st&&(z="-"+z)}D=K?z+(x.decimalSeparator||"")+((F=+x.fractionGroupSize)?K.replace(new RegExp("\\d{"+F+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):K):z}return(x.prefix||"")+D+(x.suffix||"")},a.toFraction=function(f){var b,x,D,B,E,R,T,F,N,z,K,st,at=this,_t=at.c;if(f!=null&&(T=new k(f),!T.isInteger()&&(T.c||T.s!==1)||T.lt(u)))throw Error(me+"Argument "+(T.isInteger()?"out of range: ":"not an integer: ")+J(T));if(!_t)return new k(at);for(b=new k(u),N=x=new k(u),D=F=new k(u),st=Ee(_t),E=b.e=st.length-at.e-1,b.c[0]=_o[(R=E%gt)<0?gt+R:R],f=!f||T.comparedTo(b)>0?E>0?b:N:T,R=C,C=1/0,T=new k(st),F.c[0]=0;z=i(T,b,0,1),B=x.plus(z.times(D)),B.comparedTo(f)!=1;)x=D,D=B,N=F.plus(z.times(B=N)),F=B,b=T.minus(z.times(B=b)),T=B;return B=i(f.minus(x),D,0,1),F=F.plus(B.times(N)),x=x.plus(B.times(D)),F.s=N.s=at.s,E=E*2,K=i(N,D,E,p).minus(at).abs().comparedTo(i(F,x,E,p).minus(at).abs())<1?[N,D]:[F,x],C=R,K},a.toNumber=function(){return+J(this)},a.toPrecision=function(f,b){return f!=null&&Rt(f,1,Yt),I(this,f,b,2)},a.toString=function(f){var b,x=this,D=x.s,B=x.e;return B===null?D?(b="Infinity",D<0&&(b="-"+b)):b="NaN":(f==null?b=B<=d||B>=m?jr(Ee(x.c),B):si(Ee(x.c),B,"0"):f===10&&nt?(x=X(new k(x),h+B+1,p),b=si(Ee(x.c),x.e,"0")):(Rt(f,2,et.length,"Base"),b=r(si(Ee(x.c),B,"0"),10,f,D,!0)),D<0&&x.c[0]&&(b="-"+b)),b},a.valueOf=a.toJSON=function(){return J(this)},a._isBigNumber=!0,a[Symbol.toStringTag]="BigNumber",a[Symbol.for("nodejs.util.inspect.custom")]=a.valueOf,e!=null&&k.set(e),k}function we(e){var i=e|0;return e>0||e===i?i:i-1}function Ee(e){for(var i,r,o=1,a=e.length,u=e[0]+"";o<a;){for(i=e[o++]+"",r=gt-i.length;r--;i="0"+i);u+=i}for(a=u.length;u.charCodeAt(--a)===48;);return u.slice(0,a+1||1)}function Ki(e,i){var r,o,a=e.c,u=i.c,h=e.s,p=i.s,d=e.e,m=i.e;if(!h||!p)return null;if(r=a&&!a[0],o=u&&!u[0],r||o)return r?o?0:-p:h;if(h!=p)return h;if(r=h<0,o=d==m,!a||!u)return o?0:!a^r?1:-1;if(!o)return d>m^r?1:-1;for(p=(d=a.length)<(m=u.length)?d:m,h=0;h<p;h++)if(a[h]!=u[h])return a[h]>u[h]^r?1:-1;return d==m?0:d>m^r?1:-1}function Rt(e,i,r,o){if(e<i||e>r||e!==Me(e))throw Error(me+(o||"Argument")+(typeof e=="number"?e<i||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Nr(e){var i=e.c.length-1;return we(e.e/gt)==i&&e.c[i]%2!=0}function jr(e,i){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(i<0?"e":"e+")+i}function si(e,i,r){var o,a;if(i<0){for(a=r+".";++i;a+=r);e=a+e}else if(o=e.length,++i>o){for(a=r,i-=o;--i;a+=r);e+=a}else i<o&&(e=e.slice(0,i)+"."+e.slice(i));return e}var Fs=Oo(),Ze=Fs,Rs=class{key;left=null;right=null;constructor(e){this.key=e}},$n=class extends Rs{constructor(e){super(e)}},Is=class{size=0;modificationCount=0;splayCount=0;splay(e){let i=this.root;if(i==null)return this.compare(e,e),-1;let r=null,o=null,a=null,u=null,h=i,p=this.compare,d;for(;;)if(d=p(h.key,e),d>0){let m=h.left;if(m==null||(d=p(m.key,e),d>0&&(h.left=m.right,m.right=h,h=m,m=h.left,m==null)))break;r==null?o=h:r.left=h,r=h,h=m}else if(d<0){let m=h.right;if(m==null||(d=p(m.key,e),d<0&&(h.right=m.left,m.left=h,h=m,m=h.right,m==null)))break;a==null?u=h:a.right=h,a=h,h=m}else break;return a!=null&&(a.right=h.left,h.left=u),r!=null&&(r.left=h.right,h.right=o),this.root!==h&&(this.root=h,this.splayCount++),d}splayMin(e){let i=e,r=i.left;for(;r!=null;){let o=r;i.left=o.right,o.right=i,i=o,r=i.left}return i}splayMax(e){let i=e,r=i.right;for(;r!=null;){let o=r;i.right=o.left,o.left=i,i=o,r=i.right}return i}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let i=this.root,r=i,o=i.left;if(this.size--,o==null)this.root=i.right;else{let a=i.right;i=this.splayMax(o),i.right=a,this.root=i}return this.modificationCount++,r}addNewRoot(e,i){this.size++,this.modificationCount++;let r=this.root;if(r==null){this.root=e;return}i<0?(e.left=r,e.right=r.right,r.right=null):(e.right=r,e.left=r.left,r.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,i)=>e<i?-1:e>i?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},Gr=class ir extends Is{root=null;compare;validKey;constructor(i,r){super(),this.compare=i??this.defaultCompare(),this.validKey=r??(o=>o!=null&&o!=null)}delete(i){return this.validKey(i)?this._delete(i)!=null:!1}deleteAll(i){for(let r of i)this.delete(r)}forEach(i){let r=this[Symbol.iterator](),o;for(;o=r.next(),!o.done;)i(o.value,o.value,this)}add(i){let r=this.splay(i);return r!=0&&this.addNewRoot(new $n(i),r),this}addAndReturn(i){let r=this.splay(i);return r!=0&&this.addNewRoot(new $n(i),r),this.root.key}addAll(i){for(let r of i)this.add(r)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(i){if(i==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(i)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let o=r.right;for(;o!=null;)r=o,o=r.right;return r.key}firstAfter(i){if(i==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(i)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let o=r.left;for(;o!=null;)r=o,o=r.left;return r.key}retainAll(i){let r=new ir(this.compare,this.validKey),o=this.modificationCount;for(let a of i){if(o!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(a)&&this.splay(a)==0&&r.add(this.root.key)}r.size!=this.size&&(this.root=r.root,this.size=r.size,this.modificationCount++)}lookup(i){return!this.validKey(i)||this.splay(i)!=0?null:this.root.key}intersection(i){let r=new ir(this.compare,this.validKey);for(let o of this)i.has(o)&&r.add(o);return r}difference(i){let r=new ir(this.compare,this.validKey);for(let o of this)i.has(o)||r.add(o);return r}union(i){let r=this.clone();return r.addAll(i),r}clone(){let i=new ir(this.compare,this.validKey);return i.size=this.size,i.root=this.copyNode(this.root),i}copyNode(i){if(i==null)return null;function r(a,u){let h,p;do{if(h=a.left,p=a.right,h!=null){let d=new $n(h.key);u.left=d,r(h,d)}if(p!=null){let d=new $n(p.key);u.right=d,a=p,u=d}}while(p!=null)}let o=new $n(i.key);return r(i,o),o}toSet(){return this.clone()}entries(){return new Ns(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new zs(this.wrap())}[Symbol.toStringTag]="[object Set]"},Fo=class{tree;path=new Array;modificationCount=null;splayCount;constructor(e){this.tree=e,this.splayCount=e.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 e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let r=this.tree.getRoot();for(;r!=null;)this.path.push(r),r=r.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 e=this.path[this.path.length-1],i=e.right;if(i!=null){for(;i!=null;)this.path.push(i),i=i.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},zs=class extends Fo{getValue(e){return e.key}},Ns=class extends Fo{getValue(e){return[e.key,e.key]}},Ro=e=>()=>e,mo=e=>{let i=e?(r,o)=>o.minus(r).abs().isLessThanOrEqualTo(e):Ro(!1);return(r,o)=>i(r,o)?0:r.comparedTo(o)};function js(e){let i=e?(r,o,a,u,h)=>r.exponentiatedBy(2).isLessThanOrEqualTo(u.minus(o).exponentiatedBy(2).plus(h.minus(a).exponentiatedBy(2)).times(e)):Ro(!1);return(r,o,a)=>{let u=r.x,h=r.y,p=a.x,d=a.y,m=h.minus(d).times(o.x.minus(p)).minus(u.minus(p).times(o.y.minus(d)));return i(m,u,h,p,d)?0:m.comparedTo(0)}}var Gs=e=>e,Zs=e=>{if(e){let i=new Gr(mo(e)),r=new Gr(mo(e)),o=(u,h)=>h.addAndReturn(u),a=u=>({x:o(u.x,i),y:o(u.y,r)});return a({x:new Ze(0),y:new Ze(0)}),a}return Gs},fo=e=>({set:i=>{ai=fo(i)},reset:()=>fo(e),compare:mo(e),snap:Zs(e),orient:js(e)}),ai=fo(),Qn=(e,i)=>e.ll.x.isLessThanOrEqualTo(i.x)&&i.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(i.y)&&i.y.isLessThanOrEqualTo(e.ur.y),go=(e,i)=>{if(i.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(i.ll.x)||i.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(i.ll.y))return null;let r=e.ll.x.isLessThan(i.ll.x)?i.ll.x:e.ll.x,o=e.ur.x.isLessThan(i.ur.x)?e.ur.x:i.ur.x,a=e.ll.y.isLessThan(i.ll.y)?i.ll.y:e.ll.y,u=e.ur.y.isLessThan(i.ur.y)?e.ur.y:i.ur.y;return{ll:{x:r,y:a},ur:{x:o,y:u}}},Zr=(e,i)=>e.x.times(i.y).minus(e.y.times(i.x)),Io=(e,i)=>e.x.times(i.x).plus(e.y.times(i.y)),Ur=e=>Io(e,e).sqrt(),Us=(e,i,r)=>{let o={x:i.x.minus(e.x),y:i.y.minus(e.y)},a={x:r.x.minus(e.x),y:r.y.minus(e.y)};return Zr(a,o).div(Ur(a)).div(Ur(o))},Vs=(e,i,r)=>{let o={x:i.x.minus(e.x),y:i.y.minus(e.y)},a={x:r.x.minus(e.x),y:r.y.minus(e.y)};return Io(a,o).div(Ur(a)).div(Ur(o))},zo=(e,i,r)=>i.y.isZero()?null:{x:e.x.plus(i.x.div(i.y).times(r.minus(e.y))),y:r},No=(e,i,r)=>i.x.isZero()?null:{x:r,y:e.y.plus(i.y.div(i.x).times(r.minus(e.x)))},Hs=(e,i,r,o)=>{if(i.x.isZero())return No(r,o,e.x);if(o.x.isZero())return No(e,i,r.x);if(i.y.isZero())return zo(r,o,e.y);if(o.y.isZero())return zo(e,i,r.y);let a=Zr(i,o);if(a.isZero())return null;let u={x:r.x.minus(e.x),y:r.y.minus(e.y)},h=Zr(u,i).div(a),p=Zr(u,o).div(a),d=e.x.plus(p.times(i.x)),m=r.x.plus(h.times(o.x)),w=e.y.plus(p.times(i.y)),C=r.y.plus(h.times(o.y)),S=d.plus(m).div(2),O=w.plus(C).div(2);return{x:S,y:O}},Ue=class Wo{point;isLeft;segment;otherSE;consumedBy;static compare(i,r){let o=Wo.comparePoints(i.point,r.point);return o!==0?o:(i.point!==r.point&&i.link(r),i.isLeft!==r.isLeft?i.isLeft?1:-1:Hr.compare(i.segment,r.segment))}static comparePoints(i,r){return i.x.isLessThan(r.x)?-1:i.x.isGreaterThan(r.x)?1:i.y.isLessThan(r.y)?-1:i.y.isGreaterThan(r.y)?1:0}constructor(i,r){i.events===void 0?i.events=[this]:i.events.push(this),this.point=i,this.isLeft=r}link(i){if(i.point===this.point)throw new Error("Tried to link already linked events");let r=i.point.events;for(let o=0,a=r.length;o<a;o++){let u=r[o];this.point.events.push(u),u.point=this.point}this.checkForConsuming()}checkForConsuming(){let i=this.point.events.length;for(let r=0;r<i;r++){let o=this.point.events[r];if(o.segment.consumedBy===void 0)for(let a=r+1;a<i;a++){let u=this.point.events[a];u.consumedBy===void 0&&o.otherSE.point.events===u.otherSE.point.events&&o.segment.consume(u.segment)}}}getAvailableLinkedEvents(){let i=[];for(let r=0,o=this.point.events.length;r<o;r++){let a=this.point.events[r];a!==this&&!a.segment.ringOut&&a.segment.isInResult()&&i.push(a)}return i}getLeftmostComparator(i){let r=new Map,o=a=>{let u=a.otherSE;r.set(a,{sine:Us(this.point,i.point,u.point),cosine:Vs(this.point,i.point,u.point)})};return(a,u)=>{r.has(a)||o(a),r.has(u)||o(u);let{sine:h,cosine:p}=r.get(a),{sine:d,cosine:m}=r.get(u);return h.isGreaterThanOrEqualTo(0)&&d.isGreaterThanOrEqualTo(0)?p.isLessThan(m)?1:p.isGreaterThan(m)?-1:0:h.isLessThan(0)&&d.isLessThan(0)?p.isLessThan(m)?-1:p.isGreaterThan(m)?1:0:d.isLessThan(h)?-1:d.isGreaterThan(h)?1:0}}},Ks=class bo{events;poly;_isExteriorRing;_enclosingRing;static factory(i){let r=[];for(let o=0,a=i.length;o<a;o++){let u=i[o];if(!u.isInResult()||u.ringOut)continue;let h=null,p=u.leftSE,d=u.rightSE,m=[p],w=p.point,C=[];for(;h=p,p=d,m.push(p),p.point!==w;)for(;;){let S=p.getAvailableLinkedEvents();if(S.length===0){let q=m[0].point,et=m[m.length-1].point;throw new Error(`Unable to complete output ring starting at [${q.x}, ${q.y}]. Last matching segment found ends at [${et.x}, ${et.y}].`)}if(S.length===1){d=S[0].otherSE;break}let O=null;for(let q=0,et=C.length;q<et;q++)if(C[q].point===p.point){O=q;break}if(O!==null){let q=C.splice(O)[0],et=m.splice(q.index);et.unshift(et[0].otherSE),r.push(new bo(et.reverse()));continue}C.push({index:m.length,point:p.point});let Z=p.getLeftmostComparator(h);d=S.sort(Z)[0].otherSE;break}r.push(new bo(m))}return r}constructor(i){this.events=i;for(let r=0,o=i.length;r<o;r++)i[r].segment.ringOut=this;this.poly=null}getGeom(){let i=this.events[0].point,r=[i];for(let m=1,w=this.events.length-1;m<w;m++){let C=this.events[m].point,S=this.events[m+1].point;ai.orient(C,i,S)!==0&&(r.push(C),i=C)}if(r.length===1)return null;let o=r[0],a=r[1];ai.orient(o,i,a)===0&&r.shift(),r.push(r[0]);let u=this.isExteriorRing()?1:-1,h=this.isExteriorRing()?0:r.length-1,p=this.isExteriorRing()?r.length:-1,d=[];for(let m=h;m!=p;m+=u)d.push([r[m].x.toNumber(),r[m].y.toNumber()]);return d}isExteriorRing(){if(this._isExteriorRing===void 0){let i=this.enclosingRing();this._isExteriorRing=i?!i.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let i=this.events[0];for(let a=1,u=this.events.length;a<u;a++){let h=this.events[a];Ue.compare(i,h)>0&&(i=h)}let r=i.segment.prevInResult(),o=r?r.prevInResult():null;for(;;){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut?.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut?.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}},jo=class{exteriorRing;interiorRings;constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let i=[e];for(let r=0,o=this.interiorRings.length;r<o;r++){let a=this.interiorRings[r].getGeom();a!==null&&i.push(a)}return i}},qs=class{rings;polys;constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let i=0,r=this.polys.length;i<r;i++){let o=this.polys[i].getGeom();o!==null&&e.push(o)}return e}_composePolys(e){let i=[];for(let r=0,o=e.length;r<o;r++){let a=e[r];if(!a.poly)if(a.isExteriorRing())i.push(new jo(a));else{let u=a.enclosingRing();u?.poly||i.push(new jo(u)),u?.poly?.addInterior(a)}}return i}},Ws=class{queue;tree;segments;constructor(e,i=Hr.compare){this.queue=e,this.tree=new Gr(i),this.segments=[]}process(e){let i=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(i),r;e.isLeft&&this.tree.add(i);let o=i,a=i;do o=this.tree.lastBefore(o);while(o!=null&&o.consumedBy!=null);do a=this.tree.firstAfter(a);while(a!=null&&a.consumedBy!=null);if(e.isLeft){let u=null;if(o){let p=o.getIntersection(i);if(p!==null&&(i.isAnEndpoint(p)||(u=p),!o.isAnEndpoint(p))){let d=this._splitSafely(o,p);for(let m=0,w=d.length;m<w;m++)r.push(d[m])}}let h=null;if(a){let p=a.getIntersection(i);if(p!==null&&(i.isAnEndpoint(p)||(h=p),!a.isAnEndpoint(p))){let d=this._splitSafely(a,p);for(let m=0,w=d.length;m<w;m++)r.push(d[m])}}if(u!==null||h!==null){let p=null;u===null?p=h:h===null?p=u:p=Ue.comparePoints(u,h)<=0?u:h,this.queue.delete(i.rightSE),r.push(i.rightSE);let d=i.split(p);for(let m=0,w=d.length;m<w;m++)r.push(d[m])}r.length>0?(this.tree.delete(i),r.push(e)):(this.segments.push(i),i.prev=o)}else{if(o&&a){let u=o.getIntersection(a);if(u!==null){if(!o.isAnEndpoint(u)){let h=this._splitSafely(o,u);for(let p=0,d=h.length;p<d;p++)r.push(h[p])}if(!a.isAnEndpoint(u)){let h=this._splitSafely(a,u);for(let p=0,d=h.length;p<d;p++)r.push(h[p])}}}this.tree.delete(i)}return r}_splitSafely(e,i){this.tree.delete(e);let r=e.rightSE;this.queue.delete(r);let o=e.split(i);return o.push(r),e.consumedBy===void 0&&this.tree.add(e),o}},Ys=class{type;numMultiPolys;run(e,i,r){tr.type=e;let o=[new Zo(i,!0)];for(let d=0,m=r.length;d<m;d++)o.push(new Zo(r[d],!1));if(tr.numMultiPolys=o.length,tr.type==="difference"){let d=o[0],m=1;for(;m<o.length;)go(o[m].bbox,d.bbox)!==null?m++:o.splice(m,1)}if(tr.type==="intersection")for(let d=0,m=o.length;d<m;d++){let w=o[d];for(let C=d+1,S=o.length;C<S;C++)if(go(w.bbox,o[C].bbox)===null)return[]}let a=new Gr(Ue.compare);for(let d=0,m=o.length;d<m;d++){let w=o[d].getSweepEvents();for(let C=0,S=w.length;C<S;C++)a.add(w[C])}let u=new Ws(a),h=null;for(a.size!=0&&(h=a.first(),a.delete(h));h;){let d=u.process(h);for(let m=0,w=d.length;m<w;m++){let C=d[m];C.consumedBy===void 0&&a.add(C)}a.size!=0?(h=a.first(),a.delete(h)):h=null}ai.reset();let p=Ks.factory(u.segments);return new qs(p).getGeom()}},tr=new Ys,Vr=tr,Xs=0,Hr=class Xr{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(i,r){let o=i.leftSE.point.x,a=r.leftSE.point.x,u=i.rightSE.point.x,h=r.rightSE.point.x;if(h.isLessThan(o))return 1;if(u.isLessThan(a))return-1;let p=i.leftSE.point.y,d=r.leftSE.point.y,m=i.rightSE.point.y,w=r.rightSE.point.y;if(o.isLessThan(a)){if(d.isLessThan(p)&&d.isLessThan(m))return 1;if(d.isGreaterThan(p)&&d.isGreaterThan(m))return-1;let C=i.comparePoint(r.leftSE.point);if(C<0)return 1;if(C>0)return-1;let S=r.comparePoint(i.rightSE.point);return S!==0?S:-1}if(o.isGreaterThan(a)){if(p.isLessThan(d)&&p.isLessThan(w))return-1;if(p.isGreaterThan(d)&&p.isGreaterThan(w))return 1;let C=r.comparePoint(i.leftSE.point);if(C!==0)return C;let S=i.comparePoint(r.rightSE.point);return S<0?1:S>0?-1:1}if(p.isLessThan(d))return-1;if(p.isGreaterThan(d))return 1;if(u.isLessThan(h)){let C=r.comparePoint(i.rightSE.point);if(C!==0)return C}if(u.isGreaterThan(h)){let C=i.comparePoint(r.rightSE.point);if(C<0)return 1;if(C>0)return-1}if(!u.eq(h)){let C=m.minus(p),S=u.minus(o),O=w.minus(d),Z=h.minus(a);if(C.isGreaterThan(S)&&O.isLessThan(Z))return 1;if(C.isLessThan(S)&&O.isGreaterThan(Z))return-1}return u.isGreaterThan(h)?1:u.isLessThan(h)||m.isLessThan(w)?-1:m.isGreaterThan(w)?1:i.id<r.id?-1:i.id>r.id?1:0}constructor(i,r,o,a){this.id=++Xs,this.leftSE=i,i.segment=this,i.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=i,this.rings=o,this.windings=a}static fromRing(i,r,o){let a,u,h,p=Ue.comparePoints(i,r);if(p<0)a=i,u=r,h=1;else if(p>0)a=r,u=i,h=-1;else throw new Error(`Tried to create degenerate segment at [${i.x}, ${i.y}]`);let d=new Ue(a,!0),m=new Ue(u,!1);return new Xr(d,m,[o],[h])}replaceRightSE(i){this.rightSE=i,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let i=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:i.isLessThan(r)?i:r},ur:{x:this.rightSE.point.x,y:i.isGreaterThan(r)?i:r}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(i){return i.x.eq(this.leftSE.point.x)&&i.y.eq(this.leftSE.point.y)||i.x.eq(this.rightSE.point.x)&&i.y.eq(this.rightSE.point.y)}comparePoint(i){return ai.orient(this.leftSE.point,i,this.rightSE.point)}getIntersection(i){let r=this.bbox(),o=i.bbox(),a=go(r,o);if(a===null)return null;let u=this.leftSE.point,h=this.rightSE.point,p=i.leftSE.point,d=i.rightSE.point,m=Qn(r,p)&&this.comparePoint(p)===0,w=Qn(o,u)&&i.comparePoint(u)===0,C=Qn(r,d)&&this.comparePoint(d)===0,S=Qn(o,h)&&i.comparePoint(h)===0;if(w&&m)return S&&!C?h:!S&&C?d:null;if(w)return C&&u.x.eq(d.x)&&u.y.eq(d.y)?null:u;if(m)return S&&h.x.eq(p.x)&&h.y.eq(p.y)?null:p;if(S&&C)return null;if(S)return h;if(C)return d;let O=Hs(u,this.vector(),p,i.vector());return O===null||!Qn(a,O)?null:ai.snap(O)}split(i){let r=[],o=i.events!==void 0,a=new Ue(i,!0),u=new Ue(i,!1),h=this.rightSE;this.replaceRightSE(u),r.push(u),r.push(a);let p=new Xr(a,h,this.rings.slice(),this.windings.slice());return Ue.comparePoints(p.leftSE.point,p.rightSE.point)>0&&p.swapEvents(),Ue.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(a.checkForConsuming(),u.checkForConsuming()),r}swapEvents(){let i=this.rightSE;this.rightSE=this.leftSE,this.leftSE=i,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,o=this.windings.length;r<o;r++)this.windings[r]*=-1}consume(i){let r=this,o=i;for(;r.consumedBy;)r=r.consumedBy;for(;o.consumedBy;)o=o.consumedBy;let a=Xr.compare(r,o);if(a!==0){if(a>0){let u=r;r=o,o=u}if(r.prev===o){let u=r;r=o,o=u}for(let u=0,h=o.rings.length;u<h;u++){let p=o.rings[u],d=o.windings[u],m=r.rings.indexOf(p);m===-1?(r.rings.push(p),r.windings.push(d)):r.windings[m]+=d}o.rings=null,o.windings=null,o.consumedBy=r,o.leftSE.consumedBy=r.leftSE,o.rightSE.consumedBy=r.rightSE}}prevInResult(){return this._prevInResult!==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(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let i=this.prev.consumedBy||this.prev;this._beforeState=i.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let i=this.beforeState();this._afterState={rings:i.rings.slice(0),windings:i.windings.slice(0),multiPolys:[]};let r=this._afterState.rings,o=this._afterState.windings,a=this._afterState.multiPolys;for(let p=0,d=this.rings.length;p<d;p++){let m=this.rings[p],w=this.windings[p],C=r.indexOf(m);C===-1?(r.push(m),o.push(w)):o[C]+=w}let u=[],h=[];for(let p=0,d=r.length;p<d;p++){if(o[p]===0)continue;let m=r[p],w=m.poly;if(h.indexOf(w)===-1)if(m.isExterior)u.push(w);else{h.indexOf(w)===-1&&h.push(w);let C=u.indexOf(m.poly);C!==-1&&u.splice(C,1)}}for(let p=0,d=u.length;p<d;p++){let m=u[p].multiPoly;a.indexOf(m)===-1&&a.push(m)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let i=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(Vr.type){case"union":{let o=i.length===0,a=r.length===0;this._isInResult=o!==a;break}case"intersection":{let o,a;i.length<r.length?(o=i.length,a=r.length):(o=r.length,a=i.length),this._isInResult=a===Vr.numMultiPolys&&o<a;break}case"xor":{let o=Math.abs(i.length-r.length);this._isInResult=o%2===1;break}case"difference":{let o=a=>a.length===1&&a[0].isSubject;this._isInResult=o(i)!==o(r);break}}return this._isInResult}},Go=class{poly;isExterior;segments;bbox;constructor(e,i,r){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let o=ai.snap({x:new Ze(e[0][0]),y:new Ze(e[0][1])});this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};let a=o;for(let u=1,h=e.length;u<h;u++){if(typeof e[u][0]!="number"||typeof e[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let p=ai.snap({x:new Ze(e[u][0]),y:new Ze(e[u][1])});p.x.eq(a.x)&&p.y.eq(a.y)||(this.segments.push(Hr.fromRing(a,p,this)),p.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=p.x),p.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=p.y),p.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=p.x),p.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=p.y),a=p)}(!o.x.eq(a.x)||!o.y.eq(a.y))&&this.segments.push(Hr.fromRing(a,o,this))}getSweepEvents(){let e=[];for(let i=0,r=this.segments.length;i<r;i++){let o=this.segments[i];e.push(o.leftSE),e.push(o.rightSE)}return e}},Js=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(e,i){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Go(e[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 r=1,o=e.length;r<o;r++){let a=new Go(e[r],this,!1);a.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=i}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let i=0,r=this.interiorRings.length;i<r;i++){let o=this.interiorRings[i].getSweepEvents();for(let a=0,u=o.length;a<u;a++)e.push(o[a])}return e}},Zo=class{isSubject;polys;bbox;constructor(e,i){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new Ze(Number.POSITIVE_INFINITY),y:new Ze(Number.POSITIVE_INFINITY)},ur:{x:new Ze(Number.NEGATIVE_INFINITY),y:new Ze(Number.NEGATIVE_INFINITY)}};for(let r=0,o=e.length;r<o;r++){let a=new Js(e[r],this);a.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=i}getSweepEvents(){let e=[];for(let i=0,r=this.polys.length;i<r;i++){let o=this.polys[i].getSweepEvents();for(let a=0,u=o.length;a<u;a++)e.push(o[a])}return e}},$s=(e,...i)=>Vr.run("intersection",e,i),Qs=(e,...i)=>Vr.run("difference",e,i),_l=ai.set;function Kr(e){let i={type:"Feature"};return i.geometry=e,i}function qr(e){return e.type==="Feature"?e.geometry:e}function Uo(e){return e&&e.geometry&&e.geometry.coordinates?e.geometry.coordinates:e}function ta(e){return Kr({type:"LineString",coordinates:e})}function ea(e){return Kr({type:"MultiLineString",coordinates:e})}function Vo(e){return Kr({type:"Polygon",coordinates:e})}function Ho(e){return Kr({type:"MultiPolygon",coordinates:e})}function ia(e,i){let r=qr(e),o=qr(i),a=$s(r.coordinates,o.coordinates);return a.length===0?null:a.length===1?Vo(a[0]):Ho(a)}function na(e,i){let r=qr(e),o=qr(i),a=Qs(r.coordinates,o.coordinates);return a.length===0?null:a.length===1?Vo(a[0]):Ho(a)}function Ko(e){return Array.isArray(e)?1+Ko(e[0]):-1}function ra(e){e instanceof L.Polyline&&(e=e.toGeoJSON(15));let i=Uo(e),r=Ko(i),o=[];return r>1?i.forEach(a=>{o.push(ta(a))}):o.push(e),o}function oa(e){let i=[];return e.eachLayer(r=>{i.push(Uo(r.toGeoJSON(15)))}),ea(i)}Pt.Cut=Pt.Polygon.extend({initialize(e){this._map=e,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 e=this._layer.getLatLngs();if(e.length<=2)return;let i=L.polygon(e,this.options.pathOptions);i._latlngInfos=this._layer._latlngInfo,this.cut(i),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:o,originalLayer:a})=>{this._fireCut(a,o,a),this._fireCut(this._map,o,a),a.pm._fireEdit()}),this._editedLayers=[];let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))},cut(e){let i=this._map._layers,r=e._latlngInfos||[];Object.keys(i).map(o=>i[o]).filter(o=>o.pm).filter(o=>!o._pmTempLayer).filter(o=>!L.PM.optIn&&!o.options.pmIgnore||L.PM.optIn&&o.options.pmIgnore===!1).filter(o=>o instanceof L.Polyline).filter(o=>o!==e).filter(o=>o.pm.options.allowCutting).filter(o=>this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0?this.options.layersToCut.indexOf(o)>-1:!0).filter(o=>!this._layerGroup.hasLayer(o)).filter(o=>{try{let a=!!P(e.toGeoJSON(15),o.toGeoJSON(15)).features.length>0;return a||o instanceof L.Polyline&&!(o instanceof L.Polygon)?a:!!ia(e.toGeoJSON(15),o.toGeoJSON(15))}catch{return o instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(o=>{let a;if(o instanceof L.Polygon){a=L.polygon(o.getLatLngs());let d=a.getLatLngs();r.forEach(m=>{if(m&&m.snapInfo){let{latlng:w}=m,C=this._calcClosestLayer(w,[a]);if(C&&C.segment&&C.distance<this.options.snapDistance){let{segment:S}=C;if(S&&S.length===2){let{indexPath:O,parentPath:Z,newIndex:q}=L.PM.Utils._getIndexFromSegment(d,S);(O.length>1?(0,Ts.default)(d,Z):d).splice(q,0,w)}}}})}else a=o;let u=this._cutLayer(e,a),h=L.geoJSON(u,o.options);h.getLayers().length===1&&([h]=h.getLayers()),this._setPane(h,"layerPane");let p=h.addTo(this._map.pm._getContainingLayer());if(p.pm.enable(o.pm.options),p.pm.disable(),o._pmTempLayer=!0,e._pmTempLayer=!0,o.remove(),o.removeFrom(this._map.pm._getContainingLayer()),e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),p.getLayers&&p.getLayers().length===0&&this._map.pm.removeLayer({target:p}),p instanceof L.LayerGroup?(p.eachLayer(d=>{this._addDrawnLayerProp(d)}),this._addDrawnLayerProp(p)):this._addDrawnLayerProp(p),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let d=this.options.layersToCut.indexOf(o);d>-1&&this.options.layersToCut.splice(d,1)}this._editedLayers.push({layer:p,originalLayer:o})})},_cutLayer(e,i){let r=L.geoJSON(),o;if(i instanceof L.Polygon)o=na(i.toGeoJSON(15),e.toGeoJSON(15));else{let a=ra(i);a.forEach(u=>{let h=hs(u,e.toGeoJSON(15)),p;h&&h.features.length>0?p=L.geoJSON(h):p=L.geoJSON(u),p.getLayers().forEach(d=>{Ss(e.toGeoJSON(15),d.toGeoJSON(15))||d.addTo(r)})}),a.length>1?o=oa(r):o=r.toGeoJSON(15)}return o},_change:L.Util.falseFn}),Pt.Text=Pt.extend({initialize(e){this._map=e,this._shape="Text",this.toolbarButtonName="drawText"},enable(e){L.Util.setOptions(this,e),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(dt("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(e){this.enabled()?this.disable():this.enable(e)},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this.options.snappable){let i=e;i.target=this._hintMarker,this._handleSnapping(i)}},_createMarker(e){if(!e.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let i=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),this.options.textOptions?.className){let a=this.options.textOptions.className.split(" ");this.textArea.classList.add(...a)}let r=this._createTextIcon(this.textArea),o=new L.Marker(i,{textMarker:!0,_textMarkerOverPM:!0,icon:r});if(this._setPane(o,"markerPane"),this._finishLayer(o),o.pm||(o.options.draggable=!1),o.addTo(this._map.pm._getContainingLayer()),o.pm){o.pm.textArea=this.textArea,L.setOptions(o.pm,{removeIfEmpty:this.options.textOptions?.removeIfEmpty??!0});let a=this.options.textOptions?.focusAfterDraw??!0;o.pm._createTextMarker(a),this.options.textOptions?.text&&o.pm.setText(this.options.textOptions.text)}this._fireCreate(o),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(e){this.enable(),this._hintMarker.setLatLng(e.latlng)},_createTextArea(){let e=document.createElement("textarea");return e.readOnly=!0,e.classList.add("pm-textarea","pm-disabled"),e},_createTextIcon(e){return L.divIcon({className:"pm-text-marker",html:e})}});var sa={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,ni(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 e=this._getDOMElem();e&&(ni(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(e)):L.DomEvent.on(e,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,ni(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 e=this._getDOMElem();e&&(ni(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(e)):L.DomEvent.off(e,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(e){let i=e.touches?e.touches[0]:e,r={originalEvent:i,target:this._layer};return r.containerPoint=this._map.mouseEventToContainerPoint(i),r.latlng=this._map.containerPointToLatLng(r.containerPoint),this._dragMixinOnMouseDown(r),!1},_simulateMouseMoveEvent(e){let i=e.touches?e.touches[0]:e,r={originalEvent:i,target:this._layer};return r.containerPoint=this._map.mouseEventToContainerPoint(i),r.latlng=this._map.containerPointToLatLng(r.containerPoint),this._dragMixinOnMouseMove(r),!1},_simulateMouseUpEvent(e){let i={originalEvent:e.touches?e.touches[0]:e,target:this._layer};return e.type.indexOf("touch")===-1&&(i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint)),this._dragMixinOnMouseUp(i),!1},_dragMixinOnMouseDown(e){if(e.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(e);let i=e._fromLayerSync,r=this._syncLayers("_dragMixinOnMouseDown",e);if(this._layer instanceof L.Marker&&(this.options.snappable&&!i&&!r?this._initSnappableMarkers():this._disableSnapping()),this._layer instanceof L.CircleMarker){let o="resizeableCircleMarker";this._layer instanceof L.Circle&&(o="resizeableCircle"),this.options.snappable&&!i&&!r?this._layer.pm.options[o]||this._initSnappableMarkersDrag():this._layer.pm.options[o]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=e.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(e){this._overwriteEventIfItComesFromMarker(e);let i=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",e),this._dragging||(this._dragging=!0,L.DomUtil.addClass(i,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=e.latlng),this._onLayerDrag(e),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(e){let i=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",e),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,i&&L.DomUtil.removeClass(i,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0):!1},_onLayerDrag(e){let{latlng:i}=e,r={lat:i.lat-this._tempDragCoord.lat,lng:i.lng-this._tempDragCoord.lng},o=a=>a.map(u=>{if(Array.isArray(u))return o(u);let h={lat:u.lat+r.lat,lng:u.lng+r.lng};return(u.alt||u.alt===0)&&(h.alt=u.alt),h});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let a=o([this._layer.getLatLng()]);this._layer.setLatLng(a[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let a=this._layer.getLatLng();this._layer._snapped&&(a=this._layer._orgLatLng);let u=o([a]);this._layer.setLatLng(u[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let a=o([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(a),this._fireChange(this._layer.getBounds(),"Edit")}else{let a=o(this._layer.getLatLngs());this._layer.setLatLngs(a),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=i,e.layer=this._layer,this._fireDrag(e)},addDraggingClass(){let e=this._getDOMElem();e&&L.DomUtil.addClass(e,"leaflet-pm-draggable")},removeDraggingClass(){let e=this._getDOMElem();e&&L.DomUtil.removeClass(e,"leaflet-pm-draggable")},_getDOMElem(){let e=null;return this._layer._path?e=this._layer._path:this._layer._renderer&&this._layer._renderer._container?e=this._layer._renderer._container:this._layer._image?e=this._layer._image:this._layer._icon&&(e=this._layer._icon),e},_overwriteEventIfItComesFromMarker(e){e.target.getLatLng&&(!e.target._radius||e.target._radius<=10)&&(e.containerPoint=this._map.mouseEventToContainerPoint(e.originalEvent),e.latlng=this._map.containerPointToLatLng(e.containerPoint))},_syncLayers(e,i){if(this.enabled())return!1;if(!i._fromLayerSync&&this._layer===i.target&&this.options.syncLayersOnDrag){i._fromLayerSync=!0;let r=[];if(L.Util.isArray(this.options.syncLayersOnDrag))r=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(o=>{o instanceof L.LayerGroup&&(r=r.concat(o.pm.getLayers(!0)))});else if(this.options.syncLayersOnDrag===!0&&this._parentLayerGroup)for(let o in this._parentLayerGroup){let a=this._parentLayerGroup[o];a.pm&&(r=a.pm.getLayers(!0))}return L.Util.isArray(r)&&r.length>0&&(r=r.filter(o=>!!o.pm).filter(o=>!!o.pm.options.draggable),r.forEach(o=>{o!==this._layer&&o.pm[e]&&(o._snapped=!1,o.pm[e](i))})),r.length>0}return!1},_stopDOMImageDrag(e){return e.preventDefault(),!1}},aa=sa,ua=H(_i());function la(e,i,r,o){return r.unproject(i.transform(r.project(e,o)),o)}function qo(e,i,r){let o=r.getMaxZoom();if(o===1/0&&(o=r.getZoom()),L.Util.isArray(e)){let a=[];return e.forEach(u=>{a.push(qo(u,i,r))}),a}return e instanceof L.LatLng?la(e,i,r,o):null}function yn(e,i){i instanceof L.Layer&&(i=i.getLatLng());let r=e.getMaxZoom();return r===1/0&&(r=e.getZoom()),e.project(i,r)}function Wr(e,i){let r=e.getMaxZoom();return r===1/0&&(r=e.getZoom()),e.unproject(i,r)}var ha={_onRotateStart(e){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=yn(this._map,this._rotationOriginLatLng),this._rotationStartPoint=yn(this._map,e.target.getLatLng()),this._initialRotateLatLng=qt(this._layer),this._startAngle=this.getAngle();let i=qt(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,i),this._fireRotationStart(this._map,i)},_onRotate(e){let i=yn(this._map,e.target.getLatLng()),r=this._rotationStartPoint,o=this._rotationOriginPoint,a=Math.atan2(i.y-o.y,i.x-o.x)-Math.atan2(r.y-o.y,r.x-o.x);this._layer.setLatLngs(this._rotateLayer(a,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let u=this;function h(w,C=[],S=-1){if(S>-1&&C.push(S),L.Util.isArray(w[0]))w.forEach((O,Z)=>h(O,C.slice(),Z));else{let O=C.length>0?(0,ua.default)(u._markers,C):u._markers[0];w.forEach((Z,q)=>{O[q].setLatLng(Z)})}}h(this._layer.getLatLngs());let p=qt(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(a,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let d=a*180/Math.PI;d=d<0?d+360:d;let m=d+this._startAngle;this._setAngle(m),this._rotationLayer.pm._setAngle(m),this._fireRotation(this._rotationLayer,d,p),this._fireRotation(this._map,d,p),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let e=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let i=qt(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=qt(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,e,i),this._fireRotationEnd(this._map,e,i),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(e,i,r,o,a){let u=yn(a,r);return this._matrix=o.clone().rotate(e,u).flip(),qo(i,this._matrix,a)},_setAngle(e){e=e<0?e+360:e,this._angle=e%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let e=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),i=e.getCenter();return e.removeFrom(this._layer._map),i},enableRotate(){if(!this.options.allowRotation){this.disableRotate();return}this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&this._angle===void 0&&this.setInitAngle(ji(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let e={fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0};this._rotatePoly=L.polygon(this._layer.getLatLngs(),e),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=qt(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},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(e){let i=this.getAngle(),r=this._layer.getLatLngs(),o=e*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(o,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+e),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(o,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let a=this.getAngle()-i;a=a<0?a+360:a,this._startAngle=i,this._fireRotation(this._layer,a,r,this._layer),this._fireRotation(this._map||this._layer._map,a,r,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(e){let i=e-this.getAngle();this.rotateLayer(i)},getAngle(){return this._angle||0},setInitAngle(e){this._setAngle(e)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(e){this._rotationCenter=e,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(e)}},pa=ha,ca=L.Class.extend({includes:[aa,qn,pa,zi],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(e){L.Util.setOptions(this,e)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(e,i){i==="layerPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":i==="vertexPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":i==="markerPane"&&(e.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(e,i){let r=i.target,o={layer:this._layer,marker:r,event:i},a="";return e==="move"?a="moveVertexValidation":e==="add"?a="addVertexValidation":e==="remove"&&(a="removeVertexValidation"),this.options[a]&&typeof this.options[a]=="function"&&!this.options[a](o)?(e==="move"&&(r._cancelDragEventChain=r.getLatLng()),!1):(r._cancelDragEventChain=null,!0)},_vertexValidationDrag(e){return e._cancelDragEventChain?(e._latlng=e._cancelDragEventChain,e.update(),!1):!0},_vertexValidationDragEnd(e){return e._cancelDragEventChain?(e._cancelDragEventChain=null,!1):!0}}),Xt=ca;Xt.LayerGroup=L.Class.extend({initialize(e){this._layerGroup=e,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(o=>this._initLayer(o));let i=o=>{if(o.layer._pmTempLayer)return;this._layers=this.getLayers();let a=this._layers.filter(u=>!u.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in u.pm._parentLayerGroup));a.forEach(u=>{this._initLayer(u)}),a.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(i,100,this),this),this._layerGroup.on("layerremove",o=>{this._removeLayerFromGroup(o.target)},this);let r=o=>{o.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(r,100,this),this)},enable(e,i=[]){i.length===0&&(this._layers=this.getLayers()),this._options=e,this._layers.forEach(r=>{r instanceof L.LayerGroup?i.indexOf(r._leaflet_id)===-1&&(i.push(r._leaflet_id),r.pm.enable(e,i)):r.pm.enable(e)})},disable(e=[]){e.length===0&&(this._layers=this.getLayers()),this._layers.forEach(i=>{i instanceof L.LayerGroup?e.indexOf(i._leaflet_id)===-1&&(e.push(i._leaflet_id),i.pm.disable(e)):i.pm.disable()})},enabled(e=[]){return e.length===0&&(this._layers=this.getLayers()),!!this._layers.find(i=>i instanceof L.LayerGroup?e.indexOf(i._leaflet_id)===-1?(e.push(i._leaflet_id),i.pm.enabled(e)):!1:i.pm.enabled())},toggleEdit(e,i=[]){i.length===0&&(this._layers=this.getLayers()),this._options=e,this._layers.forEach(r=>{r instanceof L.LayerGroup?i.indexOf(r._leaflet_id)===-1&&(i.push(r._leaflet_id),r.pm.toggleEdit(e,i)):r.pm.toggleEdit(e)})},_initLayer(e){let i=L.Util.stamp(this._layerGroup);e.pm._parentLayerGroup||(e.pm._parentLayerGroup={}),e.pm._parentLayerGroup[i]=this._layerGroup},_removeLayerFromGroup(e){if(e.pm&&e.pm._layerGroup){let i=L.Util.stamp(this._layerGroup);delete e.pm._layerGroup[i]}},dragging(){return this._layers=this.getLayers(),this._layers?!!this._layers.find(e=>e.pm.dragging()):!1},getOptions(){return this.options},_getMap(){return this._map||this._layers.find(e=>!!e._map)?._map||null},getLayers(e=!1,i=!0,r=!0,o=[]){let a=[];return e?this._layerGroup.getLayers().forEach(u=>{a.push(u),u instanceof L.LayerGroup&&o.indexOf(u._leaflet_id)===-1&&(o.push(u._leaflet_id),a=a.concat(u.pm.getLayers(!0,!0,!0,o)))}):a=this._layerGroup.getLayers(),r&&(a=a.filter(u=>!(u instanceof L.LayerGroup))),i&&(a=a.filter(u=>!!u.pm),a=a.filter(u=>!u._pmTempLayer),a=a.filter(u=>!L.PM.optIn&&!u.options.pmIgnore||L.PM.optIn&&u.options.pmIgnore===!1)),a},setOptions(e,i=[]){i.length===0&&(this._layers=this.getLayers()),this.options=e,this._layers.forEach(r=>{r.pm&&(r instanceof L.LayerGroup?i.indexOf(r._leaflet_id)===-1&&(i.push(r._leaflet_id),r.pm.setOptions(e,i)):r.pm.setOptions(e))})}}),Xt.Marker=Xt.extend({_shape:"Marker",initialize(e){this._layer=e,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(e={draggable:!0}){if(L.Util.setOptions(this,e),!this.options.allowEditing||!this._layer._map){this.disable();return}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()},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(e){this.enabled()?this.disable():this.enable(e)},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(e){let i=e.target;i.remove(),this._fireRemove(i),this._fireRemove(this._map,i)},_onDragStart(){this._map.pm.Draw.Marker._layerIsDragging=!0},_onMarkerDragEnd(){this._map.pm.Draw.Marker._layerIsDragging=!1},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let e=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,e.off("pm:drag",this._handleSnapping,this),e.on("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.on("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this),e.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let e=this._layer;e.off("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this)}});var Li=H(_i()),da={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 e=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=e.filter((i,r,o)=>o.indexOf(i)===r)},_removeFromCache(e){let i=this.markerCache.indexOf(e);i>-1&&this.markerCache.splice(i,1)},renderLimits(e){this.markerCache.forEach(i=>{e.includes(i)?this._markerGroup.addLayer(i):this._markerGroup.removeLayer(i)})},applyLimitFilters({latlng:e={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let i=[...this._filterClosestMarkers(e)];this.renderLimits(i)},_filterClosestMarkers(e){let i=[...this.markerCache],r=this.options.limitMarkersToCount;return r===-1?i:(i.sort((o,a)=>{let u=o._latlng.distanceTo(e),h=a._latlng.distanceTo(e);return u-h}),i.filter((o,a)=>r>-1?a<r:!0))},_preventRenderMarkers:!1,_preventRenderingMarkers(e){this._preventRenderMarkers=!!e}},_a=da;Xt.Line=Xt.extend({includes:[_a],_shape:"Line",initialize(e){this._layer=e,this._enabled=!1},enable(e){if(L.Util.setOptions(this,e),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}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:(this._layer.options.color!=="#f00000ff"?(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 e=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(e,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(e){return this.enabled()?this.disable():this.enable(e),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let e=this._map,i=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(e),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let r=o=>{if(Array.isArray(o[0]))return o.map(r,this);let a=o.map(this._createMarker,this);return this.options.hideMiddleMarkers!==!0&&o.map((u,h)=>{let p=this.isPolygon()?(h+1)%o.length:h+1;return this._createMiddleMarker(a[h],a[p])}),a};this._markers=r(i),this.filterMarkerGroup(),e.addLayer(this._markerGroup)},_createMarker(e){let i=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._pmTempLayer=!0,this.options.rotate?(i.on("dragstart",this._onRotateStart,this),i.on("drag",this._onRotate,this),i.on("dragend",this._onRotateEnd,this)):(i.on("click",this._onVertexClick,this),i.on("dragstart",this._onMarkerDragStart,this),i.on("move",this._onMarkerDrag,this),i.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||i.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(i),i},_createMiddleMarker(e,i){if(!e||!i)return!1;let r=L.PM.Utils.calcMiddleLatLng(this._map,e.getLatLng(),i.getLatLng()),o=this._createMarker(r),a=L.divIcon({className:"marker-icon marker-icon-middle"});return o.setIcon(a),o.leftM=e,o.rightM=i,e._middleMarkerNext=o,i._middleMarkerPrev=o,o.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),o.on("movestart",this._onMiddleMarkerMoveStart,this),o},_onMiddleMarkerClick(e){let i=e.target;if(!this._vertexValidation("add",e))return;let r=L.divIcon({className:"marker-icon"});i.setIcon(r),this._addMarker(i,i.leftM,i.rightM)},_onMiddleMarkerMoveStart(e){let i=e.target;if(i.on("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidation("add",e)){i.on("move",this._onMiddleMarkerMovePrevent,this);return}i._dragging=!0,this._addMarker(i,i.leftM,i.rightM)},_onMiddleMarkerMovePrevent(e){let i=e.target;this._vertexValidationDrag(i)},_onMiddleMarkerMoveEnd(e){let i=e.target;if(i.off("move",this._onMiddleMarkerMovePrevent,this),i.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(i))return;let r=L.divIcon({className:"marker-icon"});i.setIcon(r),setTimeout(()=>{delete i._dragging},100)},_addMarker(e,i,r){e.off("movestart",this._onMiddleMarkerMoveStart,this),e.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let o=e.getLatLng(),a=this._layer._latlngs;delete e.leftM,delete e.rightM;let{indexPath:u,index:h,parentPath:p}=L.PM.Utils.findDeepMarkerIndex(this._markers,i),d=u.length>1?(0,Li.default)(a,p):a,m=u.length>1?(0,Li.default)(this._markers,p):this._markers;d.splice(h+1,0,o),m.splice(h+1,0,e),this._layer.setLatLngs(a),this.options.hideMiddleMarkers!==!0&&(this._createMiddleMarker(i,e),this._createMiddleMarker(e,r)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(e,L.PM.Utils.findDeepMarkerIndex(this._markers,e).indexPath,o),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return Ne(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(e){let i=this._layer,r,o;if(this.options.allowSelfIntersection?r=!1:(o=Ne(this._layer.toGeoJSON(15)),r=o.features.length>0),r){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return r;e?this._flashLayer():(i.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(o)}else i.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return r},_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(e,i){e.forEach(r=>{Array.isArray(r)?this._updateDisabledMarkerStyle(r,i):r._icon&&(i&&!this._checkMarkerAllowedToDrag(r)?L.DomUtil.addClass(r._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(r._icon,"vertexmarker-disabled"))})},_removeMarker(e){let i=e.target;if(!this._vertexValidation("remove",e))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=qt(this._layer,this._layer.getLatLngs()));let r=this._layer.getLatLngs(),{indexPath:o,index:a,parentPath:u}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);if(!o)return;let h=o.length>1?(0,Li.default)(r,u):r,p=o.length>1?(0,Li.default)(this._markers,u):this._markers,d=u[u.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!d&&(h.length<=2||this.isPolygon()&&h.length<=3)){this._flashLayer();return}h.splice(a,1),this._layer.setLatLngs(r),this.isPolygon()&&h.length<=2&&h.splice(0,h.length);let m=!1;if(h.length<=1&&(h.splice(0,h.length),u.length>1&&o.length>1&&(r=Ni(r)),this._layer.setLatLngs(r),this._initMarkers(),m=!0),ii(r)||this._layer.remove(),r=Ni(r),this._layer.setLatLngs(r),this._markers=Ni(this._markers),!m&&(p=o.length>1?(0,Li.default)(this._markers,u):this._markers,i._middleMarkerPrev&&(this._markerGroup.removeLayer(i._middleMarkerPrev),this._removeFromCache(i._middleMarkerPrev)),i._middleMarkerNext&&(this._markerGroup.removeLayer(i._middleMarkerNext),this._removeFromCache(i._middleMarkerNext)),this._markerGroup.removeLayer(i),this._removeFromCache(i),p)){let w,C;if(this.isPolygon()?(w=(a+1)%p.length,C=(a+(p.length-1))%p.length):(C=a-1<0?void 0:a-1,w=a+1>=p.length?void 0:a+1),w!==C){let S=p[C],O=p[w];this.options.hideMiddleMarkers!==!0&&this._createMiddleMarker(S,O)}p.splice(a,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(e){let i=this._layer.getLatLngs(),r=e.getLatLng(),{indexPath:o,index:a,parentPath:u}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),h=o.length>1?(0,Li.default)(i,u):i;r.alt=h[a].alt,h.splice(a,1,r),this._layer.setLatLngs(i)},_getNeighborMarkers(e){let{indexPath:i,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),a=i.length>1?(0,Li.default)(this._markers,o):this._markers,u=(r+1)%a.length,h=(r+(a.length-1))%a.length,p=a[h],d=a[u];return{prevMarker:p,nextMarker:d}},_checkMarkerAllowedToDrag(e){let{prevMarker:i,nextMarker:r}=this._getNeighborMarkers(e),o=L.polyline([i.getLatLng(),e.getLatLng()]),a=L.polyline([e.getLatLng(),r.getLatLng()]),u=P(this._layer.toGeoJSON(15),o.toGeoJSON(15)).features.filter(p=>{let d=p.geometry.coordinates,m=L.latLng(d[1],d[0]);return!m.equals(i.getLatLng())&&!m.equals(e.getLatLng())}).length,h=P(this._layer.toGeoJSON(15),a.toGeoJSON(15)).features.filter(p=>{let d=p.geometry.coordinates,m=L.latLng(d[1],d[0]);return!m.equals(r.getLatLng())&&!m.equals(e.getLatLng())}).length;return!(u<1&&h<1)},_onMarkerDragStart(e){let i=e.target;if(this._preventRenderingMarkers(!0),this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",e))return;let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);this._fireMarkerDragStart(e,r),this.options.allowSelfIntersection||(this._coordsBeforeEdit=qt(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(i):this._markerAllowedToDrag=null},_onMarkerDrag(e){let i=e.target;if(!this._vertexValidationDrag(i))return;let{indexPath:r,index:o,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);if(!r)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&this._markerAllowedToDrag===!1){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(i);let u=r.length>1?(0,Li.default)(this._markers,a):this._markers,h=(o+1)%u.length,p=(o+(u.length-1))%u.length,d=i.getLatLng(),m=u[p].getLatLng(),w=u[h].getLatLng();if(i._middleMarkerNext){let C=L.PM.Utils.calcMiddleLatLng(this._map,d,w);i._middleMarkerNext.setLatLng(C)}if(i._middleMarkerPrev){let C=L.PM.Utils.calcMiddleLatLng(this._map,d,m);i._middleMarkerPrev.setLatLng(C)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(e,r),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(e){let i=e.target;if(this._preventRenderingMarkers(!1),!this._vertexValidationDragEnd(i))return;let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,i),o=!this.options.allowSelfIntersection&&this.hasSelfIntersection();o&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(o=!1);let a=!this.options.allowSelfIntersection&&o;if(this._fireMarkerDragEnd(e,r,a),a){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(e,r);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(e){let i=e.target;if(i._dragging)return;let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);this._fireVertexClick(e,r)}}),Xt.Polygon=Xt.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(e){let{prevMarker:i,nextMarker:r}=this._getNeighborMarkers(e),o=L.polyline([i.getLatLng(),e.getLatLng()]),a=L.polyline([e.getLatLng(),r.getLatLng()]),u=P(this._layer.toGeoJSON(15),o.toGeoJSON(15)).features.filter(p=>{let d=p.geometry.coordinates,m=L.latLng(d[1],d[0]);return!m.equals(i.getLatLng())&&!m.equals(e.getLatLng())}).length,h=P(this._layer.toGeoJSON(15),a.toGeoJSON(15)).features.filter(p=>{let d=p.geometry.coordinates,m=L.latLng(d[1],d[0]);return!m.equals(r.getLatLng())&&!m.equals(e.getLatLng())}).length;return!(u<1&&h<1)}}),Xt.Rectangle=Xt.Polygon.extend({_shape:"Rectangle",_initMarkers(){let e=this._map,i=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,e.addLayer(this._markerGroup),this._markers=[],this._markers[0]=i.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((r,o)=>{let a=this._cornerMarkers.find(u=>u._index===o);a&&a.setLatLng(r)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(e,i){let r=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(r,"vertexPane"),r._origLatLng=e,r._index=i,r._pmTempLayer=!0,r.on("click",this._onVertexClick,this),this._markerGroup.addLayer(r),r},_addMarkerEvents(){this._markers[0].forEach(e=>{e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on("contextmenu",this._removeMarker,this)})},_removeMarker(){return null},_onMarkerDragStart(e){if(!this._vertexValidation("move",e))return;let i=e.target,r=this._cornerMarkers;i._oppositeCornerLatLng=r.find(a=>a._index===(i._index+2)%4).getLatLng(),i._snapped=!1;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);this._fireMarkerDragStart(e,o)},_onMarkerDrag(e){let i=e.target;if(!this._vertexValidationDrag(i)||i._index===void 0)return;this._adjustRectangleForMarkerMove(i);let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);this._fireMarkerDrag(e,r),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(e){let i=e.target;if(!this._vertexValidationDragEnd(i))return;this._cornerMarkers.forEach(o=>{delete o._oppositeCornerLatLng});let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);this._fireMarkerDragEnd(e,r),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(e){L.extend(e._origLatLng,e._latlng);let i=L.PM.Utils._getRotatedRectangle(e.getLatLng(),e._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(i),this._adjustAllMarkers(e),this._layer.redraw()},_adjustAllMarkers(e){let i=this._layer.getLatLngs()[0];if(i&&i.length!==4&&i.length>0)i.forEach((r,o)=>{this._cornerMarkers[o].setLatLng(r)}),this._cornerMarkers.slice(i.length).forEach(r=>{r.setLatLng(i[0])});else if(!i||!i.length)console.error("The layer has no LatLngs");else{let r=i.findIndex(o=>e.getLatLng().equals(o));r>-1?(this._cornerMarkers[(e._index+1)%4].setLatLng(i[(r+1)%4]),this._cornerMarkers[(e._index+2)%4].setLatLng(i[(r+2)%4]),this._cornerMarkers[(e._index+3)%4].setLatLng(i[(r+3)%4])):this._cornerMarkers.forEach(o=>{o.setLatLng(i[o._index])})}},_findCorners(){this._angle===void 0&&this.setInitAngle(ji(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let e=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(e[0],e[2],this.getAngle(),this._map||this)}}),Xt.CircleMarker=Xt.extend({_shape:"CircleMarker",initialize(e){this._layer=e,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(e={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,e),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),!this.options.allowEditing||!this._layer._map){this.disable();return}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()},_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(e){this.enabled()?this.disable():this.enable(e)},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 e=this._map;this._helperLayers&&(this._helperLayers.removeFrom(e),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(e);let i=this._layer.getLatLng(),r=this._layer._radius,o=this._getLatLngOnCircle(i,r);this._centerMarker=this._createCenterMarker(i),this._outerMarker=this._createOuterMarker(o),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(e,i){let r=this._map.project(e),o=L.point(r.x+i,r.y);return this._map.unproject(o)},_createHintLine(e,i){let r=e.getLatLng(),o=i.getLatLng();this._hintline=L.polyline([r,o],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(e){let i=this._createMarker(e);return this.options.draggable?(L.DomUtil.addClass(i._icon,"leaflet-pm-draggable"),i.on("move",this._moveCircle,this)):i.dragging.disable(),i},_createOuterMarker(e){let i=this._createMarker(e);return i.on("drag",this._resizeCircle,this),i},_createMarker(e){let i=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=e,i._pmTempLayer=!0,i.on("dragstart",this._onMarkerDragStart,this),i.on("drag",this._onMarkerDrag,this),i.on("dragend",this._onMarkerDragEnd,this),i.on("click",this._onVertexClick,this),this._helperLayers.addLayer(i),i},_moveCircle(e){if(e.target._cancelDragEventChain)return;let i=this._centerMarker.getLatLng();this._layer.setLatLng(i);let r=this._layer._radius,o=this._getLatLngOnCircle(i,r);this._outerMarker._latlng=o,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let e=this._layer.getLatLng(),i=this._layer._radius,r=this._getLatLngOnCircle(e,i);this._outerMarker.setLatLng(r),this._centerMarker.setLatLng(e),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let e=this._centerMarker.getLatLng(),i=this._outerMarker.getLatLng(),r=this._distanceCalculation(e,i);this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(r),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let e=this._centerMarker.getLatLng(),i=this._outerMarker.getLatLng();this._hintline.setLatLngs([e,i])},_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(e){this._vertexValidation("move",e)&&this._fireMarkerDragStart(e)},_onMarkerDrag(e){let i=e.target;i instanceof L.Marker&&!this._vertexValidationDrag(i)||this._fireMarkerDrag(e)},_onMarkerDragEnd(e){this._extedingMarkerDragEnd();let i=e.target;this._vertexValidationDragEnd(i)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(e))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let e=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,e.off("pm:drag",this._handleSnapping,this),e.on("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.on("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this),e.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let e=this._layer;e.off("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let e=this._layer._map||this._map;if(e){let i=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),e,this._layer.getLatLng()),r=L.circle(this._layer.getLatLng(),this._layer.options);r.setRadius(i);let o=e&&e.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(r,200,!o).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(r,200,!o),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let e=this._centerMarker.getLatLng(),i=this._outerMarker.getLatLng(),r=this._distanceCalculation(e,i);return this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?i=de(this._map,e,i,this._getMinDistanceInMeter(e)):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]&&(i=de(this._map,e,i,this._getMaxDistanceInMeter(e))),i},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let e=this._centerMarker.getLatLng(),i=this._outerMarker.getLatLng(),r=this._distanceCalculation(e,i);this.options[this._minRadiusOption]&&r<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&r>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(e,i){return this._map.project(e).distanceTo(this._map.project(i))},_getMinDistanceInMeter(e){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,e)},_getMaxDistanceInMeter(e){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,e)},_onVertexClick(e){e.target._dragging||this._fireVertexClick(e,void 0)}}),Xt.Circle=Xt.CircleMarker.extend({_shape:"Circle",initialize(e){this._layer=e,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(e){L.PM.Edit.CircleMarker.prototype.enable.call(this,e||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let e=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(e,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let e=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!e).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!e),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(e,i){return this._map.distance(e,i)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(e){e.target._dragging||this._fireVertexClick(e,void 0)}}),Xt.ImageOverlay=Xt.extend({_shape:"ImageOverlay",initialize(e){this._layer=e,this._enabled=!1},toggleEdit(e){this.enabled()?this.disable():this.enable(e)},enabled(){return this._enabled},enable(e={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,e),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}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 e=this._layer.getBounds(),i=e.getNorthWest(),r=e.getNorthEast(),o=e.getSouthEast(),a=e.getSouthWest();return[i,r,o,a]}}),Xt.Text=Xt.extend({_shape:"Text",initialize(e){this._layer=e,this._enabled=!1},enable(e){if(L.Util.setOptions(this,e),!!this.textArea){if(!this.options.allowEditing||!this._layer._map){this.disable();return}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 e=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),e.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(e){this.enabled()?this.disable():this.enable(e)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let e=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,e.off("pm:drag",this._handleSnapping,this),e.on("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.on("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this),e.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let e=this._layer;e.off("pm:drag",this._handleSnapping,this),e.off("pm:dragend",this._cleanupSnapping,this),e.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let e=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,i=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${e}px`,this.textArea.style.width=`${i}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(e){e.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(e={}){let i=this._hasFocus;this._hasFocus=e.type==="focus",!i!=!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 new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(e){e&&(this.textArea.value=e),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let i=this.options.className.split(" ");this.textArea.classList.add(...i)}let e=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(e),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(e=!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(),e===!0&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(e){e.preventDefault()}});var yo=function(e,i,r,o,a,u){this._matrix=[e,i,r,o,a,u]};yo.init=()=>new L.PM.Matrix(1,0,0,1,0,0),yo.prototype={transform(e){return this._transform(e.clone())},_transform(e){let i=this._matrix,{x:r,y:o}=e;return e.x=i[0]*r+i[1]*o+i[4],e.y=i[2]*r+i[3]*o+i[5],e},untransform(e){let i=this._matrix;return new L.Point((e.x/i[0]-i[4])/i[0],(e.y/i[2]-i[5])/i[2])},clone(){let e=this._matrix;return new L.PM.Matrix(e[0],e[1],e[2],e[3],e[4],e[5])},translate(e){if(e===void 0)return new L.Point(this._matrix[4],this._matrix[5]);let i,r;return typeof e=="number"?(i=e,r=e):(i=e.x,r=e.y),this._add(1,0,0,1,i,r)},scale(e,i){if(e===void 0)return new L.Point(this._matrix[0],this._matrix[3]);let r,o;return i=i||L.point(0,0),typeof e=="number"?(r=e,o=e):(r=e.x,o=e.y),this._add(r,0,0,o,i.x,i.y)._add(1,0,0,1,-i.x,-i.y)},rotate(e,i){let r=Math.cos(e),o=Math.sin(e);return i=i||new L.Point(0,0),this._add(r,o,-o,r,i.x,i.y)._add(1,0,0,1,-i.x,-i.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(e,i,r,o,a,u){let h=[[],[],[]],p=this._matrix,d=[[p[0],p[2],p[4]],[p[1],p[3],p[5]],[0,0,1]],m=[[e,r,a],[i,o,u],[0,0,1]],w;e&&e instanceof L.PM.Matrix&&(p=e._matrix,m=[[p[0],p[2],p[4]],[p[1],p[3],p[5]],[0,0,1]]);for(let C=0;C<3;C+=1)for(let S=0;S<3;S+=1){w=0;for(let O=0;O<3;O+=1)w+=d[C][O]*m[O][S];h[C][S]=w}return this._matrix=[h[0][0],h[1][0],h[0][1],h[1][1],h[0][2],h[1][2]],this}};var ma=yo,fa={calcMiddleLatLng(e,i,r){let o=e.project(i),a=e.project(r);return e.unproject(o._add(a)._divideBy(2))},findLayers(e){let i=[];return e.eachLayer(r=>{(r instanceof L.Polyline||r instanceof L.Marker||r instanceof L.Circle||r instanceof L.CircleMarker||r instanceof L.ImageOverlay)&&i.push(r)}),i=i.filter(r=>!!r.pm),i=i.filter(r=>!r._pmTempLayer),i=i.filter(r=>!L.PM.optIn&&!r.options.pmIgnore||L.PM.optIn&&r.options.pmIgnore===!1),i},circleToPolygon(e,i=60,r=!0){let o=e.getLatLng(),a=e.getRadius(),u=De(o,a,i,0,r),h=[];for(let p=0;p<u.length;p+=1){let d=[u[p].lat,u[p].lng];h.push(d)}return L.polygon(h,e.options)},disablePopup(e){e.getPopup()&&(e._tempPopupCopy=e.getPopup(),e.unbindPopup())},enablePopup(e){e._tempPopupCopy&&(e.bindPopup(e._tempPopupCopy),delete e._tempPopupCopy)},_fireEvent(e,i,r,o=!1){e.fire(i,r,o);let{groups:a}=this.getAllParentGroups(e);a.forEach(u=>{u.fire(i,r,o)})},getAllParentGroups(e){let i=[],r=[],o=a=>{for(let u in a._eventParents)if(i.indexOf(u)===-1){i.push(u);let h=a._eventParents[u];r.push(h),o(h)}};return!e._pmLastGroupFetch||!e._pmLastGroupFetch.time||new Date().getTime()-e._pmLastGroupFetch.time>1e3?(o(e),e._pmLastGroupFetch={time:new Date().getTime(),groups:r,groupIds:i},{groupIds:i,groups:r}):{groups:e._pmLastGroupFetch.groups,groupIds:e._pmLastGroupFetch.groupIds}},createGeodesicPolygon:De,getTranslation:dt,findDeepCoordIndex(e,i,r=!0){let o,a=h=>(p,d)=>{let m=h.concat(d);if(r){if(p.lat&&p.lat===i.lat&&p.lng===i.lng)return o=m,!0}else if(p.lat&&L.latLng(p).equals(i))return o=m,!0;return Array.isArray(p)&&p.some(a(m))};e.some(a([]));let u={};return o&&(u={indexPath:o,index:o[o.length-1],parentPath:o.slice(0,o.length-1)}),u},findDeepMarkerIndex(e,i){let r,o=u=>(h,p)=>{let d=u.concat(p);return h._leaflet_id===i._leaflet_id?(r=d,!0):Array.isArray(h)&&h.some(o(d))};e.some(o([]));let a={};return r&&(a={indexPath:r,index:r[r.length-1],parentPath:r.slice(0,r.length-1)}),a},_getIndexFromSegment(e,i){if(i&&i.length===2){let r=this.findDeepCoordIndex(e,i[0]),o=this.findDeepCoordIndex(e,i[1]),a=Math.max(r.index,o.index);return(r.index===0||o.index===0)&&a!==1&&(a+=1),{indexA:r,indexB:o,newIndex:a,indexPath:r.indexPath,parentPath:r.parentPath}}return null},_getRotatedRectangle(e,i,r,o){let a=yn(o,e),u=yn(o,i),h=r*Math.PI/180,p=Math.cos(h),d=Math.sin(h),m=(u.x-a.x)*p+(u.y-a.y)*d,w=(u.y-a.y)*p-(u.x-a.x)*d,C=m*p+a.x,S=m*d+a.y,O=-w*d+a.x,Z=w*p+a.y,q=Wr(o,a),et=Wr(o,{x:C,y:S}),nt=Wr(o,u),k=Wr(o,{x:O,y:Z});return[q,et,nt,k]},pxRadiusToMeterRadius(e,i,r){let o=i.project(r),a=L.point(o.x+e,o.y);return i.distance(i.unproject(a),r)}},ga=fa;L.PM=L.PM||{version:In.version,Map:Kn,Toolbar:Sr,Draw:Pt,Edit:Xt,Utils:ga,Matrix:ma,activeLang:"en",optIn:!1,initialize(e){this.addInitHooks(e)},setOptIn(e){this.optIn=!!e},addInitHooks(){function e(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}L.Map.addInitHook(e);function i(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}L.LayerGroup.addInitHook(i);function r(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(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.Marker.addInitHook(r);function o(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}L.CircleMarker.addInitHook(o);function a(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}L.Polyline.addInitHook(a);function u(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}L.Polygon.addInitHook(u);function h(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}L.Rectangle.addInitHook(h);function p(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}L.Circle.addInitHook(p);function d(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))}L.ImageOverlay.addInitHook(d)},reInitLayer(e){e instanceof L.LayerGroup&&e.eachLayer(i=>{this.reInitLayer(i)}),e.pm||L.PM.optIn&&e.options.pmIgnore!==!1||e.options.pmIgnore||(e instanceof L.Map?e.pm=new L.PM.Map(e):e instanceof L.Marker?e.options.textMarker?(e.pm=new L.PM.Edit.Text(e),e.pm._initTextMarker(),e.pm._createTextMarker(!1)):e.pm=new L.PM.Edit.Marker(e):e instanceof L.Circle?e.pm=new L.PM.Edit.Circle(e):e instanceof L.CircleMarker?e.pm=new L.PM.Edit.CircleMarker(e):e instanceof L.Rectangle?e.pm=new L.PM.Edit.Rectangle(e):e instanceof L.Polygon?e.pm=new L.PM.Edit.Polygon(e):e instanceof L.Polyline?e.pm=new L.PM.Edit.Line(e):e instanceof L.LayerGroup?e.pm=new L.PM.Edit.LayerGroup(e):e instanceof L.ImageOverlay&&(e.pm=new L.PM.Edit.ImageOverlay(e)))}},L.version==="1.7.1"&&L.Canvas.include({_onClick(e){let i=this._map.mouseEventToLayerPoint(e),r,o;for(let a=this._drawFirst;a;a=a.next)r=a.layer,r.options.interactive&&r._containsPoint(i)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(r))&&(o=r);o&&(L.DomEvent.fakeStop(e),this._fireEvent([o],e))}}),L.PM.initialize()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.