PageSourceSearch

https://dialogluzern.ch/decidim-packs/js/decidim_navigation_maps-6e96850ecdf32fb0af7d.js

js dialogluzern.ch collected 2026-09-24 09:58:37 UTC 319,451 bytes, 38 lines download raw bytes

1(function(){var pa={13883:function(St,lt,se){var ht,ve,Ie=Object.defineProperty,Ke=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,ri=(He,Ne,Je)=>Ne in He?Ie(He,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Je}):He[Ne]=Je,Fe=(He,Ne)=>{for(var Je in Ne||(Ne={}))Ye.call(Ne,Je)&&ri(He,Je,Ne[Je]);if(rt)for(var Je of rt(Ne))xt.call(Ne,Je)&&ri(He,Je,Ne[Je]);return He},Qe=(He,Ne)=>Ke(He,yt(Ne)),ie=(He,Ne,Je)=>ri(He,typeof Ne!="symbol"?Ne+"":Ne,Je);(()=>{var He,Ne,Je=Object.create,xe=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyNames,vt=Object.getPrototypeOf,ni=Object.prototype.hasOwnProperty,z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ut=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zt(t))!ni.call(e,n)&&n!==i&&xe(e,n,{get:()=>t[n],enumerable:!(r=Ue(t,n))||r.enumerable});return e},pt=(e,t,i)=>(i=e!=null?Je(vt(e)):{},Ut(t||!e||!e.__esModule?xe(i,"default",{value:e,enumerable:!0}):i,e)),Jt=z((e,t)=>{function i(){this.__data__=[],this.size=0}t.exports=i}),ai=z((e,t)=>{function i(r,n){return r===n||r!==r&&n!==n}t.exports=i}),xi=z((e,t)=>{var i=ai();function r(n,a){for(var s=n.length;s--;)if(i(n[s][0],a))return s;return-1}t.exports=r}),Xt=z((e,t)=>{var i=xi(),r=Array.prototype,n=r.splice;function a(s){var o=this.__data__,l=i(o,s);if(l<0)return!1;var h=o.length-1;return l==h?o.pop():n.call(o,l,1),--this.size,!0}t.exports=a}),Ei=z((e,t)=>{var i=xi();function r(n){var a=this.__data__,s=i(a,n);return s<0?void 0:a[s][1]}t.exports=r}),nr=z((e,t)=>{var i=xi();function r(n){return i(this.__data__,n)>-1}t.exports=r}),ar=z((e,t)=>{var i=xi();function r(n,a){var s=this.__data__,o=i(s,n);return o<0?(++this.size,s.push([n,a])):s[o][1]=a,this}t.exports=r}),gi=z((e,t)=>{var i=Jt(),r=Xt(),n=Ei(),a=nr(),s=ar();function o(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var b=l[h];this.set(b[0],b[1])}}o.prototype.clear=i,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=s,t.exports=o}),Yr=z((e,t)=>{var i=gi();function r(){this.__data__=new i,this.size=0}t.exports=r}),Jr=z((e,t)=>{function i(r){var n=this.__data__,a=n.delete(r);return this.size=n.size,a}t.exports=i}),Xr=z((e,t)=>{function i(r){return this.__data__.get(r)}t.exports=i}),$r=z((e,t)=>{function i(r){return this.__data__.has(r)}t.exports=i}),Bi=z((e,t)=>{var i=typeof se.g=="object"&&se.g&&se.g.Object===Object&&se.g;t.exports=i}),$t=z((e,t)=>{var i=Bi(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=i||r||Function("return this")();t.exports=n}),wi=z((e,t)=>{var i=$t(),r=i.Symbol;t.exports=r}),Zr=z((e,t)=>{var i=wi(),r=Object.prototype,n=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;function o(l){var h=n.call(l,s),v=l[s];try{l[s]=void 0;var b=!0}catch(w){}var O=a.call(l);return b&&(h?l[s]=v:delete l[s]),O}t.exports=o}),Wr=z((e,t)=>{var i=Object.prototype,r=i.toString;function n(a){return r.call(a)}t.exports=n}),si=z((e,t)=>{var i=wi(),r=Zr(),n=Wr(),a="[object Null]",s="[object Undefined]",o=i?i.toStringTag:void 0;function l(h){return h==null?h===void 0?s:a:o&&o in Object(h)?r(h):n(h)}t.exports=l}),Vt=z((e,t)=>{function i(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}t.exports=i}),_i=z((e,t)=>{var i=si(),r=Vt(),n="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function l(h){if(!r(h))return!1;var v=i(h);return v==a||v==s||v==n||v==o}t.exports=l}),Qr=z((e,t)=>{var i=$t(),r=i["__core-js_shared__"];t.exports=r}),mi=z((e,t)=>{var i=Qr(),r=function(){var a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function n(a){return!!r&&r in a}t.exports=n}),ze=z((e,t)=>{var i=Function.prototype,r=i.toString;function n(a){if(a!=null){try{return r.call(a)}catch(s){}try{return a+""}catch(s){}}return""}t.exports=n}),Di=z((e,t)=>{var i=_i(),r=mi(),n=Vt(),a=ze(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,v=l.toString,b=h.hasOwnProperty,O=RegExp("^"+v.call(b).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(N){if(!n(N)||r(N))return!1;var Y=i(N)?O:o;return Y.test(a(N))}t.exports=w}),Pi=z((e,t)=>{function i(r,n){return r==null?void 0:r[n]}t.exports=i}),Ft=z((e,t)=>{var i=Di(),r=Pi();function n(a,s){var o=r(a,s);return i(o)?o:void 0}t.exports=n}),Ai=z((e,t)=>{var i=Ft(),r=$t(),n=i(r,"Map");t.exports=n}),Zt=z((e,t)=>{var i=Ft(),r=i(Object,"create");t.exports=r}),Si=z((e,t)=>{var i=Zt();function r(){this.__data__=i?i(null):{},this.size=0}t.exports=r}),yi=z((e,t)=>{function i(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}t.exports=i}),en=z((e,t)=>{var i=Zt(),r="__lodash_hash_undefined__",n=Object.prototype,a=n.hasOwnProperty;function s(o){var l=this.__data__;if(i){var h=l[o];return h===r?void 0:h}return a.call(l,o)?l[o]:void 0}t.exports=s}),Fi=z((e,t)=>{var i=Zt(),r=Object.prototype,n=r.hasOwnProperty;function a(s){var o=this.__data__;return i?o[s]!==void 0:n.call(o,s)}t.exports=a}),sr=z((e,t)=>{var i=Zt(),r="__lodash_hash_undefined__";function n(a,s){var o=this.__data__;return this.size+=this.has(a)?0:1,o[a]=i&&s===void 0?r:s,this}t.exports=n}),Ti=z((e,t)=>{var i=Si(),r=yi(),n=en(),a=Fi(),s=sr();function o(l){var h=-1,v=l==null?0:l.length;for(this.clear();
vendor: 8,752 bytes, line 1
1++h<v;){var b=l[h];this.set(b[0],b[1])}}o.prototype.clear=i,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=s,t.exports=o}),Ri=z((e,t)=>{var i=Ti(),r=gi(),n=Ai();function a(){this.size=0,this.__data__={hash:new i,map:new(n||r),string:new i}}t.exports=a}),Oi=z((e,t)=>{function i(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}t.exports=i}),Tt=z((e,t)=>{var i=Oi();function r(n,a){var s=n.__data__;return i(a)?s[typeof a=="string"?"string":"hash"]:s.map}t.exports=r}),tn=z((e,t)=>{var i=Tt();function r(n){var a=i(this,n).delete(n);return this.size-=a?1:0,a}t.exports=r}),Ii=z((e,t)=>{var i=Tt();function r(n){return i(this,n).get(n)}t.exports=r}),Xe=z((e,t)=>{var i=Tt();function r(n){return i(this,n).has(n)}t.exports=r}),or=z((e,t)=>{var i=Tt();function r(n,a){var s=i(this,n),o=s.size;return s.set(n,a),this.size+=s.size==o?0:1,this}t.exports=r}),ur=z((e,t)=>{var i=Ri(),r=tn(),n=Ii(),a=Xe(),s=or();function o(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var b=l[h];this.set(b[0],b[1])}}o.prototype.clear=i,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=s,t.exports=o}),lr=z((e,t)=>{var i=gi(),r=Ai(),n=ur(),a=200;function s(o,l){var h=this.__data__;if(h instanceof i){var v=h.__data__;if(!r||v.length<a-1)return v.push([o,l]),this.size=++h.size,this;h=this.__data__=new n(v)}return h.set(o,l),this.size=h.size,this}t.exports=s}),hr=z((e,t)=>{var i=gi(),r=Yr(),n=Jr(),a=Xr(),s=$r(),o=lr();function l(h){var v=this.__data__=new i(h);this.size=v.size}l.prototype.clear=r,l.prototype.delete=n,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,t.exports=l}),ji=z((e,t)=>{var i=Ft(),r=function(){try{var n=i(Object,"defineProperty");return n({},"",{}),n}catch(a){}}();t.exports=r}),oi=z((e,t)=>{var i=ji();function r(n,a,s){a=="__proto__"&&i?i(n,a,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[a]=s}t.exports=r}),pr=z((e,t)=>{var i=oi(),r=ai();function n(a,s,o){(o!==void 0&&!r(a[s],o)||o===void 0&&!(s in a))&&i(a,s,o)}t.exports=n}),rn=z((e,t)=>{function i(r){return function(n,a,s){for(var o=-1,l=Object(n),h=s(n),v=h.length;v--;){var b=h[r?v:++o];if(a(l[b],b,l)===!1)break}return n}}t.exports=i}),cr=z((e,t)=>{var i=rn(),r=i();t.exports=r}),dr=z((e,t)=>{var i=$t(),r=typeof e=="object"&&e&&!e.nodeType&&e,n=r&&typeof t=="object"&&t&&!t.nodeType&&t,a=n&&n.exports===r,s=a?i.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(h,v){if(v)return h.slice();var b=h.length,O=o?o(b):new h.constructor(b);return h.copy(O),O}t.exports=l}),fr=z((e,t)=>{var i=$t(),r=i.Uint8Array;t.exports=r}),nn=z((e,t)=>{var i=fr();function r(n){var a=new n.constructor(n.byteLength);return new i(a).set(new i(n)),a}t.exports=r}),an=z((e,t)=>{var i=nn();function r(n,a){var s=a?i(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}t.exports=r}),Wt=z((e,t)=>{function i(r,n){var a=-1,s=r.length;for(n||(n=Array(s));++a<s;)n[a]=r[a];return n}t.exports=i}),sn=z((e,t)=>{var i=Vt(),r=Object.create,n=function(){function a(){}return function(s){if(!i(s))return{};if(r)return r(s);a.prototype=s;var o=new a;return a.prototype=void 0,o}}();t.exports=n}),on=z((e,t)=>{function i(r,n){return function(a){return r(n(a))}}t.exports=i}),gr=z((e,t)=>{var i=on(),r=i(Object.getPrototypeOf,Object);t.exports=r}),Gi=z((e,t)=>{var i=Object.prototype;function r(n){var a=n&&n.constructor,s=typeof a=="function"&&a.prototype||i;return n===s}t.exports=r}),un=z((e,t)=>{var i=sn(),r=gr(),n=Gi();function a(s){return typeof s.constructor=="function"&&!n(s)?i(r(s)):{}}t.exports=a}),Et=z((e,t)=>{function i(r){return r!=null&&typeof r=="object"}t.exports=i}),ln=z((e,t)=>{var i=si(),r=Et(),n="[object Arguments]";function a(s){return r(s)&&i(s)==n}t.exports=a}),Ni=z((e,t)=>{var i=ln(),r=Et(),n=Object.prototype,a=n.hasOwnProperty,s=n.propertyIsEnumerable,o=i(function(){return arguments}())?i:function(l){return r(l)&&a.call(l,"callee")&&!s.call(l,"callee")};t.exports=o}),ui=z((e,t)=>{var i=Array.isArray;t.exports=i}),zi=z((e,t)=>{var i=9007199254740991;function r(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=i}t.exports=r}),li=z((e,t)=>{var i=_i(),r=zi();function n(a){return a!=null&&r(a.length)&&!i(a)}t.exports=n}),Ui=z((e,t)=>{var i=li(),r=Et();function n(a){return r(a)&&i(a)}t.exports=n}),_r=z((e,t)=>{function i(){return!1}t.exports=i}),mr=z((e,t)=>{var i=$t(),r=_r(),n=typeof e=="object"&&e&&!e.nodeType&&e,a=n&&typeof t=="object"&&t&&!t.nodeType&&t,s=a&&a.exports===n,o=s?i.Buffer:void 0,l=o?o.isBuffer:void 0,h=l||r;t.exports=h}),mt=z((e,t)=>{var i=si(),r=gr(),n=Et(),a="[object Object]",s=Function.prototype,o=Object.prototype,l=s.toString,h=o.hasOwnProperty,v=l.call(Object);function b(O){if(!n(O)||i(O)!=a)return!1;var w=r(O);if(w===null)return!0;var N=h.call(w,"constructor")&&w.constructor;return typeof N=="function"&&N instanceof N&&l.call(N)==v}t.exports=b}),ct=z((e,t)=>{var i=si(),r=zi(),n=Et(),a="[object Arguments]",s="[object Array]",o="[object Boolean]",l="[object Date]",h="[object Error]",v="[object Function]",b="[object Map]",O="[object Number]",w="[object Object]",N="[object RegExp]",Y="[object Set]",te="[object String]",Me="[object WeakMap]",m="[object ArrayBuffer]",C="[object DataView]",B="[object Float32Array]",j="[object Float64Array]",D="[object Int8Array]",I="[object Int16Array]",u="[object Int32Array]",p="[object Uint8Array]",f="[object Uint8ClampedArray]",d="[object Uint16Array]",g="[object Uint32Array]",_={};_[B]=_[j]=_[D]=_[I]=_[u]=_[p]=_[f]=_[d]=_[g]=!0,_[a]=_[s]=_[m]=_[o]=_[C]=_[l]=_[h]=_[v]=_[b]=_[O]=_[w]=_[N]=_[Y]=_[te]=_[Me]=!1;function x(k){return n(k)&&r(k.length)&&!!_[i(k)]}t.exports=x}),yr=z((e,t)=>{function i(r){return function(n){return r(n)}}t.exports=i}),Vi=z((e,t)=>{var i=Bi(),r=typeof e=="object"&&e&&!e.nodeType&&e,n=r&&typeof t=="object"&&t&&!t.nodeType&&t,a=n&&n.exports===r,s=a&&i.process,o=function(){try{var l=n&&n.require&&n.require("util").types;return l||s&&s.binding&&s.binding("util")}catch(h){}}();t.exports=o}),Ki=z((e,t)=>{var i=ct(),r=yr(),n=Vi(),a=n&&n.isTypedArray,s=a?r(a):i;t.exports=s}),vr=z((e,t)=>{function i(r,n){if(!(n==="constructor"&&typeof r[n]=="function")&&n!="__proto__")return r[n]}t.exports=i}),Lr=z((e,t)=>{var i=oi(),r=ai(),n=Object.prototype,a=n.hasOwnProperty;function s(o,l,h){var v=o[l];(!(a.call(o,l)&&r(v,h))||h===void 0&&!(l in o))&&i(o,l,h)}t.exports=s}),qi=z((e,t)=>{var i=Lr(),r=oi();function n(a,s,o,l){var h=!o;o||(o={});for(var v=-1,b=s.length;++v<b;){var O=s[v],w=l?l(o[O],a[O],O,o,a):void 0;w===void 0&&(w=a[O]),h?r(o,O,w):i(o,O,w)}return o}t.exports=n}),Rt=z((e,t)=>{function i(r,n){for(var a=-1,s=Array(r);++a<r;)s[a]=n(a);return s}t.exports=i}),br=z((e,t)=>{var i=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(a,s){var o=typeof a;return s=s!=null?s:i,!!s&&(o=="number"||o!="symbol"&&r.test(a))&&a>-1&&a%1==0&&a<s}t.exports=n}),Cr=z((e,t)=>{var i=Rt(),r=Ni(),n=ui(),a=mr(),s=br(),o=Ki(),l=Object.prototype,h=l.hasOwnProperty;function v(b,O){var w=n(b),N=!w&&r(b),Y=!w&&!N&&a(b),te=!w&&!N&&!Y&&o(b),Me=w||N||Y||te,m=Me?i(b.length,String):[],C=m.length;for(var B in b)(O||h.call(b,B))&&!(Me&&(B=="length"||Y&&(B=="offset"||B=="parent")||te&&(B=="buffer"||B=="byteLength"||B=="byteOffset")||s(B,C)))&&m.push(B);return m}t.exports=v}),kr=z((e,t)=>{function i(r){var n=[];if(r!=null)for(var a in Object(r))n.push(a);return n}t.exports=i}),Mr=z((e,t)=>{var i=Vt(),r=Gi(),n=kr(),a=Object.prototype,s=a.hasOwnProperty;function o(l){if(!i(l))return n(l);var h=r(l),v=[];for(var b in l)b=="constructor"&&(h||!s.call(l,b))||v.push(b);return v}t.exports=o}),xr=z((e,t)=>{var i=Cr(),r=Mr(),n=li();function a(s){return n(s)?i(s,!0):r(s)}t.exports=a}),Er=z((e,t)=>{var i=qi(),r=xr();function n(a){return i(a,r(a))}t.exports=n}),hn=z((e,t)=>{var i=pr(),r=dr(),n=an(),a=Wt(),s=un(),o=Ni(),l=ui(),h=Ui(),v=mr(),b=_i(),O=Vt(),w=mt(),N=Ki(),Y=vr(),te=Er();function Me(m,C,B,j,D,I,u){var p=Y(m,B),f=Y(C,B),d=u.get(f);if(d){i(m,B,d);return}var g=I?I(p,f,B+"",m,C,u):void 0,_=g===void 0;if(_){var x=l(f),k=!x&&v(f),E=!x&&!k&&N(f);g=f,x||k||E?l(p)?g=p:h(p)?g=a(p):k?(_=!1,g=r(f,!0)):E?(_=!1,g=n(f,!0)):g=[]:w(f)||o(f)?(g=p,o(p)?g=te(p):(!O(p)||b(p))&&(g=s(f))):_=!1}_&&(u.set(f,g),D(g,f,j,I,u),u.delete(f)),i(m,B,g)}t.exports=Me}),pn=z((e,t)=>{var i=hr(),r=pr(),n=cr(),a=hn(),s=Vt(),o=xr(),l=vr();function h(v,b,O,w,N){v!==b&&n(b,function(Y,te){if(N||(N=new i),s(Y))a(v,b,te,O,h,w,N);else{var Me=w?w(l(v,te),Y,te+"",v,b,N):void 0;Me===void 0&&(Me=Y),r(v,te,Me)}},o)}t.exports=h}),c=z((e,t)=>{function i(r){return r}t.exports=i}),y=z((e,t)=>{function i(r,n,a){switch(a.length){case 0:return r.call(n);case 1:return r.call(n,a[0]);case 2:return r.call(n,a[0],a[1]);case 3:return r.call(n,a[0],a[1],a[2])}return r.apply(n,a)}t.exports=i}),M=z((e,t)=>
1{var i=y(),r=Math.max;function n(a,s,o){return s=r(s===void 0?a.length-1:s,0),function(){for(var l=arguments,h=-1,v=r(l.length-s,0),b=Array(v);++h<v;)b[h]=l[s+h];h=-1;for(var O=Array(s+1);++h<s;)O[h]=l[h];return O[s]=o(b),i(a,this,O)}}t.exports=n}),R=z((e,t)=>{function i(r){return function(){return r}}t.exports=i}),S=z((e,t)=>{var i=R(),r=ji(),n=c(),a=r?function(s,o){return r(s,"toString",{configurable:!0,enumerable:!1,value:i(o),writable:!0})}:n;t.exports=a}),P=z((e,t)=>{var i=800,r=16,n=Date.now;function a(s){var o=0,l=0;return function(){var h=n(),v=r-(h-l);if(l=h,v>0){if(++o>=i)return arguments[0]}else o=0;return s.apply(void 0,arguments)}}t.exports=a}),G=z((e,t)=>{var i=S(),r=P(),n=r(i);t.exports=n}),A=z((e,t)=>{var i=c(),r=M(),n=G();function a(s,o){return n(r(s,o,i),s+"")}t.exports=a}),U=z((e,t)=>{var i=ai(),r=li(),n=br(),a=Vt();function s(o,l,h){if(!a(h))return!1;var v=typeof l;return(v=="number"?r(h)&&n(l,h.length):v=="string"&&l in h)?i(h[l],o):!1}t.exports=s}),K=z((e,t)=>{var i=A(),r=U();function n(a){return i(function(s,o){var l=-1,h=o.length,v=h>1?o[h-1]:void 0,b=h>2?o[2]:void 0;for(v=a.length>3&&typeof v=="function"?(h--,v):void 0,b&&r(o[0],o[1],b)&&(v=h<3?void 0:v,h=1),s=Object(s);++l<h;){var O=o[l];O&&a(s,O,l,v)}return s})}t.exports=n}),H=z((e,t)=>{var i=pn(),r=K(),n=r(function(a,s,o){i(a,s,o)});t.exports=n}),ne=z((e,t)=>{var i=si(),r=Et(),n="[object Symbol]";function a(s){return typeof s=="symbol"||r(s)&&i(s)==n}t.exports=a}),J=z((e,t)=>{var i=ui(),r=ne(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function s(o,l){if(i(o))return!1;var h=typeof o;return h=="number"||h=="symbol"||h=="boolean"||o==null||r(o)?!0:a.test(o)||!n.test(o)||l!=null&&o in Object(l)}t.exports=s}),pe=z((e,t)=>{var i=ur(),r="Expected a function";function n(a,s){if(typeof a!="function"||s!=null&&typeof s!="function")throw new TypeError(r);var o=function(){var l=arguments,h=s?s.apply(this,l):l[0],v=o.cache;if(v.has(h))return v.get(h);var b=a.apply(this,l);return o.cache=v.set(h,b)||v,b};return o.cache=new(n.Cache||i),o}n.Cache=i,t.exports=n}),q=z((e,t)=>{var i=pe(),r=500;function n(a){var s=i(a,function(l){return o.size===r&&o.clear(),l}),o=s.cache;return s}t.exports=n}),oe=z((e,t)=>{var i=q(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,a=i(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(r,function(l,h,v,b){o.push(v?b.replace(n,"$1"):h||l)}),o});t.exports=a}),W=z((e,t)=>{function i(r,n){for(var a=-1,s=r==null?0:r.length,o=Array(s);++a<s;)o[a]=n(r[a],a,r);return o}t.exports=i}),Q=z((e,t)=>{var i=wi(),r=W(),n=ui(),a=ne(),s=1/0,o=i?i.prototype:void 0,l=o?o.toString:void 0;function h(v){if(typeof v=="string")return v;if(n(v))return r(v,h)+"";if(a(v))return l?l.call(v):"";var b=v+"";return b=="0"&&1/v==-s?"-0":b}t.exports=h}),de=z((e,t)=>{var i=Q();function r(n){return n==null?"":i(n)}t.exports=r}),fe=z((e,t)=>{var i=ui(),r=J(),n=oe(),a=de();function s(o,l){return i(o)?o:r(o,l)?[o]:n(a(o))}t.exports=s}),Ee=z((e,t)=>{var i=ne(),r=1/0;function n(a){if(typeof a=="string"||i(a))return a;var s=a+"";return s=="0"&&1/a==-r?"-0":s}t.exports=n}),X=z((e,t)=>{var i=fe(),r=Ee();function n(a,s){s=i(s,a);for(var o=0,l=s.length;a!=null&&o<l;)a=a[r(s[o++])];return o&&o==l?a:void 0}t.exports=n}),le=z((e,t)=>{var i=X();function r(n,a,s){var o=n==null?void 0:i(n,a);return o===void 0?s:o}t.exports=r}),Z=z((e,t)=>{(function(i,r){typeof e=="object"&&typeof t<"u"?t.exports=r():(ht=r,ve=typeof ht=="function"?ht.call(lt,se,lt,St):ht,ve!==void 0&&(St.exports=ve))})(e,function(){"use strict";function i(m,C,B,j,D){(function I(u,p,f,d,g){for(;d>f;){if(d-f>600){var _=d-f+1,x=p-f+1,k=Math.log(_),E=.5*Math.exp(2*k/3),T=.5*Math.sqrt(k*E*(_-E)/_)*(x-_/2<0?-1:1),F=Math.max(f,Math.floor(p-x*E/_+T)),V=Math.min(d,Math.floor(p+(_-x)*E/_+T));I(u,p,F,V,g)}var ee=u[p],ae=f,ue=d;for(r(u,f,p),g(u[d],ee)>0&&r(u,f,d);ae<ue;){for(r(u,ae,ue),ae++,ue--;g(u[ae],ee)<0;)ae++;for(;g(u[ue],ee)>0;)ue--}g(u[f],ee)===0?r(u,f,ue):r(u,++ue,d),ue<=p&&(f=ue+1),p<=ue&&(d=ue-1)}})(m,C,B||0,j||m.length-1,D||n)}function r(m,C,B){var j=m[C];m[C]=m[B],m[B]=j}function n(m,C){return m<C?-1:m>C?1:0}var a=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(m,C,B){if(!B)return C.indexOf(m);for(var j=0;j<C.length;
vendor: 5,550 bytes, line 1
1j++)if(B(m,C[j]))return j;return-1}function o(m,C){l(m,0,m.children.length,C,m)}function l(m,C,B,j,D){D||(D=te(null)),D.minX=1/0,D.minY=1/0,D.maxX=-1/0,D.maxY=-1/0;for(var I=C;I<B;I++){var u=m.children[I];h(D,m.leaf?j(u):u)}return D}function h(m,C){return m.minX=Math.min(m.minX,C.minX),m.minY=Math.min(m.minY,C.minY),m.maxX=Math.max(m.maxX,C.maxX),m.maxY=Math.max(m.maxY,C.maxY),m}function v(m,C){return m.minX-C.minX}function b(m,C){return m.minY-C.minY}function O(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function w(m){return m.maxX-m.minX+(m.maxY-m.minY)}function N(m,C){return m.minX<=C.minX&&m.minY<=C.minY&&C.maxX<=m.maxX&&C.maxY<=m.maxY}function Y(m,C){return C.minX<=m.maxX&&C.minY<=m.maxY&&C.maxX>=m.minX&&C.maxY>=m.minY}function te(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Me(m,C,B,j,D){for(var I=[C,B];I.length;)if(!((B=I.pop())-(C=I.pop())<=j)){var u=C+Math.ceil((B-C)/j/2)*j;i(m,u,C,B,D),I.push(C,u,u,B)}}return a.prototype.all=function(){return this._all(this.data,[])},a.prototype.search=function(m){var C=this.data,B=[];if(!Y(m,C))return B;for(var j=this.toBBox,D=[];C;){for(var I=0;I<C.children.length;I++){var u=C.children[I],p=C.leaf?j(u):u;Y(m,p)&&(C.leaf?B.push(u):N(m,p)?this._all(u,B):D.push(u))}C=D.pop()}return B},a.prototype.collides=function(m){var C=this.data;if(!Y(m,C))return!1;for(var B=[];C;){for(var j=0;j<C.children.length;j++){var D=C.children[j],I=C.leaf?this.toBBox(D):D;if(Y(m,I)){if(C.leaf||N(m,I))return!0;B.push(D)}}C=B.pop()}return!1},a.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var C=0;C<m.length;C++)this.insert(m[C]);return this}var B=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===B.height)this._splitRoot(this.data,B);else{if(this.data.height<B.height){var j=this.data;this.data=B,B=j}this._insert(B,this.data.height-B.height-1,!0)}else this.data=B;return this},a.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},a.prototype.clear=function(){return this.data=te([]),this},a.prototype.remove=function(m,C){if(!m)return this;for(var B,j,D,I=this.data,u=this.toBBox(m),p=[],f=[];I||p.length;){if(I||(I=p.pop(),j=p[p.length-1],B=f.pop(),D=!0),I.leaf){var d=s(m,I.children,C);if(d!==-1)return I.children.splice(d,1),p.push(I),this._condense(p),this}D||I.leaf||!N(I,u)?j?(B++,I=j.children[B],D=!1):I=null:(p.push(I),f.push(B),B=0,j=I,I=I.children[0])}return this},a.prototype.toBBox=function(m){return m},a.prototype.compareMinX=function(m,C){return m.minX-C.minX},a.prototype.compareMinY=function(m,C){return m.minY-C.minY},a.prototype.toJSON=function(){return this.data},a.prototype.fromJSON=function(m){return this.data=m,this},a.prototype._all=function(m,C){for(var B=[];m;)m.leaf?C.push.apply(C,m.children):B.push.apply(B,m.children),m=B.pop();return C},a.prototype._build=function(m,C,B,j){var D,I=B-C+1,u=this._maxEntries;if(I<=u)return o(D=te(m.slice(C,B+1)),this.toBBox),D;j||(j=Math.ceil(Math.log(I)/Math.log(u)),u=Math.ceil(I/Math.pow(u,j-1))),(D=te([])).leaf=!1,D.height=j;var p=Math.ceil(I/u),f=p*Math.ceil(Math.sqrt(u));Me(m,C,B,f,this.compareMinX);for(var d=C;d<=B;d+=f){var g=Math.min(d+f-1,B);Me(m,d,g,p,this.compareMinY);for(var _=d;_<=g;_+=p){var x=Math.min(_+p-1,g);D.children.push(this._build(m,_,x,j-1))}}return o(D,this.toBBox),D},a.prototype._chooseSubtree=function(m,C,B,j){for(;j.push(C),!C.leaf&&j.length-1!==B;){for(var D=1/0,I=1/0,u=void 0,p=0;p<C.children.length;p++){var f=C.children[p],d=O(f),g=(_=m,x=f,(Math.max(x.maxX,_.maxX)-Math.min(x.minX,_.minX))*(Math.max(x.maxY,_.maxY)-Math.min(x.minY,_.minY))-d);g<I?(I=g,D=d<D?d:D,u=f):g===I&&d<D&&(D=d,u=f)}C=u||C.children[0]}var _,x;return C},a.prototype._insert=function(m,C,B){var j=B?m:this.toBBox(m),D=[],I=this._chooseSubtree(j,this.data,C,D);for(I.children.push(m),h(I,j);C>=0&&D[C].children.length>this._maxEntries;)this._split(D,C),C--;this._adjustParentBBoxes(j,D,C)},a.prototype._split=function(m,C){var B=m[C],j=B.children.length,D=this._minEntries;this._chooseSplitAxis(B,D,j);var I=this._chooseSplitIndex(B,D,j),u=te(B.children.splice(I,B.children.length-I));u.height=B.height,u.leaf=B.leaf,o(B,this.toBBox),o(u,this.toBBox),C?m[C-1].children.push(u):this._splitRoot(B,u)},a.prototype._splitRoot=function(m,C){this.data=te([m,C]),this.data.height=m.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},a.prototype._chooseSplitIndex=function(m,C,B){for(var j,D,I,u,p,f,d,g=1/0,_=1/0,x=C;x<=B-C;x++){var k=l(m,0,x,this.toBBox),E=l(m,x,B,this.toBBox),T=(D=k,I=E,u=void 0,p=void 0,f=void 0,d=void 0,u=Math.max(D.minX,I.minX),p=Math.max(D.minY,I.minY),f=Math.min(D.maxX,I.maxX),d=Math.min(D.maxY,I.maxY),Math.max(0,f-u)*Math.max(0,d-p)),F=O(k)+O(E);T<g?(g=T,j=x,_=F<_?F:_):T===g&&F<_&&(_=F,j=x)}return j||B-C},a.prototype._chooseSplitAxis=function(m,C,B){var j=m.leaf?this.compareMinX:v,D=m.leaf?this.compareMinY:b;this._allDistMargin(m,C,B,j)<this._allDistMargin(m,C,B,D)&&m.children.sort(j)},a.prototype._allDistMargin=function(m,C,B,j){m.children.sort(j);for(var D=this.toBBox,I=l(m,0,C,D),u=l(m,B-C,B,D),p=w(I)+w(u),f=C;f<B-C;f++){var d=m.children[f];h(I,m.leaf?D(d):d),p+=w(I)}for(var g=B-C-1;g>=C;g--){var _=m.children[g];h(u,m.leaf?D(_):_),p+=w(u)}return p},a.prototype._adjustParentBBoxes=function(m,C,B){for(var j=B;j>=0;j--)h(C[j],m)},a.prototype._condense=function(m){for(var C=m.length-1,B=void 0;C>=0;C--)m[C].children.length===0?C>0?(B=m[C-1].children).splice(B.indexOf(m[C]),1):this.clear():o(m[C],this.toBBox)},a})}),Ce=z(e=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=63710088e-1,e.factors={centimeters:e.earthRadius*100,centimetres:e.earthRadius*100,degrees:e.earthRadius/111325,feet:e.earthRadius*3.28084,inches:e.earthRadius*39.37,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:e.earthRadius*1e3,millimetres:e.earthRadius*1e3,nauticalmiles:e.earthRadius/1852,radians:1,yards:e.earthRadius*1.0936},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(d,g,_){_===void 0&&(_={});var x={type:"Feature"};return(_.id===0||_.id)&&(x.id=_.id),_.bbox&&(x.bbox=_.bbox),x.properties=g||{},x.geometry=d,x}e.feature=t;function i(d,g,_){switch(_===void 0&&(_={}),d){case"Point":return r(g).geometry;case"LineString":return o(g).geometry;case"Polygon":return a(g).geometry;case"MultiPoint":return b(g).geometry;case"MultiLineString":return v(g).geometry;case"MultiPolygon":return O(g).geometry;default:throw new Error(d+" is invalid")}}e.geometry=i;function r(d,g,_){if(_===void 0&&(_={}),!d)throw new Error("coordinates is required");if(!Array.isArray(d))throw new Error("coordinates must be an Array");if(d.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(d[0])||!I(d[1]))throw new Error("coordinates must contain numbers");var x={type:"Point",coordinates:d};return t(x,g,_)}e.point=r;function n(d,g,_){return _===void 0&&(_={}),h(d.map(function(x){return r(x,g)}),_)}e.points=n;function a(d,g,_){_===void 0&&(_={});for(var x=0,k=d;x<k.length;x++){var E=k[x];if(E.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var T=0;T<E[E.length-1].length;T++)if(E[E.length-1][T]!==E[0][T])throw new Error("First and last Position are not equivalent.")}var F={type:"Polygon",coordinates:d};return t(F,g,_)}e.polygon=a;function s(d,g,_){return _===void 0&&(_={}),h(d.map(function(x){return a(x,g)}),_)}e.polygons=s;function o(d,g,_){if(_===void 0&&(_={}),d.length<2)throw new Error("coordinates must be an array of two or more positions");var x={type:"LineString",coordinates:d};return t(x,g,_)}e.lineString=o;function l(d,g,_){return _===void 0&&(_={}),h(d.map(function(x){return o(x,g)}),_)}e.lineStrings=l;function h(d,g){g===void 0&&(g={});var _={type:"FeatureCollection"};return g.id&&(_.id=g.id),g.bbox&&(_.bbox=g.bbox),_.features=d,_}e.featureCollection=h;function v(d,g,_){_===void 0&&(_={});var x={type:"MultiLineString",coordinates:d};return t(x,g,_)}e.multiLineString=v;function b(d,g,_){_===void 0&&(_={});var x={type:"MultiPoint",coordinates:d};return t(x,g,_)}e.multiPoint=b;function O(d,g,_){_===void 0&&(_={});var x={type:"MultiPolygon",coordinates:d};return t(x,g,_)}e.multiPolygon=O;function w(d,g,_){_===void 0&&(_={});var x={type:"GeometryCollection",geometries:d};return t(x,g,_)}e.geometryCollection=w;function N(d,g){if(g===void 0&&(g=0),g&&!(g>=0))throw new Error("precision must be a positive number");var _=Math.pow(10,g||0);return Math.round(d*_)/_}e.round=N;function Y(d,g){g===void 0&&(g="kilometers");var _=e.factors[g];
1if(!_)throw new Error(g+" units is invalid");return d*_}e.radiansToLength=Y;function te(d,g){g===void 0&&(g="kilometers");var _=e.factors[g];if(!_)throw new Error(g+" units is invalid");return d/_}e.lengthToRadians=te;function Me(d,g){return C(te(d,g))}e.lengthToDegrees=Me;function m(d){var g=d%360;return g<0&&(g+=360),g}e.bearingToAzimuth=m;function C(d){var g=d%(2*Math.PI);return g*180/Math.PI}e.radiansToDegrees=C;function B(d){var g=d%360;return g*Math.PI/180}e.degreesToRadians=B;function j(d,g,_){if(g===void 0&&(g="kilometers"),_===void 0&&(_="kilometers"),!(d>=0))throw new Error("length must be a positive number");return Y(te(d,g),_)}e.convertLength=j;function D(d,g,_){if(g===void 0&&(g="meters"),_===void 0&&(_="kilometers"),!(d>=0))throw new Error("area must be a positive number");var x=e.areaFactors[g];if(!x)throw new Error("invalid original units");var k=e.areaFactors[_];if(!k)throw new Error("invalid final units");return d/x*k}e.convertArea=D;function I(d){return!isNaN(d)&&d!==null&&!Array.isArray(d)}e.isNumber=I;function u(d){return!!d&&d.constructor===Object}e.isObject=u;function p(d){if(!d)throw new Error("bbox is required");if(!Array.isArray(d))throw new Error("bbox must be an Array");if(d.length!==4&&d.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");d.forEach(function(g){if(!I(g))throw new Error("bbox must only contain numbers")})}e.validateBBox=p;function f(d){if(!d)throw new Error("id is required");if(["string","number"].indexOf(typeof d)===-1)throw new Error("id must be a number or a string")}e.validateId=f}),me=z(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ce();function i(C,B,j){if(C!==null)for(var D,I,u,p,f,d,g,_=0,x=0,k,E=C.type,T=E==="FeatureCollection",F=E==="Feature",V=T?C.features.length:1,ee=0;ee<V;ee++){g=T?C.features[ee].geometry:F?C.geometry:C,k=g?g.type==="GeometryCollection":!1,f=k?g.geometries.length:1;for(var ae=0;ae<f;ae++){var ue=0,Ae=0;if(p=k?g.geometries[ae]:g,p!==null){d=p.coordinates;var Te=p.type;switch(_=j&&(Te==="Polygon"||Te==="MultiPolygon")?1:0,Te){case null:break;case"Point":if(B(d,x,ee,ue,Ae)===!1)return!1;x++,ue++;break;case"LineString":case"MultiPoint":for(D=0;D<d.length;D++){if(B(d[D],x,ee,ue,Ae)===!1)return!1;x++,Te==="MultiPoint"&&ue++}Te==="LineString"&&ue++;break;case"Polygon":case"MultiLineString":for(D=0;D<d.length;D++){for(I=0;I<d[D].length-_;I++){if(B(d[D][I],x,ee,ue,Ae)===!1)return!1;x++}Te==="MultiLineString"&&ue++,Te==="Polygon"&&Ae++}Te==="Polygon"&&ue++;break;case"MultiPolygon":for(D=0;D<d.length;D++){for(Ae=0,I=0;I<d[D].length;I++){for(u=0;u<d[D][I].length-_;u++){if(B(d[D][I][u],x,ee,ue,Ae)===!1)return!1;x++}Ae++}ue++}break;case"GeometryCollection":for(D=0;D<p.geometries.length;D++)if(i(p.geometries[D],B,j)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(C,B,j,D){var I=j;return i(C,function(u,p,f,d,g){p===0&&j===void 0?I=u:I=B(I,u,p,f,d,g)},D),I}function n(C,B){var j;switch(C.type){case"FeatureCollection":for(j=0;j<C.features.length&&B(C.features[j].properties,j)!==!1;j++);break;case"Feature":B(C.properties,0);break}}function a(C,B,j){var D=j;return n(C,function(I,u){u===0&&j===void 0?D=I:D=B(D,I,u)}),D}function s(C,B){if(C.type==="Feature")B(C,0);else if(C.type==="FeatureCollection")for(var j=0;j<C.features.length&&B(C.features[j],j)!==!1;j++);}function o(C,B,j){var D=j;return s(C,function(I,u){u===0&&j===void 0?D=I:D=B(D,I,u)}),D}function l(C){var B=[];return i(C,function(j){B.push(j)}),B}function h(C,B){var j,D,I,u,p,f,d,g,_,x,k=0,E=C.type==="FeatureCollection",T=C.type==="Feature",F=E?C.features.length:1;for(j=0;j<F;j++){for(f=E?C.features[j].geometry:T?C.geometry:C,g=E?C.features[j].properties:T?C.properties:{},_=E?C.features[j].bbox:T?C.bbox:void 0,x=E?C.features[j].id:T?C.id:void 0,d=f?f.type==="GeometryCollection":!1,p=d?f.geometries.length:1,I=0;I<p;I++){if(u=d?f.geometries[I]:f,u===null){if(B(null,k,g,_,x)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(B(u,k,g,_,x)===!1)return!1;break}case"GeometryCollection":{for(D=0;D<u.geometries.length;D++)if(B(u.geometries[D],k,g,_,x)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}k++}}function v(C,B,j){var D=j;return h(C,function(I,u,p,f,d){u===0&&j===void 0?D=I:D=B(D,I,u,p,f,d)}),D}function b(C,B){h(C,function(j,D,I,u,p){var f=j===null?null:j.type;switch(f){case null:case"Point":case"LineString":case"Polygon":return B(t.feature(j,I,{bbox:u,id:p}),D,0)===!1?!1:void 0}var d;switch(f){case"MultiPoint":d="Point";break;case"MultiLineString":d="LineString";break;case"MultiPolygon":d="Polygon";break}for(var g=0;g<j.coordinates.length;g++){var _=j.coordinates[g],x={type:d,coordinates:_};if(B(t.feature(x,I),D,g)===!1)return!1}})}function O(C,B,j){var D=j;return b(C,function(I,u,p){u===0&&p===0&&j===void 0?D=I:D=B(D,I,u,p)}),D}function w(C,B){b(C,function(j,D,I){var u=0;if(j.geometry){var p=j.geometry.type;if(!(p==="Point"||p==="MultiPoint")){var f,d=0,g=0,_=0;if(i(j,function(x,k,E,T,F){if(f===void 0||D>d||T>g||F>_){f=x,d=D,g=T,_=F,u=0;return}var V=t.lineString([f,x],j.properties);if(B(V,D,I,F,u)===!1)return!1;u++,f=x})===!1)return!1}}})}function N(C,B,j){var D=j,I=!1;return w(C,function(u,p,f,d,g){I===!1&&j===void 0?D=u:D=B(D,u,p,f,d,g),I=!0}),D}function Y(C,B){if(!C)throw new Error("geojson is required");b(C,function(j,D,I){if(j.geometry!==null){var u=j.geometry.type,p=j.geometry.coordinates;switch(u){case"LineString":if(B(j,D,I,0,0)===!1)return!1;break;case"Polygon":for(var f=0;f<p.length;f++)if(B(t.lineString(p[f],j.properties),D,I,f)===!1)return!1;break}}})}function te(C,B,j){var D=j;return Y(C,function(I,u,p,f){u===0&&j===void 0?D=I:D=B(D,I,u,p,f)}),D}function Me(C,B){if(B=B||{}
1,!t.isObject(B))throw new Error("options is invalid");var j=B.featureIndex||0,D=B.multiFeatureIndex||0,I=B.geometryIndex||0,u=B.segmentIndex||0,p=B.properties,f;switch(C.type){case"FeatureCollection":j<0&&(j=C.features.length+j),p=p||C.features[j].properties,f=C.features[j].geometry;break;case"Feature":p=p||C.properties,f=C.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":f=C;break;default:throw new Error("geojson is invalid")}if(f===null)return null;var d=f.coordinates;switch(f.type){case"Point":case"MultiPoint":return null;case"LineString":return u<0&&(u=d.length+u-1),t.lineString([d[u],d[u+1]],p,B);case"Polygon":return I<0&&(I=d.length+I),u<0&&(u=d[I].length+u-1),t.lineString([d[I][u],d[I][u+1]],p,B);case"MultiLineString":return D<0&&(D=d.length+D),u<0&&(u=d[D].length+u-1),t.lineString([d[D][u],d[D][u+1]],p,B);case"MultiPolygon":return D<0&&(D=d.length+D),I<0&&(I=d[D].length+I),u<0&&(u=d[D][I].length-u-1),t.lineString([d[D][I][u],d[D][I][u+1]],p,B)}throw new Error("geojson is invalid")}function m(C,B){if(B=B||{},!t.isObject(B))throw new Error("options is invalid");var j=B.featureIndex||0,D=B.multiFeatureIndex||0,I=B.geometryIndex||0,u=B.coordIndex||0,p=B.properties,f;switch(C.type){case"FeatureCollection":j<0&&(j=C.features.length+j),p=p||C.features[j].properties,f=C.features[j].geometry;break;case"Feature":p=p||C.properties,f=C.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":f=C;break;default:throw new Error("geojson is invalid")}if(f===null)return null;var d=f.coordinates;switch(f.type){case"Point":return t.point(d,p,B);case"MultiPoint":return D<0&&(D=d.length+D),t.point(d[D],p,B);case"LineString":return u<0&&(u=d.length+u),t.point(d[u],p,B);case"Polygon":return I<0&&(I=d.length+I),u<0&&(u=d[I].length+u),t.point(d[I][u],p,B);case"MultiLineString":return D<0&&(D=d.length+D),u<0&&(u=d[D].length+u),t.point(d[D][u],p,B);case"MultiPolygon":return D<0&&(D=d.length+D),I<0&&(I=d[D].length+I),u<0&&(u=d[D][I].length-u),t.point(d[D][I][u],p,B)}throw new Error("geojson is invalid")}e.coordAll=l,e.coordEach=i,e.coordReduce=r,e.featureEach=s,e.featureReduce=o,e.findPoint=m,e.findSegment=Me,e.flattenEach=b,e.flattenReduce=O,e.geomEach=h,e.geomReduce=v,e.lineEach=Y,e.lineReduce=te,e.propEach=n,e.propReduce=a,e.segmentEach=w,e.segmentReduce=N}),ge=z(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=me();function i(r){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(r,function(a){n[0]>a[0]&&(n[0]=a[0]),n[1]>a[1]&&(n[1]=a[1]),n[2]<a[0]&&(n[2]=a[0]),n[3]<a[1]&&(n[3]=a[1])}),n}i.default=i,e.default=i}),he=z((e,t)=>{var i=Z(),r=Ce(),n=me(),a=ge().default,s=n.featureEach,o=n.coordEach,l=r.polygon,h=r.featureCollection;function v(b){var O=new i(b);return O.insert=function(w){if(w.type!=="Feature")throw new Error("invalid feature");return w.bbox=w.bbox?w.bbox:a(w),i.prototype.insert.call(this,w)},O.load=function(w){var N=[];return Array.isArray(w)?w.forEach(function(Y){if(Y.type!=="Feature")throw new Error("invalid features");Y.bbox=Y.bbox?Y.bbox:a(Y),N.push(Y)}):s(w,function(Y){if(Y.type!=="Feature")throw new Error("invalid features");Y.bbox=Y.bbox?Y.bbox:a(Y),N.push(Y)}),i.prototype.load.call(this,N)},O.remove=function(w,N){if(w.type!=="Feature")throw new Error("invalid feature");return w.bbox=w.bbox?w.bbox:a(w),i.prototype.remove.call(this,w,N)},O.clear=function(){return i.prototype.clear.call(this)},O.search=function(w){var N=i.prototype.search.call(this,this.toBBox(w));return h(N)},O.collides=function(w){return i.prototype.collides.call(this,this.toBBox(w))},O.all=function(){var w=i.prototype.all.call(this);return h(w)},O.toJSON=function(){return i.prototype.toJSON.call(this)},O.fromJSON=function(w){return i.prototype.fromJSON.call(this,w)},O.toBBox=function(w){var N;if(w.bbox)N=w.bbox;else if(Array.isArray(w)&&w.length===4)N=w;else if(Array.isArray(w)&&w.length===6)N=[w[0],w[1],w[3],w[4]];else if(w.type==="Feature")N=a(w);else if(w.type==="FeatureCollection")N=a(w);else throw new Error("invalid geojson");return{minX:N[0],minY:N[1],maxX:N[2],maxY:N[3]}},O}t.exports=v,t.exports.default=v});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 t=Object(this),i=t.length>>>0,r=arguments[1],n=0;n<i;n++)if(e.call(r,t[n],n,t))return n;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 t=Object(this),i=t.length>>>0,r=arguments[1],n=0;n<i;n++){var a=t[n];if(e.call(r,a,n,t))return a}},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 t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}),function(e){e.forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"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,t){if(this==null)throw new TypeError('"this" is null or not defined');var i=Object(this),r=i.length>>>0;if(r===0)return!1;var n=t|0,a=Math.max(n>=0?n:r-Math.abs(n),0);function s(o,l){return o===l||typeof o=="number"&&typeof l=="number"&&isNaN(o)&&isNaN(l)}for(;a<r;){if(s(i[a],e))return!0;a++}return!1}});var Le={name:"@geoman-io/leaflet-geoman-free",version:"2.18.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"],main:"dist/leaflet-geoman.js",types:"dist/leaflet-geoman.d.ts",dependencies:{"@turf/boolean-contains":"^
16.5.0","@turf/kinks":"^6.5.0","@turf/line-intersect":"^6.5.0","@turf/line-split":"^6.5.0",lodash:"4.17.21","polyclip-ts":"^0.16.5"},devDependencies:{"@types/leaflet":"^1.9.12","cross-env":"^7.0.3",cypress:"^13.11.0",esbuild:"^0.20.2",eslint:"8.56.0","eslint-config-airbnb-base":"15.0.0","eslint-config-prettier":"9.1.0","eslint-plugin-cypress":"2.15.1","eslint-plugin-import":"2.29.1",husky:"^9.0.11",leaflet:"1.9.3","lint-staged":"^15.2.5",prettier:"3.2.4","prosthetic-hand":"1.3.1","ts-node":"^10.9.2"},peerDependencies:{leaflet:"^1.2.0"},scripts:{start:"pnpm run dev",dev:"cross-env DEV=true ts-node bundle.mjs",build:"ts-node bundle.mjs",test:"cypress run --browser chrome",cypress:"cypress open",prepare:"pnpm run build && husky","eslint-check":"eslint --print-config . | eslint-config-prettier-check",eslint:'eslint "{src,demo}/**/*.js" --fix ',prettier:'prettier --write "{src,demo}/**/*.{js,css}" --log-level=warn',lint:"pnpm run eslint && pnpm run prettier"},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",prettier:{trailingComma:"es5",tabWidth:2,semi:!0,singleQuote:!0},"lint-staged":{"*.js":'eslint "{src,demo}/**/*.js" --fix',"*.{js,css,md}":'prettier --write "{src,demo}/**/*.{js,css}"'}},re=pt(H()),Be={tooltips:{placeMarker:"Click to place 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",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",radiu
1s:"Radius",perimeter:"Umfang",height:"H\xF6he",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},Ge={tooltips:{placeMarker:"Clicca 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"}},$e={tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},Oe={tooltips:{placeMarker:"Adaug\u0103 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"}},ce={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",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\u044
1E\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\u044E",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"}},we={tooltips:{placeMarker:"Presiona 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"}},be={tooltips:{placeMarker:"Klik 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"}},_e={tooltips:{placeMarker:"Cliquez 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
1ommets partag\xE9s",rotateButton:"Tourner des calques"}},Se={tooltips:{placeMarker:"\u5355\u51FB\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"}},Ze={tooltips:{placeMarker:"\u55AE\u64CA\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"}},Lt={tooltips:{placeMarker:"Clique para posicionar o 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"}},nt={tooltips:{placeMarker:"Clique para colocar 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"}},Kt={tooltips:{placeMarker:"Kliknij, 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"}},We={tooltips:{placeMarker:"Klicka f\xF6r att placera 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"}},Bt={tooltips:{placeMarker:"\u039A\u03AC\u03BD\u03C4\u03B5 \u03BA\u03BB\u03B9\u03BA \u
103B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C4\u03AE\u03C3\u03B5\u03C4\u03B5 \u0394\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"}},vi={tooltips:{placeMarker:"Kattintson 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"}},et={tooltips:{placeMarker:"Tryk 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"}},ot={tooltips:{placeMarker:"Klikk for \xE5 plassere 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
1s:"Radius",perimeter:"Omriss",height:"H\xF8yde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmark\xF8r"}},ke={tooltips:{placeMarker:"\u06A9\u0644\u06CC\u06A9 \u0628\u0631\u0627\u06CC \u062C\u0627\u0646\u0645\u0627\u06CC\u06CC \u0646\u0634\u0627\u0646",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"}},at={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",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
1E\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"}},dt={tooltips:{placeMarker:"\u0130\u015Faret\xE7i yerle\u015Ftirmek i\xE7in t\u0131klay\u0131n",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"}},Br={tooltips:{placeMarker:"Kliknut\xEDm vytvo\u0159\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
1nou 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"}},hi={tooltips:{placeMarker:"\u30AF\u30EA\u30C3\u30AF\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"}},qt={tooltips:{placeMarker:"Klikkaa 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"}},wt={tooltips:{placeMarker:"\uB9C8\uCEE4 \uC704\uCE58\uB97C \uD074\uB9AD\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"}},wr={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",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"}},Li=nt,Dt={en:Be,de:je,it:Ge,id:$e,ro:Oe,ru:ce,es:we,nl:be,fr:_e,pt:Li,pt_br:Lt,pt_pt:nt,zh:Se,zh_tw:Ze,pl:Kt,sv:We,el:Bt,hu:vi,da:et,no:ot,fa:ke,ua:at,tr:dt,cz:Br,ja:hi,fi:qt,ko:wt,ky:wr},Hi={_globalEditModeEnabled:!1,enableGlobalEditMode(e){let t=Fe({},e);this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEac
1h(i=>{this._isRelevantForEdit(i)&&i.pm.enable(t)}),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 t in e){let i=e[t];this._isRelevantForEdit(i)&&i.pm.enable(Fe({},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}},Yi=Hi,cn={_globalDragModeEnabled:!1,enableGlobalDragMode(){let e=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},e.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let e=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,e.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let e=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let t in e){let i=e[t];this._isRelevantForDrag(i)&&i.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}},pi=cn,ca={_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 t=e.target;this._isRelevantForRemoval(t)&&!t.pm.dragging()&&(t.removeFrom(this.map.pm._getContainingLayer()),t.remove(),t instanceof L.LayerGroup?(this._fireRemoveLayerGroup(t),this._fireRemoveLayerGroup(this.map,t)):(t.pm._fireRemove(t),t.pm._fireRemove(this.map,t)))},_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 t in e){let i=e[t];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:e}){this._addedLayersRemoval[L.stamp(e)]=e}},da=ca,fa={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(e=>
1e 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 t in e){let i=e[t];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:e}){this._addedLayersRotate[L.stamp(e)]=e}},ga=fa,_a=pt(H()),ma={_fireDrawStart(e="Draw",t={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},e,t)},_fireDrawEnd(e="Draw",t={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},e,t)},_fireCreate(e,t="Draw",i={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:e,layer:e},t,i)},_fireCenterPlaced(e="Draw",t={}){let i=e==="Draw"?this._layer:void 0,r=e!=="Draw"?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:i,layer:r,latlng:this._layer.getLatLng()},e,t)},_fireCut(e,t,i,r="Draw",n={}){this.__fire(e,"pm:cut",{shape:this._shape,layer:t,originalLayer:i},r,n)},_fireEdit(e=this._layer,t="Edit",i={}){this.__fire(e,"pm:edit",{layer:this._layer,shape:this.getShape()},t,i)},_fireEnable(e="Edit",t={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},e,t)},_fireDisable(e="Edit",t={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},e,t)},_fireUpdate(e="Edit",t={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},e,t)},_fireMarkerDragStart(e,t=void 0,i="Edit",r={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:t},i,r)},_fireMarkerDrag(e,t=void 0,i="Edit",r={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:t},i,r)},_fireMarkerDragEnd(e,t=void 0,i=void 0,r="Edit",n={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:e,shape:this.getShape(),indexPath:t,intersectionReset:i},r,n)},_fireDragStart(e="Edit",t={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},e,t)},_fireDrag(e,t="Edit",i={}){this.__fire(this._layer,"pm:drag",Qe(Fe({},e),{shape:this.getShape()}),t,i)},_fireDragEnd(e="Edit",t={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},e,t)},_fireDragEnable(e="Edit",t={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},e,t)},_fireDragDisable(e="Edit",t={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},e,t)},_fireRemove(e,t=e,i="Edit",r={}){this.__fire(e,"pm:remove",{layer:t,shape:this.getShape()},i,r)},_fireVertexAdded(e,t,i,r="Edit",n={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:e,indexPath:t,latlng:i,shape:this.getShape()},r,n)},_fireVertexRemoved(e,t,i="Edit",r={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:e,indexPath:t,shape:this.getShape()},i,r)},_fireVertexClick(e,t,i="Edit",r={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:e,indexPath:t,shape:this.getShape()},i,r)},_fireIntersect(e,t=this._layer,i="Edit",r={}){this.__fire(t,"pm:intersect",{layer:this._layer,intersection:e,shape:this.getShape()},i,r)},_fireLayerReset(e,t,i="Edit",r={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:e,indexPath:t,shape:this.getShape()},i,r)},_fireChange(e,t="Edit",i={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:e,shape:this.getShape()},t,i)},_fireTextChange(e,t="Edit",i={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:e,shape:this.getShape()},t,i)},_fireTextFocus(e="Edit",t={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},e,t)},_fireTextBlur(e="Edit",t={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},e,t)},_fireSnapDrag(e,t,i="Snapping",r={}){this.__fire(e,"pm:snapdrag",t,i,r)},_fireSnap(e,t,i="Snapping",r={}){this.__fire(e,"pm:snap",t,i,r)},_fireUnsnap(e,t,i="Snapping",r={}){this.__fire(e,"pm:unsnap",t,i,r)},_fireRotationEnable(e,t,i="Rotation",r={}){this.__fire(e,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},i,r)},_fireRotationDisable(e,t="Rotation",i={}){this.__fire(e,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},t,i)},_fireRotationStart(e,t,i="Rotation",r={}){this.__fire(e,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:t},i,r)},_fireRotation(e,t,i,r=this._rotationLayer,n="Rotation",a={}){this.__fire(e,"pm:rotate",{layer:r,helpLayer:this._layer,startAngle:this._startAngle,angle:r.pm.getAngle(),angleDiff:t,oldLatLngs:i,newLatLngs:r.getLatLngs()},n,a)},_fireRotationEnd(e,t,i,r="Rotation",n={}){this.__fire(e,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:t,angle:this._rotationLayer.pm.getAngle(),originLatLngs:i,newLatLngs:this._rotationLayer.getLatLngs()},r,n)},_fireActionClick(e,t,i,r="Toolbar",n={}){this.__fire(this._map,"pm:actionclick",{text:e.text,action:e,btnName:t,button:i},r,n)},_fireButtonClick(e,t,i="Toolbar",r={}){this.__fire(this._map,"pm:buttonclick",{btnName:e,button:t},i,r)},_fireLangChange(e,t,i,r,n="Global",a={}){this.__fire(this.map,"pm:langchange",{oldLang:e,activeLang:t,fallback:i,translations:r},n,a)},_fireGlobalDragModeToggled(e,t="Global",i={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:e,map:this.map},t,i)},_fireGlobalEditModeToggled(e,t="Global",i={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:e,map:this.map},t,i)},_fireGlobalRemovalModeToggled(e,t="Global",i={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:e,map:this.map},t,i)},_fireGlobalCutModeToggled(e="Global",t={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},e,t)},_fireGlobalDrawModeToggled(e="Global",t={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},e,t)},_fireGlobalRotateModeToggled(e="Global",t={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},e,t)},_fireRemoveLayerGroup(e,t=e,i="Edit",r={}){this.__fire(e,"pm:remove",{layer:t,shape:void 0},i,r)},_fireKeyeventEvent(e,t,i,r="Global",n={}){this.__fire(this.map,"pm:keyevent",{event:e,eventType:t,focusOn:i},r,n)},__fire(e,t,i,r,n={}){i=(0,_a.default)(i,n,{source:r}),L.PM.Utils._fireEvent(e,t,i)}},Dr=ma,ya=()=>({_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)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(e){let t="document";this.map.getContainer().contains(e.target)&&(t="map");let i={event:e,eventType:e.type,focusOn:t};this._lastEvents[e.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(e,e.type,t)},_onBlur(e){e.altKey=!1;let t={event:e,eventType:e.type,focusOn:"document"};this._lastEvents[e.type]=t,this._lastEvents.current=t},getLastKeyEvent(e="current"){return this._lastEvents[e]},isShiftKeyPressed(){var e;return(e=this._lastEvents.current)==null?void 0:e.event.shiftKey},isAltKeyPressed(){var e;return(e=this._lastEvents.current)==null?void 0:e.event.altKey},isCtrlKeyPressed(){var e;return(e=this._lastEvents.current)==null?void 0:e.event.ctrlKey},isMetaKeyPressed(){var e;return(e=this._lastEvents.current)==null?void 0:e.event.metaKey},getPressedKey(){var e;return(e=this._lastEvents.current)==null?void 0:e.event.key}}),va=ya,Tn=pt(le());function De(e){let t=L.PM.activeLang;return(0,Tn.default)(Dt[t],e)||(0,Tn.default)(Dt.en,e)||e}function dn(e){for(let t=0;t<e.length;t+=1){let i=e[t];if(Array.isArray(i)){if(dn(i))return!0}else if(i!=null&&i!=="")return!0}return!1}function Pr(e){return e.reduce((t,i)=>{if(i.length!==0){let r=Array.isArray(i)?Pr(i):i;Array.isArray(r)?r.length!==0&&t.push(r):t.push(r)}return t},[])}function La(e,t,i){let r={a:L.CRS.Earth.R,b:63567523142e-4,f:.0033528106647474805},{a:n,b:a,f:s}=r,o=e.lng,l=e.lat,h=i,v=Math.PI,b=t*v/180,O=Math.sin(b),w=Math.cos(b),N=(1-s)*Math.tan(l*v/180),Y=1/Math.sqrt(1+N*N),te=N*Y,Me=Math.atan2(N,w),m=Y*O,C=1-m*m,B=C*(n*n-a*a)/(a*a),j=1+B/16384*(4096+B*(-768+B*(320-175*B))),D=B/1024*(256+B*(-128+B*(74-47*B))),I=h/(a*j),u=2*Math.PI,p,f,d;for(;Math.abs(I-u)>1e-12;){p=Math.cos(2*Me+I),f=Math.sin(I),d=Math.cos(I);let V=D*f*(p+D/4*(d*(-1+2*p*p)-D/6*p*(-3+4*f*f)*(-3+4*p*p)));u=I,I=h/(a*j)+V}let g=te*f-Y*d*w,_=Math.atan2(te*d+Y*f*w,(1-s)*Math.sqrt(m*m+g*g)),x=Math.atan2(f*O,Y*d-te*f*w),k=s/16*C*(4+s*(4-3*C)),E=x-(1-k)
1*s*m*(I+k*f*(p+k*d*(-1+2*p*p))),T=o+E*180/v,F=_*180/v;return L.latLng(T,F)}function Rn(e,t,i,r,n=!0){let a,s,o,l=[];for(let h=0;h<i;h+=1){if(n)a=h*360/i+r,s=La(e,a,t),o=L.latLng(s.lng,s.lat);else{let v=e.lat+Math.cos(2*h*Math.PI/i)*t,b=e.lng+Math.sin(2*h*Math.PI/i)*t;o=L.latLng(v,b)}l.push(o)}return l}function ba(e,t,i){t=(t+360)%360;let r=Math.PI/180,n=180/Math.PI,{R:a}=L.CRS.Earth,s=e.lng*r,o=e.lat*r,l=t*r,h=Math.sin(o),v=Math.cos(o),b=Math.cos(i/a),O=Math.sin(i/a),w=Math.asin(h*b+v*O*Math.cos(l)),N=s+Math.atan2(Math.sin(l)*O*v,b-h*Math.sin(w));N*=n;let Y=N-360,te=N<-180?N+360:N;return N=N>180?Y:te,L.latLng([w*n,N])}function fn(e,t,i){let r=e.latLngToContainerPoint(t),n=e.latLngToContainerPoint(i),a=Math.atan2(n.y-r.y,n.x-r.x)*180/Math.PI+90;return a+=a<0?360:0,a}function Ar(e,t,i,r){let n=fn(e,t,i);return ba(t,n,r)}function Ca(e,t,i="asc"){if(!t||Object.keys(t).length===0)return(l,h)=>l-h;let r=Object.keys(t),n,a=r.length-1,s={};for(;a>=0;)n=r[a],s[n.toLowerCase()]=t[n],a-=1;function o(l){if(l instanceof L.Marker)return"Marker";if(l instanceof L.Circle)return"Circle";if(l instanceof L.CircleMarker)return"CircleMarker";if(l instanceof L.Rectangle)return"Rectangle";if(l instanceof L.Polygon)return"Polygon";if(l instanceof L.Polyline)return"Line"}return(l,h)=>{let v,b;if(e==="instanceofShape"){if(v=o(l.layer).toLowerCase(),b=o(h.layer).toLowerCase(),!v||!b)return 0}else{if(!l.hasOwnProperty(e)||!h.hasOwnProperty(e))return 0;v=l[e].toLowerCase(),b=h[e].toLowerCase()}let O=v in s?s[v]:Number.MAX_SAFE_INTEGER,w=b in s?s[b]:Number.MAX_SAFE_INTEGER,N=0;return O<w?N=-1:O>w&&(N=1),i==="desc"?N*-1:N}}function Qt(e,t=e.getLatLngs()){return e instanceof L.Polygon?L.polygon(t).getLatLngs():L.polyline(t).getLatLngs()}function On(e,t){var i,r,n,a;if((r=(i=t.options.crs)==null?void 0:i.projection)!=null&&r.MAX_LATITUDE){let s=(a=(n=t.options.crs)==null?void 0:n.projection)==null?void 0:a.MAX_LATITUDE;e.lat=Math.max(Math.min(s,e.lat),-s)}return e}function bi(e){return e.options.renderer||e._map&&(e._map._getPaneRenderer(e.options.pane)||e._map.options.renderer||e._map._renderer)||e._renderer}var ka=L.Class.extend({includes:[Yi,pi,da,ga,Dr],initialize(e){this.map=e,this.Draw=new L.PM.Draw(e),this.Toolbar=new L.PM.Toolbar(e),this.Keyboard=va(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(e)},setLang(e="en",t,i="en"){if(e=e.trim().toLowerCase(),!/^[a-z]{2}$/.test(e)){let n=e.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(n){let a=[`${n[1]}_${n[2]}`,`${n[1]}`];for(let s of a)if(Dt[s]){e=s;break}}}let r=L.PM.activeLang;t&&(Dt[e]=(0,re.default)(Dt[i],t)),L.PM.activeLang=e,this.map.pm.Toolbar.reinit(),this._fireLangChange(r,e,i,Dt[e])},addControls(e){this.Toolbar.addControls(e)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(e="Polygon",t){e==="Poly"&&(e="Polygon"),this.Draw.enable(e,t)},disableDraw(e="Polygon"){e==="Poly"&&(e="Polygon"),this.Draw.disable(e)},setPathOptions(e,t={}){let i=t.ignoreShapes||[],r=t.merge||!1;this.map.pm.Draw.shapes.forEach(n=>{i.indexOf(n)===-1&&this.map.pm.Draw[n].setPathOptions(e,r)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(e){let t=(0,re.default)(this.globalOptions,e);t.editable&&(t.resizeableCircleMarker=t.editable,delete t.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!t.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let r=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!t.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),r=!0),this.map.pm.Draw.shapes.forEach(n=>{this.map.pm.Draw[n].setOptions(t)}),i&&this.map.pm.Draw.CircleMarker.enable(),r&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEac
1h(n=>{n.pm.setOptions(t)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=t,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 t=L.PM.Utils.findLayers(this.map);if(!e)return t;let i=L.featureGroup();return i._pmTempLayer=!0,t.forEach(r=>{i.addLayer(r)}),i},getGeomanDrawLayers(e=!1){let t=L.PM.Utils.findLayers(this.map).filter(r=>r._drawnByGeoman===!0);if(!e)return t;let i=L.featureGroup();return i._pmTempLayer=!0,t.forEach(r=>{i.addLayer(r)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(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){bi(this.map)._onMouseMove(this._createMouseEvent("mousemove",e))},_canvasTouchClick(e){let t="";e.type==="touchstart"||e.type==="pointerdown"?t="mousedown":(e.type==="touchend"||e.type==="pointerup"||e.type==="touchcancel"||e.type==="pointercancel")&&(t="mouseup"),t&&bi(this.map)._onClick(this._createMouseEvent(t,e))},_createMouseEvent(e,t){let i,r=t.touches[0]||t.changedTouches[0];try{i=new MouseEvent(e,{bubbles:t.bubbles,cancelable:t.cancelable,view:t.view,detail:r.detail,screenX:r.screenX,screenY:r.screenY,clientX:r.clientX,clientY:r.clientY,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,relatedTarget:t.relatedTarget})}catch(n){i=document.createEvent("MouseEvents"),i.initMouseEvent(e,t.bubbles,t.cancelable,t.view,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}return i}}),Ma=ka,xa=L.Control.extend({includes:[Dr],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 t=this.options.position.indexOf("right")>
1-1?"pos-right":"",i=L.DomUtil.create("div",`button-container  ${t}`,this._container);e.title&&i.setAttribute("title",e.title);let r=L.DomUtil.create("a","leaflet-buttons-control-button",i);r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.href="#";let n=L.DomUtil.create("div",`leaflet-pm-actions-container ${t}`,i),a=e.actions,s={cancel:{text:De("actions.cancel"),title:De("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:De("actions.finish"),title:De("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:De("actions.removeLastVertex"),title:De("actions.removeLastVertex"),onClick(){this._map.pm.Draw[e.jsClass]._removeLastVertex()}},finish:{text:De("actions.finish"),title:De("actions.finish"),onClick(l){this._map.pm.Draw[e.jsClass]._finishShape(l)}}};e._preparedActions=a.map(l=>{let h=typeof l=="string"?l:l.name,v;if(s[h])v=s[h];else if(l.text)v=l;else return v;let b=L.DomUtil.create("a",`leaflet-pm-action ${t} action-${h}`,n);if(b.setAttribute("role","button"),b.setAttribute("tabindex","0"),b.href="#",v.title&&(b.title=v.title),b.innerHTML=v.text,L.DomEvent.disableClickPropagation(b),L.DomEvent.on(b,"click",L.DomEvent.stop),v._node=b,!e.disabled&&v.onClick){let O=w=>{w.preventDefault();let N="",{buttons:Y}=this._map.pm.Toolbar;for(let te in Y)if(Y[te]._button===e){N=te;break}this._fireActionClick(v,N,e)};L.DomEvent.addListener(b,"click",O,this),L.DomEvent.addListener(b,"click",v.onClick,this),L.DomEvent.addListener(b,"click",()=>this._updateActiveAction(e))}return v}),this._updateActiveAction(e),e.toggleStatus&&L.DomUtil.addClass(i,"active");let o=L.DomUtil.create("div","control-icon",r);return e.iconUrl&&o.setAttribute("src",e.iconUrl),e.className&&L.DomUtil.addClass(o,e.className),L.DomEvent.disableClickPropagation(r),L.DomEvent.on(r,"click",L.DomEvent.stop),e.disabled||(L.DomEvent.addListener(r,"click",this._onBtnClick,this),L.DomEvent.addListener(r,"click",this._triggerClick,this)),e.disabled&&(L.DomUtil.addClass(r,"pm-disabled"),r.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(!this._button.toggleStatus||this._button.cssToggle===!1?(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")):(L.Dom
1Util.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:t}=this._map.pm.Toolbar;for(let i in t)if(t[i]._button===this._button){e=i;break}this._fireButtonClick(e,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let e="pm-disabled",t=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(t,e),t.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(t,e),t.setAttribute("aria-disabled","false"))},_updateActiveAction(e){var t;(t=e._preparedActions)==null||t.forEach(i=>{i!=null&&i._node&&(i.isActive&&i.isActive.call(this)?L.DomUtil.addClass(i._node,"active-action"):L.DomUtil.removeClass(i._node,"active-action"))})}}),Ea=xa;L.Control.PMButton=Ea;var Ba=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 t=`${e}Container`;return this[t]||(this[t]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${e} leaflet-bar leaflet-control`)),this[t]},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(),t={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 i in e){let r=e[i];L.Util.setOptions(r,{className:t.geomanIcons[i]})}},removeControls(){let e=this.getButtons();for(let t in e)e[t].remove();this.isVisible=!1},toggleControls(e=this.options){this.isVisible?this.removeControls():this.addControls(e)},_addButton(e,t){return this.buttons[e]=t,this.options[e]=!!this.options[e]||!1,this.buttons[e]},triggerClickOnToggledButtons(e){for(let t in this.buttons){let i=this.buttons[t];i._button.disableByOtherButtons&&i!==e&&i.toggled()&&i._triggerClick()}},toggleButton(e,t,i=!0){e==="editPolygon"&&(e="editMode"),e==="deleteLayer"&&(e="removalMode");let r=e;return i&&this.triggerClickOnToggledButtons(this.buttons[r]),this.buttons[r]?this.buttons[r].toggle(t):!1},_defineButtons(){let e={className:"control-icon leaflet-pm-icon-marker",title:De("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},t={title:De("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:De("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},r={title:De("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},n={title:De("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:De("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:De("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"]},o={title:De("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},l={title:De("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},h={title:De("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"]},v={title:De("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"]},b={className:"control-icon leaflet-pm-icon-text",title:De("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(O,w)=>{this.map.pm.Draw[w.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(i)),this._addButton("drawRectangle",new L.Control.PMButton(a)),this._addButton("drawPolygon",new L.Control.PMButton(t)),this._addButton("drawCircle",new L.Control.PMButton(r)),this._addButton("drawCircleMarker",new L.Control.PMButton(n)),this._addButton("drawText",new L.Control.PMButton(b)),this._addButton("editMode",new L.Control.PMButton(s)),this._addButton("dragMode",new L.Control.PMButton(o)),this._addButton("cutPolygon",new L.Control.PMButton(l)),this._addButton("removalMode",new L.Control.PMButton(h)),this._addButton("rotateMode",new L.Control.PMButton(v))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let e=this.getButtons(),t=[];this.options.drawControls===!1&&(t=t.concat(Object.keys(e).filter(i=>!e[i]._button.tool))),this.options.editControls===!1&&(t=t.concat(Object.keys(e).filter(i=>e[i]._button.tool==="edit"))),this.options.optionsControls===!1&&(t=t.concat(Object.keys(e).filter(i=>e[i]._button.tool==="options"))),this.options.customControls===!1&&(t=t.concat(Object.keys(e).filter(i=>e[i]._button.tool==="custom")));for(let i in e)if(this.options[i]&&t.indexOf(i)===-1){let r=e[i]._button.tool;r||(r="draw"),e[i].setPosition(this._getBtnPosition(r)),e[i].addTo(this.map)}},_getBtnPosition(e){return this.options.positions&&this.options.positions[e]?this.options.positions[e]:this.options.position},setBlockPosition(e,t){this.options.positions[e]=t,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(e,t){if(t)typeof t!="object"&&(t={name:t});else throw new TypeError("Button has no name");let i=this._btnNameMapping(e);if(!t.name)throw new TypeError("Button has no name");if(this.buttons[t.name])throw new TypeError("Button with this name already exists");let r=this.map.pm.Draw.createNewDrawInstance(t.name,i);t=Fe(Fe({},this.buttons[i]._button),t);let n=this.createCustomControl(t);return{drawInstance:r,control:n}},createCustomControl(e){var t,i;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}
1`):e.className="control-icon";let r={tool:e.block,className:e.className,title:e.title||"",jsClass:e.name,onClick:e.onClick,afterClick:e.afterClick,doToggle:e.toggle,toggleStatus:!1,disableOtherButtons:(t=e.disableOtherButtons)!=null?t:!0,disableByOtherButtons:(i=e.disableByOtherButtons)!=null?i:!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 n=this._addButton(e.name,new L.Control.PMButton(r));return this.changeControlOrder(),n},controlExists(e){return!!this.getButton(e)},getButton(e){return this.getButtons()[e]},getButtonsInBlock(e){let t={};if(e)for(let i in this.getButtons()){let r=this.getButtons()[i];(r._button.tool===e||e==="draw"&&!r._button.tool)&&(t[i]=r)}return t},changeControlOrder(e=[]){let t=this._shapeMapping(),i=[];e.forEach(a=>{t[a]?i.push(t[a]):i.push(a)});let r=this.getButtons(),n={};i.forEach(a=>{r[a]&&(n[a]=r[a])}),Object.keys(r).filter(a=>!r[a]._button.tool||r[a]._button.tool==="draw").forEach(a=>{i.indexOf(a)===-1&&(n[a]=r[a])}),Object.keys(r).filter(a=>r[a]._button.tool==="edit").forEach(a=>{i.indexOf(a)===-1&&(n[a]=r[a])}),Object.keys(r).filter(a=>r[a]._button.tool==="options").forEach(a=>{i.indexOf(a)===-1&&(n[a]=r[a])}),Object.keys(r).filter(a=>r[a]._button.tool==="custom").forEach(a=>{i.indexOf(a)===-1&&(n[a]=r[a])}),Object.keys(r).forEach(a=>{i.indexOf(a)===-1&&(n[a]=r[a])}),this.map.pm.Toolbar.buttons=n,this._showHideButtons()},getControlOrder(){let e=this.getButtons(),t=[];for(let i in e)t.push(i);return t},changeActionsOfControl(e,t){let i=this._btnNameMapping(e);if(!i)throw new TypeError("No name passed");if(!t)throw new TypeError("No actions passed");if(!this.buttons[i])throw new TypeError("Button with this name not exists");this.buttons[i]._button.actions=t,this.changeControlOrder()},setButtonDisabled(e,t){let i=this._btnNameMapping(e);t?this.buttons[i].disable():this.buttons[i].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 t=this._shapeMapping();return t[e]?t[e]:e}}),wa=Ba,Da=pt(H()),Pa={_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(t=>{if(Array.isArray(t)){this._assignEvents(t);return}t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this)})},_cleanupSnapping(e){if(e){let t=e.target;t._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(e){var t,i,r;let n=e.target;if(n._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),((t=e==null?void 0:e.originalEvent)==null?void 0:t.altKey)||((r=(i=this._map)==null?void 0:i.pm)==null?void 0:r.Keyboard.isAltKeyPressed())||(this._snapList===void 0&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let a=this._calcClosestLayer(n.getLatLng(),this._snapList);if(Object.keys(a).length===0)return!1;let s=a.layer instanceof L.Marker||a.layer instanceof L.CircleMarker||!this.options.snapSegment,o;s?o=a.latlng:o=this._checkPrioritiySnapping(a);let l=this.options.snapDistance,h={marker:n,shape:this._shape,snapLatLng:o,segment:a.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:a.layer,distance:a.distance};if(this._fireSnapDrag(h.marker,h),this._fireSnapDrag(this._layer,h),a.distance<l){n._orgLatLng=n.getLatLng(),n.setLatLng(o),n._snapped=!0,n._snapInfo=h;let v=()=>{this._snapLatLng=o,this._fireSnap(n,h),this._fireSnap(this._layer,h)},b=this._snapLatLng||{},O=o||{};(b.lat!==O.lat||b.lng!==O.lng)&&v()}else this._snapLatLng&&(this._unsnap(h),n._snapped=!1,n._snapInfo=void 0,this._fireUnsnap(h.marker,h),this._fireUnsnap(this._layer,h));return!0},_createSnapList(){let e=[],t=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(r=>{if((r instanceof L.Polyline||r instanceof L.Marker||r instanceof L.CircleMarker||r instanceof L.ImageOverlay)&&r.options.snapIgnore!==!0){if(r.options.snapIgnore===void 0&&(!L.PM.optIn&&r.options.pmIgnore===!0||L.PM.optIn&&r.options.pmIgnore!==!1))return;(r instanceof L.Circle||r instanceof L.CircleMarker)&&r.pm&&r.pm._hiddenPolyCircle?e.push(r.pm._hiddenPolyCircle):r instanceof L.ImageOverlay&&(r=L.rectangle(r.getBounds())),e.push(r);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,t.push(n),(r instanceof L.Circle||r instanceof L.CircleMarker)&&t.push(n)}}),e=e.filter(r=>this._layer!==r),e=e.filter(r=>r._latlng||r._latlngs&&dn(r._latlngs)),e=e.filter(r=>!r._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEac
1h(()=>{let r=L.polyline([],{color:"red",pmIgnore:!0});r._pmTempLayer=!0,t.push(r)}),this._snapList=e.concat(this._otherSnapLayers)):this._snapList=e,this.debugIndicatorLines=t},_handleSnapLayerRemoval({layer:e}){if(!e._leaflet_id)return;let t=this._snapList.findIndex(i=>i._leaflet_id===e._leaflet_id);t>-1&&this._snapList.splice(t,1)},_calcClosestLayer(e,t){return this._calcClosestLayers(e,t,1)[0]},_calcClosestLayers(e,t,i=1){let r=[],n={};t.forEach((s,o)=>{var l;if(s._parentCopy&&s._parentCopy===this._layer||((l=s.getLatLngs)==null?void 0:l.call(s).flat(5).length)<2)return;let h=this._calcLayerDistances(e,s);if(h.distance=Math.floor(h.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let v=L.polyline([],{color:"red",pmIgnore:!0});v._pmTempLayer=!0,this.debugIndicatorLines[o]=v}this.debugIndicatorLines[o].setLatLngs([e,h.latlng])}i===1&&(n.distance===void 0||h.distance-5<=n.distance)?(h.distance+5<n.distance&&(r=[]),n=h,n.layer=s,r.push(n)):i!==1&&(n={},n=h,n.layer=s,r.push(n))}),i!==1&&(r=r.sort((s,o)=>s.distance-o.distance)),i===-1&&(i=r.length);let a=this._getClosestLayerByPriority(r,i);return L.Util.isArray(a)?a:[a]},_calcLayerDistances(e,t){let i=this._map,r=t instanceof L.Marker||t instanceof L.CircleMarker,n=t instanceof L.Polygon,a=e;if(r){let s=t.getLatLng();return{latlng:Fe({},s),distance:this._getDistance(i,s,a)}}return this._calcLatLngDistances(a,t.getLatLngs(),i,n)},_calcLatLngDistances(e,t,i,r=!1){let n,a,s,o=l=>{l.forEach((h,v)=>{if(Array.isArray(h)){o(h);return}if(this.options.snapSegment){let b=h,O;r?O=v+1===l.length?0:v+1:O=v+1===l.length?void 0:v+1;let w=l[O];if(w){let N=this._getDistanceToSegment(i,e,b,w);(a===void 0||N<a)&&(a=N,s=[b,w])}}else{let b=this._getDistance(i,e,h);(a===void 0||b<a)&&(a=b,n=h)}})};return o(t),this.options.snapSegment?{latlng:Fe({},this._getClosestPointOnSegment(i,e,s[0],s[1])),segment:s,distance:a}:{latlng:n,distance:a}},_getClosestLayerByPriority(e,t=1){e=e.sort((s,o)=>s._leaflet_id-o._leaflet_id);let i=["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],r=this._map.pm.globalOptions.snappingOrder||[],n=0,a={};return r.concat(i).forEach(s=>{a[s]||(n+=1,a[s]=n)}),e.sort(Ca("instanceofShape",a)),t===1?e[0]||{}:e.slice(0,t)},_checkPrioritiySnapping(e){let t=this._map,i=e.segment[0],r=e.segment[1],n=e.latlng,a=n;if(this.options.snapVertex){let s=this._getDistance(t,i,n),o=this._getDistance(t,r,n),l=s<o?i:r,h=s<o?s:o;if(this.options.snapMiddle){let b=L.PM.Utils.calcMiddleLatLng(t,i,r),O=this._getDistance(t,b,n);O<s&&O<o&&(l=b,h=O)}let v=this.options.snapDistance;h<v&&(a=l)}return Fe({},a)},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(e,t,i,r){let n=e.getMaxZoom();n===1/0&&(n=e.getZoom());let a=e.project(t,n),s=e.project(i,n),o=e.project(r,n),l=L.LineUtil.closestPointOnSegment(a,s,o);return e.unproject(l,n)},_getDistanceToSegment(e,t,i,r){let n=e.latLngToContainerPoint(t),a=e.latLngToContainerPoint(i),s=e.latLngToContainerPoint(r);return L.LineUtil.pointToSegmentDistance(n,a,s)},_getDistance(e,t,i){return e.latLngToContainerPoint(t).distanceTo(e.latLngToContainerPoint(i))}},In=Pa,Aa=L.Class.extend({includes:[In,Dr],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 t=new L.Icon.Default;t.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=t,this._map=e,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(i=>{this[i]=new L.PM.Draw[i](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(e,t=!1){t?this.options.pathOptions=(0,Da.default)(this.options.pathOptions,e):this.options.pathOptions=e},getShapes(){return this.shapes},getShape(){return this._shape},enable(e,t){if(!e)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.get
1Shapes().join(",")}`);this.disable(),this[e].enable(t)},disable(){this.shapes.forEach(e=>{this[e].disable()})},addControls(){this.shapes.forEach(e=>{this[e].addButton()})},getActiveShape(){let e;return this.shapes.forEach(t=>{this[t]._enabled&&(e=t)}),e},_setGlobalDrawMode(){this._shape==="Cut"?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let e=[];this._map.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&(t._pmTempLayer||e.push(t))}),this._enabled?e.forEach(t=>{L.PM.Utils.disablePopup(t)}):e.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(e,t){let i=this._getShapeFromBtnName(t);if(this[e])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw new TypeError(`There is no class L.PM.Draw.${i}`);return this[e]=new L.PM.Draw[i](this._map),this[e].toolbarButtonName=e,this[e]._shape=e,this.shapes.push(e),this[t]&&this[e].setOptions(this[t].options),this[e].setOptions(this[e].options),this[e]},_getShapeFromBtnName(e){let t={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 t[e]?t[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,t){t==="layerPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":t==="vertexPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":t==="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}}),st=Aa;st.Marker=st.extend({initialize(e){this._map=e,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(e){L.Util.setOptions(this,e),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!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(De("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._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 t=e;t.target=this._hintMarker,this._handleSnapping(t)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(e){if(!e.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let t=this._hintMarker.getLatLng(),i=new L.Marker(t,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var e,t;(e=this.options.markerStyle)!=null&&e.icon&&((t=this._hintMarker)==null||t.setIcon(this.options.markerStyle.icon))}});var ft=63710088e-1,jn={centimeters:ft*100,centimetres:ft*100,degrees:ft/111325,feet:ft*3.28084,inches:ft*39.37,kilometers:ft/1e3,kilometres:ft/1e3,meters:ft,metres:ft,miles:ft/1609.344,millimeters:ft*1e3,millimetres:ft*1e3,nauticalmiles:ft/1852,radians:1,yards:ft*1.093
16},Ws={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/ft,yards:1.0936133};function Ci(e,t,i){i===void 0&&(i={});var r={type:"Feature"};return(i.id===0||i.id)&&(r.id=i.id),i.bbox&&(r.bbox=i.bbox),r.properties=t||{},r.geometry=e,r}function ki(e,t,i){if(i===void 0&&(i={}),!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(!Gn(e[0])||!Gn(e[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:e};return Ci(r,t,i)}function Ji(e,t,i){if(i===void 0&&(i={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:e};return Ci(r,t,i)}function ei(e,t){t===void 0&&(t={});var i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function Sa(e,t){t===void 0&&(t="kilometers");var i=jn[t];
1if(!i)throw new Error(t+" units is invalid");return e*i}function Fa(e,t){t===void 0&&(t="kilometers");var i=jn[t];if(!i)throw new Error(t+" units is invalid");return e/i}function gn(e){var t=e%(2*Math.PI);return t*180/Math.PI}function Pt(e){var t=e%360;return t*Math.PI/180}function Gn(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Sr(e){var t,i,r={type:"FeatureCollection",features:[]};if(e.type==="Feature"?i=e.geometry:i=e,i.type==="LineString")t=[i.coordinates];else if(i.type==="MultiLineString")t=i.coordinates;else if(i.type==="MultiPolygon")t=[].concat.apply([],i.coordinates);else if(i.type==="Polygon")t=i.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return t.forEach(function(n){t.forEach(function(a){for(var s=0;s<n.length-1;s++)for(var o=s;o<a.length-1;o++)if(!(n===a&&(Math.abs(s-o)===1||s===0&&o===n.length-2&&n[s][0]===n[n.length-1][0]&&n[s][1]===n[n.length-1][1]))){var l=Ta(n[s][0],n[s][1],n[s+1][0],n[s+1][1],a[o][0],a[o][1],a[o+1][0],a[o+1][1]);l&&r.features.push(ki([l[0],l[1]]))}})}),r}function Ta(e,t,i,r,n,a,s,o){var l,h,v,b,O,w={x:null,y:null,onLine1:!1,onLine2:!1};return l=(o-a)*(i-e)-(s-n)*(r-t),l===0?w.x!==null&&w.y!==null?w:!1:(h=t-a,v=e-n,b=(s-n)*h-(o-a)*v,O=(i-e)*h-(r-t)*v,h=b/l,v=O/l,w.x=e+h*(i-e),w.y=t+h*(r-t),h>=0&&h<=1&&(w.onLine1=!0),v>=0&&v<=1&&(w.onLine2=!0),w.onLine1&&w.onLine2?[w.x,w.y]:!1)}st.Line=st.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([],Qe(Fe({},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(De("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 t=e[e.length-1];this._hintline.setLatLngs([t,this._hintMarker.getLatLng()])}},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this.options.snappable){let i=e;i.target=this._hintMarker,this._handleSnapping(i)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let t=this._layer._defaultShape().slice();t.push(this._hintMarker.getLatLng()),this._change(t)}
1,hasSelfIntersection(){return Sr(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(e,t){let i=L.polyline(this._layer.getLatLngs());e&&(t||(t=this._hintMarker.getLatLng()),i.addLatLng(t));let r=Sr(i.toGeoJSON(15));this._doesSelfIntersect=r.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(r,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 t=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),r=i[i.length-1];if(t.equals(i[0])||i.length>0&&t.equals(r)){this._finishShape();return}this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:t,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(t);let n=this._createMarker(t);this._setTooltipText(),this._setHintLineAfterNewVertex(t),this._fireVertexAdded(n,void 0,t,"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 t=this._layer.getLatLngs(),i=e[e.length-1],{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(e,i);e.pop(),this._layerGroup.removeLayer(i);let n=e[e.length-1],a=t.indexOf(n.getLatLng());t=t.slice(0,a+1),this._layer.setLatLngs(t),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,r,"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 t=L.polyline(e,this.options.pathOptions);this._setPane(t,"layerPane"),this._finishLayer(t),t.addTo(this._map.pm._getContainingLayer()),this._fireCreate(t),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(e){let t=new L.Marker(e,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._markers.push(t),t.on("click",this._finishShape,this),t},_setTooltipText(){let{length:e}=this._layer.getLatLngs().flat(),t="";e<=1?t=De("tooltips.continueLine"):t=De("tooltips.finishLine"),this._hintMarker.setTooltipContent(t)},_change(e){this._fireChange(e,"Draw")},setStyle(){var e,t;(e=this._layer)==null||e.setStyle(this.options.templineStyle),(t=this._hintline)==null||t.setStyle(this.options.hintlineStyle)}}),st.Polygon=st.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 t=new L.Marker(e,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._markers.push(t),this._layer.getLatLngs().flat().length===1?(t.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(t)-1,this.options.snappable&&this._cleanupSnapping()):t.on("click",()=>1),t},_setTooltipText(){let{length:e}=this._layer.getLatLngs().flat(),t="";e<=2?t=De("tooltips.continueLine"):t=De("tooltips.finishPoly"),this._hintMarker.setTooltipContent(t)},_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 t=L.polygon(e,this.options.pathOptions);this._setPane(t,"layerPane"),this._finishLayer(t),t.addTo(this._map.pm._getContainingLayer()),this._fireCreate(t),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),st.Rectangle=st.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(De("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let i=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(i,"vertexPane"),i._pmTempLayer=!0,this._layerGroup.addLayer(i),this._styleMarkers.push(i)}}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 t=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(t),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEac
1h(i=>{L.DomUtil.addClass(i._icon,"visible"),i.setLatLng(t)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(De("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 i=e;i.target=this._hintMarker,this._handleSnapping(i)}let t=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(t,"Draw")},_syncRectangleSize(){let e=On(this._startMarker.getLatLng(),this._map),t=On(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(e,t,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let r=[];i.forEach(n=>{!n.equals(e,1e-8)&&!n.equals(t,1e-8)&&r.push(n)}),r.forEach((n,a)=>{try{this._styleMarkers[a].setLatLng(n)}catch(s){}})}},_findCorners(){let e=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(e[0],e[2],this.options.rectangleAngle||0,this._map)},_finishShape(e){this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let t=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(t))return;let r=L.rectangle([i,t],this.options.pathOptions);if(this.options.rectangleAngle){let a=L.PM.Utils._getRotatedRectangle(i,t,this.options.rectangleAngle||0,this._map);r.setLatLngs(a),r.pm&&r.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),this._fireCreate(r);let n=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(n))},setStyle(){var e;(e=this._layer)==null||e.setStyle(this.options.pathOptions)}}),st.CircleMarker=st.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 t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(De("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(),Fe({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(De("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 t=this._hintMarker.getLatLng();this._centerMarker.setLatLng(t),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(De("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let e=this._centerMarker.getLatLng(),t=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([e,t])},_syncCircleRadius(){let e=this._centerMarker.getLatLng(),t=this._hintMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(e){if(this._hintMarker.setLatLng(e.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let i=e;i.target=this._hintMarker,this._handleSnapping(i)}this._handleHintMarkerSnapping();let t=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(t,"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 t=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(t,Fe({radius:this._defaultRadius},this.options.pathOptions));this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(e){e.pm&&this.options.markerEditable&&e.pm.enable()},_finishShape(e){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let t=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let s=this._hintMarker.getLatLng();i=this._distanceCalculation(t,s),this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?i=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let r=Qe(Fe({},this.options.pathOptions),{radius:i}
1),n=new this._BaseCircleClass(t,r);this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),n.pm&&n.pm._updateHiddenPolyCircle(),this._fireCreate(n);let a=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(a))},_getNewDestinationOfHintMarker(){let e=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return e;let t=this._centerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?e=Ar(this._map,t,e,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(e=Ar(this._map,t,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(),t=this._hintMarker.getLatLng(),i=this._distanceCalculation(e,t);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var e,t;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),(e=this._layer)==null||e.setStyle(i),(t=this._hintline)==null||t.setStyle(this.options.hintlineStyle)},_distanceCalculation(e,t){return this._map.project(e).distanceTo(this._map.project(t))}}),st.Circle=st.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,t){return this._map.distance(e,t)}});
1function Ot(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 It(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 Fr(e){return e.type==="Feature"?e.geometry:e}function Nn(e,t){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function _n(e,t,i){if(e!==null)for(var r,n,a,s,o,l,h,v=0,b=0,O,w=e.type,N=w==="FeatureCollection",Y=w==="Feature",te=N?e.features.length:1,Me=0;Me<te;Me++){h=N?e.features[Me].geometry:Y?e.geometry:e,O=h?h.type==="GeometryCollection":!1,o=O?h.geometries.length:1;for(var m=0;m<o;m++){var C=0,B=0;if(s=O?h.geometries[m]:h,s!==null){l=s.coordinates;var j=s.type;switch(v=i&&(j==="Polygon"||j==="MultiPolygon")?1:0,j){case null:break;case"Point":if(t(l,b,Me,C,B)===!1)return!1;b++,C++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(t(l[r],b,Me,C,B)===!1)return!1;b++,j==="MultiPoint"&&C++}j==="LineString"&&C++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(n=0;n<l[r].length-v;n++){if(t(l[r][n],b,Me,C,B)===!1)return!1;b++}j==="MultiLineString"&&C++,j==="Polygon"&&B++}j==="Polygon"&&C++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(B=0,n=0;n<l[r].length;n++){for(a=0;a<l[r][n].length-v;a++){if(t(l[r][n][a],b,Me,C,B)===!1)return!1;b++}B++}C++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(_n(s.geometries[r],t,i)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Xi(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var i=0;i<e.features.length&&t(e.features[i],i)!==!1;i++);}function Ra(e,t,i){var r=i;return Xi(e,function(n,a){a===0&&i===void 0?r=n:r=t(r,n,a)}),r}function Oa(e,t){var i,r,n,a,s,o,l,h,v,b,O=0,w=e.type==="FeatureCollection",N=e.type==="Feature",Y=w?e.features.length:1;for(i=0;i<Y;i++){for(o=w?e.features[i].geometry:N?e.geometry:e,h=w?e.features[i].properties:N?e.properties:{},v=w?e.features[i].bbox:N?e.bbox:void 0,b=w?e.features[i].id:N?e.id:void 0,l=o?o.type==="GeometryCollection":!1,s=l?o.geometries.length:1,n=0;n<s;n++){if(a=l?o.geometries[n]:o,a===null){if(t(null,O,h,v,b)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,O,h,v,b)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<a.geometries.length;r++)if(t(a.geometries[r],O,h,v,b)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}O++}}function mn(e,t){Oa(e,function(i,r,n,a,s){var o=i===null?null:i.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return t(Ci(i,n,{bbox:a,id:s}),r,0)===!1?!1:void 0}var l;switch(o){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var h=0;h<i.coordinates.length;h++){var v=i.coordinates[h],b={type:l,coordinates:v};if(t(Ci(b,n),r,h)===!1)return!1}})}function Ia(e){if(!e)throw new Error("geojson is required");var t=[];return mn(e,function(i){ja(i,t)}),ei(t)}function ja(e,t){var i=[],r=e.geometry;if(r!==null){switch(r.type){case"Polygon":i=It(r);break;case"LineString":i=[It(r)]}i.forEach(function(n){var a=Ga(n,e.properties);a.forEach(function(s){s.id=t.length,t.push(s)})})}}function Ga(e,t){var i=[];return e.reduce(function(r,n){var a=Ji([r,n],t);return a.bbox=Na(r,n),i.push(a),n}),i}function Na(e,t){var i=e[0],r=e[1],n=t[0],a=t[1],s=i<n?i:n,o=r<a?r:a,l=i>n?i:n,h=r>a?r:a;return[s,o,l,h]}var yn=Ia,za=pt(he(),1);function Ua(e,t){var i={},r=[];if(e.type==="LineString"&&(e=Ci(e)),t.type==="LineString"&&(t=Ci(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var n=zn(e,t);return n&&r.push(n),ei(r)}var a=(0,za.default)();return a.load(yn(t)),Xi(yn(e),function(s){Xi(a.search(s),function(o){var l=zn(s,o);if(l){var h=It(l).join(",");i[h]||(i[h]=!0,r.push(l))}})}),ei(r)}function zn(e,t){var i=It(e),r=It(t);if(i.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=i[0][0],a=i[0][1],s=i[1][0],o=i[1][1],l=r[0][0],h=r[0][1],v=r[1][0],b=r[1][1],O=(b-h)*(s-n)-(v-l)*(o-a),w=(v-l)*(a-h)-(b-h)*(n-l),N=(s-n)*(a-h)-(o-a)*(n-l);if(O===0)return null;var Y=w/O,te=N/O;if(Y>=0&&Y<=1&&te>=0&&te<=1){var Me=n+Y*(s-n),m=a+Y*(o-a);return ki([Me,m])}return null}var ci=Ua,Un=pt(he(),1);function Va(e,t,i){i===void 0&&(i={});var r=Ot(e),n=Ot(t),a=Pt(n[1]-r[1]),s=Pt(n[0]-r[0]),o=Pt(r[1]),l=Pt(n[1]),h=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(o)*Math.cos(l);return Sa(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),i.units)}var di=Va;function Ka(e){var t=e[0],i=e[1],r=e[2],n=e[3],a=di(e.slice(0,2),[r,i]),s=di(e.slice(0,2),[t,n]);if(a>=s){var o=(i+n)/2;return[t,o-(r-t)/2,r,o+(r-t)/2]}else{var l=(t+r)/2;return[l-(n-i)/2,i,l+(n-i)/2,n]}}var qa=Ka;function vn(e){var t=[1/0,1/0,-1/0,-1/0];return _n(e,function(i){t[0]>i[0]&&(t[0]=i[0]),t[1]>i[1]&&(t[1]=i[1]),t[2]<i[0]&&(t[2]=i[0]),t[3]<i[1]&&(t[3]=i[1])}),t}vn.default=vn;var $i=vn;
1function Ha(e,t){t===void 0&&(t={});var i=t.precision,r=t.coordinates,n=t.mutate;if(i=i==null||isNaN(i)?6:i,r=r==null||isNaN(r)?3:r,!e)throw new Error("<geojson> is required");if(typeof i!="number")throw new Error("<precision> must be a number");if(typeof r!="number")throw new Error("<coordinates> must be a number");(n===!1||n===void 0)&&(e=JSON.parse(JSON.stringify(e)));var a=Math.pow(10,i);return _n(e,function(s){Ya(s,a,r)}),e}function Ya(e,t,i){e.length>i&&e.splice(i,e.length);for(var r=0;r<e.length;r++)e[r]=Math.round(e[r]*t)/t;return e}var Ja=Ha;function Vn(e,t,i){if(i===void 0&&(i={}),i.final===!0)return Xa(e,t);var r=Ot(e),n=Ot(t),a=Pt(r[0]),s=Pt(n[0]),o=Pt(r[1]),l=Pt(n[1]),h=Math.sin(s-a)*Math.cos(l),v=Math.cos(o)*Math.sin(l)-Math.sin(o)*Math.cos(l)*Math.cos(s-a);return gn(Math.atan2(h,v))}function Xa(e,t){var i=Vn(t,e);return i=(i+180)%360,i}function Kn(e,t,i,r){r===void 0&&(r={});var n=Ot(e),a=Pt(n[0]),s=Pt(n[1]),o=Pt(i),l=Fa(t,r.units),h=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(o)),v=a+Math.atan2(Math.sin(o)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(h)),b=gn(v),O=gn(h);return ki([b,O],r.properties)}function $a(e,t,i){i===void 0&&(i={});var r=ki([1/0,1/0],{dist:1/0}),n=0;return mn(e,function(a){for(var s=It(a),o=0;o<s.length-1;o++){var l=ki(s[o]);l.properties.dist=di(t,l,i);var h=ki(s[o+1]);h.properties.dist=di(t,h,i);var v=di(l,h,i),b=Math.max(l.properties.dist,h.properties.dist),O=Vn(l,h),w=Kn(t,b,O+90,i),N=Kn(t,b,O-90,i),Y=ci(Ji([w.geometry.coordinates,N.geometry.coordinates]),Ji([l.geometry.coordinates,h.geometry.coordinates])),te=null;Y.features.length>0&&(te=Y.features[0],te.properties.dist=di(t,te,i),te.properties.location=n+di(l,te,i)),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=o,r.properties.location=n),h.properties.dist<r.properties.dist&&(r=h,r.properties.index=o+1,r.properties.location=n+v),te&&te.properties.dist<r.properties.dist&&(r=te,r.properties.index=o),n+=v}}),r}var Za=$a;function Wa(e,t){if(!e)throw new Error("line is required");if(!t)throw new Error("splitter is required");var i=Nn(e),r=Nn(t);if(i!=="LineString")throw new Error("line must be LineString");if(r==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(r==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var n=Ja(t,{precision:7});switch(r){case"Point":return Ln(e,n);case"MultiPoint":return qn(e,n);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return qn(e,ci(e,n))}}function qn(e,t){var i=[],r=(0,Un.default)();return mn(t,function(n){if(i.forEach(function(o,l){o.id=l}),!i.length)i=Ln(e,n).features,i.forEach(function(o){o.bbox||(o.bbox=qa($i(o)))}),r.load(ei(i));else{var a=r.search(n);if(a.features.length){var s=Hn(n,a);i=i.filter(function(o){return o.id!==s.id}),r.remove(s),Xi(Ln(s,n),function(o){i.push(o),r.insert(o)})}}}),ei(i)}function Ln(e,t){var i=[],r=It(e)[0],n=It(e)[e.geometry.coordinates.length-1];if(bn(r,Ot(t))||bn(n,Ot(t)))return ei([e]);var a=(0,Un.default)(),s=yn(e);a.load(s);var o=a.search(t);if(!o.features.length)return ei([e]);var l=Hn(t,o),h=[r],v=Ra(s,function(b,O,w){var N=It(O)[1],Y=Ot(t);return w===l.id?(b.push(Y),i.push(Ji(b)),bn(Y,N)?[Y]:[Y,N]):(b.push(N),b)},h);return v.length>1&&i.push(Ji(v)),ei(i)}function Hn(e,t){if(!t.features.length)throw new Error("lines must contain features");if(t.features.length===1)return t.features[0];var i,r=1/0;return Xi(t,function(n){var a=Za(n,e),s=a.properties.dist;s<r&&(i=n,r=s)}),i}function bn(e,t){return e[0]===t[0]&&e[1]===t[1]}var Qa=Wa;function Tr(e,t,i){if(i===void 0&&(i={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=Ot(e),n=Fr(t),a=n.type,s=t.bbox,o=n.coordinates;if(s&&es(r,s)===!1)return!1;a==="Polygon"&&(o=[o]);for(var l=!1,h=0;h<o.length&&!l;h++)if(Yn(r,o[h][0],i.ignoreBoundary)){for(var v=!1,b=1;b<o[h].length&&!v;)Yn(r,o[h][b],!i.ignoreBoundary)&&(v=!0),b++;v||(l=!0)}return l}function Yn(e,t,i){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var n=0,a=t.length-1;n<t.length;a=n++){var s=t[n][0],o=t[n][1],l=t[a][0],h=t[a][1],v=e[1]*(s-l)+o*(l-e[0])+h*(e[0]-s)===0&&(s-e[0])*(l-e[0])<=0&&(o-e[1])*(h-e[1])<=0;if(v)return!i;var b=o>e[1]!=h>e[1]&&e[0]<(l-s)*(e[1]-o)/(h-o)+s;b&&(r=!r)}return r}function es(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}function ts(e,t,i){i===void 0&&(i={});for(var r=Ot(e),n=It(t),a=0;a<n.length-1;a++){var s=!1;if(i.ignoreEndVertices&&(a===0&&(s="start"),a===n.length-2&&(s="end"),a===0&&a+1===n.length-1&&(s="both")),is(n[a],n[a+1],r,s,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1}function is(e,t,i,r,n){var a=i[0],s=i[1],o=e[0],l=e[1],h=t[0],v=t[1],b=i[0]-o,O=i[1]-l,w=h-o,N=v-l,Y=b*N-O*w;if(n!==null){if(Math.abs(Y)>n)return!1}else if(Y!==0)return!1;if(r){if(r==="start")return Math.abs(w)>=Math.abs(N)?w>0?o<a&&a<=h:h<=a&&a<o:N>0?l<s&&s<=v:v<=s&&s<l;if(r==="end")return Math.abs(w)>=Math.abs(N)?w>0?o<=a&&a<h:h<a&&a<=o:N>0?l<=s&&s<v:v<s&&s<=l;if(r==="both")return Math.abs(w)>=Math.abs(N)?w>0?o<a&&a<h:h<a&&a<o:N>0?l<s&&s<v:v<s&&s<l}else return Math.abs(w)>=Math.abs(N)?w>0?o<=a&&a<=h:h<=a&&a<=o:N>0?l<=s&&s<=v:v<=s&&s<=l;return!1}var Zi=ts;function rs(e,t){var i=Fr(e),r=Fr(t),n=i.type,a=r.type,s=i.coordinates,o=r.coordinates;switch(n){case"Point":switch(a){case"Point":return Cn(s,o);default:throw new Error("feature2 "+a+" geometry not supported")}case"MultiPoint":switch(a){case"Point":return ns(i,r);case"MultiPoint":return as(i,r);default:throw new Error("feature2 "+a+" geometry not supported")}case"LineString":switch(a){case"Point":return Zi(r,i,{ignoreEndVertices:!0});case"LineString":return us(i,r);case"MultiPoint":return ss(i,r);default:throw new Error("feature2 "+a+" geometry not supported")}case"Polygon":switch(a){case"Point":return Tr(r,i,{ignoreBoundary:!0});case"LineString":return ls(i,r);case"Polygon":return hs(i,r);case"MultiPoint":return os(i,r);default:throw new Error("feature2 "+a+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function ns(e,t){var i,r=!1;for(i=0;i<e.coordinates.length;i++)if(Cn(e.coordinates[i],t.coordinates)){r=!0;break}return r}function as(e,t){for(var i=0,r=t.coordinates;i<r.length;i++){for(var n=r[i],a=!1,s=0,o=e.coordinates;s<o.length;s++){var l=o[s];if(Cn(n,l)){a=!0;break}}if(!a)return!1}return!0}function ss(e,t){for(var i=!1,r=0,n=t.coordinates;r<n.length;r++){var a=n[r];if(Zi(a,e,{ignoreEndVertices:!0})&&(i=!0),!Zi(a,e))return!1}return!!i}function os(e,t){for(var i=0,r=t.coordinates;i<r.length;i++){var n=r[i];if(!Tr(n,e,{ignoreBoundary:!0}))return!1}return!0}function us(e,t){for(var i=!1,r=0,n=t.coordinates;r<n.length;r++){var a=n[r];if(Zi({type:"Point",coordinates:a},e,{ignoreEndVertices:!0})&&(i=!0),!Zi({type:"Point",coordinates:a},e,{ignoreEndVertices:!1}))return!1}return i}function ls(e,t){var i=!1,r=0,n=$i(e),a=$i(t);if(!Jn(n,a))return!1;for(r;r<t.coordinates.length-1;
1r++){var s=ps(t.coordinates[r],t.coordinates[r+1]);if(Tr({type:"Point",coordinates:s},e,{ignoreBoundary:!0})){i=!0;break}}return i}function hs(e,t){if(e.type==="Feature"&&e.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var i=$i(e),r=$i(t);if(!Jn(i,r))return!1;for(var n=Fr(t).coordinates,a=0,s=n;a<s.length;a++)for(var o=s[a],l=0,h=o;l<h.length;l++){var v=h[l];if(!Tr(v,e))return!1}return!0}function Jn(e,t){return!(e[0]>t[0]||e[2]<t[2]||e[1]>t[1]||e[3]<t[3])}function Cn(e,t){return e[0]===t[0]&&e[1]===t[1]}function ps(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var cs=pt(le()),Xn=e=>()=>e,kn=e=>{let t=e?(i,r)=>r.minus(i).abs().isLessThanOrEqualTo(e):Xn(!1);return(i,r)=>t(i,r)?0:i.comparedTo(r)};function ds(e){let t=e?(i,r,n,a,s)=>i.exponentiatedBy(2).isLessThanOrEqualTo(a.minus(r).exponentiatedBy(2).plus(s.minus(n).exponentiatedBy(2)).times(e)):Xn(!1);return(i,r,n)=>{let a=i.x,s=i.y,o=n.x,l=n.y,h=s.minus(l).times(r.x.minus(o)).minus(a.minus(o).times(r.y.minus(l)));return t(h,a,s,o,l)?0:h.comparedTo(0)}}var fs=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Mn=Math.ceil,bt=Math.floor,_t="[BigNumber Error] ",$n=_t+"Number primitive has more than 15 significant digits: ",At=1e14,ye=14,xn=9007199254740991,En=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ti=1e7,tt=1e9;function Zn(e){var t,i,r,n=m.prototype={constructor:m,toString:null,valueOf:null},a=new m(1),s=20,o=4,l=-7,h=21,v=-1e7,b=1e7,O=!1,w=1,N=0,Y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},te="0123456789abcdefghijklmnopqrstuvwxyz",Me=!0;function m(u,p){var f,d,g,_,x,k,E,T,F=this;if(!(F instanceof m))return new m(u,p);if(p==null){if(u&&u._isBigNumber===!0){F.s=u.s,!u.c||u.e>b?F.c=F.e=null:u.e<v?F.c=[F.e=0]:(F.e=u.e,F.c=u.c.slice());return}if((k=typeof u=="number")&&u*0==0){if(F.s=1/u<0?(u=-u,-1):1,u===~~u){for(_=0,x=u;x>=10;x/=10,_++);_>b?F.c=F.e=null:(F.e=_,F.c=[u]);return}T=String(u)}else{if(!fs.test(T=String(u)))return r(F,T,k);F.s=T.charCodeAt(0)==45?(T=T.slice(1),-1):1}(_=T.indexOf("."))>-1&&(T=T.replace(".","")),(x=T.search(/e/i))>0?(_<0&&(_=x),_+=+T.slice(x+1),T=T.substring(0,x)):_<0&&(_=T.length)}else{if(Ve(p,2,te.length,"Base"),p==10&&Me)return F=new m(u),D(F,s+F.e+1,o);if(T=String(u),k=typeof u=="number"){if(u*0!=0)return r(F,T,k,p);if(F.s=1/u<0?(T=T.slice(1),-1):1,m.DEBUG&&T.replace(/^0\.0*|\./,"").length>15)throw Error($n+u)}else F.s=T.charCodeAt(0)===45?(T=T.slice(1),-1):1;for(f=te.slice(0,p),_=x=0,E=T.length;x<E;x++)if(f.indexOf(d=T.charAt(x))<0){if(d=="."){if(x>_){_=E;continue}}else if(!g&&(T==T.toUpperCase()&&(T=T.toLowerCase())||T==T.toLowerCase()&&(T=T.toUpperCase()))){g=!0,x=-1,_=0;continue}return r(F,String(u),k,p)}k=!1,T=i(T,p,10,F.s),(_=T.indexOf("."))>-1?T=T.replace(".",""):_=T.length}for(x=0;T.charCodeAt(x)===48;x++);for(E=T.length;T.charCodeAt(--E)===48;);if(T=T.slice(x,++E)){if(E-=x,k&&m.DEBUG&&E>15&&(u>xn||u!==bt(u)))throw Error($n+F.s*u);if((_=_-x-1)>b)F.c=F.e=null;else if(_<v)F.c=[F.e=0];else{if(F.e=_,F.c=[],x=(_+1)%ye,_<0&&(x+=ye),x<E){for(x&&F.c.push(+T.slice(0,x)),E-=ye;x<E;)F.c.push(+T.slice(x,x+=ye));x=ye-(T=T.slice(x)).length}else x-=E;for(;x--;T+="0");F.c.push(+T)}}else F.c=[F.e=0]}m.clone=Zn,m.ROUND_UP=0,m.ROUND_DOWN=1,m.ROUND_CEIL=2,m.ROUND_FLOOR=3,m.ROUND_HALF_UP=4,m.ROUND_HALF_DOWN=5,m.ROUND_HALF_EVEN=6,m.ROUND_HALF_CEIL=7,m.ROUND_HALF_FLOOR=8,m.EUCLID=9,m.config=m.set=function(u){var p,f;if(u!=null)if(typeof u=="object"){if(u.hasOwnProperty(p="DECIMAL_PLACES")&&(f=u[p],Ve(f,0,tt,p),s=f),u.hasOwnProperty(p="ROUNDING_MODE")&&(f=u[p],Ve(f,0,8,p),o=f),u.hasOwnProperty(p="EXPONENTIAL_AT")&&(f=u[p],f&&f.pop?(Ve(f[0],-tt,0,p),Ve(f[1],0,tt,p),l=f[0],h=f[1]):(Ve(f,-tt,tt,p),l=-(h=f<0?-f:f))),u.hasOwnProperty(p="RANGE"))if(f=u[p],f&&f.pop)Ve(f[0],-tt,-1,p),Ve(f[1],1,tt,p),v=f[0],b=f[1];else if(Ve(f,-tt,tt,p),f)v=-(b=f<0?-f:f);else throw Error(_t+p+" cannot be zero: "+f);if(u.hasOwnProperty(p="CRYPTO"))if(f=u[p],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))O=f;else throw O=!f,Error(_t+"crypto unavailable");else O=f;else throw Error(_t+p+" not true or false: "+f);if(u.hasOwnProperty(p="MODULO_MODE")&&(f=u[p],Ve(f,0,9,p),w=f),u.hasOwnProperty(p="POW_PRECISION")&&(f=u[p],Ve(f,0,tt,p),N=f),u.hasOwnProperty(p="FORMAT"))if(f=u[p],typeof f=="object")Y=f;else throw Error(_t+p+" not an object: "+f);if(u.hasOwnProperty(p="ALPHABET"))if(f=u[p],typeof f=="string"&&!/^.?$|[+\-.\
vendor: 14,928 bytes, line 1
1s]|(.).*\1/.test(f))Me=f.slice(0,10)=="0123456789",te=f;else throw Error(_t+p+" invalid: "+f)}else throw Error(_t+"Object expected: "+u);return{DECIMAL_PLACES:s,ROUNDING_MODE:o,EXPONENTIAL_AT:[l,h],RANGE:[v,b],CRYPTO:O,MODULO_MODE:w,POW_PRECISION:N,FORMAT:Y,ALPHABET:te}},m.isBigNumber=function(u){if(!u||u._isBigNumber!==!0)return!1;if(!m.DEBUG)return!0;var p,f,d=u.c,g=u.e,_=u.s;e:if({}.toString.call(d)=="[object Array]"){if((_===1||_===-1)&&g>=-tt&&g<=tt&&g===bt(g)){if(d[0]===0){if(g===0&&d.length===1)return!0;break e}if(p=(g+1)%ye,p<1&&(p+=ye),String(d[0]).length==p){for(p=0;p<d.length;p++)if(f=d[p],f<0||f>=At||f!==bt(f))break e;if(f!==0)return!0}}}else if(d===null&&g===null&&(_===null||_===1||_===-1))return!0;throw Error(_t+"Invalid BigNumber: "+u)},m.maximum=m.max=function(){return B(arguments,-1)},m.minimum=m.min=function(){return B(arguments,1)},m.random=function(){var u=9007199254740992,p=Math.random()*u&2097151?function(){return bt(Math.random()*u)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var d,g,_,x,k,E=0,T=[],F=new m(a);if(f==null?f=s:Ve(f,0,tt),x=Mn(f/ye),O)if(crypto.getRandomValues){for(d=crypto.getRandomValues(new Uint32Array(x*=2));E<x;)k=d[E]*131072+(d[E+1]>>>11),k>=9e15?(g=crypto.getRandomValues(new Uint32Array(2)),d[E]=g[0],d[E+1]=g[1]):(T.push(k%1e14),E+=2);E=x/2}else if(crypto.randomBytes){for(d=crypto.randomBytes(x*=7);E<x;)k=(d[E]&31)*281474976710656+d[E+1]*1099511627776+d[E+2]*4294967296+d[E+3]*16777216+(d[E+4]<<16)+(d[E+5]<<8)+d[E+6],k>=9e15?crypto.randomBytes(7).copy(d,E):(T.push(k%1e14),E+=7);E=x/7}else throw O=!1,Error(_t+"crypto unavailable");if(!O)for(;E<x;)k=p(),k<9e15&&(T[E++]=k%1e14);for(x=T[--E],f%=ye,x&&f&&(k=En[ye-f],T[E]=bt(x/k)*k);T[E]===0;T.pop(),E--);if(E<0)T=[_=0];else{for(_=-1;T[0]===0;T.splice(0,1),_-=ye);for(E=1,k=T[0];k>=10;k/=10,E++);E<ye&&(_-=ye-E)}return F.e=_,F.c=T,F}}(),m.sum=function(){for(var u=1,p=arguments,f=new m(p[0]);u<p.length;)f=f.plus(p[u++]);return f},i=function(){var u="0123456789";function p(f,d,g,_){for(var x,k=[0],E,T=0,F=f.length;T<F;){for(E=k.length;E--;k[E]*=d);for(k[0]+=_.indexOf(f.charAt(T++)),x=0;x<k.length;x++)k[x]>g-1&&(k[x+1]==null&&(k[x+1]=0),k[x+1]+=k[x]/g|0,k[x]%=g)}return k.reverse()}return function(f,d,g,_,x){var k,E,T,F,V,ee,ae,ue,Ae=f.indexOf("."),Te=s,Pe=o;for(Ae>=0&&(F=N,N=0,f=f.replace(".",""),ue=new m(d),ee=ue.pow(f.length-Ae),N=F,ue.c=p(Ht(kt(ee.c),ee.e,"0"),10,g,u),ue.e=ue.c.length),ae=p(f,d,g,x?(k=te,u):(k=u,te)),T=F=ae.length;ae[--F]==0;ae.pop());if(!ae[0])return k.charAt(0);if(Ae<0?--T:(ee.c=ae,ee.e=T,ee.s=_,ee=t(ee,ue,Te,Pe,g),ae=ee.c,V=ee.r,T=ee.e),E=T+Te+1,Ae=ae[E],F=g/2,V=V||E<0||ae[E+1]!=null,V=Pe<4?(Ae!=null||V)&&(Pe==0||Pe==(ee.s<0?3:2)):Ae>F||Ae==F&&(Pe==4||V||Pe==6&&ae[E-1]&1||Pe==(ee.s<0?8:7)),E<1||!ae[0])f=V?Ht(k.charAt(1),-Te,k.charAt(0)):k.charAt(0);else{if(ae.length=E,V)for(--g;++ae[--E]>g;)ae[E]=0,E||(++T,ae=[1].concat(ae));for(F=ae.length;!ae[--F];);for(Ae=0,f="";Ae<=F;f+=k.charAt(ae[Ae++]));f=Ht(f,T,k.charAt(0))}return f}}(),t=function(){function u(d,g,_){var x,k,E,T,F=0,V=d.length,ee=g%ti,ae=g/ti|0;for(d=d.slice();V--;)E=d[V]%ti,T=d[V]/ti|0,x=ae*E+T*ee,k=ee*E+x%ti*ti+F,F=(k/_|0)+(x/ti|0)+ae*T,d[V]=k%_;return F&&(d=[F].concat(d)),d}function p(d,g,_,x){var k,E;if(_!=x)E=_>x?1:-1;else for(k=E=0;k<_;k++)if(d[k]!=g[k]){E=d[k]>g[k]?1:-1;break}return E}function f(d,g,_,x){for(var k=0;_--;)d[_]-=k,k=d[_]<g[_]?1:0,d[_]=k*x+d[_]-g[_];for(;!d[0]&&d.length>1;d.splice(0,1));}return function(d,g,_,x,k){var E,T,F,V,ee,ae,ue,Ae,Te,Pe,Re,ut,qr,Pn,An,Nt,tr,Mt=d.s==g.s?1:-1,gt=d.c,qe=g.c;if(!gt||!gt[0]||!qe||!qe[0])return new m(!d.s||!g.s||(gt?qe&&gt[0]==qe[0]:!qe)?NaN:gt&&gt[0]==0||!qe?Mt*0:Mt/0);for(Ae=new m(Mt),Te=Ae.c=[],T=d.e-g.e,Mt=_+T+1,k||(k=At,T=Ct(d.e/ye)-Ct(g.e/ye),Mt=Mt/ye|0),F=0;qe[F]==(gt[F]||0);F++);if(qe[F]>(gt[F]||0)&&T--,Mt<0)Te.push(1),V=!0;else{for(Pn=gt.length,Nt=qe.length,F=0,Mt+=2,ee=bt(k/(qe[0]+1)),ee>1&&(qe=u(qe,ee,k),gt=u(gt,ee,k),Nt=qe.length,Pn=gt.length),qr=Nt,Pe=gt.slice(0,Nt),Re=Pe.length;Re<Nt;Pe[Re++]=0);tr=qe.slice(),tr=[0].concat(tr),An=qe[0],qe[1]>=k/2&&An++;do{if(ee=0,E=p(qe,Pe,Nt,Re),E<0){if(ut=Pe[0],Nt!=Re&&(ut=ut*k+(Pe[1]||0)),ee=bt(ut/An),ee>1)for(ee>=k&&(ee=k-1),ae=u(qe,ee,k),ue=ae.length,Re=Pe.length;p(ae,Pe,ue,Re)==1;)ee--,f(ae,Nt<ue?tr:qe,ue,k),ue=ae.length,E=1;else ee==0&&(E=ee=1),ae=qe.slice(),ue=ae.length;if(ue<Re&&(ae=[0].concat(ae)),f(Pe,ae,Re,k),Re=Pe.length,E==-1)for(;p(qe,Pe,Nt,Re)<1;)ee++,f(Pe,Nt<Re?tr:qe,Re,k),Re=Pe.length}else E===0&&(ee++,Pe=[0]);Te[F++]=ee,Pe[0]?Pe[Re++]=gt[qr]||0:(Pe=[gt[qr]],Re=1)}while((qr++<Pn||Pe[0]!=null)&&Mt--);V=Pe[0]!=null,Te[0]||Te.splice(0,1)}if(k==At){for(F=1,Mt=Te[0];Mt>=10;Mt/=10,F++);D(Ae,_+(Ae.e=F+T*ye-1)+1,x,V)}else Ae.e=T,Ae.r=+V;return Ae}}();function C(u,p,f,d){var g,_,x,k,E;if(f==null?f=o:Ve(f,0,8),!u.c)return u.toString();if(g=u.c[0],x=u.e,p==null)E=kt(u.c),E=d==1||d==2&&(x<=l||x>=h)?Or(E,x):Ht(E,x,"0");else if(u=D(new m(u),p,f),_=u.e,E=kt(u.c),k=E.length,d==1||d==2&&(p<=_||_<=l)){for(;k<p;E+="0",k++);E=Or(E,_)}else if(p-=x,E=Ht(E,_,"0"),_+1>k){if(--p>0)for(E+=".";p--;E+="0");}else if(p+=_-k,p>0)for(_+1==k&&(E+=".");p--;E+="0");return u.s<0&&g?"-"+E:E}function B(u,p){for(var f,d,g=1,_=new m(u[0]);g<u.length;g++)d=new m(u[g]),(!d.s||(f=fi(_,d))===p||f===0&&_.s===p)&&(_=d);return _}function j(u,p,f){for(var d=1,g=p.length;!p[--g];p.pop());for(g=p[0];g>=10;g/=10,d++);return(f=d+f*ye-1)>b?u.c=u.e=null:f<v?u.c=[u.e=0]:(u.e=f,u.c=p),u}r=function(){var u=/^(-?)0([xbo])(?=\w[\w.]*$)/i,p=/^([^.]+)\.$/,f=/^\.([^.]+)$/,d=/^-?(Infinity|NaN)$/,g=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(_,x,k,E){var T,F=k?x:x.replace(g,"");if(d.test(F))_.s=isNaN(F)?null:F<0?-1:1;else{if(!k&&(F=F.replace(u,function(V,ee,ae){return T=(ae=ae.toLowerCase())=="x"?16:ae=="b"?2:8,!E||E==T?ee:V}),E&&(T=E,F=F.replace(p,"$1").replace(f,"0.$1")),x!=F))return new m(F,T);if(m.DEBUG)throw Error(_t+"Not a"+(E?" base "+E:"")+" number: "+x);_.s=null}_.c=_.e=null}}();function D(u,p,f,d){var g,_,x,k,E,T,F,V=u.c,ee=En;if(V){e:{for(g=1,k=V[0];k>=10;k/=10,g++);if(_=p-g,_<0)_+=ye,x=p,E=V[T=0],F=bt(E/ee[g-x-1]%10);else if(T=Mn((_+1)/ye),T>=V.length)if(d){for(;V.length<=T;V.push(0));E=F=0,g=1,_%=ye,x=_-ye+1}else break e;else{for(E=k=V[T],g=1;k>=10;k/=10,g++);_%=ye,x=_-ye+g,F=x<0?0:bt(E/ee[g-x-1]%10)}if(d=d||p<0||V[T+1]!=null||(x<0?E:E%ee[g-x-1]),d=f<4?(F||d)&&(f==0||f==(u.s<0?3:2)):F>5||F==5&&(f==4||d||f==6&&(_>0?x>0?E/ee[g-x]:0:V[T-1])%10&1||f==(u.s<0?8:7)),p<1||!V[0])return V.length=0,d?(p-=u.e+1,V[0]=ee[(ye-p%ye)%ye],u.e=-p||0):V[0]=u.e=0,u;if(_==0?(V.length=T,k=1,T--):(V.length=T+1,k=ee[ye-_],V[T]=x>0?bt(E/ee[g-x]%ee[x])*k:0),d)for(;;)if(T==0){for(_=1,x=V[0];x>=10;x/=10,_++);for(x=V[0]+=k,k=1;x>=10;x/=10,k++);_!=k&&(u.e++,V[0]==At&&(V[0]=1));break}else{if(V[T]+=k,V[T]!=At)break;V[T--]=0,k=1}for(_=V.length;V[--_]===0;V.pop());}u.e>b?u.c=u.e=null:u.e<v&&(u.c=[u.e=0])}return u}function I(u){var p,f=u.e;return f===null?u.toString():(p=kt(u.c),p=f<=l||f>=h?Or(p,f):Ht(p,f,"0"),u.s<0?"-"+p:p)}return n.absoluteValue=n.abs=function(){var u=new m(this);return u.s<0&&(u.s=1),u},n.comparedTo=function(u,p){return fi(this,new m(u,p))},n.decimalPlaces=n.dp=function(u,p){var f,d,g,_=this;if(u!=null)return Ve(u,0,tt),p==null?p=o:Ve(p,0,8),D(new m(_),u+_.e+1,p);if(!(f=_.c))return null;if(d=((g=f.length-1)-Ct(this.e/ye))*ye,g=f[g])for(;g%10==0;g/=10,d--);return d<0&&(d=0),d},n.dividedBy=n.div=function(u,p){return t(this,new m(u,p),s,o)},n.dividedToIntegerBy=n.idiv=function(u,p){return t(this,new m(u,p),0,1)},n.exponentiatedBy=n.pow=function(u,p){var f,d,g,_,x,k,E,T,F,V=this;if(u=new m(u),u.c&&!u.isInteger())throw Error(_t+"Exponent not an integer: "+I(u));if(p!=null&&(p=new m(p)),k=u.e>14,!V.c||!V.c[0]||V.c[0]==1&&!V.e&&V.c.length==1||!u.c||!u.c[0])return F=new m(Math.pow(+I(V),k?u.s*(2-Rr(u)):+I(u))),p?F.mod(p):F;if(E=u.s<0,p){if(p.c?!p.c[0]:!p.s)return new m(NaN);d=!E&&V.isInteger()&&p.isInteger(),d&&(V=V.mod(p))}else{if(u.e>9&&(V.e>0||V.e<-1||(V.e==0?V.c[0]>1||k&&V.c[1]>=24e7:V.c[0]<8e13||k&&V.c[0]<=9999975e7)))return _=V.s<0&&Rr(u)?-0:0,V.e>-1&&(_=1/_),new m(E?1/_:_);N&&(_=Mn(N/ye+2))}for(k?(f=new m(.5),E&&(u.s=1),T=Rr(u)):(g=Math.abs(+I(u)),T=g%2),F=new m(a);;){if(T){if(F=F.times(V),!F.c)break;_?F.c.length>_&&(F.c.length=_):d&&(F=F.mod(p))}if(g){if(g=bt(g/2),g===0)break;T=g%2}else if(u=u.times(f),D(u,u.e+1,1),u.e>14)T=Rr(u);else{if(g=+I(u),g===0)break;T=g%2}V=V.times(V),_?V.c&&V.c.length>_&&(V.c.length=_):d&&(V=V.mod(p))}return d?F:(E&&(F=a.div(F)),p?F.mod(p):_?D(F,N,o,x):F)},n.integerValue=function(u){var p=new m(this);return u==null?u=o:Ve(u,0,8),D(p,p.e+1,u)},n.isEqualTo=n.eq=function(u,p){return fi(this,new m(u,p))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(u,p){return fi(this,new m(u,p))>0},n.isGreaterThanOrEqualTo=n.gte=function(u,p){return(p=fi(this,new m(u,p)))===1||p===0},n.isInteger=function(){return!!this.c&&Ct(this.e/ye)>this.c.length-2},n.isLessThan=n.lt=function(u,p){return fi(this,new m(u,p))<0},n.isLessThanOrEqualTo=n.lte=function(u,p){return(p=fi(this,new m(u,p)))===-1||p===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(u,p){var f,d,g,_,x=this,k=x.s;if(u=new m(u,p),p=u.s,!k||!p)return new m(NaN);if(k!=p)return u.s=-p,x.plus(u);var E=x.e/ye,T=u.e/ye,F=x.c,V=u.c;if(!E||!T){if(!F||!V)return F?(u.s=-p,u):new m(V?x:NaN);if(!F[0]||!V[0])return V[0]?(u.s=-p,u):new m(F[0]?x:o==3?-0:0)}if(E=Ct(E),T=Ct(T),F=F.slice(),k=E-T){for((_=k<0)?(k=-k,g=F):(T=E,g=V),g.reverse(),p=k;p--;g.push(0));g.reverse()}else for(d=(_=(k=F.length)<(p=V.length))?k:p,k=p=0;p<d;p++)if(F[p]!=V[p]){_=F[p]<V[p];break}if(_&&(g=F,F=V,V=g,u.s=-u.s),p=(d=V.length)-(f=F.length),p>0)for(;p--;F[f++]=0);for(p=At-1;d>k;){if(F[--d]<V[d]){for(f=d;f&&!F[--f];F[f]=p);--F[f],F[d]+=At}F[d]-=V[d]}for(;F[0]==0;F.splice(0,1),--T);return F[0]?j(u,F,T):(u.s=o==3?-1:1,u.c=[u.e=0],u)},n.modulo=n.mod=function(u,p){var f,d,g=this;return u=new m(u,p),!g.c||!u.s||u.c&&!u.c[0]?new m(NaN):!u.c||g.c&&!g.c[0]?new m(g):(w==9?(d=u.s,u.s=1,f=t(g,u,0,3),u.s=d,f.s*=d):f=t(g,u,0,w),u=g.minus(f.times(u)),!u.c[0]&&w==1&&(u.s=g.s),u)},n.multipliedBy=n.times=function(u,p){var f,d,g,_,x,k,E,T,F,V,ee,ae,ue,Ae,Te,Pe=this,Re=Pe.c,ut=(u=new m(u,p)).c;if(!Re||!ut||!Re[0]||!ut[0])return!Pe.s||!u.s||Re&&!Re[0]&&!ut||ut&&!ut[0]&&!Re?u.c=u.e=u.s=null:(u.s*=Pe.s,!Re||!ut?u.c=u.e=null:(u.c=[0],u.e=0)),u;for(d=Ct(Pe.e/ye)+Ct(u.e/ye),u.s*=Pe.s,E=Re.length,V=ut.length,E<V&&(ue=Re,Re=ut,ut=ue,g=E,E=V,V=g),g=E+V,ue=[];g--;ue.push(0));for(Ae=At,Te=ti,g=V;--g>=0;){for(f=0,ee=ut[g]%Te,ae=ut[g]/Te|0,x=E,_=g+x;_>g;)T=Re[--x]%Te,F=Re[x]/Te|0,k=ae*T+F*ee,T=ee*T+k%Te*Te+ue[_]+f,f=(T/Ae|0)+(k/Te|0)+ae*F,ue[_--]=T%Ae;ue[_]=f}return f?++d:ue.splice(0,1),j(u,ue,d)},n.negated=function(){var u=new m(this);return u.s=-u.s||null,u},n.plus=function(u,p){var f,d=this,g=d.s;if(u=new m(u,p),p=u.s,!g||!p)return new m(NaN);if(g!=p)return u.s=-p,d.minus(u);var _=d.e/ye,x=u.e/ye,k=d.c,E=u.c;if(!_||!x){if(!k||!E)return new m(g/0);if(!k[0]||!E[0])return E[0]?u:new m(k[0]?d:g*0)}if(_=Ct(_),x=Ct(x),k=k.slice(),g=_-x){for(g>0?(x=_,f=E):(g=-g,f=k),f.reverse();g--;f.push(0));f.reverse()}for(g=k.length,p=E.length,g-p<0&&(f=E,E=k,k=f,p=g),g=0;p;)g=(k[--p]=k[p]+E[p]+g)/At|0,k[p]=At===k[p]?0:k[p]%At;return g&&(k=[g].concat(k),++x),j(u,k,x)},n.precision=n.sd=function(u,p){var f,d,g,_=this;if(u!=null&&u!==!!u)return Ve(u,1,tt),p==null?p=o:Ve(p,0,8),D(new m(_),u,p);if(!(f=_.c))return null;if(g=f.length-1,d=g*ye+1,g=f[g]){for(;g%10==0;g/=10,d--);for(g=f[0];g>=10;g/=10,d++);}return u&&_.e+1>d&&(d=_.e+1),d},n.shiftedBy=function(u){return Ve(u,-xn,xn),this.times("1e"+u)},n.squareRoot=n.sqrt=function(){var u,p,f,d,g,_=this,x=_.c,k=_.s,E=_.e,T=s+4,F=new m("0.5");if(k!==1||!x||!x[0])return new m(!k||k<0&&(!x||x[0])?NaN:x?_:1/0);if(k=Math.sqrt(+I(_)),k==0||k==1/0?(p=kt(x),(p.length+E)%2==0&&(p+="0"),k=Math.sqrt(+p),E=Ct((E+1)/2)-(E<0||E%2),k==1/0?p="5e"+E:(p=k.toExponential(),p=p.slice(0,p.indexOf("e")+1)+E),f=new m(p)):f=new m(k+""),f.c[0]){for(E=f.e,k=E+T,k<3&&(k=0);;)if(g=f,f=F.times(g.plus(t(_,g,T,1))),kt(g.c).slice(0,k)===(p=kt(f.c)).slice(0,k))if(f.e<E&&--k,p=p.slice(k-3,k+1),p=="9999"||!d&&p=="4999"){if(!d&&(D(g,g.e+s+2,0),g.times(g).eq(_))){f=g;break}T+=4,k+=4,d=1}else{(!+p||!+p.slice(1)&&p.charAt(0)=="5")&&(D(f,f.e+s+2,1),u=!f.times(f).eq(_));break}}return D(f,f.e+s+1,o,u)},n.toExponential=function(u,p){return u!=null&&(Ve(u,0,tt),u++),C(this,u,p,1)},n.toFixed=function(u,p){return u!=null&&(Ve(u,0,tt),u=u+this.e+1),C(this,u,p)},n.toFormat=function(u,p,f){var d,g=this;if(f==null)u!=null&&p&&typeof p=="object"?(f=p,p=null):u&&typeof u=="object"?(f=u,u=p=null):f=Y;else if(typeof f!="object")throw Error(_t+"Argument not an object: "+f);if(d=g.toFixed(u,p),g.c){var _,x=d.split("."),k=+f.groupSize,E=+f.secondaryGroupSize,T=f.groupSeparator||"",F=x[0],V=x[1],ee=g.s<0,ae=ee?F.slice(1):F,ue=ae.length;if(E&&(_=k,k=E,E=_,ue-=_),k>0&&ue>0){for(_=ue%k||k,F=ae.substr(0,_);_<ue;_+=k)F+=T+ae.substr(_,k);E>0&&(F+=T+ae.slice(_)),ee&&(F="-"+F)}d=V?F+(f.decimalSeparator||"")+((E=+f.fractionGroupSize)?V.replace(new RegExp("\\d{"+E+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):V):F}return(f.prefix||"")+d+(f.suffix||"")},n.toFraction=function(u){var p,f,d,g,_,x,k,E,T,F,V,ee,ae=this,ue=ae.c;if(u!=null&&(k=new m(u),!k.isInteger()&&(k.c||k.s!==1)||k.lt(a)))throw Error(_t+"Argument "+(k.isInteger()?"out of range: ":"not an integer: ")+I(k));if(!ue)return new m(ae);for(p=new m(a),T=f=new m(a),d=E=new m(a),ee=kt(ue),_=p.e=ee.length-ae.e-1,p.c[0]=En[(x=_%ye)<0?ye+x:x],u=!u||k.comparedTo(p)>0?_>0?p:T:k,x=b,b=1/0,k=new m(ee),E.c[0]=0;F=t(k,p,0,1),g=f.plus(F.times(d)),g.comparedTo(u)!=1;)f=d,d=g,T=E.plus(F.times(g=T)),E=g,p=k.minus(F.times(g=p)),k=g;return g=t(u.minus(f),d,0,1),E=E.plus(g.times(T)),f=f.plus(g.times(d)),E.s=T.s=ae.s,_=_*2,V=t(T,d,_,o).minus(ae).abs().comparedTo(t(E,f,_,o).minus(ae).abs())<1?[T,d]:[E,f],b=x,V},n.toNumber=function(){return+I(this)},n.toPrecision=function(u,p){return u!=null&&Ve(u,1,tt),C(this,u,p,2)},n.toString=function(u){var p,f=this,d=f.s,g=f.e;return g===null?d?(p="Infinity",d<0&&(p="-"+p)):p="NaN":(u==null?p=g<=l||g>=h?Or(kt(f.c),g):Ht(kt(f.c),g,"0"):u===10&&Me?(f=D(new m(f),s+g+1,o),p=Ht(kt(f.c),f.e,"0")):(Ve(u,2,te.length,"Base"),p=i(Ht(kt(f.c),g,"0"),10,u,d,!0)),d<0&&f.c[0]&&(p="-"+p)),p},n.valueOf=n.toJSON=function(){return I(this)},n._isBigNumber=!0,n[Symbol.toStringTag]="BigNumber",n[Symbol.for("nodejs.util.inspect.custom")]=n.valueOf,e!=null&&m.set(e),m}function Ct(e){var t=e|0;return e>0||e===t?t:t-1}function kt(e){for(var t,i,r=1,n=e.length,a=e[0]+"";r<n;){for(t=e[r++]+"",i=ye-t.length;i--;t="0"+t);a+=t}for(n=a.length;a.charCodeAt(--n)===48;);return a.slice(0,n+1||1)}function fi(e,t){var i,r,n=e.c,a=t.c,s=e.s,o=t.s,l=e.e,h=t.e;if(!s||!o)return null;if(i=n&&!n[0],r=a&&!a[0],i||r)return i?r?0:-o:s;
1if(s!=o)return s;if(i=s<0,r=l==h,!n||!a)return r?0:!n^i?1:-1;if(!r)return l>h^i?1:-1;for(o=(l=n.length)<(h=a.length)?l:h,s=0;s<o;s++)if(n[s]!=a[s])return n[s]>a[s]^i?1:-1;return l==h?0:l>h^i?1:-1}function Ve(e,t,i,r){if(e<t||e>i||e!==bt(e))throw Error(_t+(r||"Argument")+(typeof e=="number"?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Rr(e){var t=e.c.length-1;return Ct(e.e/ye)==t&&e.c[t]%2!=0}function Or(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Ht(e,t,i){var r,n;if(t<0){for(n=i+".";++t;n+=i);e=n+e}else if(r=e.length,++t>r){for(n=i,t-=r;--t;n+=i);e+=n}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var gs=Zn(),jt=gs,_s=class{constructor(e){ie(this,"key"),ie(this,"left",null),ie(this,"right",null),this.key=e}},Wi=class extends _s{constructor(e){super(e)}},ms=class{constructor(){ie(this,"size",0),ie(this,"modificationCount",0),ie(this,"splayCount",0)}splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let i=null,r=null,n=null,a=null,s=t,o=this.compare,l;for(;;)if(l=o(s.key,e),l>0){let h=s.left;if(h==null||(l=o(h.key,e),l>0&&(s.left=h.right,h.right=s,s=h,h=s.left,h==null)))break;i==null?r=s:i.left=s,i=s,s=h}else if(l<0){let h=s.right;if(h==null||(l=o(h.key,e),l<0&&(s.right=h.left,h.left=s,s=h,h=s.right,h==null)))break;n==null?a=s:n.right=s,n=s,s=h}else break;return n!=null&&(n.right=s.left,s.left=a),i!=null&&(i.left=s.right,s.right=r),this.root!==s&&(this.root=s,this.splayCount++),l}splayMin(e){let t=e,i=t.left;for(;i!=null;){let r=i;t.left=r.right,r.right=t,t=r,i=t.left}return t}splayMax(e){let t=e,i=t.right;for(;i!=null;){let r=i;t.right=r.left,r.left=t,t=r,i=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let t=this.root,i=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{let n=t.right;t=this.splayMax(r),t.right=n,this.root=t}return this.modificationCount++,i}addNewRoot(e,t){this.size++,this.modificationCount++;let i=this.root;if(i==null){this.root=e;return}t<0?(e.left=i,e.right=i.right,i.right=null):(e.right=i,e.left=i.left,i.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,t)=>e<t?-1:e>t?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)}}},Ir=class ir extends ms{constructor(t,i){super(),ie(this,"root",null),ie(this,"compare"),ie(this,"validKey"),ie(this,He,"[object Set]"),this.compare=t!=null?t:this.defaultCompare(),this.validKey=i!=null?i:r=>r!=null&&r!=null}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(let i of t)this.delete(i)}forEach(t){let i=this[Symbol.iterator](),r;for(;r=i.next(),!r.done;)t(r.value,r.value,this)}add(t){let i=this.splay(t);return i!=0&&this.addNewRoot(new Wi(t),i),this}addAndReturn(t){let i=this.splay(t);return i!=0&&this.addNewRoot(new Wi(t),i),this.root.key}addAll(t){for(let i of t)this.add(i)}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(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let i=this.root.left;if(i==null)return null;let r=i.right;for(;r!=null;)i=r,r=i.right;return i.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let i=this.root.right;if(i==null)return null;let r=i.left;for(;r!=null;)i=r,r=i.left;return i.key}retainAll(t){let i=new ir(this.compare,this.validKey),r=this.modificationCount;for(let n of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(n)&&this.splay(n)==0&&i.add(this.root.key)}i.size!=this.size&&(this.root=i.root,this.size=i.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){let i=new ir(this.compare,this.validKey);for(let r of this)t.has(r)&&i.add(r);return i}difference(t){let i=new ir(this.compare,this.validKey);for(let r of this)t.has(r)||i.add(r);return i}union(t){let i=this.clone();return i.addAll(t),i}clone(){let t=new ir(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function i(n,a){let s,o;
1do{if(s=n.left,o=n.right,s!=null){let l=new Wi(s.key);a.left=l,i(s,l)}if(o!=null){let l=new Wi(o.key);a.right=l,n=o,a=l}}while(o!=null)}let r=new Wi(t.key);return i(t,r),r}toSet(){return this.clone()}entries(){return new vs(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(Ne=Symbol.iterator,He=Symbol.toStringTag,Ne)](){return new ys(this.wrap())}},Wn=class{constructor(e){ie(this,"tree"),ie(this,"path",new Array),ie(this,"modificationCount",null),ie(this,"splayCount"),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 i=this.tree.getRoot();for(;i!=null;)this.path.push(i),i=i.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],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.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}},ys=class extends Wn{getValue(e){return e.key}},vs=class extends Wn{getValue(e){return[e.key,e.key]}},Ls=e=>e,bs=e=>{if(e){let t=new Ir(kn(e)),i=new Ir(kn(e)),r=(a,s)=>s.addAndReturn(a),n=a=>({x:r(a.x,t),y:r(a.y,i)});return n({x:new jt(0),y:new jt(0)}),n}return Ls},Bn=e=>({set:t=>{Yt=Bn(t)},reset:()=>Bn(e),compare:kn(e),snap:bs(e),orient:ds(e)}),Yt=Bn(),Qi=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),wn=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let i=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,r=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,n=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,a=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:i,y:n},ur:{x:r,y:a}}},jr=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),Qn=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),Gr=e=>Qn(e,e).sqrt(),Cs=(e,t,i)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},n={x:i.x.minus(e.x),y:i.y.minus(e.y)};return jr(n,r).div(Gr(n)).div(Gr(r))},ks=(e,t,i)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},n={x:i.x.minus(e.x),y:i.y.minus(e.y)};return Qn(n,r).div(Gr(n)).div(Gr(r))},ea=(e,t,i)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(i.minus(e.y))),y:i},ta=(e,t,i)=>t.x.isZero()?null:{x:i,y:e.y.plus(t.y.div(t.x).times(i.minus(e.x)))},Ms=(e,t,i,r)=>{if(t.x.isZero())return ta(i,r,e.x);if(r.x.isZero())return ta(e,t,i.x);if(t.y.isZero())return ea(i,r,e.y);if(r.y.isZero())return ea(e,t,i.y);let n=jr(t,r);if(n.isZero())return null;let a={x:i.x.minus(e.x),y:i.y.minus(e.y)},s=jr(a,t).div(n),o=jr(a,r).div(n),l=e.x.plus(o.times(t.x)),h=i.x.plus(s.times(r.x)),v=e.y.plus(o.times(t.y)),b=i.y.plus(s.times(r.y)),O=l.plus(h).div(2),w=v.plus(b).div(2);return{x:O,y:w}},Gt=class ha{constructor(t,i){ie(this,"point"),ie(this,"isLeft"),ie(this,"segment"),ie(this,"otherSE"),ie(this,"consumedBy"),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=i}static compare(t,i){let r=ha.comparePoints(t.point,i.point);return r!==0?r:(t.point!==i.point&&t.link(i),t.isLeft!==i.isLeft?t.isLeft?1:-1:Nr.compare(t.segment,i.segment))}static comparePoints(t,i){return t.x.isLessThan(i.x)?-1:t.x.isGreaterThan(i.x)?1:t.y.isLessThan(i.y)?-1:t.y.isGreaterThan(i.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let i=t.point.events;for(let r=0,n=i.length;r<n;r++){let a=i[r];this.point.events.push(a),a.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let i=0;i<t;i++){let r=this.point.events[i];if(r.segment.consumedBy===void 0)for(let n=i+1;n<t;n++){let a=this.point.events[n];a.consumedBy===void 0&&r.otherSE.point.events===a.otherSE.point.events&&r.segment.consume(a.segment)}}}getAvailableLinkedEvents(){let t=[];for(let i=0,r=this.point.events.length;i<r;i++){let n=this.point.events[i];
1n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}getLeftmostComparator(t){let i=new Map,r=n=>{let a=n.otherSE;i.set(n,{sine:Cs(this.point,t.point,a.point),cosine:ks(this.point,t.point,a.point)})};return(n,a)=>{i.has(n)||r(n),i.has(a)||r(a);let{sine:s,cosine:o}=i.get(n),{sine:l,cosine:h}=i.get(a);return s.isGreaterThanOrEqualTo(0)&&l.isGreaterThanOrEqualTo(0)?o.isLessThan(h)?1:o.isGreaterThan(h)?-1:0:s.isLessThan(0)&&l.isLessThan(0)?o.isLessThan(h)?-1:o.isGreaterThan(h)?1:0:l.isLessThan(s)?-1:l.isGreaterThan(s)?1:0}}},xs=0,Nr=class Hr{constructor(t,i,r,n){ie(this,"id"),ie(this,"leftSE"),ie(this,"rightSE"),ie(this,"rings"),ie(this,"windings"),ie(this,"ringOut"),ie(this,"consumedBy"),ie(this,"prev"),ie(this,"_prevInResult"),ie(this,"_beforeState"),ie(this,"_afterState"),ie(this,"_isInResult"),this.id=++xs,this.leftSE=t,t.segment=this,t.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=t,this.rings=r,this.windings=n}static compare(t,i){let r=t.leftSE.point.x,n=i.leftSE.point.x,a=t.rightSE.point.x,s=i.rightSE.point.x;if(s.isLessThan(r))return 1;if(a.isLessThan(n))return-1;let o=t.leftSE.point.y,l=i.leftSE.point.y,h=t.rightSE.point.y,v=i.rightSE.point.y;if(r.isLessThan(n)){if(l.isLessThan(o)&&l.isLessThan(h))return 1;if(l.isGreaterThan(o)&&l.isGreaterThan(h))return-1;let b=t.comparePoint(i.leftSE.point);if(b<0)return 1;if(b>0)return-1;let O=i.comparePoint(t.rightSE.point);return O!==0?O:-1}if(r.isGreaterThan(n)){if(o.isLessThan(l)&&o.isLessThan(v))return-1;if(o.isGreaterThan(l)&&o.isGreaterThan(v))return 1;let b=i.comparePoint(t.leftSE.point);if(b!==0)return b;let O=t.comparePoint(i.rightSE.point);return O<0?1:O>0?-1:1}if(o.isLessThan(l))return-1;if(o.isGreaterThan(l))return 1;if(a.isLessThan(s)){let b=i.comparePoint(t.rightSE.point);if(b!==0)return b}if(a.isGreaterThan(s)){let b=t.comparePoint(i.rightSE.point);if(b<0)return 1;if(b>0)return-1}if(!a.eq(s)){let b=h.minus(o),O=a.minus(r),w=v.minus(l),N=s.minus(n);if(b.isGreaterThan(O)&&w.isLessThan(N))return 1;if(b.isLessThan(O)&&w.isGreaterThan(N))return-1}return a.isGreaterThan(s)?1:a.isLessThan(s)||h.isLessThan(v)?-1:h.isGreaterThan(v)?1:t.id<i.id?-1:t.id>i.id?1:0}static fromRing(t,i,r){let n,a,s,o=Gt.comparePoints(t,i);if(o<0)n=t,a=i,s=1;else if(o>0)n=i,a=t,s=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);let l=new Gt(n,!0),h=new Gt(a,!1);return new Hr(l,h,[r],[s])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,i=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(i)?t:i},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(i)?t:i}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return Yt.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let i=this.bbox(),r=t.bbox(),n=wn(i,r);if(n===null)return null;let a=this.leftSE.point,s=this.rightSE.point,o=t.leftSE.point,l=t.rightSE.point,h=Qi(i,o)&&this.comparePoint(o)===0,v=Qi(r,a)&&t.comparePoint(a)===0,b=Qi(i,l)&&this.comparePoint(l)===0,O=Qi(r,s)&&t.comparePoint(s)===0;if(v&&h)return O&&!b?s:!O&&b?l:null;if(v)return b&&a.x.eq(l.x)&&a.y.eq(l.y)?null:a;if(h)return O&&s.x.eq(o.x)&&s.y.eq(o.y)?null:o;if(O&&b)return null;if(O)return s;if(b)return l;let w=Ms(a,this.vector(),o,t.vector());return w===null||!Qi(n,w)?null:Yt.snap(w)}split(t){let i=[],r=t.events!==void 0,n=new Gt(t,!0),a=new Gt(t,!1),s=this.rightSE;this.replaceRightSE(a),i.push(a),i.push(n);let o=new Hr(n,s,this.rings.slice(),this.windings.slice());return Gt.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),Gt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(n.checkForConsuming(),a.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let i=0,r=this.windings.length;i<r;i++)this.windings[i]*=-1}consume(t){let i=this,r=t;for(;i.consumedBy;)i=i.consumedBy;for(;r.consumedBy;)r=r.consumedBy;let n=Hr.compare(i,r);if(n!==0){if(n>0){let a=i;i=r,r=a}if(i.prev===r){let a=i;i=r,r=a}for(let a=0,s=r.rings.length;a<s;a++){let o=r.rings[a],l=r.windings[a],h=i.rings.indexOf(o);h===-1?(i.rings.push(o),i.windings.push(l)):i.windings[h]+=l}r.rings=null,r.windings=null,r.consumedBy=i,r.leftSE.consumedBy=i.leftSE,r.rightSE.consumedBy=i.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 t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let i=this._afterState.rings,r=this._afterState.windings,n=this._afterState.multiPolys;for(let o=0,l=this.rings.length;o<l;o++){let h=this.rings[o],v=this.windings[o],b=i.indexOf(h);b===-1?(i.push(h),r.push(v)):r[b]+=v}let a=[],s=[];for(let o=0,l=i.length;o<l;o++){if(r[o]===0)continue;let h=i[o],v=h.poly;if(s.indexOf(v)===-1)if(h.isExterior)a.push(v);else{s.indexOf(v)===-1&&s.push(v);let b=a.indexOf(h.poly);b!==-1&&a.splice(b,1)}}for(let o=0,l=a.length;o<l;o++){let h=a[o].multiPoly;n.indexOf(h)===-1&&n.push(h)}return this._afterState}
1isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let t=this.beforeState().multiPolys,i=this.afterState().multiPolys;switch(zr.type){case"union":{let r=t.length===0,n=i.length===0;this._isInResult=r!==n;break}case"intersection":{let r,n;t.length<i.length?(r=t.length,n=i.length):(r=i.length,n=t.length),this._isInResult=n===zr.numMultiPolys&&r<n;break}case"xor":{let r=Math.abs(t.length-i.length);this._isInResult=r%2===1;break}case"difference":{let r=n=>n.length===1&&n[0].isSubject;this._isInResult=r(t)!==r(i);break}}return this._isInResult}},ia=class{constructor(e,t,i){if(ie(this,"poly"),ie(this,"isExterior"),ie(this,"segments"),ie(this,"bbox"),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=i,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 r=Yt.snap({x:new jt(e[0][0]),y:new jt(e[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let n=r;for(let a=1,s=e.length;a<s;a++){if(typeof e[a][0]!="number"||typeof e[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let o=Yt.snap({x:new jt(e[a][0]),y:new jt(e[a][1])});o.x.eq(n.x)&&o.y.eq(n.y)||(this.segments.push(Nr.fromRing(n,o,this)),o.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.x),o.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.y),o.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.x),o.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.y),n=o)}(!r.x.eq(n.x)||!r.y.eq(n.y))&&this.segments.push(Nr.fromRing(n,r,this))}getSweepEvents(){let e=[];for(let t=0,i=this.segments.length;t<i;t++){let r=this.segments[t];e.push(r.leftSE),e.push(r.rightSE)}return e}},Es=class{constructor(e,t){if(ie(this,"multiPoly"),ie(this,"exteriorRing"),ie(this,"interiorRings"),ie(this,"bbox"),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ia(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 i=1,r=e.length;i<r;i++){let n=new ia(e[i],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,i=this.interiorRings.length;t<i;t++){let r=this.interiorRings[t].getSweepEvents();for(let n=0,a=r.length;n<a;n++)e.push(r[n])}return e}},ra=class{constructor(e,t){if(ie(this,"isSubject"),ie(this,"polys"),ie(this,"bbox"),!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(i){}this.polys=[],this.bbox={ll:{x:new jt(Number.POSITIVE_INFINITY),y:new jt(Number.POSITIVE_INFINITY)},ur:{x:new jt(Number.NEGATIVE_INFINITY),y:new jt(Number.NEGATIVE_INFINITY)}};for(let i=0,r=e.length;i<r;i++){let n=new Es(e[i],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,i=this.polys.length;t<i;t++){let r=this.polys[t].getSweepEvents();for(let n=0,a=r.length;n<a;n++)e.push(r[n])}return e}},Bs=class Sn{constructor(t){ie(this,"events"),ie(this,"poly"),ie(this,"_isExteriorRing"),ie(this,"_enclosingRing"),this.events=t;for(let i=0,r=t.length;i<r;i++)t[i].segment.ringOut=this;this.poly=null}static factory(t){let i=[];for(let r=0,n=t.length;r<n;r++){let a=t[r];if(!a.isInResult()||a.ringOut)continue;let s=null,o=a.leftSE,l=a.rightSE,h=[o],v=o.point,b=[];for(;s=o,o=l,h.push(o),o.point!==v;)for(;;){let O=o.getAvailableLinkedEvents();if(O.length===0){let Y=h[0].point,te=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${Y.x}, ${Y.y}]. Last matching segment found ends at [${te.x}, ${te.y}].`)}if(O.length===1){l=O[0].otherSE;break}let w=null;for(let Y=0,te=b.length;Y<te;Y++)if(b[Y].point===o.point){w=Y;break}if(w!==null){let Y=b.splice(w)[0],te=h.splice(Y.index);te.unshift(te[0].otherSE),i.push(new Sn(te.reverse()));continue}b.push({index:h.length,point:o.point});let N=o.getLeftmostComparator(s);l=O.sort(N)[0].otherSE;break}i.push(new Sn(h))}return i}getGeom(){let t=this.events[0].point,i=[t];for(let h=1,v=this.events.length-1;h<v;h++){let b=this.events[h].point,O=this.events[h+1].point;Yt.orient(b,t,O)!==0&&(i.push(b),t=b)}if(i.length===1)return null;let r=i[0],n=i[1];Yt.orient(r,t,n)===0&&i.shift(),i.push(i[0]);let a=this.isExteriorRing()?1:-1,s=this.isExteriorRing()?0:i.length-1,o=this.isExteriorRing()?i.length:-1,l=[];for(let h=s;h!=o;h+=a)l.push([i[h].x.toNumber(),i[h].y.toNumber()]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){let t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var t,i;let r=this.events[0];for(let s=1,o=this.events.length;s<o;s++){let l=this.events[s];Gt.compare(r,l)>0&&(r=l)}let n=r.segment.prevInResult(),a=n?n.prevInResult():null;for(;;){if(!n)return null;if(!a)return n.ringOut;if(a.ringOut!==n.ringOut)return((t=a.ringOut)==null?void 0:t.enclosingRing())!==n.ringOut?n.ringOut:(i=n.ringOut)==null?void 0:i.enclosingRing();n=a.prevInResult(),a=n?n.prevInResult():null}}},na=class{constructor(e){ie(this,"exteriorRing"),ie(this,"interiorRings"),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 t=[e];for(let i=0,r=this.interiorRings.length;i<r;i++){let n=this.interiorRings[i].getGeom();n!==null&&t.push(n)}return t}},ws=class{constructor(e){ie(this,"rings"),ie(this,"polys"),this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,i=this.polys.length;t<i;t++){let r=this.polys[t].getGeom();r!==null&&e.push(r)}return e}_composePolys(e){var t;let i=[];for(let r=0,n=e.length;r<n;r++){let a=e[r];if(!a.poly)if(a.isExteriorRing())i.push(new na(a));else{let s=a.enclosingRing();s!=null&&s.poly||i.push(new na(s)),(t=s==null?void 0:s.poly)==null||t.addInterior(a)}}return i}},Ds=class{constructor(e,t=Nr.compare){ie(this,"queue"),ie(this,"tree"),ie(this,"segments"),this.queue=e,this.tree=new Ir(t),this.segments=[]}process(e){let t=e.segment,i=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),i;e.isLeft&&this.tree.add(t);let r=t,n=t;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do n=this.tree.firstAfter(n);while(n!=null&&n.consumedBy!=null);if(e.isLeft){let a=null;if(r){let o=r.getIntersection(t);
1if(o!==null&&(t.isAnEndpoint(o)||(a=o),!r.isAnEndpoint(o))){let l=this._splitSafely(r,o);for(let h=0,v=l.length;h<v;h++)i.push(l[h])}}let s=null;if(n){let o=n.getIntersection(t);if(o!==null&&(t.isAnEndpoint(o)||(s=o),!n.isAnEndpoint(o))){let l=this._splitSafely(n,o);for(let h=0,v=l.length;h<v;h++)i.push(l[h])}}if(a!==null||s!==null){let o=null;a===null?o=s:s===null?o=a:o=Gt.comparePoints(a,s)<=0?a:s,this.queue.delete(t.rightSE),i.push(t.rightSE);let l=t.split(o);for(let h=0,v=l.length;h<v;h++)i.push(l[h])}i.length>0?(this.tree.delete(t),i.push(e)):(this.segments.push(t),t.prev=r)}else{if(r&&n){let a=r.getIntersection(n);if(a!==null){if(!r.isAnEndpoint(a)){let s=this._splitSafely(r,a);for(let o=0,l=s.length;o<l;o++)i.push(s[o])}if(!n.isAnEndpoint(a)){let s=this._splitSafely(n,a);for(let o=0,l=s.length;o<l;o++)i.push(s[o])}}}this.tree.delete(t)}return i}_splitSafely(e,t){this.tree.delete(e);let i=e.rightSE;this.queue.delete(i);let r=e.split(t);return r.push(i),e.consumedBy===void 0&&this.tree.add(e),r}},Ps=class{constructor(){ie(this,"type"),ie(this,"numMultiPolys")}run(e,t,i){er.type=e;let r=[new ra(t,!0)];for(let l=0,h=i.length;l<h;l++)r.push(new ra(i[l],!1));if(er.numMultiPolys=r.length,er.type==="difference"){let l=r[0],h=1;for(;h<r.length;)wn(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1)}if(er.type==="intersection")for(let l=0,h=r.length;l<h;l++){let v=r[l];for(let b=l+1,O=r.length;b<O;b++)if(wn(v.bbox,r[b].bbox)===null)return[]}let n=new Ir(Gt.compare);for(let l=0,h=r.length;l<h;l++){let v=r[l].getSweepEvents();for(let b=0,O=v.length;b<O;b++)n.add(v[b])}let a=new Ds(n),s=null;for(n.size!=0&&(s=n.first(),n.delete(s));s;){let l=a.process(s);for(let h=0,v=l.length;h<v;h++){let b=l[h];b.consumedBy===void 0&&n.add(b)}n.size!=0?(s=n.first(),n.delete(s)):s=null}Yt.reset();let o=Bs.factory(a.segments);return new ws(o).getGeom()}},er=new Ps,zr=er,As=(e,...t)=>zr.run("intersection",e,t),Ss=(e,...t)=>zr.run("difference",e,t),Qs=Yt.set;function Ur(e){let t={type:"Feature"};return t.geometry=e,t}function Vr(e){return e.type==="Feature"?e.geometry:e}function aa(e){return e&&e.geometry&&e.geometry.coordinates?e.geometry.coordinates:e}function Fs(e){return Ur({type:"LineString",coordinates:e})}function Ts(e){return Ur({type:"MultiLineString",coordinates:e})}function sa(e){return Ur({type:"Polygon",coordinates:e})}function oa(e){return Ur({type:"MultiPolygon",coordinates:e})}function Rs(e,t){let i=Vr(e),r=Vr(t),n=As(i.coordinates,r.coordinates);return n.length===0?null:n.length===1?sa(n[0]):oa(n)}function Os(e,t){let i=Vr(e),r=Vr(t),n=Ss(i.coordinates,r.coordinates);return n.length===0?null:n.length===1?sa(n[0]):oa(n)}function ua(e){return Array.isArray(e)?1+ua(e[0]):-1}function Is(e){e instanceof L.Polyline&&(e=e.toGeoJSON(15));let t=aa(e),i=ua(t),r=[];return i>1?t.forEach(n=>{r.push(Fs(n))}):r.push(e),r}function js(e){let t=[];return e.eachLayer(i=>{t.push(aa(i.toGeoJSON(15)))}),Ts(t)}st.Cut=st.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 t=L.polygon(e,this.options.pathOptions);t._latlngInfos=this._layer._latlngInfo,this.cut(t),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:r,originalLayer:n})=>{this._fireCut(n,r,n),this._fireCut(this._map,r,n),n.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(e){let t=this._map._layers,i=e._latlngInfos||[];Object.keys(t).map(r=>t[r]).filter(r=>r.pm).filter(r=>!r._pmTempLayer).filter(r=>!L.PM.optIn&&!r.options.pmIgnore||L.PM.optIn&&r.options.pmIgnore===!1).filter(r=>r instanceof L.Polyline).filter(r=>r!==e).filter(r=>r.pm.options.allowCutting).filter(r=>this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0?this.options.layersToCut.indexOf(r)>-1:!0).filter(r=>!this._layerGroup.hasLayer(r)).filter(r=>
1{try{let n=!!ci(e.toGeoJSON(15),r.toGeoJSON(15)).features.length>0;return n||r instanceof L.Polyline&&!(r instanceof L.Polygon)?n:!!Rs(e.toGeoJSON(15),r.toGeoJSON(15))}catch(n){return r instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(r=>{let n;if(r instanceof L.Polygon){n=L.polygon(r.getLatLngs());let l=n.getLatLngs();i.forEach(h=>{if(h&&h.snapInfo){let{latlng:v}=h,b=this._calcClosestLayer(v,[n]);if(b&&b.segment&&b.distance<this.options.snapDistance){let{segment:O}=b;if(O&&O.length===2){let{indexPath:w,parentPath:N,newIndex:Y}=L.PM.Utils._getIndexFromSegment(l,O);(w.length>1?(0,cs.default)(l,N):l).splice(Y,0,v)}}}})}else n=r;let a=this._cutLayer(e,n),s=L.geoJSON(a,r.options);s.getLayers().length===1&&([s]=s.getLayers()),this._setPane(s,"layerPane");let o=s.addTo(this._map.pm._getContainingLayer());if(o.pm.enable(r.pm.options),o.pm.disable(),r._pmTempLayer=!0,e._pmTempLayer=!0,r.remove(),r.removeFrom(this._map.pm._getContainingLayer()),e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),o.getLayers&&o.getLayers().length===0&&this._map.pm.removeLayer({target:o}),o instanceof L.LayerGroup?(o.eachLayer(l=>{this._addDrawnLayerProp(l)}),this._addDrawnLayerProp(o)):this._addDrawnLayerProp(o),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let l=this.options.layersToCut.indexOf(r);l>-1&&this.options.layersToCut.splice(l,1)}this._editedLayers.push({layer:o,originalLayer:r})})},_cutLayer(e,t){let i=L.geoJSON(),r;if(t instanceof L.Polygon)r=Os(t.toGeoJSON(15),e.toGeoJSON(15));else{let n=Is(t);n.forEach(a=>{let s=Qa(a,e.toGeoJSON(15)),o;s&&s.features.length>0?o=L.geoJSON(s):o=L.geoJSON(a),o.getLayers().forEach(l=>{rs(e.toGeoJSON(15),l.toGeoJSON(15))||l.addTo(i)})}),n.length>1?r=js(i):r=i.toGeoJSON(15)}return r},_change:L.Util.falseFn}),st.Text=st.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(De("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(){var e;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),(e=this._hintMarker)==null||e.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,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 t=e;t.target=this._hintMarker,this._handleSnapping(t)}},_createMarker(e){var t,i,r,n,a,s;if(!e.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(e.latlng);let o=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),(t=this.options.textOptions)==null?void 0:t.className){let v=this.options.textOptions.className.split(" ");this.textArea.classList.add(...v)}let l=this._createTextIcon(this.textArea),h=new L.Marker(o,{textMarker:!0,_textMarkerOverPM:!0,icon:l});if(this._setPane(h,"markerPane"),this._finishLayer(h),h.pm||(h.options.draggable=!1),h.addTo(this._map.pm._getContainingLayer()),h.pm){h.pm.textArea=this.textArea,L.setOptions(h.pm,{removeIfEmpty:(r=(i=this.options.textOptions)==null?void 0:i.removeIfEmpty)!=null?r:!0});let v=(a=(n=this.options.textOptions)==null?void 0:n.focusAfterDraw)!=null?a:!0;h.pm._createTextMarker(v),(s=this.options.textOptions)!=null&&s.text&&h.pm.setText(this.options.textOptions.text)}this._fireCreate(h),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(e){this.enable(),this._hintMarker.setLatLng(e.latlng)}
1,_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 Gs={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,bi(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&&(bi(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,bi(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&&(bi(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 t=e.touches?e.touches[0]:e,i={originalEvent:t,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(t),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(e){let t=e.touches?e.touches[0]:e,i={originalEvent:t,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(t),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(e){let t={originalEvent:e.touches?e.touches[0]:e,target:this._layer};return e.type.indexOf("touch")===-1&&(t.containerPoint=this._map.mouseEventToContainerPoint(e),t.latlng=this._map.containerPointToLatLng(t.containerPoint)),this._dragMixinOnMouseUp(t),!1},_dragMixinOnMouseDown(e){if(e.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(e);let t=e._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",e);if(this._layer instanceof L.Marker&&(this.options.snappable&&!t&&!i?this._initSnappableMarkers():this._disableSnapping()),this._layer instanceof L.CircleMarker){let r="resizeableCircleMarker";this._layer instanceof L.Circle&&(r="resizeableCircle"),this.options.snappable&&!t&&!i?this._layer.pm.options[r]||this._initSnappableMarkersDrag():this._layer.pm.options[r]?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 t=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",e),this._dragging||(this._dragging=!0,L.DomUtil.addClass(t,"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 t=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,t&&L.DomUtil.removeClass(t,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0):!1},_onLayerDrag(e){let{latlng:t}
1=e,i={lat:t.lat-this._tempDragCoord.lat,lng:t.lng-this._tempDragCoord.lng},r=n=>n.map(a=>{if(Array.isArray(a))return r(a);let s={lat:a.lat+i.lat,lng:a.lng+i.lng};return(a.alt||a.alt===0)&&(s.alt=a.alt),s});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let n=r([this._layer.getLatLng()]);this._layer.setLatLng(n[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let n=this._layer.getLatLng();this._layer._snapped&&(n=this._layer._orgLatLng);let a=r([n]);this._layer.setLatLng(a[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let n=r([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(n),this._fireChange(this._layer.getBounds(),"Edit")}else{let n=r(this._layer.getLatLngs());this._layer.setLatLngs(n),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=t,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,t){if(this.enabled())return!1;if(!t._fromLayerSync&&this._layer===t.target&&this.options.syncLayersOnDrag){t._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(r=>{r instanceof L.LayerGroup&&(i=i.concat(r.pm.getLayers(!0)))});else if(this.options.syncLayersOnDrag===!0&&this._parentLayerGroup)for(let r in this._parentLayerGroup){let n=this._parentLayerGroup[r];n.pm&&(i=n.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(r=>!!r.pm).filter(r=>!!r.pm.options.draggable),i.forEach(r=>{r!==this._layer&&r.pm[e]&&(r._snapped=!1,r.pm[e](t))})),i.length>0}return!1},_stopDOMImageDrag(e){return e.preventDefault(),!1}},Ns=Gs,zs=pt(le());function Us(e,t,i,r){return i.unproject(t.transform(i.project(e,r)),r)}function la(e,t,i){let r=i.getMaxZoom();if(r===1/0&&(r=i.getZoom()),L.Util.isArray(e)){let n=[];return e.forEach(a=>{n.push(la(a,t,i))}),n}return e instanceof L.LatLng?Us(e,t,i,r):null}function Mi(e,t){t instanceof L.Layer&&(t=t.getLatLng());let i=e.getMaxZoom();return i===1/0&&(i=e.getZoom()),e.project(t,i)}function Kr(e,t){let i=e.getMaxZoom();return i===1/0&&(i=e.getZoom()),e.unproject(t,i)}var Vs={_onRotateStart(e){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=Mi(this._map,this._rotationOriginLatLng),this._rotationStartPoint=Mi(this._map,e.target.getLatLng()),this._initialRotateLatLng=Qt(this._layer),this._startAngle=this.getAngle();let t=Qt(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,t),this._fireRotationStart(this._map,t)},_onRotate(e){let t=Mi(this._map,e.target.getLatLng()),i=this._rotationStartPoint,r=this._rotationOriginPoint,n=Math.atan2(t.y-r.y,t.x-r.x)-Math.atan2(i.y-r.y,i.x-r.x);this._layer.setLatLngs(this._rotateLayer(n,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let a=this;function s(v,b=[],O=-1){if(O>-1&&b.push(O),L.Util.isArray(v[0]))v.forEach((w,N)=>s(w,b.slice(),N));else{let w=b.length>0?(0,zs.default)(a._markers,b):a._markers[0];v.forEach((N,Y)=>{w[Y].setLatLng(N)})}}s(this._layer.getLatLngs());let o=Qt(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(n,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let l=n*180/Math.PI;l=l<0?l+360:l;let h=l+this._startAngle;this._setAngle(h),this._rotationLayer.pm._setAngle(h),this._fireRotation(this._rotationLayer,l,o),this._fireRotation(this._map,l,o),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 t=Qt(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Qt(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,e,t),this._fireRotationEnd(this._map,e,t),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(e,t,i,r,n){let a=Mi(n,i);return this._matrix=r.clone().rotate(e,a).flip(),la(t,this._matrix,n)},_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),t=e.getCenter();return e.removeFrom(this._layer._map),t},enableRotate(){if(!this.options.allowRotation){this.disableRotate();return}this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&this._angle===void 0&&this.setInitAngle(fn(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 t=this.getAngle(),i=this._layer.getLatLngs(),r=e*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(r,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(r,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let n=this.getAngle()-t;n=n<0?n+360:n,this._startAngle=t,this._fireRotation(this._layer,n,i,this._layer),this._fireRotation(this._map||this._layer._map,n,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(e){let t=e-this.getAngle();this.rotateLayer(t)},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)}},Ks=Vs,qs=L.Class.extend({includes:[Ns,In,Ks,Dr],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,t){t==="layerPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":t==="vertexPane"?e.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":t==="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,t){let i=t.target,r={layer:this._layer,marker:i,event:t},n="";return e==="move"?n="moveVertexValidation":e==="add"?n="addVertexValidation":e==="remove"&&(n="removeVertexValidation"),this.options[n]&&typeof this.options[n]=="function"&&!this.options[n](r)?(e==="move"&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag(e){return e._cancelDragEventChain?(e._latlng=e._cancelDragEventChain,e.update(
1),!1):!0},_vertexValidationDragEnd(e){return e._cancelDragEventChain?(e._cancelDragEventChain=null,!1):!0}}),it=qs;it.LayerGroup=L.Class.extend({initialize(e){this._layerGroup=e,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(r=>this._initLayer(r));let t=r=>{if(r.layer._pmTempLayer)return;this._layers=this.getLayers();let n=this._layers.filter(a=>!a.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in a.pm._parentLayerGroup));n.forEach(a=>{this._initLayer(a)}),n.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(t,100,this),this),this._layerGroup.on("layerremove",r=>{this._removeLayerFromGroup(r.target)},this);let i=r=>{r.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(i,100,this),this)},enable(e,t=[]){t.length===0&&(this._layers=this.getLayers()),this._options=e,this._layers.forEach(i=>{i instanceof L.LayerGroup?t.indexOf(i._leaflet_id)===-1&&(t.push(i._leaflet_id),i.pm.enable(e,t)):i.pm.enable(e)})},disable(e=[]){e.length===0&&(this._layers=this.getLayers()),this._layers.forEach(t=>{t instanceof L.LayerGroup?e.indexOf(t._leaflet_id)===-1&&(e.push(t._leaflet_id),t.pm.disable(e)):t.pm.disable()})},enabled(e=[]){return e.length===0&&(this._layers=this.getLayers()),!!this._layers.find(t=>t instanceof L.LayerGroup?e.indexOf(t._leaflet_id)===-1?(e.push(t._leaflet_id),t.pm.enabled(e)):!1:t.pm.enabled())},toggleEdit(e,t=[]){t.length===0&&(this._layers=this.getLayers()),this._options=e,this._layers.forEach(i=>{i instanceof L.LayerGroup?t.indexOf(i._leaflet_id)===-1&&(t.push(i._leaflet_id),i.pm.toggleEdit(e,t)):i.pm.toggleEdit(e)})},_initLayer(e){let t=L.Util.stamp(this._layerGroup);e.pm._parentLayerGroup||(e.pm._parentLayerGroup={}),e.pm._parentLayerGroup[t]=this._layerGroup},_removeLayerFromGroup(e){if(e.pm&&e.pm._layerGroup){let t=L.Util.stamp(this._layerGroup);delete e.pm._layerGroup[t]}},dragging(){return this._layers=this.getLayers(),this._layers?!!this._layers.find(e=>e.pm.dragging()):!1},getOptions(){return this.options},_getMap(){var e;return this._map||((e=this._layers.find(t=>!!t._map))==null?void 0:e._map)||null},getLayers(e=!1,t=!0,i=!0,r=[]){let n=[];return e?this._layerGroup.getLayers().forEach(a=>{n.push(a),a instanceof L.LayerGroup&&r.indexOf(a._leaflet_id)===-1&&(r.push(a._leaflet_id),n=n.concat(a.pm.getLayers(!0,!0,!0,r)))}):n=this._layerGroup.getLayers(),i&&(n=n.filter(a=>!(a instanceof L.LayerGroup))),t&&(n=n.filter(a=>!!a.pm),n=n.filter(a=>!a._pmTempLayer),n=n.filter(a=>!L.PM.optIn&&!a.options.pmIgnore||L.PM.optIn&&a.options.pmIgnore===!1)),n},setOptions(e,t=[]){t.length===0&&(this._layers=this.getLayers()),this.options=e,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?t.indexOf(i._leaflet_id)===-1&&(t.push(i._leaflet_id),i.pm.setOptions(e,t)):i.pm.setOptions(e))})}}),it.Marker=it.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._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 t=e.target;t.remove(),this._fireRemove(t),this._fireRemove(this._map,t)},_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 ii=pt(le()),Hs={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((t,i,r)=>r.indexOf(t)===i)},_removeFromCache(e){let t=this.markerCache.indexOf(e);t>-1&&this.markerCache.splice(t,1)},renderLimits(e){this.markerCache.forEach(t=>{e.includes(t)?this._markerGroup.addLayer(t):this._markerGroup.removeLayer(t)})},applyLimitFilters({latlng:e={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let t=[...this._filterClosestMarkers(e)];this.renderLimits(t)},_filterClosestMarkers(e){let t=[...this.markerCache],i=this.options.limitMarkersToCount;return i===-1?t:(t.sort((r,n)=>{let a=r._latlng.distanceTo(e),s=n._latlng.distanceTo(e);return a-s}),t.filter((r,n)=>i>-1?n<i:!0))},_preventRenderMarkers:!1,_preventRenderingMarkers(e){this._preventRenderMarkers=!!e}},Ys=Hs;it.Line=it.extend({includes:[Ys],_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,t=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(e),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let i=r=>{if(Array.isArray(r[0]))return r.map(i,this);let n=r.map(this._createMarker,this);return this.options.hideMiddleMarkers!==!0&&r.map((a,s)=>{let o=this.isPolygon()?(s+1)%r.length:s+1;return this._createMiddleMarker(n[s],n[o])}),n};this._markers=i(t),this.filterMarkerGroup(),e.addLayer(this._markerGroup)},_createMarker(e){let t=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this.options.rotate?(t.on("dragstart",this._onRotateStart,this),t.on("drag",this._onRotate,this),t.on("dragend",this._onRotateEnd,this)):(t.on("click",this._onVertexClick,this),t.on("dragstart",this._onMarkerDragStart,this),t.on("move",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(t),t},_createMiddleMarker(e,t){if(!e||!t)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,e.getLatLng(),t.getLatLng()),r=this._createMarker(i),n=L.divIcon({className:"marker-icon marker-icon-middle"});return r.setIcon(n),r.leftM=e,r.rightM=t,e._middleMarkerNext=r,t._middleMarkerPrev=r,r.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),r.on("movestart",this._onMiddleMarkerMoveStart,this),r},_onMiddleMarkerClick(e){let t=e.target;if(!this._vertexValidation("add",e))return;let i=L.divIcon({className:"marker-icon"});t.setIcon(i),this._addMarker(t,t.leftM,t.rightM)},_onMiddleMarkerMoveStart(e){let t=e.target;if(t.on("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidation("add",e)){t.on("move",this._onMiddleMarkerMovePrevent,this);return}t._dragging=!0,this._addMarker(t,t.leftM,t.rightM)}
1,_onMiddleMarkerMovePrevent(e){let t=e.target;this._vertexValidationDrag(t)},_onMiddleMarkerMoveEnd(e){let t=e.target;if(t.off("move",this._onMiddleMarkerMovePrevent,this),t.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(t))return;let i=L.divIcon({className:"marker-icon"});t.setIcon(i),setTimeout(()=>{delete t._dragging},100)},_addMarker(e,t,i){e.off("movestart",this._onMiddleMarkerMoveStart,this),e.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let r=e.getLatLng(),n=this._layer._latlngs;delete e.leftM,delete e.rightM;let{indexPath:a,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),l=a.length>1?(0,ii.default)(n,o):n,h=a.length>1?(0,ii.default)(this._markers,o):this._markers;l.splice(s+1,0,r),h.splice(s+1,0,e),this._layer.setLatLngs(n),this.options.hideMiddleMarkers!==!0&&(this._createMiddleMarker(t,e),this._createMiddleMarker(e,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(e,L.PM.Utils.findDeepMarkerIndex(this._markers,e).indexPath,r),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return Sr(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(e){let t=this._layer,i,r;if(this.options.allowSelfIntersection?i=!1:(r=Sr(this._layer.toGeoJSON(15)),i=r.features.length>0),i){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return i;e?this._flashLayer():(t.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(r)}else t.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return i},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(e,t){e.forEach(i=>{Array.isArray(i)?this._updateDisabledMarkerStyle(i,t):i._icon&&(t&&!this._checkMarkerAllowedToDrag(i)?L.DomUtil.addClass(i._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(i._icon,"vertexmarker-disabled"))})},_removeMarker(e){let t=e.target;if(!this._vertexValidation("remove",e))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Qt(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:r,index:n,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);if(!r)return;let s=r.length>1?(0,ii.default)(i,a):i,o=r.length>1?(0,ii.default)(this._markers,a):this._markers,l=a[a.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!l&&(s.length<=2||this.isPolygon()&&s.length<=3)){this._flashLayer();return}s.splice(n,1),this._layer.setLatLngs(i),this.isPolygon()&&s.length<=2&&s.splice(0,s.length);let h=!1;if(s.length<=1&&(s.splice(0,s.length),a.length>1&&r.length>1&&(i=Pr(i)),this._layer.setLatLngs(i),this._initMarkers(),h=!0),dn(i)||this._layer.remove(),i=Pr(i),this._layer.setLatLngs(i),this._markers=Pr(this._markers),!h&&(o=r.length>1?(0,ii.default)(this._markers,a):this._markers,t._middleMarkerPrev&&(this._markerGroup.removeLayer(t._middleMarkerPrev),this._removeFromCache(t._middleMarkerPrev)),t._middleMarkerNext&&(this._markerGroup.removeLayer(t._middleMarkerNext),this._removeFromCache(t._middleMarkerNext)),this._markerGroup.removeLayer(t),this._removeFromCache(t),o)){let v,b;if(this.isPolygon()?(v=(n+1)%o.length,b=(n+(o.length-1))%o.length):(b=n-1<0?void 0:n-1,v=n+1>=o.length?void 0:n+1),v!==b){let O=o[b],w=o[v];this.options.hideMiddleMarkers!==!0&&this._createMiddleMarker(O,w)}o.splice(n,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(t,r),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(e){let t=this._layer.getLatLngs(),i=e.getLatLng(),{indexPath:r,index:n,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);(r.length>1?(0,ii.default)(t,a):t).splice(n,1,i),this._layer.setLatLngs(t)},_getNeighborMarkers(e){let{indexPath:t,index:i,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=t.length>1?(0,ii.default)(this._markers,r):this._markers,a=(i+1)%n.length,s=(i+(n.length-1))%n.length,o=n[s],l=n[a];return{prevMarker:o,nextMarker:l}},_checkMarkerAllowedToDrag(e){let{prevMarker:t,nextMarker:i}=this._getNeighborMarkers(e),r=L.polyline([t.getLatLng(),e.getLatLng()]),n=L.polyline([e.getLatLng(),i.getLatLng()]),a=ci(this._layer.toGeoJSON(1
15),r.toGeoJSON(15)).features.length,s=ci(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length;return e.getLatLng()===this._markers[0][0].getLatLng()?s+=1:e.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(a+=1),!(a<=2&&s<=2)},_onMarkerDragStart(e){let t=e.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);this._fireMarkerDragStart(e,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Qt(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(t):this._markerAllowedToDrag=null},_onMarkerDrag(e){let t=e.target;if(!this._vertexValidationDrag(t))return;let{indexPath:i,index:r,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);if(!i)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(t);let a=i.length>1?(0,ii.default)(this._markers,n):this._markers,s=(r+1)%a.length,o=(r+(a.length-1))%a.length,l=t.getLatLng(),h=a[o].getLatLng(),v=a[s].getLatLng();if(t._middleMarkerNext){let b=L.PM.Utils.calcMiddleLatLng(this._map,l,v);t._middleMarkerNext.setLatLng(b)}if(t._middleMarkerPrev){let b=L.PM.Utils.calcMiddleLatLng(this._map,l,h);t._middleMarkerPrev.setLatLng(b)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(e,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(e){let t=e.target;if(!this._vertexValidationDragEnd(t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),r=!this.options.allowSelfIntersection&&this.hasSelfIntersection();r&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(r=!1);let n=!this.options.allowSelfIntersection&&r;if(this._fireMarkerDragEnd(e,i,n),n){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(e,i);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(e){let t=e.target;if(t._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);this._fireVertexClick(e,i)}}),it.Polygon=it.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(e){let{prevMarker:t,nextMarker:i}=this._getNeighborMarkers(e),r=L.polyline([t.getLatLng(),e.getLatLng()]),n=L.polyline([e.getLatLng(),i.getLatLng()]),a=ci(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.length,s=ci(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length;return!(a<=2&&s<=2)}}),it.Rectangle=it.Polygon.extend({_shape:"Rectangle",_initMarkers(){let e=this._map,t=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]=t.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((i,r)=>{let n=this._cornerMarkers.find(a=>a._index===r);n&&n.setLatLng(i)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(e,t){let i=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=e,i._index=t,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_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 t=e.target,i=this._cornerMarkers;t._oppositeCornerLatLng=i.find(n=>n._index===(t._index+2)%4).getLatLng(),t._snapped=!1;let{indexPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);this._fireMarkerDragStart(e,r)},_onMarkerDrag(e){let t=e.target;if(!this._vertexValidationDrag(t)||t._index===void 0)return;this._adjustRectangleForMarkerMove(t);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);this._fireMarkerDrag(e,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(e){let t=e.target;if(!this._vertexValidationDragEnd(t))return;
1this._cornerMarkers.forEach(r=>{delete r._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);this._fireMarkerDragEnd(e,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(e){L.extend(e._origLatLng,e._latlng);let t=L.PM.Utils._getRotatedRectangle(e.getLatLng(),e._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(t),this._adjustAllMarkers(e),this._layer.redraw()},_adjustAllMarkers(e){let t=this._layer.getLatLngs()[0];if(t&&t.length!==4&&t.length>0)t.forEach((i,r)=>{this._cornerMarkers[r].setLatLng(i)}),this._cornerMarkers.slice(t.length).forEach(i=>{i.setLatLng(t[0])});else if(!t||!t.length)console.error("The layer has no LatLngs");else{let i=t.findIndex(r=>e.getLatLng().equals(r));i>-1?(this._cornerMarkers[(e._index+1)%4].setLatLng(t[(i+1)%4]),this._cornerMarkers[(e._index+2)%4].setLatLng(t[(i+2)%4]),this._cornerMarkers[(e._index+3)%4].setLatLng(t[(i+3)%4])):this._cornerMarkers.forEach(r=>{r.setLatLng(t[r._index])})}},_findCorners(){this._angle===void 0&&this.setInitAngle(fn(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)}}),it.CircleMarker=it.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 t=this._layer.getLatLng(),i=this._layer._radius,r=this._getLatLngOnCircle(t,i);this._centerMarker=this._createCenterMarker(t),this._outerMarker=this._createOuterMarker(r),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(e,t){let i=this._map.project(e),r=L.point(i.x+t,i.y);return this._map.unproject(r)},_createHintLine(e,t){let i=e.getLatLng(),r=t.getLatLng();this._hintline=L.polyline([i,r],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(e){let t=this._createMarker(e);return this.options.draggable?(L.DomUtil.addClass(t._icon,"leaflet-pm-draggable"),t.on("move",this._moveCircle,this)):t.dragging.disable(),t},_createOuterMarker(e){let t=this._createMarker(e);return t.on("drag",this._resizeCircle,this),t},_createMarker(e){let t=new L.Marker(e,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(t,"vertexPane"),t._origLatLng=e,t._pmTempLayer=!0,t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),t.on("click",this._onVertexClick,this),this._helperLayers.addLayer(t),t},_moveCircle(e){if(e.target._cancelDragEventChain)return;let t=this._centerMarker.getLatLng();this._layer.setLatLng(t);let i=this._layer._radius,r=this._getLatLngOnCircle(t,i);
1this._outerMarker._latlng=r,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let e=this._layer.getLatLng(),t=this._layer._radius,i=this._getLatLngOnCircle(e,t);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(e),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let e=this._centerMarker.getLatLng(),t=this._outerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let e=this._centerMarker.getLatLng(),t=this._outerMarker.getLatLng();this._hintline.setLatLngs([e,t])},_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 t=e.target;t instanceof L.Marker&&!this._vertexValidationDrag(t)||this._fireMarkerDrag(e)},_onMarkerDragEnd(e){this._extedingMarkerDragEnd();let t=e.target;this._vertexValidationDragEnd(t)&&(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 t=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),e,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(t);let r=e&&e.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!r).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!r),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let e=this._centerMarker.getLatLng(),t=this._outerMarker.getLatLng(),i=this._distanceCalculation(e,t);return this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?t=Ar(this._map,e,t,this._getMinDistanceInMeter(e)):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(t=Ar(this._map,e,t,this._getMaxDistanceInMeter(e))),t},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let e=this._centerMarker.getLatLng(),t=this._outerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(e,t){return this._map.project(e).distanceTo(this._map.project(t))},_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)}}),it.Circle=it.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,t){return this._map.distance(e,t)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(e){e.target._dragging||this._fireVertexClick(e,void 0)}}),it.ImageOverlay=it.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(),t=e.getNorthWest(),i=e.getNorthEast(),r=e.getSouthEast(),n=e.getSouthWest
1();return[t,i,r,n]}}),it.Text=it.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),L.DomEvent.off(document,"click",this._documentClick,this),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,t=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${e}px`,this.textArea.style.width=`${t}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(e){e.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(e={}){let t=this._hasFocus;this._hasFocus=e.type==="focus",!t!=!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 t=this.options.className.split(" ");this.textArea.classList.add(...t)}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 Dn=function(e,t,i,r,n,a){this._matrix=[e,t,i,r,n,a]};Dn.init=()=>new L.PM.Matrix(1,0,0,1,0,0),Dn.prototype={transform(e){return this._transform(e.clone())},_transform(e){let t=this._matrix,{x:i,y:r}=e;return e.x=t[0]*i+t[1]*r+t[4],e.y=t[2]*i+t[3]*r+t[5],e},untransform(e){let t=this._matrix;return new L.Point((e.x/t[0]-t[4])/t[0],(e.y/t[2]-t[5])/t[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 t,i;return typeof e=="number"?(t=e,i=e):(t=e.x,i=e.y),this._add(1,0,0,1,t,i)},scale(e,t){if(e===void 0)return new L.Point(this._matrix[0],this._matrix[3]);let i,r;return t=t||L.point(0,0),typeof e=="number"?(i=e,r=e):(i=e.x,r=e.y),this._add(i,0,0,r,t.x,t.y)._add(1,0,0,1,-t.x,-t.y)},rotate(e,t){let i=Math.cos(e),r=Math.sin(e);return t=t||new L.Point(0,0),this._add(i,r,-r,i,t.x,t.y)._add(1,0,0,1,-t.x,-t.y)}
1,flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(e,t,i,r,n,a){let s=[[],[],[]],o=this._matrix,l=[[o[0],o[2],o[4]],[o[1],o[3],o[5]],[0,0,1]],h=[[e,i,n],[t,r,a],[0,0,1]],v;e&&e instanceof L.PM.Matrix&&(o=e._matrix,h=[[o[0],o[2],o[4]],[o[1],o[3],o[5]],[0,0,1]]);for(let b=0;b<3;b+=1)for(let O=0;O<3;O+=1){v=0;for(let w=0;w<3;w+=1)v+=l[b][w]*h[w][O];s[b][O]=v}return this._matrix=[s[0][0],s[1][0],s[0][1],s[1][1],s[0][2],s[1][2]],this}};var Js=Dn,Xs={calcMiddleLatLng(e,t,i){let r=e.project(t),n=e.project(i);return e.unproject(r._add(n)._divideBy(2))},findLayers(e){let t=[];return e.eachLayer(i=>{(i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.Circle||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&t.push(i)}),t=t.filter(i=>!!i.pm),t=t.filter(i=>!i._pmTempLayer),t=t.filter(i=>!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1),t},circleToPolygon(e,t=60,i=!0){let r=e.getLatLng(),n=e.getRadius(),a=Rn(r,n,t,0,i),s=[];for(let o=0;o<a.length;o+=1){let l=[a[o].lat,a[o].lng];s.push(l)}return L.polygon(s,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,t,i,r=!1){e.fire(t,i,r);let{groups:n}=this.getAllParentGroups(e);n.forEach(a=>{a.fire(t,i,r)})},getAllParentGroups(e){let t=[],i=[],r=n=>{for(let a in n._eventParents)if(t.indexOf(a)===-1){t.push(a);let s=n._eventParents[a];i.push(s),r(s)}};return!e._pmLastGroupFetch||!e._pmLastGroupFetch.time||new Date().getTime()-e._pmLastGroupFetch.time>1e3?(r(e),e._pmLastGroupFetch={time:new Date().getTime(),groups:i,groupIds:t},{groupIds:t,groups:i}):{groups:e._pmLastGroupFetch.groups,groupIds:e._pmLastGroupFetch.groupIds}},createGeodesicPolygon:Rn,getTranslation:De,findDeepCoordIndex(e,t,i=!0){let r,n=s=>(o,l)=>{let h=s.concat(l);if(i){if(o.lat&&o.lat===t.lat&&o.lng===t.lng)return r=h,!0}else if(o.lat&&L.latLng(o).equals(t))return r=h,!0;return Array.isArray(o)&&o.some(n(h))};e.some(n([]));let a={};return r&&(a={indexPath:r,index:r[r.length-1],parentPath:r.slice(0,r.length-1)}),a},findDeepMarkerIndex(e,t){let i,r=a=>(s,o)=>{let l=a.concat(o);return s._leaflet_id===t._leaflet_id?(i=l,!0):Array.isArray(s)&&s.some(r(l))};e.some(r([]));let n={};return i&&(n={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),n},_getIndexFromSegment(e,t){if(t&&t.length===2){let i=this.findDeepCoordIndex(e,t[0]),r=this.findDeepCoordIndex(e,t[1]),n=Math.max(i.index,r.index);return(i.index===0||r.index===0)&&n!==1&&(n+=1),{indexA:i,indexB:r,newIndex:n,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(e,t,i,r){let n=Mi(r,e),a=Mi(r,t),s=i*Math.PI/180,o=Math.cos(s),l=Math.sin(s),h=(a.x-n.x)*o+(a.y-n.y)*l,v=(a.y-n.y)*o-(a.x-n.x)*l,b=h*o+n.x,O=h*l+n.y,w=-v*l+n.x,N=v*o+n.y,Y=Kr(r,n),te=Kr(r,{x:b,y:O}),Me=Kr(r,a),m=Kr(r,{x:w,y:N});return[Y,te,Me,m]},pxRadiusToMeterRadius(e,t,i){let r=t.project(i),n=L.point(r.x+e,r.y);return t.distance(t.unproject(n),i)}},$s=Xs;L.PM=L.PM||{version:Le.version,Map:Ma,Toolbar:wa,Draw:st,Edit:it,Utils:$s,Matrix:Js,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 t(){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(t);function i(){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(i);function r(){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(r);function n(){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(n);function a(){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(a);function s(){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(s);function o(){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(o);function l(){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(l)},reInitLayer(e){e instanceof L.LayerGroup&&e.eachLayer(t=>{this.reInitLayer(t)}),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 t=this._map.mouseEventToLayerPoint(e),i,r;for(let n=this._drawFirst;n;n=n.next)i=n.layer,i.options.interactive&&i._containsPoint(t)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(i))&&(r=i);r&&(L.DomEvent.fakeStop(e),this._fireEvent([r],e))}}),L.PM.initialize()})()},31572:function(St){/*! JsRender v1.2.0: http://jsviews.com/#jsrender *//*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */(function(lt,se){var ht=se.jQuery;St.exports=ht?lt(se,ht):function(ve){if(ve&&!ve.fn)throw"Provide jQuery or null";return lt(se,ve)}})(function(lt,se){"use strict";var ht=se===!1;se=se&&se.fn?se:lt.jQuery;var ve="v1.2.0",Ie,Ke,yt,rt,Ye,xt,ri="_ocp",Fe=function(c){return typeof c=="function"},Qe=Array.isArray,ie,He,Ne,Je,xe,Ue,zt,vt,ni,z,Ut,pt,Jt,ai,xi,Xt,Ei=/[ \t]*(\r\n|\n|\r)/g,nr=/\\(['"\\])/g,ar=/['"\\]/g,gi=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Yr=/^if\s/,Jr=/<(\w+)[>\s]/,Xr=/[\x00`><"'&=]/g,$r=/[\x00`><\"'&=]/,Bi=/^on[A-Z]|^convert(Back)?$/,$t=/^\#\d+_`[\s\S]*\/\d+_`$/,wi=Xr,Zr=/[&<>]/g,Wr=/&(amp|gt|lt);/g,si=/\[['"]?|['"]?\]/g,Vt=0,_i={"&":"&amp;","<":"&lt;",">":"&gt;","\0":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;","=":"&#61;"},Qr={amp:"&",gt:">",lt:"<"},mi="html",ze="string",Di="object",Pi="data-jsv-tmpl",Ft="jsvTmpl",Ai="For #index in nested block use #getIndex().",Zt={},Si={},yi=lt.jsrender,en=yi&&se&&!se.render,Fi={template:{compile:Gi},tag:{compile:on},viewModel:{compile:ln},helper:{},converter:{}};Ye={jsviews:ve,sub:{rPath:/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\
vendor: 25,787 bytes, lines 1-36
1w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,rPrm:/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(?:(\()\s*)?\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:Wt,Err:Ii,tmplFn:yr,parse:Lr,extend:Xe,extendCtx:Rt,syntaxErr:ct,onStore:{template:function(c,y){y===null?delete Si[c]:c&&(Si[c]=y)}},addSetting:zi,settings:{allowCode:!1},advSet:Tt,_thp:Ri,_gm:Ti,_tg:function(){},_cnvt:rn,_tag:an,_er:mt,_err:mr,_cp:Oi,_sq:function(c){return c==="constructor"&&ct(""),c}},settings:{delimiters:or,advanced:function(c){return c?(Xe(zt,c),xe.advSet(),vt):zt}},map:li};function sr(c,y){return function(){var M,R=this,S=R.base;return R.base=c,M=y.apply(R,arguments),R.base=S,M}}function Ti(c,y){return Fe(y)&&(y=sr(c?c._d?c:sr(Tt,c):Tt,y),y._d=(c&&c._d||0)+1),y}function Ri(c,y){var M,R=y.props;for(M in R)Bi.test(M)&&!(c[M]&&c[M].fix)&&(c[M]=M!=="convert"?Ti(c.constructor.prototype[M],R[M]):R[M])}function Oi(c){return c}function Tt(){return""}function tn(c){try{throw console.log("JsRender dbg breakpoint: "+c),"dbg breakpoint"}catch(y){}return this.base?this.baseApply(arguments):c}function Ii(c){this.name=(se.link?"JsViews":"JsRender")+" Error",this.message=c||this.name}function Xe(c,y){if(c){for(var M in y)M!=="__proto__"&&(c[M]=y[M]);return c}}(Ii.prototype=new Error).constructor=Ii;function or(c,y,M){return c?Array.isArray(c)?or.apply(Ye,c):(Jt=M?M[0]:Jt,/^(\W|_){5}$/.test(c+y+Jt)||mt("Invalid delimiters"),ni=c[0],z=c[1],Ut=y[0],pt=y[1],Ue.delimiters=[ni+z,Ut+pt,Jt],c="\\"+ni+"(\\"+Jt+")?\\"+z,y="\\"+Ut+"\\"+pt,Ke="(?:(\\w+(?=[\\/\\s\\"+Ut+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+Ut+"]|\\"+Ut+"(?!\\"+pt+"))*?)",xe.rTag="(?:"+Ke+")",Ke=new RegExp("(?:"+c+Ke+"(\\/)?|\\"+ni+"(\\"+Jt+")?\\"+z+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+y,"g"),xe.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+c+".*"+y),vt):Ue.delimiters}function ur(c,y){!y&&c!==!0&&(y=c,c=void 0);var M,R,S,P,G=this,A=y==="root";if(c){if(P=y&&G.type===y&&G,!P)if(M=G.views,G._.useKey){for(R in M)if(P=y?M[R].get(c,y):M[R])break}else for(R=0,S=M.length;!P&&R<S;R++)P=y?M[R].get(c,y):M[R]}else if(A)P=G.root;else if(y)for(;G&&!P;)P=G.type===y?G:void 0,G=G.parent;else P=G.parent;return P||void 0}function lr(){var c=this.get("item");return c?c.index:void 0}lr.depends=function(){return[this.get("item"),"index"]};function hr(){return this.index}hr.depends="index";function ji(c,y,M,R){var S,P,G,A=0;if(M===1&&(R=1,M=void 0),y)for(P=y.split("."),G=P.length;c&&A<G;A++)S=c,c=P[A]?c[P[A]]:c,Fe(c)&&(c=c.call(S));return M&&(M.lt=M.lt||A<G),c===void 0?R?Tt:"":R?function(){return c.apply(S,arguments)}:c}function oi(c,y,M){var R,S,P,G,A,U,K,H=this,ne=!Xt&&arguments.length>1,J=H.ctx;if(c){if(H._||(A=H.index,H=H.tag),U=H,J&&J.hasOwnProperty(c)||(J=Ne).hasOwnProperty(c)){if(P=J[c],c==="tag"||c==="tagCtx"||c==="root"||c==="parentTags")return P}else J=void 0;if((!Xt&&H.tagCtx||H.linked)&&((!P||!P._cxp)&&(H=H.tagCtx||Fe(P)?H:(H=H.scope||H,!H.isTop&&H.ctx.tag||H),P!==void 0&&H.tagCtx&&(H=H.tagCtx.view.scope),J=H._ocps,P=J&&J.hasOwnProperty(c)&&J[c]||P,!(P&&P._cxp)&&(M||ne)&&((J||(H._ocps=H._ocps||{}))[c]=P=[{_ocp:P,_vw:U,_key:c}],P._cxp={path:ri,ind:0,updateValue:function(pe,q){return se.observable(P[0]).setProperty(ri,pe),this}})),G=P&&P._cxp)){if(arguments.length>2)return S=P[1]?xe._ceo(P[1].deps):[ri],S.unshift(P[0]),S._cxp=G,S;if(A=G.tagElse,K=P[1]?G.tag&&G.tag.cvtArgs?G.tag.cvtArgs(A,1)[G.ind]:P[1](P[0].data,P[0],xe):P[0]._ocp,ne)return xe._ucp(c,y,H,G),H;P=K}return P&&Fe(P)&&(R=function(){return P.apply(!this||this===lt?U:this,arguments)},Xe(R,P)),R||P}}function pr(c){return c&&(c.fn?c:this.getRsc("templates",c)||ie(c))}function rn(c,y,M,R){var S,P,G,A,U,K=typeof M=="number"&&y.tmpl.bnds[M-1];if(R===void 0&&K&&K._lr&&(R=""),R!==void 0?M=R={props:{},args:[R]}:K&&(M=K(y.data,y,xe)),K=K._bd&&K,c||K){if(P=y._lc,S=P&&P.tag,M.view=y,!S){if(S=Xe(new xe._tg,{_:{bnd:K,unlinked:!0,lt:M.lt},inline:!P,tagName:":",convert:c,onArrayChange:!0,flow:!0,tagCtx:M,tagCtxs:[M],_is:"tag"}),A=M.args.length,A>1)for(U=S.bindTo=[];A--;)U.unshift(A);P&&(P.tag=S,S.linkCtx=P),M.ctx=Rt(M.ctx,(P?P.view:y).ctx),Ri(S,M)}S._er=R&&G,S.ctx=M.ctx||S.ctx||{},M.ctx=void 0,G=S.cvtArgs()[0],S._er=R&&G}else G=M.args[0];return G=K&&y._.onRender?y._.onRender(G,y,S):G,G!=null?G:""}function cr(c,y){var M,R,S,P,G,A,U,K=this;if(K.tagName){if(A=K,K=(A.tagCtxs||[K])[c||0],!K)return}else A=K.tag;if(G=A.bindFrom,P=K.args,(U=A.convert)&&typeof U===ze&&(U=U==="true"?void 0:K.view.getRsc("converters",U)||mt("Unknown converter: '"+U+"'")),U&&!y&&(P=P.slice()),G){for(S=[],M=G.length;M--;)R=G[M],S.unshift(dr(K,R));y&&(P=S)}if(U){if(U=U.apply(A,S||P),U===void 0)return P;if(G=G||[0],M=G.length,(!Qe(U)||U.arg0!==!1&&(M===1||U.length!==M||U.arg0))&&(U=[U],G=[0],M=1),y)P=U;else for(;M--;)R=G[M],+R===R&&(P[R]=U[M])}return P}function dr(c,y){return c=c[+y===y?"args":"props"],c&&c[y]}function fr(c){return this.cvtArgs(c,1)}function nn(c,y){var M,R,S=this;if(typeof y===ze){for(;M===void 0&&S;)R=S.tmpl&&S.tmpl[c],M=R&&R[y],S=S.parent;return M||Ye[c][y]}}function an(c,y,M,R,S,P){function G(Kt){var We=A[Kt];if(We!==void 0)for(We=Qe(We)?We:[We],q=We.length;q--;)Ge=We[q],isNaN(parseInt(Ge))||(We[q]=parseInt(Ge));return We||[0]}y=y||rt;var A,U,K,H,ne,J,pe,q,oe,W,Q,de,fe,Ee,X,le,Z,Ce,me,ge,he,Le,re,Be,je,Ge,$e,Oe,ce,we,be=0,_e="",Se=y._lc||!1,Ze=y.ctx,Lt=M||y.tmpl,nt=typeof R=="number"&&y.tmpl.bnds[R-1];for(c._is==="tag"?(A=c,c=A.tagName,R=A.tagCtxs,K=A.template):(U=y.getRsc("tags",c)||mt("Unknown tag: {{"+c+"}} "),K=U.template),P===void 0&&nt&&(nt._lr=U.lateRender&&nt._lr!==!1||nt._lr)&&(P=""),P!==void 0?(_e+=P,R=P=[{props:{},args:[],params:{props:{}}}]):nt&&(R=nt(y.data,y,xe)),pe=R.length;be<pe;be++)Q=R[be],Z=Q.tmpl,(!Se||!Se.tag||be&&!Se.tag.inline||A._er||Z&&+Z===Z)&&(Z&&Lt.tmpls&&(Q.tmpl=Q.content=Lt.tmpls[Z-1]),Q.index=be,Q.ctxPrm=oi,Q.render=Ui,Q.cvtArgs=cr,Q.bndArgs=fr,Q.view=y,Q.ctx=Rt(Rt(Q.ctx,U&&U.ctx),Ze)),(M=Q.props.tmpl)&&(Q.tmpl=y._getTmpl(M),Q.content=Q.content||Q.tmpl),A?Se&&Se.fn._lr&&(Ce=!!A.init):(A=new U._ctr,Ce=!!A.init,A.parent=J=Ze&&Ze.tag,A.tagCtxs=R,Se&&(A.inline=!1,Se.tag=A),A.linkCtx=Se,(A._.bnd=nt||Se.fn)?(A._.ths=Q.params.props.this,A._.lt=R.lt,A._.arrVws={}):A.dataBoundOnly&&mt(c+` must be data-bound:
2{^{`+c+"}}")),Be=A.dataMap,Q.tag=A,Be&&R&&(Q.map=R[be].map),A.flow||(de=Q.ctx=Q.ctx||{},H=A.parents=de.parentTags=Ze&&Rt(de.parentTags,Ze.parentTags)||{},J&&(H[J.tagName]=J),H[A.tagName]=de.tag=A,de.tagCtx=Q);if(!(A._er=P)){for(Ri(A,R[0]),A.rendering={rndr:A.rendering},be=0;be<pe;be++){if(Q=A.tagCtx=R[be],re=Q.props,A.ctx=Q.ctx,!be){if(Ce&&(A.init(Q,Se,A.ctx),Ce=void 0),!Q.args.length&&Q.argDefault!==!1&&A.argDefault!==!1&&(Q.args=he=[Q.view.data],Q.params.args=["#data"]),Ee=G("bindTo"),A.bindTo!==void 0&&(A.bindTo=Ee),A.bindFrom!==void 0?A.bindFrom=G("bindFrom"):A.bindTo&&(A.bindFrom=A.bindTo=Ee),X=A.bindFrom||Ee,Oe=Ee.length,$e=X.length,A._.bnd&&(ce=A.linkedElement)&&(A.linkedElement=ce=Qe(ce)?ce:[ce],Oe!==ce.length&&mt("linkedElement not same length as bindTo")),(ce=A.linkedCtxParam)&&(A.linkedCtxParam=ce=Qe(ce)?ce:[ce],$e!==ce.length&&mt("linkedCtxParam not same length as bindFrom/bindTo")),X)for(A._.fromIndex={},A._.toIndex={},oe=$e;oe--;)for(Ge=X[oe],q=Oe;q--;)Ge===Ee[q]&&(A._.fromIndex[q]=oe,A._.toIndex[oe]=q);Se&&(Se.attr=A.attr=Se.attr||A.attr||Se._dfAt),ne=A.attr,A._.noVws=ne&&ne!==mi}if(he=A.cvtArgs(be),A.linkedCtxParam)for(Le=A.cvtArgs(be,1),q=$e,we=A.constructor.prototype.ctx;q--;)(fe=A.linkedCtxParam[q])&&(Ge=X[q],le=Le[q],Q.ctx[fe]=xe._cp(we&&le===void 0?we[fe]:le,le!==void 0&&dr(Q.params,Ge),Q.view,A._.bnd&&{tag:A,cvt:A.convert,ind:q,tagElse:be}));(me=re.dataMap||Be)&&(he.length||re.dataMap)&&(ge=Q.map,(!ge||ge.src!==he[0]||S)&&(ge&&ge.src&&ge.unmap(),me.map(he[0],Q,ge,!A._.bnd),ge=Q.map),he=[ge.tgt]),W=void 0,A.render&&(W=A.render.apply(A,he),y.linked&&W&&!$t.test(W)&&(M={links:[]},M.render=M.fn=function(){return W},W=_r(M,y.data,void 0,!0,y,void 0,void 0,A))),he.length||(he=[y]),W===void 0&&(je=he[0],A.contentCtx&&(je=A.contentCtx===!0?y:A.contentCtx(je)),W=Q.render(je,!0)||(S?void 0:"")),_e=_e?_e+(W||""):W!==void 0?""+W:void 0}A.rendering=A.rendering.rndr}return A.tagCtx=R[0],A.ctx=A.tagCtx.ctx,A._.noVws&&A.inline&&(_e=ne==="text"?He.html(_e):""),nt&&y._.onRender?y._.onRender(_e,y,A):_e}function Wt(c,y,M,R,S,P,G,A){var U,K,H,ne,J=this,pe=y==="array";J.content=A,J.views=pe?[]:{},J.data=R,J.tmpl=S,ne=J._={key:0,useKey:pe?0:1,id:""+Vt++,onRender:G,bnds:{}},J.linked=!!G,J.type=y||"top",y&&(J.cache={_ct:Ue._cchCt}),(!M||M.type==="top")&&((J.ctx=c||{}).root=J.data),(J.parent=M)?(J.root=M.root||J,U=M.views,K=M._,J.isTop=K.scp,J.scope=(!c.tag||c.tag===M.ctx.tag)&&!J.isTop&&M.scope||J,K.useKey?(U[ne.key="_"+K.useKey++]=J,J.index=Ai,J.getIndex=lr):U.length===(ne.key=J.index=P)?U.push(J):U.splice(P,0,J),J.ctx=c||M.ctx):y&&(J.root=J)}Wt.prototype={get:ur,getIndex:hr,ctxPrm:oi,getRsc:nn,_getTmpl:pr,_getOb:ji,getCache:function(c){return Ue._cchCt>this.cache._ct&&(this.cache={_ct:Ue._cchCt}),this.cache[c]!==void 0?this.cache[c]:this.cache[c]=Zt[c](this.data,this,xe)},_is:"view"};function sn(c){var y,M,R;for(y in Fi)M=y+"s",c[M]&&(R=c[M],c[M]={},Ye[M](R,c))}function on(c,y,M){var R,S,P,G=new xe._tg;function A(){var U=this;U._={unlinked:!0},U.inline=!0,U.tagName=c}if(Fe(y)?y={depends:y.depends,render:y}:typeof y===ze&&(y={template:y}),S=y.baseTag){y.flow=!!y.flow,S=typeof S===ze?M&&M.tags[S]||Je[S]:S,S||mt('baseTag: "'+y.baseTag+'" not found'),G=Xe(G,S);for(P in y)G[P]=Ti(S[P],y[P])}else G=Xe(G,y);return(R=G.template)!==void 0&&(G.template=typeof R===ze?ie[R]||ie(R):R),(A.prototype=G).constructor=G._ctr=A,M&&(G._parentTmpl=M),G}function gr(c){return this.base.apply(this,c)}function Gi(c,y,M,R){function S(U){var K,H;if(typeof U===ze||U.nodeType>0&&(P=U)){if(!P&&(/^\.?\/[^\\:*?"<>]*$/.test(U)?(H=ie[c=c||U])?U=H:P=document.getElementById(U):U.charAt(0)==="#"&&(P=document.getElementById(U.slice(1))),!P&&se.fn&&!xe.rTmpl.test(U)))try{P=se(U,document)[0]}catch(ne){}P&&(P.tagName!=="SCRIPT"&&mt(U+": Use script block, not "+P.tagName),R?U=P.innerHTML:(K=P.getAttribute(Pi),K&&(K!==Ft?(U=ie[K],delete ie[K]):se.fn&&(U=se.data(P)[Ft])),(!K||!U)&&(c=c||(se.fn?Ft:U),U=Gi(c,P.innerHTML,M,R)),U.tmplName=c=c||K,c!==Ft&&(ie[c]=U),P.setAttribute(Pi,c),se.fn&&se.data(P,Ft,U))),P=void 0}else U.fn||(U=void 0);return U}var P,G,A=y=y||"";if(xe._html=He.html,R===0&&(R=void 0,A=S(A)),R=R||(y.markup?y.bnds?Xe({},y):y:{}),R.tmplName=R.tmplName||c||"unnamed",M&&(R._parentTmpl=M),!A&&y.markup&&(A=S(y.markup))&&A.fn&&(A=A.markup),A!==void 0)return A.render||y.render?A.tmpls&&(G=A):(y=Ni(A,R),yr(A.replace(ar,"\\$&"),y)),G||(G=Xe(function(){return G.render.apply(G,arguments)},y),sn(G)),G}function un(c,y){return Fe(c)?c.call(y):c}function Et(c,y,M){Object.defineProperty(c,y,{value:M,configurable:!0})}function ln(c,y){var M,R,S,P=this,G=y.getters,A=y.extend,U=y.id,K=se.extend({_is:c||"unnamed",unmap:Ee,merge:fe},A),H="",ne="",J=G?G.length:0,pe=se.observable,q={};function oe(X){R.apply(this,X)}function W(){return new oe(arguments)}function Q(X,le){for(var Z,Ce,me,ge,he,Le=0;Le<J;Le++)me=G[Le],Z=void 0,typeof me!==ze&&(Z=me,me=Z.getter,he=Z.parentRef),(ge=X[me])===void 0&&Z&&(Ce=Z.defaultVal)!==void 0&&(ge=un(Ce,X)),le(ge,Z&&P[Z.type],me,he)}function de(X){X=typeof X===ze?JSON.parse(X):X;var le,Z,Ce,me,ge=0,he=X,Le=[];if(Qe(X)){for(X=X||[],le=X.length;ge<le;ge++)Le.push(this.map(X[ge]));return Le._is=c,Le.unmap=Ee,Le.merge=fe,Le}if(X){for(Q(X,function(re,Be){Be?re=Be.map(re):typeof re===ze&&(re[0]==="{"&&re[re.length-1]==="}"||re[0]==="["&&re[re.length-1]==="]")&&(re=JSON.parse(re)),Le.push(re)}),he=this.apply(this,Le),ge=J;ge--;)if(Ce=Le[ge],me=G[ge].parentRef,me&&Ce&&Ce.unmap)if(Qe(Ce))for(le=Ce.length;le--;)Et(Ce[le],me,he);else Et(Ce,me,he);for(Z in X)Z!==xt&&!q[Z]&&(he[Z]=X[Z])}return he}function fe(X,le,Z){X=typeof X===ze?JSON.parse(X):X;var Ce,me,ge,he,Le,re,Be,je,Ge,$e,Oe=0,ce=this;if(Qe(ce)){for(Be={},Ge=[],me=X.length,ge=ce.length;Oe<me;Oe++){for(je=X[Oe],re=!1,Ce=0;Ce<ge&&!re;Ce++)Be[Ce]||(Le=ce[Ce],U&&(Be[Ce]=re=typeof U===ze?je[U]&&(q[U]?Le[U]():Le[U])===je[U]:U(Le,je)));re?(Le.merge(je),Ge.push(Le)):(Ge.push($e=W.map(je)),Z&&Et($e,Z,le))}pe?pe(ce).refresh(Ge,!0):ce.splice.apply(ce,[0,ce.length].concat(Ge));return}Q(X,function(we,be,_e,Se){be?ce[_e]().merge(we,ce,Se):ce[_e]()!==we&&(typeof we===ze&&(we[0]==="{"&&we[we.length-1]==="}"||we[0]==="["&&we[we.length-1]==="]")&&(we=JSON.parse(we)),ce[_e](we))});for(he in X)he!==xt&&!q[he]&&(ce[he]=X[he])}function Ee(){var X,le,Z,Ce,me,ge=0,he=this;function Le(re){for(var Be=[],je=0,Ge=re.length;je<Ge;je++)Be.push(re[je].unmap());return Be}if(Qe(he))return Le(he);for(X={};ge<J;ge++)le=G[ge],Z=void 0,typeof le!==ze&&(Z=le,le=Z.getter),me=he[le](),X[le]=Z&&me&&P[Z.type]?Qe(me)?Le(me):me.unmap():me;for(le in he)he.hasOwnProperty(le)&&(le.charAt(0)!=="_"||!q[le.slice(1)])&&le!==xt&&!Fe(he[le])&&(X[le]=he[le]);return X}for(oe.prototype=K,M=0;M<J;M++)(function(X){X=X.getter||X,q[X]=M+1;var le="_"+X;H+=(H?",":"")+X,ne+="this."+le+" = "+X+`;
3`,K[X]=K[X]||function(Z){if(!arguments.length)return this[le];pe?pe(this).setProperty(X,Z):this[le]=Z},pe&&(K[X].set=K[X].set||function(Z){this[le]=Z})})(G[M]);return ne=new Function(H,ne),R=function(){ne.apply(this,arguments),(S=arguments[J+1])&&Et(this,arguments[J],S)},R.prototype=K,K.constructor=R,W.map=de,W.getters=G,W.extend=A,W.id=U,W}function Ni(c,y){var M,R=zt._wm||{},S={tmpls:[],links:{},bnds:[],_is:"template",render:Ui};return y&&(S=Xe(S,y)),S.markup=c,S.htmlTag||(M=Jr.exec(c),S.htmlTag=M?M[1].toLowerCase():""),M=R[S.htmlTag],M&&M!==R.div&&(S.markup=S.markup.trim()),S}function ui(c,y){function M(S,P,G){var A,U,K,H,ne=xe.onStore[c];if(S&&typeof S===Di&&!S.nodeType&&!S.markup&&!S.getTgt&&!(c==="viewModel"&&S.getters||S.extend)){for(U in S)M(U,S[U],P);return P||Ye}return S&&typeof S!==ze&&(G=P,P=S,S=void 0),K=G?c==="viewModel"?G:G[R]=G[R]||{}:M,A=y.compile,P===void 0&&(P=A?S:K[S],S=void 0),P===null?S&&delete K[S]:(A&&(P=A.call(K,S,P,G,0)||{},P._is=c),S&&(K[S]=P)),ne&&ne(S,P,G,A),P}var R=c+"s";Ye[R]=M}function zi(c){vt[c]=vt[c]||function(y){return arguments.length?(Ue[c]=y,vt):Ue[c]}}function li(c){function y(M,R){this.tgt=c.getTgt(M,R),R.map=this}return Fe(c)&&(c={getTgt:c}),c.baseMap&&(c=Xe(Xe({},c.baseMap),c)),c.map=function(M,R){return new y(M,R)},c}function Ui(c,y,M,R,S,P){var G,A,U,K,H,ne,J,pe,q=R,oe="";if(y===!0?(M=y,y=void 0):typeof y!==Di&&(y=void 0),(U=this.tag)?(H=this,q=q||H.view,K=q._getTmpl(U.template||H.tmpl),arguments.length||(c=U.contentCtx&&Fe(U.contentCtx)?c=U.contentCtx(c):q)):K=this,K){if(!R&&c&&c._is==="view"&&(q=c),q&&c===q&&(c=q.data),ne=!q,Xt=Xt||ne,ne&&((y=y||{}).root=c),!Xt||zt.useViews||K.useViews||q&&q!==rt)oe=_r(K,c,y,M,q,S,P,U);else{if(q?(J=q.data,pe=q.index,q.index=Ai):(q=rt,J=q.data,q.data=c,q.ctx=y),Qe(c)&&!M)for(G=0,A=c.length;G<A;G++)q.index=G,q.data=c[G],oe+=K.fn(c[G],q,xe);else q.data=c,oe+=K.fn(c,q,xe);q.data=J,q.index=pe}ne&&(Xt=void 0)}return oe}function _r(c,y,M,R,S,P,G,A){var U,K,H,ne,J,pe,q,oe,W,Q,de,fe,Ee,X="";if(A&&(W=A.tagName,fe=A.tagCtx,M=M?Rt(M,A.ctx):A.ctx,c===S.content?q=c!==S.ctx._wrp?S.ctx._wrp:void 0:c!==fe.content?c===A.template?(q=fe.tmpl,M._wrp=fe.content):q=fe.content||S.content:q=S.content,fe.props.link===!1&&(M=M||{},M.link=!1)),S&&(G=G||S._.onRender,Ee=M&&M.link===!1,Ee&&S._.nl&&(G=void 0),M=Rt(M,S.ctx),fe=!A&&S.tag?S.tag.tagCtxs[S.tagElse]:fe),(Q=fe&&fe.props.itemVar)&&(Q[0]!=="~"&&ct("Use itemVar='~myItem'"),Q=Q.slice(1)),P===!0&&(pe=!0,P=0),G&&A&&A._.noVws&&(G=void 0),oe=G,G===!0&&(oe=void 0,G=S._.onRender),M=c.helpers?Rt(c.helpers,M):M,de=M,Qe(y)&&!R)for(H=pe?S:P!==void 0&&S||new Wt(M,"array",S,y,c,P,G,q),H._.nl=Ee,S&&S._.useKey&&(H._.bnd=!A||A._.bnd&&A,H.tag=A),U=0,K=y.length;U<K;U++)ne=new Wt(de,"item",H,y[U],c,(P||0)+U,G,H.content),Q&&((ne.ctx=Xe({},de))[Q]=xe._cp(y[U],"#data",ne)),J=c.fn(y[U],ne,xe),X+=H._.onRender?H._.onRender(J,ne):J;else H=pe?S:new Wt(de,W||"data",S,y,c,P,G,q),Q&&((H.ctx=Xe({},de))[Q]=xe._cp(y,"#data",H)),H.tag=A,H._.nl=Ee,X+=c.fn(y,H,xe);return A&&(H.tagElse=fe.index,fe.contentView=H),oe?oe(X,H):X}function mr(c,y,M){var R=M!==void 0?Fe(M)?M.call(y.data,c,y):M||"":"{Error: "+(c.message||c)+"}";return Ue.onError&&(M=Ue.onError.call(y.data,c,M&&R,y))!==void 0&&(R=M),y&&!y._lc?He.html(R):R}function mt(c){throw new xe.Err(c)}function ct(c){mt(`Syntax error
4`+c)}function yr(c,y,M,R,S){function P(fe){fe-=oe,fe&&Q.push(c.substr(oe,fe).replace(Ei,"\\n"))}function G(fe,Ee){fe&&(fe+="}}",ct((Ee?"{{"+Ee+"}} block has {{/"+fe+" without {{"+fe:"Unmatched or missing {{/"+fe)+`, in template:
5`+c))}function A(fe,Ee,X,le,Z,Ce,me,ge,he,Le,re,Be){(me&&Ee||he&&!X||ge&&ge.slice(-1)===":"||Le)&&ct(fe),Ce&&(Z=":",le=mi),he=he||M&&!S;var je,Ge,$e,Oe=(Ee||M)&&[[]],ce="",we="",be="",_e="",Se="",Ze="",Lt="",nt="",Kt=!he&&!Z;X=X||(ge=ge||"#data",Z),P(Be),oe=Be+fe.length,me?pe&&Q.push(["*",`
6`+ge.replace(/^:/,"ret+= ").replace(nr,"$1")+`;
7`]):X?(X==="else"&&(Yr.test(ge)&&ct('For "{{else if expr}}" use "{{else expr}}"'),Oe=de[9]&&[[]],de[10]=c.substring(de[10],Be),Ge=de[11]||de[0]||ct("Mismatched: "+fe),de=W.pop(),Q=de[2],Kt=!0),ge&&Lr(ge.replace(Ei," "),Oe,y,M).replace(gi,function(We,Bt,vi,et,ot,ke,at,dt){return et==="this:"&&(ke="undefined"),dt&&($e=$e||dt[0]==="@"),et="'"+ot+"':",at?(we+=vi+ke+",",_e+="'"+dt+"',"):vi?(be+=et+"j._cp("+ke+',"'+dt+'",view),',Ze+=et+"'"+dt+"',"):Bt?Lt+=ke:(ot==="trigger"&&(nt+=ke),ot==="lateRender"&&(je=dt!=="false"),ce+=et+ke+",",Se+=et+"'"+dt+"',",ne=ne||Bi.test(ot)),""}).slice(0,-1),Oe&&Oe[0]&&Oe.pop(),H=[X,le||!!R||ne||"",Kt&&[],Ki(_e||(X===":"?"'#data',":""),Se,Ze),Ki(we||(X===":"?"data,":""),ce,be),Lt,nt,je,$e,Oe||0],Q.push(H),Kt&&(W.push(de),de=H,de[10]=oe,de[11]=Ge)):re&&(G(re!==de[0]&&re!==de[11]&&re,de[0]),de[10]=c.substring(de[10],Be),de=W.pop()),G(!de&&re),Q=de[2]}var U,K,H,ne,J,pe=Ue.allowCode||y&&y.allowCode||vt.allowCode===!0,q=[],oe=0,W=[],Q=q,de=[,,q];if(pe&&y._is&&(y.allowCode=pe),M&&(R!==void 0&&(c=c.slice(0,-R.length-2)+Ut),c=ni+c+pt),G(W[0]&&W[0][2].pop()[0]),c.replace(Ke,A),P(c.length),(oe=q[q.length-1])&&G(typeof oe!==ze&&+oe[10]===oe[10]&&oe[0]),M){for(K=qi(q,c,M),J=[],U=q.length;U--;)J.unshift(q[U][9]);Vi(K,J)}else K=qi(q,y);return K}function Vi(c,y){var M,R,S=0,P=y.length;for(c.deps=[],c.paths=[];S<P;S++){c.paths.push(R=y[S]);for(M in R)M!=="_jsvto"&&R.hasOwnProperty(M)&&R[M].length&&!R[M].skp&&(c.deps=c.deps.concat(R[M]))}}function Ki(c,y,M){return[c.slice(0,-1),y.slice(0,-1),M.slice(0,-1)]}function vr(c,y){return`
8	params:{args:[`+c[0]+`],
9	props:{`+c[1]+"}"+(c[2]?`,
10	ctx:{`+c[2]+"}":"")+`},
11	args:[`+y[0]+`],
12	props:{`+y[1]+"}"+(y[2]?`,
13	ctx:{`+y[2]+"}":"")}function Lr(c,y,M,R){function S(me,ge,he,Le,re,Be,je,Ge,$e,Oe,ce,we,be,_e,Se,Ze,Lt,nt,Kt,We,Bt){function vi(wt,wr,Li,Dt,Hi,Yi,cn,pi){if(dt=Li===".",Li&&(re=re.slice(wr.length),/^\.?constructor$/.test(pi||re)&&ct(wt),dt||(wt=(Oe?(R?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(Dt?'view.ctxPrm("'+Dt+'")':Hi?"view":"data")+(Oe?")===undefined"+(R?"":")")+'?"":view._getOb(ob,"':"")+(pi?(Yi?"."+Yi:Dt||Hi?"":"."+Li)+(cn||""):(pi=Dt?"":Hi?Yi||"":Li,"")),wt=wt+(pi?"."+pi:""),wt=wr+(wt.slice(0,9)==="view.data"?wt.slice(5):wt)+(Oe?(R?'"':'",ltOb')+(ce?",1)":")"):"")),ne)){if(ot=P==="_linkTo"?G=y._jsvto=y._jsvto||[]:J.bd,ke=dt&&ot[ot.length-1]){if(ke._cpfn){for(;ke.sb;)ke=ke.sb;ke.prm&&(ke.bnd&&(re="^"+re.slice(1)),ke.sb=re,ke.bnd=ke.bnd||re[0]==="^")}}else ot.push(re);ce&&!dt&&(X[W]=qt,le[W]=Z[W].length)}return wt}Le&&!Ge&&(re=Le+re),Be=Be||"",be=be||"",he=he||ge||be,re=re||$e,Oe&&(Oe=!/\)|]/.test(Bt[We-1]))&&(re=re.slice(1).split(".").join("^")),ce=ce||nt||"";var et,ot,ke,at,dt,Br,hi,qt=We;if(!H&&!K){if(je&&ct(c),Lt&&ne){if(et=X[W-1],typeof Bt!="undefined"&&Bt.length-1>qt-(et||0)){if(et=Bt.slice(et,qt+me.length).trim(),ot=G||pe[W-1].bd,ke=ot[ot.length-1],ke&&ke.prm){for(;ke.sb&&ke.sb.prm;)ke=ke.sb;at=ke.sb={path:ke.sb,bnd:ke.bnd},!at.path&&ke.path&&(ke.bnd=!0)}else ot.push(at={path:ot.pop()});ke&&ke.sb===at&&(Z[W]=Z[W-1].slice(ke._cpPthSt)+Z[W],Z[W-1]=Z[W-1].slice(0,ke._cpPthSt)),at._cpPthSt=le[W-1],at._cpKey=et,Z[W]+=Bt.slice(Ce,We),Ce=We,at._cpfn=Zt[et]=Zt[et]||new Function("data,view,j","//"+et+`
14var v;
15return ((v=`+Z[W]+(Ze==="]"?")]":Ze)+")!=null?v:null);"),Z[W-1]+=Ee[oe]&&zt.cache?'view.getCache("'+et.replace(ar,"\\$&")+'"':Z[W],at.prm=J.bd,at.bnd=at.bnd||at.path&&at.path.indexOf("^")>=0}Z[W]=""}ce==="["&&(ce="[j._sq("),he==="["&&(he="[j._sq(")}return hi=H?(H=!_e,H?me:be+'"'):K?(K=!Se,K?me:be+'"'):(he?(fe[++oe]=!0,Q[oe]=0,ne&&(X[W++]=qt++,J=pe[W]={bd:[]},Z[W]="",le[W]=1),he):"")+(Kt?oe?"":(q=Bt.slice(q,qt),(P?(P=A=G=!1,"\b"):"\b,")+q+(q=qt+me.length,ne&&y.push(J.bd=[]),"\b")):Ge?(W&&ct(c),ne&&y.pop(),P="_"+re,A=Le,q=qt+me.length,ne&&(ne=J.bd=y[P]=[],ne.skp=!Le),re+":"):re?re.split("^").join(".").replace(xe.rPath,vi)+(ce||Be):Be||(Ze?Ze==="]"?")]":")":we?(Ee[oe]||ct(c),","):ge?"":(H=_e,K=Se,'"'))),!H&&!K&&Ze&&(Ee[oe]=!1,oe--),ne&&(!H&&!K&&(Ze&&(fe[oe+1]&&(J=pe[--W],fe[oe+1]=!1),de=Q[oe+1]),ce&&(Q[oe+1]=Z[W].length+(he?1:0),(re||Ze)&&(J=pe[++W]={bd:[]},fe[oe+1]=!0))),Z[W]=(Z[W]||"")+Bt.slice(Ce,We),Ce=We+me.length,!H&&!K&&((Br=he&&fe[oe+1])&&(Z[W-1]+=he,le[W-1]++),ce==="("&&dt&&!at&&(Z[W]=Z[W-1].slice(de)+Z[W],Z[W-1]=Z[W-1].slice(0,de))),Z[W]+=Br?hi.slice(1):hi),!H&&!K&&ce&&(oe++,re&&ce==="("&&(Ee[oe]=!0)),!H&&!K&&nt&&(ne&&(Z[W]+=ce),hi+=ce),hi}var P,G,A,U,K,H,ne=y&&y[0],J={bd:ne},pe={0:J},q=0,oe=0,W=0,Q={},de=0,fe={},Ee={},X={},le={0:0},Z={0:""},Ce=0;return c[0]==="@"&&(c=c.replace(si,".")),U=(c+(M?" ":"")).replace(xe.rPrm,S),ne&&(U=Z[0]),!oe&&U||ct(c)}function qi(c,y,M){var R,S,P,G,A,U,K,H,ne,J,pe,q,oe,W,Q,de,fe,Ee,X,le,Z,Ce,me,ge,he,Le,re,Be,je,Ge,$e,Oe,ce,we=0,be=zt.useViews||y.useViews||y.tags||y.templates||y.helpers||y.converters,_e="",Se={},Ze=c.length;for(typeof y===ze?(Ee=M?'data-link="'+y.replace(Ei," ").slice(1,-1)+'"':y,y=0):(Ee=y.tmplName||"unnamed",y.allowCode&&(Se.allowCode=!0),y.debug&&(Se.debug=!0),pe=y.bnds,fe=y.tmpls),R=0;R<Ze;R++)if(S=c[R],typeof S===ze)_e+='+"'+S+'"';else if(P=S[0],P==="*")_e+=`;
16`+S[1]+`
17ret=ret`;else{if(G=S[1],Z=!M&&S[2],A=vr(S[3],oe=S[4]),Ge=S[6],$e=S[7],S[8]?(Oe=`
18var ob,ltOb={},ctxs=`,ce=`;
19ctxs.lt=ltOb.lt;
20return ctxs;`):(Oe=`
21return `,ce=""),Ce=S[10]&&S[10].replace(nr,"$1"),(he=P==="else")?q&&q.push(S[9]):(Be=S[5]||Ue.debugMode!==!1&&"undefined",pe&&(q=S[9])&&(q=[q],we=pe.push(1))),be=be||oe[1]||oe[2]||q||/view.(?!index)/.test(oe[0]),(Le=P===":")?G&&(P=G===mi?">":G+P):(Z&&(X=Ni(Ce,Se),X.tmplName=Ee+"/"+P,X.useViews=X.useViews||be,qi(Z,X),be=X.useViews,fe.push(X)),he||(le=P,be=be||P&&(!Je[P]||!Je[P].flow),ge=_e,_e=""),me=c[R+1],me=me&&me[0]==="else"),je=Be?`;
22try{
23ret+=`:`
24+`,W="",Q="",Le&&(q||Ge||G&&G!==mi||$e)){if(re=new Function("data,view,j","// "+Ee+" "+ ++we+" "+P+Oe+"{"+A+"};"+ce),re._er=Be,re._tag=P,re._bd=!!q,re._lr=$e,M)return re;Vi(re,q),de='c("'+G+'",view,',J=!0,W=de+we+",",Q=")"}if(_e+=Le?(M?(Be?`try{
25`:"")+"return ":je)+(J?(J=void 0,be=ne=!0,de+(re?(pe[we-1]=re,we):"{"+A+"}")+")"):P===">"?(K=!0,"h("+oe[0]+")"):(H=!0,"((v="+oe[0]+")!=null?v:"+(M?"null)":'"")'))):(U=!0,`
26{view:view,content:false,tmpl:`+(Z?fe.length:"false")+","+A+"},"),le&&!me){if(_e="["+_e.slice(0,-1)+"]",de='t("'+le+'",view,this,',M||q){if(_e=new Function("data,view,j"," // "+Ee+" "+we+" "+le+Oe+_e+ce),_e._er=Be,_e._tag=le,q&&Vi(pe[we-1]=_e,q),_e._lr=$e,M)return _e;W=de+we+",undefined,",Q=")"}_e=ge+je+de+(q&&we||_e)+")",q=0,le=0}Be&&!me&&(be=!0,_e+=`;
27}catch(e){ret`+(M?"urn ":"+=")+W+"j._err(e,view,"+Be+")"+Q+";}"+(M?"":`
28ret=ret`))}_e="// "+Ee+(Se.debug?`
29debugger;`:"")+`
30var v`+(U?",t=j._tag":"")+(ne?",c=j._cnvt":"")+(K?",h=j._html":"")+(M?(S[8]?", ob":"")+`;
31`:',ret=""')+_e+(M?`
32`:`;
33return ret;`);try{_e=new Function("data,view,j",_e)}catch(Lt){ct(`Compiled template code:
34
35`+_e+`
36: "`+(Lt.message||Lt)+'"')}return y&&(y.fn=_e,y.useViews=!!be),_e}function Rt(c,y){return c&&c!==y?y?Xe(Xe({},y),c):c:y&&Xe({},y)}function br(c,y){var M,R,S=y.map,P=S&&S.propsArr;if(!P){if(P=[],typeof c===Di||Fe(c))for(M in c)R=c[M],M!==xt&&c.hasOwnProperty(M)&&(!y.props.noFunctions||!Fe(R))&&P.push({key:M,prop:R});S&&(S.propsArr=S.options&&P)}return Cr(P,y)}function Cr(c,y){var M,R,S,P=y.tag,G=y.props,A=y.params.props,U=G.filter,K=G.sort,H=K===!0,ne=parseInt(G.step),J=G.reverse?-1:1;if(!Qe(c))return c;if(H||K&&typeof K===ze?(M=c.map(function(pe,q){return pe=H?pe:ji(pe,K),{i:q,v:typeof pe===ze?pe.toLowerCase():pe}}),M.sort(function(pe,q){return pe.v>q.v?J:pe.v<q.v?-J:0}),c=M.map(function(pe){return c[pe.i]})):(K||J<0)&&!P.dataMap&&(c=c.slice()),Fe(K)&&(c=c.sort(function(){return K.apply(y,arguments)})),J<0&&(!K||Fe(K))&&(c=c.reverse()),c.filter&&U&&(c=c.filter(U,y),y.tag.onFilter&&y.tag.onFilter(y)),A.sorted&&(M=K||J<0?c:c.slice(),P.sorted?se.observable(P.sorted).refresh(M):y.map.sorted=M),R=G.start,S=G.end,(A.start&&R===void 0||A.end&&S===void 0)&&(R=S=0),(!isNaN(R)||!isNaN(S))&&(R=+R||0,S=S===void 0||S>c.length?c.length:+S,c=c.slice(R,S)),ne>1){for(R=0,S=c.length,M=[];R<S;R+=ne)M.push(c[R]);c=M}return A.paged&&P.paged&&$observable(P.paged).refresh(c),c}function kr(c,y,M){var R=this.jquery&&(this[0]||mt("Unknown template")),S=R.getAttribute(Pi);return Ui.call(S&&se.data(R)[Ft]||ie(R),c,y,M)}function Mr(c){return _i[c]||(_i[c]="&#"+c.charCodeAt(0)+";")}function xr(c,y){return Qr[y]||""}function Er(c){return c!=null?$r.test(c)&&(""+c).replace(wi,Mr)||c:""}function hn(c){return typeof c===ze?c.replace(Zr,Mr):c}function pn(c){return typeof c===ze?c.replace(Wr,xr):c}if(xe=Ye.sub,vt=Ye.settings,!(yi||se&&se.render)){for(Ie in Fi)ui(Ie,Fi[Ie]);if(He=Ye.converters,Ne=Ye.helpers,Je=Ye.tags,xe._tg.prototype={baseApply:gr,cvtArgs:cr,bndArgs:fr,ctxPrm:oi},rt=xe.topView=new Wt,se){if(se.fn.render=kr,xt=se.expando,se.observable){if(ve!==(ve=se.views.jsv
36iews))throw"jquery.observable.js requires jsrender.js "+ve;Xe(xe,se.views.sub),Ye.map=se.views.map}}else se={jsrender:ve},ht&&(lt.jsrender=se),se.renderFile=se.__express=se.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},xe._jq=function(c){c!==se&&(Xe(c,se),se=c,se.fn.render=kr,delete se.jsrender,xt=se.expando)};Ue=xe.settings,Ue.allowCode=!1,se.render=Si,se.views=Ye,se.templates=ie=Ye.templates;for(ai in Ue)zi(ai);(vt.debugMode=function(c){return c===void 0?Ue.debugMode:(Ue._clFns&&Ue._clFns(),Ue.debugMode=c,Ue.onError=typeof c===ze?function(){return c}:Fe(c)?c:void 0,vt)})(!1),zt=Ue.advanced={cache:!0,useViews:!1,_jsv:!1},Je({if:{render:function(c){var y=this,M=y.tagCtx,R=y.rendering.done||!c&&(M.args.length||!M.index)?"":(y.rendering.done=!0,y.selected=M.index,void 0);return R},contentCtx:!0,flow:!0},for:{sortDataMap:li(Cr),init:function(c,y){this.setDataMap(this.tagCtxs)},render:function(c){var y,M,R,S,P,G,A,U,K=this,H=K.tagCtx,ne=H.argDefault===!1,J=H.props,pe=ne||H.args.length,q="",oe=0;if(!K.rendering.done){if(y=pe?c:H.view.data,ne)for(ne=J.reverse?"unshift":"push",A=+J.end,U=+J.step||1,y=[],P=+J.start||0;(A-P)*U>0;P+=U)y[ne](P);y!==void 0&&(S=Qe(y),q+=H.render(y,!pe||J.noIteration),oe+=S?y.length:1),(K.rendering.done=oe)&&(K.selected=H.index)}return q},setDataMap:function(c){for(var y,M,R,S=this,P=c.length;P--;)y=c[P],M=y.props,R=y.params.props,y.argDefault=M.end===void 0||y.args.length>0,M.dataMap=y.argDefault!==!1&&Qe(y.args[0])&&(R.sort||R.start||R.end||R.step||R.filter||R.reverse||M.sort||M.start||M.end||M.step||M.filter||M.reverse)&&S.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:li(br),init:Tt,flow:!0},include:{flow:!0},"*":{render:Oi,flow:!0},":*":{render:Oi,flow:!0},dbg:Ne.dbg=He.dbg=tn}),He({html:Er,attr:Er,encode:hn,unencode:pn,url:function(c){return c!=null?encodeURI(""+c):c===null?c:""}})}return Ue=xe.settings,vt.delimiters("{{","}}","^"),en&&yi.views.sub._jq(se),se||yi},window)}},Fn={};function rr(St){var lt=Fn[St];if(lt!==void 0)return lt.exports;var se=Fn[St]={exports:{}};return pa[St](se,se.exports,rr),se.exports}(function(){rr.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(St){if(typeof window=="object")return window}}()})();var Zs={};(function(){"use strict";var St=rr(13883);class lt{constructor(ve,Ie){this.features={},this.mapObject=ve,this.id=ve.dataset.id,this.imagePath=ve.dataset.image,this.blueprint=ve.dataset.blueprint?JSON.parse(ve.dataset.blueprint):{},this.image=new Image,this.image.onload=()=>{this.createMap(),typeof Ie=="function"?Ie(this):this.blueprint&&this.createAreas()},this.image.src=this.imagePath,this.clickAreaCallback=()=>{},this.setLayerPropertiesCallback=()=>{}}createMap(){const ve=[[0,0],[this.image.height,this.image.width]];this.map=L.map(this.mapObject,{minZoom:-1,maxZoom:2,crs:L.CRS.Simple,noWrap:!0,zoomSnap:0,maxBounds:[[0,0],[this.image.height,this.image.width]],center:[this.image.height/2,this.image.width/2],zoom:-1,scrollWheelZoom:!1,attributionControl:!1}),L.imageOverlay(this.image.src,ve).addTo(this.map),this.fitBounds()}fitBounds(){const ve=this.image.height/this.image.width,Ie=this.mapObject.offsetHeight/this.mapObject.offsetWidth;ve>Ie?this.map.fitBounds([[0,0],[0,this.image.width]]):this.map.fitBounds([[0,0],[this.image.height,0]]),this.map.setView([this.image.height/2,this.image.width/2])}createAreas(){this.forEachBlueprint((ve,Ie)=>{new L.GeoJSON(Ie,{onEachFeature:(Ke,yt)=>{yt._leaflet_id=ve,this.setLayerProperties(yt,Ie),this.attachEditorEvents(yt)}}).addTo(this.map)})}setLayerProperties(ve,Ie){const Ke=Ie.properties;Ke&&(Ke.color&&ve.setStyle({fillColor:Ke.color,color:Ke.color}),this.setLayerPropertiesCallback(ve,Ke))}attachEditorEvents(ve){ve.on("mouseover",Ie=>{Ie.target.getElement().classList.add("selected")}),ve.on("mouseout",Ie=>{Ie.target.getElement().classList.remove("selected")}),ve.on("click",Ie=>{this.clickAreaCallback(Ie.target,this)})}onClickArea(ve){this.clickAreaCallback=ve}onSetLayerProperties(ve){this.setLayerPropertiesCallback=ve}forEachBlueprint(ve){for(let Ie in this.blueprint){const Ke=this.blueprint[Ie];Ke.geometry&&Ke.geometry.type==="Polygon"&&ve(Ie,Ke)}}reload(){this.map&&(this.map.invalidateSize(!0),this.fitBounds())}}var se=rr(31572);document.addEventListener("DOMContentLoaded",()=>{const ht={},ve=$.templates("#navigation_maps-popup"),Ie=document.getElementById("navigation_maps-tabs");document.querySelectorAll(".navigation_maps .map").forEach(Ke=>{const yt=Ke.dataset.id;ht[yt]=new lt(Ke),ht[yt].onSetLayerProperties((rt,Ye)=>{if(!Ye.popup){let xt=document.createElement("div");xt.innerHTML=ve.render(Ye),rt.bindPopup(xt,{maxHeight:400,maxWidth:640,minWidth:200,keepInView:!0,className:`navigation_map-info map-info-${yt}-${rt._leaflet_id}`})}}),ht[yt].onClickArea(rt=>{rt.feature.properties&&rt.feature.properties.link&&rt.feature.properties.popup&&(location=rt.feature.properties.link)})}),$(Ie).on("change.zf.tabs",(Ke,yt,rt)=>ht[rt.find(".map").data("id")].reload())}),$(".home__section.navigation_maps").foundation()})()})();
37
38//# sourceMappingURL=decidim_navigation_maps-6e96850ecdf32fb0af7d.js.map

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.