@hpcc-js/map 3.5.8 → 3.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,function(t,e,i,o,n,s,r){"use strict";var a,l,h,u=Object.defineProperty,c=(t,e)=>u(t,"name",{value:e,configurable:!0}),p=(t,e,i)=>((t,e,i)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);function d(t,e){for(var i=0;i<e.length;i++){const o=e[i];if("string"!=typeof o&&!Array.isArray(o))for(const e in o)if("default"!==e&&!(e in t)){const i=Object.getOwnPropertyDescriptor(o,e);i&&Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:c(()=>o[e],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}c(d,"_mergeNamespaces");function _(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return f(this.cover(e,i),e,i,t)}function f(t,e,i,o){if(isNaN(e)||isNaN(i))return t;var n,s,r,a,l,h,u,c,p,d=t._root,_={data:o},f=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=_,t;for(;d.length;)if((h=e>=(s=(f+g)/2))?f=s:g=s,(u=i>=(r=(m+y)/2))?m=r:y=r,n=d,!(d=d[c=u<<1|h]))return n[c]=_,t;if(a=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===a&&i===l)return _.next=d,n?n[c]=_:t._root=_,t;do{n=n?n[c]=new Array(4):t._root=new Array(4),(h=e>=(s=(f+g)/2))?f=s:g=s,(u=i>=(r=(m+y)/2))?m=r:y=r}while((c=u<<1|h)==(p=(l>=r)<<1|a>=s));return n[p]=d,n[c]=_,t}function m(t){var e,i,o,n,s=t.length,r=new Array(s),a=new Array(s),l=1/0,h=1/0,u=-1/0,c=-1/0;for(i=0;i<s;++i)isNaN(o=+this._x.call(null,e=t[i]))||isNaN(n=+this._y.call(null,e))||(r[i]=o,a[i]=n,o<l&&(l=o),o>u&&(u=o),n<h&&(h=n),n>c&&(c=n));if(l>u||h>c)return this;for(this.cover(l,h).cover(u,c),i=0;i<s;++i)f(this,r[i],a[i],t[i]);return this}function g(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var i=this._x0,o=this._y0,n=this._x1,s=this._y1;if(isNaN(i))n=(i=Math.floor(t))+1,s=(o=Math.floor(e))+1;else{for(var r,a,l=n-i,h=this._root;i>t||t>=n||o>e||e>=s;)switch(a=(e<o)<<1|t<i,(r=new Array(4))[a]=h,h=r,l*=2,a){case 0:n=i+l,s=o+l;break;case 1:i=n-l,s=o+l;break;case 2:n=i+l,o=s-l;break;case 3:i=n-l,o=s-l}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=o,this._x1=n,this._y1=s,this}function y(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t}function v(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function w(t,e,i,o,n){this.node=t,this.x0=e,this.y0=i,this.x1=o,this.y1=n}function b(t,e,i){var o,n,s,r,a,l,h,u=this._x0,c=this._y0,p=this._x1,d=this._y1,_=[],f=this._root;for(f&&_.push(new w(f,u,c,p,d)),null==i?i=1/0:(u=t-i,c=e-i,p=t+i,d=e+i,i*=i);l=_.pop();)if(!(!(f=l.node)||(n=l.x0)>p||(s=l.y0)>d||(r=l.x1)<u||(a=l.y1)<c))if(f.length){var m=(n+r)/2,g=(s+a)/2;_.push(new w(f[3],m,g,r,a),new w(f[2],n,g,m,a),new w(f[1],m,s,r,g),new w(f[0],n,s,m,g)),(h=(e>=g)<<1|t>=m)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var y=t-+this._x.call(null,f.data),v=e-+this._y.call(null,f.data),L=y*y+v*v;if(L<i){var b=Math.sqrt(i=L);u=t-b,c=e-b,p=t+b,d=e+b,o=f.data}}return o}function x(t){if(isNaN(s=+this._x.call(null,t))||isNaN(r=+this._y.call(null,t)))return this;var e,i,o,n,s,r,a,l,h,u,c,p,d=this._root,_=this._x0,f=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=s>=(a=(_+m)/2))?_=a:m=a,(u=r>=(l=(f+g)/2))?f=l:g=l,e=d,!(d=d[c=u<<1|h]))return this;if(!d.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(i=e,p=c)}for(;d.data!==t;)if(o=d,!(d=d.next))return this;return(n=d.next)&&delete d.next,o?(n?o.next=n:delete o.next,this):e?(n?e[c]=n:delete e[c],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(i?i[p]=d:this._root=d),this):(this._root=n,this)}function M(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this}function C(){return this._root}function P(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t}function k(t){var e,i,o,n,s,r,a=[],l=this._root;for(l&&a.push(new w(l,this._x0,this._y0,this._x1,this._y1));e=a.pop();)if(!t(l=e.node,o=e.x0,n=e.y0,s=e.x1,r=e.y1)&&l.length){var h=(o+s)/2,u=(n+r)/2;(i=l[3])&&a.push(new w(i,h,u,s,r)),(i=l[2])&&a.push(new w(i,o,u,h,r)),(i=l[1])&&a.push(new w(i,h,n,s,u)),(i=l[0])&&a.push(new w(i,o,n,h,u))}return this}function T(t){var e,i=[],o=[];for(this._root&&i.push(new w(this._root,this._x0,this._y0,this._x1,this._y1));e=i.pop();){var n=e.node;if(n.length){var s,r=e.x0,a=e.y0,l=e.x1,h=e.y1,u=(r+l)/2,c=(a+h)/2;(s=n[0])&&i.push(new w(s,r,a,u,c)),(s=n[1])&&i.push(new w(s,u,a,l,c)),(s=n[2])&&i.push(new w(s,r,c,u,h)),(s=n[3])&&i.push(new w(s,u,c,l,h))}o.push(e)}for(;e=o.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this}function E(t){return t[0]}function S(t){return arguments.length?(this._x=t,this):this._x}function O(t){return t[1]}function z(t){return arguments.length?(this._y=t,this):this._y}function D(t,e,i){var o=new I(null==e?E:e,null==i?O:i,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function I(t,e,i,o,n,s){this._x=t,this._y=e,this._x0=i,this._y0=o,this._x1=n,this._y1=s,this._root=void 0}function A(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}c(_,"tree_add"),c(f,"add$1"),c(m,"addAll"),c(g,"tree_cover"),c(y,"tree_data"),c(v,"tree_extent"),c(w,"Quad"),c(b,"tree_find"),c(x,"tree_remove"),c(M,"removeAll"),c(C,"tree_root"),c(P,"tree_size"),c(k,"tree_visit"),c(T,"tree_visitAfter"),c(E,"defaultX"),c(S,"tree_x"),c(O,"defaultY"),c(z,"tree_y"),c(D,"quadtree"),c(I,"Quadtree$1"),c(A,"leaf_copy");var B=D.prototype=I.prototype;B.copy=function(){var t,e,i=new I(this._x,this._y,this._x0,this._y0,this._x1,this._y1),o=this._root;if(!o)return i;if(!o.length)return i._root=A(o),i;for(t=[{source:o,target:i._root=new Array(4)}];o=t.pop();)for(var n=0;n<4;++n)(e=o.source[n])&&(e.length?t.push({source:e,target:o.target[n]=new Array(4)}):o.target[n]=A(e));return i},B.add=_,B.addAll=m,B.cover=g,B.data=y,B.extent=v,B.find=b,B.remove=x,B.removeAll=M,B.root=C,B.size=P,B.visit=k,B.visitAfter=T,B.x=S,B.y=z;const R=class _Quadtree{_pin_h=0;_pin_w=0;_tree;constructor(t,e,i,o){this._pin_h=i,this._pin_w=o,this._tree=D().extent(t).addAll(e)}searchRect(t,e,i,o){const n=[];return this._tree.visit((r,a,l,h,u)=>{let c;do{if(!r.length&&r.data&&!r.data.already_flagged){s({left:t,right:i,top:e,bottom:o},r.data)&&(r.data.already_flagged=!0,n.push(r.data))}c=r=r.next}while(c);return a>=i||l>=o||h<t||u<e}),n;function s(t,e){return(e[0]<t.right||e[0]>t.left)&&(e[1]<t.bottom||e[1]>t.top)}}getTreeRects(){const t=[];return this._tree.visit((e,i,o,n,s)=>{t.push([i,o,n-i,s-o])}),t}};c(R,"Quadtree");let Z=R;const N=class _CanvasPins extends e.CanvasWidget{_quadtree_rect_arr;_drawData;_overlap_count=0;_sub_overlap_count=0;constructor(){super()}enter(t,e){super.enter.apply(this,arguments),this.resize(this._size)}update(t,e){super.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");const i=(this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this.skewedData():this.data()).map(t=>[...t]).map(t=>(t.is_cluster=!1,t.already_flagged=!1,t.weight=t[2],t.fillStyle="#FFFFFF",t.strokeStyle="#000000",t.overlap_arr=[],t));this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(i):i,this.draw(this._drawData)}applyClustering(t){const e=this;this._overlap_count=0;const i=this.pinHeight(),o=this.pinWidth(),n=o/2,s=i/2,r=new Z([[0,0],[this.size().width,this.size().height]],t,i,o);switch(this._quadtree_rect_arr=r.getTreeRects(),this.clusterMode()){case"default":const e=t.map(t=>{if(!t.already_flagged){const e=this.searchRectMult(),i=t[0]-n*e,o=t[1]-s*e-8,a=t[0]+n*e,l=t[1]+s*e-8;t.overlap_arr=r.searchRect(i,o,a,l).filter(e=>e!==t),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t});return e.forEach(t=>{t.already_flagged&&t.overlap_arr.length&&e.push(a([t,...t.overlap_arr]))}),e;case"grid":const i=[...t],o=this.gridCellSize(),l=this.gridCellSize(),h=Math.ceil(this.size().width/o),u=Math.ceil(this.size().height/l);for(let t=0;t<u;t++)for(let e=0;e<h;e++){const n=o*e,s=l*t,h=o*(e+1),u=l*(t+1),c=r.searchRect(n,s,h,u);if(c.length>1){const t=n+o/2,e=s+l/2;i.push(a(c,t,e))}}return i}return t;function a(t,i,o){const n=t.reduce((t,e)=>(e.already_flagged=!0,t+e[2]),0);return{0:void 0!==i?i:e.useAveragePos()?t.reduce((t,e)=>t+e[0]*e[2],0)/n:t[0][0],1:void 0!==o?o:e.useAveragePos()?t.reduce((t,e)=>t+e[1]*e[2],0)/n:t[0][1],weight:t.reduce((t,e)=>t+e[2],0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}}drawQuadtree(){this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach(t=>{this._ctx.strokeRect(t[0],t[1],t[2],t[3])}))}draw(t){const e=this,i=this._ctx;this.showQuadtree()&&this.drawQuadtree();const o=this.arrowHeight(),n=this.arrowWidth(),s=this.pinHeight(),r=this.pinWidth(),a=this.radiusWeightMult();let l=0;function h(t){t.width=2*t.radius,t.height=t.width,i.fillStyle="#FFFFFF",i.strokeStyle="#000000",i.beginPath(),i.arc(t.left+t.width/2,t.top+t.height/2,t.radius,0,2*Math.PI),i.closePath(),i.fill(),i.stroke(),d(t)}function u(t){i.fillStyle=t.fillStyle,i.strokeStyle="#000000",i.fillRect(t.left,t.top,t.width,t.height),i.strokeRect(t.left,t.top,t.width,t.height),p(t),d(t)}function p(t,e){const o=t.left+t.width/2-t.arrow_width/2,n=t.left+t.width/2,s=t.left+t.width/2+t.arrow_width/2;let r=t.top+t.height,a=r+t.arrow_height,l=r;e?(i.fillStyle="#FFFFFF",i.strokeStyle="#FFFFFF",r-=2,a-=2,l-=2):(i.fillStyle="#FFFFFF",i.strokeStyle="#000000"),i.beginPath(),i.moveTo(o,r),i.lineTo(n,a),i.lineTo(s,l),i.lineTo(o,r),i.closePath(),i.stroke(),i.fill(),e||p(t,!0)}function d(t){i.font=`${e.pinFontSize()}px '${e.pinFontFamily()}'`;const o=t.left+t.width/2,n=t.top+t.height/2;i.textAlign="center",i.textBaseline="middle",i.fillStyle="#000000";let s=0,r=i.measureText(t.icon).width;for(;r>t.width||!e.shrinkFontToPin();)s++,i.font=`${e.pinFontSize()-s}px '${e.pinFontFamily()}'`,r=i.measureText(t.icon).width;i.fillText(t.icon,o,n)}this.useWeightedRadius()&&t.filter(t=>t.is_cluster).forEach(t=>{l<t.weight&&(l=t.weight)}),t.filter(t=>!t.already_flagged).sort((t,e)=>t[1]>e[1]?1:-1).forEach(t=>{if(t.is_cluster||this.allCircles()){let e=r/2;this.useWeightedRadius()&&(e+=r*(a*t.weight/l)),h({icon:t.weight,left:Math.floor(t[0]-e)+.5,top:Math.floor(t[1]-e-o)+.5,radius:e})}else u({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-r/2)+.5,top:Math.floor(t[1]-s-o)+.5,width:r,height:s,arrow_height:o,arrow_width:n})}),c(h,"drawCirclePin"),c(u,"drawSquarePin"),c(p,"drawArrow"),c(d,"drawPinText")}skewedData(){const t=this,e=[],i=this.data(),o=this.size(),n=this.bottomRightX()-this.topLeftX(),s=this.bottomRightY()-this.topLeftY(),r=n/o.width,a=s/o.height;return i.forEach(function(i){const o=Math.abs(i[0]-t.topLeftX()),n=Math.abs(i[1]-t.topLeftY()),s=o/r,l=n/a;e.push([s,l,i[2]])}),e}};c(N,"CanvasPins");let j=N;function H(){return new G}function G(){this.reset()}j.prototype._class+=" map_CanvasPins",j.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),j.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),j.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),j.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),j.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),j.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),j.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),j.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),j.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),j.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),j.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),j.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),j.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),j.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),j.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),j.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),j.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),j.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),j.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),j.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),c(H,"adder"),c(G,"Adder"),G.prototype={constructor:G,reset:c(function(){this.s=this.t=0},"reset"),add:c(function(t){F(U,t,this.t),F(this,U.s,this.s),this.s?this.t+=U.t:this.s=U.t},"add"),valueOf:c(function(){return this.s},"valueOf")};var U=new G;function F(t,e,i){var o=t.s=e+i,n=o-e,s=o-n;t.t=e-s+(i-n)}c(F,"add");var W=1e-6,V=1e-12,q=Math.PI,Y=q/2,$=q/4,K=2*q,X=180/q,J=q/180,Q=Math.abs,tt=Math.atan,et=Math.atan2,it=Math.cos,ot=Math.ceil,nt=Math.exp,st=Math.log,rt=Math.pow,at=Math.sin,lt=Math.sign||function(t){return t>0?1:t<0?-1:0},ht=Math.sqrt,ut=Math.tan;function ct(t){return t>1?0:t<-1?q:Math.acos(t)}function pt(t){return t>1?Y:t<-1?-Y:Math.asin(t)}function dt(t){return(t=at(t/2))*t}function _t(){}function ft(t,e){t&&gt.hasOwnProperty(t.type)&&gt[t.type](t,e)}c(ct,"acos"),c(pt,"asin"),c(dt,"haversin"),c(_t,"noop$1"),c(ft,"streamGeometry");var mt={Feature:c(function(t,e){ft(t.geometry,e)},"Feature"),FeatureCollection:c(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)ft(i[o].geometry,e)},"FeatureCollection")},gt={Sphere:c(function(t,e){e.sphere()},"Sphere"),Point:c(function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},"Point"),MultiPoint:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)t=i[o],e.point(t[0],t[1],t[2])},"MultiPoint"),LineString:c(function(t,e){yt(t.coordinates,e,0)},"LineString"),MultiLineString:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)yt(i[o],e,0)},"MultiLineString"),Polygon:c(function(t,e){vt(t.coordinates,e)},"Polygon"),MultiPolygon:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)vt(i[o],e)},"MultiPolygon"),GeometryCollection:c(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)ft(i[o],e)},"GeometryCollection")};function yt(t,e,i){var o,n=-1,s=t.length-i;for(e.lineStart();++n<s;)o=t[n],e.point(o[0],o[1],o[2]);e.lineEnd()}function vt(t,e){var i=-1,o=t.length;for(e.polygonStart();++i<o;)yt(t[i],e,1);e.polygonEnd()}function Lt(t,e){t&&mt.hasOwnProperty(t.type)?mt[t.type](t,e):ft(t,e)}c(yt,"streamLine"),c(vt,"streamPolygon"),c(Lt,"geoStream");var wt,bt,xt,Mt,Ct,Pt=H(),kt=H(),Tt={point:_t,lineStart:_t,lineEnd:_t,polygonStart:c(function(){Pt.reset(),Tt.lineStart=Et,Tt.lineEnd=St},"polygonStart"),polygonEnd:c(function(){var t=+Pt;kt.add(t<0?K+t:t),this.lineStart=this.lineEnd=this.point=_t},"polygonEnd"),sphere:c(function(){kt.add(K)},"sphere")};function Et(){Tt.point=Ot}function St(){zt(wt,bt)}function Ot(t,e){Tt.point=zt,wt=t,bt=e,xt=t*=J,Mt=it(e=(e*=J)/2+$),Ct=at(e)}function zt(t,e){var i=(t*=J)-xt,o=i>=0?1:-1,n=o*i,s=it(e=(e*=J)/2+$),r=at(e),a=Ct*r,l=Mt*s+a*it(n),h=a*o*at(n);Pt.add(et(h,l)),xt=t,Mt=s,Ct=r}function Dt(t){return kt.reset(),Lt(t,Tt),2*kt}function It(t){return[et(t[1],t[0]),pt(t[2])]}function At(t){var e=t[0],i=t[1],o=it(i);return[o*it(e),o*at(e),at(i)]}function Bt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Rt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Zt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Nt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function jt(t){var e=ht(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}c(Et,"areaRingStart$1"),c(St,"areaRingEnd$1"),c(Ot,"areaPointFirst$1"),c(zt,"areaPoint$1"),c(Dt,"area"),c(It,"spherical"),c(At,"cartesian"),c(Bt,"cartesianDot"),c(Rt,"cartesianCross"),c(Zt,"cartesianAddInPlace"),c(Nt,"cartesianScale"),c(jt,"cartesianNormalizeInPlace");var Ht,Gt,Ut,Ft,Wt,Vt,qt,Yt,$t,Kt,Xt,Jt,Qt,te,ee,ie,oe,ne,se,re,ae,le,he,ue,ce,pe,de=H(),_e={point:fe,lineStart:ge,lineEnd:ye,polygonStart:c(function(){_e.point=ve,_e.lineStart=Le,_e.lineEnd=we,de.reset(),Tt.polygonStart()},"polygonStart"),polygonEnd:c(function(){Tt.polygonEnd(),_e.point=fe,_e.lineStart=ge,_e.lineEnd=ye,Pt<0?(Ht=-(Ut=180),Gt=-(Ft=90)):de>W?Ft=90:de<-W&&(Gt=-90),Kt[0]=Ht,Kt[1]=Ut},"polygonEnd"),sphere:c(function(){Ht=-(Ut=180),Gt=-(Ft=90)},"sphere")};function fe(t,e){$t.push(Kt=[Ht=t,Ut=t]),e<Gt&&(Gt=e),e>Ft&&(Ft=e)}function me(t,e){var i=At([t*J,e*J]);if(Yt){var o=Rt(Yt,i),n=Rt([o[1],-o[0],0],o);jt(n),n=It(n);var s,r=t-Wt,a=r>0?1:-1,l=n[0]*X*a,h=Q(r)>180;h^(a*Wt<l&&l<a*t)?(s=n[1]*X)>Ft&&(Ft=s):h^(a*Wt<(l=(l+360)%360-180)&&l<a*t)?(s=-n[1]*X)<Gt&&(Gt=s):(e<Gt&&(Gt=e),e>Ft&&(Ft=e)),h?t<Wt?be(Ht,t)>be(Ht,Ut)&&(Ut=t):be(t,Ut)>be(Ht,Ut)&&(Ht=t):Ut>=Ht?(t<Ht&&(Ht=t),t>Ut&&(Ut=t)):t>Wt?be(Ht,t)>be(Ht,Ut)&&(Ut=t):be(t,Ut)>be(Ht,Ut)&&(Ht=t)}else $t.push(Kt=[Ht=t,Ut=t]);e<Gt&&(Gt=e),e>Ft&&(Ft=e),Yt=i,Wt=t}function ge(){_e.point=me}function ye(){Kt[0]=Ht,Kt[1]=Ut,_e.point=fe,Yt=null}function ve(t,e){if(Yt){var i=t-Wt;de.add(Q(i)>180?i+(i>0?360:-360):i)}else Vt=t,qt=e;Tt.point(t,e),me(t,e)}function Le(){Tt.lineStart()}function we(){ve(Vt,qt),Tt.lineEnd(),Q(de)>W&&(Ht=-(Ut=180)),Kt[0]=Ht,Kt[1]=Ut,Yt=null}function be(t,e){return(e-=t)<0?e+360:e}function xe(t,e){return t[0]-e[0]}function Me(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Ce(t){var e,i,o,n,s,r,a;if(Ft=Ut=-(Ht=Gt=1/0),$t=[],Lt(t,_e),i=$t.length){for($t.sort(xe),e=1,s=[o=$t[0]];e<i;++e)Me(o,(n=$t[e])[0])||Me(o,n[1])?(be(o[0],n[1])>be(o[0],o[1])&&(o[1]=n[1]),be(n[0],o[1])>be(o[0],o[1])&&(o[0]=n[0])):s.push(o=n);for(r=-1/0,e=0,o=s[i=s.length-1];e<=i;o=n,++e)n=s[e],(a=be(o[1],n[0]))>r&&(r=a,Ht=n[0],Ut=o[1])}return $t=Kt=null,Ht===1/0||Gt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ht,Gt],[Ut,Ft]]}c(fe,"boundsPoint$2"),c(me,"linePoint"),c(ge,"boundsLineStart"),c(ye,"boundsLineEnd"),c(ve,"boundsRingPoint"),c(Le,"boundsRingStart"),c(we,"boundsRingEnd"),c(be,"angle"),c(xe,"rangeCompare"),c(Me,"rangeContains"),c(Ce,"bounds");var Pe={sphere:_t,point:ke,lineStart:Ee,lineEnd:ze,polygonStart:c(function(){Pe.lineStart=De,Pe.lineEnd=Ie},"polygonStart"),polygonEnd:c(function(){Pe.lineStart=Ee,Pe.lineEnd=ze},"polygonEnd")};function ke(t,e){t*=J;var i=it(e*=J);Te(i*it(t),i*at(t),at(e))}function Te(t,e,i){++Xt,Qt+=(t-Qt)/Xt,te+=(e-te)/Xt,ee+=(i-ee)/Xt}function Ee(){Pe.point=Se}function Se(t,e){t*=J;var i=it(e*=J);ue=i*it(t),ce=i*at(t),pe=at(e),Pe.point=Oe,Te(ue,ce,pe)}function Oe(t,e){t*=J;var i=it(e*=J),o=i*it(t),n=i*at(t),s=at(e),r=et(ht((r=ce*s-pe*n)*r+(r=pe*o-ue*s)*r+(r=ue*n-ce*o)*r),ue*o+ce*n+pe*s);Jt+=r,ie+=r*(ue+(ue=o)),oe+=r*(ce+(ce=n)),ne+=r*(pe+(pe=s)),Te(ue,ce,pe)}function ze(){Pe.point=ke}function De(){Pe.point=Ae}function Ie(){Be(le,he),Pe.point=ke}function Ae(t,e){le=t,he=e,t*=J,e*=J,Pe.point=Be;var i=it(e);ue=i*it(t),ce=i*at(t),pe=at(e),Te(ue,ce,pe)}function Be(t,e){t*=J;var i=it(e*=J),o=i*it(t),n=i*at(t),s=at(e),r=ce*s-pe*n,a=pe*o-ue*s,l=ue*n-ce*o,h=ht(r*r+a*a+l*l),u=pt(h),c=h&&-u/h;se+=c*r,re+=c*a,ae+=c*l,Jt+=u,ie+=u*(ue+(ue=o)),oe+=u*(ce+(ce=n)),ne+=u*(pe+(pe=s)),Te(ue,ce,pe)}function Re(t){Xt=Jt=Qt=te=ee=ie=oe=ne=se=re=ae=0,Lt(t,Pe);var e=se,i=re,o=ae,n=e*e+i*i+o*o;return n<V&&(e=ie,i=oe,o=ne,Jt<W&&(e=Qt,i=te,o=ee),(n=e*e+i*i+o*o)<V)?[NaN,NaN]:[et(i,e)*X,pt(o/ht(n))*X]}function Ze(t){return function(){return t}}function Ne(t,e){function i(i,o){return i=t(i,o),e(i[0],i[1])}return c(i,"compose"),t.invert&&e.invert&&(i.invert=function(i,o){return(i=e.invert(i,o))&&t.invert(i[0],i[1])}),i}function je(t,e){return[Q(t)>q?t+Math.round(-t/K)*K:t,e]}function He(t,e,i){return(t%=K)?e||i?Ne(Ue(t),Fe(e,i)):Ue(t):e||i?Fe(e,i):je}function Ge(t){return function(e,i){return[(e+=t)>q?e-K:e<-q?e+K:e,i]}}function Ue(t){var e=Ge(t);return e.invert=Ge(-t),e}function Fe(t,e){var i=it(t),o=at(t),n=it(e),s=at(e);function r(t,e){var r=it(e),a=it(t)*r,l=at(t)*r,h=at(e),u=h*i+a*o;return[et(l*n-u*s,a*i-h*o),pt(u*n+l*s)]}return c(r,"rotation"),r.invert=function(t,e){var r=it(e),a=it(t)*r,l=at(t)*r,h=at(e),u=h*n-l*s;return[et(l*n+h*s,a*i+u*o),pt(u*i-a*o)]},r}function We(t){function e(e){return(e=t(e[0]*J,e[1]*J))[0]*=X,e[1]*=X,e}return t=He(t[0]*J,t[1]*J,t.length>2?t[2]*J:0),c(e,"forward"),e.invert=function(e){return(e=t.invert(e[0]*J,e[1]*J))[0]*=X,e[1]*=X,e},e}function Ve(t,e,i,o,n,s){if(i){var r=it(e),a=at(e),l=o*i;null==n?(n=e+o*K,s=e-l/2):(n=qe(r,n),s=qe(r,s),(o>0?n<s:n>s)&&(n+=o*K));for(var h,u=n;o>0?u>s:u<s;u-=l)h=It([r,-a*it(u),-a*at(u)]),t.point(h[0],h[1])}}function qe(t,e){(e=At(e))[0]-=t,jt(e);var i=ct(-e[1]);return((-e[2]<0?-i:i)+K-W)%K}function Ye(){var t,e,i=Ze([0,0]),o=Ze(90),n=Ze(6),s={point:r};function r(i,o){t.push(i=e(i,o)),i[0]*=X,i[1]*=X}function a(){var r=i.apply(this,arguments),a=o.apply(this,arguments)*J,l=n.apply(this,arguments)*J;return t=[],e=He(-r[0]*J,-r[1]*J,0).invert,Ve(s,a,l,1),r={type:"Polygon",coordinates:[t]},t=e=null,r}return c(r,"point"),c(a,"circle"),a.center=function(t){return arguments.length?(i="function"==typeof t?t:Ze([+t[0],+t[1]]),a):i},a.radius=function(t){return arguments.length?(o="function"==typeof t?t:Ze(+t),a):o},a.precision=function(t){return arguments.length?(n="function"==typeof t?t:Ze(+t),a):n},a}function $e(){var t,e=[];return{point:c(function(e,i,o){t.push([e,i,o])},"point"),lineStart:c(function(){e.push(t=[])},"lineStart"),lineEnd:_t,rejoin:c(function(){e.length>1&&e.push(e.pop().concat(e.shift()))},"rejoin"),result:c(function(){var i=e;return e=[],t=null,i},"result")}}function Ke(t,e){return Q(t[0]-e[0])<W&&Q(t[1]-e[1])<W}function Xe(t,e,i,o){this.x=t,this.z=e,this.o=i,this.e=o,this.v=!1,this.n=this.p=null}function Je(t,e,i,o,n){var s,r,a=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,i,o=t[0],r=t[e];if(Ke(o,r)){if(!o[2]&&!r[2]){for(n.lineStart(),s=0;s<e;++s)n.point((o=t[s])[0],o[1]);return void n.lineEnd()}r[0]+=2e-6}a.push(i=new Xe(o,t,null,!0)),l.push(i.o=new Xe(o,null,i,!1)),a.push(i=new Xe(r,t,null,!1)),l.push(i.o=new Xe(r,null,i,!0))}}),a.length){for(l.sort(e),Qe(a),Qe(l),s=0,r=l.length;s<r;++s)l[s].e=i=!i;for(var h,u,c=a[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,n.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,r=h.length;s<r;++s)n.point((u=h[s])[0],u[1]);else o(p.x,p.n.x,1,n);p=p.n}else{if(d)for(h=p.p.z,s=h.length-1;s>=0;--s)n.point((u=h[s])[0],u[1]);else o(p.x,p.p.x,-1,n);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);n.lineEnd()}}}function Qe(t){if(e=t.length){for(var e,i,o=0,n=t[0];++o<e;)n.n=i=t[o],i.p=n,n=i;n.n=i=t[0],i.p=n}}c(ke,"centroidPoint$1"),c(Te,"centroidPointCartesian"),c(Ee,"centroidLineStart$1"),c(Se,"centroidLinePointFirst"),c(Oe,"centroidLinePoint"),c(ze,"centroidLineEnd$1"),c(De,"centroidRingStart$1"),c(Ie,"centroidRingEnd$1"),c(Ae,"centroidRingPointFirst"),c(Be,"centroidRingPoint"),c(Re,"centroid"),c(Ze,"constant$1"),c(Ne,"compose"),c(je,"rotationIdentity"),je.invert=je,c(He,"rotateRadians"),c(Ge,"forwardRotationLambda"),c(Ue,"rotationLambda"),c(Fe,"rotationPhiGamma"),c(We,"rotation"),c(Ve,"circleStream"),c(qe,"circleRadius"),c(Ye,"circle$1"),c($e,"clipBuffer"),c(Ke,"pointEqual"),c(Xe,"Intersection"),c(Je,"clipRejoin"),c(Qe,"link");var ti=H();function ei(t){return Q(t[0])<=q?t[0]:lt(t[0])*((Q(t[0])+q)%K-q)}function ii(t,e){var i=ei(e),o=e[1],n=at(o),s=[at(i),-it(i),0],r=0,a=0;ti.reset(),1===n?o=Y+W:-1===n&&(o=-Y-W);for(var l=0,h=t.length;l<h;++l)if(c=(u=t[l]).length)for(var u,c,p=u[c-1],d=ei(p),_=p[1]/2+$,f=at(_),m=it(_),g=0;g<c;++g,d=v,f=w,m=b,p=y){var y=u[g],v=ei(y),L=y[1]/2+$,w=at(L),b=it(L),x=v-d,M=x>=0?1:-1,C=M*x,P=C>q,k=f*w;if(ti.add(et(k*M*at(C),m*b+k*it(C))),r+=P?x+M*K:x,P^d>=i^v>=i){var T=Rt(At(p),At(y));jt(T);var E=Rt(s,T);jt(E);var S=(P^x>=0?-1:1)*pt(E[2]);(o>S||o===S&&(T[0]||T[1]))&&(a+=P^x>=0?1:-1)}}return(r<-W||r<W&&ti<-W)^1&a}function oi(t,i,o,n){return function(s){var r,a,l,h=i(s),u=$e(),p=i(u),d=!1,_={point:f,lineStart:g,lineEnd:y,polygonStart:c(function(){_.point=v,_.lineStart=L,_.lineEnd=w,a=[],r=[]},"polygonStart"),polygonEnd:c(function(){_.point=f,_.lineStart=g,_.lineEnd=y,a=e.merge(a);var t=ii(r,n);a.length?(d||(s.polygonStart(),d=!0),Je(a,si,t,o,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),o(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),a=r=null},"polygonEnd"),sphere:c(function(){s.polygonStart(),s.lineStart(),o(null,null,1,s),s.lineEnd(),s.polygonEnd()},"sphere")};function f(e,i){t(e,i)&&s.point(e,i)}function m(t,e){h.point(t,e)}function g(){_.point=m,h.lineStart()}function y(){_.point=f,h.lineEnd()}function v(t,e){l.push([t,e]),p.point(t,e)}function L(){p.lineStart(),l=[]}function w(){v(l[0][0],l[0][1]),p.lineEnd();var t,e,i,o,n=p.clean(),h=u.result(),c=h.length;if(l.pop(),r.push(l),l=null,c)if(1&n){if((e=(i=h[0]).length-1)>0){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((o=i[t])[0],o[1]);s.lineEnd()}}else c>1&&2&n&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ni))}return c(f,"point"),c(m,"pointLine"),c(g,"lineStart"),c(y,"lineEnd"),c(v,"pointRing"),c(L,"ringStart"),c(w,"ringEnd"),_}}function ni(t){return t.length>1}function si(t,e){return((t=t.x)[0]<0?t[1]-Y-W:Y-t[1])-((e=e.x)[0]<0?e[1]-Y-W:Y-e[1])}c(ei,"longitude"),c(ii,"polygonContains"),c(oi,"clip"),c(ni,"validSegment"),c(si,"compareIntersection");const ri=oi(function(){return!0},ai,hi,[-q,-Y]);function ai(t){var e,i=NaN,o=NaN,n=NaN;return{lineStart:c(function(){t.lineStart(),e=1},"lineStart"),point:c(function(s,r){var a=s>0?q:-q,l=Q(s-i);Q(l-q)<W?(t.point(i,o=(o+r)/2>0?Y:-Y),t.point(n,o),t.lineEnd(),t.lineStart(),t.point(a,o),t.point(s,o),e=0):n!==a&&l>=q&&(Q(i-n)<W&&(i-=n*W),Q(s-a)<W&&(s-=a*W),o=li(i,o,s,r),t.point(n,o),t.lineEnd(),t.lineStart(),t.point(a,o),e=0),t.point(i=s,o=r),n=a},"point"),lineEnd:c(function(){t.lineEnd(),i=o=NaN},"lineEnd"),clean:c(function(){return 2-e},"clean")}}function li(t,e,i,o){var n,s,r=at(t-i);return Q(r)>W?tt((at(e)*(s=it(o))*at(i)-at(o)*(n=it(e))*at(t))/(n*s*r)):(e+o)/2}function hi(t,e,i,o){var n;if(null==t)n=i*Y,o.point(-q,n),o.point(0,n),o.point(q,n),o.point(q,0),o.point(q,-n),o.point(0,-n),o.point(-q,-n),o.point(-q,0),o.point(-q,n);else if(Q(t[0]-e[0])>W){var s=t[0]<e[0]?q:-q;n=i*s/2,o.point(-s,n),o.point(0,n),o.point(s,n)}else o.point(e[0],e[1])}function ui(t){var e=it(t),i=6*J,o=e>0,n=Q(e)>W;function s(e,o,n,s){Ve(s,t,i,n,e,o)}function r(t,i){return it(t)*it(i)>e}function a(t){var e,i,s,a,u;return{lineStart:c(function(){a=s=!1,u=1},"lineStart"),point:c(function(c,p){var d,_=[c,p],f=r(c,p),m=o?f?0:h(c,p):f?h(c+(c<0?q:-q),p):0;if(!e&&(a=s=f)&&t.lineStart(),f!==s&&(!(d=l(e,_))||Ke(e,d)||Ke(_,d))&&(_[2]=1),f!==s)u=0,f?(t.lineStart(),d=l(_,e),t.point(d[0],d[1])):(d=l(e,_),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(n&&e&&o^f){var g;m&i||!(g=l(_,e,!0))||(u=0,o?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!f||e&&Ke(e,_)||t.point(_[0],_[1]),e=_,s=f,i=m},"point"),lineEnd:c(function(){s&&t.lineEnd(),e=null},"lineEnd"),clean:c(function(){return u|(a&&s)<<1},"clean")}}function l(t,i,o){var n=[1,0,0],s=Rt(At(t),At(i)),r=Bt(s,s),a=s[0],l=r-a*a;if(!l)return!o&&t;var h=e*r/l,u=-e*a/l,c=Rt(n,s),p=Nt(n,h);Zt(p,Nt(s,u));var d=c,_=Bt(p,d),f=Bt(d,d),m=_*_-f*(Bt(p,p)-1);if(!(m<0)){var g=ht(m),y=Nt(d,(-_-g)/f);if(Zt(y,p),y=It(y),!o)return y;var v,L=t[0],w=i[0],b=t[1],x=i[1];w<L&&(v=L,L=w,w=v);var M=w-L,C=Q(M-q)<W;if(!C&&x<b&&(v=b,b=x,x=v),C||M<W?C?b+x>0^y[1]<(Q(y[0]-L)<W?b:x):b<=y[1]&&y[1]<=x:M>q^(L<=y[0]&&y[0]<=w)){var P=Nt(d,(-_+g)/f);return Zt(P,p),[y,It(P)]}}}function h(e,i){var n=o?t:q-t,s=0;return e<-n?s|=1:e>n&&(s|=2),i<-n?s|=4:i>n&&(s|=8),s}return c(s,"interpolate"),c(r,"visible"),c(a,"clipLine"),c(l,"intersect"),c(h,"code"),oi(r,a,s,o?[0,-t]:[-q,t-q])}function ci(t,e,i,o,n,s){var r,a=t[0],l=t[1],h=0,u=1,c=e[0]-a,p=e[1]-l;if(r=i-a,c||!(r>0)){if(r/=c,c<0){if(r<h)return;r<u&&(u=r)}else if(c>0){if(r>u)return;r>h&&(h=r)}if(r=n-a,c||!(r<0)){if(r/=c,c<0){if(r>u)return;r>h&&(h=r)}else if(c>0){if(r<h)return;r<u&&(u=r)}if(r=o-l,p||!(r>0)){if(r/=p,p<0){if(r<h)return;r<u&&(u=r)}else if(p>0){if(r>u)return;r>h&&(h=r)}if(r=s-l,p||!(r<0)){if(r/=p,p<0){if(r>u)return;r>h&&(h=r)}else if(p>0){if(r<h)return;r<u&&(u=r)}return h>0&&(t[0]=a+h*c,t[1]=l+h*p),u<1&&(e[0]=a+u*c,e[1]=l+u*p),!0}}}}}c(ai,"clipAntimeridianLine"),c(li,"clipAntimeridianIntersect"),c(hi,"clipAntimeridianInterpolate"),c(ui,"clipCircle"),c(ci,"clipLine");var pi=1e9,di=-pi;function _i(t,i,o,n){function s(e,s){return t<=e&&e<=o&&i<=s&&s<=n}function r(e,s,r,l){var u=0,c=0;if(null==e||(u=a(e,r))!==(c=a(s,r))||h(e,s)<0^r>0)do{l.point(0===u||3===u?t:o,u>1?n:i)}while((u=(u+r+4)%4)!==c);else l.point(s[0],s[1])}function a(e,n){return Q(e[0]-t)<W?n>0?0:3:Q(e[0]-o)<W?n>0?2:1:Q(e[1]-i)<W?n>0?1:0:n>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var i=a(t,1),o=a(e,1);return i!==o?i-o:0===i?e[1]-t[1]:1===i?t[0]-e[0]:2===i?t[1]-e[1]:e[0]-t[0]}return c(s,"visible"),c(r,"interpolate"),c(a,"corner"),c(l,"compareIntersection"),c(h,"comparePoint"),function(a){var h,u,p,d,_,f,m,g,y,v,L,w=a,b=$e(),x={point:M,lineStart:T,lineEnd:E,polygonStart:P,polygonEnd:k};function M(t,e){s(t,e)&&w.point(t,e)}function C(){for(var e=0,i=0,o=u.length;i<o;++i)for(var s,r,a=u[i],l=1,h=a.length,c=a[0],p=c[0],d=c[1];l<h;++l)s=p,r=d,p=(c=a[l])[0],d=c[1],r<=n?d>n&&(p-s)*(n-r)>(d-r)*(t-s)&&++e:d<=n&&(p-s)*(n-r)<(d-r)*(t-s)&&--e;return e}function P(){w=b,h=[],u=[],L=!0}function k(){var t=C(),i=L&&t,o=(h=e.merge(h)).length;(i||o)&&(a.polygonStart(),i&&(a.lineStart(),r(null,null,1,a),a.lineEnd()),o&&Je(h,l,t,r,a),a.polygonEnd()),w=a,h=u=p=null}function T(){x.point=S,u&&u.push(p=[]),v=!0,y=!1,m=g=NaN}function E(){h&&(S(d,_),f&&y&&b.rejoin(),h.push(b.result())),x.point=M,y&&w.lineEnd()}function S(e,r){var a=s(e,r);if(u&&p.push([e,r]),v)d=e,_=r,f=a,v=!1,a&&(w.lineStart(),w.point(e,r));else if(a&&y)w.point(e,r);else{var l=[m=Math.max(di,Math.min(pi,m)),g=Math.max(di,Math.min(pi,g))],h=[e=Math.max(di,Math.min(pi,e)),r=Math.max(di,Math.min(pi,r))];ci(l,h,t,i,o,n)?(y||(w.lineStart(),w.point(l[0],l[1])),w.point(h[0],h[1]),a||w.lineEnd(),L=!1):a&&(w.lineStart(),w.point(e,r),L=!1)}m=e,g=r,y=a}return c(M,"point"),c(C,"polygonInside"),c(P,"polygonStart"),c(k,"polygonEnd"),c(T,"lineStart"),c(E,"lineEnd"),c(S,"linePoint"),x}}function fi(){var t,e,i,o=0,n=0,s=960,r=500;return i={stream:c(function(i){return t&&e===i?t:t=_i(o,n,s,r)(e=i)},"stream"),extent:c(function(a){return arguments.length?(o=+a[0][0],n=+a[0][1],s=+a[1][0],r=+a[1][1],t=e=null,i):[[o,n],[s,r]]},"extent")}}c(_i,"clipRectangle"),c(fi,"extent");var mi,gi,yi,vi=H(),Li={sphere:_t,point:_t,lineStart:wi,lineEnd:_t,polygonStart:_t,polygonEnd:_t};function wi(){Li.point=xi,Li.lineEnd=bi}function bi(){Li.point=Li.lineEnd=_t}function xi(t,e){mi=t*=J,gi=at(e*=J),yi=it(e),Li.point=Mi}function Mi(t,e){t*=J;var i=at(e*=J),o=it(e),n=Q(t-mi),s=it(n),r=o*at(n),a=yi*i-gi*o*s,l=gi*i+yi*o*s;vi.add(et(ht(r*r+a*a),l)),mi=t,gi=i,yi=o}function Ci(t){return vi.reset(),Lt(t,Li),+vi}c(wi,"lengthLineStart"),c(bi,"lengthLineEnd"),c(xi,"lengthPointFirst$1"),c(Mi,"lengthPoint$1"),c(Ci,"length");var Pi=[null,null],ki={type:"LineString",coordinates:Pi};function Ti(t,e){return Pi[0]=t,Pi[1]=e,Ci(ki)}c(Ti,"distance");var Ei={Feature:c(function(t,e){return Oi(t.geometry,e)},"Feature"),FeatureCollection:c(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)if(Oi(i[o].geometry,e))return!0;return!1},"FeatureCollection")},Si={Sphere:c(function(){return!0},"Sphere"),Point:c(function(t,e){return zi(t.coordinates,e)},"Point"),MultiPoint:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(zi(i[o],e))return!0;return!1},"MultiPoint"),LineString:c(function(t,e){return Di(t.coordinates,e)},"LineString"),MultiLineString:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(Di(i[o],e))return!0;return!1},"MultiLineString"),Polygon:c(function(t,e){return Ii(t.coordinates,e)},"Polygon"),MultiPolygon:c(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(Ii(i[o],e))return!0;return!1},"MultiPolygon"),GeometryCollection:c(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)if(Oi(i[o],e))return!0;return!1},"GeometryCollection")};function Oi(t,e){return!(!t||!Si.hasOwnProperty(t.type))&&Si[t.type](t,e)}function zi(t,e){return 0===Ti(t,e)}function Di(t,e){for(var i,o,n,s=0,r=t.length;s<r;s++){if(0===(o=Ti(t[s],e)))return!0;if(s>0&&(n=Ti(t[s],t[s-1]))>0&&i<=n&&o<=n&&(i+o-n)*(1-Math.pow((i-o)/n,2))<V*n)return!0;i=o}return!1}function Ii(t,e){return!!ii(t.map(Ai),Bi(e))}function Ai(t){return(t=t.map(Bi)).pop(),t}function Bi(t){return[t[0]*J,t[1]*J]}function Ri(t,e){return(t&&Ei.hasOwnProperty(t.type)?Ei[t.type]:Oi)(t,e)}function Zi(t,i,o){var n=e.range(t,i-W,o).concat(i);return function(t){return n.map(function(e){return[t,e]})}}function Ni(t,i,o){var n=e.range(t,i-W,o).concat(i);return function(t){return n.map(function(e){return[e,t]})}}function ji(){var t,i,o,n,s,r,a,l,h,u,p,d,_=10,f=_,m=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:L()}}function L(){return e.range(ot(n/m)*m,o,m).map(p).concat(e.range(ot(l/g)*g,a,g).map(d)).concat(e.range(ot(i/_)*_,t,_).filter(function(t){return Q(t%m)>W}).map(h)).concat(e.range(ot(r/f)*f,s,f).filter(function(t){return Q(t%g)>W}).map(u))}return c(v,"graticule"),c(L,"lines"),v.lines=function(){return L().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[p(n).concat(d(a).slice(1),p(o).reverse().slice(1),d(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(n=+t[0][0],o=+t[1][0],l=+t[0][1],a=+t[1][1],n>o&&(t=n,n=o,o=t),l>a&&(t=l,l=a,a=t),v.precision(y)):[[n,l],[o,a]]},v.extentMinor=function(e){return arguments.length?(i=+e[0][0],t=+e[1][0],r=+e[0][1],s=+e[1][1],i>t&&(e=i,i=t,t=e),r>s&&(e=r,r=s,s=e),v.precision(y)):[[i,r],[t,s]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(m=+t[0],g=+t[1],v):[m,g]},v.stepMinor=function(t){return arguments.length?(_=+t[0],f=+t[1],v):[_,f]},v.precision=function(e){return arguments.length?(y=+e,h=Zi(r,s,90),u=Ni(i,t,y),p=Zi(l,a,90),d=Ni(n,o,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Hi(){return ji()()}function Gi(t,e){var i=t[0]*J,o=t[1]*J,n=e[0]*J,s=e[1]*J,r=it(o),a=at(o),l=it(s),h=at(s),u=r*it(i),c=r*at(i),p=l*it(n),d=l*at(n),_=2*pt(ht(dt(s-o)+r*l*dt(n-i))),f=at(_),m=_?function(t){var e=at(t*=_)/f,i=at(_-t)/f,o=i*u+e*p,n=i*c+e*d,s=i*a+e*h;return[et(n,o)*X,et(s,ht(o*o+n*n))*X]}:function(){return[i*X,o*X]};return m.distance=_,m}function Ui(t){return t}c(Oi,"containsGeometry"),c(zi,"containsPoint"),c(Di,"containsLine"),c(Ii,"containsPolygon"),c(Ai,"ringRadians"),c(Bi,"pointRadians"),c(Ri,"contains"),c(Zi,"graticuleX"),c(Ni,"graticuleY"),c(ji,"graticule"),c(Hi,"graticule10"),c(Gi,"interpolate"),c(Ui,"identity$2");var Fi,Wi,Vi,qi,Yi=H(),$i=H(),Ki={point:_t,lineStart:_t,lineEnd:_t,polygonStart:c(function(){Ki.lineStart=Xi,Ki.lineEnd=to},"polygonStart"),polygonEnd:c(function(){Ki.lineStart=Ki.lineEnd=Ki.point=_t,Yi.add(Q($i)),$i.reset()},"polygonEnd"),result:c(function(){var t=Yi/2;return Yi.reset(),t},"result")};function Xi(){Ki.point=Ji}function Ji(t,e){Ki.point=Qi,Fi=Vi=t,Wi=qi=e}function Qi(t,e){$i.add(qi*t-Vi*e),Vi=t,qi=e}function to(){Qi(Fi,Wi)}c(Xi,"areaRingStart"),c(Ji,"areaPointFirst"),c(Qi,"areaPoint"),c(to,"areaRingEnd");var eo=1/0,io=eo,oo=-eo,no=oo,so={point:ro,lineStart:_t,lineEnd:_t,polygonStart:_t,polygonEnd:_t,result:c(function(){var t=[[eo,io],[oo,no]];return oo=no=-(io=eo=1/0),t},"result")};function ro(t,e){t<eo&&(eo=t),t>oo&&(oo=t),e<io&&(io=e),e>no&&(no=e)}c(ro,"boundsPoint$1");var ao,lo,ho,uo,co=0,po=0,_o=0,fo=0,mo=0,go=0,yo=0,vo=0,Lo=0,wo={point:bo,lineStart:xo,lineEnd:Po,polygonStart:c(function(){wo.lineStart=ko,wo.lineEnd=To},"polygonStart"),polygonEnd:c(function(){wo.point=bo,wo.lineStart=xo,wo.lineEnd=Po},"polygonEnd"),result:c(function(){var t=Lo?[yo/Lo,vo/Lo]:go?[fo/go,mo/go]:_o?[co/_o,po/_o]:[NaN,NaN];return co=po=_o=fo=mo=go=yo=vo=Lo=0,t},"result")};function bo(t,e){co+=t,po+=e,++_o}function xo(){wo.point=Mo}function Mo(t,e){wo.point=Co,bo(ho=t,uo=e)}function Co(t,e){var i=t-ho,o=e-uo,n=ht(i*i+o*o);fo+=n*(ho+t)/2,mo+=n*(uo+e)/2,go+=n,bo(ho=t,uo=e)}function Po(){wo.point=bo}function ko(){wo.point=Eo}function To(){So(ao,lo)}function Eo(t,e){wo.point=So,bo(ao=ho=t,lo=uo=e)}function So(t,e){var i=t-ho,o=e-uo,n=ht(i*i+o*o);fo+=n*(ho+t)/2,mo+=n*(uo+e)/2,go+=n,yo+=(n=uo*t-ho*e)*(ho+t),vo+=n*(uo+e),Lo+=3*n,bo(ho=t,uo=e)}function Oo(t){this._context=t}c(bo,"centroidPoint"),c(xo,"centroidLineStart"),c(Mo,"centroidPointFirstLine"),c(Co,"centroidPointLine"),c(Po,"centroidLineEnd"),c(ko,"centroidRingStart"),c(To,"centroidRingEnd"),c(Eo,"centroidPointFirstRing"),c(So,"centroidPointRing"),c(Oo,"PathContext"),Oo.prototype={_radius:4.5,pointRadius:c(function(t){return this._radius=t,this},"pointRadius"),polygonStart:c(function(){this._line=0},"polygonStart"),polygonEnd:c(function(){this._line=NaN},"polygonEnd"),lineStart:c(function(){this._point=0},"lineStart"),lineEnd:c(function(){0===this._line&&this._context.closePath(),this._point=NaN},"lineEnd"),point:c(function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,K)}},"point"),result:_t};var zo,Do,Io,Ao,Bo,Ro=H(),Zo={point:_t,lineStart:c(function(){Zo.point=No},"lineStart"),lineEnd:c(function(){zo&&jo(Do,Io),Zo.point=_t},"lineEnd"),polygonStart:c(function(){zo=!0},"polygonStart"),polygonEnd:c(function(){zo=null},"polygonEnd"),result:c(function(){var t=+Ro;return Ro.reset(),t},"result")};function No(t,e){Zo.point=jo,Do=Ao=t,Io=Bo=e}function jo(t,e){Ao-=t,Bo-=e,Ro.add(ht(Ao*Ao+Bo*Bo)),Ao=t,Bo=e}function Ho(){this._string=[]}function Go(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Uo(t,e){var i,o,n=4.5;function s(t){return t&&("function"==typeof n&&o.pointRadius(+n.apply(this,arguments)),Lt(t,i(o))),o.result()}return c(s,"path"),s.area=function(t){return Lt(t,i(Ki)),Ki.result()},s.measure=function(t){return Lt(t,i(Zo)),Zo.result()},s.bounds=function(t){return Lt(t,i(so)),so.result()},s.centroid=function(t){return Lt(t,i(wo)),wo.result()},s.projection=function(e){return arguments.length?(i=null==e?(t=null,Ui):(t=e).stream,s):t},s.context=function(t){return arguments.length?(o=null==t?(e=null,new Ho):new Oo(e=t),"function"!=typeof n&&o.pointRadius(n),s):e},s.pointRadius=function(t){return arguments.length?(n="function"==typeof t?t:(o.pointRadius(+t),+t),s):n},s.projection(t).context(e)}function Fo(t){return{stream:Wo(t)}}function Wo(t){return function(e){var i=new Vo;for(var o in t)i[o]=t[o];return i.stream=e,i}}function Vo(){}function qo(t,e,i){var o=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),Lt(i,t.stream(so)),e(so.result()),null!=o&&t.clipExtent(o),t}function Yo(t,e,i){return qo(t,function(i){var o=e[1][0]-e[0][0],n=e[1][1]-e[0][1],s=Math.min(o/(i[1][0]-i[0][0]),n/(i[1][1]-i[0][1])),r=+e[0][0]+(o-s*(i[1][0]+i[0][0]))/2,a=+e[0][1]+(n-s*(i[1][1]+i[0][1]))/2;t.scale(150*s).translate([r,a])},i)}function $o(t,e,i){return Yo(t,[[0,0],e],i)}function Ko(t,e,i){return qo(t,function(i){var o=+e,n=o/(i[1][0]-i[0][0]),s=(o-n*(i[1][0]+i[0][0]))/2,r=-n*i[0][1];t.scale(150*n).translate([s,r])},i)}function Xo(t,e,i){return qo(t,function(i){var o=+e,n=o/(i[1][1]-i[0][1]),s=-n*i[0][0],r=(o-n*(i[1][1]+i[0][1]))/2;t.scale(150*n).translate([s,r])},i)}c(No,"lengthPointFirst"),c(jo,"lengthPoint"),c(Ho,"PathString"),Ho.prototype={_radius:4.5,_circle:Go(4.5),pointRadius:c(function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},"pointRadius"),polygonStart:c(function(){this._line=0},"polygonStart"),polygonEnd:c(function(){this._line=NaN},"polygonEnd"),lineStart:c(function(){this._point=0},"lineStart"),lineEnd:c(function(){0===this._line&&this._string.push("Z"),this._point=NaN},"lineEnd"),point:c(function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Go(this._radius)),this._string.push("M",t,",",e,this._circle)}},"point"),result:c(function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null},"result")},c(Go,"circle"),c(Uo,"d3GeoPath"),c(Fo,"d3GeoTransform"),c(Wo,"transformer"),c(Vo,"TransformStream"),Vo.prototype={constructor:Vo,point:c(function(t,e){this.stream.point(t,e)},"point"),sphere:c(function(){this.stream.sphere()},"sphere"),lineStart:c(function(){this.stream.lineStart()},"lineStart"),lineEnd:c(function(){this.stream.lineEnd()},"lineEnd"),polygonStart:c(function(){this.stream.polygonStart()},"polygonStart"),polygonEnd:c(function(){this.stream.polygonEnd()},"polygonEnd")},c(qo,"fit"),c(Yo,"fitExtent$1"),c($o,"fitSize$1"),c(Ko,"fitWidth"),c(Xo,"fitHeight");var Jo=it(30*J);function Qo(t,e){return+e?en(t,e):tn(t)}function tn(t){return Wo({point:c(function(e,i){e=t(e,i),this.stream.point(e[0],e[1])},"point")})}function en(t,e){function i(o,n,s,r,a,l,h,u,c,p,d,_,f,m){var g=h-o,y=u-n,v=g*g+y*y;if(v>4*e&&f--){var L=r+p,w=a+d,b=l+_,x=ht(L*L+w*w+b*b),M=pt(b/=x),C=Q(Q(b)-1)<W||Q(s-c)<W?(s+c)/2:et(w,L),P=t(C,M),k=P[0],T=P[1],E=k-o,S=T-n,O=y*E-g*S;(O*O/v>e||Q((g*E+y*S)/v-.5)>.3||r*p+a*d+l*_<Jo)&&(i(o,n,s,r,a,l,k,T,C,L/=x,w/=x,b,f,m),m.point(k,T),i(k,T,C,L,w,b,h,u,c,p,d,_,f,m))}}return c(i,"resampleLineTo"),function(e){var o,n,s,r,a,l,h,u,p,d,_,f,m={point:g,lineStart:y,lineEnd:L,polygonStart:c(function(){e.polygonStart(),m.lineStart=w},"polygonStart"),polygonEnd:c(function(){e.polygonEnd(),m.lineStart=y},"polygonEnd")};function g(i,o){i=t(i,o),e.point(i[0],i[1])}function y(){u=NaN,m.point=v,e.lineStart()}function v(o,n){var s=At([o,n]),r=t(o,n);i(u,p,h,d,_,f,u=r[0],p=r[1],h=o,d=s[0],_=s[1],f=s[2],16,e),e.point(u,p)}function L(){m.point=g,e.lineEnd()}function w(){y(),m.point=b,m.lineEnd=x}function b(t,e){v(o=t,e),n=u,s=p,r=d,a=_,l=f,m.point=v}function x(){i(u,p,h,d,_,f,n,s,o,r,a,l,16,e),m.lineEnd=L,L()}return c(g,"point"),c(y,"lineStart"),c(v,"linePoint"),c(L,"lineEnd"),c(w,"ringStart"),c(b,"ringPoint"),c(x,"ringEnd"),m}}c(Qo,"resample$1"),c(tn,"resampleNone"),c(en,"resample");var on=Wo({point:c(function(t,e){this.stream.point(t*J,e*J)},"point")});function nn(t){return Wo({point:c(function(e,i){var o=t(e,i);return this.stream.point(o[0],o[1])},"point")})}function sn(t,e,i,o,n){function s(s,r){return[e+t*(s*=o),i-t*(r*=n)]}return c(s,"transform"),s.invert=function(s,r){return[(s-e)/t*o,(i-r)/t*n]},s}function rn(t,e,i,o,n,s){var r=it(s),a=at(s),l=r*t,h=a*t,u=r/t,p=a/t,d=(a*i-r*e)/t,_=(a*e+r*i)/t;function f(t,s){return[l*(t*=o)-h*(s*=n)+e,i-h*t-l*s]}return c(f,"transform"),f.invert=function(t,e){return[o*(u*t-p*e+d),n*(_-p*t-u*e)]},f}function an(t){return ln(function(){return t})()}function ln(t){var e,i,o,n,s,r,a,l,h,u,p=150,d=480,_=250,f=0,m=0,g=0,y=0,v=0,L=0,w=1,b=1,x=null,M=ri,C=null,P=Ui,k=.5;function T(t){return l(t[0]*J,t[1]*J)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*X,t[1]*X]}function S(){var t=rn(p,0,0,w,b,L).apply(null,e(f,m)),o=(L?rn:sn)(p,d-t[0],_-t[1],w,b,L);return i=He(g,y,v),a=Ne(e,o),l=Ne(i,a),r=Qo(a,k),O()}function O(){return h=u=null,T}return c(T,"projection"),c(E,"invert"),T.stream=function(t){return h&&u===t?h:h=on(nn(i)(M(r(P(u=t)))))},T.preclip=function(t){return arguments.length?(M=t,x=void 0,O()):M},T.postclip=function(t){return arguments.length?(P=t,C=o=n=s=null,O()):P},T.clipAngle=function(t){return arguments.length?(M=+t?ui(x=t*J):(x=null,ri),O()):x*X},T.clipExtent=function(t){return arguments.length?(P=null==t?(C=o=n=s=null,Ui):_i(C=+t[0][0],o=+t[0][1],n=+t[1][0],s=+t[1][1]),O()):null==C?null:[[C,o],[n,s]]},T.scale=function(t){return arguments.length?(p=+t,S()):p},T.translate=function(t){return arguments.length?(d=+t[0],_=+t[1],S()):[d,_]},T.center=function(t){return arguments.length?(f=t[0]%360*J,m=t[1]%360*J,S()):[f*X,m*X]},T.rotate=function(t){return arguments.length?(g=t[0]%360*J,y=t[1]%360*J,v=t.length>2?t[2]%360*J:0,S()):[g*X,y*X,v*X]},T.angle=function(t){return arguments.length?(L=t%360*J,S()):L*X},T.reflectX=function(t){return arguments.length?(w=t?-1:1,S()):w<0},T.reflectY=function(t){return arguments.length?(b=t?-1:1,S()):b<0},T.precision=function(t){return arguments.length?(r=Qo(a,k=t*t),O()):ht(k)},T.fitExtent=function(t,e){return Yo(T,t,e)},T.fitSize=function(t,e){return $o(T,t,e)},T.fitWidth=function(t,e){return Ko(T,t,e)},T.fitHeight=function(t,e){return Xo(T,t,e)},c(S,"recenter"),c(O,"reset"),function(){return e=t.apply(this,arguments),T.invert=e.invert&&E,S()}}function hn(t){var e=0,i=q/3,o=ln(t),n=o(e,i);return n.parallels=function(t){return arguments.length?o(e=t[0]*J,i=t[1]*J):[e*X,i*X]},n}function un(t){var e=it(t);function i(t,i){return[t*e,at(i)/e]}return c(i,"forward"),i.invert=function(t,i){return[t/e,pt(i*e)]},i}function cn(t,e){var i=at(t),o=(i+at(e))/2;if(Q(o)<W)return un(t);var n=1+i*(2*o-i),s=ht(n)/o;function r(t,e){var i=ht(n-2*o*at(e))/o;return[i*at(t*=o),s-i*it(t)]}return c(r,"project"),r.invert=function(t,e){var i=s-e,r=et(t,Q(i))*lt(i);return i*o<0&&(r-=q*lt(t)*lt(i)),[r/o,pt((n-(t*t+i*i)*o*o)/(2*o))]},r}function pn(){return hn(cn).scale(155.424).center([0,33.6442])}function dn(){return pn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function _n(t){var e=t.length;return{point:c(function(i,o){for(var n=-1;++n<e;)t[n].point(i,o)},"point"),sphere:c(function(){for(var i=-1;++i<e;)t[i].sphere()},"sphere"),lineStart:c(function(){for(var i=-1;++i<e;)t[i].lineStart()},"lineStart"),lineEnd:c(function(){for(var i=-1;++i<e;)t[i].lineEnd()},"lineEnd"),polygonStart:c(function(){for(var i=-1;++i<e;)t[i].polygonStart()},"polygonStart"),polygonEnd:c(function(){for(var i=-1;++i<e;)t[i].polygonEnd()},"polygonEnd")}}function fn(){var t,e,i,o,n,s,r=dn(),a=pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:c(function(t,e){s=[t,e]},"point")};function u(t){var e=t[0],r=t[1];return s=null,i.point(e,r),s||(o.point(e,r),s)||(n.point(e,r),s)}function p(){return t=e=null,u}return c(u,"albersUsa"),u.invert=function(t){var e=r.scale(),i=r.translate(),o=(t[0]-i[0])/e,n=(t[1]-i[1])/e;return(n>=.12&&n<.234&&o>=-.425&&o<-.214?a:n>=.166&&n<.234&&o>=-.214&&o<-.115?l:r).invert(t)},u.stream=function(i){return t&&e===i?t:t=_n([r.stream(e=i),a.stream(i),l.stream(i)])},u.precision=function(t){return arguments.length?(r.precision(t),a.precision(t),l.precision(t),p()):r.precision()},u.scale=function(t){return arguments.length?(r.scale(t),a.scale(.35*t),l.scale(t),u.translate(r.translate())):r.scale()},u.translate=function(t){if(!arguments.length)return r.translate();var e=r.scale(),s=+t[0],u=+t[1];return i=r.translate(t).clipExtent([[s-.455*e,u-.238*e],[s+.455*e,u+.238*e]]).stream(h),o=a.translate([s-.307*e,u+.201*e]).clipExtent([[s-.425*e+W,u+.12*e+W],[s-.214*e-W,u+.234*e-W]]).stream(h),n=l.translate([s-.205*e,u+.212*e]).clipExtent([[s-.214*e+W,u+.166*e+W],[s-.115*e-W,u+.234*e-W]]).stream(h),p()},u.fitExtent=function(t,e){return Yo(u,t,e)},u.fitSize=function(t,e){return $o(u,t,e)},u.fitWidth=function(t,e){return Ko(u,t,e)},u.fitHeight=function(t,e){return Xo(u,t,e)},c(p,"reset"),u.scale(1070)}function mn(t){return function(e,i){var o=it(e),n=it(i),s=t(o*n);return[s*n*at(e),s*at(i)]}}function gn(t){return function(e,i){var o=ht(e*e+i*i),n=t(o),s=at(n),r=it(n);return[et(e*s,o*r),pt(o&&i*s/o)]}}c(nn,"transformRotate"),c(sn,"scaleTranslate"),c(rn,"scaleTranslateRotate"),c(an,"projection"),c(ln,"projectionMutator"),c(hn,"conicProjection"),c(un,"cylindricalEqualAreaRaw"),c(cn,"conicEqualAreaRaw"),c(pn,"geoConicEqualArea"),c(dn,"geoAlbers"),c(_n,"multiplex$1"),c(fn,"albersUsa"),c(mn,"azimuthalRaw"),c(gn,"azimuthalInvert");var yn=mn(function(t){return ht(2/(1+t))});function vn(){return an(yn).scale(124.75).clipAngle(179.999)}yn.invert=gn(function(t){return 2*pt(t/2)}),c(vn,"azimuthalEqualArea");var Ln=mn(function(t){return(t=ct(t))&&t/at(t)});function wn(){return an(Ln).scale(79.4188).clipAngle(179.999)}function bn(t,e){return[t,st(ut((Y+e)/2))]}function xn(){return Mn(bn).scale(961/K)}function Mn(t){var e,i,o,n=an(t),s=n.center,r=n.scale,a=n.translate,l=n.clipExtent,h=null;function u(){var s=q*r(),a=n(We(n.rotate()).invert([0,0]));return l(null==h?[[a[0]-s,a[1]-s],[a[0]+s,a[1]+s]]:t===bn?[[Math.max(a[0]-s,h),e],[Math.min(a[0]+s,i),o]]:[[h,Math.max(a[1]-s,e)],[i,Math.min(a[1]+s,o)]])}return n.scale=function(t){return arguments.length?(r(t),u()):r()},n.translate=function(t){return arguments.length?(a(t),u()):a()},n.center=function(t){return arguments.length?(s(t),u()):s()},n.clipExtent=function(t){return arguments.length?(null==t?h=e=i=o=null:(h=+t[0][0],e=+t[0][1],i=+t[1][0],o=+t[1][1]),u()):null==h?null:[[h,e],[i,o]]},c(u,"reclip"),u()}function Cn(t){return ut((Y+t)/2)}function Pn(t,e){var i=it(t),o=t===e?at(t):st(i/it(e))/st(Cn(e)/Cn(t)),n=i*rt(Cn(t),o)/o;if(!o)return bn;function s(t,e){n>0?e<-Y+W&&(e=-Y+W):e>Y-W&&(e=Y-W);var i=n/rt(Cn(e),o);return[i*at(o*t),n-i*it(o*t)]}return c(s,"project"),s.invert=function(t,e){var i=n-e,s=lt(o)*ht(t*t+i*i),r=et(t,Q(i))*lt(i);return i*o<0&&(r-=q*lt(t)*lt(i)),[r/o,2*tt(rt(n/s,1/o))-Y]},s}function kn(){return hn(Pn).scale(109.5).parallels([30,30])}function Tn(t,e){return[t,e]}function En(){return an(Tn).scale(152.63)}function Sn(t,e){var i=it(t),o=t===e?at(t):(i-it(e))/(e-t),n=i/o+t;if(Q(o)<W)return Tn;function s(t,e){var i=n-e,s=o*t;return[i*at(s),n-i*it(s)]}return c(s,"project"),s.invert=function(t,e){var i=n-e,s=et(t,Q(i))*lt(i);return i*o<0&&(s-=q*lt(t)*lt(i)),[s/o,n-lt(o)*ht(t*t+i*i)]},s}function On(){return hn(Sn).scale(131.154).center([0,13.9389])}Ln.invert=gn(function(t){return t}),c(wn,"azimuthalEquidistant"),c(bn,"mercatorRaw"),bn.invert=function(t,e){return[t,2*tt(nt(e))-Y]},c(xn,"mercator"),c(Mn,"mercatorProjection"),c(Cn,"tany"),c(Pn,"conicConformalRaw"),c(kn,"conicConformal"),c(Tn,"equirectangularRaw"),Tn.invert=Tn,c(En,"equirectangular"),c(Sn,"conicEquidistantRaw"),c(On,"conicEquidistant");var zn=1.340264,Dn=-.081106,In=893e-6,An=.003796,Bn=ht(3)/2;function Rn(t,e){var i=pt(Bn*at(e)),o=i*i,n=o*o*o;return[t*it(i)/(Bn*(zn+3*Dn*o+n*(7*In+9*An*o))),i*(zn+Dn*o+n*(In+An*o))]}function Zn(){return an(Rn).scale(177.158)}function Nn(t,e){var i=it(e),o=it(t)*i;return[i*at(t)/o,at(e)/o]}function jn(){return an(Nn).scale(144.049).clipAngle(60)}function Hn(){var t,e,i,o,n,s,r,a=1,l=0,h=0,u=1,p=1,d=0,_=null,f=1,m=1,g=Wo({point:c(function(t,e){var i=L([t,e]);this.stream.point(i[0],i[1])},"point")}),y=Ui;function v(){return f=a*u,m=a*p,s=r=null,L}function L(i){var o=i[0]*f,n=i[1]*m;if(d){var s=n*t-o*e;o=o*t+n*e,n=s}return[o+l,n+h]}return c(v,"reset"),c(L,"projection"),L.invert=function(i){var o=i[0]-l,n=i[1]-h;if(d){var s=n*t+o*e;o=o*t-n*e,n=s}return[o/f,n/m]},L.stream=function(t){return s&&r===t?s:s=g(y(r=t))},L.postclip=function(t){return arguments.length?(y=t,_=i=o=n=null,v()):y},L.clipExtent=function(t){return arguments.length?(y=null==t?(_=i=o=n=null,Ui):_i(_=+t[0][0],i=+t[0][1],o=+t[1][0],n=+t[1][1]),v()):null==_?null:[[_,i],[o,n]]},L.scale=function(t){return arguments.length?(a=+t,v()):a},L.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],v()):[l,h]},L.angle=function(i){return arguments.length?(e=at(d=i%360*J),t=it(d),v()):d*X},L.reflectX=function(t){return arguments.length?(u=t?-1:1,v()):u<0},L.reflectY=function(t){return arguments.length?(p=t?-1:1,v()):p<0},L.fitExtent=function(t,e){return Yo(L,t,e)},L.fitSize=function(t,e){return $o(L,t,e)},L.fitWidth=function(t,e){return Ko(L,t,e)},L.fitHeight=function(t,e){return Xo(L,t,e)},L}function Gn(t,e){var i=e*e,o=i*i;return[t*(.8707-.131979*i+o*(o*(.003971*i-.001529*o)-.013791)),e*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))]}function Un(){return an(Gn).scale(175.295)}function Fn(t,e){return[it(e)*at(t),at(e)]}function Wn(){return an(Fn).scale(249.5).clipAngle(90.000001)}function Vn(t,e){var i=it(e),o=1+it(t)*i;return[i*at(t)/o,at(e)/o]}function qn(){return an(Vn).scale(250).clipAngle(142)}function Yn(t,e){return[st(ut((Y+e)/2)),-t]}function $n(){var t=Mn(Yn),e=t.center,i=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?i([t[0],t[1],t.length>2?t[2]+90:90]):[(t=i())[0],t[1],t[2]-90]},i([0,0,90]).scale(159.155)}c(Rn,"equalEarthRaw"),Rn.invert=function(t,e){for(var i,o=e,n=o*o,s=n*n*n,r=0;r<12&&(s=(n=(o-=i=(o*(zn+Dn*n+s*(In+An*n))-e)/(zn+3*Dn*n+s*(7*In+9*An*n)))*o)*n*n,!(Q(i)<V));++r);return[Bn*t*(zn+3*Dn*n+s*(7*In+9*An*n))/it(o),pt(at(o)/Bn)]},c(Zn,"equalEarth"),c(Nn,"gnomonicRaw"),Nn.invert=gn(tt),c(jn,"gnomonic"),c(Hn,"identity$1"),c(Gn,"naturalEarth1Raw"),Gn.invert=function(t,e){var i,o=e,n=25;do{var s=o*o,r=s*s;o-=i=(o*(1.007226+s*(.015085+r*(.028874*s-.044475-.005916*r)))-e)/(1.007226+s*(.045255+r*(.259866*s-.311325-.005916*11*r)))}while(Q(i)>W&&--n>0);return[t/(.8707+(s=o*o)*(s*(s*s*s*(.003971-.001529*s)-.013791)-.131979)),o]},c(Un,"naturalEarth1"),c(Fn,"orthographicRaw"),Fn.invert=gn(pt),c(Wn,"orthographic"),c(Vn,"stereographicRaw"),Vn.invert=gn(function(t){return 2*tt(t)}),c(qn,"stereographic"),c(Yn,"transverseMercatorRaw"),Yn.invert=function(t,e){return[-e,2*tt(nt(t))-Y]},c($n,"transverseMercator");const Kn=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:dn,geoAlbersUsa:fn,geoArea:Dt,geoAzimuthalEqualArea:vn,geoAzimuthalEqualAreaRaw:yn,geoAzimuthalEquidistant:wn,geoAzimuthalEquidistantRaw:Ln,geoBounds:Ce,geoCentroid:Re,geoCircle:Ye,geoClipAntimeridian:ri,geoClipCircle:ui,geoClipExtent:fi,geoClipRectangle:_i,geoConicConformal:kn,geoConicConformalRaw:Pn,geoConicEqualArea:pn,geoConicEqualAreaRaw:cn,geoConicEquidistant:On,geoConicEquidistantRaw:Sn,geoContains:Ri,geoDistance:Ti,geoEqualEarth:Zn,geoEqualEarthRaw:Rn,geoEquirectangular:En,geoEquirectangularRaw:Tn,geoGnomonic:jn,geoGnomonicRaw:Nn,geoGraticule:ji,geoGraticule10:Hi,geoIdentity:Hn,geoInterpolate:Gi,geoLength:Ci,geoMercator:xn,geoMercatorRaw:bn,geoNaturalEarth1:Un,geoNaturalEarth1Raw:Gn,geoOrthographic:Wn,geoOrthographicRaw:Fn,geoPath:Uo,geoProjection:an,geoProjectionMutator:ln,geoRotation:We,geoStereographic:qn,geoStereographicRaw:Vn,geoStream:Lt,geoTransform:Fo,geoTransverseMercator:$n,geoTransverseMercatorRaw:Yn},Symbol.toStringTag,{value:"Module"}));function Xn(){}c(Xn,"noop");let Jn=1/0,Qn=Jn,ts=-Jn,es=ts;function is(t,e){t<Jn&&(Jn=t),t>ts&&(ts=t),e<Qn&&(Qn=e),e>es&&(es=e)}c(is,"boundsPoint");const os={point:is,lineStart:Xn,lineEnd:Xn,polygonStart:Xn,polygonEnd:Xn,result(){const t=[[Jn,Qn],[ts,es]];return ts=es=-(Qn=Jn=1/0),t}};function ns(t,e,i){const o=e[1][0]-e[0][0],n=e[1][1]-e[0][1],s=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=s&&t.clipExtent(null),Lt(i,t.stream(os));const r=os.result(),a=Math.min(o/(r[1][0]-r[0][0]),n/(r[1][1]-r[0][1])),l=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,h=+e[0][1]+(n-a*(r[1][1]+r[0][1]))/2;return null!=s&&t.clipExtent(s),t.scale(150*a).translate([l,h])}function ss(t,e,i){return ns(t,[[0,0],e],i)}c(ns,"fitExtent"),c(ss,"fitSize");const rs=class _Geohash{encode(t,e,i){if(void 0===i){for(let i=1;i<=12;i++){const o=this.encode(t,e,i),n=this.decode(o);if(n.lat===t&&n.lon===e)return o}i=12}if(t=Number(t),e=Number(e),i=Number(i),isNaN(t)||isNaN(e)||isNaN(i))throw new Error("Invalid geohash");let o=0,n=0,s=!0,r="",a=-90,l=90,h=-180,u=180;for(;r.length<i;){if(s){const t=(h+u)/2;e>t?(o=2*o+1,h=t):(o*=2,u=t)}else{const e=(a+l)/2;t>e?(o=2*o+1,a=e):(o*=2,l=e)}s=!s,5===++n&&(r+=_Geohash.base32.charAt(o),n=0,o=0)}return r}decode(t){const e=this.bounds(t),i=e.sw.lat,o=e.sw.lon,n=e.ne.lat,s=e.ne.lon;let r=(i+n)/2,a=(o+s)/2;return r=Number(r.toFixed(Math.floor(2-Math.log(n-i)/Math.LN10))),a=Number(a.toFixed(Math.floor(2-Math.log(s-o)/Math.LN10))),{lat:r,lon:a}}bounds(t){if(0===t.length)throw new Error("Invalid geohash");t=t.toLowerCase();let e=!0,i=-90,o=90,n=-180,s=180;for(let r=0;r<t.length;r++){const a=t.charAt(r),l=_Geohash.base32.indexOf(a);if(-1===l)throw new Error("Invalid geohash");for(let t=4;t>=0;t--){const r=l>>t&1;if(e){const t=(n+s)/2;1===r?n=t:s=t}else{const t=(i+o)/2;1===r?i=t:o=t}e=!e}}return{sw:{lat:i,lon:n},ne:{lat:o,lon:s}}}adjacent(t,e){if(t=t.toLowerCase(),e=e.toLowerCase(),0===t.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(e))throw new Error("Invalid direction");const i=t.slice(-1);let o=t.slice(0,-1);const n=t.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[e][n].indexOf(i)&&""!==o&&(o=this.adjacent(o,e)),o+_Geohash.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[e][n].indexOf(i))}neighbours(t){return{n:this.adjacent(t,"n"),ne:this.adjacent(this.adjacent(t,"n"),"e"),e:this.adjacent(t,"e"),se:this.adjacent(this.adjacent(t,"s"),"e"),s:this.adjacent(t,"s"),sw:this.adjacent(this.adjacent(t,"s"),"w"),w:this.adjacent(t,"w"),nw:this.adjacent(this.adjacent(t,"n"),"w")}}contained(t,e,i,o,n){(isNaN(e)||e>=90)&&(e=89),(isNaN(i)||i>180)&&(i=180),(isNaN(o)||o<=-90)&&(o=-89),(isNaN(t)||t<-180)&&(t=-180),n=n||1;const s=this.encode(e,t,n),r=this.encode(e,i,n),a=this.encode(o,i,n);let l=s,h=0,u=-1;const c=[s,a];let p=this.adjacent(s,"e");for(;p!==a;)c.push(p),++h,p===r||u===h?(u=h+1,h=0,p=this.adjacent(l,"s"),l=p):p=this.adjacent(p,"e");return c}calculateWidthDegrees(t){let e;e=t%2==0?-1:-.5;return 180/Math.pow(2,2.5*t+e)}width(t){return 180/(2^(5*t+t%2)/2-1)}};c(rs,"Geohash"),p(rs,"base32","0123456789bcdefghjkmnpqrstuvwxyz");let as=rs;function ls(t){const e=t.length;return{point(i,o){let n=-1;for(;++n<e;)t[n].point(i,o)},sphere(){let i=-1;for(;++i<e;)t[i].sphere()},lineStart(){let i=-1;for(;++i<e;)t[i].lineStart()},lineEnd(){let i=-1;for(;++i<e;)t[i].lineEnd()},polygonStart(){let i=-1;for(;++i<e;)t[i].polygonStart()},polygonEnd(){let i=-1;for(;++i<e;)t[i].polygonEnd()}}}function hs(){let t,e;const i=1e-6,o=dn();let n;const s=pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]);let r;const a=pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]);let l;const h=pn().rotate([66,0]).center([0,18]).parallels([8,18]);let u,p;const d={point:c((t,e)=>{p=[t,e]},"point")},_=c(function(t){const e=t[0],i=t[1];return p=null,n.point(e,i),p||(r.point(e,i),p)||(l.point(e,i),p)||u.point(e,i),p},"albersUsa");function f(){return t=e=null,_}return _.invert=function(t){const e=o.scale(),i=o.translate(),n=(t[0]-i[0])/e,r=(t[1]-i[1])/e;return(r>=.12&&r<.234&&n>=-.425&&n<-.214?s:r>=.166&&r<.234&&n>=-.214&&n<-.115?a:r>=.204&&r<.234&&n>=.32&&n<.38?h:o).invert(t)},_.stream=function(i){return t&&e===i?t:t=ls([o.stream(e=i),s.stream(i),a.stream(i),h.stream(i)])},_.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),a.precision(t),h.precision(t),f()):o.precision()},_.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),a.scale(t),h.scale(t),_.translate(o.translate())):o.scale()},_.translate=function(t){if(!arguments.length)return o.translate();const e=o.scale(),c=+t[0],p=+t[1];return n=o.translate(t).clipExtent([[c-.455*e,p-.238*e],[c+.455*e,p+.238*e]]).stream(d),r=s.translate([c-.307*e,p+.201*e]).clipExtent([[c-.425*e+i,p+.12*e+i],[c-.214*e-i,p+.234*e-i]]).stream(d),l=a.translate([c-.205*e,p+.212*e]).clipExtent([[c-.214*e+i,p+.166*e+i],[c-.115*e-i,p+.234*e-i]]).stream(d),u=h.translate([c+.35*e,p+.224*e]).clipExtent([[c+.32*e,p+.204*e],[c+.38*e,p+.234*e]]).stream(d),f()},_.fitExtent=function(t,e){return ns(_,t,e)},_.fitSize=function(t,e){return ss(_,t,e)},c(f,"reset"),_.scale(1070)}c(ls,"multiplex"),c(hs,"albersUsaPr");var us=(t=>(t[t.AzimuthalEqualArea=0]="AzimuthalEqualArea",t[t.AzimuthalEquidistant=1]="AzimuthalEquidistant",t[t.Gnomonic=2]="Gnomonic",t[t.Orthographic=3]="Orthographic",t[t.Stereographic=4]="Stereographic",t[t.AlbersUsa=5]="AlbersUsa",t[t.AlbersUsaPr=6]="AlbersUsaPr",t[t.Albers=7]="Albers",t[t.ConicConformal=8]="ConicConformal",t[t.ConicEqualArea=9]="ConicEqualArea",t[t.ConicEquidistant=10]="ConicEquidistant",t[t.Equirectangular=11]="Equirectangular",t[t.Mercator=12]="Mercator",t[t.TransverseMercator=13]="TransverseMercator",t))(us||{});const cs=[],ps={};for(const L in us)"string"==typeof L&&(cs.push(L),ps[L]="AlbersUsaPr"===L?hs:Kn[`geo${L}`]);function ds(t){const e=ps[t];return e?e():(console.warn("Unknown projection: "+t),xn())}c(ds,"resolve");const _s=2048/Math.PI,fs=class _Layered extends e.SVGZoomWidget{_autoScaleOnNextRender;_layersTarget;_prevAutoScaleMode;_d3GeoProjection;constructor(){super(),this._drawStartPos="origin",this.projection("Mercator")}data(t){const e=super.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),e}enter(t,e){super.enter(t,e),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")}update(t,i){super.update(t,i);const o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),n=this;o.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=e.select(this),t._domElement=n._parentOverlay.append("div"),t.layerEnter(n,t._svgElement,t._domElement)}).merge(o).each(function(t){t.layerUpdate(n)}),o.exit().each(function(t){t.layerExit(n),t._domElement.remove()}).remove(),o.order(),this.onZoomed()}exit(t,e){super.exit(t,e)}onZoomed(){super.onZoomed();const t=this._layersTarget.selectAll(".layerContainer"),e=this;t.each(function(t){t.layerZoomed(e)})}preRender(t){return Promise.all(this.layers().filter(function(t){return t.visible()}).map(function(t){return t.layerPreRender()}))}render(t){const i=this;return this.preRender().then(function(){e.SVGZoomWidget.prototype.render.call(i,function(e){i._layersTarget&&(i._renderCount&&i._autoScaleOnNextRender||i._prevAutoScaleMode!==i.autoScaleMode())?(i._prevAutoScaleMode=i.autoScaleMode(),i._autoScaleOnNextRender=!1,i.autoScale(),t&&t(e)):t&&t(e)})}),this}project(t,e){t>=90?t=89:t<=-90&&(t=-89);return this._d3GeoProjection([e,t])}invert(t,e){return this._d3GeoProjection.invert([t,e])}getBounds(){const t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}}autoScale(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}}};c(fs,"Layered");let ms=fs;ms.prototype._class+=" map_Layered",ms.prototype.publish("projection",null,"set","Map projection type",cs),ms.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),ms.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),ms.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),ms.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),ms.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});const gs=ms.prototype.projection;ms.prototype.projection=function(t){const e=gs.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=ds(t).scale(_s).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=Uo().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};const ys=class _Layer extends ms{_svgElement;_domElement;_topoJsonPromise;constructor(){super(),i.ITooltip.call(this)}svgGlowID(){return""}layerEnter(t,e,i){this._parentOverlay=t._parentOverlay}enter(t,e){super.enter(t,e),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)}layerUpdate(t,e){}update(t,e){super.update(t,e),this.layerUpdate(this)}onZoomed(){super.onZoomed(),this.layerUpdate(this)}layerExit(t){}exit(t,e){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),super.exit(t,e)}layerPreRender(){return Promise.resolve()}render(t){const e=this,i=arguments;return this.layerPreRender().then(function(){ms.prototype.render.apply(e,i)}),this}layerZoomed(t){}};c(ys,"Layer");let vs=ys;vs.prototype._class+=" map_Layer",vs.prototype.implements(i.ITooltip.prototype);const Ls=class _CanvasPinLayer extends vs{_pinsTransform;pins;_prevProjection;constructor(){super(),this.pins=new j}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._pinsTransform=i.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.target(this._pinsTransform.node())}layerUpdate(t){vs.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.resize(t.size()),this.layerZoomed(t)}layerExit(t){delete this._prevProjection,this.pins.target(null),delete this.pins}layerZoomed(t){vs.prototype.layerZoomed.apply(this,arguments);const e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),o=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map(function(n){const s=e?n[e.idx]:n[0],r=i?n[i.idx]:n[1],a=o?n[o.idx]:1,l=t.zoomTranslate(),h=t.project(s,r),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],a]}):[]).render()}};c(Ls,"CanvasPinLayer");let ws=Ls;function bs(t){return t}function xs(t){if(null==t)return bs;var e,i,o=t.scale[0],n=t.scale[1],s=t.translate[0],r=t.translate[1];return function(t,a){a||(e=i=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*o+s,u[1]=(i+=t[1])*n+r;l<h;)u[l]=t[l],++l;return u}}function Ms(t,e){for(var i,o=t.length,n=o-e;n<--o;)i=t[n],t[n++]=t[o],t[o]=i}function Cs(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return Ps(t,e)})}:Ps(t,e)}function Ps(t,e){var i=e.id,o=e.bbox,n=null==e.properties?{}:e.properties,s=ks(t,e);return null==i&&null==o?{type:"Feature",properties:n,geometry:s}:null==o?{type:"Feature",id:i,properties:n,geometry:s}:{type:"Feature",id:i,bbox:o,properties:n,geometry:s}}function ks(t,e){var i=xs(t.transform),o=t.arcs;function n(t,e){e.length&&e.pop();for(var n=o[t<0?~t:t],s=0,r=n.length;s<r;++s)e.push(i(n[s],s));t<0&&Ms(e,r)}function s(t){return i(t)}function r(t){for(var e=[],i=0,o=t.length;i<o;++i)n(t[i],e);return e.length<2&&e.push(e[0]),e}function a(t){for(var e=r(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(a)}function h(t){var e,i=t.type;switch(i){case"GeometryCollection":return{type:i,geometries:t.geometries.map(h)};case"Point":e=s(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(s);break;case"LineString":e=r(t.arcs);break;case"MultiLineString":e=t.arcs.map(r);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:i,coordinates:e}}return c(n,"arc"),c(s,"point"),c(r,"line"),c(a,"ring"),c(l,"polygon"),c(h,"geometry"),h(e)}function Ts(t,e){var i={},o={},n={},s=[],r=-1;function a(e){var i,o=t.arcs[e<0?~e:e],n=o[0];return t.transform?(i=[0,0],o.forEach(function(t){i[0]+=t[0],i[1]+=t[1]})):i=o[o.length-1],e<0?[i,n]:[n,i]}function l(t,e){for(var o in t){var n=t[o];delete e[n.start],delete n.start,delete n.end,n.forEach(function(t){i[t<0?~t:t]=1}),s.push(n)}}return e.forEach(function(i,o){var n,s=t.arcs[i<0?~i:i];s.length<3&&!s[1][0]&&!s[1][1]&&(n=e[++r],e[r]=i,e[o]=n)}),e.forEach(function(t){var e,i,s=a(t),r=s[0],l=s[1];if(e=n[r])if(delete n[e.end],e.push(t),e.end=l,i=o[l]){delete o[i.start];var h=i===e?e:e.concat(i);o[h.start=e.start]=n[h.end=i.end]=h}else o[e.start]=n[e.end]=e;else if(e=o[l])if(delete o[e.start],e.unshift(t),e.start=r,i=n[r]){delete n[i.end];var u=i===e?e:i.concat(e);o[u.start=i.start]=n[u.end=e.end]=u}else o[e.start]=n[e.end]=e;else o[(e=[t]).start=r]=n[e.end=l]=e}),c(a,"ends"),c(l,"flush"),l(n,o),l(o,n),e.forEach(function(t){i[t<0?~t:t]||s.push([t])}),s}function Es(t){return ks(t,Ss.apply(this,arguments))}function Ss(t,e,i){var o,n,s;if(arguments.length>1)o=Os(t,e,i);else for(n=0,o=new Array(s=t.arcs.length);n<s;++n)o[n]=n;return{type:"MultiLineString",arcs:Ts(t,o)}}function Os(t,e,i){var o,n=[],s=[];function r(t){var e=t<0?~t:t;(s[e]||(s[e]=[])).push({i:t,g:o})}function a(t){t.forEach(r)}function l(t){t.forEach(a)}function h(t){t.forEach(l)}function u(t){switch(o=t,t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"LineString":a(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":h(t.arcs)}}return c(r,"extract0"),c(a,"extract1"),c(l,"extract2"),c(h,"extract3"),c(u,"geometry"),u(e),s.forEach(null==i?function(t){n.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&n.push(t[0].i)}),n}ws.prototype._class+=" map_CanvasPinLayer",ws.prototype.publishProxy("clusterMode","pins","clusterMode"),ws.prototype.publishProxy("allCircles","pins","allCircles"),ws.prototype.publishProxy("showQuadtree","pins","showQuadtree"),ws.prototype.publishProxy("useAveragePos","pins","useAveragePos"),ws.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),ws.prototype.publishProxy("enableClustering","pins","enableClustering"),ws.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),ws.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),ws.prototype.publishProxy("searchRectMult","pins","searchRectMult"),ws.prototype.publishProxy("pinHeight","pins","pinHeight"),ws.prototype.publishProxy("pinWidth","pins","pinWidth"),ws.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),ws.prototype.publishProxy("pinFontSize","pins","pinFontSize"),ws.prototype.publishProxy("arrowHeight","pins","arrowHeight"),ws.prototype.publishProxy("arrowWidth","pins","arrowWidth"),ws.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),ws.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),ws.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),ws.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),c(bs,"identity"),c(xs,"transform"),c(Ms,"reverse"),c(Cs,"feature_default"),c(Ps,"feature"),c(ks,"object"),c(Ts,"stitch"),c(Es,"mesh"),c(Ss,"meshArcs"),c(Os,"extractArcs");let zs=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Ds(t){if(!arguments.length)return zs;const e=zs;return zs=t,e}c(Ds,"topoJsonFolder");const Is=class _Choropleth extends vs{_dataMap={};_path=e.select(null);_dataMinWeight;_dataMaxWeight;_choroplethData;_choroplethTransform;_choropleth;_choroTopology;_choroTopologyObjects;_prevProjection;_prevInternalOnly;constructor(){super(),e.Utility.SimpleSelectionMixin.call(this)}data(t){const e=vs.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;const t=this;this.data().forEach(function(e){t._dataMap[e[0]]=e,(!t._dataMinWeight||e[1]<t._dataMinWeight)&&(t._dataMinWeight=e[1]),(!t._dataMaxWeight||e[1]>t._dataMaxWeight)&&(t._dataMaxWeight=e[1])})}return e}getDataBounds(){const t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}}autoScale(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=e,this._choroplethData=this._choroplethTransform.append("g").attr("class","data"),this._choropleth=this._choroplethTransform.append("path").attr("class","mesh")}layerUpdate(t,e){if(vs.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._choroplethTransform.style("stroke",this.meshColor()).style("opacity",this.opacity()),!this.visible()||!this.meshVisible())return this._choropleth.attr("d",""),void delete this._prevProjection;(e||this._prevProjection!==t.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr("d",t._d3GeoPath(Es(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(t,e){return t!==e}:function(t,e){return!0}))),this._prevProjection=t.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style("stroke-width",this.meshStrokeWidth()).style("stroke",this.meshColor())}layerExit(t){delete this._prevProjection,delete this._prevInternalOnly}layerZoomed(t){super.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":.5/t.zoomScale()+"px")}click(t,e,i){}dblclick(t,e,i){}};c(Is,"Choropleth");let As=Is;function Bs(t,i){var o,n,s,r,a=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,p=null,d=0;function _(t){var e,i=h.status;if(!i&&Zs(h)||i>=200&&i<300||304===i){if(s)try{e=s.call(o,h)}catch(n){return void a.call("error",o,n)}else e=h;a.call("load",o,e)}else a.call("error",o,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=_:h.onreadystatechange=function(t){h.readyState>3&&_(t)},c(_,"respond"),h.onprogress=function(t){a.call("progress",o,t)},o={header:c(function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),o)},"header"),mimeType:c(function(t){return arguments.length?(n=null==t?null:t+"",o):n},"mimeType"),responseType:c(function(t){return arguments.length?(r=t,o):r},"responseType"),timeout:c(function(t){return arguments.length?(d=+t,o):d},"timeout"),user:c(function(t){return arguments.length<1?u:(u=null==t?null:t+"",o)},"user"),password:c(function(t){return arguments.length<1?p:(p=null==t?null:t+"",o)},"password"),response:c(function(t){return s=t,o},"response"),get:c(function(t,e){return o.send("GET",t,e)},"get"),post:c(function(t,e){return o.send("POST",t,e)},"post"),send:c(function(e,i,s){return h.open(e,t,!0,u,p),null==n||l.has("accept")||l.set("accept",n+",*/*"),h.setRequestHeader&&l.each(function(t,e){h.setRequestHeader(e,t)}),null!=n&&h.overrideMimeType&&h.overrideMimeType(n),null!=r&&(h.responseType=r),d>0&&(h.timeout=d),null==s&&"function"==typeof i&&(s=i,i=null),null!=s&&1===s.length&&(s=Rs(s)),null!=s&&o.on("error",s).on("load",function(t){s(null,t)}),a.call("beforesend",o,h),h.send(null==i?null:i),o},"send"),abort:c(function(){return h.abort(),o},"abort"),on:c(function(){var t=a.on.apply(a,arguments);return t===a?o:t},"on")},o}function Rs(t){return function(e,i){t(null==e?i:null)}}function Zs(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Ns(t,e){return function(i,o){var n=Bs(i).mimeType(t).response(e);if(null!=o){if("function"!=typeof o)throw new Error("invalid callback: "+o);return n.get(o)}return n}}As.prototype._class+=" map_Choropleth",As.prototype.mixin(e.Utility.SimpleSelectionMixin),As.prototype._palette=e.Palette.rainbow("default"),As.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",As.prototype._palette.switch(),{tags:["Basic","Shared"]}),As.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),As.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),As.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),As.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),As.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),As.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),As.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0}),c(Bs,"request"),c(Rs,"fixCallback"),c(Zs,"hasResponse"),c(Ns,"type$1");const js=Ns("application/json",function(t){return JSON.parse(t.responseText)});let Hs=null,Gs=null,Us=null;const Fs=class _ChoroplethCountries extends As{_choroTopologyObjectsCountries;_choroTopologyObjectsLand;choroPaths;constructor(){super()}layerEnter(t,i,o){As.prototype.layerEnter.apply(this,arguments),this._choroTopology=Hs.topology,this._choroTopologyObjectsCountries=Hs.topology.objects.countries,this._choroTopologyObjectsLand=Hs.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);const n=this;this.tooltipHTML(function(t){return n.tooltipFormat({label:t[0],value:t[1]})})}layerUpdate(t){As.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});const e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e._dataMap[t[0]]&&e.click(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))}).on("dblclick",function(t){e._dataMap[t[0]]&&e.dblclick(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){const i=t._d3GeoPath(Us[e[0]]);return i||console.warn("Unknown Country: "+e),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((t,e)=>{Hs&&t(),js(`${Ds()}/countries.json`,function(e){Hs=e,Gs=Cs(Hs.topology,Hs.topology.objects.countries).features,Us={};for(const t in Gs)Gs[t].id&&Hs.countryNames[Gs[t].id]&&(Us[Hs.countryNames[Gs[t].id].name]=Gs[t]);t()})})),this._topoJsonPromise}};c(Fs,"ChoroplethCountries");let Ws=Fs;Ws.prototype._class+=" map_ChoroplethCountries";const Vs=class _ChoroplethContinents extends Ws{constructor(){super()}layerEnter(t,e,i){Ws.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand}};c(Vs,"ChoroplethContinents");let qs=Vs;qs.prototype._class+=" map_ChoroplethContinents";let Ys=null,$s=null,Ks=null;const Xs=class _ChoroplethCounties extends As{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,i,o){As.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ys.topology,this._choroTopologyObjects=Ys.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);const n=this;this.tooltipHTML(function(t){const e=t[0];return n.tooltipFormat({label:Ys.countyNames[e],value:n._dataMap[e]?n._dataMap[e][1]:"N/A"})})}layerUpdate(t){As.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});const e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){const i=t._d3GeoPath(Ks[e.county]);return i||console.warn("Unknown US County: "+e.county,e),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((t,e)=>{Ys&&t(),js(`${Ds()}/us-counties.json`,function(e){Ys=e,$s=Cs(Ys.topology,Ys.topology.objects.counties).features,Ks={};for(const t in $s)$s[t].id&&(Ks[$s[t].id]=$s[t]);t()})})),this._topoJsonPromise}};c(Xs,"ChoroplethCounties"),p(Xs,"__inputs",[{id:"fips",type:"string"},{id:"value",type:"number"}]);let Js=Xs;Js.prototype._class+=" map_ChoroplethCounties",Js.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");let Qs=null,tr=null,er=null;const ir=class _ChoroplethStates extends As{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,i,o){As.prototype.layerEnter.apply(this,arguments),this._choroTopology=Qs.topology,this._choroTopologyObjects=Qs.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);const n=this;this.tooltipHTML(function(t){const e=er[t[0]].id;return n.tooltipFormat({label:Qs.stateNames[e].name,value:t[1]})})}layerUpdate(t){As.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});const e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){const i=t._d3GeoPath(er[e[0]]);return i||console.warn("Unknown US State: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((t,e)=>{Qs&&t(),js(`${Ds()}/us-states.json`,function(e){Qs=e,tr=Cs(Qs.topology,Qs.topology.objects.states).features,er={};for(const t in tr)tr[t].id&&(er[Qs.stateNames[tr[t].id].code]=tr[t]);t()})})),this._topoJsonPromise}};c(ir,"ChoroplethStates"),p(ir,"__inputs",[{id:"state",type:"string"},{id:"value",type:"number"}]);let or=ir;or.prototype._class+=" map_ChoroplethStates";const nr=class _ChoroplethStatesHeat extends ms{constructor(){super()}};c(nr,"ChoroplethStatesHeat");let sr=nr;sr.prototype._class+=" map_ChoroplethStatesHeat";const rr=class _GeoHash extends vs{_dataMinWeight;_dataMaxWeight;geohash;_geoHashTransform;geoHashPaths;constructor(){super()}data(t){const e=vs.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach(function(t){(!this._dataMinWeight||t[1]<this._dataMinWeight)&&(this._dataMinWeight=t[1]),(!this._dataMaxWeight||t[1]>this._dataMaxWeight)&&(this._dataMaxWeight=t[1])},this)),e}layerEnter(t,i,o){vs.prototype.layerEnter.apply(this,arguments),this.geohash=new as,this._geoHashTransform=i.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)}layerUpdate(t){vs.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._geoHashTransform.style("opacity",this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(".data").data(this.visible()?this.data():[],function(t){return t[0]});const e=this;this.geoHashPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).merge(this.geoHashPaths).attr("d",function(i){const o=e.geohash.bounds(i[0]),n={type:"LineString",coordinates:[[o.sw.lon,o.ne.lat],[o.ne.lon,o.ne.lat],[o.ne.lon,o.sw.lat],[o.sw.lon,o.sw.lat]]};return t._d3GeoPath(n)}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.geoHashPaths.exit().remove()}click(t,e,i){}dblclick(t,e,i){}};c(rr,"GeoHash");let ar=rr;function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}ar.prototype._class+=" map_GeoHash",ar.prototype._palette=e.Palette.rainbow("default"),ar.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ar.prototype._palette.switch(),{tags:["Basic","Shared"]}),ar.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ar.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),ar.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),ar.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),ar.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),c(lr,"getDefaultExportFromCjs");var hr,ur={exports:{}};function cr(){return hr||(hr=1,t=ur,function(){if(null===("undefined"!=typeof window?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t="3.31",e=null,i=null,o=!1,n=[],s=[],r=null,a={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};a.VERSION=t,a.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",a._googleMockApiObject={},a.load=function(t){null===i?!0===o?t&&n.push(t):(o=!0,window[a.WINDOW_CALLBACK_NAME]=function(){l(t)},a.createLoader()):t&&t(i)},a.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=a.createUrl(),document.body.appendChild(e)},a.isLoaded=function(){return null!==i},a.createUrl=function(){var t=a.URL;return t+="?callback="+a.WINDOW_CALLBACK_NAME,a.KEY&&(t+="&key="+a.KEY),a.LIBRARIES.length>0&&(t+="&libraries="+a.LIBRARIES.join(",")),a.CLIENT&&(t+="&client="+a.CLIENT),a.CHANNEL&&(t+="&channel="+a.CHANNEL),a.LANGUAGE&&(t+="&language="+a.LANGUAGE),a.REGION&&(t+="&region="+a.REGION),a.VERSION&&(t+="&v="+a.VERSION),t},a.release=function(l){var h=c(function(){a.KEY=null,a.LIBRARIES=[],a.CLIENT=null,a.CHANNEL=null,a.LANGUAGE=null,a.REGION=null,a.VERSION=t,i=null,o=!1,n=[],s=[],void 0!==window.google&&delete window.google,void 0!==window[a.WINDOW_CALLBACK_NAME]&&delete window[a.WINDOW_CALLBACK_NAME],null!==r&&(a.createLoader=r,r=null),null!==e&&(e.parentElement.removeChild(e),e=null),l&&l()},"release");o?a.load(function(){h()}):h()},a.onLoad=function(t){s.push(t)},a.makeMock=function(){r=a.createLoader,a.createLoader=function(){window.google=a._googleMockApiObject,window[a.WINDOW_CALLBACK_NAME]()}};var l=c(function(t){var e;for(o=!1,null===i&&(i=window.google),e=0;e<s.length;e++)s[e](i);for(t&&t(i),e=0;e<n.length;e++)n[e](i);n=[]},"ready");return a}()}()),ur.exports;var t}c(cr,"requireGoogle");var pr=cr();const dr=lr(pr),_r=dr||d({__proto__:null,default:dr},[pr]);t.google=null;let fr,mr=15e3;function gr(t){mr=t}function yr(e){return fr||(fr=n.promiseTimeout(mr,new Promise(function(i,o){if(t.google)i();else if(e)t.google=e,i();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{_r.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",_r.LIBRARIES=["geometry","drawing"],_r.load(function(e){t.google=e,i()})}catch(n){console.warn(`Failed to initialize Google Map API: ${n.message}`),i()}}})).catch(t=>{console.warn(`Timed out initializing Google Map API after ${mr}ms.`)})),fr}function vr(e,i,o){function n(e,i,o){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=i,this._viewportSurface=o,this._map=e,this.setMap(e);const n=this;t.google.maps.event.addListener(e,"bounds_changed",function(){n.draw()}),t.google.maps.event.addListener(e,"projection_changed",function(){n.draw()}),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return c(n,"Overlay"),n.prototype=t.google.maps.OverlayView.prototype,n.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels");this.getPanes().overlayMouseTarget.appendChild(this.div)},n.prototype.draw=function(){const e=this.getProjection();if(!e)return;const i=this._map.getBounds(),o=e.fromLatLngToDivPixel(i.getCenter()),n=e.fromLatLngToDivPixel(i.getSouthWest()),s=e.fromLatLngToDivPixel(i.getNorthEast()),r={x:n.x,y:s.y},a={x:s.x,y:n.y},l=e.getWorldWidth();for(;a.x<r.x+100;)a.x+=l;for(;r.x>o.x;)r.x-=l,a.x-=l;r.x===this._prevMin.x&&r.y===this._prevMin.y&&a.x===this._prevMax.x&&a.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(r.x).widgetY(r.y).widgetWidth(a.x-r.x).widgetHeight(a.y-r.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=r,this._prevMax=a):this._viewportSurface.lazyRender());const h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));for(;u.x<h.x+100;)u.x+=l;for(;h.x>o.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)},n.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new n(e,i,o)}c(gr,"requireGoogleMapTimeout"),c(yr,"requireGoogleMap"),c(vr,"createOverlay");const Lr=class _UserShapeSelectionBag{_userShapes;mapContext;constructor(t){this._userShapes=[],this.mapContext=t}add(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)}remove(t){const e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)}save(){return this._userShapes.map(t=>this._saveShape(t))}load(t){this._deserializeShapes(t)}_saveShape(t){const e={},i={circle:c(t=>{e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},"circle"),rectangle:c(t=>{e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},"rectangle"),polygon:c(t=>{e.type=t.__hpcc_type;const i=t.getPath();e.vertices=[];for(let o=0;o<i.length;o++)e.vertices.push(i.getAt(o))},"polygon"),polyline:c(t=>{i.polygon(t)},"polyline")};return i[t.__hpcc_type](t),e.strokeWeight=t.strokeWeight,e.fillColor=t.fillColor,e.fillOpacity=t.fillOpacity,e.editable=t.editable,e.clickable=t.clickable||!0,e}_deserializeShapes(e){const i=JSON.parse(e),o=0,n=.45,s="#1f77b4",r=!0,a=!0,l={circle:c((e,i)=>new t.google.maps.Circle({strokeWeight:e.strokeWeight||o,fillColor:e.fillColor||s,fillOpacity:e.fillOpacity||n,editable:e.editable||r,clickable:e.clickable||a,map:i,center:e.pos,radius:e.radius}),"circle"),rectangle:c((e,i)=>new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||o,fillColor:e.fillColor||s,fillOpacity:e.fillOpacity||n,editable:e.editable||r,clickable:e.clickable||a,map:i,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}}),"rectangle"),polygon:c((e,i)=>new t.google.maps.Polygon({strokeWeight:e.strokeWeight||o,fillColor:e.fillColor||s,fillOpacity:e.fillOpacity||n,editable:e.editable||r,clickable:e.clickable||a,map:i,paths:e.vertices}),"polygon"),polyline:c((e,i)=>new t.google.maps.Polyline({strokeWeight:e.strokeWeight||o,fillColor:e.fillColor||s,fillOpacity:e.fillOpacity||n,editable:e.editable||r,clickable:e.clickable||a,map:i,path:e.vertices}),"polyline")};for(let t=0;t<i.length;t++){const e=l[i[t].type](i[t],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:i[t].type,overlay:e})}}};c(Lr,"UserShapeSelectionBag");let wr=Lr;const br=class _GMap extends e.HTMLWidget{_overlay;_userShapes;_worldSurface;_viewportSurface;_googleMapNode;_googleMap;_googleGeocoder;_prevCenterLat;_prevCenterLong;_googleStreetViewService;_googleMapPanorama;_prevZoom;_prevStreetView;_circleMap;_pinMap;_drawingManager;_prevCenterAddress;_userShapeSelection;constructor(){super(),this._tag="div";const e=this;function i(i,o,n){const s=e._overlay.getProjection(),r=s.fromLatLngToDivPixel(new t.google.maps.LatLng(o,n)),a=s.getWorldWidth(),l=parseFloat(i.widgetX()),h=parseFloat(i.widgetY()),u=parseFloat(i.widgetWidth());for(r.x-=l,r.y-=h;r.x<0;)r.x+=a;for(;r.x>u;)r.x-=a;return r}c(i,"calcProjection"),this._userShapes=new wr(this),this._worldSurface=new o.AbsoluteSurface,this._worldSurface.project=function(t,e){return i(this,t,e)},this._viewportSurface=new o.AbsoluteSurface,this._viewportSurface.project=function(t,e){return i(this,t,e)}}data(t){return e.HTMLWidget.prototype.data.apply(this,arguments)}getMapType(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":default:return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID}}getMapOptions(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}}size(i){const o=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",i.width+"px").style("height",i.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),o}enter(i,o){super.enter(i,o);const n=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=vr(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){n.centerLat(n._googleMap.center.lat()),n._prevCenterLat=n.centerLat(),n.centerLong(n._googleMap.center.lng()),n._prevCenterLong=n.centerLong(),n._googleMapPanorama.setPosition({lat:n.centerLat(),lng:n.centerLong()}),n.zoom(n._googleMap.getZoom()),n._prevZoom=n.zoom(),n._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){n.zoom(n._googleMap.zoom),n._prevZoom=n.zoom()}),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){n.streetView(n._googleMapPanorama.getVisible()),n._prevStreetView=n.streetView()}),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();const s={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:s,circleOptions:s,polygonOptions:s}),this.drawingState()&&this._userShapes.load(this.drawingState())}update(e,i){const o=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},function(e,i){if(i===t.google.maps.GeocoderStatus.OK){const t=e[0].geometry.bounds||e[0].geometry.viewport;o._googleMap.fitBounds(t),o.streetView()&&o.useComputedHeading()&&o.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else o.statusError({data:e,status:i})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){_GMap.prototype.onDrawingComplete.apply(o,arguments)})):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))}render(t){const e=this,i=arguments;return yr().then(()=>{super.render.apply(e,i)}),this}streetViewAt(e,i=1e3){const o=this,n=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:i,source:n},function(i,n){if("OK"===n){const n=new t.google.maps.Marker({position:e,map:o._googleMap}),s=t.google.maps.geometry.spherical.computeHeading(i.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));o._googleMapPanorama.setPano(i.location.pano),o._googleMapPanorama.setPov({heading:s,pitch:0}),o.showStreetViewMarker()||n.setVisible(!1),o._googleMapPanorama.setVisible(!0);const r=t.google.maps.event.addListener(o._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(n.setMap(null),t.google.maps.event.removeListener(r))})}else o.statusError({data:i,status:n})})}updateCircles(){function t(t){return t[0]+"_"+t[1]}c(t,"rowID");const i=[],o=e.map(this._circleMap.keys(),function(t){return t});this.data().forEach(function(e){o.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?i.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&o.set(t(e),!0)},this),i.forEach(function(e){const i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);const n=this;o.each(function(t){n._circleMap.get(t).setMap(null),n._circleMap.remove(t)})}updatePins(){function t(t){return t[0]+"_"+t[1]}c(t,"rowID");const i=[],o=[],n=e.map(this._pinMap.keys(),function(t){return t});this.data().forEach(function(e){n.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?i.push(e):e[2]&&this._pinMap.has(t(e))?o.push(e):!e[2]&&this._pinMap.has(t(e))&&n.set(t(e),!0)},this),i.forEach(function(e){const i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),o.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);const s=this;n.each(function(t){s._pinMap.get(t).setMap(null),s._pinMap.remove(t)})}createIcon(t){return{path:"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30",fillColor:t.fillColor,fillOpacity:t.fillOpacity||.8,scale:.5,strokeColor:t.strokeColor||"black",strokeWeight:.25}}createMarker(e,i,o){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,i),animation:t.google.maps.Animation.DROP,title:o.title||"",icon:this.createIcon(o),map:this._googleMap})}createCircle(e,i,o){return o.radius=o.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,i),radius:16093*o.radius/10,fillColor:o.fillColor||"red",strokeColor:o.strokeColor||o.fillColor||"black",strokeWeight:.5,map:this._googleMap})}zoomTo(e,i){if(!this._renderCount)return this;i=i||this.singleZoomToMaxZoom();let o=0;const n=new t.google.maps.LatLngBounds;switch(e.forEach(function(e){const i=new t.google.maps.LatLng(e[0],e[1]);n.extend(i),++o}),o){case 0:break;case 1:this._googleMap.setCenter(n.getCenter()),this._googleMap.setZoom(i);break;default:this._googleMap.fitBounds(n)}return this}zoomToFit(){return this.zoomTo(this.data())}drawingOptions(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager}userShapeSelection(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection}deleteUserShape(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)}onDrawingComplete(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);const i=e.overlay;i.__hpcc_type=e.type,this._userShapes.add(i);const o=this;let n=!1;window.addEventListener("keydown",function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(n=!0)}),window.addEventListener("keyup",function(t){!1===t.ctrlKey&&(n=!1)}),t.google.maps.event.addListener(i,"click",function(t){return o.userShapeSelection(i),t&&!0===n&&(o.deleteUserShape(i),o.drawingState(JSON.stringify(o._userShapes.save()))),!1}),this.userShapeSelection(i),this.drawingState(JSON.stringify(this._userShapes.save()))}}statusError(t){console.warn("Data not found for this location.")}};c(br,"GMap");let xr=br;xr.prototype._class+=" map_GMap",xr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),xr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),xr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),xr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),xr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),xr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),xr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),xr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),xr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),xr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),xr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),xr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),xr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),xr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),xr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),xr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),xr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),xr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),xr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:c(t=>!1===t.drawingTools(),"disable")}),xr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const Mr=class _OverlayLayered extends ms{gmap;surface;constructor(t,e){super(),this.gmap=t,this.surface=e,this.autoScaleMode("none"),this.zoomable(!1).zoomDuration(10)}getProjection(){return this.gmap._overlay.getProjection()}render(t){return super.render(e=>{const i=this.getProjection();if(i){const t=new window.google.maps.LatLng(0,0),e=i.fromLatLngToDivPixel(t),o=this.surface.widgetX(),n=this.surface.widgetY(),s=[e.x-o,e.y-n],r=this.gmap._googleMap.getZoom();this.zoomTo(s,.0625*(1<<r),0)}t&&t(e)}),this}};c(Mr,"OverlayLayered");let Cr=Mr;const Pr=class _GMapLayered extends xr{layered;constructor(){super(),this.layered=new Cr(this,this._viewportSurface),this._viewportSurface.widget(this.layered)}invert(t,e){return this.layered.invert(t,e)}rproject(e,i){const o=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,i));return{lat:o.lat(),lng:o.lng()}}updateCircles(){}updatePins(){}layers(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()}render(t){return super.render(e=>{this.layered.preRender().then(()=>{this.layered.render(e=>{t&&t(e)})})})}};c(Pr,"GMapLayered");let kr=Pr;kr.prototype._class+=" map_GMapLayered";const Tr=class _GMapCounties extends kr{_counties;_view;_palette;_dataMinWeight;_dataMaxWeight;constructor(){super();const t=this;this._counties=(new Js).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",function(e,i,o){t.click(e,i,o)}).on("dblclick",function(e,i,o){t.dblclick(e,i,o)})}enter(t,e){super.enter(t,e),this.layers([this._counties])}update(t,e){this._counties.data(this.data()),super.update(t,e),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight}_prevBounds;render(t){return super.render(e=>{if(this._renderCount>1&&this.autoScale()){const t=this._counties.getDataBounds();if(t.x&&t.y&&(!this._prevBounds||this._prevBounds.x!==t.x||this._prevBounds.y!==t.y||this._prevBounds.width!==t.width||this._prevBounds.height!==t.height)){this._prevBounds=t;const e=this.invert(t.x,t.y),i=this.invert(t.x+t.width,t.y+t.height);e&&i&&this.zoomTo([[e[1],e[0]],[i[1],i[0]]])}}t&&t(e)})}exit(t,e){super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}};c(Tr,"GMapCounties");let Er=Tr;Er.prototype._class+=" map_GMapCounties",Er.prototype.publish("autoScale",!1,"boolean","Auto scale to data");const Sr=class _GMapGraph extends xr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=(new s.Graph).layout("None").zoomable(!1),i=t.render,o=this;t.render=function(t){const n=[],r=[];let a=null;o.data().forEach(function(t){const i=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(i);n.push(l),a&&r.push((new s.Edge).sourceVertex(a).targetVertex(l).sourceMarker("none").targetMarker("arrow")),a=l}),this.data({vertices:n,edges:r});return i.apply(this,arguments)},this._viewportSurface.widget(t)}};c(Sr,"GMapGraph");let Or=Sr;Or.prototype._class+=" map_GMapGraph";const zr=class _GMapHeat extends xr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=new r.HeatMap,e=t.render,i=this;t.render=function(t){return this.data(i.data().map(function(t){const e=i._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]})),e.apply(this,arguments),this},this._viewportSurface.widget(t)}};c(zr,"GMapHeat");let Dr=zr;Dr.prototype._class+=" map_GMapHeat";let Ir=(a=class extends vs{_geohash;_pinsTransform;pinsPaths;constructor(){super(),e.Utility.SimpleSelectionMixin.call(this),this._geohash=new as}pinsData(){const t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),i=this._db.fieldByLabel(this.latColumn()),o=this._db.fieldByLabel(this.longColumn()),n=this;return this.data().filter(function(t){const e=i?t[i.idx]:t[0],s=o?t[o.idx]:t[1];return!n.omitNullLatLong()||0!==e||0!==s}).map(function(n,s){const r={idx:s,lat:i?n[i.idx]:n[0],long:o?n[o.idx]:n[1],ext:n[2]instanceof Object?n[2]:{},origRow:n};if(t)try{const e=this._geohash.bounds(n[t.idx]);r.lat=(e.ne.lat+e.sw.lat)/2,r.long=(e.ne.lon+e.sw.lon)/2}catch(a){}return e&&(r.ext.tooltip=n[e.idx]),r},this)}layerEnter(t,i,o){vs.prototype.layerEnter.apply(this,arguments),this._pinsTransform=i,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})}layerUpdate(t){vs.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],t=>t.idx);const i=this,o=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){i.click(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("dblclick",function(t){i.dblclick(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("mouseover",function(t){e.Platform.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.show.apply(this,arguments)}).each(function(t){const i=e.select(this);i.append("path").attr("class","data"),i.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);o.selectAll("text").style("stroke",this.fontColor()).style("fill",this.fontColor()).style("font-size",this.fontSize()).style("font-family",this.fontFamily()).style("dominant-baseline",this.textBaseline()).attr("dx",0).attr("dy",this.pinTextDY()).text(function(t){return t.ext&&t.ext.text?t.ext.text:""});const n=this.svgPinPath();o.selectAll("path.data").attr("d",n).attr("stroke-width",this.strokeWidth()+"px").style("display",function(e){return t.project(e.lat,e.long)?null:"none"}).style("stroke",function(t){return t.ext&&t.ext.strokeColor?t.ext.strokeColor:i.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:i.fillColor()}),this.pinsPaths.exit().remove()}layerZoomed(t){vs.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",function(e){let i=t.project(e.lat,e.long);return i||(i=[0,0]),"translate("+i[0]+", "+i[1]+")scale("+1/t.zoomScale()+")"})}pinTextDY(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}}svgPinPath(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}}rectanglePinPath(){const t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),o=this.arrowHeight(),n=this.arrowWidth(),s=(t-2*i-n)/2;return"M"+(0-t/2)+","+(0-e+i)+"a"+-i+","+-i+" 0 0 1 "+i+","+-i+"h"+(t+2*-i)+"a"+i+","+i+" 0 0 1 "+i+","+i+"v"+(e+2*-i)+"a"+i+","+i+" 0 0 1 "+-i+","+i+"h"+-s+"l"+-n/2+","+o+"l"+-n/2+","+-o+"h"+-s+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"}rectanglePath(){const t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius();let o=-e/2;return o+=i,"M"+-t/2+","+o+"a"+-i+","+-i+" 0 0 1 "+i+","+-i+"h"+(t+2*-i)+"a"+i+","+i+" 0 0 1 "+i+","+i+"v"+(e+2*-i)+"a"+i+","+i+" 0 0 1 "+-i+","+i+"h"+(2*i-t)+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"}circlePinPath(){const t=this.arrowHeight(),e=this.arrowWidth(),i=e/2,o=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-i+" "+o+", "+(e+i)+" "+o+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"}circlePath(){const t=+this.pinRadius();return`M 0, 0 m ${-t}, 0 a ${t},${t} 0 1,0 ${2*t},0 a ${t},${t} 0 1,0 ${2*-t},0`}click(t,e,i){}dblclick(t,e,i){}},c(a,"Pins"),a);Ir.prototype._class+=" map_Pins",Ir.prototype.mixin(e.Utility.SimpleSelectionMixin),Ir.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),Ir.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),Ir.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Ir.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Ir.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Ir.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),Ir.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),Ir.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),Ir.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),Ir.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),Ir.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),Ir.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),Ir.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),Ir.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:c(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),Ir.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:c(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),Ir.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:c(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),Ir.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:c(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),Ir.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:c(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),Ir.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:c(t=>"circle"!==t.pinType(),"disable")}),Ir.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});const Ar=class _GMapPin extends kr{_pins;_view;constructor(){super();const t=this;this._pins=(new Ir).columns(["lat","long","ext"]).on("click",function(e,i,o){t.click(t.rowToObj(e.ext.origRow),"",o),t.clickStreetView(t.rowToObj(e.ext.origRow),"",o)}).on("dblclick",function(e,i,o){t.dblclick(t.rowToObj(e.ext.origRow),"",o)})}pinsData(){if(0===this.data().length)return[];const t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map(function(e){const i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.colorColumn())],tooltip:i[t.indexOf(this.tooltipColumn())],origRow:i}]},this)}enter(t,e){super.enter(t,e),this.layers([this._pins])}_prevChecksum;update(t,e){super.update(t,e),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(t){return[t.lat,t.long]})))}exit(t,e){super.exit(t,e)}click(t,e,i){}clickStreetView(t,e,i){this.streetViewOnClick()&&this.streetViewAt({lat:+t[this.latitudeColumn()],lng:+t[this.longitudeColumn()]})}dblclick(t,e,i){}};c(Ar,"GMapPin");let Br=Ar;Br.prototype._class+=" map_GMapPin",Br.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),Br.prototype.publishProxy("pinColor","_pins","fillColor"),Br.prototype.publishProxy("pinType","_pins","pinType"),Br.prototype.publishProxy("pinWidth","_pins","pinWidth"),Br.prototype.publishProxy("pinHeight","_pins","pinHeight"),Br.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),Br.prototype.publishProxy("pinRadius","_pins","pinRadius"),Br.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),Br.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),Br.prototype.publishProxy("textBaseline","_pins","textBaseline"),Br.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),Br.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),Br.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),Br.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),Br.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),Br.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),Br.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");let Rr=(l=class extends vs{dataEdges;_edgesTransform;constructor(){super()}data(t){const e=vs.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],t.forEach(function(t){this.dataEdges.push({type:"LineString",coordinates:[[t[1],t[0]],[t[3],t[2]]]})},this)),e}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")}_edgesPaths;layerUpdate(t){vs.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());const e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()}layerZoomed(t){vs.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}},c(l,"Lines"),l);Rr.prototype._class+=" map_Lines",Rr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});const Zr=class _GMapPinLine extends kr{_lines;_pins;_fromView;_toView;_linesView;constructor(){super();const t=this;this._lines=new Rr,this._pins=(new Ir).columns(["lat","long","ext"]).on("click",function(e,i,o){t.click(t.rowToObj(e.ext.origRow),"",o)}).on("dblclick",function(e,i,o){t.click(t.rowToObj(e.ext.origRow),"",o)})}pinsData(){if(0===this.data().length)return[];const t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);const e=this._fromView.entries().map(function(e){const i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:i[t.indexOf(this.fromTooltipColumn())],origRow:i}]},this),i=this._toView.entries().map(function(e){const i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:i[t.indexOf(this.toTooltipColumn())],origRow:i}]},this);return e.concat(i)}linesData(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())}enter(t,e){super.enter(t,e),this.layers([this._lines,this._pins])}_prevChecksum;update(t,e){super.update(t,e),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(t){return[t.lat,t.long]})))}exit(t,e){super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}};c(Zr,"GMapPinLine");let Nr=Zr;Nr.prototype._class+=" map_GMapPinLine",Nr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),Nr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),Nr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("toPinColor","red","html-color","To Pin Color"),Nr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),Nr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});const jr=class _Graph extends Ir{dataEdges=[];_edgesTransform;constructor(){super()}importJSON(t){const e=Ir.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];let e=null;t.forEach(function(t){e&&this.dataEdges.push({type:"LineString",coordinates:[[e.long,e.lat],[t.long,t.lat]]}),e=t.eol?null:t},this)}return e}data(t){const e=Ir.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];let e=null;t.forEach(function(t){e&&this.dataEdges.push({type:"LineString",coordinates:[[e[1],e[0]],[t[1],t[0]]]}),e=t},this)}return e}layerEnter(t,e,i){Ir.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")}_edgesPaths;layerUpdate(t){Ir.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());const e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()}layerZoomed(t){Ir.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}};c(jr,"Graph");let Hr=jr;Hr.prototype._class+=" map_Graph";const Gr=class _Graticule extends vs{_dataMap={};_path=e.select(null);_graticule;_graticulePath;_graticuleOutlinePath;_prevProjection;constructor(){super()}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),this._graticule=ji(),this._graticulePath=e.append("path").datum(this._graticule).attr("class","graticule").attr("vector-effect","non-scaling-stroke"),this._graticuleOutlinePath=e.append("path").datum(this._graticule.outline).attr("class","graticuleOutline").attr("vector-effect","non-scaling-stroke")}layerUpdate(t){if(!this.visible())return this._graticulePath.attr("d",""),this._graticuleOutlinePath.attr("d",""),void delete this._prevProjection;this._prevProjection!==t.projection()&&(this._graticulePath.attr("d",t._d3GeoPath),this._graticuleOutlinePath.attr("d",t._d3GeoPath),this._prevProjection=t.projection()),this._graticulePath.style("stroke",this.meshColor()),this._graticuleOutlinePath.style("stroke",this.meshColor())}layerExit(t){delete this._prevProjection}};c(Gr,"Graticule");let Ur=Gr;Ur.prototype._class+=" map_Graticule",Ur.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Ur.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Ur.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");const Fr=class _Heat extends vs{_heatTransform;heat;_prevProjection;constructor(){super()}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._heatTransform=i.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat=(new r.HeatMap).target(this._heatTransform.node())}layerUpdate(t){vs.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat.resize(t.size()),this.layerZoomed(t)}layerExit(t){delete this._prevProjection,this.heat.target(null),delete this.heat}layerZoomed(t){vs.prototype.layerZoomed.apply(this,arguments);const e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map(function(o){const n=e?o[e.idx]:o[0],s=i?o[i.idx]:o[1],r=t.zoomTranslate(),a=t.project(n,s),l=t.zoomScale();return a[0]*=l,a[1]*=l,[r[0]+a[0],r[1]+a[1],o[4]||.5]}):[]).render()}};c(Fr,"Heat");let Wr=Fr;function Vr(){}function qr(t){return t.k}function Yr(t){return[t.x,t.y]}function $r(t){return function(){return t}}function Kr(){let t=0,e=0,i=960,o=500,n=!0,s=!0,r=256,a=qr,l=Yr,h=0;function u(){const u=+a.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/r),d=Math.round(Math.max(p+h,0)),_=Math.pow(2,p-d)*r,f=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(n?0:-1/0,Math.floor((t-f)/_)),y=Math.min(n?1<<d:1/0,Math.ceil((i-f)/_)),v=Math.max(s?0:-1/0,Math.floor((e-m)/_)),L=Math.min(s?1<<d:1/0,Math.ceil((o-m)/_)),w=[];for(let t=v;t<L;++t)for(let e=g;e<y;++e)w.push([e,t,d]);return w.translate=[f/_,m/_],w.scale=_,w}return c(u,"tile"),u.size=function(n){return arguments.length?(t=e=0,i=+n[0],o=+n[1],u):[i-t,o-e]},u.extent=function(n){return arguments.length?(t=+n[0][0],e=+n[0][1],i=+n[1][0],o=+n[1][1],u):[[t,e],[i,o]]},u.scale=function(t){return arguments.length?(a="function"==typeof t?t:$r(+t),u):a},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:$r([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(r=+t,u):r},u.clamp=function(t){return arguments.length?(n=s=!!t,u):n&&s},u.clampX=function(t){return arguments.length?(n=!!t,u):n},u.clampY=function(t){return arguments.length?(s=!!t,u):s},u}Wr.prototype._class+=" map_Heat",Wr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Wr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Wr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),c(Vr,"IChoropleth"),Vr.prototype._palette=e.Palette.rainbow("default"),Vr.prototype.click=function(t,e,i){},c(qr,"defaultScale"),c(Yr,"defaultTranslate"),c($r,"constant"),c(Kr,"d3Tile");const Xr=4096,Jr=class _OpenStreet extends vs{_tile;_openStreet;_copyright;_copyrightBBox;_prevTileProvider;_zoomLayerID=0;_prevZoomLevel;constructor(){super(),this.autoScaleMode("none")}layerEnter(t,e,i){vs.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,16384]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(_OpenStreet._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()}layerUpdate(t){this._tile=Kr().size([t.width(),t.height()]).wrap(!1),this.visible()?this._copyright.attr("x",t.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr("y",t.height()-this._copyrightBBox.height/2).text(_OpenStreet._copyrightText):this._copyright.text(""),this.layerZoomed(t)}layerZoomed(t){const i=t.zoomScale(),o=t.zoomTranslate(),n=this._tile.scale(i*Xr).translate(o)(),s=n.scale/i;n.translate[0],n.scale,n.translate[1],n.scale;const r=Math.round(1e3*s);this._prevZoomLevel!==r&&(this._prevZoomLevel=r,this._zoomLayerID++);const a=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],t=>t),l=a.enter().append("g").attr("class","scaleG").attr("transform",ta(s)).merge(a);a.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){e.select(this).selectAll(".image").attr("xlink:href",null)}).remove();l.selectAll(".image").data(n,function(t){return t.x+","+t.y}).enter().append("image").attr("class","image").style("opacity",0).attr("x",function(t){return t.tx}).attr("y",function(t){return t.ty}).attr("width",256).attr("height",256).attr("xlink:href",function(t){return"http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png"}).transition().duration(500).style("opacity",1)}};c(Jr,"OpenStreet"),p(Jr,"_copyrightText","© OpenStreetMap contributors");let Qr=Jr;function ta(t,e){return"translate(-2048,-2048) scale("+t/256+")"}Qr.prototype._class+=" map_OpenStreet",Qr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]}),c(ta,"stringify");const ea=class _TopoJSONChoropleth extends As{_prevRegion;choroPaths;_choroTopologyIndex;_choroTopologyFeatures;constructor(){super(),this.projection("Mercator")}layerEnter(t,i,o){As.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);const n=this;this.tooltipHTML(function(t){const e=n.columns(),i=e&&e.length?e[0]:"Location",o=t&&t.length?t[t.length-1]:[""];return n.tooltipFormat({label:o[0],series:i,value:t[1]})})}layerUpdate(t){As.prototype.layerUpdate.apply(this,arguments);const e=[],i=this;this.data().forEach(function(t){if(isNaN(t[0]))for(const o in i._choroTopologyIndex)for(const n in i._choroTopologyIndex[o])n===t[0]&&i._choroTopologyIndex[o][n].forEach(function(i){e.push([i].concat(t.filter(function(t,e){return e>0})).concat([t]))});else e.push(t.concat([t]))}),this.choroPaths=this._choroplethData.selectAll(".data").data(this.visible()?e:[],function(t){return t[0]}),this.choroPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",function(t){i._dataMap[t[0]]&&i.click(i.rowToObj(i._dataMap[t[0]]),"weight",i._selection.selected(i))}).on("dblclick",function(t){i._dataMap[t[0]]&&i.dblclick(i.rowToObj(i._dataMap[t[0]]),"weight",i._selection.selected(i))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show),this.choroPaths.attr("d",function(e){const o=t._d3GeoPath(i._choroTopologyFeatures[e[0]]);return o||console.warn("Unknown Country: "+e),o}).style("fill",function(t){return i._palette(t[1],i._dataMinWeight,i._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){const t=this;this._topoJsonPromise=new Promise(function(e,i){js(`${Ds()}/${t.region()}.json`,function(i){function o(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=Cs(t._choroTopology,t._choroTopologyObjects).features,js(`${Ds()}/${t.region()}_idx.json`,o).on("error",function(t){o({})}),c(o,"indexLoad")})})}return this._topoJsonPromise}};c(ea,"TopoJSONChoropleth");let ia=ea;ia.prototype._class+=" map_TopoJSONChoropleth",ia.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);var oa,na={exports:{}};function sa(){return oa||(oa=1,function(t){var e="1.9.4";function i(t){var e,i,o,n;for(i=1,o=arguments.length;i<o;i++)for(e in n=arguments[i])t[e]=n[e];return t}c(i,"extend");var o=Object.create||function(){function t(){}return c(t,"F"),function(e){return t.prototype=e,new t}}();function n(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}c(n,"bind");var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,i){var o,n,s,r;return r=c(function(){o=!1,n&&(s.apply(i,n),n=!1)},"later"),s=c(function(){o?n=arguments:(t.apply(i,arguments),setTimeout(r,e),o=!0)},"wrapperFn"),s}function l(t,e,i){var o=e[1],n=e[0],s=o-n;return t===o&&i?t:((t-n)%s+s)%s+n}function h(){return!1}function u(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function p(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return p(t).split(/\s+/)}function _(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}c(r,"stamp"),c(a,"throttle"),c(l,"wrapNum"),c(h,"falseFn"),c(u,"formatNum"),c(p,"trim"),c(d,"splitWords"),c(_,"setOptions"),c(f,"getParamString");var m=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(m,function(t,i){var o=e[i];if(void 0===o)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})}c(g,"template");var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}c(v,"indexOf");var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}c(b,"getPrefixed");var x=0;function M(t){var e=+new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}c(M,"timeoutDefer");var C=window.requestAnimationFrame||b("RequestAnimationFrame")||M,P=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,i){if(!i||C!==M)return C.call(window,n(t,e));t.call(e)}function T(t){t&&P.call(window,t)}c(k,"requestAnimFrame"),c(T,"cancelAnimFrame");var E={__proto__:null,extend:i,create:o,bind:n,get lastId(){return s},stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:u,trim:p,splitWords:d,setOptions:_,getParamString:f,template:g,isArray:y,indexOf:v,emptyImageUrl:w,requestFn:C,cancelFn:P,requestAnimFrame:k,cancelAnimFrame:T};function S(){}function O(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}c(S,"Class"),S.extend=function(t){var e=c(function(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},"NewClass"),n=e.__super__=this.prototype,s=o(n);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&i(e,t.statics),t.includes&&(O(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=n.options?o(n.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},S.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return i(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},c(O,"checkDeprecatedMixinEvents");var z={on:c(function(t,e,i){if("object"==typeof t)for(var o in t)this._on(o,t[o],e);else for(var n=0,s=(t=d(t)).length;n<s;n++)this._on(t[n],e,i);return this},"on"),off:c(function(t,e,i){if(arguments.length)if("object"==typeof t)for(var o in t)this._off(o,t[o],e);else{t=d(t);for(var n=1===arguments.length,s=0,r=t.length;s<r;s++)n?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},"off"),_on:c(function(t,e,i,o){if("function"==typeof e){if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var n={fn:e,ctx:i};o&&(n.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(n)}}else console.warn("wrong listener type: "+typeof e)},"_on"),_off:c(function(t,e,i){var o,n,s;if(this._events&&(o=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,i);if(!1!==r){var a=o[r];this._firingCount&&(a.fn=h,this._events[t]=o=o.slice()),o.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(n=0,s=o.length;n<s;n++)o[n].fn=h;delete this._events[t]}},"_off"),fire:c(function(t,e,o){if(!this.listens(t,o))return this;var n=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,n)}this._firingCount--}}return o&&this._propagateEvent(n),this},"fire"),listens:c(function(t,e,i,o){"string"!=typeof t&&console.warn('"string" type argument expected');var n=e;"function"!=typeof e&&(o=!!e,n=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,n,i))return!0;if(o)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,o))return!0;return!1},"listens"),_listens:c(function(t,e,i){if(!this._events)return!1;var o=this._events[t]||[];if(!e)return!!o.length;i===this&&(i=void 0);for(var n=0,s=o.length;n<s;n++)if(o[n].fn===e&&o[n].ctx===i)return n;return!1},"_listens"),once:c(function(t,e,i){if("object"==typeof t)for(var o in t)this._on(o,t[o],e,!0);else for(var n=0,s=(t=d(t)).length;n<s;n++)this._on(t[n],e,i,!0);return this},"once"),addEventParent:c(function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},"addEventParent"),removeEventParent:c(function(t){return this._eventParents&&delete this._eventParents[r(t)],this},"removeEventParent"),_propagateEvent:c(function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)},"_propagateEvent")};z.addEventListener=z.on,z.removeEventListener=z.clearAllEventListeners=z.off,z.addOneTimeEventListener=z.once,z.fireEvent=z.fire,z.hasEventListeners=z.listens;var D=S.extend(z);function I(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}c(I,"Point");var A=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function B(t,e,i){return t instanceof I?t:y(t)?new I(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new I(t.x,t.y):new I(t,e,i)}function R(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function Z(t,e){return!t||t instanceof R?t:new R(t,e)}function N(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function j(t,e){return t instanceof N?t:new N(t,e)}function H(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function G(t,e,i){return t instanceof H?t:y(t)&&"object"!=typeof t[0]?3===t.length?new H(t[0],t[1],t[2]):2===t.length?new H(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new H(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new H(t,e,i)}I.prototype={clone:c(function(){return new I(this.x,this.y)},"clone"),add:c(function(t){return this.clone()._add(B(t))},"add"),_add:c(function(t){return this.x+=t.x,this.y+=t.y,this},"_add"),subtract:c(function(t){return this.clone()._subtract(B(t))},"subtract"),_subtract:c(function(t){return this.x-=t.x,this.y-=t.y,this},"_subtract"),divideBy:c(function(t){return this.clone()._divideBy(t)},"divideBy"),_divideBy:c(function(t){return this.x/=t,this.y/=t,this},"_divideBy"),multiplyBy:c(function(t){return this.clone()._multiplyBy(t)},"multiplyBy"),_multiplyBy:c(function(t){return this.x*=t,this.y*=t,this},"_multiplyBy"),scaleBy:c(function(t){return new I(this.x*t.x,this.y*t.y)},"scaleBy"),unscaleBy:c(function(t){return new I(this.x/t.x,this.y/t.y)},"unscaleBy"),round:c(function(){return this.clone()._round()},"round"),_round:c(function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},"_round"),floor:c(function(){return this.clone()._floor()},"floor"),_floor:c(function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},"_floor"),ceil:c(function(){return this.clone()._ceil()},"ceil"),_ceil:c(function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},"_ceil"),trunc:c(function(){return this.clone()._trunc()},"trunc"),_trunc:c(function(){return this.x=A(this.x),this.y=A(this.y),this},"_trunc"),distanceTo:c(function(t){var e=(t=B(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},"distanceTo"),equals:c(function(t){return(t=B(t)).x===this.x&&t.y===this.y},"equals"),contains:c(function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},"contains"),toString:c(function(){return"Point("+u(this.x)+", "+u(this.y)+")"},"toString")},c(B,"toPoint"),c(R,"Bounds"),R.prototype={extend:c(function(t){var e,i;if(!t)return this;if(t instanceof I||"number"==typeof t[0]||"x"in t)e=i=B(t);else if(e=(t=Z(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},"extend"),getCenter:c(function(t){return B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},"getCenter"),getBottomLeft:c(function(){return B(this.min.x,this.max.y)},"getBottomLeft"),getTopRight:c(function(){return B(this.max.x,this.min.y)},"getTopRight"),getTopLeft:c(function(){return this.min},"getTopLeft"),getBottomRight:c(function(){return this.max},"getBottomRight"),getSize:c(function(){return this.max.subtract(this.min)},"getSize"),contains:c(function(t){var e,i;return(t="number"==typeof t[0]||t instanceof I?B(t):Z(t))instanceof R?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},"contains"),intersects:c(function(t){t=Z(t);var e=this.min,i=this.max,o=t.min,n=t.max,s=n.x>=e.x&&o.x<=i.x,r=n.y>=e.y&&o.y<=i.y;return s&&r},"intersects"),overlaps:c(function(t){t=Z(t);var e=this.min,i=this.max,o=t.min,n=t.max,s=n.x>e.x&&o.x<i.x,r=n.y>e.y&&o.y<i.y;return s&&r},"overlaps"),isValid:c(function(){return!(!this.min||!this.max)},"isValid"),pad:c(function(t){var e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,n=Math.abs(e.y-i.y)*t;return Z(B(e.x-o,e.y-n),B(i.x+o,i.y+n))},"pad"),equals:c(function(t){return!!t&&(t=Z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))},"equals")},c(Z,"toBounds"),c(N,"LatLngBounds"),N.prototype={extend:c(function(t){var e,i,o=this._southWest,n=this._northEast;if(t instanceof H)e=t,i=t;else{if(!(t instanceof N))return t?this.extend(G(t)||j(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return o||n?(o.lat=Math.min(e.lat,o.lat),o.lng=Math.min(e.lng,o.lng),n.lat=Math.max(i.lat,n.lat),n.lng=Math.max(i.lng,n.lng)):(this._southWest=new H(e.lat,e.lng),this._northEast=new H(i.lat,i.lng)),this},"extend"),pad:c(function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new N(new H(e.lat-o,e.lng-n),new H(i.lat+o,i.lng+n))},"pad"),getCenter:c(function(){return new H((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},"getCenter"),getSouthWest:c(function(){return this._southWest},"getSouthWest"),getNorthEast:c(function(){return this._northEast},"getNorthEast"),getNorthWest:c(function(){return new H(this.getNorth(),this.getWest())},"getNorthWest"),getSouthEast:c(function(){return new H(this.getSouth(),this.getEast())},"getSouthEast"),getWest:c(function(){return this._southWest.lng},"getWest"),getSouth:c(function(){return this._southWest.lat},"getSouth"),getEast:c(function(){return this._northEast.lng},"getEast"),getNorth:c(function(){return this._northEast.lat},"getNorth"),contains:c(function(t){t="number"==typeof t[0]||t instanceof H||"lat"in t?G(t):j(t);var e,i,o=this._southWest,n=this._northEast;return t instanceof N?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=o.lat&&i.lat<=n.lat&&e.lng>=o.lng&&i.lng<=n.lng},"contains"),intersects:c(function(t){t=j(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),s=n.lat>=e.lat&&o.lat<=i.lat,r=n.lng>=e.lng&&o.lng<=i.lng;return s&&r},"intersects"),overlaps:c(function(t){t=j(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),s=n.lat>e.lat&&o.lat<i.lat,r=n.lng>e.lng&&o.lng<i.lng;return s&&r},"overlaps"),toBBoxString:c(function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},"toBBoxString"),equals:c(function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},"equals"),isValid:c(function(){return!(!this._southWest||!this._northEast)},"isValid")},c(j,"toLatLngBounds"),c(H,"LatLng"),H.prototype={equals:c(function(t,e){return!!t&&(t=G(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},"equals"),toString:c(function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},"toString"),distanceTo:c(function(t){return W.distance(this,G(t))},"distanceTo"),wrap:c(function(){return W.wrapLatLng(this)},"wrap"),toBounds:c(function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},"toBounds"),clone:c(function(){return new H(this.lat,this.lng,this.alt)},"clone")},c(G,"toLatLng");var U,F={latLngToPoint:c(function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},"latLngToPoint"),pointToLatLng:c(function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},"pointToLatLng"),project:c(function(t){return this.projection.project(t)},"project"),unproject:c(function(t){return this.projection.unproject(t)},"unproject"),scale:c(function(t){return 256*Math.pow(2,t)},"scale"),zoom:c(function(t){return Math.log(t/256)/Math.LN2},"zoom"),getProjectedBounds:c(function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new R(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},"getProjectedBounds"),infinite:!1,wrapLatLng:c(function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new H(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},"wrapLatLng"),wrapLatLngBounds:c(function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,n=e.lng-i.lng;if(0===o&&0===n)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new N(new H(s.lat-o,s.lng-n),new H(r.lat-o,r.lng-n))},"wrapLatLngBounds")},W=i({},F,{wrapLng:[-180,180],R:6371e3,distance:c(function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(o)*Math.cos(n)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l},"distance")}),V=6378137,q={R:V,MAX_LATITUDE:85.0511287798,project:c(function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=Math.sin(o*e);return new I(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},"project"),unproject:c(function(t){var e=180/Math.PI;return new H((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},"unproject"),bounds:(U=V*Math.PI,new R([-U,-U],[U,U]))};function Y(t,e,i,o){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=o}function $(t,e,i,o){return new Y(t,e,i,o)}c(Y,"Transformation"),Y.prototype={transform:c(function(t,e){return this._transform(t.clone(),e)},"transform"),_transform:c(function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},"_transform"),untransform:c(function(t,e){return e=e||1,new I((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)},"untransform")},c($,"toTransformation");var K,X=i({},W,{code:"EPSG:3857",projection:q,transformation:(K=.5/(Math.PI*q.R),$(K,.5,-K,.5))}),J=i({},X,{code:"EPSG:900913"});function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function tt(t,e){var i,o,n,s,r,a,l="";for(i=0,n=t.length;i<n;i++){for(o=0,s=(r=t[i]).length;o<s;o++)l+=(o?"L":"M")+(a=r[o]).x+" "+a.y;l+=e?jt.svg?"z":"x":""}return l||"M0 0"}c(Q,"svgCreate"),c(tt,"pointsToPath");var et,it=document.documentElement.style,ot="ActiveXObject"in window,nt=ot&&!document.addEventListener,st="msLaunchUri"in navigator&&!("documentMode"in document),rt=Nt("webkit"),at=Nt("android"),lt=Nt("android 2")||Nt("android 3"),ht=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ut=at&&Nt("Google")&&ht<537&&!("AudioNode"in window),ct=!!window.opera,pt=!st&&Nt("chrome"),dt=Nt("gecko")&&!rt&&!ct&&!ot,_t=!pt&&Nt("safari"),ft=Nt("phantom"),mt="OTransition"in it,gt=0===navigator.platform.indexOf("Win"),yt=ot&&"transition"in it,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!lt,Lt="MozPerspective"in it,wt=!window.L_DISABLE_3D&&(yt||vt||Lt)&&!mt&&!ft,bt="undefined"!=typeof orientation||Nt("mobile"),xt=bt&&rt,Mt=bt&&vt,Ct=!window.PointerEvent&&window.MSPointerEvent,Pt=!(!window.PointerEvent&&!Ct),kt="ontouchstart"in window||!!window.TouchEvent,Tt=!window.L_NO_TOUCH&&(kt||Pt),Et=bt&&ct,St=bt&&dt,Ot=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,zt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:c(function(){t=!0},"get")});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(i){}return t}(),Dt=!!document.createElement("canvas").getContext,It=!(!document.createElementNS||!Q("svg").createSVGRect),At=!!It&&((et=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(et.firstChild&&et.firstChild.namespaceURI)),Bt=!It&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(i){return!1}}(),Rt=0===navigator.platform.indexOf("Mac"),Zt=0===navigator.platform.indexOf("Linux");function Nt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}c(Nt,"userAgentContains");var jt={ie:ot,ielt9:nt,edge:st,webkit:rt,android:at,android23:lt,androidStock:ut,opera:ct,chrome:pt,gecko:dt,safari:_t,phantom:ft,opera12:mt,win:gt,ie3d:yt,webkit3d:vt,gecko3d:Lt,any3d:wt,mobile:bt,mobileWebkit:xt,mobileWebkit3d:Mt,msPointer:Ct,pointer:Pt,touch:Tt,touchNative:kt,mobileOpera:Et,mobileGecko:St,retina:Ot,passiveEvents:zt,canvas:Dt,svg:It,vml:Bt,inlineSvg:At,mac:Rt,linux:Zt},Ht=jt.msPointer?"MSPointerDown":"pointerdown",Gt=jt.msPointer?"MSPointerMove":"pointermove",Ut=jt.msPointer?"MSPointerUp":"pointerup",Ft=jt.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Ht,touchmove:Gt,touchend:Ut,touchcancel:Ft},Vt={touchstart:ie,touchmove:ee,touchend:ee,touchcancel:ee},qt={},Yt=!1;function $t(t,e,i){return"touchstart"===e&&te(),Vt[e]?(i=Vt[e].bind(this,i),t.addEventListener(Wt[e],i,!1),i):(console.warn("wrong event specified:",e),h)}function Kt(t,e,i){Wt[e]?t.removeEventListener(Wt[e],i,!1):console.warn("wrong event specified:",e)}function Xt(t){qt[t.pointerId]=t}function Jt(t){qt[t.pointerId]&&(qt[t.pointerId]=t)}function Qt(t){delete qt[t.pointerId]}function te(){Yt||(document.addEventListener(Ht,Xt,!0),document.addEventListener(Gt,Jt,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Ft,Qt,!0),Yt=!0)}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],qt)e.touches.push(qt[i]);e.changedTouches=[e],t(e)}}function ie(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Xe(e),ee(t,e)}function oe(t){var e,i,o={};for(i in t)e=t[i],o[i]=e&&e.bind?e.bind(t):e;return t=o,o.type="dblclick",o.detail=2,o.isTrusted=!1,o._simulated=!0,o}c($t,"addPointerListener"),c(Kt,"removePointerListener"),c(Xt,"_globalPointerDown"),c(Jt,"_globalPointerMove"),c(Qt,"_globalPointerUp"),c(te,"_addPointerDocListener"),c(ee,"_handlePointer"),c(ie,"_onPointerStart"),c(oe,"makeDblclick");var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,o=0;function n(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var n=Qe(t);if(!n.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||n.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var s=Date.now();s-o<=ne?2===++i&&e(oe(t)):i=1,o=s}}}else i=t.detail}return c(n,"simDblclick"),t.addEventListener("click",n),{dblclick:e,simDblclick:n}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}c(se,"addDoubleTapListener"),c(re,"removeDoubleTapListener");var ae,le,he,ue,ce,pe=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),de=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_e="webkitTransition"===de||"OTransition"===de?de+"End":"transitionend";function fe(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return"auto"===i?null:i}function ge(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function ye(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function we(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=Pe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function xe(t,e){if(void 0!==t.classList)for(var i=d(e),o=0,n=i.length;o<n;o++)t.classList.add(i[o]);else if(!be(t,e)){var s=Pe(t);Ce(t,(s?s+" ":"")+e)}}function Me(t,e){void 0!==t.classList?t.classList.remove(e):Ce(t,p((" "+Pe(t)+" ").replace(" "+e+" "," ")))}function Ce(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Pe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function ke(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Te(t,e)}function Te(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch(n){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Se(t,e,i){var o=e||new I(0,0);t.style[pe]=(jt.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function Oe(t,e){t._leaflet_pos=e,jt.any3d?Se(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ze(t){return t._leaflet_pos||new I(0,0)}if(c(fe,"get"),c(me,"getStyle"),c(ge,"create$1"),c(ye,"remove"),c(ve,"empty"),c(Le,"toFront"),c(we,"toBack"),c(be,"hasClass"),c(xe,"addClass"),c(Me,"removeClass"),c(Ce,"setClass"),c(Pe,"getClass"),c(ke,"setOpacity"),c(Te,"_setOpacityIE"),c(Ee,"testProp"),c(Se,"setTransform"),c(Oe,"setPosition"),c(ze,"getPosition"),"onselectstart"in document)ae=c(function(){He(window,"selectstart",Xe)},"disableTextSelection"),le=c(function(){Ue(window,"selectstart",Xe)},"enableTextSelection");else{var De=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=c(function(){if(De){var t=document.documentElement.style;he=t[De],t[De]="none"}},"disableTextSelection"),le=c(function(){De&&(document.documentElement.style[De]=he,he=void 0)},"enableTextSelection")}function Ie(){He(window,"dragstart",Xe)}function Ae(){Ue(window,"dragstart",Xe)}function Be(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Re(),ue=t,ce=t.style.outlineStyle,t.style.outlineStyle="none",He(window,"keydown",Re))}function Re(){ue&&(ue.style.outlineStyle=ce,ue=void 0,ce=void 0,Ue(window,"keydown",Re))}function Ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ne(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}c(Ie,"disableImageDrag"),c(Ae,"enableImageDrag"),c(Be,"preventOutline"),c(Re,"restoreOutline"),c(Ze,"getSizedParentNode"),c(Ne,"getScale");var je={__proto__:null,TRANSFORM:pe,TRANSITION:de,TRANSITION_END:_e,get:fe,getStyle:me,create:ge,remove:ye,empty:ve,toFront:Le,toBack:we,hasClass:be,addClass:xe,removeClass:Me,setClass:Ce,getClass:Pe,setOpacity:ke,testProp:Ee,setTransform:Se,setPosition:Oe,getPosition:ze,get disableTextSelection(){return ae},get enableTextSelection(){return le},disableImageDrag:Ie,enableImageDrag:Ae,preventOutline:Be,restoreOutline:Re,getSizedParentNode:Ze,getScale:Ne};function He(t,e,i,o){if(e&&"object"==typeof e)for(var n in e)Ve(t,n,e[n],i);else for(var s=0,r=(e=d(e)).length;s<r;s++)Ve(t,e[s],i,o);return this}c(He,"on");var Ge="_leaflet_events";function Ue(t,e,i,o){if(1===arguments.length)Fe(t),delete t[Ge];else if(e&&"object"==typeof e)for(var n in e)qe(t,n,e[n],i);else if(e=d(e),2===arguments.length)Fe(t,function(t){return-1!==v(e,t)});else for(var s=0,r=e.length;s<r;s++)qe(t,e[s],i,o);return this}function Fe(t,e){for(var i in t[Ge]){var o=i.split(/\d/)[0];e&&!e(o)||qe(t,o,null,null,i)}}c(Ue,"off"),c(Fe,"batchRemove");var We={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ve(t,e,i,o){var n=e+r(i)+(o?"_"+r(o):"");if(t[Ge]&&t[Ge][n])return this;var s=c(function(e){return i.call(o||t,e||window.event)},"handler"),a=s;!jt.touchNative&&jt.pointer&&0===e.indexOf("touch")?s=$t(t,e,s):jt.touch&&"dblclick"===e?s=se(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(We[e]||e,s,!!jt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=c(function(e){e=e||window.event,oi(t,e)&&a(e)},"handler"),t.addEventListener(We[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[Ge]=t[Ge]||{},t[Ge][n]=s}function qe(t,e,i,o,n){n=n||e+r(i)+(o?"_"+r(o):"");var s=t[Ge]&&t[Ge][n];if(!s)return this;!jt.touchNative&&jt.pointer&&0===e.indexOf("touch")?Kt(t,e,s):jt.touch&&"dblclick"===e?re(t,s):"removeEventListener"in t?t.removeEventListener(We[e]||e,s,!1):t.detachEvent("on"+e,s),t[Ge][n]=null}function Ye(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function $e(t){return Ve(t,"wheel",Ye),this}function Ke(t){return He(t,"mousedown touchstart dblclick contextmenu",Ye),t._leaflet_disable_click=!0,this}function Xe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Je(t){return Xe(t),Ye(t),this}function Qe(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function ti(t,e){if(!e)return new I(t.clientX,t.clientY);var i=Ne(e),o=i.boundingClientRect;return new I((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}c(Ve,"addOne"),c(qe,"removeOne"),c(Ye,"stopPropagation"),c($e,"disableScrollPropagation"),c(Ke,"disableClickPropagation"),c(Xe,"preventDefault"),c(Je,"stop"),c(Qe,"getPropagationPath"),c(ti,"getMousePosition");var ei=jt.linux&&jt.chrome?window.devicePixelRatio:jt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ii(t){return jt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ei:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function oi(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(o){return!1}return i!==t}c(ii,"getWheelDelta"),c(oi,"isExternalTarget");var ni={__proto__:null,on:He,off:Ue,stopPropagation:Ye,disableScrollPropagation:$e,disableClickPropagation:Ke,preventDefault:Xe,stop:Je,getPropagationPath:Qe,getMousePosition:ti,getWheelDelta:ii,isExternalTarget:oi,addListener:He,removeListener:Ue},si=D.extend({run:c(function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=ze(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},"run"),stop:c(function(){this._inProgress&&(this._step(!0),this._complete())},"stop"),_animate:c(function(){this._animId=k(this._animate,this),this._step()},"_animate"),_step:c(function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},"_step"),_runFrame:c(function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Oe(this._el,i),this.fire("step")},"_runFrame"),_complete:c(function(){T(this._animId),this._inProgress=!1,this.fire("end")},"_complete"),_easeOut:c(function(t){return 1-Math.pow(1-t,this._easeOutPower)},"_easeOut")}),ri=D.extend({options:{crs:X,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:c(function(t,e){e=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(G(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=de&&jt.any3d&&!jt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),He(this._proxy,_e,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},"initialize"),setView:c(function(t,e,o){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(G(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o&&(void 0!==o.animate&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,o.pan&&o.pan.noMoveStart),this)},"setView"),setZoom:c(function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},"setZoom"),zoomIn:c(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},"zoomIn"),zoomOut:c(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},"zoomOut"),setZoomAround:c(function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),s=(t instanceof I?t:this.latLngToContainerPoint(t)).subtract(n).multiplyBy(1-1/o),r=this.containerPointToLatLng(n.add(s));return this.setView(r,e,{zoom:i})},"setZoomAround"),_getBoundsCenterZoom:c(function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var i=B(e.paddingTopLeft||e.padding||[0,0]),o=B(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));if((n="number"==typeof e.maxZoom?Math.min(e.maxZoom,n):n)===1/0)return{center:t.getCenter(),zoom:n};var s=o.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),n),a=this.project(t.getNorthEast(),n);return{center:this.unproject(r.add(a).divideBy(2).add(s),n),zoom:n}},"_getBoundsCenterZoom"),fitBounds:c(function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},"fitBounds"),fitWorld:c(function(t){return this.fitBounds([[-90,-180],[90,180]],t)},"fitWorld"),panTo:c(function(t,e){return this.setView(t,this._zoom,{pan:e})},"panTo"),panBy:c(function(t,e){if(e=e||{},!(t=B(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new si,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){xe(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},"panBy"),flyTo:c(function(t,e,i){if(!1===(i=i||{}).animate||!jt.any3d)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),n=this.project(t),s=this.getSize(),r=this._zoom;t=G(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),h=n.distanceTo(o)||1,u=1.42,p=u*u;function d(t){var e=(l*l-a*a+(t?-1:1)*p*p*h*h)/(2*(t?l:a)*p*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return _(t)/f(t)}c(d,"r"),c(_,"sinh"),c(f,"cosh"),c(m,"tanh");var g=d(0);function y(t){return a*(f(g)/f(g+u*t))}function v(t){return a*(f(g)*m(g+u*t)-_(g))/p}function L(t){return 1-Math.pow(1-t,1.5)}c(y,"w"),c(v,"u"),c(L,"easeOut");var w=Date.now(),b=(d(1)-g)/u,x=i.duration?1e3*i.duration:1e3*b*.8;function M(){var i=(Date.now()-w)/x,s=L(i)*b;i<=1?(this._flyToFrame=k(M,this),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(v(s)/h)),r),this.getScaleZoom(a/y(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return c(M,"frame"),this._moveStart(!0,i.noMoveStart),M.call(this),this},"flyTo"),flyToBounds:c(function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},"flyToBounds"),setMaxBounds:c(function(t){return t=j(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},"setMaxBounds"),setMinZoom:c(function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},"setMinZoom"),setMaxZoom:c(function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},"setMaxZoom"),panInsideBounds:c(function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),o=this._limitCenter(i,this._zoom,j(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},"panInsideBounds"),panInside:c(function(t,e){var i=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),o=B(e.paddingBottomRight||e.padding||[0,0]),n=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=Z([r.min.add(i),r.max.subtract(o)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(l);n.x+=h.x<0?-u.x:u.x,n.y+=h.y<0?-u.y:u.y,this.panTo(this.unproject(n),e),this._enforcingBounds=!1}return this},"panInside"),invalidateSize:c(function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},"invalidateSize"),stop:c(function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},"stop"),locate:c(function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},"locate"),stopLocate:c(function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},"stopLocate"),_handleGeolocationError:c(function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},"_handleGeolocationError"),_handleGeolocationResponse:c(function(t){if(this._container._leaflet_id){var e=new H(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;if(o.setView){var n=this.getBoundsZoom(i);this.setView(e,o.maxZoom?Math.min(n,o.maxZoom):n)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},"_handleGeolocationResponse"),addHandler:c(function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},"addHandler"),remove:c(function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ye(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ye(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},"remove"),createPane:c(function(t,e){var i=ge("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},"createPane"),getCenter:c(function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},"getCenter"),getZoom:c(function(){return this._zoom},"getZoom"),getBounds:c(function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},"getBounds"),getMinZoom:c(function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},"getMinZoom"),getMaxZoom:c(function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},"getMaxZoom"),getBoundsZoom:c(function(t,e,i){t=j(t),i=B(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=Z(this.project(a,o),this.project(r,o)).getSize(),u=jt.any3d?this.options.zoomSnap:1,c=l.x/h.x,p=l.y/h.y,d=e?Math.max(c,p):Math.min(c,p);return o=this.getScaleZoom(d,o),u&&(o=Math.round(o/(u/100))*(u/100),o=e?Math.ceil(o/u)*u:Math.floor(o/u)*u),Math.max(n,Math.min(s,o))},"getBoundsZoom"),getSize:c(function(){return this._size&&!this._sizeChanged||(this._size=new I(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},"getSize"),getPixelBounds:c(function(t,e){var i=this._getTopLeftPoint(t,e);return new R(i,i.add(this.getSize()))},"getPixelBounds"),getPixelOrigin:c(function(){return this._checkIfLoaded(),this._pixelOrigin},"getPixelOrigin"),getPixelWorldBounds:c(function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},"getPixelWorldBounds"),getPane:c(function(t){return"string"==typeof t?this._panes[t]:t},"getPane"),getPanes:c(function(){return this._panes},"getPanes"),getContainer:c(function(){return this._container},"getContainer"),getZoomScale:c(function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},"getZoomScale"),getScaleZoom:c(function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o},"getScaleZoom"),project:c(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},"project"),unproject:c(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},"unproject"),layerPointToLatLng:c(function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},"layerPointToLatLng"),latLngToLayerPoint:c(function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},"latLngToLayerPoint"),wrapLatLng:c(function(t){return this.options.crs.wrapLatLng(G(t))},"wrapLatLng"),wrapLatLngBounds:c(function(t){return this.options.crs.wrapLatLngBounds(j(t))},"wrapLatLngBounds"),distance:c(function(t,e){return this.options.crs.distance(G(t),G(e))},"distance"),containerPointToLayerPoint:c(function(t){return B(t).subtract(this._getMapPanePos())},"containerPointToLayerPoint"),layerPointToContainerPoint:c(function(t){return B(t).add(this._getMapPanePos())},"layerPointToContainerPoint"),containerPointToLatLng:c(function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},"containerPointToLatLng"),latLngToContainerPoint:c(function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},"latLngToContainerPoint"),mouseEventToContainerPoint:c(function(t){return ti(t,this._container)},"mouseEventToContainerPoint"),mouseEventToLayerPoint:c(function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},"mouseEventToLayerPoint"),mouseEventToLatLng:c(function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},"mouseEventToLatLng"),_initContainer:c(function(t){var e=this._container=fe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");He(e,"scroll",this._onScroll,this),this._containerId=r(e)},"_initContainer"),_initLayout:c(function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&jt.any3d,xe(t,"leaflet-container"+(jt.touch?" leaflet-touch":"")+(jt.retina?" leaflet-retina":"")+(jt.ielt9?" leaflet-oldie":"")+(jt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},"_initLayout"),_initPanes:c(function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Oe(this._mapPane,new I(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xe(t.markerPane,"leaflet-zoom-hide"),xe(t.shadowPane,"leaflet-zoom-hide"))},"_initPanes"),_resetView:c(function(t,e,i){Oe(this._mapPane,new I(0,0));var o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,i)._move(t,e)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},"_resetView"),_moveStart:c(function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},"_moveStart"),_move:c(function(t,e,i,o){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i&&i.pinch&&this.fire("zoom",i):((n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},"_move"),_moveEnd:c(function(t){return t&&this.fire("zoomend"),this.fire("moveend")},"_moveEnd"),_stop:c(function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},"_stop"),_rawPanBy:c(function(t){Oe(this._mapPane,this._getMapPanePos().subtract(t))},"_rawPanBy"),_getZoomSpan:c(function(){return this.getMaxZoom()-this.getMinZoom()},"_getZoomSpan"),_panInsideMaxBounds:c(function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},"_panInsideMaxBounds"),_checkIfLoaded:c(function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},"_checkIfLoaded"),_initEvents:c(function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ue:He;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),jt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},"_initEvents"),_onResize:c(function(){T(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},"_onResize"),_onScroll:c(function(){this._container.scrollTop=0,this._container.scrollLeft=0},"_onScroll"),_onMoveEnd:c(function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},"_onMoveEnd"),_findEventTargets:c(function(t,e){for(var i,o=[],n="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(n&&!oi(s,t))break;if(o.push(i),n)break}if(s===this._container)break;s=s.parentNode}return o.length||a||n||!this.listens(e,!0)||(o=[this]),o},"_findEventTargets"),_isClickDisabled:c(function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},"_isClickDisabled"),_handleDOMEvent:c(function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Be(e),this._fireDOMEvent(t,i)}},"_handleDOMEvent"),_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:c(function(t,e,o){if("click"===t.type){var n=i({},t);n.type="preclick",this._fireDOMEvent(n,n.type,o)}var s=this._findEventTargets(t,e);if(o){for(var r=[],a=0;a<o.length;a++)o[a].listens(e,!0)&&r.push(o[a]);s=r.concat(s)}if(s.length){"contextmenu"===e&&Xe(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=u?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},"_fireDOMEvent"),_draggableMoved:c(function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},"_draggableMoved"),_clearHandlers:c(function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},"_clearHandlers"),whenReady:c(function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},"whenReady"),_getMapPanePos:c(function(){return ze(this._mapPane)||new I(0,0)},"_getMapPanePos"),_moved:c(function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},"_moved"),_getTopLeftPoint:c(function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},"_getTopLeftPoint"),_getNewPixelOrigin:c(function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},"_getNewPixelOrigin"),_latLngToNewLayerPoint:c(function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},"_latLngToNewLayerPoint"),_latLngBoundsToNewLayerBounds:c(function(t,e,i){var o=this._getNewPixelOrigin(i,e);return Z([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},"_latLngBoundsToNewLayerBounds"),_getCenterLayerPoint:c(function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},"_getCenterLayerPoint"),_getCenterOffset:c(function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},"_getCenterOffset"),_limitCenter:c(function(t,e,i){if(!i)return t;var o=this.project(t,e),n=this.getSize().divideBy(2),s=new R(o.subtract(n),o.add(n)),r=this._getBoundsOffset(s,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(o.add(r),e)},"_limitCenter"),_limitOffset:c(function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new R(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},"_limitOffset"),_getBoundsOffset:c(function(t,e,i){var o=Z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),n=o.min.subtract(t.min),s=o.max.subtract(t.max);return new I(this._rebound(n.x,-s.x),this._rebound(n.y,-s.y))},"_getBoundsOffset"),_rebound:c(function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},"_rebound"),_limitZoom:c(function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),o=jt.any3d?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},"_limitZoom"),_onPanTransitionStep:c(function(){this.fire("move")},"_onPanTransitionStep"),_onPanTransitionEnd:c(function(){Me(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},"_onPanTransitionEnd"),_tryAnimatedPan:c(function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},"_tryAnimatedPan"),_createAnimProxy:c(function(){var t=this._proxy=ge("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=pe,i=this._proxy.style[e];Se(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},"_createAnimProxy"),_destroyAnimProxy:c(function(){ye(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},"_destroyAnimProxy"),_animMoveEnd:c(function(){var t=this.getCenter(),e=this.getZoom();Se(this._proxy,this.project(t,e),this.getZoomScale(e,1))},"_animMoveEnd"),_catchTransitionEnd:c(function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},"_catchTransitionEnd"),_nothingToAnimate:c(function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},"_nothingToAnimate"),_tryAnimatedZoom:c(function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(n)||(k(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},"_tryAnimatedZoom"),_animateZoom:c(function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},"_animateZoom"),_onZoomTransitionEnd:c(function(){this._animatingZoom&&(this._mapPane&&Me(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))},"_onZoomTransitionEnd")});function ai(t,e){return new ri(t,e)}c(ai,"createMap");var li=S.extend({options:{position:"topright"},initialize:c(function(t){_(this,t)},"initialize"),getPosition:c(function(){return this.options.position},"getPosition"),setPosition:c(function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},"setPosition"),getContainer:c(function(){return this._container},"getContainer"),addTo:c(function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return xe(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},"addTo"),remove:c(function(){return this._map?(ye(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},"remove"),_refocusOnMap:c(function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()},"_refocusOnMap")}),hi=c(function(t){return new li(t)},"control");ri.include({addControl:c(function(t){return t.addTo(this),this},"addControl"),removeControl:c(function(t){return t.remove(),this},"removeControl"),_initControlPos:c(function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=ge("div",e+"control-container",this._container);function o(o,n){var s=e+o+" "+e+n;t[o+n]=ge("div",s,i)}c(o,"createCorner"),o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},"_initControlPos"),_clearControlPos:c(function(){for(var t in this._controlCorners)ye(this._controlCorners[t]);ye(this._controlContainer),delete this._controlCorners,delete this._controlContainer},"_clearControlPos")});var ui=li.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:c(function(t,e,i,o){return i<o?-1:o<i?1:0},"sortFunction")},initialize:c(function(t,e,i){for(var o in _(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!0)},"initialize"),onAdd:c(function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},"onAdd"),addTo:c(function(t){return li.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},"addTo"),onRemove:c(function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},"onRemove"),addBaseLayer:c(function(t,e){return this._addLayer(t,e),this._map?this._update():this},"addBaseLayer"),addOverlay:c(function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},"addOverlay"),removeLayer:c(function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},"removeLayer"),expand:c(function(){xe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(xe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Me(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},"expand"),collapse:c(function(){return Me(this._container,"leaflet-control-layers-expanded"),this},"collapse"),_initLayout:c(function(){var t="leaflet-control-layers",e=this._container=ge("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ke(e),$e(e);var o=this._section=ge("section",t+"-list");i&&(this._map.on("click",this.collapse,this),He(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var n=this._layersLink=ge("a",t+"-toggle",e);n.href="#",n.title="Layers",n.setAttribute("role","button"),He(n,{keydown:c(function(t){13===t.keyCode&&this._expandSafely()},"keydown"),click:c(function(t){Xe(t),this._expandSafely()},"click")},this),i||this.expand(),this._baseLayersList=ge("div",t+"-base",o),this._separator=ge("div",t+"-separator",o),this._overlaysList=ge("div",t+"-overlays",o),e.appendChild(o)},"_initLayout"),_getLayer:c(function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},"_getLayer"),_addLayer:c(function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(n(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},"_addLayer"),_update:c(function(){if(!this._container)return this;ve(this._baseLayersList),ve(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,n=0;for(i=0;i<this._layers.length;i++)o=this._layers[i],this._addItem(o),e=e||o.overlay,t=t||!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},"_update"),_onLayerChange:c(function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},"_onLayerChange"),_createRadioElement:c(function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},"_createRadioElement"),_addItem:c(function(t){var e,i=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=o):e=this._createRadioElement("leaflet-base-layers_"+r(this),o),this._layerControlInputs.push(e),e.layerId=r(t.layer),He(e,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},"_addItem"),_onInputClick:c(function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,o=[],n=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?o.push(e):t.checked||n.push(e);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])&&this._map.removeLayer(n[s]);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])||this._map.addLayer(o[s]);this._handlingClick=!1,this._refocusOnMap()}},"_onInputClick"),_checkDisabledLayers:c(function(){for(var t,e,i=this._layerControlInputs,o=this._map.getZoom(),n=i.length-1;n>=0;n--)t=i[n],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&o<e.options.minZoom||void 0!==e.options.maxZoom&&o>e.options.maxZoom},"_checkDisabledLayers"),_expandIfNotCollapsed:c(function(){return this._map&&!this.options.collapsed&&this.expand(),this},"_expandIfNotCollapsed"),_expandSafely:c(function(){var t=this._section;this._preventClick=!0,He(t,"click",Xe),this.expand();var e=this;setTimeout(function(){Ue(t,"click",Xe),e._preventClick=!1})},"_expandSafely")}),ci=c(function(t,e,i){return new ui(t,e,i)},"layers"),pi=li.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:c(function(t){var e="leaflet-control-zoom",i=ge("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},"onAdd"),onRemove:c(function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},"onRemove"),disable:c(function(){return this._disabled=!0,this._updateDisabled(),this},"disable"),enable:c(function(){return this._disabled=!1,this._updateDisabled(),this},"enable"),_zoomIn:c(function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomIn"),_zoomOut:c(function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomOut"),_createButton:c(function(t,e,i,o,n){var s=ge("a",i,o);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ke(s),He(s,"click",Je),He(s,"click",n,this),He(s,"click",this._refocusOnMap,this),s},"_createButton"),_updateDisabled:c(function(){var t=this._map,e="leaflet-disabled";Me(this._zoomInButton,e),Me(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(xe(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(xe(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))},"_updateDisabled")});ri.mergeOptions({zoomControl:!0}),ri.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new pi,this.addControl(this.zoomControl))});var di=c(function(t){return new pi(t)},"zoom"),_i=li.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:c(function(t){var e="leaflet-control-scale",i=ge("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},"onAdd"),onRemove:c(function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},"onRemove"),_addScales:c(function(t,e,i){t.metric&&(this._mScale=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},"_addScales"),_update:c(function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},"_update"),_updateScales:c(function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},"_updateScales"),_updateMetric:c(function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},"_updateMetric"),_updateImperial:c(function(t){var e,i,o,n=3.2808399*t;n>5280?(e=n/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(o=this._getRoundNum(n),this._updateScale(this._iScale,o+" ft",o/n))},"_updateImperial"),_updateScale:c(function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},"_updateScale"),_getRoundNum:c(function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)},"_getRoundNum")}),fi=c(function(t){return new _i(t)},"scale"),mi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gi=li.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(jt.inlineSvg?mi+" ":"")+"Leaflet</a>"},initialize:c(function(t){_(this,t),this._attributions={}},"initialize"),onAdd:c(function(t){for(var e in t.attributionControl=this,this._container=ge("div","leaflet-control-attribution"),Ke(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},"onAdd"),onRemove:c(function(t){t.off("layeradd",this._addAttribution,this)},"onRemove"),_addAttribution:c(function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},"_addAttribution"),setPrefix:c(function(t){return this.options.prefix=t,this._update(),this},"setPrefix"),addAttribution:c(function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},"addAttribution"),removeAttribution:c(function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},"removeAttribution"),_update:c(function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}},"_update")});ri.mergeOptions({attributionControl:!0}),ri.addInitHook(function(){this.options.attributionControl&&(new gi).addTo(this)});var yi=c(function(t){return new gi(t)},"attribution");li.Layers=ui,li.Zoom=pi,li.Scale=_i,li.Attribution=gi,hi.layers=ci,hi.zoom=di,hi.scale=fi,hi.attribution=yi;var vi=S.extend({initialize:c(function(t){this._map=t},"initialize"),enable:c(function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},"enable"),disable:c(function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},"disable"),enabled:c(function(){return!!this._enabled},"enabled")});vi.addTo=function(t,e){return t.addHandler(e,this),this};var Li={Events:z},wi=jt.touch?"touchstart mousedown":"mousedown",bi=D.extend({options:{clickTolerance:3},initialize:c(function(t,e,i,o){_(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},"initialize"),enable:c(function(){this._enabled||(He(this._dragStartTarget,wi,this._onDown,this),this._enabled=!0)},"enable"),disable:c(function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Ue(this._dragStartTarget,wi,this._onDown,this),this._enabled=!1,this._moved=!1)},"disable"),_onDown:c(function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)bi._dragging===this&&this.finishDrag();else if(!(bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bi._dragging=this,this._preventOutline&&Be(this._element),Ie(),ae(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Ze(this._element);this._startPoint=new I(e.clientX,e.clientY),this._startPos=ze(this._element),this._parentScale=Ne(i);var o="mousedown"===t.type;He(document,o?"mousemove":"touchmove",this._onMove,this),He(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}},"_onDown"),_onMove:c(function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new I(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Xe(t),this._moved||(this.fire("dragstart"),this._moved=!0,xe(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},"_onMove"),_updatePosition:c(function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Oe(this._element,this._newPos),this.fire("drag",t)},"_updatePosition"),_onUp:c(function(){this._enabled&&this.finishDrag()},"_onUp"),finishDrag:c(function(t){Me(document.body,"leaflet-dragging"),this._lastTarget&&(Me(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ue(document,"mousemove touchmove",this._onMove,this),Ue(document,"mouseup touchend touchcancel",this._onUp,this),Ae(),le();var e=this._moved&&this._moving;this._moving=!1,bi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})},"finishDrag")});function xi(t,e,i){var o,n,s,r,a,l,h,u,c,p=[1,4,2,8];for(n=0,h=t.length;n<h;n++)t[n]._code=Bi(t[n],e);for(r=0;r<4;r++){for(u=p[r],o=[],n=0,s=(h=t.length)-1;n<h;s=n++)a=t[n],l=t[s],a._code&u?l._code&u||((c=Ai(l,a,u,e,i))._code=Bi(c,e),o.push(c)):(l._code&u&&((c=Ai(l,a,u,e,i))._code=Bi(c,e),o.push(c)),o.push(a));t=o}return t}function Mi(t,e){var i,o,n,s,r,a,l,h,u;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=G([0,0]),p=j(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(c=Ci(t));var d=t.length,_=[];for(i=0;i<d;i++){var f=G(t[i]);_.push(e.project(G([f.lat-c.lat,f.lng-c.lng])))}for(a=l=h=0,i=0,o=d-1;i<d;o=i++)n=_[i],s=_[o],r=n.y*s.x-s.y*n.x,l+=(n.x+s.x)*r,h+=(n.y+s.y)*r,a+=3*r;u=0===a?_[0]:[l/a,h/a];var m=e.unproject(B(u));return G([m.lat+c.lat,m.lng+c.lng])}function Ci(t){for(var e=0,i=0,o=0,n=0;n<t.length;n++){var s=G(t[n]);e+=s.lat,i+=s.lng,o++}return G([e/o,i/o])}c(xi,"clipPolygon"),c(Mi,"polygonCenter"),c(Ci,"centroid");var Pi,ki={__proto__:null,clipPolygon:xi,polygonCenter:Mi,centroid:Ci};function Ti(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Oi(t=Di(t,i),i)}function Ei(t,e,i){return Math.sqrt(Zi(t,e,i,!0))}function Si(t,e,i){return Zi(t,e,i)}function Oi(t,e){var i=t.length,o=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(i);o[0]=o[i-1]=1,zi(t,o,e,0,i-1);var n,s=[];for(n=0;n<i;n++)o[n]&&s.push(t[n]);return s}function zi(t,e,i,o,n){var s,r,a,l=0;for(r=o+1;r<=n-1;r++)(a=Zi(t[r],t[o],t[n],!0))>l&&(s=r,l=a);l>i&&(e[s]=1,zi(t,e,i,o,s),zi(t,e,i,s,n))}function Di(t,e){for(var i=[t[0]],o=1,n=0,s=t.length;o<s;o++)Ri(t[o],t[n])>e&&(i.push(t[o]),n=o);return n<s-1&&i.push(t[s-1]),i}function Ii(t,e,i,o,n){var s,r,a,l=o?Pi:Bi(t,i),h=Bi(e,i);for(Pi=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Bi(r=Ai(t,e,s=l||h,i,n),i),s===l?(t=r,l=a):(e=r,h=a)}}function Ai(t,e,i,o,n){var s,r,a=e.x-t.x,l=e.y-t.y,h=o.min,u=o.max;return 8&i?(s=t.x+a*(u.y-t.y)/l,r=u.y):4&i?(s=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(s=u.x,r=t.y+l*(u.x-t.x)/a):1&i&&(s=h.x,r=t.y+l*(h.x-t.x)/a),new I(s,r,n)}function Bi(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ri(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function Zi(t,e,i,o){var n,s=e.x,r=e.y,a=i.x-s,l=i.y-r,h=a*a+l*l;return h>0&&((n=((t.x-s)*a+(t.y-r)*l)/h)>1?(s=i.x,r=i.y):n>0&&(s+=a*n,r+=l*n)),a=t.x-s,l=t.y-r,o?a*a+l*l:new I(s,r)}function Ni(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ji(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ni(t)}function Hi(t,e){var i,o,n,s,r,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=G([0,0]),c=j(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=Ci(t));var p=t.length,d=[];for(i=0;i<p;i++){var _=G(t[i]);d.push(e.project(G([_.lat-u.lat,_.lng-u.lng])))}for(i=0,o=0;i<p-1;i++)o+=d[i].distanceTo(d[i+1])/2;if(0===o)h=d[0];else for(i=0,s=0;i<p-1;i++)if(r=d[i],a=d[i+1],(s+=n=r.distanceTo(a))>o){l=(s-o)/n,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var f=e.unproject(B(h));return G([f.lat+u.lat,f.lng+u.lng])}c(Ti,"simplify"),c(Ei,"pointToSegmentDistance"),c(Si,"closestPointOnSegment"),c(Oi,"_simplifyDP"),c(zi,"_simplifyDPStep"),c(Di,"_reducePoints"),c(Ii,"clipSegment"),c(Ai,"_getEdgeIntersection"),c(Bi,"_getBitCode"),c(Ri,"_sqDist"),c(Zi,"_sqClosestPointOnSegment"),c(Ni,"isFlat"),c(ji,"_flat"),c(Hi,"polylineCenter");var Gi={__proto__:null,simplify:Ti,pointToSegmentDistance:Ei,closestPointOnSegment:Si,clipSegment:Ii,_getEdgeIntersection:Ai,_getBitCode:Bi,_sqClosestPointOnSegment:Zi,isFlat:Ni,_flat:ji,polylineCenter:Hi},Ui={project:c(function(t){return new I(t.lng,t.lat)},"project"),unproject:c(function(t){return new H(t.y,t.x)},"unproject"),bounds:new R([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:c(function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,n=this.R_MINOR/i,s=Math.sqrt(1-n*n),r=s*Math.sin(o),a=Math.tan(Math.PI/4-o/2)/Math.pow((1-r)/(1+r),s/2);return o=-i*Math.log(Math.max(a,1e-10)),new I(t.lng*e*i,o)},"project"),unproject:c(function(t){for(var e,i=180/Math.PI,o=this.R,n=this.R_MINOR/o,s=Math.sqrt(1-n*n),r=Math.exp(-t.y/o),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new H(a*i,t.x*i/o)},"unproject")},Wi={__proto__:null,LonLat:Ui,Mercator:Fi,SphericalMercator:q},Vi=i({},W,{code:"EPSG:3395",projection:Fi,transformation:function(){var t=.5/(Math.PI*Fi.R);return $(t,.5,-t,.5)}()}),qi=i({},W,{code:"EPSG:4326",projection:Ui,transformation:$(1/180,1,-1/180,.5)}),Yi=i({},F,{projection:Ui,transformation:$(1,0,-1,0),scale:c(function(t){return Math.pow(2,t)},"scale"),zoom:c(function(t){return Math.log(t)/Math.LN2},"zoom"),distance:c(function(t,e){var i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},"distance"),infinite:!0});F.Earth=W,F.EPSG3395=Vi,F.EPSG3857=X,F.EPSG900913=J,F.EPSG4326=qi,F.Simple=Yi;var $i=D.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:c(function(t){return t.addLayer(this),this},"addTo"),remove:c(function(){return this.removeFrom(this._map||this._mapToAdd)},"remove"),removeFrom:c(function(t){return t&&t.removeLayer(this),this},"removeFrom"),getPane:c(function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},"getPane"),addInteractiveTarget:c(function(t){return this._map._targets[r(t)]=this,this},"addInteractiveTarget"),removeInteractiveTarget:c(function(t){return delete this._map._targets[r(t)],this},"removeInteractiveTarget"),getAttribution:c(function(){return this.options.attribution},"getAttribution"),_layerAdd:c(function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}},"_layerAdd")});ri.include({addLayer:c(function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},"addLayer"),removeLayer:c(function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},"removeLayer"),hasLayer:c(function(t){return r(t)in this._layers},"hasLayer"),eachLayer:c(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),_addLayers:c(function(t){for(var e=0,i=(t=t?y(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},"_addLayers"),_addZoomLimit:c(function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},"_addZoomLimit"),_removeZoomLimit:c(function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},"_removeZoomLimit"),_updateZoomLevels:c(function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var n=this._zoomBoundLayers[o].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)},"_updateZoomLevels")});var Ki=$i.extend({initialize:c(function(t,e){var i,o;if(_(this,e),this._layers={},t)for(i=0,o=t.length;i<o;i++)this.addLayer(t[i])},"initialize"),addLayer:c(function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},"addLayer"),removeLayer:c(function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},"removeLayer"),hasLayer:c(function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},"hasLayer"),clearLayers:c(function(){return this.eachLayer(this.removeLayer,this)},"clearLayers"),invoke:c(function(t){var e,i,o=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,o);return this},"invoke"),onAdd:c(function(t){this.eachLayer(t.addLayer,t)},"onAdd"),onRemove:c(function(t){this.eachLayer(t.removeLayer,t)},"onRemove"),eachLayer:c(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),getLayer:c(function(t){return this._layers[t]},"getLayer"),getLayers:c(function(){var t=[];return this.eachLayer(t.push,t),t},"getLayers"),setZIndex:c(function(t){return this.invoke("setZIndex",t)},"setZIndex"),getLayerId:c(function(t){return r(t)},"getLayerId")}),Xi=c(function(t,e){return new Ki(t,e)},"layerGroup"),Ji=Ki.extend({addLayer:c(function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},"addLayer"),removeLayer:c(function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Ki.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},"removeLayer"),setStyle:c(function(t){return this.invoke("setStyle",t)},"setStyle"),bringToFront:c(function(){return this.invoke("bringToFront")},"bringToFront"),bringToBack:c(function(){return this.invoke("bringToBack")},"bringToBack"),getBounds:c(function(){var t=new N;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t},"getBounds")}),Qi=c(function(t,e){return new Ji(t,e)},"featureGroup"),to=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:c(function(t){_(this,t)},"initialize"),createIcon:c(function(t){return this._createIcon("icon",t)},"createIcon"),createShadow:c(function(t){return this._createIcon("shadow",t)},"createShadow"),_createIcon:c(function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o},"_createIcon"),_setIconStyles:c(function(t,e){var i=this.options,o=i[e+"Size"];"number"==typeof o&&(o=[o,o]);var n=B(o),s=B("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},"_setIconStyles"),_createImg:c(function(t,e){return(e=e||document.createElement("img")).src=t,e},"_createImg"),_getIconUrl:c(function(t){return jt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]},"_getIconUrl")});function eo(t){return new to(t)}c(eo,"icon");var io=to.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:c(function(t){return"string"!=typeof io.imagePath&&(io.imagePath=this._detectIconPath()),(this.options.imagePath||io.imagePath)+to.prototype._getIconUrl.call(this,t)},"_getIconUrl"),_stripUrl:c(function(t){var e=c(function(t,e,i){var o=e.exec(t);return o&&o[i]},"strip");return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},"_stripUrl"),_detectIconPath:c(function(){var t=ge("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""},"_detectIconPath")}),oo=vi.extend({initialize:c(function(t){this._marker=t},"initialize"),addHooks:c(function(){var t=this._marker._icon;this._draggable||(this._draggable=new bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xe(t,"leaflet-marker-draggable")},"addHooks"),removeHooks:c(function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Me(this._marker._icon,"leaflet-marker-draggable")},"removeHooks"),moved:c(function(){return this._draggable&&this._draggable._moved},"moved"),_adjustPan:c(function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,s=ze(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=Z(r.min._subtract(a).add(n),r.max._subtract(a).subtract(n));if(!l.contains(s)){var h=B((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(o);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Oe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},"_adjustPan"),_onDragStart:c(function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},"_onDragStart"),_onPreDrag:c(function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},"_onPreDrag"),_onDrag:c(function(t){var e=this._marker,i=e._shadow,o=ze(e._icon),n=e._map.layerPointToLatLng(o);i&&Oe(i,o),e._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},"_onDrag"),_onDragEnd:c(function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)},"_onDragEnd")}),no=$i.extend({options:{icon:new io,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:c(function(t,e){_(this,e),this._latlng=G(t)},"initialize"),onAdd:c(function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},"onAdd"),onRemove:c(function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},"onRemove"),getEvents:c(function(){return{zoom:this.update,viewreset:this.update}},"getEvents"),getLatLng:c(function(){return this._latlng},"getLatLng"),setLatLng:c(function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),setZIndexOffset:c(function(t){return this.options.zIndexOffset=t,this.update()},"setZIndexOffset"),getIcon:c(function(){return this.options.icon},"getIcon"),setIcon:c(function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},"setIcon"),getElement:c(function(){return this._icon},"getElement"),update:c(function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},"update"),_initIcon:c(function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),xe(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&He(i,"focus",this._panOnFocus,this);var n=t.icon.createShadow(this._shadow),s=!1;n!==this._shadow&&(this._removeShadow(),s=!0),n&&(xe(n,e),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},"_initIcon"),_removeIcon:c(function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ue(this._icon,"focus",this._panOnFocus,this),ye(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},"_removeIcon"),_removeShadow:c(function(){this._shadow&&ye(this._shadow),this._shadow=null},"_removeShadow"),_setPos:c(function(t){this._icon&&Oe(this._icon,t),this._shadow&&Oe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},"_setPos"),_updateZIndex:c(function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},"_updateZIndex"),_animateZoom:c(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},"_animateZoom"),_initInteraction:c(function(){if(this.options.interactive&&(xe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),oo)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new oo(this),t&&this.dragging.enable()}},"_initInteraction"),setOpacity:c(function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},"setOpacity"),_updateOpacity:c(function(){var t=this.options.opacity;this._icon&&ke(this._icon,t),this._shadow&&ke(this._shadow,t)},"_updateOpacity"),_bringToFront:c(function(){this._updateZIndex(this.options.riseOffset)},"_bringToFront"),_resetZIndex:c(function(){this._updateZIndex(0)},"_resetZIndex"),_panOnFocus:c(function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?B(e.iconSize):B(0,0),o=e.iconAnchor?B(e.iconAnchor):B(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}},"_panOnFocus"),_getPopupAnchor:c(function(){return this.options.icon.options.popupAnchor},"_getPopupAnchor"),_getTooltipAnchor:c(function(){return this.options.icon.options.tooltipAnchor},"_getTooltipAnchor")});function so(t,e){return new no(t,e)}c(so,"marker");var ro=$i.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:c(function(t){this._renderer=t.getRenderer(this)},"beforeAdd"),onAdd:c(function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},"onAdd"),onRemove:c(function(){this._renderer._removePath(this)},"onRemove"),redraw:c(function(){return this._map&&this._renderer._updatePath(this),this},"redraw"),setStyle:c(function(t){return _(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},"setStyle"),bringToFront:c(function(){return this._renderer&&this._renderer._bringToFront(this),this},"bringToFront"),bringToBack:c(function(){return this._renderer&&this._renderer._bringToBack(this),this},"bringToBack"),getElement:c(function(){return this._path},"getElement"),_reset:c(function(){this._project(),this._update()},"_reset"),_clickTolerance:c(function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)},"_clickTolerance")}),ao=ro.extend({options:{fill:!0,radius:10},initialize:c(function(t,e){_(this,e),this._latlng=G(t),this._radius=this.options.radius},"initialize"),setLatLng:c(function(t){var e=this._latlng;return this._latlng=G(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),getLatLng:c(function(){return this._latlng},"getLatLng"),setRadius:c(function(t){return this.options.radius=this._radius=t,this.redraw()},"setRadius"),getRadius:c(function(){return this._radius},"getRadius"),setStyle:c(function(t){var e=t&&t.radius||this._radius;return ro.prototype.setStyle.call(this,t),this.setRadius(e),this},"setStyle"),_project:c(function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},"_project"),_updateBounds:c(function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),o=[t+i,e+i];this._pxBounds=new R(this._point.subtract(o),this._point.add(o))},"_updateBounds"),_update:c(function(){this._map&&this._updatePath()},"_update"),_updatePath:c(function(){this._renderer._updateCircle(this)},"_updatePath"),_empty:c(function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},"_empty"),_containsPoint:c(function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},"_containsPoint")});function lo(t,e){return new ao(t,e)}c(lo,"circleMarker");var ho=ao.extend({initialize:c(function(t,e,o){if("number"==typeof e&&(e=i({},o,{radius:e})),_(this,e),this._latlng=G(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},"initialize"),setRadius:c(function(t){return this._mRadius=t,this.redraw()},"setRadius"),getRadius:c(function(){return this._mRadius},"getRadius"),getBounds:c(function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},"getBounds"),setStyle:ro.prototype.setStyle,_project:c(function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===W.distance){var n=Math.PI/180,s=this._mRadius/W.R/n,r=i.project([e+s,t]),a=i.project([e-s,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(s*n)-Math.sin(e*n)*Math.sin(h*n))/(Math.cos(e*n)*Math.cos(h*n)))/n;(isNaN(u)||0===u)&&(u=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-i.project([h,t-u]).x,this._radiusY=l.y-r.y}else{var c=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()},"_project")});function uo(t,e,i){return new ho(t,e,i)}c(uo,"circle");var co=ro.extend({options:{smoothFactor:1,noClip:!1},initialize:c(function(t,e){_(this,e),this._setLatLngs(t)},"initialize"),getLatLngs:c(function(){return this._latlngs},"getLatLngs"),setLatLngs:c(function(t){return this._setLatLngs(t),this.redraw()},"setLatLngs"),isEmpty:c(function(){return!this._latlngs.length},"isEmpty"),closestLayerPoint:c(function(t){for(var e,i,o=1/0,n=null,s=Zi,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,u=l.length;h<u;h++){var c=s(t,e=l[h-1],i=l[h],!0);c<o&&(o=c,n=s(t,e,i))}return n&&(n.distance=Math.sqrt(o)),n},"closestLayerPoint"),getCenter:c(function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Hi(this._defaultShape(),this._map.options.crs)},"getCenter"),getBounds:c(function(){return this._bounds},"getBounds"),addLatLng:c(function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},"addLatLng"),_setLatLngs:c(function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},"_setLatLngs"),_defaultShape:c(function(){return Ni(this._latlngs)?this._latlngs:this._latlngs[0]},"_defaultShape"),_convertLatLngs:c(function(t){for(var e=[],i=Ni(t),o=0,n=t.length;o<n;o++)i?(e[o]=G(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},"_convertLatLngs"),_project:c(function(){var t=new R;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},"_project"),_updateBounds:c(function(){var t=this._clickTolerance(),e=new I(t,t);this._rawPxBounds&&(this._pxBounds=new R([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},"_updateBounds"),_projectLatlngs:c(function(t,e,i){var o,n,s=t[0]instanceof H,r=t.length;if(s){for(n=[],o=0;o<r;o++)n[o]=this._map.latLngToLayerPoint(t[o]),i.extend(n[o]);e.push(n)}else for(o=0;o<r;o++)this._projectLatlngs(t[o],e,i)},"_projectLatlngs"),_clipPoints:c(function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,o,n,s,r,a,l=this._parts;for(e=0,o=0,n=this._rings.length;e<n;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=Ii(a[i],a[i+1],t,i,!0))&&(l[o]=l[o]||[],l[o].push(r[0]),r[1]===a[i+1]&&i!==s-2||(l[o].push(r[1]),o++))}},"_clipPoints"),_simplifyPoints:c(function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=Ti(t[i],e)},"_simplifyPoints"),_update:c(function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},"_update"),_updatePath:c(function(){this._renderer._updatePoly(this)},"_updatePath"),_containsPoint:c(function(t,e){var i,o,n,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(o=0,n=(r=(a=this._parts[i]).length)-1;o<r;n=o++)if((e||0!==o)&&Ei(t,a[n],a[o])<=l)return!0;return!1},"_containsPoint")});function po(t,e){return new co(t,e)}c(po,"polyline"),co._flat=ji;var _o=co.extend({options:{fill:!0},isEmpty:c(function(){return!this._latlngs.length||!this._latlngs[0].length},"isEmpty"),getCenter:c(function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Mi(this._defaultShape(),this._map.options.crs)},"getCenter"),_convertLatLngs:c(function(t){var e=co.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof H&&e[0].equals(e[i-1])&&e.pop(),e},"_convertLatLngs"),_setLatLngs:c(function(t){co.prototype._setLatLngs.call(this,t),Ni(this._latlngs)&&(this._latlngs=[this._latlngs])},"_setLatLngs"),_defaultShape:c(function(){return Ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},"_defaultShape"),_clipPoints:c(function(){var t=this._renderer._bounds,e=this.options.weight,i=new I(e,e);if(t=new R(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,s=this._rings.length;n<s;n++)(o=xi(this._rings[n],t,!0)).length&&this._parts.push(o)},"_clipPoints"),_updatePath:c(function(){this._renderer._updatePoly(this,!0)},"_updatePath"),_containsPoint:c(function(t){var e,i,o,n,s,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,a=this._parts.length;n<a;n++)for(s=0,r=(l=(e=this._parts[n]).length)-1;s<l;r=s++)i=e[s],o=e[r],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(h=!h);return h||co.prototype._containsPoint.call(this,t,!0)},"_containsPoint")});function fo(t,e){return new _o(t,e)}c(fo,"polygon");var mo=Ji.extend({initialize:c(function(t,e){_(this,e),this._layers={},t&&this.addData(t)},"initialize"),addData:c(function(t){var e,i,o,n=y(t)?t:t.features;if(n){for(e=0,i=n.length;e<i;e++)((o=n[e]).geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=go(t,s);return r?(r.feature=Mo(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},"addData"),resetStyle:c(function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},"resetStyle"),setStyle:c(function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},"setStyle"),_setLayerStyle:c(function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))},"_setLayerStyle")});function go(t,e){var i,o,n,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||vo;if(!a&&!r)return null;switch(r.type){case"Point":return yo(h,t,i=u(a),e);case"MultiPoint":for(n=0,s=a.length;n<s;n++)i=u(a[n]),l.push(yo(h,t,i,e));return new Ji(l);case"LineString":case"MultiLineString":return o=Lo(a,"LineString"===r.type?0:1,u),new co(o,e);case"Polygon":case"MultiPolygon":return o=Lo(a,"Polygon"===r.type?1:2,u),new _o(o,e);case"GeometryCollection":for(n=0,s=r.geometries.length;n<s;n++){var c=go({geometry:r.geometries[n],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Ji(l);case"FeatureCollection":for(n=0,s=r.features.length;n<s;n++){var p=go(r.features[n],e);p&&l.push(p)}return new Ji(l);default:throw new Error("Invalid GeoJSON object.")}}function yo(t,e,i,o){return t?t(e,i):new no(i,o&&o.markersInheritOptions&&o)}function vo(t){return new H(t[1],t[0],t[2])}function Lo(t,e,i){for(var o,n=[],s=0,r=t.length;s<r;s++)o=e?Lo(t[s],e-1,i):(i||vo)(t[s]),n.push(o);return n}function wo(t,e){return void 0!==(t=G(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function bo(t,e,i,o){for(var n=[],s=0,r=t.length;s<r;s++)n.push(e?bo(t[s],Ni(t[s])?0:e-1,i,o):wo(t[s],o));return!e&&i&&n.length>0&&n.push(n[0].slice()),n}function xo(t,e){return t.feature?i({},t.feature,{geometry:e}):Mo(e)}function Mo(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}c(go,"geometryToLayer"),c(yo,"_pointToLayer"),c(vo,"coordsToLatLng"),c(Lo,"coordsToLatLngs"),c(wo,"latLngToCoords"),c(bo,"latLngsToCoords"),c(xo,"getFeature"),c(Mo,"asFeature");var Co={toGeoJSON:c(function(t){return xo(this,{type:"Point",coordinates:wo(this.getLatLng(),t)})},"toGeoJSON")};function Po(t,e){return new mo(t,e)}no.include(Co),ho.include(Co),ao.include(Co),co.include({toGeoJSON:c(function(t){var e=!Ni(this._latlngs);return xo(this,{type:(e?"Multi":"")+"LineString",coordinates:bo(this._latlngs,e?1:0,!1,t)})},"toGeoJSON")}),_o.include({toGeoJSON:c(function(t){var e=!Ni(this._latlngs),i=e&&!Ni(this._latlngs[0]),o=bo(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),xo(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})},"toGeoJSON")}),Ki.include({toMultiPoint:c(function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),xo(this,{type:"MultiPoint",coordinates:e})},"toMultiPoint"),toGeoJSON:c(function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,o=[];return this.eachLayer(function(e){if(e.toGeoJSON){var n=e.toGeoJSON(t);if(i)o.push(n.geometry);else{var s=Mo(n);"FeatureCollection"===s.type?o.push.apply(o,s.features):o.push(s)}}}),i?xo(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}},"toGeoJSON")}),c(Po,"geoJSON");var ko=Po,To=$i.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:c(function(t,e,i){this._url=t,this._bounds=j(e),_(this,i)},"initialize"),onAdd:c(function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},"onAdd"),onRemove:c(function(){ye(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},"onRemove"),setOpacity:c(function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},"setOpacity"),setStyle:c(function(t){return t.opacity&&this.setOpacity(t.opacity),this},"setStyle"),bringToFront:c(function(){return this._map&&Le(this._image),this},"bringToFront"),bringToBack:c(function(){return this._map&&we(this._image),this},"bringToBack"),setUrl:c(function(t){return this._url=t,this._image&&(this._image.src=t),this},"setUrl"),setBounds:c(function(t){return this._bounds=j(t),this._map&&this._reset(),this},"setBounds"),getEvents:c(function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),setZIndex:c(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),getBounds:c(function(){return this._bounds},"getBounds"),getElement:c(function(){return this._image},"getElement"),_initImage:c(function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ge("img");xe(e,"leaflet-image-layer"),this._zoomAnimated&&xe(e,"leaflet-zoom-animated"),this.options.className&&xe(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=n(this.fire,this,"load"),e.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},"_initImage"),_animateZoom:c(function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Se(this._image,i,e)},"_animateZoom"),_reset:c(function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Oe(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},"_reset"),_updateOpacity:c(function(){ke(this._image,this.options.opacity)},"_updateOpacity"),_updateZIndex:c(function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},"_updateZIndex"),_overlayOnError:c(function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},"_overlayOnError"),getCenter:c(function(){return this._bounds.getCenter()},"getCenter")}),Eo=c(function(t,e,i){return new To(t,e,i)},"imageOverlay"),So=To.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:c(function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ge("video");if(xe(e,"leaflet-image-layer"),this._zoomAnimated&&xe(e,"leaflet-zoom-animated"),this.options.className&&xe(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=n(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],s=0;s<i.length;s++)o.push(i[s].src);this._url=i.length>0?o:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=ge("source");a.src=this._url[r],e.appendChild(a)}}},"_initImage")});function Oo(t,e,i){return new So(t,e,i)}c(Oo,"videoOverlay");var zo=To.extend({_initImage:c(function(){var t=this._image=this._url;xe(t,"leaflet-image-layer"),this._zoomAnimated&&xe(t,"leaflet-zoom-animated"),this.options.className&&xe(t,this.options.className),t.onselectstart=h,t.onmousemove=h},"_initImage")});function Do(t,e,i){return new zo(t,e,i)}c(Do,"svgOverlay");var Io=$i.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:c(function(t,e){t&&(t instanceof H||y(t))?(this._latlng=G(t),_(this,e)):(_(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},"initialize"),openOn:c(function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},"openOn"),close:c(function(){return this._map&&this._map.removeLayer(this),this},"close"),toggle:c(function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},"toggle"),onAdd:c(function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ke(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ke(this._container,1),this.bringToFront(),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},"onAdd"),onRemove:c(function(t){t._fadeAnimated?(ke(this._container,0),this._removeTimeout=setTimeout(n(ye,void 0,this._container),200)):ye(this._container),this.options.interactive&&(Me(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},"onRemove"),getLatLng:c(function(){return this._latlng},"getLatLng"),setLatLng:c(function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},"setLatLng"),getContent:c(function(){return this._content},"getContent"),setContent:c(function(t){return this._content=t,this.update(),this},"setContent"),getElement:c(function(){return this._container},"getElement"),update:c(function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},"update"),getEvents:c(function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),isOpen:c(function(){return!!this._map&&this._map.hasLayer(this)},"isOpen"),bringToFront:c(function(){return this._map&&Le(this._container),this},"bringToFront"),bringToBack:c(function(){return this._map&&we(this._container),this},"bringToBack"),_prepareOpen:c(function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Ji){e=null;var i=this._source._layers;for(var o in i)if(i[o]._map){e=i[o];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},"_prepareOpen"),_updateContent:c(function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},"_updateContent"),_updatePosition:c(function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),i=this._getAnchor();this._zoomAnimated?Oe(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}},"_updatePosition"),_getAnchor:c(function(){return[0,0]},"_getAnchor")});ri.include({_initOverlay:c(function(t,e,i,o){var n=e;return n instanceof t||(n=new t(o).setContent(e)),i&&n.setLatLng(i),n},"_initOverlay")}),$i.include({_initOverlay:c(function(t,e,i,o){var n=i;return n instanceof t?(_(n,o),n._source=this):(n=e&&!o?e:new t(o,this)).setContent(i),n},"_initOverlay")});var Ao=Io.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:c(function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Io.prototype.openOn.call(this,t)},"openOn"),onAdd:c(function(t){Io.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ro||this._source.on("preclick",Ye))},"onAdd"),onRemove:c(function(t){Io.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ro||this._source.off("preclick",Ye))},"onRemove"),getEvents:c(function(){var t=Io.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},"getEvents"),_initLayout:c(function(){var t="leaflet-popup",e=this._container=ge("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ge("div",t+"-content-wrapper",e);if(this._contentNode=ge("div",t+"-content",i),Ke(e),$e(this._contentNode),He(e,"contextmenu",Ye),this._tipContainer=ge("div",t+"-tip-container",e),this._tip=ge("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=ge("a",t+"-close-button",e);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">&#215;</span>',He(o,"click",function(t){Xe(t),this.close()},this)}},"_initLayout"),_updateLayout:c(function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=t.offsetHeight,n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&o>n?(e.height=n+"px",xe(t,s)):Me(t,s),this._containerWidth=this._container.offsetWidth},"_updateLayout"),_animateZoom:c(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Oe(this._container,e.add(i))},"_animateZoom"),_adjustPan:c(function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new I(this._containerLeft,-i-this._containerBottom);n._add(ze(this._container));var s=t.layerPointToContainerPoint(n),r=B(this.options.autoPanPadding),a=B(this.options.autoPanPaddingTopLeft||r),l=B(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),u=0,c=0;s.x+o+l.x>h.x&&(u=s.x+o-h.x+l.x),s.x-u-a.x<0&&(u=s.x-a.x),s.y+i+l.y>h.y&&(c=s.y+i-h.y+l.y),s.y-c-a.y<0&&(c=s.y-a.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},"_adjustPan"),_getAnchor:c(function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])},"_getAnchor")}),Bo=c(function(t,e){return new Ao(t,e)},"popup");ri.mergeOptions({closePopupOnClick:!0}),ri.include({openPopup:c(function(t,e,i){return this._initOverlay(Ao,t,e,i).openOn(this),this},"openPopup"),closePopup:c(function(t){return(t=arguments.length?t:this._popup)&&t.close(),this},"closePopup")}),$i.include({bindPopup:c(function(t,e){return this._popup=this._initOverlay(Ao,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},"bindPopup"),unbindPopup:c(function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},"unbindPopup"),openPopup:c(function(t){return this._popup&&(this instanceof Ji||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},"openPopup"),closePopup:c(function(){return this._popup&&this._popup.close(),this},"closePopup"),togglePopup:c(function(){return this._popup&&this._popup.toggle(this),this},"togglePopup"),isPopupOpen:c(function(){return!!this._popup&&this._popup.isOpen()},"isPopupOpen"),setPopupContent:c(function(t){return this._popup&&this._popup.setContent(t),this},"setPopupContent"),getPopup:c(function(){return this._popup},"getPopup"),_openPopup:c(function(t){if(this._popup&&this._map){Je(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof ro?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},"_openPopup"),_movePopup:c(function(t){this._popup.setLatLng(t.latlng)},"_movePopup"),_onKeyPress:c(function(t){13===t.originalEvent.keyCode&&this._openPopup(t)},"_onKeyPress")});var Ro=Io.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:c(function(t){Io.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},"onAdd"),onRemove:c(function(t){Io.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},"onRemove"),getEvents:c(function(){var t=Io.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},"getEvents"),_initLayout:c(function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ge("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},"_initLayout"),_updateLayout:c(function(){},"_updateLayout"),_adjustPan:c(function(){},"_adjustPan"),_setPosition:c(function(t){var e,i,o=this._map,n=this._container,s=o.latLngToContainerPoint(o.getCenter()),r=o.layerPointToContainerPoint(t),a=this.options.direction,l=n.offsetWidth,h=n.offsetHeight,u=B(this.options.offset),c=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):r.x<s.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(u.x+c.x),i=h/2),t=t.subtract(B(e,i,!0)).add(u).add(c),Me(n,"leaflet-tooltip-right"),Me(n,"leaflet-tooltip-left"),Me(n,"leaflet-tooltip-top"),Me(n,"leaflet-tooltip-bottom"),xe(n,"leaflet-tooltip-"+a),Oe(n,t)},"_setPosition"),_updatePosition:c(function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},"_updatePosition"),setOpacity:c(function(t){this.options.opacity=t,this._container&&ke(this._container,t)},"setOpacity"),_animateZoom:c(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},"_animateZoom"),_getAnchor:c(function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])},"_getAnchor")}),Zo=c(function(t,e){return new Ro(t,e)},"tooltip");ri.include({openTooltip:c(function(t,e,i){return this._initOverlay(Ro,t,e,i).openOn(this),this},"openTooltip"),closeTooltip:c(function(t){return t.close(),this},"closeTooltip")}),$i.include({bindTooltip:c(function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ro,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},"bindTooltip"),unbindTooltip:c(function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},"unbindTooltip"),_initTooltipInteractions:c(function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},"_initTooltipInteractions"),openTooltip:c(function(t){return this._tooltip&&(this instanceof Ji||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},"openTooltip"),closeTooltip:c(function(){if(this._tooltip)return this._tooltip.close()},"closeTooltip"),toggleTooltip:c(function(){return this._tooltip&&this._tooltip.toggle(this),this},"toggleTooltip"),isTooltipOpen:c(function(){return this._tooltip.isOpen()},"isTooltipOpen"),setTooltipContent:c(function(t){return this._tooltip&&this._tooltip.setContent(t),this},"setTooltipContent"),getTooltip:c(function(){return this._tooltip},"getTooltip"),_addFocusListeners:c(function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},"_addFocusListeners"),_addFocusListenersOnLayer:c(function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(He(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),He(e,"blur",this.closeTooltip,this))},"_addFocusListenersOnLayer"),_setAriaDescribedByOnLayer:c(function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},"_setAriaDescribedByOnLayer"),_openTooltip:c(function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},"_openTooltip"),_moveTooltip:c(function(t){var e,i,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(o)},"_moveTooltip")});var No=to.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:c(function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(ve(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var o=B(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},"createIcon"),createShadow:c(function(){return null},"createShadow")});function jo(t){return new No(t)}c(jo,"divIcon"),to.Default=io;var Ho=$i.extend({options:{tileSize:256,opacity:1,updateWhenIdle:jt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:c(function(t){_(this,t)},"initialize"),onAdd:c(function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},"onAdd"),beforeAdd:c(function(t){t._addZoomLimit(this)},"beforeAdd"),onRemove:c(function(t){this._removeAllTiles(),ye(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},"onRemove"),bringToFront:c(function(){return this._map&&(Le(this._container),this._setAutoZIndex(Math.max)),this},"bringToFront"),bringToBack:c(function(){return this._map&&(we(this._container),this._setAutoZIndex(Math.min)),this},"bringToBack"),getContainer:c(function(){return this._container},"getContainer"),setOpacity:c(function(t){return this.options.opacity=t,this._updateOpacity(),this},"setOpacity"),setZIndex:c(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),isLoading:c(function(){return this._loading},"isLoading"),redraw:c(function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},"redraw"),getEvents:c(function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),createTile:c(function(){return document.createElement("div")},"createTile"),getTileSize:c(function(){var t=this.options.tileSize;return t instanceof I?t:new I(t,t)},"getTileSize"),_updateZIndex:c(function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},"_updateZIndex"),_setAutoZIndex:c(function(t){for(var e,i=this.getPane().children,o=-t(-1/0,1/0),n=0,s=i.length;n<s;n++)e=i[n].style.zIndex,i[n]!==this._container&&e&&(o=t(o,+e));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},"_setAutoZIndex"),_updateOpacity:c(function(){if(this._map&&!jt.ielt9){ke(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var n=this._tiles[o];if(n.current&&n.loaded){var s=Math.min(1,(t-n.loaded)/200);ke(n.el,s),s<1?e=!0:(n.active?i=!0:this._onOpaqueTile(n),n.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},"_updateOpacity"),_onOpaqueTile:h,_initContainer:c(function(){this._container||(this._container=ge("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},"_initContainer"),_updateLevels:c(function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ye(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],n=this._map;return o||((o=this._levels[t]={}).el=ge("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,n.getCenter(),n.getZoom()),h(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},"_updateLevels"),_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:c(function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},"_pruneTiles"),_removeTilesAtZoom:c(function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},"_removeTilesAtZoom"),_removeAllTiles:c(function(){for(var t in this._tiles)this._removeTile(t)},"_removeAllTiles"),_invalidateAll:c(function(){for(var t in this._levels)ye(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},"_invalidateAll"),_retainParent:c(function(t,e,i,o){var n=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new I(+n,+s);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>o&&this._retainParent(n,s,r,o))},"_retainParent"),_retainChildren:c(function(t,e,i,o){for(var n=2*t;n<2*t+2;n++)for(var s=2*e;s<2*e+2;s++){var r=new I(n,s);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<o&&this._retainChildren(n,s,i+1,o))}},"_retainChildren"),_resetView:c(function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},"_resetView"),_animateZoom:c(function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},"_animateZoom"),_clampZoom:c(function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},"_clampZoom"),_setView:c(function(t,e,i,o){var n=Math.round(e);n=void 0!==this.options.maxZoom&&n>this.options.maxZoom||void 0!==this.options.minZoom&&n<this.options.minZoom?void 0:this._clampZoom(n);var s=this.options.updateWhenZooming&&n!==this._tileZoom;o&&!s||(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==n&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},"_setView"),_setZoomTransforms:c(function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},"_setZoomTransforms"),_setZoomTransform:c(function(t,e,i){var o=this._map.getZoomScale(i,t.zoom),n=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();jt.any3d?Se(t.el,n,o):Oe(t.el,n)},"_setZoomTransform"),_resetGrid:c(function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},"_resetGrid"),_onMoveEnd:c(function(){this._map&&!this._map._animatingZoom&&this._update()},"_onMoveEnd"),_getTiledPixelBounds:c(function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._tileZoom),n=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*o);return new R(n.subtract(s),n.add(s))},"_getTiledPixelBounds"),_update:c(function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var o=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(o),s=n.getCenter(),r=[],a=this.options.keepBuffer,l=new R(n.getBottomLeft().subtract([a,-a]),n.getTopRight().add([a,-a]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new I(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=n.min.y;c<=n.max.y;c++)for(var p=n.min.x;p<=n.max.x;p++){var d=new I(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:r.push(d)}}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(p=0;p<r.length;p++)this._addTile(r[p],f);this._level.el.appendChild(f)}}}}},"_update"),_isValidTile:c(function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(o)},"_isValidTile"),_keyToBounds:c(function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},"_keyToBounds"),_tileCoordsToNwSe:c(function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),n=o.add(i);return[e.unproject(o,t.z),e.unproject(n,t.z)]},"_tileCoordsToNwSe"),_tileCoordsToBounds:c(function(t){var e=this._tileCoordsToNwSe(t),i=new N(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},"_tileCoordsToBounds"),_tileCoordsToKey:c(function(t){return t.x+":"+t.y+":"+t.z},"_tileCoordsToKey"),_keyToTileCoords:c(function(t){var e=t.split(":"),i=new I(+e[0],+e[1]);return i.z=+e[2],i},"_keyToTileCoords"),_removeTile:c(function(t){var e=this._tiles[t];e&&(ye(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},"_removeTile"),_initTile:c(function(t){xe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,jt.ielt9&&this.options.opacity<1&&ke(t,this.options.opacity)},"_initTile"),_addTile:c(function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&k(n(this._tileReady,this,t,null,s)),Oe(s,i),this._tiles[o]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},"_addTile"),_tileReady:c(function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);(i=this._tiles[o])&&(i.loaded=+new Date,this._map._fadeAnimated?(ke(i.el,0),T(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(xe(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),jt.ielt9||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},"_tileReady"),_getTilePos:c(function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},"_getTilePos"),_wrapCoords:c(function(t){var e=new I(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},"_wrapCoords"),_pxBoundsToTileRange:c(function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},"_pxBoundsToTileRange"),_noTilesToLoad:c(function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0},"_noTilesToLoad")});function Go(t){return new Ho(t)}c(Go,"gridLayer");var Uo=Ho.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:c(function(t,e){this._url=t,(e=_(this,e)).detectRetina&&jt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},"initialize"),setUrl:c(function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},"setUrl"),createTile:c(function(t,e){var i=document.createElement("img");return He(i,"load",n(this._tileOnLoad,this,e,i)),He(i,"error",n(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},"createTile"),getTileUrl:c(function(t){var e={r:jt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return g(this._url,i(e,this.options))},"getTileUrl"),_tileOnLoad:c(function(t,e){jt.ielt9?setTimeout(n(t,this,null,e),0):t(null,e)},"_tileOnLoad"),_tileOnError:c(function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},"_tileOnError"),_onTileRemove:c(function(t){t.tile.onload=null},"_onTileRemove"),_getZoomForUrl:c(function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},"_getZoomForUrl"),_getSubdomain:c(function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},"_getSubdomain"),_abortLoading:c(function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=w;var i=this._tiles[t].coords;ye(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},"_abortLoading"),_removeTile:c(function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",w),Ho.prototype._removeTile.call(this,t)},"_removeTile"),_tileReady:c(function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==w))return Ho.prototype._tileReady.call(this,t,e,i)},"_tileReady")});function Fo(t,e){return new Uo(t,e)}c(Fo,"tileLayer");var Wo=Uo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:c(function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var n in e)n in this.options||(o[n]=e[n]);var s=(e=_(this,e)).detectRetina&&jt.retina?2:1,r=this.getTileSize();o.width=r.x*s,o.height=r.y*s,this.wmsParams=o},"initialize"),onAdd:c(function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Uo.prototype.onAdd.call(this,t)},"onAdd"),getTileUrl:c(function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=Z(i.project(e[0]),i.project(e[1])),n=o.min,s=o.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[n.y,n.x,s.y,s.x]:[n.x,n.y,s.x,s.y]).join(","),a=Uo.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},"getTileUrl"),setParams:c(function(t,e){return i(this.wmsParams,t),e||this.redraw(),this},"setParams")});function Vo(t,e){return new Wo(t,e)}c(Vo,"tileLayerWMS"),Uo.WMS=Wo,Fo.wms=Vo;var qo=$i.extend({options:{padding:.1},initialize:c(function(t){_(this,t),r(this),this._layers=this._layers||{}},"initialize"),onAdd:c(function(){this._container||(this._initContainer(),xe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},"onAdd"),onRemove:c(function(){this.off("update",this._updatePaths,this),this._destroyContainer()},"onRemove"),getEvents:c(function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},"getEvents"),_onAnimZoom:c(function(t){this._updateTransform(t.center,t.zoom)},"_onAnimZoom"),_onZoom:c(function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},"_onZoom"),_updateTransform:c(function(t,e){var i=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,e),s=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(t,e));jt.any3d?Se(this._container,s,i):Oe(this._container,s)},"_updateTransform"),_reset:c(function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},"_reset"),_onZoomEnd:c(function(){for(var t in this._layers)this._layers[t]._project()},"_onZoomEnd"),_updatePaths:c(function(){for(var t in this._layers)this._layers[t]._update()},"_updatePaths"),_update:c(function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new R(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()},"_update")}),Yo=qo.extend({options:{tolerance:0},getEvents:c(function(){var t=qo.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},"getEvents"),_onViewPreReset:c(function(){this._postponeUpdatePaths=!0},"_onViewPreReset"),onAdd:c(function(){qo.prototype.onAdd.call(this),this._draw()},"onAdd"),_initContainer:c(function(){var t=this._container=document.createElement("canvas");He(t,"mousemove",this._onMouseMove,this),He(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),He(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},"_initContainer"),_destroyContainer:c(function(){T(this._redrawRequest),delete this._ctx,ye(this._container),Ue(this._container),delete this._container},"_destroyContainer"),_updatePaths:c(function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},"_updatePaths"),_update:c(function(){if(!this._map._animatingZoom||!this._bounds){qo.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=jt.retina?2:1;Oe(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",jt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},"_update"),_reset:c(function(){qo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},"_reset"),_initPath:c(function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},"_initPath"),_addPath:c(function(t){this._requestRedraw(t)},"_addPath"),_removePath:c(function(t){var e=t._order,i=e.next,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},"_removePath"),_updatePath:c(function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},"_updatePath"),_updateStyle:c(function(t){this._updateDashArray(t),this._requestRedraw(t)},"_updateStyle"),_updateDashArray:c(function(t){if("string"==typeof t.options.dashArray){var e,i,o=t.options.dashArray.split(/[, ]+/),n=[];for(i=0;i<o.length;i++){if(e=Number(o[i]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},"_updateDashArray"),_requestRedraw:c(function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},"_requestRedraw"),_extendRedrawBounds:c(function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},"_extendRedrawBounds"),_redraw:c(function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},"_redraw"),_clear:c(function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},"_clear"),_draw:c(function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)t=o.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},"_draw"),_updatePoly:c(function(t,e){if(this._drawing){var i,o,n,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(o=0,n=r[i].length;o<n;o++)s=r[i][o],l[o?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},"_updatePoly"),_updateCircle:c(function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),n=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==n&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,0,2*Math.PI,!1),1!==n&&i.restore(),this._fillStroke(i,t)}},"_updateCircle"),_fillStroke:c(function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},"_fillStroke"),_onClick:c(function(t){for(var e,i,o=this._map.mouseEventToLayerPoint(t),n=this._drawFirst;n;n=n.next)(e=n.layer).options.interactive&&e._containsPoint(o)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},"_onClick"),_onMouseMove:c(function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},"_onMouseMove"),_handleMouseOut:c(function(t){var e=this._hoveredLayer;e&&(Me(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},"_handleMouseOut"),_handleMouseHover:c(function(t,e){if(!this._mouseHoverThrottled){for(var i,o,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(xe(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n(function(){this._mouseHoverThrottled=!1},this),32)}},"_handleMouseHover"),_fireEvent:c(function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},"_fireEvent"),_bringToFront:c(function(t){var e=t._order;if(e){var i=e.next,o=e.prev;i&&(i.prev=o,o?o.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},"_bringToFront"),_bringToBack:c(function(t){var e=t._order;if(e){var i=e.next,o=e.prev;o&&(o.next=i,i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}},"_bringToBack")});function $o(t){return jt.canvas?new Yo(t):null}c($o,"canvas");var Ko=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Xo={_initContainer:c(function(){this._container=ge("div","leaflet-vml-container")},"_initContainer"),_update:c(function(){this._map._animatingZoom||(qo.prototype._update.call(this),this.fire("update"))},"_update"),_initPath:c(function(t){var e=t._container=Ko("shape");xe(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ko("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},"_initPath"),_addPath:c(function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},"_addPath"),_removePath:c(function(t){var e=t._container;ye(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},"_removePath"),_updateStyle:c(function(t){var e=t._stroke,i=t._fill,o=t.options,n=t._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(e||(e=t._stroke=Ko("stroke")),n.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=y(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(n.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=Ko("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),t._fill=null)},"_updateStyle"),_updateCircle:c(function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,23592600")},"_updateCircle"),_setPath:c(function(t,e){t._path.v=e},"_setPath"),_bringToFront:c(function(t){Le(t._container)},"_bringToFront"),_bringToBack:c(function(t){we(t._container)},"_bringToBack")},Jo=jt.vml?Ko:Q,Qo=qo.extend({_initContainer:c(function(){this._container=Jo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Jo("g"),this._container.appendChild(this._rootGroup)},"_initContainer"),_destroyContainer:c(function(){ye(this._container),Ue(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},"_destroyContainer"),_update:c(function(){if(!this._map._animatingZoom||!this._bounds){qo.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Oe(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},"_update"),_initPath:c(function(t){var e=t._path=Jo("path");t.options.className&&xe(e,t.options.className),t.options.interactive&&xe(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},"_initPath"),_addPath:c(function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},"_addPath"),_removePath:c(function(t){ye(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},"_removePath"),_updatePath:c(function(t){t._project(),t._update()},"_updatePath"),_updateStyle:c(function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},"_updateStyle"),_updatePoly:c(function(t,e){this._setPath(t,tt(t._parts,e))},"_updatePoly"),_updateCircle:c(function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",n=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,n)},"_updateCircle"),_setPath:c(function(t,e){t._path.setAttribute("d",e)},"_setPath"),_bringToFront:c(function(t){Le(t._path)},"_bringToFront"),_bringToBack:c(function(t){we(t._path)},"_bringToBack")});function tn(t){return jt.svg||jt.vml?new Qo(t):null}jt.vml&&Qo.include(Xo),c(tn,"svg"),ri.include({getRenderer:c(function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},"getRenderer"),_getPaneRenderer:c(function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},"_getPaneRenderer"),_createRenderer:c(function(t){return this.options.preferCanvas&&$o(t)||tn(t)},"_createRenderer")});var en=_o.extend({initialize:c(function(t,e){_o.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},"initialize"),setBounds:c(function(t){return this.setLatLngs(this._boundsToLatLngs(t))},"setBounds"),_boundsToLatLngs:c(function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]},"_boundsToLatLngs")});function on(t,e){return new en(t,e)}c(on,"rectangle"),Qo.create=Jo,Qo.pointsToPath=tt,mo.geometryToLayer=go,mo.coordsToLatLng=vo,mo.coordsToLatLngs=Lo,mo.latLngToCoords=wo,mo.latLngsToCoords=bo,mo.getFeature=xo,mo.asFeature=Mo,ri.mergeOptions({boxZoom:!0});var nn=vi.extend({initialize:c(function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},"initialize"),addHooks:c(function(){He(this._container,"mousedown",this._onMouseDown,this)},"addHooks"),removeHooks:c(function(){Ue(this._container,"mousedown",this._onMouseDown,this)},"removeHooks"),moved:c(function(){return this._moved},"moved"),_destroy:c(function(){ye(this._pane),delete this._pane},"_destroy"),_resetState:c(function(){this._resetStateTimeout=0,this._moved=!1},"_resetState"),_clearDeferredResetState:c(function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},"_clearDeferredResetState"),_onMouseDown:c(function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),ae(),Ie(),this._startPoint=this._map.mouseEventToContainerPoint(t),He(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},"_onMouseDown"),_onMouseMove:c(function(t){this._moved||(this._moved=!0,this._box=ge("div","leaflet-zoom-box",this._container),xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),i=e.getSize();Oe(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},"_onMouseMove"),_finish:c(function(){this._moved&&(ye(this._box),Me(this._container,"leaflet-crosshair")),le(),Ae(),Ue(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},"_finish"),_onMouseUp:c(function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},"_onMouseUp"),_onKeyDown:c(function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())},"_onKeyDown")});ri.addInitHook("addHandler","boxZoom",nn),ri.mergeOptions({doubleClickZoom:!0});var sn=vi.extend({addHooks:c(function(){this._map.on("dblclick",this._onDoubleClick,this)},"addHooks"),removeHooks:c(function(){this._map.off("dblclick",this._onDoubleClick,this)},"removeHooks"),_onDoubleClick:c(function(t){var e=this._map,i=e.getZoom(),o=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-o:i+o;"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)},"_onDoubleClick")});ri.addInitHook("addHandler","doubleClickZoom",sn),ri.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var rn=vi.extend({addHooks:c(function(){if(!this._draggable){var t=this._map;this._draggable=new bi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},"addHooks"),removeHooks:c(function(){Me(this._map._container,"leaflet-grab"),Me(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},"removeHooks"),moved:c(function(){return this._draggable&&this._draggable._moved},"moved"),moving:c(function(){return this._draggable&&this._draggable._moving},"moving"),_onDragStart:c(function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=Z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},"_onDragStart"),_onDrag:c(function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},"_onDrag"),_prunePositions:c(function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},"_prunePositions"),_onZoomEnd:c(function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},"_onZoomEnd"),_viscousLimit:c(function(t,e){return t-(t-e)*this._viscosity},"_viscousLimit"),_onPreDragLimit:c(function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},"_onPreDragLimit"),_onPreDragWrap:c(function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,s=(o+e+i)%t-e-i,r=Math.abs(n+i)<Math.abs(s+i)?n:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},"_onPreDragWrap"),_onDragEnd:c(function(t){var e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var n=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=n.multiplyBy(r/s),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=a.multiplyBy(h/l),c=h/(i.inertiaDeceleration*r),p=u.multiplyBy(-c/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),k(function(){e.panBy(p,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})})):e.fire("moveend")}},"_onDragEnd")});ri.addInitHook("addHandler","dragging",rn),ri.mergeOptions({keyboard:!0,keyboardPanDelta:80});var an=vi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:c(function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},"initialize"),addHooks:c(function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),He(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},"addHooks"),removeHooks:c(function(){this._removeHooks(),Ue(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},"removeHooks"),_onMouseDown:c(function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,i)}},"_onMouseDown"),_onFocus:c(function(){this._focused=!0,this._map.fire("focus")},"_onFocus"),_onBlur:c(function(){this._focused=!1,this._map.fire("blur")},"_onBlur"),_setPanDelta:c(function(t){var e,i,o=this._panKeys={},n=this.keyCodes;for(e=0,i=n.left.length;e<i;e++)o[n.left[e]]=[-1*t,0];for(e=0,i=n.right.length;e<i;e++)o[n.right[e]]=[t,0];for(e=0,i=n.down.length;e<i;e++)o[n.down[e]]=[0,t];for(e=0,i=n.up.length;e<i;e++)o[n.up[e]]=[0,-1*t]},"_setPanDelta"),_setZoomDelta:c(function(t){var e,i,o=this._zoomKeys={},n=this.keyCodes;for(e=0,i=n.zoomIn.length;e<i;e++)o[n.zoomIn[e]]=t;for(e=0,i=n.zoomOut.length;e<i;e++)o[n.zoomOut[e]]=-t},"_setZoomDelta"),_addHooks:c(function(){He(document,"keydown",this._onKeyDown,this)},"_addHooks"),_removeHooks:c(function(){Ue(document,"keydown",this._onKeyDown,this)},"_removeHooks"),_onKeyDown:c(function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,o=this._map;if(i in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=B(e).multiplyBy(3)),o.options.maxBounds&&(e=o._limitOffset(B(e),o.options.maxBounds)),o.options.worldCopyJump){var n=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(e)));o.panTo(n)}else o.panBy(e)}else if(i in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Je(t)}},"_onKeyDown")});ri.addInitHook("addHandler","keyboard",an),ri.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ln=vi.extend({addHooks:c(function(){He(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},"addHooks"),removeHooks:c(function(){Ue(this._map._container,"wheel",this._onWheelScroll,this)},"removeHooks"),_onWheelScroll:c(function(t){var e=ii(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),o),Je(t)},"_onWheelScroll"),_performZoom:c(function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),n=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,s=i?Math.ceil(n/i)*i:n,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))},"_performZoom")});ri.addInitHook("addHandler","scrollWheelZoom",ln);var hn=600;ri.mergeOptions({tapHold:jt.touchNative&&jt.safari&&jt.mobile,tapTolerance:15});var un=vi.extend({addHooks:c(function(){He(this._map._container,"touchstart",this._onDown,this)},"addHooks"),removeHooks:c(function(){Ue(this._map._container,"touchstart",this._onDown,this)},"removeHooks"),_onDown:c(function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new I(e.clientX,e.clientY),this._holdTimeout=setTimeout(n(function(){this._cancel(),this._isTapValid()&&(He(document,"touchend",Xe),He(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),hn),He(document,"touchend touchcancel contextmenu",this._cancel,this),He(document,"touchmove",this._onMove,this)}},"_onDown"),_cancelClickPrevent:c(function t(){Ue(document,"touchend",Xe),Ue(document,"touchend touchcancel",t)},"cancelClickPrevent"),_cancel:c(function(){clearTimeout(this._holdTimeout),Ue(document,"touchend touchcancel contextmenu",this._cancel,this),Ue(document,"touchmove",this._onMove,this)},"_cancel"),_onMove:c(function(t){var e=t.touches[0];this._newPos=new I(e.clientX,e.clientY)},"_onMove"),_isTapValid:c(function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},"_isTapValid"),_simulateEvent:c(function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)},"_simulateEvent")});ri.addInitHook("addHandler","tapHold",un),ri.mergeOptions({touchZoom:jt.touch,bounceAtZoomLimits:!0});var cn=vi.extend({addHooks:c(function(){xe(this._map._container,"leaflet-touch-zoom"),He(this._map._container,"touchstart",this._onTouchStart,this)},"addHooks"),removeHooks:c(function(){Me(this._map._container,"leaflet-touch-zoom"),Ue(this._map._container,"touchstart",this._onTouchStart,this)},"removeHooks"),_onTouchStart:c(function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),He(document,"touchmove",this._onTouchMove,this),He(document,"touchend touchcancel",this._onTouchEnd,this),Xe(t)}},"_onTouchStart"),_onTouchMove:c(function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var a=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=k(a,this,!0),Xe(t)}},"_onTouchMove"),_onTouchEnd:c(function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1},"_onTouchEnd")});ri.addInitHook("addHandler","touchZoom",cn),ri.BoxZoom=nn,ri.DoubleClickZoom=sn,ri.Drag=rn,ri.Keyboard=an,ri.ScrollWheelZoom=ln,ri.TapHold=un,ri.TouchZoom=cn,t.Bounds=R,t.Browser=jt,t.CRS=F,t.Canvas=Yo,t.Circle=ho,t.CircleMarker=ao,t.Class=S,t.Control=li,t.DivIcon=No,t.DivOverlay=Io,t.DomEvent=ni,t.DomUtil=je,t.Draggable=bi,t.Evented=D,t.FeatureGroup=Ji,t.GeoJSON=mo,t.GridLayer=Ho,t.Handler=vi,t.Icon=to,t.ImageOverlay=To,t.LatLng=H,t.LatLngBounds=N,t.Layer=$i,t.LayerGroup=Ki,t.LineUtil=Gi,t.Map=ri,t.Marker=no,t.Mixin=Li,t.Path=ro,t.Point=I,t.PolyUtil=ki,t.Polygon=_o,t.Polyline=co,t.Popup=Ao,t.PosAnimation=si,t.Projection=Wi,t.Rectangle=en,t.Renderer=qo,t.SVG=Qo,t.SVGOverlay=zo,t.TileLayer=Uo,t.Tooltip=Ro,t.Transformation=Y,t.Util=E,t.VideoOverlay=So,t.bind=n,t.bounds=Z,t.canvas=$o,t.circle=uo,t.circleMarker=lo,t.control=hi,t.divIcon=jo,t.extend=i,t.featureGroup=Qi,t.geoJSON=Po,t.geoJson=ko,t.gridLayer=Go,t.icon=eo,t.imageOverlay=Eo,t.latLng=G,t.latLngBounds=j,t.layerGroup=Xi,t.map=ai,t.marker=so,t.point=B,t.polygon=fo,t.polyline=po,t.popup=Bo,t.rectangle=on,t.setOptions=_,t.stamp=r,t.svg=tn,t.svgOverlay=Do,t.tileLayer=Fo,t.tooltip=Zo,t.transformation=$,t.version=e,t.videoOverlay=Oo;var pn=window.L;t.noConflict=function(){return window.L=pn,this},window.L=t}(na.exports)),na.exports}c(sa,"requireLeafletSrc");var ra=sa();const aa=lr(ra);!function(t,e){function i(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}var o;c(i,"o"),L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:c(function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},"initialize"),enable:c(function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},"enable"),disable:c(function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},"disable"),addHooks:c(function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},"addHooks"),removeHooks:c(function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},"removeHooks"),setOptions:c(function(t){L.setOptions(this,t)},"setOptions"),_fireCreatedEvent:c(function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},"_fireCreatedEvent"),_cancelDrawing:c(function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())},"_cancelDrawing")}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:c(function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),addHooks:c(function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},"addHooks"),removeHooks:c(function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},"removeHooks"),deleteLastVertex:c(function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},"deleteLastVertex"),addVertex:c(function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},"addVertex"),completeShape:c(function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},"completeShape"),_finishShape:c(function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},"_finishShape"),_shapeIsValid:c(function(){return!0},"_shapeIsValid"),_onZoomEnd:c(function(){null!==this._markers&&this._updateGuide()},"_onZoomEnd"),_onMouseMove:c(function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},"_onMouseMove"),_vertexChanged:c(function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},"_vertexChanged"),_onMouseDown:c(function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},"_onMouseDown"),_startPoint:c(function(t,e){this._mouseDownOrigin=L.point(t,e)},"_startPoint"),_onMouseUp:c(function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},"_onMouseUp"),_endPoint:c(function(e,i,o){if(this._mouseDownOrigin){var n=L.point(e,i).distanceTo(this._mouseDownOrigin),s=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):s<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(t.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},"_endPoint"),_onTouch:c(function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},"_onTouch"),_onMouseOut:c(function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},"_onMouseOut"),_calculateFinishDistance:c(function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},"_calculateFinishDistance"),_updateFinishHandler:c(function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},"_updateFinishHandler"),_createMarker:c(function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},"_createMarker"),_updateGuide:c(function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},"_updateGuide"),_updateTooltip:c(function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},"_updateTooltip"),_drawGuide:c(function(t,e){var i,o,n,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),r=this.options.guidelineDistance,a=this.options.maxGuideLineLength,l=s>a?s-a:r;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<s;l+=this.options.guidelineDistance)i=l/s,o={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(n=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(n,o)},"_drawGuide"),_updateGuideColor:c(function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},"_updateGuideColor"),_clearGuides:c(function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},"_clearGuides"),_getTooltipText:c(function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},"_getTooltipText"),_updateRunningMeasure:c(function(t,e){var i,o,n=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=n-(e?2:1),o=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[i].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[i].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=o*(e?1:-1))},"_updateRunningMeasure"),_getMeasurementString:c(function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?i&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(i)*(this.options.factor||1):this._measurementRunningTotal||0:i&&e?this._measurementRunningTotal+this._map.distance(e,i)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},"_getMeasurementString"),_showErrorTooltip:c(function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},"_showErrorTooltip"),_hideErrorTooltip:c(function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},"_hideErrorTooltip"),_clearHideErrorTimeout:c(function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},"_clearHideErrorTimeout"),_disableNewMarkers:c(function(){this._disableMarkers=!0},"_disableNewMarkers"),_enableNewMarkers:c(function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},"_enableNewMarkers"),_cleanUpShape:c(function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},"_cleanUpShape"),_fireCreatedEvent:c(function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent")}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:c(function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},"initialize"),_updateFinishHandler:c(function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},"_updateFinishHandler"),_getTooltipText:c(function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},"_getTooltipText"),_getMeasurementString:c(function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},"_getMeasurementString"),_shapeIsValid:c(function(){return this._markers.length>=3},"_shapeIsValid"),_vertexChanged:c(function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},"_vertexChanged"),_cleanUpShape:c(function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))},"_cleanUpShape")}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:c(function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),addHooks:c(function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},"addHooks"),removeHooks:c(function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},"removeHooks"),_getTooltipText:c(function(){return{text:this._endLabelText}},"_getTooltipText"),_onMouseDown:c(function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},"_onMouseDown"),_onMouseMove:c(function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},"_onMouseMove"),_onMouseUp:c(function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},"_onMouseUp")}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:c(function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},"initialize"),disable:c(function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},"disable"),_onMouseUp:c(function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!i(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},"_onMouseUp"),_drawShape:c(function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},"_drawShape"),_fireCreatedEvent:c(function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_getTooltipText:c(function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,s=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}},"_getTooltipText")}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:c(function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),addHooks:c(function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},"addHooks"),removeHooks:c(function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},"removeHooks"),_onMouseMove:c(function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},"_onMouseMove"),_createMarker:c(function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},"_createMarker"),_onClick:c(function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},"_onClick"),_onTouch:c(function(t){this._onMouseMove(t),this._onClick()},"_onTouch"),_fireCreatedEvent:c(function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent")}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:c(function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),_fireCreatedEvent:c(function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_createMarker:c(function(t){return new L.CircleMarker(t,this.options)},"_createMarker")}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:c(function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},"initialize"),_drawShape:c(function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},"_drawShape"),_fireCreatedEvent:c(function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_onMouseMove:c(function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var s="";o&&(s=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:s})}},"_onMouseMove")}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:c(function(t,e){this._marker=t,L.setOptions(this,e)},"initialize"),addHooks:c(function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"addHooks"),removeHooks:c(function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"removeHooks"),_onDragEnd:c(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onDragEnd"),_toggleMarkerHighlight:c(function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},"_toggleMarkerHighlight"),_offsetMarker:c(function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"},"_offsetMarker")}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:c(function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},"initialize"),_defaultShape:c(function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},"_defaultShape"),_eachVertexHandler:c(function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},"_eachVertexHandler"),addHooks:c(function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},"addHooks"),removeHooks:c(function(){this._eachVertexHandler(function(t){t.removeHooks()})},"removeHooks"),updateMarkers:c(function(){this._eachVertexHandler(function(t){t.updateMarkers()})},"updateMarkers"),_initHandlers:c(function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},"_initHandlers"),_updateLatLngs:c(function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))},"_updateLatLngs")}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:c(function(t,e,i){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,i&&i.drawError&&(i.drawError=L.Util.extend({},this.options.drawError,i.drawError)),this._latlngs=e,L.setOptions(this,i)},"initialize"),_defaultShape:c(function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},"_defaultShape"),addHooks:c(function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},"addHooks"),removeHooks:c(function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},"removeHooks"),updateMarkers:c(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:c(function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,o,n,s,r=this._defaultShape();for(t=0,i=r.length;t<i;t++)(o=this._createMarker(r[t],t)).on("click",this._onMarkerClick,this),o.on("contextmenu",this._onContextMenu,this),this._markers.push(o);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(n=this._markers[e],s=this._markers[t],this._createMiddleMarker(n,s),this._updatePrevNext(n,s))},"_initMarkers"),_createMarker:c(function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(i),i},"_createMarker"),_onMarkerDragStart:c(function(){this._poly.fire("editstart")},"_onMarkerDragStart"),_spliceLatLngs:c(function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},"_spliceLatLngs"),_removeMarker:c(function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},"_removeMarker"),_fireEdit:c(function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},"_fireEdit"),_onMarkerDrag:c(function(t){var e=t.target,i=this._poly,o=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var n=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,o),e.setLatLng(o);var s=i.options.color;i.setStyle({color:this.options.drawError.color}),n&&n.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:s}),n&&n.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var r=this._poly.getLatLngs();this._poly._convertLatLngs(r,!0),this._poly.redraw(),this._poly.fire("editdrag")},"_onMarkerDrag"),_onMarkerClick:c(function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._defaultShape().length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},"_onMarkerClick"),_onContextMenu:c(function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},"_onContextMenu"),_onTouchMove:c(function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),o=t.target;L.extend(o._origLatLng,i),o._middleLeft&&o._middleLeft.setLatLng(this._getMiddleLatLng(o._prev,o)),o._middleRight&&o._middleRight.setLatLng(this._getMiddleLatLng(o,o._next)),this._poly.redraw(),this.updateMarkers()},"_onTouchMove"),_updateIndexes:c(function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},"_updateIndexes"),_createMiddleMarker:c(function(t,e){var i,o,n,s=this._getMiddleLatLng(t,e),r=this._createMarker(s);r.setOpacity(.6),t._middleRight=e._middleLeft=r,o=c(function(){r.off("touchmove",o,this);var n=e._index;r._index=n,r.off("click",i,this).on("click",this._onMarkerClick,this),s.lat=r.getLatLng().lat,s.lng=r.getLatLng().lng,this._spliceLatLngs(n,0,s),this._markers.splice(n,0,r),r.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,r),this._updatePrevNext(r,e),this._poly.fire("editstart")},"o"),n=c(function(){r.off("dragstart",o,this),r.off("dragend",n,this),r.off("touchmove",o,this),this._createMiddleMarker(t,r),this._createMiddleMarker(r,e)},"a"),i=c(function(){o.call(this),n.call(this),this._fireEdit()},"i"),r.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(r)},"_createMiddleMarker"),_updatePrevNext:c(function(t,e){t&&(t._next=e),e&&(e._prev=t)},"_updatePrevNext"),_getMiddleLatLng:c(function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))},"_getMiddleLatLng")}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:c(function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},"initialize"),addHooks:c(function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},"addHooks"),removeHooks:c(function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},"removeHooks"),updateMarkers:c(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:c(function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},"_initMarkers"),_createMoveMarker:c(function(){},"_createMoveMarker"),_createResizeMarker:c(function(){},"_createResizeMarker"),_createMarker:c(function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},"_createMarker"),_bindMarker:c(function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},"_bindMarker"),_unbindMarker:c(function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},"_unbindMarker"),_onMarkerDragStart:c(function(t){t.target.setOpacity(0),this._shape.fire("editstart")},"_onMarkerDragStart"),_fireEdit:c(function(){this._shape.edited=!0,this._shape.fire("edit")},"_fireEdit"),_onMarkerDrag:c(function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),this._shape.fire("editdrag")},"_onMarkerDrag"),_onMarkerDragEnd:c(function(t){t.target.setOpacity(1),this._fireEdit()},"_onMarkerDragEnd"),_onTouchStart:c(function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,o=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)}this._shape.fire("editstart")},"_onTouchStart"),_onTouchMove:c(function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),!1},"_onTouchMove"),_onTouchEnd:c(function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},"_onTouchEnd"),_move:c(function(){},"_move"),_resize:c(function(){},"_resize")}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:c(function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:c(function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},"_createResizeMarker"),_onMarkerDragStart:c(function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target._cornerIndex;this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)},"_onMarkerDragStart"),_onMarkerDragEnd:c(function(t){var e,i=t.target;i===this._moveMarker&&(e=this._shape.getBounds().getCenter(),i.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},"_onMarkerDragEnd"),_move:c(function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=this._shape.getBounds().getCenter(),n=[],s=0,r=i.length;s<r;s++)e=[i[s].lat-o.lat,i[s].lng-o.lng],n.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(n),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},"_move"),_resize:c(function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},"_resize"),_getCorners:c(function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},"_getCorners"),_toggleCornerMarkers:c(function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},"_toggleCornerMarkers"),_repositionCornerMarkers:c(function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])},"_repositionCornerMarkers")}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:c(function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:c(function(){this._resizeMarkers=[]},"_createResizeMarker"),_move:c(function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},"_move")}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:c(function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},"_createResizeMarker"),_getResizeMarkerPoint:c(function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},"_getResizeMarkerPoint"),_resize:c(function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},"_resize")}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:c(function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},"initialize"),addHooks:c(function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},"addHooks"),removeHooks:c(function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},"removeHooks"),_touchEvent:c(function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),s=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:s,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},"_touchEvent"),_filterClick:c(function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},"_filterClick"),_onTouchStart:c(function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},"_onTouchStart"),_onTouchEnd:c(function(t){this._map._loaded&&this._touchEvent(t,"touchend")},"_onTouchEnd"),_onTouchCancel:c(function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},"_onTouchCancel"),_onTouchLeave:c(function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},"_onTouchLeave"),_onTouchMove:c(function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},"_onTouchMove"),_detectIE:c(function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)},"_detectIE")}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:c(function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},"_initInteraction"),_initInteractionLegacy:c(function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},"_initInteractionLegacy"),_detectIE:c(function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)},"_detectIE")}),L.LatLngUtil={cloneLatLngs:c(function(t){for(var e=[],i=0,o=t.length;i<o;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},"cloneLatLngs"),cloneLatLng:c(function(t){return L.latLng(t.lat,t.lng)},"cloneLatLng")},o={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:c(function(t){var e,i,o=t.length,n=0,s=Math.PI/180;if(o>2){for(var r=0;r<o;r++)e=t[r],n+=((i=t[(r+1)%o]).lng-e.lng)*s*(2+Math.sin(e.lat*s)+Math.sin(i.lat*s));n=6378137*n*6378137/2}return Math.abs(n)},"geodesicArea"),formattedNumber:c(function(t,e){var i=parseFloat(t).toFixed(e),o=L.drawLocal.format&&L.drawLocal.format.numeric,n=o&&o.delimiters,s=n&&n.thousands,r=n&&n.decimal;if(s||r){var a=i.split(".");i=s?a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+s):a[0],r=r||".",a.length>1&&(i=i+r+a[1])}return i},"formattedNumber"),readableArea:c(function(t,e,i){var n,s;return i=L.Util.extend({},o,i),e?(s=["ha","m"],type=typeof e,"string"===type?s=[e]:"boolean"!==type&&(s=e),n=t>=1e6&&-1!==s.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":t>=1e4&&-1!==s.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):n=(t/=.836127)>=3097600?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":t>=4840?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²",n},"readableArea"),readableDistance:c(function(t,e,i,n,s){var r;switch(s=L.Util.extend({},o,s),e?"string"==typeof e?e:"metric":i?"feet":n?"nauticalMile":"yards"){case"metric":r=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,s.km)+" km":L.GeometryUtil.formattedNumber(t,s.m)+" m";break;case"feet":t*=3.28083,r=L.GeometryUtil.formattedNumber(t,s.ft)+" ft";break;case"nauticalMile":t*=.53996,r=L.GeometryUtil.formattedNumber(t/1e3,s.nm)+" nm";break;default:r=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,s.mi)+" miles":L.GeometryUtil.formattedNumber(t,s.yd)+" yd"}return r},"readableDistance"),isVersion07x:c(function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)},"isVersion07x")}),L.Util.extend(L.LineUtil,{segmentsIntersect:c(function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},"segmentsIntersect"),_checkCounterclockwise:c(function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)},"_checkCounterclockwise")}),L.Polyline.include({intersects:c(function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},"intersects"),newLatLngIntersects:c(function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},"newLatLngIntersects"),newPointIntersects:c(function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,s=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,s,e?1:0)},"newPointIntersects"),_tooFewPointsForIntersection:c(function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},"_tooFewPointsForIntersection"),_lineSegmentsIntersectsRange:c(function(t,e,i,o){var n,s,r=this._getProjectedPoints();o=o||0;for(var a=i;a>o;a--)if(n=r[a-1],s=r[a],L.LineUtil.segmentsIntersect(t,e,n,s))return!0;return!1},"_lineSegmentsIntersectsRange"),_getProjectedPoints:c(function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i<e.length;i++)t.push(this._map.latLngToLayerPoint(e[i]));return t},"_getProjectedPoints")}),L.Polygon.include({intersects:c(function(){var t,e,i,o,n=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=n.length,e=n[0],i=n[t-1],o=t-2,this._lineSegmentsIntersectsRange(i,e,o,1)))},"intersects")}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:c(function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},"initialize"),onAdd:c(function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),o=!1;for(var n in this._toolbars)this._toolbars.hasOwnProperty(n)&&(e=this._toolbars[n].addToolbar(t))&&(o||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),o=!0),i.appendChild(e));return i},"onAdd"),onRemove:c(function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},"onRemove"),setDrawingOptions:c(function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},"setDrawingOptions"),_toolbarEnabled:c(function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()},"_toolbarEnabled")}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:c(function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},"initialize"),enabled:c(function(){return null!==this._activeMode},"enabled"),disable:c(function(){this.enabled()&&this._activeMode.handler.disable()},"disable"),addToolbar:c(function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",s=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<s.length;e++)s[e].enabled&&this._initModeHandler(s[e].handler,this._toolbarContainer,o++,n,s[e].title);if(o)return this._lastButtonIndex=--o,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},"addToolbar"),removeToolbar:c(function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},"removeToolbar"),_initModeHandler:c(function(t,e,i,o,n){var s=t.type;this._modes[s]={},this._modes[s].handler=t,this._modes[s].button=this._createButton({type:s,title:n,className:o+"-"+s,container:e,callback:this._modes[s].handler.enable,context:this._modes[s].handler}),this._modes[s].buttonIndex=i,this._modes[s].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},"_initModeHandler"),_detectIOS:c(function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},"_detectIOS"),_createButton:c(function(t){var e=L.DomUtil.create("a",t.className||"",t.container),i=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(i),t.title&&(e.title=t.title,i.innerHTML=t.title),t.text&&(e.innerHTML=t.text,i.innerHTML=t.text);var o=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,o,t.callback,t.context),e},"_createButton"),_disposeButton:c(function(t,e){var i=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,i,e)},"_disposeButton"),_handlerActivated:c(function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},"_handlerActivated"),_handlerDeactivated:c(function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},"_handlerDeactivated"),_createActions:c(function(t){var e,i,o,n,s=this._actionsContainer,r=this.getActions(t),a=r.length;for(i=0,o=this._actionButtons.length;i<o;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];s.firstChild;)s.removeChild(s.firstChild);for(var l=0;l<a;l++)"enabled"in r[l]&&!r[l].enabled||(e=L.DomUtil.create("li","",s),n=this._createButton({title:r[l].title,text:r[l].text,container:e,callback:r[l].callback,context:r[l].context}),this._actionButtons.push({button:n,callback:r[l].callback}))},"_createActions"),_showActionsToolbar:c(function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},"_showActionsToolbar"),_hideActionsToolbar:c(function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)},"_hideActionsToolbar")}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:c(function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},"initialize"),dispose:c(function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},"dispose"),updateContent:c(function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},"updateContent"),updatePosition:c(function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},"updatePosition"),showAsError:c(function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},"showAsError"),removeError:c(function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},"removeError"),_onMouseOut:c(function(){this._container&&(this._container.style.visibility="hidden")},"_onMouseOut")}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:c(function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},"initialize"),getModeHandlers:c(function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},"getModeHandlers"),getActions:c(function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},"getActions"),setOptions:c(function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])},"setOptions")}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:c(function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},"initialize"),getModeHandlers:c(function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},"getModeHandlers"),getActions:c(function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},"getActions"),addToolbar:c(function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},"addToolbar"),removeToolbar:c(function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},"removeToolbar"),disable:c(function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},"disable"),_save:c(function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},"_save"),_clearAllLayers:c(function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},"_clearAllLayers"),_checkDisabled:c(function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))},"_checkDisabled")}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:c(function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},"initialize"),enable:c(function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},"enable"),disable:c(function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},"disable"),addHooks:c(function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},"addHooks"),removeHooks:c(function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},"removeHooks"),revertLayers:c(function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},"revertLayers"),save:c(function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:t})},"save"),_backupLayer:c(function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},"_backupLayer"),_getTooltipText:c(function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},"_getTooltipText"),_updateTooltip:c(function(){this._tooltip.updateContent(this._getTooltipText())},"_updateTooltip"),_revertLayer:c(function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},"_revertLayer"),_enableLayerEdit:c(function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},"_enableLayerEdit"),_disableLayerEdit:c(function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},"_disableLayerEdit"),_onMouseMove:c(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_onMarkerDragEnd:c(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onMarkerDragEnd"),_onTouchMove:c(function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},"_onTouchMove"),_hasAvailableLayers:c(function(){return 0!==this._featureGroup.getLayers().length},"_hasAvailableLayers")}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:c(function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},"initialize"),enable:c(function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},"enable"),disable:c(function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},"disable"),addHooks:c(function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},"addHooks"),removeHooks:c(function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},"removeHooks"),revertLayers:c(function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},"revertLayers"),save:c(function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},"save"),removeAllLayers:c(function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},"removeAllLayers"),_enableLayerDelete:c(function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},"_enableLayerDelete"),_disableLayerDelete:c(function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},"_disableLayerDelete"),_removeLayer:c(function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},"_removeLayer"),_onMouseMove:c(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_hasAvailableLayers:c(function(){return 0!==this._deletableLayers.getLayers().length},"_hasAvailableLayers")})}(window,document);var la,ha={exports:{}};function ua(){return la||(la=1,function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:c(function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},"initialize"),addLayer:c(function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},"addLayer"),removeLayer:c(function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},"removeLayer"),addLayers:c(function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,o=this._featureGroup,n=this._nonPointGroup,s=this.options.chunkedLoading,r=this.options.chunkInterval,a=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind(function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(s&&h%200==0&&(new Date).getTime()-d>r);h++)if((i=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),f=_[0]===i?_[1]:_[0];o.removeLayer(f)}}else n.addLayer(i),e||this.fire("layeradd",{layer:i});a&&a(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var d=this._needsClustering;h<l;h++)(i=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):n.addLayer(i);return this},"addLayers"),removeLayers:c(function(t){var e,i,o=t.length,n=this._featureGroup,s=this._nonPointGroup,r=!0;if(!this._map){for(e=0;e<o;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),o=t.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=t.slice(),l=o;for(e=0;e<l;e++)(i=a[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),l=a.length):this._unspiderfyLayer(i)}for(e=0;e<o;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),o=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),n.hasLayer(i)&&(n.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},"removeLayers"),clearLayers:c(function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},"clearLayers"),getBounds:c(function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},"getBounds"),eachLayer:c(function(t,e){var i,o,n,s=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),o=s.length-1;o>=0;o--){for(i=!0,n=r.length-1;n>=0;n--)if(r[n].layer===s[o]){i=!1;break}i&&t.call(e,s[o])}this._nonPointGroup.eachLayer(t,e)},"eachLayer"),getLayers:c(function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},"getLayers"),getLayer:c(function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},"getLayer"),hasLayer:c(function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},"hasLayer"),zoomToShowLayer:c(function(t,e){var i=this._map;"function"!=typeof e&&(e=c(function(){},"callback"));var o=c(function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",o,this),this.off("animationend",o,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))},"showMarker");t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",o,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",o,this),this.on("animationend",o,this),t.__parent.zoomToBounds())},"zoomToShowLayer"),onAdd:c(function(t){var e,i,o;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(o=this._needsRemoving[e]).newlatlng=o.layer._latlng,o.layer._latlng=o.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)o=this._needsRemoving[e],this._removeLayer(o.layer,!0),o.layer._latlng=o.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},"onAdd"),onRemove:c(function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},"onRemove"),getVisibleParent:c(function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},"getVisibleParent"),_arraySplice:c(function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},"_arraySplice"),_removeFromGridUnclustered:c(function(t,e){for(var i=this._map,o=this._gridUnclustered,n=Math.floor(this._map.getMinZoom());e>=n&&o[e].removeObject(t,i.project(t.getLatLng(),e));e--);},"_removeFromGridUnclustered"),_childMarkerDragStart:c(function(t){t.target.__dragStart=t.target._latlng},"_childMarkerDragStart"),_childMarkerMoved:c(function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},"_childMarkerMoved"),_moveChild:c(function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},"_moveChild"),_childMarkerDragEnd:c(function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},"_childMarkerDragEnd"),_removeLayer:c(function(t,e,i){var o=this._gridClusters,n=this._gridUnclustered,s=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],o[h._zoom].removeObject(h,r.project(h._cLatLng,h._zoom)),n[h._zoom].addObject(l,r.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(s.removeLayer(h),i||s.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},"_removeLayer"),_isOrIsParent:c(function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},"_isOrIsParent"),fire:c(function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},"fire"),listens:c(function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},"listens"),_defaultIconCreateFunction:c(function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},"_defaultIconCreateFunction"),_bindEvents:c(function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,o=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom;(e||o||n)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},"_bindEvents"),_zoomOrSpiderfy:c(function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},"_zoomOrSpiderfy"),_showCoverage:c(function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},"_showCoverage"),_hideCoverage:c(function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},"_hideCoverage"),_unbindEvents:c(function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom,n=this._map;(t||i||o)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},"_unbindEvents"),_zoomEnd:c(function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},"_zoomEnd"),_moveEnd:c(function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},"_moveEnd"),_generateInitialClusters:c(function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,o=i;"function"!=typeof i&&(o=c(function(){return i},"radiusFn")),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var n=t;n>=e;n--)this._gridClusters[n]=new L.DistanceGrid(o(n)),this._gridUnclustered[n]=new L.DistanceGrid(o(n));this._topClusterLevel=new this._markerCluster(this,e-1)},"_generateInitialClusters"),_addLayer:c(function(t,e){var i,o,n=this._gridClusters,s=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=r;e--){i=this._map.project(t.getLatLng(),e);var a=n[e].getNearObject(i);if(a)return a._addChild(t),void(t.__parent=a);if(a=s[e].getNearObject(i)){var l=a.__parent;l&&this._removeLayer(a,!1);var h=new this._markerCluster(this,e,a,t);n[e].addObject(h,this._map.project(h._cLatLng,e)),a.__parent=h,t.__parent=h;var u=h;for(o=e-1;o>l._zoom;o--)u=new this._markerCluster(this,o,u),n[o].addObject(u,this._map.project(a.getLatLng(),o));return l._addChild(u),void this._removeFromGridUnclustered(a,e)}s[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},"_addLayer"),_refreshClustersIcons:c(function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},"_refreshClustersIcons"),_enqueue:c(function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},"_enqueue"),_processQueue:c(function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},"_processQueue"),_mergeSplitClusters:c(function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},"_mergeSplitClusters"),_getExpandedVisibleBounds:c(function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},"_getExpandedVisibleBounds"),_checkBoundsMaxLat:c(function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},"_checkBoundsMaxLat"),_animationAddLayerNonAnimated:c(function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},"_animationAddLayerNonAnimated"),_extractNonGroupLayers:c(function(t,e){var i,o=t.getLayers(),n=0;for(e=e||[];n<o.length;n++)(i=o[n])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},"_extractNonGroupLayers"),_overrideMarkerIcon:c(function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:c(function(){return 1},"getChildCount"),getAllChildMarkers:c(function(){return[t]},"getAllChildMarkers")})},"_overrideMarkerIcon")});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:c(function(){},"_animationStart"),_animationZoomIn:c(function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},"_animationZoomIn"),_animationZoomOut:c(function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},"_animationZoomOut"),_animationAddLayer:c(function(t,e){this._animationAddLayerNonAnimated(t,e)},"_animationAddLayer")},_withAnimation:{_animationStart:c(function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},"_animationStart"),_animationZoomIn:c(function(t,e){var i,o=this._getExpandedVisibleBounds(),n=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(o,t,s,function(s){var r,a=s._latlng,l=s._markers;for(o.contains(a)||(a=null),s._isSingleParent()&&t+1===e?(n.removeLayer(s),s._recursivelyAddChildrenToMap(null,e,o)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,e,o)),i=l.length-1;i>=0;i--)r=l[i],o.contains(r._latlng)||n.removeLayer(r)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(o,e),n.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(o,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(o,t,s,function(t){n.removeLayer(t),t.clusterShow()}),this._animationEnd()})},"_animationZoomIn"),_animationZoomOut:c(function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},"_animationZoomOut"),_animationAddLayer:c(function(t,e){var i=this,o=this._featureGroup;o.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){o.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))},"_animationAddLayer")},_animationZoomOutSingle:c(function(t,e,i){var o=this._getExpandedVisibleBounds(),n=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(o,n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(o,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else t._recursively(o,i,n,function(t){t._recursivelyRemoveChildrenFromMap(o,n,e+1)});s._animationEnd()})},"_animationZoomOutSingle"),_animationEnd:c(function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},"_animationEnd"),_forceLayout:c(function(){L.Util.falseFn(document.body.offsetWidth)},"_forceLayout")}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:c(function(t,e,i,o){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),o&&this._addChild(o)},"initialize"),getAllChildMarkers:c(function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var o=this._markers.length-1;o>=0;o--)e&&this._markers[o].__dragStart||t.push(this._markers[o]);return t},"getAllChildMarkers"),getChildCount:c(function(){return this._childCount},"getChildCount"),zoomToBounds:c(function(t){for(var e,i=this._childClusters.slice(),o=this._group._map,n=o.getBoundsZoom(this._bounds),s=this._zoom+1,r=o.getZoom();i.length>0&&n>s;){s++;var a=[];for(e=0;e<i.length;e++)a=a.concat(i[e]._childClusters);i=a}n>s?this._group._map.setView(this._latlng,s):n<=r?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds,t)},"zoomToBounds"),getBounds:c(function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},"getBounds"),_updateIcon:c(function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},"_updateIcon"),createIcon:c(function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},"createIcon"),createShadow:c(function(){return this._iconObj.createShadow()},"createShadow"),_addChild:c(function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},"_addChild"),_setClusterCenter:c(function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},"_setClusterCenter"),_resetBounds:c(function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},"_resetBounds"),_recalculateBounds:c(function(){var t,e,i,o,n=this._markers,s=this._childClusters,r=0,a=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<n.length;t++)i=n[t]._latlng,this._bounds.extend(i),r+=i.lat,a+=i.lng;for(t=0;t<s.length;t++)(e=s[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,o=e._childCount,r+=i.lat*o,a+=i.lng*o;this._latlng=this._wLatLng=new L.LatLng(r/l,a/l),this._boundsNeedUpdate=!1}},"_recalculateBounds"),_addToMap:c(function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},"_addToMap"),_recursivelyAnimateChildrenIn:c(function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,o,n=t._markers;for(i=n.length-1;i>=0;i--)(o=n[i])._icon&&(o._setPos(e),o.clusterHide())},function(t){var i,o,n=t._childClusters;for(i=n.length-1;i>=0;i--)(o=n[i])._icon&&(o._setPos(e),o.clusterHide())})},"_recursivelyAnimateChildrenIn"),_recursivelyAnimateChildrenInAndAddSelfToMap:c(function(t,e,i,o){this._recursively(t,o,e,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),i),n._isSingleParent()&&i-1===o?(n.clusterShow(),n._recursivelyRemoveChildrenFromMap(t,e,i)):n.clusterHide(),n._addToMap()})},"_recursivelyAnimateChildrenInAndAddSelfToMap"),_recursivelyBecomeVisible:c(function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},"_recursivelyBecomeVisible"),_recursivelyAddChildrenToMap:c(function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(o){if(e!==o._zoom)for(var n=o._markers.length-1;n>=0;n--){var s=o._markers[n];i.contains(s._latlng)&&(t&&(s._backupLatlng=s.getLatLng(),s.setLatLng(t),s.clusterHide&&s.clusterHide()),o._group._featureGroup.addLayer(s))}},function(e){e._addToMap(t)})},"_recursivelyAddChildrenToMap"),_recursivelyRestoreChildPositions:c(function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._restorePosition();else for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._recursivelyRestoreChildPositions(t)},"_recursivelyRestoreChildPositions"),_restorePosition:c(function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},"_restorePosition"),_recursivelyRemoveChildrenFromMap:c(function(t,e,i,o){var n,s;this._recursively(t,e-1,i-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],o&&o.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],o&&o.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())})},"_recursivelyRemoveChildrenFromMap"),_recursively:c(function(t,e,i,o,n){var s,r,a=this._childClusters,l=this._zoom;if(e<=l&&(o&&o(this),n&&l===i&&n(this)),l<e||l<i)for(s=a.length-1;s>=0;s--)(r=a[s])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,o,n)},"_recursively"),_isSingleParent:c(function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount},"_isSingleParent")});L.Marker.include({clusterHide:c(function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},"clusterHide"),clusterShow:c(function(){return this.setOpacity(this.options.opacity)},"clusterShow")}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:c(function(t,e){var i=this._getCoord(e.x),o=this._getCoord(e.y),n=this._grid,s=n[o]=n[o]||{},r=s[i]=s[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,r.push(t)},"addObject"),updateObject:c(function(t,e){this.removeObject(t),this.addObject(t,e)},"updateObject"),removeObject:c(function(t,e){var i,o,n=this._getCoord(e.x),s=this._getCoord(e.y),r=this._grid,a=r[s]=r[s]||{},l=a[n]=a[n]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,o=l.length;i<o;i++)if(l[i]===t)return l.splice(i,1),1===o&&delete a[n],!0},"removeObject"),eachObject:c(function(t,e){var i,o,n,s,r,a,l=this._grid;for(i in l)for(o in r=l[i])for(n=0,s=(a=r[o]).length;n<s;n++)t.call(e,a[n])&&(n--,s--)},"eachObject"),getNearObject:c(function(t){var e,i,o,n,s,r,a,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,p=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(n=this._grid[e])for(i=h-1;i<=h+1;i++)if(s=n[i])for(o=0,r=s.length;o<r;o++)a=s[o],((l=this._sqDist(c[L.Util.stamp(a)],t))<p||l<=p&&null===d)&&(p=l,d=a);return d},"getNearObject"),_getCoord:c(function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},"_getCoord"),_sqDist:c(function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o},"_sqDist")},L.QuickHull={getDistant:c(function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},"getDistant"),findMostDistantPointFromBaseLine:c(function(t,e){var i,o,n,s=0,r=null,a=[];for(i=e.length-1;i>=0;i--)o=e[i],(n=this.getDistant(o,t))>0&&(a.push(o),n>s&&(s=n,r=o));return{maxPoint:r,newPoints:a}},"findMostDistantPointFromBaseLine"),buildConvexHull:c(function(t,e){var i=[],o=this.findMostDistantPointFromBaseLine(t,e);return o.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],o.maxPoint],o.newPoints))).concat(this.buildConvexHull([o.maxPoint,t[1]],o.newPoints)):[t[0]]},"buildConvexHull"),getConvexHull:c(function(t){var e,i=!1,o=!1,n=!1,s=!1,r=null,a=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===i||p.lat>i)&&(r=p,i=p.lat),(!1===o||p.lat<o)&&(a=p,o=p.lat),(!1===n||p.lng>n)&&(l=p,n=p.lng),(!1===s||p.lng<s)&&(h=p,s=p.lng)}return o!==i?(c=a,u=r):(c=h,u=l),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))},"getConvexHull")},L.MarkerCluster.include({getConvexHull:c(function(){var t,e,i=this.getAllChildMarkers(),o=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),o.push(t);return L.QuickHull.getConvexHull(o)},"getConvexHull")}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:c(function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},"spiderfy"),unspiderfy:c(function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},"unspiderfy"),_generatePointsCircle:c(function(t,e){var i,o,n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,r=[];for(n=Math.max(n,35),r.length=t,i=0;i<t;i++)o=this._circleStartAngle+i*s,r[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round();return r},"_generatePointsCircle"),_generatePointsSpiral:c(function(t,e){var i,o=this._group.options.spiderfyDistanceMultiplier,n=o*this._spiralLengthStart,s=o*this._spiralFootSeparation,r=o*this._spiralLengthFactor*this._2PI,a=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+n*Math.cos(a),e.y+n*Math.sin(a))._round()),n+=r/(a+=s/n+5e-4*i);return l},"_generatePointsSpiral"),_noanimationUnspiderfy:c(function(){var t,e,i=this._group,o=i._map,n=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;e>=0;e--)t=s[e],n.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(o.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null},"_noanimationUnspiderfy")}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:c(function(t,e){var i,o,n,s,r=this._group,a=r._map,l=r._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)s=a.layerPointToLatLng(e[i]),o=t[i],n=new L.Polyline([this._latlng,s],h),a.addLayer(n),o._spiderLeg=n,o._preSpiderfyLatlng=o._latlng,o.setLatLng(s),o.setZIndexOffset&&o.setZIndexOffset(1e6),l.addLayer(o);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},"_animationSpiderfy"),_animationUnspiderfy:c(function(){this._noanimationUnspiderfy()},"_animationUnspiderfy")}),L.MarkerCluster.include({_animationSpiderfy:c(function(t,e){var i,o,n,s,r,a,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),_=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),_?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,h._ignoreMove=!0,i=0;i<t.length;i++)o=t[i],a=u.layerPointToLatLng(e[i]),n=new L.Polyline([p,a],f),u.addLayer(n),o._spiderLeg=n,_&&(r=(s=n._path).getTotalLength()+.1,s.style.strokeDasharray=r,s.style.strokeDashoffset=r),o.setZIndexOffset&&o.setZIndexOffset(1e6),o.clusterHide&&o.clusterHide(),c.addLayer(o),o._setPos&&o._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)a=u.layerPointToLatLng(e[i]),(o=t[i])._preSpiderfyLatlng=o._latlng,o.setLatLng(a),o.clusterShow&&o.clusterShow(),_&&((s=(n=o._spiderLeg)._path).style.strokeDashoffset=0,n.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},"_animationSpiderfy"),_animationUnspiderfy:c(function(t){var e,i,o,n,s,r,a=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;i>=0;i--)(e=p[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,r=!0,e._setPos&&(e._setPos(c),r=!1),e.clusterHide&&(e.clusterHide(),r=!1),r&&u.removeLayer(e),d&&(s=(n=(o=e._spiderLeg)._path).getTotalLength()+.1,n.style.strokeDashoffset=s,o.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&t++;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:a,markers:p})},200)},"_animationUnspiderfy")}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:c(function(){this._unspiderfy.apply(this,arguments)},"unspiderfy"),_spiderfierOnAdd:c(function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},"_spiderfierOnAdd"),_spiderfierOnRemove:c(function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},"_spiderfierOnRemove"),_unspiderfyZoomStart:c(function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},"_unspiderfyZoomStart"),_unspiderfyZoomAnim:c(function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},"_unspiderfyZoomAnim"),_unspiderfyWrapper:c(function(){this._unspiderfy()},"_unspiderfyWrapper"),_unspiderfy:c(function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},"_unspiderfy"),_noanimationUnspiderfy:c(function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},"_noanimationUnspiderfy"),_unspiderfyLayer:c(function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)},"_unspiderfyLayer")}),L.MarkerClusterGroup.include({refreshClusters:c(function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},"refreshClusters"),_flagParentsIconsNeedUpdate:c(function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},"_flagParentsIconsNeedUpdate"),_refreshSingleMarkerModeMarkers:c(function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))},"_refreshSingleMarkerModeMarkers")}),L.Marker.include({refreshIconOptions:c(function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this},"refreshIconOptions")}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(ha.exports)),ha.exports}c(ua,"requireLeaflet_markerclusterSrc"),ua();const ca=Symbol("newer"),pa=Symbol("older"),da=class _Entry{key;value;constructor(t,e){this.key=t,this.value=e,this[ca]=void 0,this[pa]=void 0}};c(da,"Entry");let _a=da;const fa=class _LRUMap{size;limit;oldest;newest;_keymap;constructor(t,e){"number"!=typeof t&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}_markEntryAsUsed(t){t!==this.newest&&(t[ca]&&(t===this.oldest&&(this.oldest=t[ca]),t[ca][pa]=t[pa]),t[pa]&&(t[pa][ca]=t[ca]),t[ca]=void 0,t[pa]=this.newest,this.newest&&(this.newest[ca]=t),this.newest=t)}assign(t){let e,i=this.limit||Number.MAX_VALUE;this._keymap.clear();const o=t[Symbol.iterator]();for(let n=o.next();!n.done;n=o.next()){const t=new _a(n.value[0],n.value[1]);if(this._keymap.set(t.key,t),e?(e[ca]=t,t[pa]=e):this.oldest=t,e=t,0==i--)throw new Error("overflow")}this.newest=e,this.size=this._keymap.size}get(t){const e=this._keymap.get(t);if(e)return this._markEntryAsUsed(e),e.value}set(t,e){let i=this._keymap.get(t);return i?(i.value=e,this._markEntryAsUsed(i),this):(this._keymap.set(t,i=new _a(t,e)),this.newest?(this.newest[ca]=i,i[pa]=this.newest):this.oldest=i,this.newest=i,++this.size,this.size>this.limit&&this.shift(),this)}shift(){const t=this.oldest;if(t)return this.oldest[ca]?(this.oldest=this.oldest[ca],this.oldest[pa]=void 0):(this.oldest=void 0,this.newest=void 0),t[ca]=t[pa]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]}find(t){const e=this._keymap.get(t);return e?e.value:void 0}has(t){return this._keymap.has(t)}delete(t){const e=this._keymap.get(t);if(e)return this._keymap.delete(e.key),e[ca]&&e[pa]?(e[pa][ca]=e[ca],e[ca][pa]=e[pa]):e[ca]?(e[ca][pa]=void 0,this.oldest=e[ca]):e[pa]?(e[pa][ca]=void 0,this.newest=e[pa]):this.oldest=this.newest=void 0,this.size--,e.value}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new ya(this.oldest)}values(){return new va(this.oldest)}entries(){return this}[Symbol.iterator](){return new ga(this.oldest)}forEach(t,e){"object"!=typeof e&&(e=this);let i=this.oldest;for(;i;)t.call(e,i.value,i.key,this),i=i[ca]}toJSON(){const t=new Array(this.size);let e=0,i=this.oldest;for(;i;)t[e++]={key:i.key,value:i.value},i=i[ca];return t}toString(){let t="",e=this.oldest;for(;e;)t+=String(e.key)+":"+e.value,e=e[ca],e&&(t+=" < ");return t}};c(fa,"LRUMap");let ma=fa;function ga(t){this.entry=t}function ya(t){this.entry=t}function va(t){this.entry=t}function La(t,e){let i=0,o=null;o=setInterval(function(){if(i>=20)throw clearInterval(o),new Error("window.google not found after 10 seconds");window.google&&window.google.maps&&window.google.maps.Map&&(clearInterval(o),t.call(e)),++i},500)}c(ga,"EntryIterator"),ga.prototype[Symbol.iterator]=function(){return this},ga.prototype.next=function(){const t=this.entry;return t?(this.entry=t[ca],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},c(ya,"KeyIterator"),ya.prototype[Symbol.iterator]=function(){return this},ya.prototype.next=function(){const t=this.entry;return t?(this.entry=t[ca],{done:!1,value:t.key}):{done:!0,value:void 0}},c(va,"ValueIterator"),va.prototype[Symbol.iterator]=function(){return this},va.prototype.next=function(){const t=this.entry;return t?(this.entry=t[ca],{done:!1,value:t.value}):{done:!0,value:void 0}},c(La,"waitForAPI"),L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:c(function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new ma(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},"initialize"),onAdd:c(function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._logoContainer&&t._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&t._controlCorners.bottomright.appendChild(this._attributionContainer),La(()=>{this._map&&(this._initMutant(),google.maps.event.addListenerOnce(this._mutant,"idle",()=>{this._map&&(this._checkZoomLevels(),this._mutantIsReady=!0)}))})},"onAdd"),onRemove:c(function(t){L.GridLayer.prototype.onRemove.call(this,t),this._observer.disconnect(),t._container.removeChild(this._mutantContainer),this._logoContainer&&L.DomUtil.remove(this._logoContainer),this._attributionContainer&&L.DomUtil.remove(this._attributionContainer),this._mutant&&google.maps.event.clearListeners(this._mutant,"idle")},"onRemove"),addGoogleLayer:c(function(t,e){return this._subLayers||(this._subLayers={}),this.whenReady(()=>{var i=new(0,google.maps[t])(e);i.setMap(this._mutant),this._subLayers[t]=i}),this},"addGoogleLayer"),removeGoogleLayer:c(function(t){return this.whenReady(()=>{var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])}),this},"removeGoogleLayer"),_initMutantContainer:c(function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.pointerEvents="none",this._mutantContainer.style.visibility="hidden",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);const t=this._mutantContainer.style;this._map.options.zoomSnap<1?(t.width="180%",t.height="180%"):(t.width="100%",t.height="100%"),t.zIndex=-1,this._attachObserver(this._mutantContainer)},"_initMutantContainer"),_initMutant:c(function(){if(!this._mutant){var t={center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,styles:this.options.styles||[],backgroundColor:"transparent"};null!=this.options.mapId&&(t.mapId=this.options.mapId);var e=new google.maps.Map(this._mutantContainer,t);this._mutant=e,this._update(),this.fire("spawned",{mapObject:e}),this._waitControls(),this.once("controls_ready",this._setupAttribution)}},"_initMutant"),_attachObserver:c(function(t){this._observer||(this._observer=new MutationObserver(this._onMutations.bind(this))),this._observer.observe(t,{childList:!0,subtree:!0}),Array.prototype.forEach.call(t.querySelectorAll("img"),this._boundOnMutatedImage)},"_attachObserver"),_waitControls:c(function(){const t=setInterval(()=>{const e=this._mutant.__gm.layoutManager;if(!e)return;let i;clearInterval(t),Object.keys(e).forEach(function(t){const o=e[t];o.get&&o.get(1)instanceof Node&&(i=o)}),this.fire("controls_ready",{positions:i})},50)},"_waitControls"),_setupAttribution:c(function(t){if(!this._map)return;const e=google.maps.ControlPosition,i=this._attributionContainer=t.positions.get(e.BOTTOM_RIGHT);L.DomUtil.addClass(i,"leaflet-control leaflet-control-attribution"),L.DomEvent.disableClickPropagation(i),i.style.height="14px",this._map._controlCorners.bottomright.appendChild(i),this._logoContainer=t.positions.get(e.BOTTOM_LEFT),this._logoContainer.style.pointerEvents="auto",this._map._controlCorners.bottomleft.appendChild(this._logoContainer)},"_setupAttribution"),_onMutations:c(function(t){for(var e=0;e<t.length;++e)for(var i=t[e],o=0;o<i.addedNodes.length;++o){var n=i.addedNodes[o];n instanceof HTMLImageElement?this._onMutatedImage(n):n instanceof HTMLElement&&Array.prototype.forEach.call(n.querySelectorAll("img"),this._boundOnMutatedImage)}},"_onMutations"),_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+|VinaFnapurmBegrtn)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,_onMutatedImage:c(function(t){let e,i=t.src.match(this._roadRegexp),o=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,o=1)):(i=t.src.match(this._satRegexp),i&&(e={x:i[1],y:i[2],z:i[3]}),o=0),e){var n=this._tileCoordsToKey(e);t.style.position="absolute";var s=n+"/"+o;this._lru.set(s,t),s in this._tileCallbacks&&this._tileCallbacks[s]&&(this._tileCallbacks[s].forEach(e=>e(t)),delete this._tileCallbacks[s])}},"_onMutatedImage"),createTile:c(function(t,e){const i=this._tileCoordsToKey(t),o=L.DomUtil.create("div");o.style.textAlign="left",o.dataset.pending=this._imagesPerTile,e=e.bind(this,null,o);for(var n=0;n<this._imagesPerTile;++n){const t=i+"/"+n,s=this._lru.get(t);s?(o.appendChild(this._clone(s)),--o.dataset.pending):(this._tileCallbacks[t]=this._tileCallbacks[t]||[],this._tileCallbacks[t].push(function(t){return function(i){t.appendChild(this._clone(i)),--t.dataset.pending,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(o)))}return parseInt(o.dataset.pending)||L.Util.requestAnimFrame(e),o},"createTile"),_clone:c(function(t){const e=t.cloneNode(!0);return e.style.visibility="visible",e},"_clone"),_checkZoomLevels:c(function(){const t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},"_checkZoomLevels"),_setMaxNativeZoom:c(function(t){t!==this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},"_setMaxNativeZoom"),_update:c(function(t){if(this._mutant){t=t||this._map.getCenter();const e=new google.maps.LatLng(t.lat,t.lng),i=Math.round(this._map.getZoom()),o=this._mutant.getZoom();this._mutant.setCenter(e),i!==o&&(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this,t)},"_update"),whenReady:c(function(t,e){return this._mutant?t.call(e||this,{target:this}):this.on("spawned",t,e),this},"whenReady")}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)};const wa=L.GridLayer.GoogleMutant,ba={iconColor:"#1EB300",iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}},xa=ra.Icon.extend({options:{icon:"leaf",iconSize:ba.iconSize.circle,iconAnchor:ba.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:ba.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:ba.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize(t){this.applyDefaults(t),this.options=t&&t.html?t:ra.Util.setOptions(this,t)},applyDefaults(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=ba.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=ba.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=ba.popupAnchor[t.iconShape]),t.innerIconAnchor||"circle"!==t.iconShape&&"marker"!==t.iconShape||("circle"===t.iconShape&&t.isAlphaNumericIcon?t.innerIconAnchor=[0,-1]:"marker"!==t.iconShape||t.isAlphaNumericIcon||(t.innerIconAnchor=ba.innerIconAnchor[t.iconShape])))},createIcon(){const t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){const i=document.createElement("div");return i.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),i.appendChild(t),i}return t},createIconInnerHtml(){const t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";const e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";let i="";return t.spin&&(i=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+i+'" style="'+e+'"></i>'},getInnerIconStyle(t){const e=ra.point(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles(t){const e=this.options,i=ra.point(e.iconSize),o=ra.point(e.iconAnchor);if(t.className="beautify-marker ",e.iconShape&&(t.className+=e.iconShape),e.customClasses&&(t.className+=" "+e.customClasses),t.style.backgroundColor=e.backgroundColor,t.style.color=e.textColor,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderStyle=e.borderStyle,i&&(t.style.width=i.x+"px",t.style.height=i.y+"px"),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e.iconStyle){let i=t.getAttribute("style");i+=e.iconStyle,t.setAttribute("style",i)}}});function Ma(t){return new xa(t)}c(Ma,"BeautifyIcon");const Ca=class _LeafletLayer extends ra.Layer{_rootGroup};c(Ca,"LeafletLayer");let Pa=Ca;const ka=class _D3SvgOverlay extends Pa{_svg;map;selection;projection;_pixelOrigin;_zoomDiff;_zoom;_scale;_shift;_wgsOrigin;_wgsInitialShift;constructor(t={}){super(),this._options(t)}svg(){return this._rootGroup}_drawCallback;drawCallback(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback}getBounds(){if(!this.selection||!this.projection)return new ra.LatLngBounds([-90,-180],[90,180]);const t=this.selection.node().getBBox();let e,i;try{e=this.projection.layerPointToLatLng(new ra.Point(t.x,t.y+t.height))}catch(o){e=[-90,-180]}try{i=this.projection.layerPointToLatLng(new ra.Point(t.x+t.width,t.y))}catch(o){i=[90,180]}return new ra.LatLngBounds(e,i)}_undef(t){return void 0===t}_options(t){return this._undef(t)?this.options:(t.zoomHide=!this._undef(t.zoomHide)&&t.zoomHide,t.zoomDraw=!!this._undef(t.zoomDraw)||t.zoomDraw,this.options=t)}draw(){this.map&&this._drawCallback&&(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/Math.pow(2,this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))}_zoomChange(t){const e=this._undef(t.zoom)?this.map._zoom:t.zoom;this._zoomDiff=e-this._zoom,this._scale=Math.pow(2,this._zoomDiff),this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));const i=["translate(",this._shift.x,",",this._shift.y,") "],o=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",i.concat(o).join("")),this.options.zoomDraw&&this.draw()}onAdd(t){this.map=t;const i=this;return this._svg=ra.svg(),t.addLayer(this._svg),this._rootGroup=e.select(this._svg._rootGroup).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomDraw),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=ra.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=ra.point(0,0),this._scale=1,this.projection={latLngToLayerPoint(t,e){e=i._undef(e)?i._zoom:e;return i.map.project(ra.latLng(t),e)._subtract(i._pixelOrigin)},layerPointToLatLng(t,e){e=i._undef(e)?i._zoom:e;const o=ra.point(t).add(i._pixelOrigin);return i.map.unproject(o,e)},unitsPerMeter:256*Math.pow(2,i._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:i.map,layer:i,scale:1},this.projection._projectPoint=function(t,e){const o=i.projection.latLngToLayerPoint(new ra.LatLng(e,t));this.stream.point(o.x,o.y)},this.projection.pathFromGeojson=Uo().projection(Fo({point:this.projection._projectPoint})),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this}getEvents(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}}onRemove(t){return this._svg.remove(),this}addTo(t){return t.addLayer(this),this}};c(ka,"D3SvgOverlay");let Ta=ka;var Ea,Sa={exports:{}};function Oa(){return Ea||(Ea=1,function(t){function e(t){if(!(this instanceof e))return new e(t);this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,this._data=[]}t.exports=e,c(e,"simpleheat"),e.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:c(function(t){return this._data=t,this},"data"),max:c(function(t){return this._max=t,this},"max"),add:c(function(t){return this._data.push(t),this},"add"),clear:c(function(){return this._data=[],this},"clear"),radius:c(function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),o=i.getContext("2d"),n=this._r=t+e;return i.width=i.height=2*n,o.shadowOffsetX=o.shadowOffsetY=2*n,o.shadowBlur=e,o.shadowColor="black",o.beginPath(),o.arc(-n,-n,t,0,2*Math.PI,!0),o.closePath(),o.fill(),this},"radius"),resize:c(function(){this._width=this._canvas.width,this._height=this._canvas.height},"resize"),gradient:c(function(t){var e=this._createCanvas(),i=e.getContext("2d"),o=i.createLinearGradient(0,0,0,256);for(var n in e.width=1,e.height=256,t)o.addColorStop(+n,t[n]);return i.fillStyle=o,i.fillRect(0,0,1,256),this._grad=i.getImageData(0,0,1,256).data,this},"gradient"),draw:c(function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var i,o=0,n=this._data.length;o<n;o++)i=this._data[o],e.globalAlpha=Math.max(i[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var s=e.getImageData(0,0,this._width,this._height);return this._colorize(s.data,this._grad),e.putImageData(s,0,0),this},"draw"),_colorize:c(function(t,e){for(var i,o=0,n=t.length;o<n;o+=4)(i=4*t[o+3])&&(t[o]=e[i],t[o+1]=e[i+1],t[o+2]=e[i+2])},"_colorize"),_createCanvas:c(function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor},"_createCanvas")}}(Sa)),Sa.exports}c(Oa,"requireSimpleheat");const za=lr(Oa()),Da=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),Ia=window.simpleheat||Da&&za||Da,Aa=class _LeafletLayer2 extends ra.Layer{};c(Aa,"LeafletLayer2");let Ba=Aa,Ra=(c(h=class extends Ba{_latlngs;_heat;_frame;_canvas;constructor(t,e={}){super(e),this._latlngs=t}initialize(t){this.setOptions(t)}setLatLngs(t){return this._latlngs=t,this.redraw()}addLatLng(t){return this._latlngs.push(t),this.redraw()}setOptions(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()}redraw(){return!this._heat||this._frame||this._map._animating||(this._frame=ra.Util.requestAnimFrame(this._redraw,this)),this}onAdd(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&ra.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this}onRemove(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this}addTo(t){return t.addLayer(this),this}_initCanvas(){const t=this._canvas=ra.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=ra.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";const i=this._map.getSize();t.width=i.x,t.height=i.y;const o=this._map.options.zoomAnimation&&ra.Browser.any3d;ra.DomUtil.addClass(t,"leaflet-zoom-"+(o?"animated":"hide")),this._heat=Ia(t),this._updateOptions()}_updateOptions(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)}_reset(){const t=this._map.containerPointToLayerPoint([0,0]);ra.DomUtil.setPosition(this._canvas,t);const e=this._map.getSize();this._heat._width!==e.x&&(this._canvas.width=this._heat._width=e.x),this._heat._height!==e.y&&(this._canvas.height=this._heat._height=e.y),this._redraw()}_redraw(){const t=[],e=this._heat._r,i=this._map.getSize(),o=new ra.Bounds(ra.point([-e,-e]),i.add([e,e])),n=void 0===this.options.max?1:this.options.max,s=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,r=1/Math.pow(2,Math.max(0,Math.min(s-this._map.getZoom(),12))),a=e/2,l=[],h=this._map._getMapPanePos(),u=h.x%a,c=h.y%a;let p,d,_,f,m,g,y,v,L;for(p=0,d=this._latlngs.length;p<d;p++)if(_=this._map.latLngToContainerPoint(this._latlngs[p]),o.contains(_)){m=Math.floor((_.x-u)/a)+2,g=Math.floor((_.y-c)/a)+2;L=(void 0!==this._latlngs[p].alt?this._latlngs[p].alt:void 0!==this._latlngs[p][2]?+this._latlngs[p][2]:1)*r,l[g]=l[g]||[],f=l[g][m],f?(f[0]=(f[0]*f[2]+_.x*L)/(f[2]+L),f[1]=(f[1]*f[2]+_.y*L)/(f[2]+L),f[2]+=L):l[g][m]=[_.x,_.y,L]}for(p=0,d=l.length;p<d;p++)if(l[p])for(y=0,v=l[p].length;y<v;y++)f=l[p][y],f&&t.push([Math.round(f[0]),Math.round(f[1]),Math.min(f[2],n)]);this._heat.data(t).draw(this.options.minOpacity),this._frame=null}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());ra.DomUtil.setTransform?ra.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[ra.DomUtil.TRANSFORM]=ra.DomUtil.getTranslateString(i)+" scale("+e+")"}},"HeatLayer"),h);const Za=aa.MarkerClusterGroup,Na=class _TileLayer extends e.Widget{_layer=new ra.FeatureGroup;_crs=ra.CRS.EPSG3857;constructor(t=!1){super(),this._layer.__hpcc_layer=this}crs(){return this._crs}attribution(){return""}clear(){this._layer.clearLayers()}add(t){this._layer.addLayer(t)}_initPromise;init(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise}hasBounds(){return!1}getBounds(){return this._layer.getBounds()}layerEnter(t){t.addLayer(this._layer)}layerUpdate(t){}layerExit(t){this._layer.clearLayers(),t.removeLayer(this._layer)}zoomEnd(t){}moveEnd(t){}viewReset(t){}};c(Na,"TileLayer");let ja=Na;const Ha=ds("Albers").scale(.5),Ga=ds("AlbersUsaPr").scale(.5),Ua={project(t){let e=Ga([t.lng,t.lat]);return e||(e=Ha([t.lng,t.lat])),new ra.Point(e[0],e[1])},unproject(t){if(isNaN(t.x)||isNaN(t.y))return new ra.LatLng(0,0);{const e=Ha.invert([t.x,t.y]);return new ra.LatLng(e[1],e[0])}}},Fa=ra.Util.extend({},ra.CRS,{projection:Ua,transformation:new ra.Transformation(1,0,1,0),infinite:!0}),Wa=class _AlbersLayer extends ja{_crs=Fa;constructor(){super()}hasBounds(){return!0}getBounds(){return new ra.LatLngBounds([20,-123],[49,-64])}};c(Wa,"AlbersLayer");let Va=Wa;Va.prototype._class+=" map_AlbersLayer";const qa=class _BlankLayer extends ja{constructor(){super()}};c(qa,"BlankLayer");let Ya=qa;Ya.prototype._class+=" map_BlankLayer";const $a=class _GMapLayer extends ja{constructor(){super()}init(){return this._initPromise||(this._initPromise=yr()),this._initPromise}attribution(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"}getMaxZoom(){return 23}layerEnter(t){super.layerEnter(t),this.add(new wa({type:"roadmap",styles:this.googleMapStyles()}))}};c($a,"GMapLayer");let Ka=$a;Ka.prototype._class+=" map_GMapLayer",Ka.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const Xa=class _MapBoxLayer extends ja{constructor(){super()}attribution(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"}getMaxZoom(){return 18}layerEnter(t){super.layerEnter(t),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");const e=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new ra.TileLayer(`https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token=${e}`,{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"streets-v11",accessToken:e}))}};c(Xa,"MapBoxLayer");let Ja=Xa;Ja.prototype._class+=" map_MapBoxLayer";const Qa=class _OpenStreetLayer extends ja{constructor(){super()}attribution(){return""}getMaxZoom(){return 18}layerEnter(t){super.layerEnter(t),this.add(new ra.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18,id:"open.streets"}))}};c(Qa,"OpenStreetLayer");let tl=Qa;tl.prototype._class+=" map_MapBoxLayer";const el=class _Leaflet extends e.HTMLWidget{_leafletElement;_leafletMap;_iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",()=>{this.zoomPlus()}),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",()=>{this.zoomMinus()}),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",()=>{this.zoomToFit()})]);_blankLayer=new Ya;_albersLayer=new Va;_mapBoxLayer=new Ja;_openStreetLayer=new tl;_gmapLayer=new Ka;constructor(){super(),this.baseLayer()}zoom(){return this._leafletMap.getZoom()}zoomPlus(){this._leafletMap.zoomIn()}zoomMinus(){this._leafletMap.zoomOut()}zoomToDefault(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})}zoomToFit(){let t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter(t=>t.hasBounds()).forEach(e=>{t?t.extend(e.getBounds()):t=e.getBounds()}),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()}syncLayers(t,e,i){const o=[...t],n=[],s=[];this._leafletMap.eachLayer(t=>{const e=o.indexOf(t.__hpcc_layer);e>=0?(n.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&s.push(t.__hpcc_layer)}),o.forEach(t=>{t.layerEnter(this._leafletMap),t.layerUpdate(this._leafletMap)}),n.forEach(t=>{t.layerUpdate(this._leafletMap)}),s.forEach(t=>{t.layerExit(this._leafletMap)})}_owner;isLayer(){return void 0!==this._owner&&this._owner!==this}baseLayer(){switch(this.mapType()){case"AlbersPR":this.map(this._albersLayer);break;case"MapBox":this.map(this._mapBoxLayer);break;case"OpenStreet":this.map(this._openStreetLayer);break;case"Google":this.map(this._gmapLayer);break;default:this.map(this._blankLayer)}return this.map()}enter(t,e){super.enter(t,e),e.style("position","relative"),this._leafletElement=e.append("div").style("position","absolute").style("width",`${this.width()}px`).style("height",`${this.height()}px`),this._iconBar.target(t)}_prevCRS;update(t,e){super.update(t,e),this._leafletElement.style("width",`${this.width()}px`).style("height",`${this.height()}px`);const i=this.baseLayer();this._prevCRS!==i.crs()&&(this._prevCRS=i.crs(),this._leafletMap&&(this.syncLayers([],t,e),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new ra.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:i.crs(),maxZoom:i.getMaxZoom?i.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(i.attribution()),this._leafletMap.on("zoomend",t=>this.layers().forEach(e=>e.zoomEnd(t))),this._leafletMap.on("moveend",t=>this.layers().forEach(e=>e.moveEnd(t))),this._leafletMap.on("viewreset",t=>this.layers().forEach(e=>e.viewReset(t))),this._renderCount=0),this.syncLayers([i,...this.layers()],t,e),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady(function(){this.zoomToFit()},this),this._iconBar.visible(this.showToolbar()).render(t=>{const e=t.getBBox();t.element().style("z-index",5e3).style("left",this.width()-e.width-4+"px")})}exit(t,e){this._iconBar.target(null),super.exit(t,e)}render(t){const e=[this.baseLayer().init(),...this.layers().map(t=>t.init())];return Promise.all(e).then(()=>{super.render(t)}),this}};c(el,"Leaflet");let il=el;il.prototype._class+=" map_Leaflet",il.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),il.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:c(t=>t.isLayer(),"hidden")}),il.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:c(t=>t.isLayer(),"hidden")});const ol=class _FeatureLayer extends il{_layer;_selection;constructor(t=!1){super(),this._layer=t?new Za:new ra.FeatureGroup,this._layer.__hpcc_layer=this,e.Utility.SimpleSelectionMixin.call(this),this.layers([this])}owner(t){this._owner=t}valid(){return!0}clear(){this._layer.clearLayers()}add(t){this._layer.addLayer(t)}maxZoom(){return this._owner._leafletMap.getMaxZoom()||24}zoom(){return this._owner._leafletMap.getZoom()}visibleBounds(){return this._owner._leafletMap.getBounds()}_initPromise;init(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise}hasBounds(){return!1}getBounds(){return this._layer.getBounds()}style(t,i){return void 0===i?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,i),this)}propValue(t,e,i){return(t<0?i:e[t])||i}layerEnter(t){t.addLayer(this._layer);const i=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(i)}layerUpdate(t){}layerExit(t){this._layer.clearLayers(),t.removeLayer(this._layer)}zoomEnd(t){}moveEnd(t){}viewReset(t){}};c(ol,"FeatureLayer");let nl=ol;nl.prototype._class+=" map_FeatureLayer",nl.prototype.mixin(e.Utility.SimpleSelectionMixin),nl.prototype.publishReset(["layers"]);const sl=class _ClusterLayer extends nl{constructor(t=!0){super(t)}};c(sl,"ClusterLayer");let rl=sl;rl.prototype._class+=" map_ClusterLayer";const al=class _D3SurfaceLayer extends nl{_lfd3=(new Ta).drawCallback((t,e)=>this.layerUpdate(void 0,e));hasBounds(){return!0}getBounds(){return this._lfd3.getBounds()}layerEnter(t){super.layerEnter(t),this.add(this._lfd3)}layerUpdate(t,e){super.layerUpdate(t)}clickHandler(t,e){}};c(al,"D3SurfaceLayer");let ll=al;const hl=class _Circles extends rl{hasBounds(){return!0}layerUpdate(t){super.layerUpdate(t);const e=this.columns(),i=e.indexOf(this.latitudeColumn()),o=e.indexOf(this.longitudeColumn()),n=e.indexOf(this.strokeColorColumn()),s=e.indexOf(this.fillColorColumn());this.clear(),this.data().filter(t=>!this.omitNullLatLong()||!!t[i]&&!!t[o]).forEach(t=>{this.add(new ra.Circle([t[i],t[o]],{color:this.propValue(n,t,this.strokeColor()),fill:!0,fillColor:this.propValue(s,t,this.fillColor()),fillOpacity:this.fillOpacity(),radius:this.radius(),origRow:t}).on("click",e=>this.clickHandler(e,t)))})}clickHandler(t,e){}};c(hl,"Circles");let ul=hl;ul.prototype._class+=" map_Circles",ul.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),ul.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),ul.prototype.publish("radius",50,"number","Radius (meters)"),ul.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),ul.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ul.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),ul.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),ul.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),ul.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const cl=class _D3Circles extends ll{layerUpdate(t,e){super.layerUpdate(t,e);const i=this._lfd3._rootGroup;e=e||this._lfd3.projection;const o=this.columns(),n=o.indexOf(this.latitudeColumn()),s=o.indexOf(this.longitudeColumn()),r=o.indexOf(this.strokeColorColumn()),a=o.indexOf(this.fillColorColumn());function l(t){return{lat:+t[n],lng:+t[s]}}c(l,"toLatLng");const h=i.selectAll("circle").data(this.data().filter(t=>!this.omitNullLatLong()||!!t[n]&&!!t[s]));h.enter().append("circle").merge(h).attr("cx",t=>e.latLngToLayerPoint(l(t)).x).attr("cy",t=>e.latLngToLayerPoint(l(t)).y).attr("r",Math.max(3/e.scale,this.radius()/e.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",t=>this.propValue(r,t,this.strokeColor())).attr("stroke-width",Math.max(1/e.scale,1/e.metresPerPixel)).style("fill",t=>this.propValue(a,t,this.fillColor())),h.exit().remove()}clickHandler(t,e){}};c(cl,"D3Circles");let pl=cl;pl.prototype._class+=" map_D3Circles",pl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),pl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),pl.prototype.publish("radius",50,"number","Radius (meters)"),pl.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),pl.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),pl.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),pl.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),pl.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),pl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const dl=class _ClusterCircles extends nl{_palette;createIcon(t,i,o){const n=e.hsl(i);return n.opacity=.5,new ra.DivIcon({className:"cluster-circle",iconSize:new ra.Point(40,40),html:`<div style='opacity:${this.opacity()};background-color:${n.toString()}'><div style='background-color:${i}'><span style='color:${e.Palette.textColor(i)}'>${o(t)}</span></div></div>`})}layerUpdate(t){super.layerUpdate(t),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));const i=this.cellFunc(this.latitudeColumn(),0),o=this.cellFunc(this.longitudeColumn(),0),n=c(t=>[+i(t),+o(t)],"latLongFunc"),s=this.cellFunc(this.weightColumn(),0),r=this.data(),a=e.extent(r,s),l=this.weightFormat()?e.format(this.weightFormat()):t=>t;this.clear(),r.forEach(t=>{const e=new ra.Marker(n(t),{icon:this.createIcon(s(t),this._palette(s(t),a[0],a[1]),l),origRow:t}).on("click",e=>this.clickHandler(e,t));e.bindTooltip("Weight: "+s(t)),this.add(e)})}clickHandler(t,e){}};c(dl,"ClusterCircles");let _l=dl;function fl(t,e){const i=e.getLatLngs();i.forEach(function(t){t.forEach(function(t){if(Array.isArray(t)){const e=165;let i=0,o=0,n=0,s=0;t.forEach(function(t){t.lat>-62&&(t.lng>e?++s:t.lng<-e&&++n,t.lng>0?++o:t.lng<0&&++i)}),n>0&&s>0&&t.forEach(function(t){t.lng>e&&i>o?t.lng-=360:t.lng<-e&&o>i&&(t.lng+=360)})}})}),e.setLatLngs(i)}_l.prototype._class+=" map_ClusterCircles",_l.prototype._palette=e.Palette.rainbow("default"),_l.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",_l.prototype._palette.switch()),_l.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),_l.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),_l.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),_l.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),_l.prototype.publish("weightFormat",",","string","Number format for weight"),_l.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]}),c(fl,"fixDateLine");const ml=class _TopoJSON extends ra.GeoJSON{constructor(t,e){super(t,{...e,onEachFeature:c((t,i)=>{e.onEachFeature&&e.onEachFeature(t,i),fl(0,i)},"onEachFeature")})}addData(t){let e,i;if("Topology"===t.type){for(i in t.objects)t.objects.hasOwnProperty(i)&&(e=Cs(t,t.objects[i]),super.addData.call(this,e));return this}return super.addData.call(this,t),this}};c(ml,"TopoJSON");let gl=ml;const yl=class _World extends nl{_features;_palette;_dataMap={};_dataMinWeight=null;_dataMaxWeight=null;constructor(){super(),e.Utility.SimpleSelectionMixin.call(this)}hasBounds(){return!0}getBounds(){const t=super.getBounds();return t.isValid()?new ra.LatLngBounds([t.getNorth(),t.getWest()],[t.getSouth(),t.getEast()]):new ra.LatLngBounds([90,-180],[-90,180])}updateDataMap(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;const e=this;t.forEach(function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])})}data(t){const e=super.data.apply(this,arguments);return arguments.length&&this.updateDataMap(t),e}styleFeature(t){const e=this._dataMap[t.properties.hpccID],i=e?this._palette(e[1],this._dataMinWeight,this._dataMaxWeight):"transparent";return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:i,fillOpacity:this.opacity()}}svgGlowID(){return this.id()+"_svgGlow"}_topoJson;_svgElement;layerEnter(t){if(super.layerEnter(t),!this._svgElement){this._svgElement=e.select(t.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");const i=this._svgElement.append("defs");new e.SVGGlowFilter(i,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}}_prevFeatures;layerUpdate(t){this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new gl(this._features,{onEachFeature:c((t,e)=>{e.on("click",t=>this.clickHandler(t,e,e.feature.properties.hpccID))},"onEachFeature")}).bindTooltip(t=>this.tooltipHandler(t,t.feature.properties.hpccID),{direction:"top",sticky:!0}),this.add(this._topoJson)),super.layerUpdate(t),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle(t=>this.styleFeature(t))}clickHandler(t,e,i){const o=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[i]),this.columns()[0],o),o}tooltipText(t,e){return e}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${e}</b>: ${o}`)}click(t,e,i){}};c(yl,"World");let vl=yl;vl.prototype._class+=" map_World",vl.prototype._palette=e.Palette.rainbow("default"),vl.prototype.mixin(e.Utility.SimpleSelectionMixin),vl.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",vl.prototype._palette.switch(),{tags:["Basic","Shared"]}),vl.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),vl.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),vl.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),vl.prototype.publish("meshColor","black","html-color","Stroke Color"),vl.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),vl.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");let Ll=null;const wl=class _Countries extends vl{constructor(){super()}init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Ll&&t(Ll),js(`${Ds()}/countries.json`,function(e){Ll=e,t(Ll)})}).then(t=>{this._features=Cs(t.topology,t.topology.objects.countries).features;for(const e in this._features)if(this._features[e].id){const i=this._features[e].id,o=t.countryNames[i]?.name;this._features[e].properties.hpccID=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${e}</b>: ${o}`)}};c(wl,"Countries");let bl=wl;function xl(t,e){const i=t.indexOf(e);i>=0&&t.splice(i,1)}c(xl,"del");const Ml=class _DrawLayer extends nl{_polylines=[];_polygons=[];_rectangles=[];_circles=[];_drawControl;hasBounds(){return!0}drawOptions(){const t={marker:!1,circlemarker:!1};return this.enableCircle()||(t.circle=!1),this.enablePolyline()||(t.polyline=!1),this.enableRectangle()||(t.rectangle=!1),this.enablePolygon()||(t.polygon=!1),t}save(){return{polylines:this._polylines.map(t=>t.getLatLngs()),polygons:this._polygons.map(t=>t.getLatLngs()),rectangles:this._rectangles.map(t=>t.getBounds()),circles:this._circles.map(t=>({center:t.getLatLng(),radius:t.getRadius()}))}}restore(t){this.clear(),this._polylines=(t.polylines||[]).map(t=>new ra.Polyline(t)),this._polygons=(t.polygons||[]).map(t=>new ra.Polygon(t)),this._rectangles=(t.rectangles||[]).map(t=>new ra.Rectangle(t)),this._circles=(t.circles||[]).map(t=>new ra.Circle(t.center,{radius:t.radius})),this._polylines.forEach(t=>this.add(t)),this._polygons.forEach(t=>this.add(t)),this._rectangles.forEach(t=>this.add(t)),this._circles.forEach(t=>this.add(t))}_drawOptionsHash;layerEnter(t){super.layerEnter(t),t.on(ra.Draw.Event.CREATED,t=>{const e=t.layerType,i=t.layer;switch(e){case"polyline":this._polylines.push(i);break;case"polygon":this._polygons.push(i);break;case"rectangle":this._rectangles.push(i);break;case"circle":this._circles.push(i);break;default:alert(e)}this.add(i),this.changed("ADD",i)}),t.on(ra.Draw.Event.EDITED,t=>{t.layers.eachLayer(t=>{this.changed("UPDATE",t)})}),t.on(ra.Draw.Event.DELETED,t=>{t.layers.eachLayer(t=>{xl(this._polylines,t),xl(this._polygons,t),xl(this._rectangles,t),xl(this._circles,t),this.changed("DELETE",t)})})}layerUpdate(t){super.layerUpdate(t),this.style("opacity",this.opacity());const e=this.drawOptions(),i=n.hashSum(e);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&t.removeControl(this._drawControl),this._drawControl=new ra.Control.Draw({position:"topleft",draw:e,edit:{featureGroup:this._layer}}),t.addControl(this._drawControl))}layerExit(t){super.layerExit(t)}changed(t,e){}};c(Ml,"DrawLayer");let Cl=Ml;Cl.prototype._class+=" map_DrawLayer",Cl.prototype.publish("opacity",1,"number","Layer Opacity"),Cl.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Cl.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Cl.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Cl.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");const Pl=class _HeatLayer extends nl{hasBounds(){return!0}layerUpdate(t){super.layerUpdate(t),this.style("opacity",this.opacity());const e=this.columns(),i=this.latitudeColumn_exists()?e.indexOf(this.latitudeColumn()):0,o=this.longitudeColumn_exists()?e.indexOf(this.longitudeColumn()):1,n=e.indexOf(this.weightColumn());let s;this.clear();const r=this.data().filter(t=>!this.omitNullLatLong()||!!t[i]&&!!t[o]).map(t=>(s?s.extend([t[i],t[o]]):s=new ra.LatLngBounds([t[i],t[o]]),[t[i],t[o],this.weightColumn_exists()?t[n]:.5])),a=new Ra(r,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});a.getBounds=()=>s,this.add(a)}};c(Pl,"HeatLayer");let kl=Pl;kl.prototype._class+=" map_Heat",kl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),kl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),kl.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),kl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),kl.prototype.publish("opacity",.5,"number","Layer Opacity"),kl.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),kl.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),kl.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),kl.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),kl.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});const Tl=class _Markers extends rl{constructor(t=!1){super(t)}hasBounds(){return!0}tooltipText(t,e){return""+e}popupText(t,e){return""+e}_hashSum;layerUpdate(t,e){if(super.layerUpdate(t),!e)return;const i=this.columns(),o=i.indexOf(this.latitudeColumn()),n=i.indexOf(this.longitudeColumn()),s=i.indexOf(this.tooltipColumn()),r=i.indexOf(this.popupColumn()),a=this._db.checksum(),l=this.hashSum([],{dbChecksum:a});this._hashSum!==l&&(this._hashSum=l,this.clear(),this.data().filter(t=>!this.omitNullLatLong()||!!t[o]&&!!t[n]).forEach(t=>{const i=new ra.Marker([t[o],t[n]],e(t)).on("click",e=>this.clickHandler(e,i,t)),a=this.tooltipText(this.rowToObj(t),this.propValue(s,t,""));a&&i.bindTooltip(a,{direction:this.tooltipDirection(),offset:ra.point(this.tooltipOffsetX(),this.tooltipOffsetY())});const l=this.popupText(this.rowToObj(t),this.propValue(r,t,""));l&&i.bindPopup(l,{offset:ra.point(this.popupOffsetX(),this.popupOffsetY())}),this.add(i)}))}_currSelRow;clickHandler(t,e,i){const o=this._selection.click(e._icon);this._currSelRow=o?i:void 0,this.click(this.rowToObj(i),"",o)}click(t,e,i){}};c(Tl,"Markers");let El=Tl;El.prototype._class+=" map_Markers",El.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),El.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),El.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),El.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),El.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),El.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),El.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),El.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),El.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),El.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");const Sl=class _Icons extends El{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns().indexOf(this.iconUrlColumn());super.layerUpdate(t,t=>({icon:new ra.Icon({iconUrl:this.propValue(e,t,this.iconUrl()),iconSize:[this.iconWidth(),this.iconHeight()],iconAnchor:[this.iconAnchorX(),this.iconAnchorY()],props:{owner:this,row:t}}),draggable:!1}))}};c(Sl,"Icons");let Ol=Sl;Ol.prototype._class+=" map_Icons",Ol.prototype.publish("iconUrl","","string","Icon URL",null),Ol.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),Ol.prototype.publish("iconWidth",32,"number","Icon width"),Ol.prototype.publish("iconHeight",32,"number","Icon height"),Ol.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),Ol.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");const zl=class _ClusterIcons extends Ol{constructor(){super(!0)}};c(zl,"ClusterIcons");let Dl=zl;function Il(t){return[t[1],t[0]]}Dl.prototype._class+=" map_ClusterIcons",c(Il,"lngLat2LatLng");const Al=c((t,e)=>(e[0]<-90?t[0]++:e[0]>90&&t[1]++,t),"calcSpread"),Bl=c(t=>t>90?t-360:t,"shiftLeft"),Rl=c(t=>t<-90?t+360:t,"shiftRight"),Zl=c(t=>{const e=t?Bl:Rl;return t=>[e(t[0]),t[1]]},"shiftPoint"),Nl=class _Polygons extends nl{_palette;fixDateLine(t){const[e,i]=t.reduce(Al,[0,0]);return e&&i?t.map(Zl(e>i)):t}hasBounds(){return!0}updateHexagons(){this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));const t=this.cellFunc(this.polygonColumn(),[]),i=this.cellFunc(this.weightColumn(),0),o=this.data(),n=e.extent(o,i);this.clear(),o.forEach(e=>{this.add(new ra.Polygon(this.fixDateLine(t(e)).map(Il),{color:this._palette(n[1],n[0],n[1]),fillColor:this._palette(i(e),n[0],n[1]),fillOpacity:this.opacity(),weight:1,origRow:e}).on("click",t=>this.clickHandler(t,e)))})}layerUpdate(t){super.layerUpdate(t),this.updateHexagons()}zoomEnd(t){super.zoomEnd(t)}moveEnd(t){super.moveEnd(t),this.updateHexagons()}clickHandler(t,e){}};c(Nl,"Polygons");let jl=Nl;jl.prototype._class+=" map_Polygons",jl.prototype._palette=e.Palette.rainbow("default"),jl.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",jl.prototype._palette.switch(),{tags:["Basic","Shared"]}),jl.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),jl.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),jl.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),jl.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});const Hl=2048/Math.PI,Gl=class _Path extends ll{lineData(){const t=this.columns(),e=t.indexOf(this.latitudeColumn()),i=t.indexOf(this.longitudeColumn()),o=[];let n;return this.data().forEach(t=>{const s=[t[i],t[e]];n&&o.push({type:"LineString",coordinates:[s,n]}),n=s}),o}isNull(t){return!t[0]&&!t[1]}isNull2(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))}layerUpdate(t,e){super.layerUpdate(t,e);const i=this._lfd3._rootGroup;e=e||this._lfd3.projection;this._lfd3.svg().selectAll("defs").data([void 0]).enter().append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",12).attr("markerHeight",12).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._lfd3.svg().select("defs > marker").style("fill",this.strokeColor()).style("stroke",null);const o=e.latLngToLayerPoint({lat:0,lng:0}),n=ds("Mercator").scale(Hl).translate([o.x,o.y]),s=Uo().projection(n),r=i.selectAll(".dataEdge").data(this.lineData().filter(t=>!this.isNull2(t.coordinates)));r.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(r).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/e.scale),r.exit().remove()}clickHandler(t,e){}};c(Gl,"Path");let Ul=Gl;Ul.prototype._class+=" map_Path",Ul.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Ul.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Ul.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),Ul.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const Fl=class _Lines extends Ul{lineData(){const t=this.columns(),e=t.indexOf(this.latitudeColumn()),i=t.indexOf(this.longitudeColumn()),o=t.indexOf(this.latitude2Column()),n=t.indexOf(this.longitude2Column()),s=[];return this.data().forEach(t=>{const r=[t[i],t[e]],a=[t[n],t[o]];s.push({type:"LineString",coordinates:[r,a]})}),s}};c(Fl,"Lines");let Wl=Fl;Wl.prototype._class+=" map_Lines",Wl.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Wl.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});const Vl=class _Pins extends El{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns(),i=e.indexOf(this.faCharColumn()),o=e.indexOf(this.faCharColorColumn()),n=e.indexOf(this.strokeColorColumn()),s=e.indexOf(this.fillColorColumn());super.layerUpdate(t,t=>({icon:Ma({iconShape:"marker",icon:this.propValue(i,t,this.faChar()),textColor:this.propValue(o,t,this.faCharColor()),borderColor:this.propValue(n,t,this.strokeColor()),backgroundColor:this.propValue(s,t,this.fillColor()),props:{owner:this,row:t}}),draggable:!1}))}};c(Vl,"Pins");let ql=Vl;ql.prototype._class+=" map_Pins",ql.prototype.publish("faChar","fa-circle","string","Default font awesome character"),ql.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),ql.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),ql.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),ql.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ql.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ql.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ql.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});const Yl=class _ClusterPins extends ql{constructor(){super(!0)}};c(Yl,"ClusterPins");let $l=Yl;$l.prototype._class+=" map_ClusterPins";const Kl={GB:["administrative_area_level_3","administrative_area_level_2","administrative_area_level_1"],IE:["administrative_area_level_2","administrative_area_level_1"],ND:["administrative_area_level_2","administrative_area_level_1"]},Xl={};function Jl(t){return Xl[t]||(Xl[t]={topology:void 0,nameIdx:{},codeIdx:{}}),Xl[t]}c(Jl,"cachedRegion");const Ql=class _Region extends vl{constructor(){super()}fetchTopo(t){return Jl(t).topology?Promise.resolve(Jl(t).topology):new Promise((e,i)=>{js(`${Ds()}/${t}.json`,function(i){Jl(t).topology=i,e(i)})})}fetchTopoIdx(t){for(const e in Jl(t).nameIdx)return Promise.resolve(Jl(t).nameIdx);return new Promise((e,i)=>{js(`${Ds()}/${t}_idx.json`,function(i){const{nameIdx:o,codeIdx:n}=Jl(t);Kl[t]?.forEach(t=>{for(const e in i[t]){const s=i[t][e];Array.isArray(s)&&(o[e]||(o[e]={code:void 0,codes:[]}),o[e].codes=o[e].codes.concat(s),1===s.length&&(o[e].code=o[e].codes[0]),s.forEach(t=>{n[t]||(n[t]={name:void 0,score:9999,names:[]}),s.length<=n[t].score&&(n[t].name=e,n[t].score=s.length),n[t].names.push(e)}))}}),e(o)})})}updateDataMap(t){const e=[],i=Jl(this.region()).nameIdx;return t.forEach(t=>{const o=i[t[0]]?.codes;o?o?.forEach(i=>{e.push([i,t[1],t])}):e.push([t[0],t[1],t])}),super.updateDataMap(e)}_prevRegion;init(){const t=this.region();return this._initPromise&&this._prevRegion===t||(this._prevRegion=t,this._initPromise=Promise.all([this.fetchTopo(t),this.fetchTopoIdx(t)]).then(([t,e])=>{this._features=Cs(t,t.objects.PolbndA).features;for(const i in this._features){const t=this._features[i].id||i;this._features[i].properties.hpccID=t}this.updateDataMap(this.data())})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=Jl(this.region()).codeIdx,n=i&&i[1]||"",s=o[e]?.names.map(t=>o[e]?.name===t?`<u>${t}</u>`:t).join(", ");return this.tooltipText(this.rowToObj(i),`<b>${i&&i[2][0]||s||e}</b>: ${n}`)}};c(Ql,"Region");let th=Ql;th.prototype._class+=" map_Region",th.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);const eh=class _Text extends El{constructor(t=!1){super(t)}layerUpdate(t){const i=this.columns(),o=i.indexOf(this.textColumn()),n=i.indexOf(this.textColorColumn()),s=i.indexOf(this.strokeColorColumn()),r=i.indexOf(this.fillColorColumn());super.layerUpdate(t,t=>{let i=this.propValue(o,t,this.text());const a=this.textSize(i,this.fontFamily(),this.fontSize());return this.textFormat_exists()&&(i=e.format(this.textFormat())(i)),{icon:Ma({iconShape:"rectangle",iconAnchor:[a.width/2+this.textOffsetX(),a.height/2+this.textOffsetY()],html:`<span style="\n ${this.fontFamily_exists()?`font-family:${this.fontFamily()};`:""}\n font-size:${this.fontSize()}px;\n pointer-events: none;\n white-space:nowrap;\n ">${i}</span>`,textColor:this.propValue(n,t,this.textColor()),borderColor:this.propValue(s,t,this.strokeColor()),backgroundColor:this.propValue(r,t,this.fillColor()),props:{owner:this,row:t}}),draggable:!1}})}};c(eh,"Text");let ih=eh;ih.prototype._class+=" map_Text",ih.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),ih.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),ih.prototype.publish("text","","string","Default text"),ih.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),ih.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ih.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ih.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),ih.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),ih.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});const oh=class _US extends vl{constructor(){super()}getBounds(){const t=super.getBounds();return new ra.LatLngBounds([t.getNorth(),t.getWest()],[17.755278,-64.565])}};c(oh,"US");let nh=oh,sh=null;const rh={},ah=class _USCounties extends nh{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{sh&&t(sh),js(`${Ds()}/us-counties.json`,function(e){sh=e,t(sh)})}).then(t=>{this._features=Cs(t.topology,t.topology.objects.counties).features;for(const e in this._features)if(this._features[e].id){const i=this._features[e].id,o=t.countyNames[i];this._features[e].properties.hpccID=i,rh[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${rh[e]}</b>: ${o}`)}};c(ah,"USCounties");let lh=ah;lh.prototype._class+=" map_USCounties";let hh=null;const uh={},ch=class _USStates extends nh{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{hh&&t(hh),js(`${Ds()}/us-states.json`,function(e){hh=e,t(hh)})}).then(t=>{this._features=Cs(t.topology,t.topology.objects.states).features;for(const e in this._features)if(this._features[e].id){const{code:i,name:o}=t.stateNames[this._features[e].id];this._features[e].properties.hpccID=i,uh[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${uh[e]}</b>: ${o}`)}};c(ch,"USStates");let ph=ch;ph.prototype._class+=" map_USStates";const dh=Object.freeze(Object.defineProperty({__proto__:null,Circles:ul,ClusterCircles:_l,ClusterIcons:Dl,ClusterLayer:rl,ClusterPins:$l,Countries:bl,D3Circles:pl,D3SurfaceLayer:ll,DrawLayer:Cl,FeatureLayer:nl,HeatLayer:kl,Icons:Ol,Leaflet:il,Lines:Wl,Markers:El,Path:Ul,Pins:ql,Polygons:jl,Region:th,Text:ih,TileLayer:ja,USCounties:lh,USStates:ph,World:vl},Symbol.toStringTag,{value:"Module"}));t.BUILD_VERSION="3.24.0",t.CanvasPinLayer=ws,t.CanvasPins=j,t.Choropleth=As,t.ChoroplethContinents=qs,t.ChoroplethCounties=Js,t.ChoroplethCountries=Ws,t.ChoroplethStates=or,t.ChoroplethStatesHeat=sr,t.GMap=xr,t.GMapCounties=Er,t.GMapGraph=Or,t.GMapHeat=Dr,t.GMapLayered=kr,t.GMapPin=Br,t.GMapPinLine=Nr,t.GeoHash=ar,t.Graph=Hr,t.Graticule=Ur,t.Heat=Wr,t.IChoropleth=Vr,t.Layer=vs,t.Layered=ms,t.Leaflet=dh,t.Lines=Rr,t.OpenStreet=Qr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="3.5.8",t.Pins=Ir,t.TopoJSONChoropleth=ia,t.projections=ps,t.requireGoogleMap=yr,t.requireGoogleMapTimeout=gr,t.resolve=ds,t.topoJsonFolder=Ds,t.types=cs,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):typeof define==`function`&&define.amd?define([`exports`,`@hpcc-js/common`,`@hpcc-js/api`,`@hpcc-js/layout`,`@hpcc-js/util`,`@hpcc-js/graph`,`@hpcc-js/other`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@hpcc-js/map`]={},e[`@hpcc-js/common`],e[`@hpcc-js/api`],e[`@hpcc-js/layout`],e[`@hpcc-js/util`],e[`@hpcc-js/graph`],e[`@hpcc-js/other`]))})(this,function(e,t,n,s,c,l,d){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var f=Object.create,p=Object.defineProperty,__name=(e,t)=>p(e,`name`,{value:t,configurable:!0}),m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__exportAll=(e,t)=>{let n={};for(var s in e)p(n,s,{get:e[s],enumerable:!0});return t||p(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=h(t),l=0,d=c.length,f;l<d;l++)f=c[l],!_.call(e,f)&&f!==n&&p(e,f,{get:(e=>t[e]).bind(null,f),enumerable:!(s=m(t,f))||s.enumerable});return e},__toESM=(e,t,n)=>(n=e==null?{}:f(g(e)),__copyProps(t||!e||!e.__esModule?p(n,`default`,{value:e,enumerable:!0}):n,e)),v=`@hpcc-js/map`,y=`3.5.9`,b=`3.25.1`;function add_default(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return add$1(this.cover(t,n),t,n,e)}__name(add_default,`default`);function add$1(e,t,n,s){if(isNaN(t)||isNaN(n))return e;var c,l=e._root,d={data:s},f=e._x0,p=e._y0,m=e._x1,h=e._y1,g,_,v,y,b,x,S,C;if(!l)return e._root=d,e;for(;l.length;)if((b=t>=(g=(f+m)/2))?f=g:m=g,(x=n>=(_=(p+h)/2))?p=_:h=_,c=l,!(l=l[S=x<<1|b]))return c[S]=d,e;if(v=+e._x.call(null,l.data),y=+e._y.call(null,l.data),t===v&&n===y)return d.next=l,c?c[S]=d:e._root=d,e;do c=c?c[S]=[,,,,]:e._root=[,,,,],(b=t>=(g=(f+m)/2))?f=g:m=g,(x=n>=(_=(p+h)/2))?p=_:h=_;while((S=x<<1|b)==(C=(y>=_)<<1|v>=g));return c[C]=l,c[S]=d,e}__name(add$1,`add`);function addAll(e){var t,n,s=e.length,c,l,d=Array(s),f=Array(s),p=1/0,m=1/0,h=-1/0,g=-1/0;for(n=0;n<s;++n)isNaN(c=+this._x.call(null,t=e[n]))||isNaN(l=+this._y.call(null,t))||(d[n]=c,f[n]=l,c<p&&(p=c),c>h&&(h=c),l<m&&(m=l),l>g&&(g=l));if(p>h||m>g)return this;for(this.cover(p,m).cover(h,g),n=0;n<s;++n)add$1(this,d[n],f[n],e[n]);return this}function cover_default(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,s=this._y0,c=this._x1,l=this._y1;if(isNaN(n))c=(n=Math.floor(e))+1,l=(s=Math.floor(t))+1;else{for(var d=c-n,f=this._root,p,m;n>e||e>=c||s>t||t>=l;)switch(m=(t<s)<<1|e<n,p=[,,,,],p[m]=f,f=p,d*=2,m){case 0:c=n+d,l=s+d;break;case 1:n=c-d,l=s+d;break;case 2:c=n+d,s=l-d;break;case 3:n=c-d,s=l-d;break}this._root&&this._root.length&&(this._root=f)}return this._x0=n,this._y0=s,this._x1=c,this._y1=l,this}__name(cover_default,`default`);function data_default(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}__name(data_default,`default`);function extent_default$1(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}__name(extent_default$1,`default`);function quad_default(e,t,n,s,c){this.node=e,this.x0=t,this.y0=n,this.x1=s,this.y1=c}__name(quad_default,`default`);function find_default(e,t,n){var s,c=this._x0,l=this._y0,d,f,p,m,h=this._x1,g=this._y1,_=[],v=this._root,y,b;for(v&&_.push(new quad_default(v,c,l,h,g)),n==null?n=1/0:(c=e-n,l=t-n,h=e+n,g=t+n,n*=n);y=_.pop();)if(!(!(v=y.node)||(d=y.x0)>h||(f=y.y0)>g||(p=y.x1)<c||(m=y.y1)<l))if(v.length){var x=(d+p)/2,S=(f+m)/2;_.push(new quad_default(v[3],x,S,p,m),new quad_default(v[2],d,S,x,m),new quad_default(v[1],x,f,p,S),new quad_default(v[0],d,f,x,S)),(b=(t>=S)<<1|e>=x)&&(y=_[_.length-1],_[_.length-1]=_[_.length-1-b],_[_.length-1-b]=y)}else{var C=e-+this._x.call(null,v.data),T=t-+this._y.call(null,v.data),E=C*C+T*T;if(E<n){var D=Math.sqrt(n=E);c=e-D,l=t-D,h=e+D,g=t+D,s=v.data}}return s}__name(find_default,`default`);function remove_default(e){if(isNaN(h=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e)))return this;var t,n=this._root,s,c,l,d=this._x0,f=this._y0,p=this._x1,m=this._y1,h,g,_,v,y,b,x,S;if(!n)return this;if(n.length)for(;;){if((y=h>=(_=(d+p)/2))?d=_:p=_,(b=g>=(v=(f+m)/2))?f=v:m=v,t=n,!(n=n[x=b<<1|y]))return this;if(!n.length)break;(t[x+1&3]||t[x+2&3]||t[x+3&3])&&(s=t,S=x)}for(;n.data!==e;)if(c=n,!(n=n.next))return this;return(l=n.next)&&delete n.next,c?(l?c.next=l:delete c.next,this):t?(l?t[x]=l:delete t[x],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(s?s[S]=n:this._root=n),this):(this._root=l,this)}__name(remove_default,`default`);function removeAll(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function root_default(){return this._root}__name(root_default,`default`);function size_default(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}__name(size_default,`default`);function visit_default(e){var t=[],n,s=this._root,c,l,d,f,p;for(s&&t.push(new quad_default(s,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(s=n.node,l=n.x0,d=n.y0,f=n.x1,p=n.y1)&&s.length){var m=(l+f)/2,h=(d+p)/2;(c=s[3])&&t.push(new quad_default(c,m,h,f,p)),(c=s[2])&&t.push(new quad_default(c,l,h,m,p)),(c=s[1])&&t.push(new quad_default(c,m,d,f,h)),(c=s[0])&&t.push(new quad_default(c,l,d,m,h))}return this}__name(visit_default,`default`);function visitAfter_default(e){var t=[],n=[],s;for(this._root&&t.push(new quad_default(this._root,this._x0,this._y0,this._x1,this._y1));s=t.pop();){var c=s.node;if(c.length){var l,d=s.x0,f=s.y0,p=s.x1,m=s.y1,h=(d+p)/2,g=(f+m)/2;(l=c[0])&&t.push(new quad_default(l,d,f,h,g)),(l=c[1])&&t.push(new quad_default(l,h,f,p,g)),(l=c[2])&&t.push(new quad_default(l,d,g,h,m)),(l=c[3])&&t.push(new quad_default(l,h,g,p,m))}n.push(s)}for(;s=n.pop();)e(s.node,s.x0,s.y0,s.x1,s.y1);return this}__name(visitAfter_default,`default`);function defaultX(e){return e[0]}function x_default(e){return arguments.length?(this._x=e,this):this._x}__name(x_default,`default`);function defaultY(e){return e[1]}function y_default(e){return arguments.length?(this._y=e,this):this._y}__name(y_default,`default`);function quadtree(e,t,n){var s=new Quadtree$1(t??defaultX,n??defaultY,NaN,NaN,NaN,NaN);return e==null?s:s.addAll(e)}function Quadtree$1(e,t,n,s,c,l){this._x=e,this._y=t,this._x0=n,this._y0=s,this._x1=c,this._y1=l,this._root=void 0}__name(Quadtree$1,`Quadtree`);function leaf_copy(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var x=quadtree.prototype=Quadtree$1.prototype;x.copy=function(){var e=new Quadtree$1(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,s;if(!t)return e;if(!t.length)return e._root=leaf_copy(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var c=0;c<4;++c)(s=t.source[c])&&(s.length?n.push({source:s,target:t.target[c]=[,,,,]}):t.target[c]=leaf_copy(s));return e},x.add=add_default,x.addAll=addAll,x.cover=cover_default,x.data=data_default,x.extent=extent_default$1,x.find=find_default,x.remove=remove_default,x.removeAll=removeAll,x.root=root_default,x.size=size_default,x.visit=visit_default,x.visitAfter=visitAfter_default,x.x=x_default,x.y=y_default;var Quadtree=class{_pin_h=0;_pin_w=0;_tree;constructor(e,t,n,s){this._pin_h=n,this._pin_w=s,this._tree=quadtree().extent(e).addAll(t)}searchRect(e,t,n,s){let c=[];return this._tree.visit((l,d,f,p,m)=>{let h;do l.length||l.data&&!l.data.already_flagged&&overlaps({left:e,right:n,top:t,bottom:s},l.data)&&(l.data.already_flagged=!0,c.push(l.data)),h=l=l.next;while(h);return d>=n||f>=s||p<e||m<t}),c;function overlaps(e,t){return(t[0]<e.right||t[0]>e.left)&&(t[1]<e.bottom||t[1]>e.top)}}getTreeRects(){let e=[];return this._tree.visit((t,n,s,c,l)=>{e.push([n,s,c-n,l-s])}),e}},CanvasPins=class extends t.CanvasWidget{_quadtree_rect_arr;_drawData;_overlap_count=0;_sub_overlap_count=0;constructor(){super()}enter(e,t){super.enter.apply(this,arguments),this.resize(this._size)}update(e,t){super.update.apply(this,arguments),this._ctx=this.element().node().getContext(`2d`);let n=(this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this.skewedData():this.data()).map(e=>[...e]).map(e=>(e.is_cluster=!1,e.already_flagged=!1,e.weight=e[2],e.fillStyle=`#FFFFFF`,e.strokeStyle=`#000000`,e.overlap_arr=[],e));this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(n):n,this.draw(this._drawData)}applyClustering(e){let t=this;this._overlap_count=0;let n=this.pinHeight(),s=this.pinWidth(),c=s/2,l=n/2,d=new Quadtree([[0,0],[this.size().width,this.size().height]],e,n,s);switch(this._quadtree_rect_arr=d.getTreeRects(),this.clusterMode()){case`default`:let t=e.map(e=>{if(!e.already_flagged){let t=this.searchRectMult(),n=e[0]-c*t,s=e[1]-l*t-8,f=e[0]+c*t,p=e[1]+l*t-8;e.overlap_arr=d.searchRect(n,s,f,p).filter(t=>t!==e),e.overlap_arr.length===0&&(e.already_flagged=!1)}return e});return t.forEach(e=>{e.already_flagged&&e.overlap_arr.length&&t.push(cluster_arr([e,...e.overlap_arr]))}),t;case`grid`:let n=[...e],s=this.gridCellSize(),f=this.gridCellSize(),p=Math.ceil(this.size().width/s),m=Math.ceil(this.size().height/f);for(let e=0;e<m;e++)for(let t=0;t<p;t++){let c=s*t,l=f*e,p=s*(t+1),m=f*(e+1),h=d.searchRect(c,l,p,m);if(h.length>1){let e=c+s/2,t=l+f/2;n.push(cluster_arr(h,e,t))}}return n}return e;function cluster_arr(e,n,s){let c=e.reduce((e,t)=>(t.already_flagged=!0,e+t[2]),0);return{0:n===void 0?t.useAveragePos()?e.reduce((e,t)=>e+t[0]*t[2],0)/c:e[0][0]:n,1:s===void 0?t.useAveragePos()?e.reduce((e,t)=>e+t[1]*t[2],0)/c:e[0][1]:s,weight:e.reduce((e,t)=>e+t[2],0),is_cluster:!0,already_flagged:!1,fillStyle:`#FFFFFF`,strokeStyle:`#000000`,overlap_arr:[]}}}drawQuadtree(){this._quadtree_rect_arr&&(this._ctx.strokeStyle=`#000000`,this._quadtree_rect_arr.forEach(e=>{this._ctx.strokeRect(e[0],e[1],e[2],e[3])}))}draw(e){let t=this,n=this._ctx;this.showQuadtree()&&this.drawQuadtree();let s=this.arrowHeight(),c=this.arrowWidth(),l=this.pinHeight(),d=this.pinWidth(),f=this.radiusWeightMult(),p=0;this.useWeightedRadius()&&e.filter(e=>e.is_cluster).forEach(e=>{p<e.weight&&(p=e.weight)}),e.filter(e=>!e.already_flagged).sort((e,t)=>e[1]>t[1]?1:-1).forEach(e=>{if(e.is_cluster||this.allCircles()){let t=d/2;this.useWeightedRadius()&&(t+=d*(f*e.weight/p)),drawCirclePin({icon:e.weight,left:Math.floor(e[0]-t)+.5,top:Math.floor(e[1]-t-s)+.5,radius:t,arrow_height:s,arrow_width:c})}else drawSquarePin({fillStyle:e.fillStyle,strokeStyle:e.strokeStyle,icon:e.weight,left:Math.floor(e[0]-d/2)+.5,top:Math.floor(e[1]-l-s)+.5,width:d,height:l,arrow_height:s,arrow_width:c})});function drawCirclePin(e){e.width=e.radius*2,e.height=e.width,n.fillStyle=`#FFFFFF`,n.strokeStyle=`#000000`,n.beginPath(),n.arc(e.left+e.width/2,e.top+e.height/2,e.radius,0,2*Math.PI),n.closePath(),n.fill(),n.stroke(),drawPinText(e)}function drawSquarePin(e){n.fillStyle=e.fillStyle,n.strokeStyle=`#000000`,n.fillRect(e.left,e.top,e.width,e.height),n.strokeRect(e.left,e.top,e.width,e.height),drawArrow(e),drawPinText(e)}function drawArrow(e,t){let s=e.left+e.width/2-e.arrow_width/2,c=e.left+e.width/2,l=e.left+e.width/2+e.arrow_width/2,d=e.top+e.height,f=d+e.arrow_height,p=d;t?(n.fillStyle=`#FFFFFF`,n.strokeStyle=`#FFFFFF`,d-=2,f-=2,p-=2):(n.fillStyle=`#FFFFFF`,n.strokeStyle=`#000000`),n.beginPath(),n.moveTo(s,d),n.lineTo(c,f),n.lineTo(l,p),n.lineTo(s,d),n.closePath(),n.stroke(),n.fill(),t||drawArrow(e,!0)}function drawPinText(e){n.font=`${t.pinFontSize()}px '${t.pinFontFamily()}'`;let s=e.left+e.width/2,c=e.top+e.height/2;n.textAlign=`center`,n.textBaseline=`middle`,n.fillStyle=`#000000`;let l=0,d=n.measureText(e.icon).width;for(;d>e.width||!t.shrinkFontToPin();)l++,n.font=`${t.pinFontSize()-l}px '${t.pinFontFamily()}'`,d=n.measureText(e.icon).width;n.fillText(e.icon,s,c)}}skewedData(){let e=this,t=[],n=this.data(),s=this.size(),c=this.bottomRightX()-this.topLeftX(),l=this.bottomRightY()-this.topLeftY(),d=c/s.width,f=l/s.height;return n.forEach(function(n){let s=Math.abs(n[0]-e.topLeftX()),c=Math.abs(n[1]-e.topLeftY()),l=s/d,p=c/f;t.push([l,p,n[2]])}),t}};CanvasPins.prototype._class+=` map_CanvasPins`,CanvasPins.prototype.publish(`clusterMode`,`default`,`set`,`clusterMode`,[`defualt`,`grid`],{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`gridCellSize`,80,`number`,`gridCellSize`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`allCircles`,!1,`boolean`,`allCircles`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`showQuadtree`,!1,`boolean`,`showQuadtree`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`useAveragePos`,!1,`boolean`,`useAveragePos`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`shrinkFontToPin`,!0,`boolean`,`shrinkFontToPin`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`enableClustering`,!0,`boolean`,`enableClustering`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`useWeightedRadius`,!1,`boolean`,`useWeightedRadius`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`radiusWeightMult`,.5,`number`,`radiusWeightMult`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`searchRectMult`,3,`number`,`searchRectMult`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`bottomRightX`,null,`number`,`Bottom right x-value`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`bottomRightY`,null,`number`,`Bottom right y-value`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`topLeftX`,null,`number`,`Top left x-value`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`topLeftY`,null,`number`,`Top left y-value`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`pinHeight`,20,`number`,`pinHeight`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`pinWidth`,20,`number`,`pinWidth`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`pinFontFamily`,`Arial`,`string`,`pinFontFamily`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`pinFontSize`,14,`number`,`pinFontSize`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`arrowHeight`,8,`number`,`arrowHeight`,null,{tags:[`Basic`],optional:!0}),CanvasPins.prototype.publish(`arrowWidth`,8,`number`,`arrowWidth`,null,{tags:[`Basic`],optional:!0});function adder_default(){return new Adder}__name(adder_default,`default`);function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(e){add(S,e,this.t),add(this,S.s,this.s),this.s?this.t+=S.t:this.s=S.t},valueOf:function(){return this.s}};var S=new Adder;function add(e,t,n){var s=e.s=t+n,c=s-t;e.t=t-(s-c)+(n-c)}var C=1e-6,T=Math.PI,E=T/2,D=T/4,O=T*2,k=180/T,A=T/180,j=Math.abs,M=Math.atan,N=Math.atan2,P=Math.cos,I=Math.ceil,ee=Math.exp,te=Math.log,ne=Math.pow,R=Math.sin,z=Math.sign||function(e){return e>0?1:e<0?-1:0},B=Math.sqrt,re=Math.tan;function acos(e){return e>1?0:e<-1?T:Math.acos(e)}function asin(e){return e>1?E:e<-1?-E:Math.asin(e)}function haversin(e){return(e=R(e/2))*e}function noop$1(){}__name(noop$1,`noop`);function streamGeometry(e,t){e&&ae.hasOwnProperty(e.type)&&ae[e.type](e,t)}var ie={Feature:function(e,t){streamGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,s=-1,c=n.length;++s<c;)streamGeometry(n[s].geometry,t)}},ae={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)e=n[s],t.point(e[0],e[1],e[2])},LineString:function(e,t){streamLine(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)streamLine(n[s],t,0)},Polygon:function(e,t){streamPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)streamPolygon(n[s],t)},GeometryCollection:function(e,t){for(var n=e.geometries,s=-1,c=n.length;++s<c;)streamGeometry(n[s],t)}};function streamLine(e,t,n){var s=-1,c=e.length-n,l;for(t.lineStart();++s<c;)l=e[s],t.point(l[0],l[1],l[2]);t.lineEnd()}function streamPolygon(e,t){var n=-1,s=e.length;for(t.polygonStart();++n<s;)streamLine(e[n],t,1);t.polygonEnd()}function stream_default(e,t){e&&ie.hasOwnProperty(e.type)?ie[e.type](e,t):streamGeometry(e,t)}__name(stream_default,`default`);var oe=adder_default(),se=adder_default(),ce,le,ue,de,fe,pe={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){oe.reset(),pe.lineStart=areaRingStart$1,pe.lineEnd=areaRingEnd$1},polygonEnd:function(){var e=+oe;se.add(e<0?O+e:e),this.lineStart=this.lineEnd=this.point=noop$1},sphere:function(){se.add(O)}};function areaRingStart$1(){pe.point=areaPointFirst$1}__name(areaRingStart$1,`areaRingStart`);function areaRingEnd$1(){areaPoint$1(ce,le)}__name(areaRingEnd$1,`areaRingEnd`);function areaPointFirst$1(e,t){pe.point=areaPoint$1,ce=e,le=t,e*=A,t*=A,ue=e,de=P(t=t/2+D),fe=R(t)}__name(area_default,`default`),__name(areaPointFirst$1,`areaPointFirst`);function areaPoint$1(e,t){e*=A,t*=A,t=t/2+D;var n=e-ue,s=n>=0?1:-1,c=s*n,l=P(t),d=R(t),f=fe*d,p=de*l+f*P(c),m=f*s*R(c);oe.add(N(m,p)),ue=e,de=l,fe=d}__name(areaPoint$1,`areaPoint`);function area_default(e){return se.reset(),stream_default(e,pe),se*2}function spherical(e){return[N(e[1],e[0]),asin(e[2])]}function cartesian(e){var t=e[0],n=e[1],s=P(n);return[s*P(t),s*R(t),R(n)]}function cartesianDot(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function cartesianCross(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function cartesianAddInPlace(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function cartesianScale(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function cartesianNormalizeInPlace(e){var t=B(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var V,me,H,he,ge,_e,ve,ye,be=adder_default(),xe,U,Se={point:boundsPoint$2,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){Se.point=boundsRingPoint,Se.lineStart=boundsRingStart,Se.lineEnd=boundsRingEnd,be.reset(),pe.polygonStart()},polygonEnd:function(){pe.polygonEnd(),Se.point=boundsPoint$2,Se.lineStart=boundsLineStart,Se.lineEnd=boundsLineEnd,oe<0?(V=-(H=180),me=-(he=90)):be>1e-6?he=90:be<-1e-6&&(me=-90),U[0]=V,U[1]=H},sphere:function(){V=-(H=180),me=-(he=90)}};function boundsPoint$2(e,t){xe.push(U=[V=e,H=e]),t<me&&(me=t),t>he&&(he=t)}__name(boundsPoint$2,`boundsPoint`);function linePoint(e,t){var n=cartesian([e*A,t*A]);if(ye){var s=cartesianCross(ye,n),c=cartesianCross([s[1],-s[0],0],s);cartesianNormalizeInPlace(c),c=spherical(c);var l=e-ge,d=l>0?1:-1,f=c[0]*k*d,p,m=j(l)>180;m^(d*ge<f&&f<d*e)?(p=c[1]*k,p>he&&(he=p)):(f=(f+360)%360-180,m^(d*ge<f&&f<d*e)?(p=-c[1]*k,p<me&&(me=p)):(t<me&&(me=t),t>he&&(he=t))),m?e<ge?angle(V,e)>angle(V,H)&&(H=e):angle(e,H)>angle(V,H)&&(V=e):H>=V?(e<V&&(V=e),e>H&&(H=e)):e>ge?angle(V,e)>angle(V,H)&&(H=e):angle(e,H)>angle(V,H)&&(V=e)}else xe.push(U=[V=e,H=e]);t<me&&(me=t),t>he&&(he=t),ye=n,ge=e}function boundsLineStart(){Se.point=linePoint}function boundsLineEnd(){U[0]=V,U[1]=H,Se.point=boundsPoint$2,ye=null}function boundsRingPoint(e,t){if(ye){var n=e-ge;be.add(j(n)>180?n+(n>0?360:-360):n)}else _e=e,ve=t;pe.point(e,t),linePoint(e,t)}function boundsRingStart(){pe.lineStart()}function boundsRingEnd(){boundsRingPoint(_e,ve),pe.lineEnd(),j(be)>1e-6&&(V=-(H=180)),U[0]=V,U[1]=H,ye=null}function angle(e,t){return(t-=e)<0?t+360:t}function rangeCompare(e,t){return e[0]-t[0]}function rangeContains(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}__name(bounds_default,`default`);function bounds_default(e){var t,n,s,c,l,d,f;if(he=H=-(V=me=1/0),xe=[],stream_default(e,Se),n=xe.length){for(xe.sort(rangeCompare),t=1,s=xe[0],l=[s];t<n;++t)c=xe[t],rangeContains(s,c[0])||rangeContains(s,c[1])?(angle(s[0],c[1])>angle(s[0],s[1])&&(s[1]=c[1]),angle(c[0],s[1])>angle(s[0],s[1])&&(s[0]=c[0])):l.push(s=c);for(d=-1/0,n=l.length-1,t=0,s=l[n];t<=n;s=c,++t)c=l[t],(f=angle(s[1],c[0]))>d&&(d=f,V=c[0],H=s[1])}return xe=U=null,V===1/0||me===1/0?[[NaN,NaN],[NaN,NaN]]:[[V,me],[H,he]]}var Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,W,G,K,q={sphere:noop$1,point:centroidPoint$1,lineStart:centroidLineStart$1,lineEnd:centroidLineEnd$1,polygonStart:function(){q.lineStart=centroidRingStart$1,q.lineEnd=centroidRingEnd$1},polygonEnd:function(){q.lineStart=centroidLineStart$1,q.lineEnd=centroidLineEnd$1}};function centroidPoint$1(e,t){e*=A,t*=A;var n=P(t);centroidPointCartesian(n*P(e),n*R(e),R(t))}__name(centroidPoint$1,`centroidPoint`);function centroidPointCartesian(e,t,n){++Ce,Te+=(e-Te)/Ce,Ee+=(t-Ee)/Ce,De+=(n-De)/Ce}function centroidLineStart$1(){q.point=centroidLinePointFirst}__name(centroidLineStart$1,`centroidLineStart`);function centroidLinePointFirst(e,t){e*=A,t*=A;var n=P(t);W=n*P(e),G=n*R(e),K=R(t),q.point=centroidLinePoint,centroidPointCartesian(W,G,K)}function centroidLinePoint(e,t){e*=A,t*=A;var n=P(t),s=n*P(e),c=n*R(e),l=R(t),d=N(B((d=G*l-K*c)*d+(d=K*s-W*l)*d+(d=W*c-G*s)*d),W*s+G*c+K*l);we+=d,Oe+=d*(W+(W=s)),ke+=d*(G+(G=c)),Ae+=d*(K+(K=l)),centroidPointCartesian(W,G,K)}function centroidLineEnd$1(){q.point=centroidPoint$1}__name(centroidLineEnd$1,`centroidLineEnd`);function centroidRingStart$1(){q.point=centroidRingPointFirst}__name(centroidRingStart$1,`centroidRingStart`),__name(centroid_default,`default`);function centroidRingEnd$1(){centroidRingPoint(Pe,Fe),q.point=centroidPoint$1}__name(centroidRingEnd$1,`centroidRingEnd`);function centroidRingPointFirst(e,t){Pe=e,Fe=t,e*=A,t*=A,q.point=centroidRingPoint;var n=P(t);W=n*P(e),G=n*R(e),K=R(t),centroidPointCartesian(W,G,K)}function centroidRingPoint(e,t){e*=A,t*=A;var n=P(t),s=n*P(e),c=n*R(e),l=R(t),d=G*l-K*c,f=K*s-W*l,p=W*c-G*s,m=B(d*d+f*f+p*p),h=asin(m),g=m&&-h/m;je+=g*d,Me+=g*f,Ne+=g*p,we+=h,Oe+=h*(W+(W=s)),ke+=h*(G+(G=c)),Ae+=h*(K+(K=l)),centroidPointCartesian(W,G,K)}function centroid_default(e){Ce=we=Te=Ee=De=Oe=ke=Ae=je=Me=Ne=0,stream_default(e,q);var t=je,n=Me,s=Ne,c=t*t+n*n+s*s;return c<1e-12&&(t=Oe,n=ke,s=Ae,we<1e-6&&(t=Te,n=Ee,s=De),c=t*t+n*n+s*s,c<1e-12)?[NaN,NaN]:[N(n,t)*k,asin(s/B(c))*k]}function constant_default(e){return function(){return e}}__name(constant_default,`default`);function compose_default(e,t){function compose(n,s){return n=e(n,s),t(n[0],n[1])}return e.invert&&t.invert&&(compose.invert=function(n,s){return n=t.invert(n,s),n&&e.invert(n[0],n[1])}),compose}__name(compose_default,`default`);function rotationIdentity(e,t){return[j(e)>T?e+Math.round(-e/O)*O:e,t]}rotationIdentity.invert=rotationIdentity;function rotateRadians(e,t,n){return(e%=O)?t||n?compose_default(rotationLambda(e),rotationPhiGamma(t,n)):rotationLambda(e):t||n?rotationPhiGamma(t,n):rotationIdentity}function forwardRotationLambda(e){return function(t,n){return t+=e,[t>T?t-O:t<-T?t+O:t,n]}}function rotationLambda(e){var t=forwardRotationLambda(e);return t.invert=forwardRotationLambda(-e),t}function rotationPhiGamma(e,t){var n=P(e),s=R(e),c=P(t),l=R(t);function rotation(e,t){var d=P(t),f=P(e)*d,p=R(e)*d,m=R(t),h=m*n+f*s;return[N(p*c-h*l,f*n-m*s),asin(h*c+p*l)]}return rotation.invert=function(e,t){var d=P(t),f=P(e)*d,p=R(e)*d,m=R(t),h=m*c-p*l;return[N(p*c+m*l,f*n+h*s),asin(h*n-f*s)]},rotation}function rotation_default(e){e=rotateRadians(e[0]*A,e[1]*A,e.length>2?e[2]*A:0);function forward(t){return t=e(t[0]*A,t[1]*A),t[0]*=k,t[1]*=k,t}return forward.invert=function(t){return t=e.invert(t[0]*A,t[1]*A),t[0]*=k,t[1]*=k,t},forward}__name(rotation_default,`default`);function circleStream(e,t,n,s,c,l){if(n){var d=P(t),f=R(t),p=s*n;c==null?(c=t+s*O,l=t-p/2):(c=circleRadius(d,c),l=circleRadius(d,l),(s>0?c<l:c>l)&&(c+=s*O));for(var m,h=c;s>0?h>l:h<l;h-=p)m=spherical([d,-f*P(h),-f*R(h)]),e.point(m[0],m[1])}}function circleRadius(e,t){t=cartesian(t),t[0]-=e,cartesianNormalizeInPlace(t);var n=acos(-t[1]);return((-t[2]<0?-n:n)+O-C)%O}function circle_default$1(){var e=constant_default([0,0]),t=constant_default(90),n=constant_default(6),s,c,l={point};function point(e,t){s.push(e=c(e,t)),e[0]*=k,e[1]*=k}function circle(){var d=e.apply(this,arguments),f=t.apply(this,arguments)*A,p=n.apply(this,arguments)*A;return s=[],c=rotateRadians(-d[0]*A,-d[1]*A,0).invert,circleStream(l,f,p,1),d={type:`Polygon`,coordinates:[s]},s=c=null,d}return circle.center=function(t){return arguments.length?(e=typeof t==`function`?t:constant_default([+t[0],+t[1]]),circle):e},circle.radius=function(e){return arguments.length?(t=typeof e==`function`?e:constant_default(+e),circle):t},circle.precision=function(e){return arguments.length?(n=typeof e==`function`?e:constant_default(+e),circle):n},circle}__name(circle_default$1,`default`);function buffer_default(){var e=[],t;return{point:function(e,n,s){t.push([e,n,s])},lineStart:function(){e.push(t=[])},lineEnd:noop$1,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}__name(buffer_default,`default`);function pointEqual_default(e,t){return j(e[0]-t[0])<1e-6&&j(e[1]-t[1])<1e-6}__name(pointEqual_default,`default`);function Intersection(e,t,n,s){this.x=e,this.z=t,this.o=n,this.e=s,this.v=!1,this.n=this.p=null}function rejoin_default(e,t,n,s,c){var l=[],d=[],f,p;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],s=e[t],p;if(pointEqual_default(n,s)){if(!n[2]&&!s[2]){for(c.lineStart(),f=0;f<t;++f)c.point((n=e[f])[0],n[1]);c.lineEnd();return}s[0]+=2*C}l.push(p=new Intersection(n,e,null,!0)),d.push(p.o=new Intersection(n,null,p,!1)),l.push(p=new Intersection(s,e,null,!1)),d.push(p.o=new Intersection(s,null,p,!0))}}),l.length){for(d.sort(t),link(l),link(d),f=0,p=d.length;f<p;++f)d[f].e=n=!n;for(var m=l[0],h,g;;){for(var _=m,v=!0;_.v;)if((_=_.n)===m)return;h=_.z,c.lineStart();do{if(_.v=_.o.v=!0,_.e){if(v)for(f=0,p=h.length;f<p;++f)c.point((g=h[f])[0],g[1]);else s(_.x,_.n.x,1,c);_=_.n}else{if(v)for(h=_.p.z,f=h.length-1;f>=0;--f)c.point((g=h[f])[0],g[1]);else s(_.x,_.p.x,-1,c);_=_.p}_=_.o,h=_.z,v=!v}while(!_.v);c.lineEnd()}}}__name(rejoin_default,`default`);function link(e){if(t=e.length){for(var t,n=0,s=e[0],c;++n<t;)s.n=c=e[n],c.p=s,s=c;s.n=c=e[0],c.p=s}}var Ie=adder_default();function longitude(e){return j(e[0])<=T?e[0]:z(e[0])*((j(e[0])+T)%O-T)}function polygonContains_default(e,t){var n=longitude(t),s=t[1],c=R(s),l=[R(n),-P(n),0],d=0,f=0;Ie.reset(),c===1?s=E+C:c===-1&&(s=-E-C);for(var p=0,m=e.length;p<m;++p)if(g=(h=e[p]).length)for(var h,g,_=h[g-1],v=longitude(_),y=_[1]/2+D,b=R(y),x=P(y),S=0;S<g;++S,v=A,b=M,x=I,_=k){var k=h[S],A=longitude(k),j=k[1]/2+D,M=R(j),I=P(j),ee=A-v,te=ee>=0?1:-1,ne=te*ee,z=ne>T,B=b*M;if(Ie.add(N(B*te*R(ne),x*I+B*P(ne))),d+=z?ee+te*O:ee,z^v>=n^A>=n){var re=cartesianCross(cartesian(_),cartesian(k));cartesianNormalizeInPlace(re);var ie=cartesianCross(l,re);cartesianNormalizeInPlace(ie);var ae=(z^ee>=0?-1:1)*asin(ie[2]);(s>ae||s===ae&&(re[0]||re[1]))&&(f+=z^ee>=0?1:-1)}}return(d<-1e-6||d<1e-6&&Ie<-1e-6)^f&1}__name(polygonContains_default,`default`);function clip_default(e,n,s,c){return function(l){var d=n(l),f=buffer_default(),p=n(f),m=!1,h,g,_,v={point,lineStart,lineEnd,polygonStart:function(){v.point=pointRing,v.lineStart=ringStart,v.lineEnd=ringEnd,g=[],h=[]},polygonEnd:function(){v.point=point,v.lineStart=lineStart,v.lineEnd=lineEnd,g=(0,t.merge)(g);var e=polygonContains_default(h,c);g.length?(m||=(l.polygonStart(),!0),rejoin_default(g,compareIntersection,e,s,l)):e&&(m||=(l.polygonStart(),!0),l.lineStart(),s(null,null,1,l),l.lineEnd()),m&&=(l.polygonEnd(),!1),g=h=null},sphere:function(){l.polygonStart(),l.lineStart(),s(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function point(t,n){e(t,n)&&l.point(t,n)}function pointLine(e,t){d.point(e,t)}function lineStart(){v.point=pointLine,d.lineStart()}function lineEnd(){v.point=point,d.lineEnd()}function pointRing(e,t){_.push([e,t]),p.point(e,t)}function ringStart(){p.lineStart(),_=[]}function ringEnd(){pointRing(_[0][0],_[0][1]),p.lineEnd();var e=p.clean(),t=f.result(),n,s=t.length,c,d,v;if(_.pop(),h.push(_),_=null,s){if(e&1){if(d=t[0],(c=d.length-1)>0){for(m||=(l.polygonStart(),!0),l.lineStart(),n=0;n<c;++n)l.point((v=d[n])[0],v[1]);l.lineEnd()}return}s>1&&e&2&&t.push(t.pop().concat(t.shift())),g.push(t.filter(validSegment))}}return v}}__name(clip_default,`default`);function validSegment(e){return e.length>1}function compareIntersection(e,t){return((e=e.x)[0]<0?e[1]-E-C:E-e[1])-((t=t.x)[0]<0?t[1]-E-C:E-t[1])}var Le=clip_default(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-T,-E]);function clipAntimeridianLine(e){var t=NaN,n=NaN,s=NaN,c;return{lineStart:function(){e.lineStart(),c=1},point:function(l,d){var f=l>0?T:-T,p=j(l-t);j(p-T)<1e-6?(e.point(t,n=(n+d)/2>0?E:-E),e.point(s,n),e.lineEnd(),e.lineStart(),e.point(f,n),e.point(l,n),c=0):s!==f&&p>=T&&(j(t-s)<1e-6&&(t-=s*C),j(l-f)<1e-6&&(l-=f*C),n=clipAntimeridianIntersect(t,n,l,d),e.point(s,n),e.lineEnd(),e.lineStart(),e.point(f,n),c=0),e.point(t=l,n=d),s=f},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-c}}}function clipAntimeridianIntersect(e,t,n,s){var c,l,d=R(e-n);return j(d)>1e-6?M((R(t)*(l=P(s))*R(n)-R(s)*(c=P(t))*R(e))/(c*l*d)):(t+s)/2}function clipAntimeridianInterpolate(e,t,n,s){var c;if(e==null)c=n*E,s.point(-T,c),s.point(0,c),s.point(T,c),s.point(T,0),s.point(T,-c),s.point(0,-c),s.point(-T,-c),s.point(-T,0),s.point(-T,c);else if(j(e[0]-t[0])>1e-6){var l=e[0]<t[0]?T:-T;c=n*l/2,s.point(-l,c),s.point(0,c),s.point(l,c)}else s.point(t[0],t[1])}function circle_default(e){var t=P(e),n=6*A,s=t>0,c=j(t)>C;function interpolate(t,s,c,l){circleStream(l,e,n,c,t,s)}function visible(e,n){return P(e)*P(n)>t}function clipLine(e){var t,n,l,d,f;return{lineStart:function(){d=l=!1,f=1},point:function(p,m){var h=[p,m],g,_=visible(p,m),v=s?_?0:code(p,m):_?code(p+(p<0?T:-T),m):0;if(!t&&(d=l=_)&&e.lineStart(),_!==l&&(g=intersect(t,h),(!g||pointEqual_default(t,g)||pointEqual_default(h,g))&&(h[2]=1)),_!==l)f=0,_?(e.lineStart(),g=intersect(h,t),e.point(g[0],g[1])):(g=intersect(t,h),e.point(g[0],g[1],2),e.lineEnd()),t=g;else if(c&&t&&s^_){var y;!(v&n)&&(y=intersect(h,t,!0))&&(f=0,s?(e.lineStart(),e.point(y[0][0],y[0][1]),e.point(y[1][0],y[1][1]),e.lineEnd()):(e.point(y[1][0],y[1][1]),e.lineEnd(),e.lineStart(),e.point(y[0][0],y[0][1],3)))}_&&(!t||!pointEqual_default(t,h))&&e.point(h[0],h[1]),t=h,l=_,n=v},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return f|(d&&l)<<1}}}function intersect(e,n,s){var c=cartesian(e),l=cartesian(n),d=[1,0,0],f=cartesianCross(c,l),p=cartesianDot(f,f),m=f[0],h=p-m*m;if(!h)return!s&&e;var g=t*p/h,_=-t*m/h,v=cartesianCross(d,f),y=cartesianScale(d,g);cartesianAddInPlace(y,cartesianScale(f,_));var b=v,x=cartesianDot(y,b),S=cartesianDot(b,b),E=x*x-S*(cartesianDot(y,y)-1);if(!(E<0)){var D=B(E),O=cartesianScale(b,(-x-D)/S);if(cartesianAddInPlace(O,y),O=spherical(O),!s)return O;var k=e[0],A=n[0],M=e[1],N=n[1],P;A<k&&(P=k,k=A,A=P);var I=A-k,ee=j(I-T)<C,te=ee||I<1e-6;if(!ee&&N<M&&(P=M,M=N,N=P),te?ee?M+N>0^O[1]<(j(O[0]-k)<1e-6?M:N):M<=O[1]&&O[1]<=N:I>T^(k<=O[0]&&O[0]<=A)){var ne=cartesianScale(b,(-x+D)/S);return cartesianAddInPlace(ne,y),[O,spherical(ne)]}}}function code(t,n){var c=s?e:T-e,l=0;return t<-c?l|=1:t>c&&(l|=2),n<-c?l|=4:n>c&&(l|=8),l}return clip_default(visible,clipLine,interpolate,s?[0,-e]:[-T,e-T])}__name(circle_default,`default`);function line_default(e,t,n,s,c,l){var d=e[0],f=e[1],p=t[0],m=t[1],h=0,g=1,_=p-d,v=m-f,y=n-d;if(!(!_&&y>0)){if(y/=_,_<0){if(y<h)return;y<g&&(g=y)}else if(_>0){if(y>g)return;y>h&&(h=y)}if(y=c-d,!(!_&&y<0)){if(y/=_,_<0){if(y>g)return;y>h&&(h=y)}else if(_>0){if(y<h)return;y<g&&(g=y)}if(y=s-f,!(!v&&y>0)){if(y/=v,v<0){if(y<h)return;y<g&&(g=y)}else if(v>0){if(y>g)return;y>h&&(h=y)}if(y=l-f,!(!v&&y<0)){if(y/=v,v<0){if(y>g)return;y>h&&(h=y)}else if(v>0){if(y<h)return;y<g&&(g=y)}return h>0&&(e[0]=d+h*_,e[1]=f+h*v),g<1&&(t[0]=d+g*_,t[1]=f+g*v),!0}}}}}__name(line_default,`default`);var Re=1e9,ze=-Re;function clipRectangle(e,n,s,c){function visible(t,l){return e<=t&&t<=s&&n<=l&&l<=c}function interpolate(t,l,d,f){var p=0,m=0;if(t==null||(p=corner(t,d))!==(m=corner(l,d))||comparePoint(t,l)<0^d>0)do f.point(p===0||p===3?e:s,p>1?c:n);while((p=(p+d+4)%4)!==m);else f.point(l[0],l[1])}function corner(t,c){return j(t[0]-e)<1e-6?c>0?0:3:j(t[0]-s)<1e-6?c>0?2:1:j(t[1]-n)<1e-6?+(c>0):c>0?3:2}function compareIntersection(e,t){return comparePoint(e.x,t.x)}function comparePoint(e,t){var n=corner(e,1),s=corner(t,1);return n===s?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-s}return function(l){var d=l,f=buffer_default(),p,m,h,g,_,v,y,b,x,S,C,T={point,lineStart,lineEnd,polygonStart,polygonEnd};function point(e,t){visible(e,t)&&d.point(e,t)}function polygonInside(){for(var t=0,n=0,s=m.length;n<s;++n)for(var l=m[n],d=1,f=l.length,p=l[0],h,g,_=p[0],v=p[1];d<f;++d)h=_,g=v,p=l[d],_=p[0],v=p[1],g<=c?v>c&&(_-h)*(c-g)>(v-g)*(e-h)&&++t:v<=c&&(_-h)*(c-g)<(v-g)*(e-h)&&--t;return t}function polygonStart(){d=f,p=[],m=[],C=!0}function polygonEnd(){var e=polygonInside(),n=C&&e,s=(p=(0,t.merge)(p)).length;(n||s)&&(l.polygonStart(),n&&(l.lineStart(),interpolate(null,null,1,l),l.lineEnd()),s&&rejoin_default(p,compareIntersection,e,interpolate,l),l.polygonEnd()),d=l,p=m=h=null}function lineStart(){T.point=linePoint,m&&m.push(h=[]),S=!0,x=!1,y=b=NaN}function lineEnd(){p&&(linePoint(g,_),v&&x&&f.rejoin(),p.push(f.result())),T.point=point,x&&d.lineEnd()}function linePoint(t,l){var f=visible(t,l);if(m&&h.push([t,l]),S)g=t,_=l,v=f,S=!1,f&&(d.lineStart(),d.point(t,l));else if(f&&x)d.point(t,l);else{var p=[y=Math.max(ze,Math.min(Re,y)),b=Math.max(ze,Math.min(Re,b))],T=[t=Math.max(ze,Math.min(Re,t)),l=Math.max(ze,Math.min(Re,l))];line_default(p,T,e,n,s,c)?(x||(d.lineStart(),d.point(p[0],p[1])),d.point(T[0],T[1]),f||d.lineEnd(),C=!1):f&&(d.lineStart(),d.point(t,l),C=!1)}y=t,b=l,x=f}return T}}function extent_default(){var e=0,t=0,n=960,s=500,c,l,d;return d={stream:function(d){return c&&l===d?c:c=clipRectangle(e,t,n,s)(l=d)},extent:function(f){return arguments.length?(e=+f[0][0],t=+f[0][1],n=+f[1][0],s=+f[1][1],c=l=null,d):[[e,t],[n,s]]}}}__name(extent_default,`default`);var J=adder_default(),Be,Ve,He,Ue={sphere:noop$1,point:noop$1,lineStart:lengthLineStart,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1};function lengthLineStart(){Ue.point=lengthPointFirst$1,Ue.lineEnd=lengthLineEnd}function lengthLineEnd(){Ue.point=Ue.lineEnd=noop$1}function lengthPointFirst$1(e,t){e*=A,t*=A,Be=e,Ve=R(t),He=P(t),Ue.point=lengthPoint$1}__name(lengthPointFirst$1,`lengthPointFirst`);function lengthPoint$1(e,t){e*=A,t*=A;var n=R(t),s=P(t),c=j(e-Be),l=P(c),d=s*R(c),f=He*n-Ve*s*l,p=Ve*n+He*s*l;J.add(N(B(d*d+f*f),p)),Be=e,Ve=n,He=s}__name(length_default,`default`),__name(lengthPoint$1,`lengthPoint`);function length_default(e){return J.reset(),stream_default(e,Ue),+J}var We=[null,null],Ge={type:`LineString`,coordinates:We};function distance_default(e,t){return We[0]=e,We[1]=t,length_default(Ge)}__name(distance_default,`default`);var Ke={Feature:function(e,t){return containsGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,s=-1,c=n.length;++s<c;)if(containsGeometry(n[s].geometry,t))return!0;return!1}},qe={Sphere:function(){return!0},Point:function(e,t){return containsPoint(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)if(containsPoint(n[s],t))return!0;return!1},LineString:function(e,t){return containsLine(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)if(containsLine(n[s],t))return!0;return!1},Polygon:function(e,t){return containsPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,s=-1,c=n.length;++s<c;)if(containsPolygon(n[s],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,s=-1,c=n.length;++s<c;)if(containsGeometry(n[s],t))return!0;return!1}};function containsGeometry(e,t){return e&&qe.hasOwnProperty(e.type)?qe[e.type](e,t):!1}function containsPoint(e,t){return distance_default(e,t)===0}function containsLine(e,t){for(var n,s,c,l=0,d=e.length;l<d;l++){if(s=distance_default(e[l],t),s===0||l>0&&(c=distance_default(e[l],e[l-1]),c>0&&n<=c&&s<=c&&(n+s-c)*(1-((n-s)/c)**2)<1e-12*c))return!0;n=s}return!1}function containsPolygon(e,t){return!!polygonContains_default(e.map(ringRadians),pointRadians(t))}function ringRadians(e){return e=e.map(pointRadians),e.pop(),e}function pointRadians(e){return[e[0]*A,e[1]*A]}function contains_default(e,t){return(e&&Ke.hasOwnProperty(e.type)?Ke[e.type]:containsGeometry)(e,t)}__name(contains_default,`default`);function graticuleX(e,n,s){var c=(0,t.range)(e,n-C,s).concat(n);return function(e){return c.map(function(t){return[e,t]})}}function graticuleY(e,n,s){var c=(0,t.range)(e,n-C,s).concat(n);return function(e){return c.map(function(t){return[t,e]})}}function graticule(){var e,n,s,c,l,d,f,p,m=10,h=m,g=90,_=360,v,y,b,x,S=2.5;function graticule(){return{type:`MultiLineString`,coordinates:lines()}}function lines(){return(0,t.range)(I(c/g)*g,s,g).map(b).concat((0,t.range)(I(p/_)*_,f,_).map(x)).concat((0,t.range)(I(n/m)*m,e,m).filter(function(e){return j(e%g)>C}).map(v)).concat((0,t.range)(I(d/h)*h,l,h).filter(function(e){return j(e%_)>C}).map(y))}return graticule.lines=function(){return lines().map(function(e){return{type:`LineString`,coordinates:e}})},graticule.outline=function(){return{type:`Polygon`,coordinates:[b(c).concat(x(f).slice(1),b(s).reverse().slice(1),x(p).reverse().slice(1))]}},graticule.extent=function(e){return arguments.length?graticule.extentMajor(e).extentMinor(e):graticule.extentMinor()},graticule.extentMajor=function(e){return arguments.length?(c=+e[0][0],s=+e[1][0],p=+e[0][1],f=+e[1][1],c>s&&(e=c,c=s,s=e),p>f&&(e=p,p=f,f=e),graticule.precision(S)):[[c,p],[s,f]]},graticule.extentMinor=function(t){return arguments.length?(n=+t[0][0],e=+t[1][0],d=+t[0][1],l=+t[1][1],n>e&&(t=n,n=e,e=t),d>l&&(t=d,d=l,l=t),graticule.precision(S)):[[n,d],[e,l]]},graticule.step=function(e){return arguments.length?graticule.stepMajor(e).stepMinor(e):graticule.stepMinor()},graticule.stepMajor=function(e){return arguments.length?(g=+e[0],_=+e[1],graticule):[g,_]},graticule.stepMinor=function(e){return arguments.length?(m=+e[0],h=+e[1],graticule):[m,h]},graticule.precision=function(t){return arguments.length?(S=+t,v=graticuleX(d,l,90),y=graticuleY(n,e,S),b=graticuleX(p,f,90),x=graticuleY(c,s,S),graticule):S},graticule.extentMajor([[-180,-90+C],[180,90-C]]).extentMinor([[-180,-80-C],[180,80+C]])}function graticule10(){return graticule()()}function interpolate_default(e,t){var n=e[0]*A,s=e[1]*A,c=t[0]*A,l=t[1]*A,d=P(s),f=R(s),p=P(l),m=R(l),h=d*P(n),g=d*R(n),_=p*P(c),v=p*R(c),y=2*asin(B(haversin(l-s)+d*p*haversin(c-n))),b=R(y),x=y?function(e){var t=R(e*=y)/b,n=R(y-e)/b,s=n*h+t*_,c=n*g+t*v,l=n*f+t*m;return[N(c,s)*k,N(l,B(s*s+c*c))*k]}:function(){return[n*k,s*k]};return x.distance=y,x}__name(interpolate_default,`default`);function identity_default$2(e){return e}__name(identity_default$2,`default`);var Je=adder_default(),Ye=adder_default(),Xe,Ze,Qe,$e,et={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){et.lineStart=areaRingStart,et.lineEnd=areaRingEnd},polygonEnd:function(){et.lineStart=et.lineEnd=et.point=noop$1,Je.add(j(Ye)),Ye.reset()},result:function(){var e=Je/2;return Je.reset(),e}};function areaRingStart(){et.point=areaPointFirst}function areaPointFirst(e,t){et.point=areaPoint,Xe=Qe=e,Ze=$e=t}function areaPoint(e,t){Ye.add($e*e-Qe*t),Qe=e,$e=t}function areaRingEnd(){areaPoint(Xe,Ze)}var tt=1/0,nt=tt,rt=-tt,it=rt,at={point:boundsPoint$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1,result:function(){var e=[[tt,nt],[rt,it]];return rt=it=-(nt=tt=1/0),e}};function boundsPoint$1(e,t){e<tt&&(tt=e),e>rt&&(rt=e),t<nt&&(nt=t),t>it&&(it=t)}__name(boundsPoint$1,`boundsPoint`);var ot=0,st=0,ct=0,lt=0,ut=0,dt=0,ft=0,pt=0,mt=0,ht,gt,_t,vt,yt={point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){yt.lineStart=centroidRingStart,yt.lineEnd=centroidRingEnd},polygonEnd:function(){yt.point=centroidPoint,yt.lineStart=centroidLineStart,yt.lineEnd=centroidLineEnd},result:function(){var e=mt?[ft/mt,pt/mt]:dt?[lt/dt,ut/dt]:ct?[ot/ct,st/ct]:[NaN,NaN];return ot=st=ct=lt=ut=dt=ft=pt=mt=0,e}};function centroidPoint(e,t){ot+=e,st+=t,++ct}function centroidLineStart(){yt.point=centroidPointFirstLine}function centroidPointFirstLine(e,t){yt.point=centroidPointLine,centroidPoint(_t=e,vt=t)}function centroidPointLine(e,t){var n=e-_t,s=t-vt,c=B(n*n+s*s);lt+=c*(_t+e)/2,ut+=c*(vt+t)/2,dt+=c,centroidPoint(_t=e,vt=t)}function centroidLineEnd(){yt.point=centroidPoint}function centroidRingStart(){yt.point=centroidPointFirstRing}function centroidRingEnd(){centroidPointRing(ht,gt)}function centroidPointFirstRing(e,t){yt.point=centroidPointRing,centroidPoint(ht=_t=e,gt=vt=t)}function centroidPointRing(e,t){var n=e-_t,s=t-vt,c=B(n*n+s*s);lt+=c*(_t+e)/2,ut+=c*(vt+t)/2,dt+=c,c=vt*e-_t*t,ft+=c*(_t+e),pt+=c*(vt+t),mt+=c*3,centroidPoint(_t=e,vt=t)}function PathContext(e){this._context=e}PathContext.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,O);break}},result:noop$1};var bt=adder_default(),xt,St,Ct,wt,Tt,Et={point:noop$1,lineStart:function(){Et.point=lengthPointFirst},lineEnd:function(){xt&&lengthPoint(St,Ct),Et.point=noop$1},polygonStart:function(){xt=!0},polygonEnd:function(){xt=null},result:function(){var e=+bt;return bt.reset(),e}};function lengthPointFirst(e,t){Et.point=lengthPoint,St=wt=e,Ct=Tt=t}function lengthPoint(e,t){wt-=e,Tt-=t,bt.add(B(wt*wt+Tt*Tt)),wt=e,Tt=t}function PathString(){this._string=[]}PathString.prototype={_radius:4.5,_circle:circle(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push(`Z`),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push(`M`,e,`,`,t),this._point=1;break;case 1:this._string.push(`L`,e,`,`,t);break;default:this._circle??=circle(this._radius),this._string.push(`M`,e,`,`,t,this._circle);break}},result:function(){if(this._string.length){var e=this._string.join(``);return this._string=[],e}else return null}};function circle(e){return`m0,`+e+`a`+e+`,`+e+` 0 1,1 0,`+-2*e+`a`+e+`,`+e+` 0 1,1 0,`+2*e+`z`}function path_default(e,t){var n=4.5,s,c;function path(e){return e&&(typeof n==`function`&&c.pointRadius(+n.apply(this,arguments)),stream_default(e,s(c))),c.result()}return path.area=function(e){return stream_default(e,s(et)),et.result()},path.measure=function(e){return stream_default(e,s(Et)),Et.result()},path.bounds=function(e){return stream_default(e,s(at)),at.result()},path.centroid=function(e){return stream_default(e,s(yt)),yt.result()},path.projection=function(t){return arguments.length?(s=t==null?(e=null,identity_default$2):(e=t).stream,path):e},path.context=function(e){return arguments.length?(c=e==null?(t=null,new PathString):new PathContext(t=e),typeof n!=`function`&&c.pointRadius(n),path):t},path.pointRadius=function(e){return arguments.length?(n=typeof e==`function`?e:(c.pointRadius(+e),+e),path):n},path.projection(e).context(t)}__name(path_default,`default`);function transform_default$1(e){return{stream:transformer(e)}}__name(transform_default$1,`default`);function transformer(e){return function(t){var n=new TransformStream;for(var s in e)n[s]=e[s];return n.stream=t,n}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fit(e,t,n){var s=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),s!=null&&e.clipExtent(null),stream_default(n,e.stream(at)),t(at.result()),s!=null&&e.clipExtent(s),e}function fitExtent$1(e,t,n){return fit(e,function(n){var s=t[1][0]-t[0][0],c=t[1][1]-t[0][1],l=Math.min(s/(n[1][0]-n[0][0]),c/(n[1][1]-n[0][1])),d=+t[0][0]+(s-l*(n[1][0]+n[0][0]))/2,f=+t[0][1]+(c-l*(n[1][1]+n[0][1]))/2;e.scale(150*l).translate([d,f])},n)}__name(fitExtent$1,`fitExtent`);function fitSize$1(e,t,n){return fitExtent$1(e,[[0,0],t],n)}__name(fitSize$1,`fitSize`);function fitWidth(e,t,n){return fit(e,function(n){var s=+t,c=s/(n[1][0]-n[0][0]),l=(s-c*(n[1][0]+n[0][0]))/2,d=-c*n[0][1];e.scale(150*c).translate([l,d])},n)}function fitHeight(e,t,n){return fit(e,function(n){var s=+t,c=s/(n[1][1]-n[0][1]),l=-c*n[0][0],d=(s-c*(n[1][1]+n[0][1]))/2;e.scale(150*c).translate([l,d])},n)}var Dt=16,Ot=P(30*A);function resample_default(e,t){return+t?resample(e,t):resampleNone(e)}__name(resample_default,`default`);function resampleNone(e){return transformer({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function resample(e,t){function resampleLineTo(n,s,c,l,d,f,p,m,h,g,_,v,y,b){var x=p-n,S=m-s,C=x*x+S*S;if(C>4*t&&y--){var T=l+g,E=d+_,D=f+v,O=B(T*T+E*E+D*D),k=asin(D/=O),A=j(j(D)-1)<1e-6||j(c-h)<1e-6?(c+h)/2:N(E,T),M=e(A,k),P=M[0],I=M[1],ee=P-n,te=I-s,ne=S*ee-x*te;(ne*ne/C>t||j((x*ee+S*te)/C-.5)>.3||l*g+d*_+f*v<Ot)&&(resampleLineTo(n,s,c,l,d,f,P,I,A,T/=O,E/=O,D,y,b),b.point(P,I),resampleLineTo(P,I,A,T,E,D,p,m,h,g,_,v,y,b))}}return function(t){var n,s,c,l,d,f,p,m,h,g,_,v,y={point,lineStart,lineEnd,polygonStart:function(){t.polygonStart(),y.lineStart=ringStart},polygonEnd:function(){t.polygonEnd(),y.lineStart=lineStart}};function point(n,s){n=e(n,s),t.point(n[0],n[1])}function lineStart(){m=NaN,y.point=linePoint,t.lineStart()}function linePoint(n,s){var c=cartesian([n,s]),l=e(n,s);resampleLineTo(m,h,p,g,_,v,m=l[0],h=l[1],p=n,g=c[0],_=c[1],v=c[2],Dt,t),t.point(m,h)}function lineEnd(){y.point=point,t.lineEnd()}function ringStart(){lineStart(),y.point=ringPoint,y.lineEnd=ringEnd}function ringPoint(e,t){linePoint(n=e,t),s=m,c=h,l=g,d=_,f=v,y.point=linePoint}function ringEnd(){resampleLineTo(m,h,p,g,_,v,s,c,n,l,d,f,Dt,t),y.lineEnd=lineEnd,lineEnd()}return y}}var kt=transformer({point:function(e,t){this.stream.point(e*A,t*A)}});function transformRotate(e){return transformer({point:function(t,n){var s=e(t,n);return this.stream.point(s[0],s[1])}})}function scaleTranslate(e,t,n,s,c){function transform(l,d){return l*=s,d*=c,[t+e*l,n-e*d]}return transform.invert=function(l,d){return[(l-t)/e*s,(n-d)/e*c]},transform}function scaleTranslateRotate(e,t,n,s,c,l){var d=P(l),f=R(l),p=d*e,m=f*e,h=d/e,g=f/e,_=(f*n-d*t)/e,v=(f*t+d*n)/e;function transform(e,l){return e*=s,l*=c,[p*e-m*l+t,n-m*e-p*l]}return transform.invert=function(e,t){return[s*(h*e-g*t+_),c*(v-g*e-h*t)]},transform}function projection(e){return projectionMutator(function(){return e})()}function projectionMutator(e){var t,n=150,s=480,c=250,l=0,d=0,f=0,p=0,m=0,h,g=0,_=1,v=1,y=null,b=Le,x=null,S,C,T,E=identity_default$2,D=.5,O,j,M,N,P;function projection(e){return M(e[0]*A,e[1]*A)}function invert(e){return e=M.invert(e[0],e[1]),e&&[e[0]*k,e[1]*k]}projection.stream=function(e){return N&&P===e?N:N=kt(transformRotate(h)(b(O(E(P=e)))))},projection.preclip=function(e){return arguments.length?(b=e,y=void 0,reset()):b},projection.postclip=function(e){return arguments.length?(E=e,x=S=C=T=null,reset()):E},projection.clipAngle=function(e){return arguments.length?(b=+e?circle_default(y=e*A):(y=null,Le),reset()):y*k},projection.clipExtent=function(e){return arguments.length?(E=e==null?(x=S=C=T=null,identity_default$2):clipRectangle(x=+e[0][0],S=+e[0][1],C=+e[1][0],T=+e[1][1]),reset()):x==null?null:[[x,S],[C,T]]},projection.scale=function(e){return arguments.length?(n=+e,recenter()):n},projection.translate=function(e){return arguments.length?(s=+e[0],c=+e[1],recenter()):[s,c]},projection.center=function(e){return arguments.length?(l=e[0]%360*A,d=e[1]%360*A,recenter()):[l*k,d*k]},projection.rotate=function(e){return arguments.length?(f=e[0]%360*A,p=e[1]%360*A,m=e.length>2?e[2]%360*A:0,recenter()):[f*k,p*k,m*k]},projection.angle=function(e){return arguments.length?(g=e%360*A,recenter()):g*k},projection.reflectX=function(e){return arguments.length?(_=e?-1:1,recenter()):_<0},projection.reflectY=function(e){return arguments.length?(v=e?-1:1,recenter()):v<0},projection.precision=function(e){return arguments.length?(O=resample_default(j,D=e*e),reset()):B(D)},projection.fitExtent=function(e,t){return fitExtent$1(projection,e,t)},projection.fitSize=function(e,t){return fitSize$1(projection,e,t)},projection.fitWidth=function(e,t){return fitWidth(projection,e,t)},projection.fitHeight=function(e,t){return fitHeight(projection,e,t)};function recenter(){var e=scaleTranslateRotate(n,0,0,_,v,g).apply(null,t(l,d)),y=(g?scaleTranslateRotate:scaleTranslate)(n,s-e[0],c-e[1],_,v,g);return h=rotateRadians(f,p,m),j=compose_default(t,y),M=compose_default(h,j),O=resample_default(j,D),reset()}function reset(){return N=P=null,projection}return function(){return t=e.apply(this,arguments),projection.invert=t.invert&&invert,recenter()}}function conicProjection(e){var t=0,n=T/3,s=projectionMutator(e),c=s(t,n);return c.parallels=function(e){return arguments.length?s(t=e[0]*A,n=e[1]*A):[t*k,n*k]},c}function cylindricalEqualAreaRaw(e){var t=P(e);function forward(e,n){return[e*t,R(n)/t]}return forward.invert=function(e,n){return[e/t,asin(n*t)]},forward}function conicEqualAreaRaw(e,t){var n=R(e),s=(n+R(t))/2;if(j(s)<1e-6)return cylindricalEqualAreaRaw(e);var c=1+n*(2*s-n),l=B(c)/s;function project(e,t){var n=B(c-2*s*R(t))/s;return[n*R(e*=s),l-n*P(e)]}return project.invert=function(e,t){var n=l-t,d=N(e,j(n))*z(n);return n*s<0&&(d-=T*z(e)*z(n)),[d/s,asin((c-(e*e+n*n)*s*s)/(2*s))]},project}function conicEqualArea_default(){return conicProjection(conicEqualAreaRaw).scale(155.424).center([0,33.6442])}__name(conicEqualArea_default,`default`);function albers_default(){return conicEqualArea_default().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}__name(albers_default,`default`);function multiplex$1(e){var t=e.length;return{point:function(n,s){for(var c=-1;++c<t;)e[c].point(n,s)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}__name(multiplex$1,`multiplex`),__name(albersUsa_default,`default`);function albersUsa_default(){var e,t,n=albers_default(),s,c=conicEqualArea_default().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l,d=conicEqualArea_default().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f,p,m={point:function(e,t){p=[e,t]}};function albersUsa(e){var t=e[0],n=e[1];return p=null,(s.point(t,n),p)||(l.point(t,n),p)||(f.point(t,n),p)}albersUsa.invert=function(e){var t=n.scale(),s=n.translate(),l=(e[0]-s[0])/t,f=(e[1]-s[1])/t;return(f>=.12&&f<.234&&l>=-.425&&l<-.214?c:f>=.166&&f<.234&&l>=-.214&&l<-.115?d:n).invert(e)},albersUsa.stream=function(s){return e&&t===s?e:e=multiplex$1([n.stream(t=s),c.stream(s),d.stream(s)])},albersUsa.precision=function(e){return arguments.length?(n.precision(e),c.precision(e),d.precision(e),reset()):n.precision()},albersUsa.scale=function(e){return arguments.length?(n.scale(e),c.scale(e*.35),d.scale(e),albersUsa.translate(n.translate())):n.scale()},albersUsa.translate=function(e){if(!arguments.length)return n.translate();var t=n.scale(),p=+e[0],h=+e[1];return s=n.translate(e).clipExtent([[p-.455*t,h-.238*t],[p+.455*t,h+.238*t]]).stream(m),l=c.translate([p-.307*t,h+.201*t]).clipExtent([[p-.425*t+C,h+.12*t+C],[p-.214*t-C,h+.234*t-C]]).stream(m),f=d.translate([p-.205*t,h+.212*t]).clipExtent([[p-.214*t+C,h+.166*t+C],[p-.115*t-C,h+.234*t-C]]).stream(m),reset()},albersUsa.fitExtent=function(e,t){return fitExtent$1(albersUsa,e,t)},albersUsa.fitSize=function(e,t){return fitSize$1(albersUsa,e,t)},albersUsa.fitWidth=function(e,t){return fitWidth(albersUsa,e,t)},albersUsa.fitHeight=function(e,t){return fitHeight(albersUsa,e,t)};function reset(){return e=t=null,albersUsa}return albersUsa.scale(1070)}function azimuthalRaw(e){return function(t,n){var s=P(t),c=P(n),l=e(s*c);return[l*c*R(t),l*R(n)]}}function azimuthalInvert(e){return function(t,n){var s=B(t*t+n*n),c=e(s),l=R(c),d=P(c);return[N(t*l,s*d),asin(s&&n*l/s)]}}var At=azimuthalRaw(function(e){return B(2/(1+e))});At.invert=azimuthalInvert(function(e){return 2*asin(e/2)});function azimuthalEqualArea_default(){return projection(At).scale(124.75).clipAngle(179.999)}__name(azimuthalEqualArea_default,`default`);var jt=azimuthalRaw(function(e){return(e=acos(e))&&e/R(e)});jt.invert=azimuthalInvert(function(e){return e});function azimuthalEquidistant_default(){return projection(jt).scale(79.4188).clipAngle(179.999)}__name(azimuthalEquidistant_default,`default`);function mercatorRaw(e,t){return[e,te(re((E+t)/2))]}mercatorRaw.invert=function(e,t){return[e,2*M(ee(t))-E]};function mercator_default(){return mercatorProjection(mercatorRaw).scale(961/O)}__name(mercator_default,`default`);function mercatorProjection(e){var t=projection(e),n=t.center,s=t.scale,c=t.translate,l=t.clipExtent,d=null,f,p,m;t.scale=function(e){return arguments.length?(s(e),reclip()):s()},t.translate=function(e){return arguments.length?(c(e),reclip()):c()},t.center=function(e){return arguments.length?(n(e),reclip()):n()},t.clipExtent=function(e){return arguments.length?(e==null?d=f=p=m=null:(d=+e[0][0],f=+e[0][1],p=+e[1][0],m=+e[1][1]),reclip()):d==null?null:[[d,f],[p,m]]};function reclip(){var n=T*s(),c=t(rotation_default(t.rotate()).invert([0,0]));return l(d==null?[[c[0]-n,c[1]-n],[c[0]+n,c[1]+n]]:e===mercatorRaw?[[Math.max(c[0]-n,d),f],[Math.min(c[0]+n,p),m]]:[[d,Math.max(c[1]-n,f)],[p,Math.min(c[1]+n,m)]])}return reclip()}function tany(e){return re((E+e)/2)}function conicConformalRaw(e,t){var n=P(e),s=e===t?R(e):te(n/P(t))/te(tany(t)/tany(e)),c=n*ne(tany(e),s)/s;if(!s)return mercatorRaw;function project(e,t){c>0?t<-E+1e-6&&(t=-E+C):t>E-1e-6&&(t=E-C);var n=c/ne(tany(t),s);return[n*R(s*e),c-n*P(s*e)]}return project.invert=function(e,t){var n=c-t,l=z(s)*B(e*e+n*n),d=N(e,j(n))*z(n);return n*s<0&&(d-=T*z(e)*z(n)),[d/s,2*M(ne(c/l,1/s))-E]},project}function conicConformal_default(){return conicProjection(conicConformalRaw).scale(109.5).parallels([30,30])}__name(conicConformal_default,`default`);function equirectangularRaw(e,t){return[e,t]}equirectangularRaw.invert=equirectangularRaw;function equirectangular_default(){return projection(equirectangularRaw).scale(152.63)}__name(equirectangular_default,`default`);function conicEquidistantRaw(e,t){var n=P(e),s=e===t?R(e):(n-P(t))/(t-e),c=n/s+e;if(j(s)<1e-6)return equirectangularRaw;function project(e,t){var n=c-t,l=s*e;return[n*R(l),c-n*P(l)]}return project.invert=function(e,t){var n=c-t,l=N(e,j(n))*z(n);return n*s<0&&(l-=T*z(e)*z(n)),[l/s,c-z(s)*B(e*e+n*n)]},project}function conicEquidistant_default(){return conicProjection(conicEquidistantRaw).scale(131.154).center([0,13.9389])}__name(conicEquidistant_default,`default`);var Mt=1.340264,Nt=-.081106,Pt=893e-6,Ft=.003796,It=B(3)/2,Lt=12;function equalEarthRaw(e,t){var n=asin(It*R(t)),s=n*n,c=s*s*s;return[e*P(n)/(It*(Mt+3*Nt*s+c*(7*Pt+9*Ft*s))),n*(Mt+Nt*s+c*(Pt+Ft*s))]}equalEarthRaw.invert=function(e,t){for(var n=t,s=n*n,c=s*s*s,l=0,d,f,p;l<Lt&&(f=n*(Mt+Nt*s+c*(Pt+Ft*s))-t,p=Mt+3*Nt*s+c*(7*Pt+9*Ft*s),n-=d=f/p,s=n*n,c=s*s*s,!(j(d)<1e-12));++l);return[It*e*(Mt+3*Nt*s+c*(7*Pt+9*Ft*s))/P(n),asin(R(n)/It)]};function equalEarth_default(){return projection(equalEarthRaw).scale(177.158)}__name(equalEarth_default,`default`);function gnomonicRaw(e,t){var n=P(t),s=P(e)*n;return[n*R(e)/s,R(t)/s]}gnomonicRaw.invert=azimuthalInvert(M);function gnomonic_default(){return projection(gnomonicRaw).scale(144.049).clipAngle(60)}__name(gnomonic_default,`default`);function identity_default$1(){var e=1,t=0,n=0,s=1,c=1,l=0,d,f,p=null,m,h,g,_=1,v=1,y=transformer({point:function(e,t){var n=projection([e,t]);this.stream.point(n[0],n[1])}}),b=identity_default$2,x,S;function reset(){return _=e*s,v=e*c,x=S=null,projection}function projection(e){var s=e[0]*_,c=e[1]*v;if(l){var p=c*d-s*f;s=s*d+c*f,c=p}return[s+t,c+n]}return projection.invert=function(e){var s=e[0]-t,c=e[1]-n;if(l){var p=c*d+s*f;s=s*d-c*f,c=p}return[s/_,c/v]},projection.stream=function(e){return x&&S===e?x:x=y(b(S=e))},projection.postclip=function(e){return arguments.length?(b=e,p=m=h=g=null,reset()):b},projection.clipExtent=function(e){return arguments.length?(b=e==null?(p=m=h=g=null,identity_default$2):clipRectangle(p=+e[0][0],m=+e[0][1],h=+e[1][0],g=+e[1][1]),reset()):p==null?null:[[p,m],[h,g]]},projection.scale=function(t){return arguments.length?(e=+t,reset()):e},projection.translate=function(e){return arguments.length?(t=+e[0],n=+e[1],reset()):[t,n]},projection.angle=function(e){return arguments.length?(l=e%360*A,f=R(l),d=P(l),reset()):l*k},projection.reflectX=function(e){return arguments.length?(s=e?-1:1,reset()):s<0},projection.reflectY=function(e){return arguments.length?(c=e?-1:1,reset()):c<0},projection.fitExtent=function(e,t){return fitExtent$1(projection,e,t)},projection.fitSize=function(e,t){return fitSize$1(projection,e,t)},projection.fitWidth=function(e,t){return fitWidth(projection,e,t)},projection.fitHeight=function(e,t){return fitHeight(projection,e,t)},projection}__name(identity_default$1,`default`);function naturalEarth1Raw(e,t){var n=t*t,s=n*n;return[e*(.8707-.131979*n+s*(-.013791+s*(.003971*n-.001529*s))),t*(1.007226+n*(.015085+s*(-.044475+.028874*n-.005916*s)))]}naturalEarth1Raw.invert=function(e,t){var n=t,s=25,c;do{var l=n*n,d=l*l;n-=c=(n*(1.007226+l*(.015085+d*(-.044475+.028874*l-.005916*d)))-t)/(1.007226+l*(.015085*3+d*(-.044475*7+.028874*9*l-.005916*11*d)))}while(j(c)>1e-6&&--s>0);return[e/(.8707+(l=n*n)*(-.131979+l*(-.013791+l*l*l*(.003971-.001529*l)))),n]};function naturalEarth1_default(){return projection(naturalEarth1Raw).scale(175.295)}__name(naturalEarth1_default,`default`);function orthographicRaw(e,t){return[P(t)*R(e),R(t)]}orthographicRaw.invert=azimuthalInvert(asin);function orthographic_default(){return projection(orthographicRaw).scale(249.5).clipAngle(90+C)}__name(orthographic_default,`default`);function stereographicRaw(e,t){var n=P(t),s=1+P(e)*n;return[n*R(e)/s,R(t)/s]}stereographicRaw.invert=azimuthalInvert(function(e){return 2*M(e)});function stereographic_default(){return projection(stereographicRaw).scale(250).clipAngle(142)}__name(stereographic_default,`default`);function transverseMercatorRaw(e,t){return[te(re((E+t)/2)),-e]}transverseMercatorRaw.invert=function(e,t){return[-t,2*M(ee(e))-E]};function transverseMercator_default(){var e=mercatorProjection(transverseMercatorRaw),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90]).scale(159.155)}__name(transverseMercator_default,`default`);var Rt=__exportAll({geoAlbers:()=>albers_default,geoAlbersUsa:()=>albersUsa_default,geoArea:()=>area_default,geoAzimuthalEqualArea:()=>azimuthalEqualArea_default,geoAzimuthalEqualAreaRaw:()=>At,geoAzimuthalEquidistant:()=>azimuthalEquidistant_default,geoAzimuthalEquidistantRaw:()=>jt,geoBounds:()=>bounds_default,geoCentroid:()=>centroid_default,geoCircle:()=>circle_default$1,geoClipAntimeridian:()=>Le,geoClipCircle:()=>circle_default,geoClipExtent:()=>extent_default,geoClipRectangle:()=>clipRectangle,geoConicConformal:()=>conicConformal_default,geoConicConformalRaw:()=>conicConformalRaw,geoConicEqualArea:()=>conicEqualArea_default,geoConicEqualAreaRaw:()=>conicEqualAreaRaw,geoConicEquidistant:()=>conicEquidistant_default,geoConicEquidistantRaw:()=>conicEquidistantRaw,geoContains:()=>contains_default,geoDistance:()=>distance_default,geoEqualEarth:()=>equalEarth_default,geoEqualEarthRaw:()=>equalEarthRaw,geoEquirectangular:()=>equirectangular_default,geoEquirectangularRaw:()=>equirectangularRaw,geoGnomonic:()=>gnomonic_default,geoGnomonicRaw:()=>gnomonicRaw,geoGraticule:()=>graticule,geoGraticule10:()=>graticule10,geoIdentity:()=>identity_default$1,geoInterpolate:()=>interpolate_default,geoLength:()=>length_default,geoMercator:()=>mercator_default,geoMercatorRaw:()=>mercatorRaw,geoNaturalEarth1:()=>naturalEarth1_default,geoNaturalEarth1Raw:()=>naturalEarth1Raw,geoOrthographic:()=>orthographic_default,geoOrthographicRaw:()=>orthographicRaw,geoPath:()=>path_default,geoProjection:()=>projection,geoProjectionMutator:()=>projectionMutator,geoRotation:()=>rotation_default,geoStereographic:()=>stereographic_default,geoStereographicRaw:()=>stereographicRaw,geoStream:()=>stream_default,geoTransform:()=>transform_default$1,geoTransverseMercator:()=>transverseMercator_default,geoTransverseMercatorRaw:()=>transverseMercatorRaw});function noop(){}var zt=1/0,Bt=zt,Vt=-zt,Ht=Vt;function boundsPoint(e,t){e<zt&&(zt=e),e>Vt&&(Vt=e),t<Bt&&(Bt=t),t>Ht&&(Ht=t)}var Ut={point:boundsPoint,lineStart:noop,lineEnd:noop,polygonStart:noop,polygonEnd:noop,result(){let e=[[zt,Bt],[Vt,Ht]];return Vt=Ht=-(Bt=zt=1/0),e}};function fitExtent(e,t,n){let s=t[1][0]-t[0][0],c=t[1][1]-t[0][1],l=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),l!=null&&e.clipExtent(null),stream_default(n,e.stream(Ut));let d=Ut.result(),f=Math.min(s/(d[1][0]-d[0][0]),c/(d[1][1]-d[0][1])),p=+t[0][0]+(s-f*(d[1][0]+d[0][0]))/2,m=+t[0][1]+(c-f*(d[1][1]+d[0][1]))/2;return l!=null&&e.clipExtent(l),e.scale(f*150).translate([p,m])}function fitSize(e,t,n){return fitExtent(e,[[0,0],t],n)}var Wt=class Geohash{static base32=`0123456789bcdefghjkmnpqrstuvwxyz`;encode(e,t,n){if(n===void 0){for(let n=1;n<=12;n++){let s=this.encode(e,t,n),c=this.decode(s);if(c.lat===e&&c.lon===t)return s}n=12}if(e=Number(e),t=Number(t),n=Number(n),isNaN(e)||isNaN(t)||isNaN(n))throw Error(`Invalid geohash`);let s=0,c=0,l=!0,d=``,f=-90,p=90,m=-180,h=180;for(;d.length<n;){if(l){let e=(m+h)/2;t>e?(s=s*2+1,m=e):(s*=2,h=e)}else{let t=(f+p)/2;e>t?(s=s*2+1,f=t):(s*=2,p=t)}l=!l,++c===5&&(d+=Geohash.base32.charAt(s),c=0,s=0)}return d}decode(e){let t=this.bounds(e),n=t.sw.lat,s=t.sw.lon,c=t.ne.lat,l=t.ne.lon,d=(n+c)/2,f=(s+l)/2;return d=Number(d.toFixed(Math.floor(2-Math.log(c-n)/Math.LN10))),f=Number(f.toFixed(Math.floor(2-Math.log(l-s)/Math.LN10))),{lat:d,lon:f}}bounds(e){if(e.length===0)throw Error(`Invalid geohash`);e=e.toLowerCase();let t=!0,n=-90,s=90,c=-180,l=180;for(let d=0;d<e.length;d++){let f=e.charAt(d),p=Geohash.base32.indexOf(f);if(p===-1)throw Error(`Invalid geohash`);for(let e=4;e>=0;e--){let d=p>>e&1;if(t){let e=(c+l)/2;d===1?c=e:l=e}else{let e=(n+s)/2;d===1?n=e:s=e}t=!t}}return{sw:{lat:n,lon:c},ne:{lat:s,lon:l}}}adjacent(e,t){if(e=e.toLowerCase(),t=t.toLowerCase(),e.length===0)throw Error(`Invalid geohash`);if(`nsew`.indexOf(t)===-1)throw Error(`Invalid direction`);let n={n:[`p0r21436x8zb9dcf5h7kjnmqesgutwvy`,`bc01fg45238967deuvhjyznpkmstqrwx`],s:[`14365h7k9dcfesgujnmqp0r2twvyx8zb`,`238967debc01fg45kmstqrwxuvhjyznp`],e:[`bc01fg45238967deuvhjyznpkmstqrwx`,`p0r21436x8zb9dcf5h7kjnmqesgutwvy`],w:[`238967debc01fg45kmstqrwxuvhjyznp`,`14365h7k9dcfesgujnmqp0r2twvyx8zb`]},s={n:[`prxz`,`bcfguvyz`],s:[`028b`,`0145hjnp`],e:[`bcfguvyz`,`prxz`],w:[`0145hjnp`,`028b`]},c=e.slice(-1),l=e.slice(0,-1),d=e.length%2;return s[t][d].indexOf(c)!==-1&&l!==``&&(l=this.adjacent(l,t)),l+Geohash.base32.charAt(n[t][d].indexOf(c))}neighbours(e){return{n:this.adjacent(e,`n`),ne:this.adjacent(this.adjacent(e,`n`),`e`),e:this.adjacent(e,`e`),se:this.adjacent(this.adjacent(e,`s`),`e`),s:this.adjacent(e,`s`),sw:this.adjacent(this.adjacent(e,`s`),`w`),w:this.adjacent(e,`w`),nw:this.adjacent(this.adjacent(e,`n`),`w`)}}contained(e,t,n,s,c){(isNaN(t)||t>=90)&&(t=89),(isNaN(n)||n>180)&&(n=180),(isNaN(s)||s<=-90)&&(s=-89),(isNaN(e)||e<-180)&&(e=-180),c||=1;let l=this.encode(t,e,c),d=this.encode(t,n,c),f=this.encode(s,n,c),p=l,m=0,h=-1,g=[l,f],_=this.adjacent(l,`e`);for(;_!==f;)g.push(_),++m,_===d||h===m?(h=m+1,m=0,_=this.adjacent(p,`s`),p=_):_=this.adjacent(_,`e`);return g}calculateWidthDegrees(e){let t;return t=e%2==0?-1:-.5,180/2**(2.5*e+t)}width(e){let t=e%2;return 180/(2^(5*e+t)/2-1)}};function multiplex(e){let t=e.length;return{point(n,s){let c=-1;for(;++c<t;)e[c].point(n,s)},sphere(){let n=-1;for(;++n<t;)e[n].sphere()},lineStart(){let n=-1;for(;++n<t;)e[n].lineStart()},lineEnd(){let n=-1;for(;++n<t;)e[n].lineEnd()},polygonStart(){let n=-1;for(;++n<t;)e[n].polygonStart()},polygonEnd(){let n=-1;for(;++n<t;)e[n].polygonEnd()}}}function albersUsaPr(){let e,t,n=1e-6,s=albers_default(),c,l=conicEqualArea_default().rotate([154,0]).center([-2,58.5]).parallels([55,65]),d,f=conicEqualArea_default().rotate([157,0]).center([-3,19.9]).parallels([8,18]),p,m=conicEqualArea_default().rotate([66,0]).center([0,18]).parallels([8,18]),h,g,_={point:(e,t)=>{g=[e,t]}},albersUsa=function(e){let t=e[0],n=e[1];return g=null,(c.point(t,n),g)||(d.point(t,n),g)||(p.point(t,n),g)||h.point(t,n),g};albersUsa.invert=function(e){let t=s.scale(),n=s.translate(),c=(e[0]-n[0])/t,d=(e[1]-n[1])/t;return(d>=.12&&d<.234&&c>=-.425&&c<-.214?l:d>=.166&&d<.234&&c>=-.214&&c<-.115?f:d>=.204&&d<.234&&c>=.32&&c<.38?m:s).invert(e)},albersUsa.stream=function(n){return e&&t===n?e:e=multiplex([s.stream(t=n),l.stream(n),f.stream(n),m.stream(n)])},albersUsa.precision=function(e){return arguments.length?(s.precision(e),l.precision(e),f.precision(e),m.precision(e),reset()):s.precision()},albersUsa.scale=function(e){return arguments.length?(s.scale(e),l.scale(e*.35),f.scale(e),m.scale(e),albersUsa.translate(s.translate())):s.scale()},albersUsa.translate=function(e){if(!arguments.length)return s.translate();let t=s.scale(),g=+e[0],v=+e[1];return c=s.translate(e).clipExtent([[g-.455*t,v-.238*t],[g+.455*t,v+.238*t]]).stream(_),d=l.translate([g-.307*t,v+.201*t]).clipExtent([[g-.425*t+n,v+.12*t+n],[g-.214*t-n,v+.234*t-n]]).stream(_),p=f.translate([g-.205*t,v+.212*t]).clipExtent([[g-.214*t+n,v+.166*t+n],[g-.115*t-n,v+.234*t-n]]).stream(_),h=m.translate([g+.35*t,v+.224*t]).clipExtent([[g+.32*t,v+.204*t],[g+.38*t,v+.234*t]]).stream(_),reset()},albersUsa.fitExtent=function(e,t){return fitExtent(albersUsa,e,t)},albersUsa.fitSize=function(e,t){return fitSize(albersUsa,e,t)};function reset(){return e=t=null,albersUsa}return albersUsa.scale(1070)}var Gt=function(e){return e[e.AzimuthalEqualArea=0]=`AzimuthalEqualArea`,e[e.AzimuthalEquidistant=1]=`AzimuthalEquidistant`,e[e.Gnomonic=2]=`Gnomonic`,e[e.Orthographic=3]=`Orthographic`,e[e.Stereographic=4]=`Stereographic`,e[e.AlbersUsa=5]=`AlbersUsa`,e[e.AlbersUsaPr=6]=`AlbersUsaPr`,e[e.Albers=7]=`Albers`,e[e.ConicConformal=8]=`ConicConformal`,e[e.ConicEqualArea=9]=`ConicEqualArea`,e[e.ConicEquidistant=10]=`ConicEquidistant`,e[e.Equirectangular=11]=`Equirectangular`,e[e.Mercator=12]=`Mercator`,e[e.TransverseMercator=13]=`TransverseMercator`,e}(Gt||{}),Kt=[],qt={};for(let e in Gt)typeof e==`string`&&(Kt.push(e),e===`AlbersUsaPr`?qt[e]=albersUsaPr:qt[e]=Rt[`geo${e}`]);function resolve(e){let t=qt[e];return t?t():(console.warn(`Unknown projection: `+e),mercator_default())}var Jt=4096/2/Math.PI,Layered=class extends t.SVGZoomWidget{_autoScaleOnNextRender;_layersTarget;_prevAutoScaleMode;_d3GeoProjection;constructor(){super(),this._drawStartPos=`origin`,this.projection(`Mercator`)}data(e){let t=super.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),t}enter(e,t){super.enter(e,t),this._layersTarget=this._renderElement.append(`g`).attr(`class`,`layersTarget`)}update(e,n){super.update(e,n);let s=this._layersTarget.selectAll(`.layerContainer`).data(this.layers().filter(function(e){return e.visible()}),function(e){return e.id()}),c=this;s.enter().append(`g`).attr(`id`,function(e){return e.id()}).attr(`class`,`layerContainer`).each(function(e){e._svgElement=(0,t.select)(this),e._domElement=c._parentOverlay.append(`div`),e.layerEnter(c,e._svgElement,e._domElement)}).merge(s).each(function(e){e.layerUpdate(c)}),s.exit().each(function(e){e.layerExit(c),e._domElement.remove()}).remove(),s.order(),this.onZoomed()}exit(e,t){super.exit(e,t)}onZoomed(){super.onZoomed();let e=this._layersTarget.selectAll(`.layerContainer`),t=this;e.each(function(e){e.layerZoomed(t)})}preRender(e){return Promise.all(this.layers().filter(function(e){return e.visible()}).map(function(e){return e.layerPreRender()}))}render(e){let n=this;return this.preRender().then(function(){t.SVGZoomWidget.prototype.render.call(n,function(t){n._layersTarget&&(n._renderCount&&n._autoScaleOnNextRender||n._prevAutoScaleMode!==n.autoScaleMode())?(n._prevAutoScaleMode=n.autoScaleMode(),n._autoScaleOnNextRender=!1,n.autoScale(),e&&e(t)):e&&e(t)})}),this}project(e,t){return e>=90?e=89:e<=-90&&(e=-89),this._d3GeoProjection([t,e])}invert(e,t){return this._d3GeoProjection.invert([e,t])}getBounds(){let e=this._layersTarget.node().getBBox();return{x:e.x,y:e.y,width:e.width,height:e.height}}autoScale(){switch(this.autoScaleMode()){case`none`:return;case`all`:this.zoomToBBox(this.getBounds());break}}};Layered.prototype._class+=` map_Layered`,Layered.prototype.publish(`projection`,null,`set`,`Map projection type`,Kt),Layered.prototype.publish(`centerLat`,0,`number`,`Center Latitude`,null,{tags:[`Basic`]}),Layered.prototype.publish(`centerLong`,0,`number`,`Center Longitude`,null,{tags:[`Basic`]}),Layered.prototype.publish(`zoom`,1,`number`,`Zoom Level`,null,{tags:[`Basic`]}),Layered.prototype.publish(`autoScaleMode`,`all`,`set`,`Auto Scale`,[`none`,`all`],{tags:[`Basic`]}),Layered.prototype.publish(`layers`,[],`widgetArray`,`Layers`,null,{render:!1});var Yt=Layered.prototype.projection;Layered.prototype.projection=function(e){let t=Yt.apply(this,arguments);if(arguments.length){switch(this._d3GeoProjection=resolve(e).scale(Jt).translate([0,0]),e){case`orthographic`:this._d3GeoProjection.clipAngle(90).rotate([0,0])}this._d3GeoPath=path_default().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return t};var Layer=class extends Layered{_svgElement;_domElement;_topoJsonPromise;constructor(){super(),n.ITooltip.call(this)}svgGlowID(){return``}layerEnter(e,t,n){this._parentOverlay=e._parentOverlay}enter(e,t){super.enter(e,t),this._svgElement=this._layersTarget.append(`g`),this._domElement=this._parentOverlay.append(`div`),this.layerEnter(this,this._svgElement,this._domElement)}layerUpdate(e,t){}update(e,t){super.update(e,t),this.layerUpdate(this)}onZoomed(){super.onZoomed(),this.layerUpdate(this)}layerExit(e){}exit(e,t){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),super.exit(e,t)}layerPreRender(){return Promise.resolve()}render(e){let t=this,n=arguments;return this.layerPreRender().then(function(){Layered.prototype.render.apply(t,n)}),this}layerZoomed(e){}};Layer.prototype._class+=` map_Layer`,Layer.prototype.implements(n.ITooltip.prototype);var CanvasPinLayer=class extends Layer{_pinsTransform;pins;_prevProjection;constructor(){super(),this.pins=new CanvasPins}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style(`pointer-events`,`none`),this._pinsTransform=n.style(`pointer-events`,`none`).append(`div`).attr(`class`,this.classID()).style(`width`,e.width()+`px`).style(`height`,e.height()+`px`),this.pins.target(this._pinsTransform.node())}layerUpdate(e){Layer.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style(`opacity`,this.opacity()).style(`width`,e.width()+`px`).style(`height`,e.height()+`px`),this.pins.resize(e.size()),this.layerZoomed(e)}layerExit(e){delete this._prevProjection,this.pins.target(null),delete this.pins}layerZoomed(e){Layer.prototype.layerZoomed.apply(this,arguments);let t=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),s=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map(function(c){let l=t?c[t.idx]:c[0],d=n?c[n.idx]:c[1],f=s?c[s.idx]:1,p=e.zoomTranslate(),m=e.project(l,d),h=e.zoomScale();return m[0]*=h,m[1]*=h,[p[0]+m[0],p[1]+m[1],f]}):[]).render()}};CanvasPinLayer.prototype._class+=` map_CanvasPinLayer`,CanvasPinLayer.prototype.publishProxy(`clusterMode`,`pins`,`clusterMode`),CanvasPinLayer.prototype.publishProxy(`allCircles`,`pins`,`allCircles`),CanvasPinLayer.prototype.publishProxy(`showQuadtree`,`pins`,`showQuadtree`),CanvasPinLayer.prototype.publishProxy(`useAveragePos`,`pins`,`useAveragePos`),CanvasPinLayer.prototype.publishProxy(`shrinkFontToPin`,`pins`,`shrinkFontToPin`),CanvasPinLayer.prototype.publishProxy(`enableClustering`,`pins`,`enableClustering`),CanvasPinLayer.prototype.publishProxy(`useWeightedRadius`,`pins`,`useWeightedRadius`),CanvasPinLayer.prototype.publishProxy(`radiusWeightMult`,`pins`,`radiusWeightMult`),CanvasPinLayer.prototype.publishProxy(`searchRectMult`,`pins`,`searchRectMult`),CanvasPinLayer.prototype.publishProxy(`pinHeight`,`pins`,`pinHeight`),CanvasPinLayer.prototype.publishProxy(`pinWidth`,`pins`,`pinWidth`),CanvasPinLayer.prototype.publishProxy(`pinFontFamily`,`pins`,`pinFontFamily`),CanvasPinLayer.prototype.publishProxy(`pinFontSize`,`pins`,`pinFontSize`),CanvasPinLayer.prototype.publishProxy(`arrowHeight`,`pins`,`arrowHeight`),CanvasPinLayer.prototype.publishProxy(`arrowWidth`,`pins`,`arrowWidth`),CanvasPinLayer.prototype.publish(`latColumn`,null,`set`,`latColumn`,function(){return this.columns()},{optional:!0}),CanvasPinLayer.prototype.publish(`longColumn`,null,`set`,`longColumn`,function(){return this.columns()},{optional:!0}),CanvasPinLayer.prototype.publish(`weightColumn`,null,`set`,`weightColumn`,function(){return this.columns()},{optional:!0}),CanvasPinLayer.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]});function identity_default(e){return e}__name(identity_default,`default`);function transform_default(e){if(e==null)return identity_default;var t,n,s=e.scale[0],c=e.scale[1],l=e.translate[0],d=e.translate[1];return function(e,f){f||(t=n=0);var p=2,m=e.length,h=Array(m);for(h[0]=(t+=e[0])*s+l,h[1]=(n+=e[1])*c+d;p<m;)h[p]=e[p],++p;return h}}__name(transform_default,`default`);function reverse_default(e,t){for(var n,s=e.length,c=s-t;c<--s;)n=e[c],e[c++]=e[s],e[s]=n}__name(reverse_default,`default`);function feature_default(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return feature(e,t)})}:feature(e,t)}__name(feature_default,`default`);function feature(e,t){var n=t.id,s=t.bbox,c=t.properties==null?{}:t.properties,l=object(e,t);return n==null&&s==null?{type:`Feature`,properties:c,geometry:l}:s==null?{type:`Feature`,id:n,properties:c,geometry:l}:{type:`Feature`,id:n,bbox:s,properties:c,geometry:l}}function object(e,t){var n=transform_default(e.transform),s=e.arcs;function arc(e,t){t.length&&t.pop();for(var c=s[e<0?~e:e],l=0,d=c.length;l<d;++l)t.push(n(c[l],l));e<0&&reverse_default(t,d)}function point(e){return n(e)}function line(e){for(var t=[],n=0,s=e.length;n<s;++n)arc(e[n],t);return t.length<2&&t.push(t[0]),t}function ring(e){for(var t=line(e);t.length<4;)t.push(t[0]);return t}function polygon(e){return e.map(ring)}function geometry(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(geometry)};case`Point`:n=point(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(point);break;case`LineString`:n=line(e.arcs);break;case`MultiLineString`:n=e.arcs.map(line);break;case`Polygon`:n=polygon(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(polygon);break;default:return null}return{type:t,coordinates:n}}return geometry(t)}function stitch_default(e,t){var n={},s={},c={},l=[],d=-1;t.forEach(function(n,s){var c=e.arcs[n<0?~n:n],l;c.length<3&&!c[1][0]&&!c[1][1]&&(l=t[++d],t[d]=n,t[s]=l)}),t.forEach(function(e){var t=ends(e),n=t[0],l=t[1],d,f;if(d=c[n])if(delete c[d.end],d.push(e),d.end=l,f=s[l]){delete s[f.start];var p=f===d?d:d.concat(f);s[p.start=d.start]=c[p.end=f.end]=p}else s[d.start]=c[d.end]=d;else if(d=s[l])if(delete s[d.start],d.unshift(e),d.start=n,f=c[n]){delete c[f.end];var m=f===d?d:f.concat(d);s[m.start=f.start]=c[m.end=d.end]=m}else s[d.start]=c[d.end]=d;else d=[e],s[d.start=n]=c[d.end=l]=d});function ends(t){var n=e.arcs[t<0?~t:t],s=n[0],c;return e.transform?(c=[0,0],n.forEach(function(e){c[0]+=e[0],c[1]+=e[1]})):c=n[n.length-1],t<0?[c,s]:[s,c]}function flush(e,t){for(var s in e){var c=e[s];delete t[c.start],delete c.start,delete c.end,c.forEach(function(e){n[e<0?~e:e]=1}),l.push(c)}}return flush(c,s),flush(s,c),t.forEach(function(e){n[e<0?~e:e]||l.push([e])}),l}__name(stitch_default,`default`);function mesh_default(e){return object(e,meshArcs.apply(this,arguments))}__name(mesh_default,`default`);function meshArcs(e,t,n){var s,c,l;if(arguments.length>1)s=extractArcs(e,t,n);else for(c=0,s=Array(l=e.arcs.length);c<l;++c)s[c]=c;return{type:`MultiLineString`,arcs:stitch_default(e,s)}}function extractArcs(e,t,n){var s=[],c=[],l;function extract0(e){var t=e<0?~e:e;(c[t]||(c[t]=[])).push({i:e,g:l})}function extract1(e){e.forEach(extract0)}function extract2(e){e.forEach(extract1)}function extract3(e){e.forEach(extract2)}function geometry(e){switch(l=e,e.type){case`GeometryCollection`:e.geometries.forEach(geometry);break;case`LineString`:extract1(e.arcs);break;case`MultiLineString`:case`Polygon`:extract2(e.arcs);break;case`MultiPolygon`:extract3(e.arcs);break}}return geometry(t),c.forEach(n==null?function(e){s.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&s.push(e[0].i)}),s}var Xt=window.__hpcc_topoJsonFolder||`./node_modules/@hpcc-js/map/TopoJSON`;function topoJsonFolder(e){if(!arguments.length)return Xt;let t=Xt;return Xt=e,t}var Choropleth=class extends Layer{_dataMap={};_path=(0,t.select)(null);_dataMinWeight;_dataMaxWeight;_choroplethData;_choroplethTransform;_choropleth;_choroTopology;_choroTopologyObjects;_prevProjection;_prevInternalOnly;constructor(){super(),t.Utility.SimpleSelectionMixin.call(this)}data(e){let t=Layer.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;let e=this;this.data().forEach(function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])})}return t}getDataBounds(){let e=this._choroplethData.node().getBBox();return{x:e.x,y:e.y,width:e.width,height:e.height}}autoScale(){switch(this.autoScaleMode()){case`none`:return;case`mesh`:this.zoomToBBox(this.getBounds());break;case`data`:this.zoomToBBox(this.getDataBounds());break}}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=t,this._choroplethData=this._choroplethTransform.append(`g`).attr(`class`,`data`),this._choropleth=this._choroplethTransform.append(`path`).attr(`class`,`mesh`)}layerUpdate(e,t){if(Layer.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+`_`+this.id())),this._choroplethTransform.style(`stroke`,this.meshColor()).style(`opacity`,this.opacity()),!this.visible()||!this.meshVisible()){this._choropleth.attr(`d`,``),delete this._prevProjection;return}(t||this._prevProjection!==e.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr(`d`,e._d3GeoPath(mesh_default(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(e,t){return e!==t}:function(e,t){return!0}))),this._prevProjection=e.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style(`stroke-width`,this.meshStrokeWidth()).style(`stroke`,this.meshColor())}layerExit(e){delete this._prevProjection,delete this._prevInternalOnly}layerZoomed(e){super.layerZoomed.apply(this,arguments),this._choroplethData.style(`stroke-width`,this.meshVisible()?`0px`:`${.5/e.zoomScale()}px`)}click(e,t,n){}dblclick(e,t,n){}};Choropleth.prototype._class+=` map_Choropleth`,Choropleth.prototype.mixin(t.Utility.SimpleSelectionMixin),Choropleth.prototype._palette=t.Palette.rainbow(`default`),Choropleth.prototype.publish(`paletteID`,`YlOrRd`,`set`,`Color palette for this widget`,Choropleth.prototype._palette.switch(),{tags:[`Basic`,`Shared`]}),Choropleth.prototype.publish(`useClonedPalette`,!1,`boolean`,`Enable or disable using a cloned palette`,null,{tags:[`Intermediate`,`Shared`]}),Choropleth.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]}),Choropleth.prototype.publish(`meshVisible`,!0,`boolean`,`Mesh Visibility`),Choropleth.prototype.publish(`meshColor`,null,`html-color`,`Stroke Color`,null,{optional:!0}),Choropleth.prototype.publish(`meshStrokeWidth`,.25,`number`,`Stroke Width`),Choropleth.prototype.publish(`internalOnly`,!1,`boolean`,`Internal mesh only`),Choropleth.prototype.publish(`autoScaleMode`,`mesh`,`set`,`Auto Scale`,[`none`,`mesh`,`data`],{tags:[`Basic`],override:!0});function request_default(e,n){var s,c=(0,t.dispatch)(`beforesend`,`progress`,`load`,`error`),l,d=(0,t.map)(),f=new XMLHttpRequest,p=null,m=null,h,g,_=0;typeof XDomainRequest<`u`&&!(`withCredentials`in f)&&/^(http(s)?:)?\/\//.test(e)&&(f=new XDomainRequest),`onload`in f?f.onload=f.onerror=f.ontimeout=respond:f.onreadystatechange=function(e){f.readyState>3&&respond(e)};function respond(e){var t=f.status,n;if(!t&&hasResponse(f)||t>=200&&t<300||t===304){if(h)try{n=h.call(s,f)}catch(e){c.call(`error`,s,e);return}else n=f;c.call(`load`,s,n)}else c.call(`error`,s,e)}if(f.onprogress=function(e){c.call(`progress`,s,e)},s={header:function(e,t){return e=(e+``).toLowerCase(),arguments.length<2?d.get(e):(t==null?d.remove(e):d.set(e,t+``),s)},mimeType:function(e){return arguments.length?(l=e==null?null:e+``,s):l},responseType:function(e){return arguments.length?(g=e,s):g},timeout:function(e){return arguments.length?(_=+e,s):_},user:function(e){return arguments.length<1?p:(p=e==null?null:e+``,s)},password:function(e){return arguments.length<1?m:(m=e==null?null:e+``,s)},response:function(e){return h=e,s},get:function(e,t){return s.send(`GET`,e,t)},post:function(e,t){return s.send(`POST`,e,t)},send:function(t,n,h){return f.open(t,e,!0,p,m),l!=null&&!d.has(`accept`)&&d.set(`accept`,l+`,*/*`),f.setRequestHeader&&d.each(function(e,t){f.setRequestHeader(t,e)}),l!=null&&f.overrideMimeType&&f.overrideMimeType(l),g!=null&&(f.responseType=g),_>0&&(f.timeout=_),h==null&&typeof n==`function`&&(h=n,n=null),h!=null&&h.length===1&&(h=fixCallback(h)),h!=null&&s.on(`error`,h).on(`load`,function(e){h(null,e)}),c.call(`beforesend`,s,f),f.send(n??null),s},abort:function(){return f.abort(),s},on:function(){var e=c.on.apply(c,arguments);return e===c?s:e}},n!=null){if(typeof n!=`function`)throw Error(`invalid callback: `+n);return s.get(n)}return s}__name(request_default,`default`);function fixCallback(e){return function(t,n){e(t==null?n:null)}}function hasResponse(e){var t=e.responseType;return t&&t!==`text`?e.response:e.responseText}function type_default(e,t){return function(n,s){var c=request_default(n).mimeType(e).response(t);if(s!=null){if(typeof s!=`function`)throw Error(`invalid callback: `+s);return c.get(s)}return c}}__name(type_default,`default`);var Zt=type_default(`application/json`,function(e){return JSON.parse(e.responseText)});function dsv_default(e,t){return function(n,s,c){arguments.length<3&&(c=s,s=null);var l=request_default(n).mimeType(e);return l.row=function(e){return arguments.length?l.response(responseOf(t,s=e)):s},l.row(s),c?l.get(c):l}}__name(dsv_default,`default`);function responseOf(e,t){return function(n){return e(n.responseText,t)}}t.csvParse,t.tsvParse;var Qt=null,$t=null,en=null,ChoroplethCountries=class extends Choropleth{_choroTopologyObjectsCountries;_choroTopologyObjectsLand;choroPaths;constructor(){super()}layerEnter(e,n,s){Choropleth.prototype.layerEnter.apply(this,arguments),this._choroTopology=Qt.topology,this._choroTopologyObjectsCountries=Qt.topology.objects.countries,this._choroTopologyObjectsLand=Qt.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=(0,t.select)(null);let c=this;this.tooltipHTML(function(e){return c.tooltipFormat({label:e[0],value:e[1]})})}layerUpdate(e){Choropleth.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style(`stroke`,this.meshVisible()?null:`black`),this.choroPaths=this._choroplethData.selectAll(`.shape`).data(this.visible()?this.data():[],function(e){return e[0]});let t=this;this.choroPaths.enter().append(`path`).attr(`class`,`shape`).attr(`vector-effect`,`non-scaling-stroke`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){t._dataMap[e[0]]&&t.click(t.rowToObj(t._dataMap[e[0]]),`weight`,t._selection.selected(this))}).on(`dblclick`,function(e){t._dataMap[e[0]]&&t.dblclick(t.rowToObj(t._dataMap[e[0]]),`weight`,t._selection.selected(this))}).on(`mouseout.tooltip`,this.tooltip.hide).on(`mousemove.tooltip`,this.tooltip.show).merge(this.choroPaths).attr(`d`,function(t){let n=e._d3GeoPath(en[t[0]]);return n||console.warn(`Unknown Country: `+t),n}).style(`fill`,function(e){return t._palette(e[1],t._dataMinWeight,t._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||=new Promise((e,t)=>{Qt&&e(),Zt(`${topoJsonFolder()}/countries.json`,function(t){Qt=t,$t=feature_default(Qt.topology,Qt.topology.objects.countries).features,en={};for(let e in $t)$t[e].id&&Qt.countryNames[$t[e].id]&&(en[Qt.countryNames[$t[e].id].name]=$t[e]);e()})}),this._topoJsonPromise}};ChoroplethCountries.prototype._class+=` map_ChoroplethCountries`;var ChoroplethContinents=class extends ChoroplethCountries{constructor(){super()}layerEnter(e,t,n){ChoroplethCountries.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand}};ChoroplethContinents.prototype._class+=` map_ChoroplethContinents`;var tn=null,nn=null,rn=null,ChoroplethCounties=class extends Choropleth{static __inputs=[{id:`fips`,type:`string`},{id:`value`,type:`number`}];choroPaths;constructor(){super(),this.projection(`AlbersUsaPr`)}layerEnter(e,n,s){Choropleth.prototype.layerEnter.apply(this,arguments),this._choroTopology=tn.topology,this._choroTopologyObjects=tn.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=(0,t.select)(null);let c=this;this.tooltipHTML(function(e){let t=e[0];return c.tooltipFormat({label:tn.countyNames[t],value:c._dataMap[t]?c._dataMap[t][1]:`N/A`})})}layerUpdate(e){Choropleth.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style(`stroke`,this.meshVisible()?null:`black`),this.choroPaths=this._choroplethData.selectAll(`.shape`).data(this.visible()?this.data():[],function(e){return e[0]});let t=this;this.choroPaths.enter().append(`path`).attr(`class`,`shape`).attr(`vector-effect`,`non-scaling-stroke`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){t.click(t.rowToObj(e),`weight`,t._selection.selected(this))}).on(`dblclick`,function(e){t.dblclick(t.rowToObj(e),`weight`,t._selection.selected(this))}).on(`mouseout.tooltip`,this.tooltip.hide).on(`mousemove.tooltip`,this.tooltip.show).merge(this.choroPaths).attr(`d`,function(t){let n=e._d3GeoPath(rn[t.county]);return n||console.warn(`Unknown US County: `+t.county,t),n}).style(`fill`,function(e){return t._palette(e[1],t._dataMinWeight,t._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||=new Promise((e,t)=>{tn&&e(),Zt(`${topoJsonFolder()}/us-counties.json`,function(t){tn=t,nn=feature_default(tn.topology,tn.topology.objects.counties).features,rn={};for(let e in nn)nn[e].id&&(rn[nn[e].id]=nn[e]);e()})}),this._topoJsonPromise}};ChoroplethCounties.prototype._class+=` map_ChoroplethCounties`,ChoroplethCounties.prototype.publish(`onClickFormatFIPS`,!1,`boolean`,`format FIPS code as a String on Click`);var an=null,sn=null,cn=null,ChoroplethStates=class extends Choropleth{static __inputs=[{id:`state`,type:`string`},{id:`value`,type:`number`}];choroPaths;constructor(){super(),this.projection(`AlbersUsaPr`)}layerEnter(e,n,s){Choropleth.prototype.layerEnter.apply(this,arguments),this._choroTopology=an.topology,this._choroTopologyObjects=an.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=(0,t.select)(null);let c=this;this.tooltipHTML(function(e){let t=cn[e[0]].id;return c.tooltipFormat({label:an.stateNames[t].name,value:e[1]})})}layerUpdate(e){Choropleth.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style(`stroke`,this.meshVisible()?null:`black`),this.choroPaths=this._choroplethData.selectAll(`.shape`).data(this.visible()?this.data():[],function(e){return e[0]});let t=this;this.choroPaths.enter().append(`path`).attr(`class`,`shape`).attr(`vector-effect`,`non-scaling-stroke`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){t.click(t.rowToObj(e),`weight`,t._selection.selected(this))}).on(`dblclick`,function(e){t.dblclick(t.rowToObj(e),`weight`,t._selection.selected(this))}).on(`mouseout.tooltip`,this.tooltip.hide).on(`mousemove.tooltip`,this.tooltip.show).merge(this.choroPaths).attr(`d`,function(t){let n=e._d3GeoPath(cn[t[0]]);return n||console.warn(`Unknown US State: `+t[0]),n}).style(`fill`,function(e){return t._palette(e[1],t._dataMinWeight,t._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){return this._topoJsonPromise||=new Promise((e,t)=>{an&&e(),Zt(`${topoJsonFolder()}/us-states.json`,function(t){an=t,sn=feature_default(an.topology,an.topology.objects.states).features,cn={};for(let e in sn)sn[e].id&&(cn[an.stateNames[sn[e].id].code]=sn[e]);e()})}),this._topoJsonPromise}};ChoroplethStates.prototype._class+=` map_ChoroplethStates`;var ChoroplethStatesHeat=class extends Layered{constructor(){super()}};ChoroplethStatesHeat.prototype._class+=` map_ChoroplethStatesHeat`;var GeoHash=class extends Layer{_dataMinWeight;_dataMaxWeight;geohash;_geoHashTransform;geoHashPaths;constructor(){super()}data(e){let t=Layer.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach(function(e){(!this._dataMinWeight||e[1]<this._dataMinWeight)&&(this._dataMinWeight=e[1]),(!this._dataMaxWeight||e[1]>this._dataMaxWeight)&&(this._dataMaxWeight=e[1])},this)),t}layerEnter(e,n,s){Layer.prototype.layerEnter.apply(this,arguments),this.geohash=new Wt,this._geoHashTransform=n.append(`g`).attr(`class`,`map_GeoHash`),this._selection=new t.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=(0,t.select)(null)}layerUpdate(e){Layer.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+`_`+this.id())),this._geoHashTransform.style(`opacity`,this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(`.data`).data(this.visible()?this.data():[],function(e){return e[0]});let t=this;this.geoHashPaths.enter().append(`path`).attr(`class`,`data`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){t.click(t.rowToObj(e),`weight`,t._selection.selected(this))}).on(`dblclick`,function(e){t.dblclick(t.rowToObj(e),`weight`,t._selection.selected(this))}).merge(this.geoHashPaths).attr(`d`,function(n){let s=t.geohash.bounds(n[0]),c={type:`LineString`,coordinates:[[s.sw.lon,s.ne.lat],[s.ne.lon,s.ne.lat],[s.ne.lon,s.sw.lat],[s.sw.lon,s.sw.lat]]};return e._d3GeoPath(c)}).style(`fill`,function(e){return t._palette(e[1],t._dataMinWeight,t._dataMaxWeight)}),this.geoHashPaths.exit().remove()}click(e,t,n){}dblclick(e,t,n){}};GeoHash.prototype._class+=` map_GeoHash`,GeoHash.prototype._palette=t.Palette.rainbow(`default`),GeoHash.prototype.publish(`paletteID`,`YlOrRd`,`set`,`Color palette for this widget`,GeoHash.prototype._palette.switch(),{tags:[`Basic`,`Shared`]}),GeoHash.prototype.publish(`useClonedPalette`,!1,`boolean`,`Enable or disable using a cloned palette`,null,{tags:[`Intermediate`,`Shared`]}),GeoHash.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]}),GeoHash.prototype.publish(`meshVisible`,!0,`boolean`,`Mesh Visibility`),GeoHash.prototype.publish(`meshColor`,null,`html-color`,`Stroke Color`,null,{optional:!0}),GeoHash.prototype.publish(`meshStrokeWidth`,.25,`number`,`Stroke Width`);var ln=class Loader{constructor(e=null,t={}){if(this.apiKey=e,this.options=t,typeof window>`u`)throw Error(`google-maps is supported only in browser environment`)}load(){return this.api===void 0?this.loader===void 0?(window[Loader.CALLBACK_NAME]=()=>{if(this.api=window.google,this.resolve===void 0)throw Error(`Should not happen`);this.resolve(this.api)},window.gm_authFailure=()=>{if(this.reject===void 0)throw Error(`Should not happen`);this.reject(Error(`google-maps: authentication error`))},this.loader=new Promise((e,t)=>{this.resolve=e,this.reject=t;let n=document.createElement(`script`);n.src=this.createUrl(),n.async=!0,n.onerror=e=>t(e),document.head.appendChild(n)})):this.loader:Promise.resolve(this.api)}createUrl(){let e=[`callback=${Loader.CALLBACK_NAME}`];this.apiKey&&e.push(`key=${this.apiKey}`);for(let t in this.options)if(this.options.hasOwnProperty(t)){let n=this.options[t];t===`version`&&(t=`v`),t===`libraries`&&(n=n.join(`,`)),e.push(`${t}=${n}`)}return`https://maps.googleapis.com/maps/api/js?${e.join(`&`)}`}};ln.CALLBACK_NAME=`_dk_google_maps_loader_cb`;var Y=null,un=15e3;function requireGoogleMapTimeout(e){un=e}var dn;function requireGoogleMap(e){return dn||=(0,c.promiseTimeout)(un,new Promise(function(t,n){if(Y)t();else if(e)Y=e,t();else{window.__hpcc_gmap_apikey||console.warn(`__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)`);try{new ln(window.__hpcc_gmap_apikey||`AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg`,{libraries:[`geometry`,`drawing`]}).load().then(function(e){Y=e,t()}).catch(function(e){console.warn(`Failed to initialize Google Map API: ${e.message}`),t()})}catch(e){console.warn(`Failed to initialize Google Map API: ${e.message}`),t()}}})).catch(e=>{console.warn(`Timed out initializing Google Map API after ${un}ms.`)}),dn}function createOverlay(e,t,n){function Overlay(e,t,n){Y.maps.OverlayView.call(this),this._div=null,this._worldSurface=t,this._viewportSurface=n,this._map=e,this.setMap(e);let s=this;Y.maps.event.addListener(e,`bounds_changed`,function(){s.draw()}),Y.maps.event.addListener(e,`projection_changed`,function(){s.draw()}),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return Overlay.prototype=Y.maps.OverlayView.prototype,Overlay.prototype.onAdd=function(){this.div=document.createElement(`div`),this._viewportSurface.target(null).target(this.div).units(`pixels`),this.getPanes().overlayMouseTarget.appendChild(this.div)},Overlay.prototype.draw=function(){let e=this.getProjection();if(!e)return;let t=this._map.getBounds(),n=e.fromLatLngToDivPixel(t.getCenter()),s=e.fromLatLngToDivPixel(t.getSouthWest()),c=e.fromLatLngToDivPixel(t.getNorthEast()),l={x:s.x,y:c.y},d={x:c.x,y:s.y},f=e.getWorldWidth();for(;d.x<l.x+100;)d.x+=f;for(;l.x>n.x;)l.x-=f,d.x-=f;(l.x!==this._prevMin.x||l.y!==this._prevMin.y||d.x!==this._prevMax.x||d.y!==this._prevMax.y)&&(this._viewportSurface.resize({width:0,height:0}).widgetX(l.x).widgetY(l.y).widgetWidth(d.x-l.x).widgetHeight(d.y-l.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=l,this._prevMax=d):this._viewportSurface.lazyRender());let p=e.fromLatLngToDivPixel(new Y.maps.LatLng(85,-179.9)),m=e.fromLatLngToDivPixel(new Y.maps.LatLng(-85,179.9));for(;m.x<p.x+100;)m.x+=f;for(;p.x>n.x;)p.x-=f,m.x-=f;(p.x!==this._prevWorldMin.x||p.y!==this._prevWorldMin.y||m.x!==this._prevWorldMax.x||m.y!==this._prevWorldMax.y)&&(this._worldSurface.widgetX(p.x).widgetY(p.y).widgetWidth(m.x-p.x).widgetHeight(m.y-p.y).render(),this._prevWorldMin=m,this._prevWorldMax=m)},Overlay.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new Overlay(e,t,n)}var UserShapeSelectionBag=class{_userShapes;mapContext;constructor(e){this._userShapes=[],this.mapContext=e}add(e){this._userShapes.indexOf(e)>=0||this._userShapes.push(e)}remove(e){let t=this._userShapes.indexOf(e);t>=0&&this._userShapes.splice(t,1),e.setMap(null)}save(){return this._userShapes.map(e=>this._saveShape(e))}load(e){this._deserializeShapes(e)}_saveShape(e){let t={},n={circle:e=>{t.type=`circle`,t.pos={lat:e.center.lat(),lng:e.center.lng()},t.radius=e.radius},rectangle:e=>{t.type=`rectangle`,t.bounds={ne:e.bounds.getNorthEast(),sw:e.bounds.getSouthWest()}},polygon:e=>{t.type=e.__hpcc_type;let n=e.getPath();t.vertices=[];for(let e=0;e<n.length;e++)t.vertices.push(n.getAt(e))},polyline:e=>{n.polygon(e)}};return n[e.__hpcc_type](e),t.strokeWeight=e.strokeWeight,t.fillColor=e.fillColor,t.fillOpacity=e.fillOpacity,t.editable=e.editable,t.clickable=e.clickable||!0,t}_deserializeShapes(e){let t=JSON.parse(e),n={strokeWeight:0,fillOpacity:.45,fillColor:`#1f77b4`,editable:!0,clickable:!0},s={circle:(e,t)=>new Y.maps.Circle({strokeWeight:e.strokeWeight||n.strokeWeight,fillColor:e.fillColor||n.fillColor,fillOpacity:e.fillOpacity||n.fillOpacity,editable:e.editable||n.editable,clickable:e.clickable||n.clickable,map:t,center:e.pos,radius:e.radius}),rectangle:(e,t)=>new Y.maps.Rectangle({strokeWeight:e.strokeWeight||n.strokeWeight,fillColor:e.fillColor||n.fillColor,fillOpacity:e.fillOpacity||n.fillOpacity,editable:e.editable||n.editable,clickable:e.clickable||n.clickable,map:t,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}}),polygon:(e,t)=>new Y.maps.Polygon({strokeWeight:e.strokeWeight||n.strokeWeight,fillColor:e.fillColor||n.fillColor,fillOpacity:e.fillOpacity||n.fillOpacity,editable:e.editable||n.editable,clickable:e.clickable||n.clickable,map:t,paths:e.vertices}),polyline:(e,t)=>new Y.maps.Polyline({strokeWeight:e.strokeWeight||n.strokeWeight,fillColor:e.fillColor||n.fillColor,fillOpacity:e.fillOpacity||n.fillOpacity,editable:e.editable||n.editable,clickable:e.clickable||n.clickable,map:t,path:e.vertices})};for(let e=0;e<t.length;e++){let n=s[t[e].type](t[e],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:t[e].type,overlay:n})}}},X=class GMap extends t.HTMLWidget{_overlay;_userShapes;_worldSurface;_viewportSurface;_googleMapNode;_googleMap;_googleGeocoder;_prevCenterLat;_prevCenterLong;_googleStreetViewService;_googleMapPanorama;_prevZoom;_prevStreetView;_circleMap;_pinMap;_drawingManager;_prevCenterAddress;_userShapeSelection;constructor(){super(),this._tag=`div`;let e=this;function calcProjection(t,n,s){let c=e._overlay.getProjection(),l=c.fromLatLngToDivPixel(new Y.maps.LatLng(n,s)),d=c.getWorldWidth(),f=parseFloat(t.widgetX()),p=parseFloat(t.widgetY()),m=parseFloat(t.widgetWidth());for(l.x-=f,l.y-=p;l.x<0;)l.x+=d;for(;l.x>m;)l.x-=d;return l}this._userShapes=new UserShapeSelectionBag(this),this._worldSurface=new s.AbsoluteSurface,this._worldSurface.project=function(e,t){return calcProjection(this,e,t)},this._viewportSurface=new s.AbsoluteSurface,this._viewportSurface.project=function(e,t){return calcProjection(this,e,t)}}data(e){return t.HTMLWidget.prototype.data.apply(this,arguments)}getMapType(){switch(this.type()){case`terrain`:return Y.maps.MapTypeId.TERRAIN;case`road`:return Y.maps.MapTypeId.ROADMAP;case`satellite`:return Y.maps.MapTypeId.SATELLITE;case`hybrid`:return Y.maps.MapTypeId.HYBRID;default:return Y.maps.MapTypeId.ROADMAP}}getMapOptions(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}}size(e){let n=t.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style(`width`,e.width+`px`).style(`height`,e.height+`px`),Y.maps.event.trigger(this._googleMap,`resize`)),n}enter(e,n){super.enter(e,n);let s=this;this._googleGeocoder=new Y.maps.Geocoder,this._googleMapNode=n.append(`div`).style(`width`,this.width()+`px`).style(`height`,this.height()+`px`),this._googleMap=new Y.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new Y.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=createOverlay(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener(`center_changed`,function(){s.centerLat(s._googleMap.center.lat()),s._prevCenterLat=s.centerLat(),s.centerLong(s._googleMap.center.lng()),s._prevCenterLong=s.centerLong(),s._googleMapPanorama.setPosition({lat:s.centerLat(),lng:s.centerLong()}),s.zoom(s._googleMap.getZoom()),s._prevZoom=s.zoom(),s._overlay.draw()}),this._googleMap.addListener(`zoom_changed`,function(){s.zoom(s._googleMap.zoom),s._prevZoom=s.zoom()}),this._googleStreetViewService=new Y.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener(`visible_changed`,function(){s.streetView(s._googleMapPanorama.getVisible()),s._prevStreetView=s.streetView()}),this._circleMap=(0,t.map)([]),this._pinMap=(0,t.map)([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();let c={strokeWeight:0,fillOpacity:.45,fillColor:`#1f77b4`,editable:!0,clickable:!0};this._drawingManager=new Y.maps.drawing.DrawingManager({drawingMode:Y.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:Y.maps.ControlPosition.TOP_CENTER,drawingModes:[`polygon`,`rectangle`,`circle`]},rectangleOptions:c,circleOptions:c,polygonOptions:c}),this.drawingState()&&this._userShapes.load(this.drawingState())}update(e,t){let n=this;this._googleMapNode.style(`width`,this.width()+`px`).style(`height`,this.height()+`px`),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},function(e,t){if(t===Y.maps.GeocoderStatus.OK){let t=e[0].geometry.bounds||e[0].geometry.viewport;n._googleMap.fitBounds(t),n.streetView()&&n.useComputedHeading()&&n.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else n.statusError({data:e,status:t})})),(this._prevCenterLat!==this.centerLat()||this._prevCenterLong!==this.centerLong())&&(this._googleMap.setCenter(new Y.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),Y.maps.event.addListener(this._drawingManager,`overlaycomplete`,function(){GMap.prototype.onDrawingComplete.apply(n,arguments)})):(this._drawingManager.setMap(null),Y.maps.event.clearInstanceListeners(this._drawingManager))}render(e){let t=this,n=arguments;return requireGoogleMap().then(()=>{super.render.apply(t,n)}),this}streetViewAt(e,t=1e3){let n=this,s=this.outdoorStreetViewOnly()?Y.maps.StreetViewSource.OUTDOOR:Y.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:t,source:s},function(t,s){if(s===`OK`){let s=new Y.maps.Marker({position:e,map:n._googleMap}),c=Y.maps.geometry.spherical.computeHeading(t.location.latLng,new Y.maps.LatLng(e.lat,e.lng));n._googleMapPanorama.setPano(t.location.pano),n._googleMapPanorama.setPov({heading:c,pitch:0}),n.showStreetViewMarker()||s.setVisible(!1),n._googleMapPanorama.setVisible(!0);let l=Y.maps.event.addListener(n._googleMap.getStreetView(),`visible_changed`,function(){this.getVisible()||(s.setMap(null),Y.maps.event.removeListener(l))})}else n.statusError({data:t,status:s})})}updateCircles(){function rowID(e){return e[0]+`_`+e[1]}let e=[],n=[],s=(0,t.map)(this._circleMap.keys(),function(e){return e});this.data().forEach(function(t){s.remove(rowID(t)),t[3]&&!this._circleMap.has(rowID(t))?e.push(t):t[3]&&this._circleMap.has(rowID(t))?n.push(t):!t[3]&&this._circleMap.has(rowID(t))&&s.set(rowID(t),!0)},this),e.forEach(function(e){let t=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(rowID(e),t)},this),n.forEach(function(e){},this);let c=this;s.each(function(e){c._circleMap.get(e).setMap(null),c._circleMap.remove(e)})}updatePins(){function rowID(e){return e[0]+`_`+e[1]}let e=[],n=[],s=(0,t.map)(this._pinMap.keys(),function(e){return e});this.data().forEach(function(t){s.remove(rowID(t)),t[2]&&!this._pinMap.has(rowID(t))?e.push(t):t[2]&&this._pinMap.has(rowID(t))?n.push(t):!t[2]&&this._pinMap.has(rowID(t))&&s.set(rowID(t),!0)},this),e.forEach(function(e){let t=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(rowID(e),t)},this),n.forEach(function(e){this._pinMap.get(rowID(e)).setIcon(this.createIcon(e[2]))},this);let c=this;s.each(function(e){c._pinMap.get(e).setMap(null),c._pinMap.remove(e)})}createIcon(e){return{path:`M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30`,fillColor:e.fillColor,fillOpacity:e.fillOpacity||.8,scale:.5,strokeColor:e.strokeColor||`black`,strokeWeight:.25}}createMarker(e,t,n){return new Y.maps.Marker({position:new Y.maps.LatLng(e,t),animation:Y.maps.Animation.DROP,title:n.title||``,icon:this.createIcon(n),map:this._googleMap})}createCircle(e,t,n){return n.radius=n.radius||1,new Y.maps.Circle({center:new Y.maps.LatLng(e,t),radius:16093*n.radius/10,fillColor:n.fillColor||`red`,strokeColor:n.strokeColor||n.fillColor||`black`,strokeWeight:.5,map:this._googleMap})}zoomTo(e,t){if(!this._renderCount)return this;t||=this.singleZoomToMaxZoom();let n=0,s=new Y.maps.LatLngBounds;switch(e.forEach(function(e){let t=new Y.maps.LatLng(e[0],e[1]);s.extend(t),++n}),n){case 0:break;case 1:this._googleMap.setCenter(s.getCenter()),this._googleMap.setZoom(t);break;default:this._googleMap.fitBounds(s)}return this}zoomToFit(){return this.zoomTo(this.data())}drawingOptions(e){return arguments.length?(this._drawingManager.setOptions(e),this):this._drawingManager}userShapeSelection(e){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=e,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection}deleteUserShape(e){this._userShapeSelection===e&&this.userShapeSelection(null),this._userShapes.remove(e)}onDrawingComplete(e){if(e.type!==Y.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);let t=e.overlay;t.__hpcc_type=e.type,this._userShapes.add(t);let n=this,s=!1;window.addEventListener(`keydown`,function(e){(e.keyIdentifier===`Control`||e.ctrlKey===!0)&&(s=!0)}),window.addEventListener(`keyup`,function(e){e.ctrlKey===!1&&(s=!1)}),Y.maps.event.addListener(t,`click`,function(e){return n.userShapeSelection(t),e&&s===!0&&(n.deleteUserShape(t),n.drawingState(JSON.stringify(n._userShapes.save()))),!1}),this.userShapeSelection(t),this.drawingState(JSON.stringify(this._userShapes.save()))}}statusError(e){console.warn(`Data not found for this location.`)}};X.prototype._class+=` map_GMap`,X.prototype.publish(`outdoorStreetViewOnly`,!1,`boolean`,`If true, streetView will only display outdoor locations`),X.prototype.publish(`showStreetViewMarker`,!1,`boolean`,`If true, streetView marker will be hidden`),X.prototype.publish(`useComputedHeading`,!1,`boolean`,`If true, centerAddress streetView compute the ideal panorama heading`),X.prototype.publish(`type`,`road`,`set`,`Map Type`,[`terrain`,`road`,`satellite`,`hybrid`],{tags:[`Basic`]}),X.prototype.publish(`centerLat`,42.877742,`number`,`Center Latitude`,null,{tags:[`Basic`]}),X.prototype.publish(`centerLong`,-97.380979,`number`,`Center Longitude`,null,{tags:[`Basic`]}),X.prototype.publish(`centerAddress`,null,`string`,`Address to center map on`,null,{tags:[`Basic`],optional:!0}),X.prototype.publish(`zoom`,4,`number`,`Zoom Level`,null,{tags:[`Basic`]}),X.prototype.publish(`singleZoomToMaxZoom`,14,`number`,`Max zoomTo level with single item`),X.prototype.publish(`panControl`,!0,`boolean`,`Pan Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`zoomControl`,!0,`boolean`,`Zoom Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`scaleControl`,!0,`boolean`,`Scale Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`mapTypeControl`,!1,`boolean`,`Map Type Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`fullscreenControl`,!1,`boolean`,`Fullscreen Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`streetViewControl`,!1,`boolean`,`StreetView Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`overviewMapControl`,!1,`boolean`,`OverviewMap Controls`,null,{tags:[`Basic`]}),X.prototype.publish(`streetView`,!1,`boolean`,`Streetview`,null,{tags:[`Basic`]}),X.prototype.publish(`drawingTools`,!1,`boolean`,`Drawing Tools`,null,{tags:[`Basic`]}),X.prototype.publish(`drawingState`,``,`string`,`Map Drawings`,null,{disable:e=>e.drawingTools()===!1}),X.prototype.publish(`googleMapStyles`,{},`object`,`Styling for map colors etc`,null,{tags:[`Basic`]});var fn=1/16,OverlayLayered=class extends Layered{gmap;surface;constructor(e,t){super(),this.gmap=e,this.surface=t,this.autoScaleMode(`none`),this.zoomable(!1).zoomDuration(10)}getProjection(){return this.gmap._overlay.getProjection()}render(e){return super.render(t=>{let n=this.getProjection();if(n){let e=new window.google.maps.LatLng(0,0),t=n.fromLatLngToDivPixel(e),s=this.surface.widgetX(),c=this.surface.widgetY(),l=[t.x-s,t.y-c],d=this.gmap._googleMap.getZoom();this.zoomTo(l,fn*(1<<d),0)}e&&e(t)}),this}},GMapLayered=class extends X{layered;constructor(){super(),this.layered=new OverlayLayered(this,this._viewportSurface),this._viewportSurface.widget(this.layered)}invert(e,t){return this.layered.invert(e,t)}rproject(e,t){let n=this.layered.getProjection().fromDivPixelToLatLng(new Y.maps.Point(e,t));return{lat:n.lat(),lng:n.lng()}}updateCircles(){}updatePins(){}layers(e){return arguments.length?(this.layered.layers(e),this):this.layered.layers()}render(e){return super.render(t=>{this.layered.preRender().then(()=>{this.layered.render(t=>{e&&e(t)})})})}};GMapLayered.prototype._class+=` map_GMapLayered`;var GMapCounties=class extends GMapLayered{_counties;_view;_palette;_dataMinWeight;_dataMaxWeight;constructor(){super();let e=this;this._counties=new ChoroplethCounties().paletteID(`Blues`).meshVisible(!1).opacity(.8).columns([`fips`,`weight`]).on(`click`,function(t,n,s){e.click(t,n,s)}).on(`dblclick`,function(t,n,s){e.dblclick(t,n,s)})}enter(e,t){super.enter(e,t),this.layers([this._counties])}update(e,t){this._counties.data(this.data()),super.update(e,t),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight}_prevBounds;render(e){return super.render(t=>{if(this._renderCount>1&&this.autoScale()){let e=this._counties.getDataBounds();if(e.x&&e.y&&(!this._prevBounds||this._prevBounds.x!==e.x||this._prevBounds.y!==e.y||this._prevBounds.width!==e.width||this._prevBounds.height!==e.height)){this._prevBounds=e;let t=this.invert(e.x,e.y),n=this.invert(e.x+e.width,e.y+e.height);t&&n&&this.zoomTo([[t[1],t[0]],[n[1],n[0]]])}}e&&e(t)})}exit(e,t){super.exit(e,t)}click(e,t,n){}dblclick(e,t,n){}};GMapCounties.prototype._class+=` map_GMapCounties`,GMapCounties.prototype.publish(`autoScale`,!1,`boolean`,`Auto scale to data`);var GMapGraph=class extends X{constructor(){super()}enter(){super.enter.apply(this,arguments);let e=new l.Graph().layout(`None`).zoomable(!1),n=e.render,s=this;e.render=function(e){let c=[],d=[],f=null;return s.data().forEach(function(e){let n=s._viewportSurface.project(e[0],e[1]),p=new t.Shape().shape(`circle`).radius(3).data(e).pos(n);c.push(p),f&&d.push(new l.Edge().sourceVertex(f).targetVertex(p).sourceMarker(`none`).targetMarker(`arrow`)),f=p}),this.data({vertices:c,edges:d}),n.apply(this,arguments)},this._viewportSurface.widget(e)}};GMapGraph.prototype._class+=` map_GMapGraph`;var GMapHeat=class extends X{constructor(){super()}enter(){super.enter.apply(this,arguments);let e=new d.HeatMap,t=e.render,n=this;e.render=function(e){return this.data(n.data().map(function(e){let t=n._viewportSurface.project(e[0],e[1]);return[t.x,t.y,e[4]]})),t.apply(this,arguments),this},this._viewportSurface.widget(e)}};GMapHeat.prototype._class+=` map_GMapHeat`;var Pins=class extends Layer{_geohash;_pinsTransform;pinsPaths;constructor(){super(),t.Utility.SimpleSelectionMixin.call(this),this._geohash=new Wt}pinsData(){let e=this._db.fieldByLabel(this.geohashColumn()),t=this._db.fieldByLabel(this.tooltipColumn()),n=this._db.fieldByLabel(this.latColumn()),s=this._db.fieldByLabel(this.longColumn()),c=this;return this.data().filter(function(e){let t=n?e[n.idx]:e[0],l=s?e[s.idx]:e[1];return!(c.omitNullLatLong()&&t===0&&l===0)}).map(function(c,l){let d={idx:l,lat:n?c[n.idx]:c[0],long:s?c[s.idx]:c[1],ext:c[2]instanceof Object?c[2]:{},origRow:c};if(e)try{let t=this._geohash.bounds(c[e.idx]);d.lat=(t.ne.lat+t.sw.lat)/2,d.long=(t.ne.lon+t.sw.lon)/2}catch{}return t&&(d.ext.tooltip=c[t.idx]),d},this)}layerEnter(e,n,s){Layer.prototype.layerEnter.apply(this,arguments),this._pinsTransform=n,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=(0,t.select)(null),this.tooltipHTML(function(e){return e.ext.tooltip===void 0?``:e.ext.tooltip})}layerUpdate(e){Layer.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style(`opacity`,this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(`.pin`).data(this.visible()?this.pinsData():[],e=>e.idx);let n=this,s=this.pinsPaths.enter().append(`g`).attr(`class`,`pin`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){n.click(n.rowToObj(e.origRow),`geohash`,n._selection.selected(this))}).on(`dblclick`,function(e){n.dblclick(n.rowToObj(e.origRow),`geohash`,n._selection.selected(this))}).on(`mouseover`,function(e){t.Platform.isIE||this.parentNode.appendChild(this)}).on(`mouseout.tooltip`,function(e){e.ext&&e.ext.tooltip&&n.tooltip.hide.apply(this,arguments)}).on(`mousemove.tooltip`,function(e){e.ext&&e.ext.tooltip&&n.tooltip.show.apply(this,arguments)}).each(function(e){let n=(0,t.select)(this);n.append(`path`).attr(`class`,`data`),n.append(`text`).attr(`text-anchor`,`middle`)}).merge(this.pinsPaths);s.selectAll(`text`).style(`stroke`,this.fontColor()).style(`fill`,this.fontColor()).style(`font-size`,this.fontSize()).style(`font-family`,this.fontFamily()).style(`dominant-baseline`,this.textBaseline()).attr(`dx`,0).attr(`dy`,this.pinTextDY()).text(function(e){return e.ext&&e.ext.text?e.ext.text:``});let c=this.svgPinPath();s.selectAll(`path.data`).attr(`d`,c).attr(`stroke-width`,this.strokeWidth()+`px`).style(`display`,function(t){return e.project(t.lat,t.long)?null:`none`}).style(`stroke`,function(e){return e.ext&&e.ext.strokeColor?e.ext.strokeColor:n.strokeColor()}).style(`fill`,function(e){return e.ext&&e.ext.fillColor?e.ext.fillColor:n.fillColor()}),this.pinsPaths.exit().remove()}layerZoomed(e){Layer.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr(`transform`,function(t){let n=e.project(t.lat,t.long);return n||=[0,0],`translate(`+n[0]+`, `+n[1]+`)scale(`+1/e.zoomScale()+`)`})}pinTextDY(){switch(this.pinType()){case`pin`:case`rectangle-pin`:return-this.arrowHeight();case`circle`:case`rectangle`:return 0}}svgPinPath(){switch(this.pinType()){case`pin`:return this.circlePinPath();case`circle`:return this.circlePath();case`rectangle`:return this.rectanglePath();case`rectangle-pin`:return this.rectanglePinPath()}}rectanglePinPath(){let e=this.pinWidth(),t=this.pinHeight(),n=this.cornerRadius(),s=this.arrowHeight(),c=this.arrowWidth(),l=0-e/2,d=0-t+n,f=(e-n*2-c)/2;return`M`+l+`,`+d+`a`+-n+`,`+-n+` 0 0 1 `+n+`,`+-n+`h`+(e+-n*2)+`a`+n+`,`+n+` 0 0 1 `+n+`,`+n+`v`+(t+-n*2)+`a`+n+`,`+n+` 0 0 1 `+-n+`,`+n+`h`+-f+`l`+-c/2+`,`+s+`l`+-c/2+`,`+-s+`h`+-f+`a`+-n+`,`+-n+` 0 0 1 `+-n+`,`+-n+`z`}rectanglePath(){let e=this.pinWidth(),t=this.pinHeight(),n=this.cornerRadius(),s=-e/2,c=-t/2;return c+=n,`M`+s+`,`+c+`a`+-n+`,`+-n+` 0 0 1 `+n+`,`+-n+`h`+(e+-n*2)+`a`+n+`,`+n+` 0 0 1 `+n+`,`+n+`v`+(t+-n*2)+`a`+n+`,`+n+` 0 0 1 `+-n+`,`+n+`h`+(-e+n*2)+`a`+-n+`,`+-n+` 0 0 1 `+-n+`,`+-n+`z`}circlePinPath(){let e=this.arrowHeight(),t=this.arrowWidth(),n=0-t/2,s=0-e,c=t/2,l=e,d=-c,f=-l,p=t+c,m=f,h=t;return`M`+n+`,`+s+`c`+d+` `+f+`, `+p+` `+m+`, `+h+` 0l`+-t/2+`,`+e+`l`+-t/2+`,`+-e+`z`}circlePath(){let e=+this.pinRadius();return`M 0, 0 m ${-e}, 0 a ${e},${e} 0 1,0 ${e*2},0 a ${e},${e} 0 1,0 ${-e*2},0`}click(e,t,n){}dblclick(e,t,n){}};Pins.prototype._class+=` map_Pins`,Pins.prototype.mixin(t.Utility.SimpleSelectionMixin),Pins.prototype.publish(`geohashColumn`,null,`set`,`Geohash column`,function(){return this.columns()},{optional:!0}),Pins.prototype.publish(`tooltipColumn`,null,`set`,`Tooltip column`,function(){return this.columns()},{optional:!0}),Pins.prototype.publish(`latColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Pins.prototype.publish(`longColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),Pins.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]}),Pins.prototype.publish(`fillColor`,`#00FFDD`,`html-color`,`Pin Color`,null,{optional:!0}),Pins.prototype.publish(`omitNullLatLong`,!1,`boolean`,`Remove lat=0,lng=0 from pinsData`,null,{tags:[`Basic`]}),Pins.prototype.publish(`strokeWidth`,.5,`number`,`Pin Border Thickness (pixels)`,null,{tags:[`Basic`]}),Pins.prototype.publish(`strokeColor`,``,`html-color`,`Pin Border Color`,null,{optional:!0}),Pins.prototype.publish(`fontSize`,18,`number`,`Font Size`,null,{tags:[`Basic`,`Shared`]}),Pins.prototype.publish(`fontFamily`,`Verdana`,`string`,`Font Name`,null,{tags:[`Basic`,`Shared`,`Shared`]}),Pins.prototype.publish(`fontColor`,`#000000`,`html-color`,`Font Color`,null,{tags:[`Basic`,`Shared`]}),Pins.prototype.publish(`pinType`,`pin`,`set`,`Pin Type`,[`pin`,`circle`,`rectangle`,`rectangle-pin`],{tags:[`Basic`]}),Pins.prototype.publish(`arrowWidth`,8,`number`,`Pin arrow width (pixels)`,null,{tags:[`Basic`],disable:e=>[`pin`,`rectangle-pin`].indexOf(e.pinType())===-1}),Pins.prototype.publish(`arrowHeight`,12,`number`,`Pin arrow height (pixels)`,null,{tags:[`Basic`],disable:e=>[`pin`,`rectangle-pin`].indexOf(e.pinType())===-1}),Pins.prototype.publish(`pinWidth`,20,`number`,`Width of pin (pixels)`,null,{tags:[`Basic`],disable:e=>[`rectangle`,`rectangle-pin`].indexOf(e.pinType())===-1}),Pins.prototype.publish(`pinHeight`,20,`number`,`Height of pin (pixels) (not including arrow)`,null,{tags:[`Basic`],disable:e=>[`rectangle`,`rectangle-pin`].indexOf(e.pinType())===-1}),Pins.prototype.publish(`cornerRadius`,10,`number`,`Radius of rectangular pin corners (pixels)`,null,{tags:[`Basic`],disable:e=>[`rectangle`,`rectangle-pin`].indexOf(e.pinType())===-1}),Pins.prototype.publish(`pinRadius`,12,`number`,`Radius of circle (pixels)`,null,{tags:[`Basic`],disable:e=>e.pinType()!==`circle`}),Pins.prototype.publish(`textBaseline`,`central`,`set`,`Pin text vertical alignment`,[`auto`,`use-script`,`no-change`,`reset-size`,`ideographic`,`alphabetic`,`hanging`,`mathematical`,`central`,`middle`,`text-after-edge`,`text-before-edge`,`inherit`],{tags:[`Basic`]});var GMapPin=class extends GMapLayered{_pins;_view;constructor(){super();let e=this;this._pins=new Pins().columns([`lat`,`long`,`ext`]).on(`click`,function(t,n,s){e.click(e.rowToObj(t.ext.origRow),``,s),e.clickStreetView(e.rowToObj(t.ext.origRow),``,s)}).on(`dblclick`,function(t,n,s){e.dblclick(e.rowToObj(t.ext.origRow),``,s)})}pinsData(){if(this.data().length===0)return[];let e=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map(function(t){let n=t.values[0].value[0];return[t.key,t.values[0].key,{fillColor:n[e.indexOf(this.colorColumn())],tooltip:n[e.indexOf(this.tooltipColumn())],origRow:n}]},this)}enter(e,t){super.enter(e,t),this.layers([this._pins])}_prevChecksum;update(e,t){super.update(e,t),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(e){return[e.lat,e.long]})))}exit(e,t){super.exit(e,t)}click(e,t,n){}clickStreetView(e,t,n){this.streetViewOnClick()&&this.streetViewAt({lat:+e[this.latitudeColumn()],lng:+e[this.longitudeColumn()]})}dblclick(e,t,n){}};GMapPin.prototype._class+=` map_GMapPin`,GMapPin.prototype.publish(`autoScale`,!1,`boolean`,`Auto scale to data`),GMapPin.prototype.publishProxy(`pinColor`,`_pins`,`fillColor`),GMapPin.prototype.publishProxy(`pinType`,`_pins`,`pinType`),GMapPin.prototype.publishProxy(`pinWidth`,`_pins`,`pinWidth`),GMapPin.prototype.publishProxy(`pinHeight`,`_pins`,`pinHeight`),GMapPin.prototype.publishProxy(`cornerRadius`,`_pins`,`cornerRadius`),GMapPin.prototype.publishProxy(`pinRadius`,`_pins`,`pinRadius`),GMapPin.prototype.publishProxy(`arrowWidth`,`_pins`,`arrowWidth`),GMapPin.prototype.publishProxy(`arrowHeight`,`_pins`,`arrowHeight`),GMapPin.prototype.publishProxy(`textBaseline`,`_pins`,`textBaseline`),GMapPin.prototype.publishProxy(`strokeWidth`,`_pins`,`strokeWidth`),GMapPin.prototype.publishProxy(`omitNullLatLong`,`_pins`,`omitNullLatLong`),GMapPin.prototype.publish(`latitudeColumn`,null,`set`,`Latitude`,function(){return this.columns()},{optional:!0}),GMapPin.prototype.publish(`longitudeColumn`,null,`set`,`Longitude`,function(){return this.columns()},{optional:!0}),GMapPin.prototype.publish(`colorColumn`,null,`set`,`Color`,function(){return this.columns()},{optional:!0}),GMapPin.prototype.publish(`tooltipColumn`,null,`set`,`Tooltip`,function(){return this.columns()},{optional:!0}),GMapPin.prototype.publish(`streetViewOnClick`,!1,`boolean`,`Switch to street view when pin clicked`);var Lines=class extends Layer{dataEdges;_edgesTransform;constructor(){super()}data(e){let t=Layer.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],e.forEach(function(e){this.dataEdges.push({type:`LineString`,coordinates:[[e[1],e[0]],[e[3],e[2]]]})},this)),t}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),t.append(`defs`).append(`marker`).attr(`class`,`marker`).attr(`id`,this._id+`_arrowHead`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerWidth`,16).attr(`markerHeight`,16).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`polyline`).attr(`points`,`0,0 10,5 0,10 1,5`),this._edgesTransform=t.append(`g`)}_edgesPaths;layerUpdate(e){Layer.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style(`opacity`,this.opacity());let t=this._edgesTransform.selectAll(`.dataEdge`).data(this.visible()?this.dataEdges:[]);this._edgesPaths=t.enter().append(`path`).attr(`class`,`dataEdge`).attr(`marker-end`,`url(#`+this._id+`_arrowHead)`).merge(t).attr(`d`,e._d3GeoPath),t.exit().remove()}layerZoomed(e){Layer.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr(`stroke-width`,`${.5/e.zoomScale()}px`)}};Lines.prototype._class+=` map_Lines`,Lines.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]});var GMapPinLine=class extends GMapLayered{_lines;_pins;_fromView;_toView;_linesView;constructor(){super();let e=this;this._lines=new Lines,this._pins=new Pins().columns([`lat`,`long`,`ext`]).on(`click`,function(t,n,s){e.click(e.rowToObj(t.ext.origRow),``,s)}).on(`dblclick`,function(t,n,s){e.click(e.rowToObj(t.ext.origRow),``,s)})}pinsData(){if(this.data().length===0)return[];let e=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);let t=this._fromView.entries().map(function(t){let n=t.values[0].value[0];return[t.key,t.values[0].key,{fillColor:n[e.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:n[e.indexOf(this.fromTooltipColumn())],origRow:n}]},this),n=this._toView.entries().map(function(t){let n=t.values[0].value[0];return[t.key,t.values[0].key,{fillColor:n[e.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:n[e.indexOf(this.toTooltipColumn())],origRow:n}]},this);return t.concat(n)}linesData(){return this.data().length===0?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())}enter(e,t){super.enter(e,t),this.layers([this._lines,this._pins])}_prevChecksum;update(e,t){super.update(e,t),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(e){return[e.lat,e.long]})))}exit(e,t){super.exit(e,t)}click(e,t,n){}dblclick(e,t,n){}};GMapPinLine.prototype._class+=` map_GMapPinLine`,GMapPinLine.prototype.publish(`autoScale`,!1,`boolean`,`Auto scale to data`),GMapPinLine.prototype.publish(`fromPinColor`,`green`,`html-color`,`From Pin Color`),GMapPinLine.prototype.publish(`fromLatitudeColumn`,null,`set`,`From Latitude`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`fromLongitudeColumn`,null,`set`,`From Longitude`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`fromColorColumn`,null,`set`,`From Color`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`fromTooltipColumn`,null,`set`,`From Tooltip`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`toPinColor`,`red`,`html-color`,`To Pin Color`),GMapPinLine.prototype.publish(`toLatitudeColumn`,null,`set`,`To Latitude`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`toLongitudeColumn`,null,`set`,`To Longitude`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`toColorColumn`,null,`set`,`To Color`,function(){return this.columns()},{optional:!0}),GMapPinLine.prototype.publish(`toTooltipColumn`,null,`set`,`To Tooltip`,function(){return this.columns()},{optional:!0});var Graph=class extends Pins{dataEdges=[];_edgesTransform;constructor(){super()}importJSON(e){let t=Pins.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];let t=null;e.forEach(function(e){t&&this.dataEdges.push({type:`LineString`,coordinates:[[t.long,t.lat],[e.long,e.lat]]}),t=e.eol?null:e},this)}return t}data(e){let t=Pins.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];let t=null;e.forEach(function(e){t&&this.dataEdges.push({type:`LineString`,coordinates:[[t[1],t[0]],[e[1],e[0]]]}),t=e},this)}return t}layerEnter(e,t,n){Pins.prototype.layerEnter.apply(this,arguments),t.append(`defs`).append(`marker`).attr(`class`,`marker`).attr(`id`,this._id+`_arrowHead`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerWidth`,16).attr(`markerHeight`,16).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`polyline`).attr(`points`,`0,0 10,5 0,10 1,5`),this._edgesTransform=t.append(`g`)}_edgesPaths;layerUpdate(e){Pins.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style(`opacity`,this.opacity());let t=this._edgesTransform.selectAll(`.dataEdge`).data(this.visible()?this.dataEdges:[]);this._edgesPaths=t.enter().append(`path`).attr(`class`,`dataEdge`).attr(`marker-end`,`url(#`+this._id+`_arrowHead)`).merge(t).attr(`d`,e._d3GeoPath),t.exit().remove()}layerZoomed(e){Pins.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr(`stroke-width`,`${.5/e.zoomScale()}px`)}};Graph.prototype._class+=` map_Graph`;var Graticule=class extends Layer{_dataMap={};_path=(0,t.select)(null);_graticule;_graticulePath;_graticuleOutlinePath;_prevProjection;constructor(){super()}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),this._graticule=graticule(),this._graticulePath=t.append(`path`).datum(this._graticule).attr(`class`,`graticule`).attr(`vector-effect`,`non-scaling-stroke`),this._graticuleOutlinePath=t.append(`path`).datum(this._graticule.outline).attr(`class`,`graticuleOutline`).attr(`vector-effect`,`non-scaling-stroke`)}layerUpdate(e){if(!this.visible()){this._graticulePath.attr(`d`,``),this._graticuleOutlinePath.attr(`d`,``),delete this._prevProjection;return}this._prevProjection!==e.projection()&&(this._graticulePath.attr(`d`,e._d3GeoPath),this._graticuleOutlinePath.attr(`d`,e._d3GeoPath),this._prevProjection=e.projection()),this._graticulePath.style(`stroke`,this.meshColor()),this._graticuleOutlinePath.style(`stroke`,this.meshColor())}layerExit(e){delete this._prevProjection}};Graticule.prototype._class+=` map_Graticule`,Graticule.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]}),Graticule.prototype.publish(`meshColor`,null,`html-color`,`Stroke Color`,null,{optional:!0}),Graticule.prototype.publish(`meshStrokeWidth`,.25,`number`,`Stroke Width`);var Heat=class extends Layer{_heatTransform;heat;_prevProjection;constructor(){super()}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style(`pointer-events`,`none`),this._heatTransform=n.style(`pointer-events`,`none`).append(`div`).attr(`class`,this.classID()).style(`width`,e.width()+`px`).style(`height`,e.height()+`px`),this.heat=new d.HeatMap().target(this._heatTransform.node())}layerUpdate(e){Layer.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style(`opacity`,this.opacity()).style(`width`,e.width()+`px`).style(`height`,e.height()+`px`),this.heat.resize(e.size()),this.layerZoomed(e)}layerExit(e){delete this._prevProjection,this.heat.target(null),delete this.heat}layerZoomed(e){Layer.prototype.layerZoomed.apply(this,arguments);let t=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map(function(s){let c=t?s[t.idx]:s[0],l=n?s[n.idx]:s[1],d=e.zoomTranslate(),f=e.project(c,l),p=e.zoomScale();return f[0]*=p,f[1]*=p,[d[0]+f[0],d[1]+f[1],s[4]||.5]}):[]).render()}};Heat.prototype._class+=` map_Heat`,Heat.prototype.publish(`latColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Heat.prototype.publish(`longColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),Heat.prototype.publish(`opacity`,1,`number`,`Opacity`,null,{tags:[`Advanced`]});function IChoropleth(){}IChoropleth.prototype._palette=t.Palette.rainbow(`default`),IChoropleth.prototype.click=function(e,t,n){};function defaultScale(e){return e.k}function defaultTranslate(e){return[e.x,e.y]}function constant(e){return function(){return e}}function tile_default(){let e=0,t=0,n=960,s=500,c=!0,l=!0,d=256,f=defaultScale,p=defaultTranslate,m=0;function tile(){let h=+f.apply(this,arguments),g=p.apply(this,arguments),_=Math.log2(h/d),v=Math.round(Math.max(_+m,0)),y=2**(_-v)*d,b=g[0]-h/2,x=g[1]-h/2,S=Math.max(c?0:-1/0,Math.floor((e-b)/y)),C=Math.min(c?1<<v:1/0,Math.ceil((n-b)/y)),T=Math.max(l?0:-1/0,Math.floor((t-x)/y)),E=Math.min(l?1<<v:1/0,Math.ceil((s-x)/y)),D=[];for(let e=T;e<E;++e)for(let t=S;t<C;++t)D.push([t,e,v]);return D.translate=[b/y,x/y],D.scale=y,D}return tile.size=function(c){return arguments.length?(e=t=0,n=+c[0],s=+c[1],tile):[n-e,s-t]},tile.extent=function(c){return arguments.length?(e=+c[0][0],t=+c[0][1],n=+c[1][0],s=+c[1][1],tile):[[e,t],[n,s]]},tile.scale=function(e){return arguments.length?(f=typeof e==`function`?e:constant(+e),tile):f},tile.translate=function(e){return arguments.length?(p=typeof e==`function`?e:constant([+e[0],+e[1]]),tile):p},tile.zoomDelta=function(e){return arguments.length?(m=+e,tile):m},tile.tileSize=function(e){return arguments.length?(d=+e,tile):d},tile.clamp=function(e){return arguments.length?(c=l=!!e,tile):c&&l},tile.clampX=function(e){return arguments.length?(c=!!e,tile):c},tile.clampY=function(e){return arguments.length?(l=!!e,tile):l},tile}__name(tile_default,`default`);var pn=4096,mn=class OpenStreet extends Layer{static _copyrightText=`© OpenStreetMap contributors`;_tile;_openStreet;_copyright;_copyrightBBox;_prevTileProvider;_zoomLayerID=0;_prevZoomLevel;constructor(){super(),this.autoScaleMode(`none`)}layerEnter(e,t,n){Layer.prototype.layerEnter.apply(this,arguments),e.zoomExtent([.1,pn*4]),this._openStreet=t.append(`g`),this._copyright=t.append(`text`).attr(`x`,-100).attr(`y`,-100).style(`opacity`,.5).text(OpenStreet._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()}layerUpdate(e){this._tile=tile_default().size([e.width(),e.height()]).wrap(!1),this.visible()?this._copyright.attr(`x`,e.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr(`y`,e.height()-this._copyrightBBox.height/2).text(OpenStreet._copyrightText):this._copyright.text(``),this.layerZoomed(e)}layerZoomed(e){let n=e.zoomScale(),s=e.zoomTranslate(),c=this._tile.scale(n*pn).translate(s)(),l=c.scale/n,d=[c.translate[0]/c.scale,c.translate[1]/c.scale],f=Math.round(l*1e3);this._prevZoomLevel!==f&&(this._prevZoomLevel=f,this._zoomLayerID++);let p=this._openStreet.selectAll(`.scaleG`).data([this._zoomLayerID],e=>e),m=p.enter().append(`g`).attr(`class`,`scaleG`).attr(`transform`,stringify(l,d)).merge(p);p.exit().style(`opacity`,1).transition().duration(1e3).style(`opacity`,0).on(`end`,function(e){(0,t.select)(this).selectAll(`.image`).attr(`xlink:href`,null)}).remove(),m.selectAll(`.image`).data(c,function(e){return``+e.x+`,`+e.y}).enter().append(`image`).attr(`class`,`image`).style(`opacity`,0).attr(`x`,function(e){return e.tx}).attr(`y`,function(e){return e.ty}).attr(`width`,256).attr(`height`,256).attr(`xlink:href`,function(e){return`http://`+`abc`[e.y%3]+`.tile.openstreetmap.org/`+e.z+`/`+e.x+`/`+e.y+`.png`}).transition().duration(500).style(`opacity`,1)}};mn.prototype._class+=` map_OpenStreet`,mn.prototype.publish(`tileProvider`,`OpenStreetMap`,`set`,`Tile Provider`,[`OpenStreetMap`,`OpenStreetMap Hot`,`MapQuest`,`MapQuest Sat`,`Stamen Watercolor`,`OpenCycleMap`],{tags:[`Basic`,`Shared`]});function stringify(e,t){return`translate(-2048,-2048) scale(`+e/256+`)`}var TopoJSONChoropleth=class extends Choropleth{_prevRegion;choroPaths;_choroTopologyIndex;_choroTopologyFeatures;constructor(){super(),this.projection(`Mercator`)}layerEnter(e,n,s){Choropleth.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=(0,t.select)(null);let c=this;this.tooltipHTML(function(e){let t=c.columns(),n=t&&t.length?t[0]:`Location`,s=e&&e.length?e[e.length-1]:[``];return c.tooltipFormat({label:s[0],series:n,value:e[1]})})}layerUpdate(e){Choropleth.prototype.layerUpdate.apply(this,arguments);let t=[],n=this;this.data().forEach(function(e){if(isNaN(e[0]))for(let s in n._choroTopologyIndex)for(let c in n._choroTopologyIndex[s])c===e[0]&&n._choroTopologyIndex[s][c].forEach(function(n){t.push([n].concat(e.filter(function(e,t){return t>0}),[e]))});else t.push(e.concat([e]))}),this.choroPaths=this._choroplethData.selectAll(`.data`).data(this.visible()?t:[],function(e){return e[0]}),this.choroPaths.enter().append(`path`).attr(`class`,`data`).call(this._selection.enter.bind(this._selection)).on(`click`,function(e){n._dataMap[e[0]]&&n.click(n.rowToObj(n._dataMap[e[0]]),`weight`,n._selection.selected(n))}).on(`dblclick`,function(e){n._dataMap[e[0]]&&n.dblclick(n.rowToObj(n._dataMap[e[0]]),`weight`,n._selection.selected(n))}).on(`mouseout.tooltip`,this.tooltip.hide).on(`mousemove.tooltip`,this.tooltip.show),this.choroPaths.attr(`d`,function(t){let s=e._d3GeoPath(n._choroTopologyFeatures[t[0]]);return s||console.warn(`Unknown Country: `+t),s}).style(`fill`,function(e){return n._palette(e[1],n._dataMinWeight,n._dataMaxWeight)}),this.choroPaths.exit().remove()}layerPreRender(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){let e=this;this._topoJsonPromise=new Promise(function(t,n){Zt(`${topoJsonFolder()}/${e.region()}.json`,function(n){e._choroTopology=n,e._choroTopologyObjects=n.objects.PolbndA,e._choroTopologyFeatures=feature_default(e._choroTopology,e._choroTopologyObjects).features,Zt(`${topoJsonFolder()}/${e.region()}_idx.json`,indexLoad).on(`error`,function(e){indexLoad({})});function indexLoad(n){e._choroTopologyIndex=n,t()}})})}return this._topoJsonPromise}};TopoJSONChoropleth.prototype._class+=` map_TopoJSONChoropleth`,TopoJSONChoropleth.prototype.publish(`region`,`GB`,`set`,`Region Data`,`AT.BE.BG.BR.CHLI.CY.CZ.DE.DK.EE.ES.FI.FR.GB.GE.GR.HR.HU.IE.IS.IT.KS.LT.LU.LV.MD.MK.MT.ND.NL.NO.PL.PT.RO.RS.SE.SI.SK.UA`.split(`.`));var Z=__toESM(__commonJSMin(((e,t)=>{(function(n,s){typeof e==`object`&&t!==void 0?s(e):typeof define==`function`&&define.amd?define([`exports`],s):(n=typeof globalThis<`u`?globalThis:n||self,s(n.leaflet={}))})(e,(function(e){"use strict";var t=`1.9.4`;function extend(e){var t,n,s,c;for(n=1,s=arguments.length;n<s;n++)for(t in c=arguments[n],c)e[t]=c[t];return e}var n=Object.create||(function(){function F(){}return function(e){return F.prototype=e,new F}})();function bind(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var s=n.call(arguments,2);return function(){return e.apply(t,s.length?s.concat(n.call(arguments)):arguments)}}var s=0;function stamp(e){return`_leaflet_id`in e||(e._leaflet_id=++s),e._leaflet_id}function throttle(e,t,n){var s,c,wrapperFn,later=function(){s=!1,c&&=(wrapperFn.apply(n,c),!1)};return wrapperFn=function(){s?c=arguments:(e.apply(n,arguments),setTimeout(later,t),s=!0)},wrapperFn}function wrapNum(e,t,n){var s=t[1],c=t[0],l=s-c;return e===s&&n?e:((e-c)%l+l)%l+c}function falseFn(){return!1}function formatNum(e,t){if(t===!1)return e;var n=10**(t===void 0?6:t);return Math.round(e*n)/n}function trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,``)}function splitWords(e){return trim(e).split(/\s+/)}function setOptions(e,t){for(var s in Object.prototype.hasOwnProperty.call(e,`options`)||(e.options=e.options?n(e.options):{}),t)e.options[s]=t[s];return e.options}function getParamString(e,t,n){var s=[];for(var c in e)s.push(encodeURIComponent(n?c.toUpperCase():c)+`=`+encodeURIComponent(e[c]));return(!t||t.indexOf(`?`)===-1?`?`:`&`)+s.join(`&`)}var c=/\{ *([\w_ -]+) *\}/g;function template(e,t){return e.replace(c,function(e,n){var s=t[n];if(s===void 0)throw Error(`No value provided for variable `+e);return typeof s==`function`&&(s=s(t)),s})}var l=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`};function indexOf(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var d=`data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=`;function getPrefixed(e){return window[`webkit`+e]||window[`moz`+e]||window[`ms`+e]}var f=0;function timeoutDefer(e){var t=+new Date,n=Math.max(0,16-(t-f));return f=t+n,window.setTimeout(e,n)}var p=window.requestAnimationFrame||getPrefixed(`RequestAnimationFrame`)||timeoutDefer,m=window.cancelAnimationFrame||getPrefixed(`CancelAnimationFrame`)||getPrefixed(`CancelRequestAnimationFrame`)||function(e){window.clearTimeout(e)};function requestAnimFrame(e,t,n){if(n&&p===timeoutDefer)e.call(t);else return p.call(window,bind(e,t))}function cancelAnimFrame(e){e&&m.call(window,e)}var h={__proto__:null,extend,create:n,bind,get lastId(){return s},stamp,throttle,wrapNum,falseFn,formatNum,trim,splitWords,setOptions,getParamString,template,isArray:l,indexOf,emptyImageUrl:d,requestFn:p,cancelFn:m,requestAnimFrame,cancelAnimFrame};function Class(){}Class.extend=function(e){var NewClass=function(){setOptions(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},t=NewClass.__super__=this.prototype,s=n(t);for(var c in s.constructor=NewClass,NewClass.prototype=s,this)Object.prototype.hasOwnProperty.call(this,c)&&c!==`prototype`&&c!==`__super__`&&(NewClass[c]=this[c]);return e.statics&&extend(NewClass,e.statics),e.includes&&(checkDeprecatedMixinEvents(e.includes),extend.apply(null,[s].concat(e.includes))),extend(s,e),delete s.statics,delete s.includes,s.options&&(s.options=t.options?n(t.options):{},extend(s.options,e.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){t.callInitHooks&&t.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,n=s._initHooks.length;e<n;e++)s._initHooks[e].call(this)}},NewClass},Class.include=function(e){var t=this.prototype.options;return extend(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},Class.mergeOptions=function(e){return extend(this.prototype.options,e),this},Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n=typeof e==`function`?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};function checkDeprecatedMixinEvents(e){if(!(typeof L>`u`||!L||!L.Mixin)){e=l(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn(`Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.`,Error().stack)}}var g={on:function(e,t,n){if(typeof e==`object`)for(var s in e)this._on(s,e[s],t);else{e=splitWords(e);for(var c=0,l=e.length;c<l;c++)this._on(e[c],t,n)}return this},off:function(e,t,n){if(!arguments.length)delete this._events;else if(typeof e==`object`)for(var s in e)this._off(s,e[s],t);else{e=splitWords(e);for(var c=arguments.length===1,l=0,d=e.length;l<d;l++)c?this._off(e[l]):this._off(e[l],t,n)}return this},_on:function(e,t,n,s){if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}if(this._listens(e,t,n)===!1){n===this&&(n=void 0);var c={fn:t,ctx:n};s&&(c.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(c)}},_off:function(e,t,n){var s,c,l;if(this._events&&(s=this._events[e],s)){if(arguments.length===1){if(this._firingCount)for(c=0,l=s.length;c<l;c++)s[c].fn=falseFn;delete this._events[e];return}if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}var d=this._listens(e,t,n);if(d!==!1){var f=s[d];this._firingCount&&(f.fn=falseFn,this._events[e]=s=s.slice()),s.splice(d,1)}}},fire:function(e,t,n){if(!this.listens(e,n))return this;var s=extend({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var c=this._events[e];if(c){this._firingCount=this._firingCount+1||1;for(var l=0,d=c.length;l<d;l++){var f=c[l],p=f.fn;f.once&&this.off(e,p,f.ctx),p.call(f.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(e,t,n,s){typeof e!=`string`&&console.warn(`"string" type argument expected`);var c=t;typeof t!=`function`&&(s=!!t,c=void 0,n=void 0);var l=this._events&&this._events[e];if(l&&l.length&&this._listens(e,c,n)!==!1)return!0;if(s){for(var d in this._eventParents)if(this._eventParents[d].listens(e,t,n,s))return!0}return!1},_listens:function(e,t,n){if(!this._events)return!1;var s=this._events[e]||[];if(!t)return!!s.length;n===this&&(n=void 0);for(var c=0,l=s.length;c<l;c++)if(s[c].fn===t&&s[c].ctx===n)return c;return!1},once:function(e,t,n){if(typeof e==`object`)for(var s in e)this._on(s,e[s],t,!0);else{e=splitWords(e);for(var c=0,l=e.length;c<l;c++)this._on(e[c],t,n,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target,propagatedFrom:e.target},e),!0)}};g.addEventListener=g.on,g.removeEventListener=g.clearAllEventListeners=g.off,g.addOneTimeEventListener=g.once,g.fireEvent=g.fire,g.hasEventListeners=g.listens;var _=Class.extend(g);function Point(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var v=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(e){return this.clone()._add(toPoint(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(toPoint(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new Point(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new Point(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=v(this.x),this.y=v(this.y),this},distanceTo:function(e){e=toPoint(e);var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return e=toPoint(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=toPoint(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return`Point(`+formatNum(this.x)+`, `+formatNum(this.y)+`)`}};function toPoint(e,t,n){return e instanceof Point?e:l(e)?new Point(e[0],e[1]):e==null?e:typeof e==`object`&&`x`in e&&`y`in e?new Point(e.x,e.y):new Point(e,t,n)}function Bounds(e,t){if(e)for(var n=t?[e,t]:e,s=0,c=n.length;s<c;s++)this.extend(n[s])}Bounds.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof Point||typeof e[0]==`number`||`x`in e)t=n=toPoint(e);else if(e=toBounds(e),t=e.min,n=e.max,!t||!n)return this;return!this.min&&!this.max?(this.min=t.clone(),this.max=n.clone()):(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)),this},getCenter:function(e){return toPoint((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return toPoint(this.min.x,this.max.y)},getTopRight:function(){return toPoint(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return e=typeof e[0]==`number`||e instanceof Point?toPoint(e):toBounds(e),e instanceof Bounds?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=toBounds(e);var t=this.min,n=this.max,s=e.min,c=e.max,l=c.x>=t.x&&s.x<=n.x,d=c.y>=t.y&&s.y<=n.y;return l&&d},overlaps:function(e){e=toBounds(e);var t=this.min,n=this.max,s=e.min,c=e.max,l=c.x>t.x&&s.x<n.x,d=c.y>t.y&&s.y<n.y;return l&&d},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var t=this.min,n=this.max,s=Math.abs(t.x-n.x)*e,c=Math.abs(t.y-n.y)*e;return toBounds(toPoint(t.x-s,t.y-c),toPoint(n.x+s,n.y+c))},equals:function(e){return e?(e=toBounds(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function toBounds(e,t){return!e||e instanceof Bounds?e:new Bounds(e,t)}function LatLngBounds(e,t){if(e)for(var n=t?[e,t]:e,s=0,c=n.length;s<c;s++)this.extend(n[s])}LatLngBounds.prototype={extend:function(e){var t=this._southWest,n=this._northEast,s,c;if(e instanceof LatLng)s=e,c=e;else if(e instanceof LatLngBounds){if(s=e._southWest,c=e._northEast,!s||!c)return this}else return e?this.extend(toLatLng(e)||toLatLngBounds(e)):this;return!t&&!n?(this._southWest=new LatLng(s.lat,s.lng),this._northEast=new LatLng(c.lat,c.lng)):(t.lat=Math.min(s.lat,t.lat),t.lng=Math.min(s.lng,t.lng),n.lat=Math.max(c.lat,n.lat),n.lng=Math.max(c.lng,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,s=Math.abs(t.lat-n.lat)*e,c=Math.abs(t.lng-n.lng)*e;return new LatLngBounds(new LatLng(t.lat-s,t.lng-c),new LatLng(n.lat+s,n.lng+c))},getCenter:function(){return new LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=typeof e[0]==`number`||e instanceof LatLng||`lat`in e?toLatLng(e):toLatLngBounds(e);var t=this._southWest,n=this._northEast,s,c;return e instanceof LatLngBounds?(s=e.getSouthWest(),c=e.getNorthEast()):s=c=e,s.lat>=t.lat&&c.lat<=n.lat&&s.lng>=t.lng&&c.lng<=n.lng},intersects:function(e){e=toLatLngBounds(e);var t=this._southWest,n=this._northEast,s=e.getSouthWest(),c=e.getNorthEast(),l=c.lat>=t.lat&&s.lat<=n.lat,d=c.lng>=t.lng&&s.lng<=n.lng;return l&&d},overlaps:function(e){e=toLatLngBounds(e);var t=this._southWest,n=this._northEast,s=e.getSouthWest(),c=e.getNorthEast(),l=c.lat>t.lat&&s.lat<n.lat,d=c.lng>t.lng&&s.lng<n.lng;return l&&d},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(`,`)},equals:function(e,t){return e?(e=toLatLngBounds(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function toLatLngBounds(e,t){return e instanceof LatLngBounds?e:new LatLngBounds(e,t)}function LatLng(e,t,n){if(isNaN(e)||isNaN(t))throw Error(`Invalid LatLng object: (`+e+`, `+t+`)`);this.lat=+e,this.lng=+t,n!==void 0&&(this.alt=+n)}LatLng.prototype={equals:function(e,t){return e?(e=toLatLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(t===void 0?1e-9:t)):!1},toString:function(e){return`LatLng(`+formatNum(this.lat,e)+`, `+formatNum(this.lng,e)+`)`},distanceTo:function(e){return b.distance(this,toLatLng(e))},wrap:function(){return b.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return toLatLngBounds([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new LatLng(this.lat,this.lng,this.alt)}};function toLatLng(e,t,n){return e instanceof LatLng?e:l(e)&&typeof e[0]!=`object`?e.length===3?new LatLng(e[0],e[1],e[2]):e.length===2?new LatLng(e[0],e[1]):null:e==null?e:typeof e==`object`&&`lat`in e?new LatLng(e.lat,`lng`in e?e.lng:e.lon,e.alt):t===void 0?null:new LatLng(e,t,n)}var y={latLngToPoint:function(e,t){var n=this.projection.project(e),s=this.scale(t);return this.transformation._transform(n,s)},pointToLatLng:function(e,t){var n=this.scale(t),s=this.transformation.untransform(e,n);return this.projection.unproject(s)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*2**e},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new Bounds(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?wrapNum(e.lng,this.wrapLng,!0):e.lng,n=this.wrapLat?wrapNum(e.lat,this.wrapLat,!0):e.lat,s=e.alt;return new LatLng(n,t,s)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),s=t.lat-n.lat,c=t.lng-n.lng;if(s===0&&c===0)return e;var l=e.getSouthWest(),d=e.getNorthEast();return new LatLngBounds(new LatLng(l.lat-s,l.lng-c),new LatLng(d.lat-s,d.lng-c))}},b=extend({},y,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,s=e.lat*n,c=t.lat*n,l=Math.sin((t.lat-e.lat)*n/2),d=Math.sin((t.lng-e.lng)*n/2),f=l*l+Math.cos(s)*Math.cos(c)*d*d,p=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return this.R*p}}),x=6378137,S={R:x,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,s=Math.max(Math.min(n,e.lat),-n),c=Math.sin(s*t);return new Point(this.R*e.lng*t,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(e){var t=180/Math.PI;return new LatLng((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(function(){var e=x*Math.PI;return new Bounds([-e,-e],[e,e])})()};function Transformation(e,t,n,s){if(l(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=t,this._c=n,this._d=s}Transformation.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t||=1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t||=1,new Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};function toTransformation(e,t,n,s){return new Transformation(e,t,n,s)}var C=extend({},b,{code:`EPSG:3857`,projection:S,transformation:function(){var e=.5/(Math.PI*S.R);return toTransformation(e,.5,-e,.5)}()}),T=extend({},C,{code:`EPSG:900913`});function svgCreate(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}function pointsToPath(e,t){var n=``,s,c,l,d,f,p;for(s=0,l=e.length;s<l;s++){for(f=e[s],c=0,d=f.length;c<d;c++)p=f[c],n+=(c?`L`:`M`)+p.x+` `+p.y;n+=t?U.svg?`z`:`x`:``}return n||`M0 0`}var E=document.documentElement.style,D=`ActiveXObject`in window,O=D&&!document.addEventListener,k=`msLaunchUri`in navigator&&!(`documentMode`in document),A=userAgentContains(`webkit`),j=userAgentContains(`android`),M=userAgentContains(`android 2`)||userAgentContains(`android 3`),N=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),P=j&&userAgentContains(`Google`)&&N<537&&!(`AudioNode`in window),I=!!window.opera,ee=!k&&userAgentContains(`chrome`),te=userAgentContains(`gecko`)&&!A&&!I&&!D,ne=!ee&&userAgentContains(`safari`),R=userAgentContains(`phantom`),z=`OTransition`in E,B=navigator.platform.indexOf(`Win`)===0,re=D&&`transition`in E,ie=`WebKitCSSMatrix`in window&&`m11`in new window.WebKitCSSMatrix&&!M,ae=`MozPerspective`in E,oe=!window.L_DISABLE_3D&&(re||ie||ae)&&!z&&!R,se=typeof orientation<`u`||userAgentContains(`mobile`),ce=se&&A,le=se&&ie,ue=!window.PointerEvent&&window.MSPointerEvent,de=!!(window.PointerEvent||ue),fe=`ontouchstart`in window||!!window.TouchEvent,pe=!window.L_NO_TOUCH&&(fe||de),V=se&&I,me=se&&te,H=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,he=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener(`testPassiveEventSupport`,falseFn,t),window.removeEventListener(`testPassiveEventSupport`,falseFn,t)}catch{}return e}(),ge=function(){return!!document.createElement(`canvas`).getContext}(),_e=!!(document.createElementNS&&svgCreate(`svg`).createSVGRect),ve=!!_e&&(function(){var e=document.createElement(`div`);return e.innerHTML=`<svg/>`,(e.firstChild&&e.firstChild.namespaceURI)===`http://www.w3.org/2000/svg`})(),ye=!_e&&function(){try{var e=document.createElement(`div`);e.innerHTML=`<v:shape adj="1"/>`;var t=e.firstChild;return t.style.behavior=`url(#default#VML)`,t&&typeof t.adj==`object`}catch{return!1}}(),be=navigator.platform.indexOf(`Mac`)===0,xe=navigator.platform.indexOf(`Linux`)===0;function userAgentContains(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var U={ie:D,ielt9:O,edge:k,webkit:A,android:j,android23:M,androidStock:P,opera:I,chrome:ee,gecko:te,safari:ne,phantom:R,opera12:z,win:B,ie3d:re,webkit3d:ie,gecko3d:ae,any3d:oe,mobile:se,mobileWebkit:ce,mobileWebkit3d:le,msPointer:ue,pointer:de,touch:pe,touchNative:fe,mobileOpera:V,mobileGecko:me,retina:H,passiveEvents:he,canvas:ge,svg:_e,vml:ye,inlineSvg:ve,mac:be,linux:xe},Se=U.msPointer?`MSPointerDown`:`pointerdown`,Ce=U.msPointer?`MSPointerMove`:`pointermove`,we=U.msPointer?`MSPointerUp`:`pointerup`,Te=U.msPointer?`MSPointerCancel`:`pointercancel`,Ee={touchstart:Se,touchmove:Ce,touchend:we,touchcancel:Te},De={touchstart:_onPointerStart,touchmove:_handlePointer,touchend:_handlePointer,touchcancel:_handlePointer},Oe={},ke=!1;function addPointerListener(e,t,n){return t===`touchstart`&&_addPointerDocListener(),De[t]?(n=De[t].bind(this,n),e.addEventListener(Ee[t],n,!1),n):(console.warn(`wrong event specified:`,t),falseFn)}function removePointerListener(e,t,n){if(!Ee[t]){console.warn(`wrong event specified:`,t);return}e.removeEventListener(Ee[t],n,!1)}function _globalPointerDown(e){Oe[e.pointerId]=e}function _globalPointerMove(e){Oe[e.pointerId]&&(Oe[e.pointerId]=e)}function _globalPointerUp(e){delete Oe[e.pointerId]}function _addPointerDocListener(){ke||=(document.addEventListener(Se,_globalPointerDown,!0),document.addEventListener(Ce,_globalPointerMove,!0),document.addEventListener(we,_globalPointerUp,!0),document.addEventListener(Te,_globalPointerUp,!0),!0)}function _handlePointer(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||`mouse`)){for(var n in t.touches=[],Oe)t.touches.push(Oe[n]);t.changedTouches=[t],e(t)}}function _onPointerStart(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&preventDefault(t),_handlePointer(e,t)}function makeDblclick(e){var t={},n,s;for(s in e)n=e[s],t[s]=n&&n.bind?n.bind(e):n;return e=t,t.type=`dblclick`,t.detail=2,t.isTrusted=!1,t._simulated=!0,t}var Ae=200;function addDoubleTapListener(e,t){e.addEventListener(`dblclick`,t);var n=0,s;function simDblclick(e){if(e.detail!==1){s=e.detail;return}if(!(e.pointerType===`mouse`||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents)){var c=getPropagationPath(e);if(!(c.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})&&!c.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var l=Date.now();l-n<=Ae?(s++,s===2&&t(makeDblclick(e))):s=1,n=l}}}return e.addEventListener(`click`,simDblclick),{dblclick:t,simDblclick}}function removeDoubleTapListener(e,t){e.removeEventListener(`dblclick`,t.dblclick),e.removeEventListener(`click`,t.simDblclick)}var je=testProp([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Me=testProp([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]),Ne=Me===`webkitTransition`||Me===`OTransition`?Me+`End`:`transitionend`;function get(e){return typeof e==`string`?document.getElementById(e):e}function getStyle(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||n===`auto`)&&document.defaultView){var s=document.defaultView.getComputedStyle(e,null);n=s?s[t]:null}return n===`auto`?null:n}function create$1(e,t,n){var s=document.createElement(e);return s.className=t||``,n&&n.appendChild(s),s}function remove(e){var t=e.parentNode;t&&t.removeChild(e)}function empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function toFront(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function toBack(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);var n=getClass(e);return n.length>0&&RegExp(`(^|\\s)`+t+`(\\s|$)`).test(n)}function addClass(e,t){if(e.classList!==void 0)for(var n=splitWords(t),s=0,c=n.length;s<c;s++)e.classList.add(n[s]);else if(!hasClass(e,t)){var l=getClass(e);setClass(e,(l?l+` `:``)+t)}}function removeClass(e,t){e.classList===void 0?setClass(e,trim((` `+getClass(e)+` `).replace(` `+t+` `,` `))):e.classList.remove(t)}function setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}function getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function setOpacity(e,t){`opacity`in e.style?e.style.opacity=t:`filter`in e.style&&_setOpacityIE(e,t)}function _setOpacityIE(e,t){var n=!1,s=`DXImageTransform.Microsoft.Alpha`;try{n=e.filters.item(s)}catch{if(t===1)return}t=Math.round(t*100),n?(n.Enabled=t!==100,n.Opacity=t):e.style.filter+=` progid:`+s+`(opacity=`+t+`)`}function testProp(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function setTransform(e,t,n){var s=t||new Point(0,0);e.style[je]=(U.ie3d?`translate(`+s.x+`px,`+s.y+`px)`:`translate3d(`+s.x+`px,`+s.y+`px,0)`)+(n?` scale(`+n+`)`:``)}function setPosition(e,t){e._leaflet_pos=t,U.any3d?setTransform(e,t):(e.style.left=t.x+`px`,e.style.top=t.y+`px`)}function getPosition(e){return e._leaflet_pos||new Point(0,0)}var disableTextSelection,enableTextSelection,Pe;if(`onselectstart`in document)disableTextSelection=function(){on(window,`selectstart`,preventDefault)},enableTextSelection=function(){off(window,`selectstart`,preventDefault)};else{var Fe=testProp([`userSelect`,`WebkitUserSelect`,`OUserSelect`,`MozUserSelect`,`msUserSelect`]);disableTextSelection=function(){if(Fe){var e=document.documentElement.style;Pe=e[Fe],e[Fe]=`none`}},enableTextSelection=function(){Fe&&(document.documentElement.style[Fe]=Pe,Pe=void 0)}}function disableImageDrag(){on(window,`dragstart`,preventDefault)}function enableImageDrag(){off(window,`dragstart`,preventDefault)}var W,G;function preventOutline(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(restoreOutline(),W=e,G=e.style.outlineStyle,e.style.outlineStyle=`none`,on(window,`keydown`,restoreOutline))}function restoreOutline(){W&&(W.style.outlineStyle=G,W=void 0,G=void 0,off(window,`keydown`,restoreOutline))}function getSizedParentNode(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function getScale(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var K={__proto__:null,TRANSFORM:je,TRANSITION:Me,TRANSITION_END:Ne,get,getStyle,create:create$1,remove,empty,toFront,toBack,hasClass,addClass,removeClass,setClass,getClass,setOpacity,testProp,setTransform,setPosition,getPosition,get disableTextSelection(){return disableTextSelection},get enableTextSelection(){return enableTextSelection},disableImageDrag,enableImageDrag,preventOutline,restoreOutline,getSizedParentNode,getScale};function on(e,t,n,s){if(t&&typeof t==`object`)for(var c in t)addOne(e,c,t[c],n);else{t=splitWords(t);for(var l=0,d=t.length;l<d;l++)addOne(e,t[l],n,s)}return this}var q=`_leaflet_events`;function off(e,t,n,s){if(arguments.length===1)batchRemove(e),delete e[q];else if(t&&typeof t==`object`)for(var c in t)removeOne(e,c,t[c],n);else if(t=splitWords(t),arguments.length===2)batchRemove(e,function(e){return indexOf(t,e)!==-1});else for(var l=0,d=t.length;l<d;l++)removeOne(e,t[l],n,s);return this}function batchRemove(e,t){for(var n in e[q]){var s=n.split(/\d/)[0];(!t||t(s))&&removeOne(e,s,null,null,n)}}var Ie={mouseenter:`mouseover`,mouseleave:`mouseout`,wheel:!(`onwheel`in window)&&`mousewheel`};function addOne(e,t,n,s){var c=t+stamp(n)+(s?`_`+stamp(s):``);if(e[q]&&e[q][c])return this;var handler=function(t){return n.call(s||e,t||window.event)},l=handler;!U.touchNative&&U.pointer&&t.indexOf(`touch`)===0?handler=addPointerListener(e,t,handler):U.touch&&t===`dblclick`?handler=addDoubleTapListener(e,handler):`addEventListener`in e?t===`touchstart`||t===`touchmove`||t===`wheel`||t===`mousewheel`?e.addEventListener(Ie[t]||t,handler,U.passiveEvents?{passive:!1}:!1):t===`mouseenter`||t===`mouseleave`?(handler=function(t){t||=window.event,isExternalTarget(e,t)&&l(t)},e.addEventListener(Ie[t],handler,!1)):e.addEventListener(t,l,!1):e.attachEvent(`on`+t,handler),e[q]=e[q]||{},e[q][c]=handler}function removeOne(e,t,n,s,c){c||=t+stamp(n)+(s?`_`+stamp(s):``);var l=e[q]&&e[q][c];if(!l)return this;!U.touchNative&&U.pointer&&t.indexOf(`touch`)===0?removePointerListener(e,t,l):U.touch&&t===`dblclick`?removeDoubleTapListener(e,l):`removeEventListener`in e?e.removeEventListener(Ie[t]||t,l,!1):e.detachEvent(`on`+t,l),e[q][c]=null}function stopPropagation(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function disableScrollPropagation(e){return addOne(e,`wheel`,stopPropagation),this}function disableClickPropagation(e){return on(e,`mousedown touchstart dblclick contextmenu`,stopPropagation),e._leaflet_disable_click=!0,this}function preventDefault(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function stop(e){return preventDefault(e),stopPropagation(e),this}function getPropagationPath(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function getMousePosition(e,t){if(!t)return new Point(e.clientX,e.clientY);var n=getScale(t),s=n.boundingClientRect;return new Point((e.clientX-s.left)/n.x-t.clientLeft,(e.clientY-s.top)/n.y-t.clientTop)}var Le=U.linux&&U.chrome?window.devicePixelRatio:U.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function getWheelDelta(e){return U.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Le:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function isExternalTarget(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch{return!1}return n!==e}var Re={__proto__:null,on,off,stopPropagation,disableScrollPropagation,disableClickPropagation,preventDefault,stop,getPropagationPath,getMousePosition,getWheelDelta,isExternalTarget,addListener:on,removeListener:off},ze=_.extend({run:function(e,t,n,s){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire(`start`),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=requestAnimFrame(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=this._duration*1e3;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),setPosition(this._el,n),this.fire(`step`)},_complete:function(){cancelAnimFrame(this._animId),this._inProgress=!1,this.fire(`end`)},_easeOut:function(e){return 1-(1-e)**this._easeOutPower}}),J=_.extend({options:{crs:C,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=setOptions(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(toLatLng(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Me&&U.any3d&&!U.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),on(this._proxy,Ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,n){return t=t===void 0?this._zoom:this._limitZoom(t),e=this._limitCenter(toLatLng(e),t,this.options.maxBounds),n||={},this._stop(),this._loaded&&!n.reset&&n!==!0&&(n.animate!==void 0&&(n.zoom=extend({animate:n.animate},n.zoom),n.pan=extend({animate:n.animate,duration:n.duration},n.pan)),this._zoom===t?this._tryAnimatedPan(e,n.pan):this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,n.pan&&n.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e||=U.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e||=U.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var s=this.getZoomScale(t),c=this.getSize().divideBy(2),l=(e instanceof Point?e:this.latLngToContainerPoint(e)).subtract(c).multiplyBy(1-1/s),d=this.containerPointToLatLng(c.add(l));return this.setView(d,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t||={},e=e.getBounds?e.getBounds():toLatLngBounds(e);var n=toPoint(t.paddingTopLeft||t.padding||[0,0]),s=toPoint(t.paddingBottomRight||t.padding||[0,0]),c=this.getBoundsZoom(e,!1,n.add(s));if(c=typeof t.maxZoom==`number`?Math.min(t.maxZoom,c):c,c===1/0)return{center:e.getCenter(),zoom:c};var l=s.subtract(n).divideBy(2),d=this.project(e.getSouthWest(),c),f=this.project(e.getNorthEast(),c);return{center:this.unproject(d.add(f).divideBy(2).add(l),c),zoom:c}},fitBounds:function(e,t){if(e=toLatLngBounds(e),!e.isValid())throw Error(`Bounds are not valid.`);var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=toPoint(e).round(),t||={},!e.x&&!e.y)return this.fire(`moveend`);if(t.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ze,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire(`movestart`),t.animate!==!1){addClass(this._mapPane,`leaflet-pan-anim`);var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire(`move`).fire(`moveend`);return this},flyTo:function(e,t,n){if(n||={},n.animate===!1||!U.any3d)return this.setView(e,t,n);this._stop();var s=this.project(this.getCenter()),c=this.project(e),l=this.getSize(),d=this._zoom;e=toLatLng(e),t=t===void 0?d:t;var f=Math.max(l.x,l.y),p=f*this.getZoomScale(d,t),m=c.distanceTo(s)||1,h=1.42,g=h*h;function r(e){var t=e?-1:1,n=e?p:f,s=(p*p-f*f+t*g*g*m*m)/(2*n*g*m),c=Math.sqrt(s*s+1)-s;return c<1e-9?-18:Math.log(c)}function sinh(e){return(Math.exp(e)-Math.exp(-e))/2}function cosh(e){return(Math.exp(e)+Math.exp(-e))/2}function tanh(e){return sinh(e)/cosh(e)}var _=r(0);function w(e){return f*(cosh(_)/cosh(_+h*e))}function u(e){return f*(cosh(_)*tanh(_+h*e)-sinh(_))/g}function easeOut(e){return 1-(1-e)**1.5}var v=Date.now(),y=(r(1)-_)/h,b=n.duration?1e3*n.duration:1e3*y*.8;function frame(){var n=(Date.now()-v)/b,l=easeOut(n)*y;n<=1?(this._flyToFrame=requestAnimFrame(frame,this),this._move(this.unproject(s.add(c.subtract(s).multiplyBy(u(l)/m)),d),this.getScaleZoom(f/w(l),d),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),frame.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=toLatLngBounds(e),this.listens(`moveend`,this._panInsideMaxBounds)&&this.off(`moveend`,this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on(`moveend`,this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),s=this._limitCenter(n,this._zoom,toLatLngBounds(e));return n.equals(s)||this.panTo(s,t),this._enforcingBounds=!1,this},panInside:function(e,t){t||={};var n=toPoint(t.paddingTopLeft||t.padding||[0,0]),s=toPoint(t.paddingBottomRight||t.padding||[0,0]),c=this.project(this.getCenter()),l=this.project(e),d=this.getPixelBounds(),f=toBounds([d.min.add(n),d.max.subtract(s)]),p=f.getSize();if(!f.contains(l)){this._enforcingBounds=!0;var m=l.subtract(f.getCenter()),h=f.extend(l).getSize().subtract(p);c.x+=m.x<0?-h.x:h.x,c.y+=m.y<0?-h.y:h.y,this.panTo(this.unproject(c),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=extend({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),s=t.divideBy(2).round(),c=n.divideBy(2).round(),l=s.subtract(c);return!l.x&&!l.y?this:(e.animate&&e.pan?this.panBy(l):(e.pan&&this._rawPanBy(l),this.fire(`move`),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(bind(this.fire,this,`moveend`),200)):this.fire(`moveend`)),this.fire(`resize`,{oldSize:t,newSize:n}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire(`viewreset`),this._stop()},locate:function(e){if(e=this._locateOptions=extend({timeout:1e4,watch:!1},e),!(`geolocation`in navigator))return this._handleGeolocationError({code:0,message:`Geolocation not supported.`}),this;var t=bind(this._handleGeolocationResponse,this),n=bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(t===1?`permission denied`:t===2?`position unavailable`:`timeout`);this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(`locationerror`,{code:t,message:`Geolocation error: `+n+`.`})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=e.coords.latitude,n=e.coords.longitude,s=new LatLng(t,n),c=s.toBounds(e.coords.accuracy*2),l=this._locateOptions;if(l.setView){var d=this.getBoundsZoom(c);this.setView(s,l.maxZoom?Math.min(d,l.maxZoom):d)}var f={latlng:s,bounds:c,timestamp:e.timestamp};for(var p in e.coords)typeof e.coords[p]==`number`&&(f[p]=e.coords[p]);this.fire(`locationfound`,f)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off(`moveend`,this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error(`Map container is being reused by another instance`);try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&=(cancelAnimFrame(this._resizeRequest),null),this._clearHandlers(),this._loaded&&this.fire(`unload`),this._layers)this._layers[e].remove();for(e in this._panes)remove(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=create$1(`div`,`leaflet-pane`+(e?` leaflet-`+e.replace(`Pane`,``)+`-pane`:``),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new LatLngBounds(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=toLatLngBounds(e),n=toPoint(n||[0,0]);var s=this.getZoom()||0,c=this.getMinZoom(),l=this.getMaxZoom(),d=e.getNorthWest(),f=e.getSouthEast(),p=this.getSize().subtract(n),m=toBounds(this.project(f,s),this.project(d,s)).getSize(),h=U.any3d?this.options.zoomSnap:1,g=p.x/m.x,_=p.y/m.y,v=t?Math.max(g,_):Math.min(g,_);return s=this.getScaleZoom(v,s),h&&(s=Math.round(s/(h/100))*(h/100),s=t?Math.ceil(s/h)*h:Math.floor(s/h)*h),Math.max(c,Math.min(l,s))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new Bounds(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e==`string`?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=t===void 0?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=t===void 0?this._zoom:t;var s=n.zoom(e*n.scale(t));return isNaN(s)?1/0:s},project:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.latLngToPoint(toLatLng(e),t)},unproject:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.pointToLatLng(toPoint(e),t)},layerPointToLatLng:function(e){var t=toPoint(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(toLatLng(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(toLatLng(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(toLatLngBounds(e))},distance:function(e,t){return this.options.crs.distance(toLatLng(e),toLatLng(t))},containerPointToLayerPoint:function(e){return toPoint(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return toPoint(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(toPoint(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(e)))},mouseEventToContainerPoint:function(e){return getMousePosition(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=get(e);if(!t)throw Error(`Map container not found.`);if(t._leaflet_id)throw Error(`Map container is already initialized.`);on(t,`scroll`,this._onScroll,this),this._containerId=stamp(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&U.any3d,addClass(e,`leaflet-container`+(U.touch?` leaflet-touch`:``)+(U.retina?` leaflet-retina`:``)+(U.ielt9?` leaflet-oldie`:``)+(U.safari?` leaflet-safari`:``)+(this._fadeAnimated?` leaflet-fade-anim`:``));var t=getStyle(e,`position`);t!==`absolute`&&t!==`relative`&&t!==`fixed`&&t!==`sticky`&&(e.style.position=`relative`),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane(`mapPane`,this._container),setPosition(this._mapPane,new Point(0,0)),this.createPane(`tilePane`),this.createPane(`overlayPane`),this.createPane(`shadowPane`),this.createPane(`markerPane`),this.createPane(`tooltipPane`),this.createPane(`popupPane`),this.options.markerZoomAnimation||(addClass(e.markerPane,`leaflet-zoom-hide`),addClass(e.shadowPane,`leaflet-zoom-hide`))},_resetView:function(e,t,n){setPosition(this._mapPane,new Point(0,0));var s=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire(`viewprereset`);var c=this._zoom!==t;this._moveStart(c,n)._move(e,t)._moveEnd(c),this.fire(`viewreset`),s&&this.fire(`load`)},_moveStart:function(e,t){return e&&this.fire(`zoomstart`),t||this.fire(`movestart`),this},_move:function(e,t,n,s){t===void 0&&(t=this._zoom);var c=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),s?n&&n.pinch&&this.fire(`zoom`,n):((c||n&&n.pinch)&&this.fire(`zoom`,n),this.fire(`move`,n)),this},_moveEnd:function(e){return e&&this.fire(`zoomend`),this.fire(`moveend`)},_stop:function(){return cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error(`Set map center and zoom first.`)},_initEvents:function(e){this._targets={},this._targets[stamp(this._container)]=this;var t=e?off:on;t(this._container,`click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup`,this._handleDOMEvent,this),this.options.trackResize&&t(window,`resize`,this._onResize,this),U.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,`moveend`,this._onMoveEnd)},_onResize:function(){cancelAnimFrame(this._resizeRequest),this._resizeRequest=requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n=[],s,c=t===`mouseout`||t===`mouseover`,l=e.target||e.srcElement,d=!1;l;){if(s=this._targets[stamp(l)],s&&(t===`click`||t===`preclick`)&&this._draggableMoved(s)){d=!0;break}if(s&&s.listens(t,!0)&&(c&&!isExternalTarget(l,e)||(n.push(s),c))||l===this._container)break;l=l.parentNode}return!n.length&&!d&&!c&&this.listens(t,!0)&&(n=[this]),n},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||e.type===`click`&&this._isClickDisabled(t))){var n=e.type;n===`mousedown`&&preventOutline(t),this._fireDOMEvent(e,n)}},_mouseEvents:[`click`,`dblclick`,`mouseover`,`mouseout`,`contextmenu`],_fireDOMEvent:function(e,t,n){if(e.type===`click`){var s=extend({},e);s.type=`preclick`,this._fireDOMEvent(s,s.type,n)}var c=this._findEventTargets(e,t);if(n){for(var l=[],d=0;d<n.length;d++)n[d].listens(t,!0)&&l.push(n[d]);c=l.concat(c)}if(c.length){t===`contextmenu`&&preventDefault(e);var f=c[0],p={originalEvent:e};if(e.type!==`keypress`&&e.type!==`keydown`&&e.type!==`keyup`){var m=f.getLatLng&&(!f._radius||f._radius<=10);p.containerPoint=m?this.latLngToContainerPoint(f.getLatLng()):this.mouseEventToContainerPoint(e),p.layerPoint=this.containerPointToLayerPoint(p.containerPoint),p.latlng=m?f.getLatLng():this.layerPointToLatLng(p.layerPoint)}for(d=0;d<c.length;d++)if(c[d].fire(t,p,!0),p.originalEvent._stopped||c[d].options.bubblingMouseEvents===!1&&indexOf(this._mouseEvents,t)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on(`load`,e,t),this},_getMapPanePos:function(){return getPosition(this._mapPane)||new Point(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var s=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(s)},_latLngBoundsToNewLayerBounds:function(e,t,n){var s=this._getNewPixelOrigin(n,t);return toBounds([this.project(e.getSouthWest(),t)._subtract(s),this.project(e.getNorthWest(),t)._subtract(s),this.project(e.getSouthEast(),t)._subtract(s),this.project(e.getNorthEast(),t)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var s=this.project(e,t),c=this.getSize().divideBy(2),l=new Bounds(s.subtract(c),s.add(c)),d=this._getBoundsOffset(l,n,t);return Math.abs(d.x)<=1&&Math.abs(d.y)<=1?e:this.unproject(s.add(d),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),s=new Bounds(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(s,t))},_getBoundsOffset:function(e,t,n){var s=toBounds(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),c=s.min.subtract(e.min),l=s.max.subtract(e.max);return new Point(this._rebound(c.x,-l.x),this._rebound(c.y,-l.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),s=U.any3d?this.options.zoomSnap:1;return s&&(e=Math.round(e/s)*s),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire(`move`)},_onPanTransitionEnd:function(){removeClass(this._mapPane,`leaflet-pan-anim`),this.fire(`moveend`)},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return(t&&t.animate)!==!0&&!this.getSize().contains(n)?!1:(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=create$1(`div`,`leaflet-proxy leaflet-zoom-animated`);this._panes.mapPane.appendChild(e),this.on(`zoomanim`,function(e){var t=je,n=this._proxy.style[t];setTransform(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on(`load moveend`,this._animMoveEnd,this),this._on(`unload`,this._destroyAnimProxy,this)},_destroyAnimProxy:function(){remove(this._proxy),this.off(`load moveend`,this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();setTransform(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf(`transform`)>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName(`leaflet-zoom-animated`).length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n||={},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(t),c=this._getCenterOffset(e)._divideBy(1-1/s);return n.animate!==!0&&!this.getSize().contains(c)?!1:(requestAnimFrame(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,n,s){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,addClass(this._mapPane,`leaflet-zoom-anim`)),this.fire(`zoomanim`,{center:e,zoom:t,noUpdate:s}),this._tempFireZoomEvent||=this._zoom!==this._animateToZoom,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(bind(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&removeClass(this._mapPane,`leaflet-zoom-anim`),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire(`zoom`),delete this._tempFireZoomEvent,this.fire(`move`),this._moveEnd(!0))}});function createMap(e,t){return new J(e,t)}var Be=Class.extend({options:{position:`topright`},initialize:function(e){setOptions(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),s=e._controlCorners[n];return addClass(t,`leaflet-control`),n.indexOf(`bottom`)===-1?s.appendChild(t):s.insertBefore(t,s.firstChild),this._map.on(`unload`,this.remove,this),this},remove:function(){return this._map?(remove(this._container),this.onRemove&&this.onRemove(this._map),this._map.off(`unload`,this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),control=function(e){return new Be(e)};J.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t=`leaflet-`,n=this._controlContainer=create$1(`div`,t+`control-container`,this._container);function createCorner(s,c){var l=t+s+` `+t+c;e[s+c]=create$1(`div`,l,n)}createCorner(`top`,`left`),createCorner(`top`,`right`),createCorner(`bottom`,`left`),createCorner(`bottom`,`right`)},_clearControlPos:function(){for(var e in this._controlCorners)remove(this._controlCorners[e]);remove(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ve=Be.extend({options:{collapsed:!0,position:`topright`,autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,s){return n<s?-1:+(s<n)}},initialize:function(e,t,n){for(var s in setOptions(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[s],s);for(s in t)this._addLayer(t[s],s,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on(`zoomend`,this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on(`add remove`,this._onLayerChange,this);return this._container},addTo:function(e){return Be.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off(`zoomend`,this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off(`add remove`,this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off(`add remove`,this._onLayerChange,this);var t=this._getLayer(stamp(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){addClass(this._container,`leaflet-control-layers-expanded`),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(addClass(this._section,`leaflet-control-layers-scrollbar`),this._section.style.height=e+`px`):removeClass(this._section,`leaflet-control-layers-scrollbar`),this._checkDisabledLayers(),this},collapse:function(){return removeClass(this._container,`leaflet-control-layers-expanded`),this},_initLayout:function(){var e=`leaflet-control-layers`,t=this._container=create$1(`div`,e),n=this.options.collapsed;t.setAttribute(`aria-haspopup`,!0),disableClickPropagation(t),disableScrollPropagation(t);var s=this._section=create$1(`section`,e+`-list`);n&&(this._map.on(`click`,this.collapse,this),on(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=create$1(`a`,e+`-toggle`,t);c.href=`#`,c.title=`Layers`,c.setAttribute(`role`,`button`),on(c,{keydown:function(e){e.keyCode===13&&this._expandSafely()},click:function(e){preventDefault(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=create$1(`div`,e+`-base`,s),this._separator=create$1(`div`,e+`-separator`,s),this._overlaysList=create$1(`div`,e+`-overlays`,s),t.appendChild(s)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&stamp(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on(`add remove`,this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(bind(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;empty(this._baseLayersList),empty(this._overlaysList),this._layerControlInputs=[];var e,t,n,s,c=0;for(n=0;n<this._layers.length;n++)s=this._layers[n],this._addItem(s),t||=s.overlay,e||=!s.overlay,c+=+!s.overlay;return this.options.hideSingleBase&&(e&&=c>1,this._baseLayersList.style.display=e?``:`none`),this._separator.style.display=t&&e?``:`none`,this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(stamp(e.target)),n=t.overlay?e.type===`add`?`overlayadd`:`overlayremove`:e.type===`add`?`baselayerchange`:null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n=`<input type="radio" class="leaflet-control-layers-selector" name="`+e+`"`+(t?` checked="checked"`:``)+`/>`,s=document.createElement(`div`);return s.innerHTML=n,s.firstChild},_addItem:function(e){var t=document.createElement(`label`),n=this._map.hasLayer(e.layer),s;e.overlay?(s=document.createElement(`input`),s.type=`checkbox`,s.className=`leaflet-control-layers-selector`,s.defaultChecked=n):s=this._createRadioElement(`leaflet-base-layers_`+stamp(this),n),this._layerControlInputs.push(s),s.layerId=stamp(e.layer),on(s,`click`,this._onInputClick,this);var c=document.createElement(`span`);c.innerHTML=` `+e.name;var l=document.createElement(`span`);return t.appendChild(l),l.appendChild(s),l.appendChild(c),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(t),this._checkDisabledLayers(),t},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,t,n,s=[],c=[];this._handlingClick=!0;for(var l=e.length-1;l>=0;l--)t=e[l],n=this._getLayer(t.layerId).layer,t.checked?s.push(n):t.checked||c.push(n);for(l=0;l<c.length;l++)this._map.hasLayer(c[l])&&this._map.removeLayer(c[l]);for(l=0;l<s.length;l++)this._map.hasLayer(s[l])||this._map.addLayer(s[l]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,t,n,s=this._map.getZoom(),c=e.length-1;c>=0;c--)t=e[c],n=this._getLayer(t.layerId).layer,t.disabled=n.options.minZoom!==void 0&&s<n.options.minZoom||n.options.maxZoom!==void 0&&s>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,on(e,`click`,preventDefault),this.expand();var t=this;setTimeout(function(){off(e,`click`,preventDefault),t._preventClick=!1})}}),layers=function(e,t,n){return new Ve(e,t,n)},He=Be.extend({options:{position:`topleft`,zoomInText:`<span aria-hidden="true">+</span>`,zoomInTitle:`Zoom in`,zoomOutText:`<span aria-hidden="true">&#x2212;</span>`,zoomOutTitle:`Zoom out`},onAdd:function(e){var t=`leaflet-control-zoom`,n=create$1(`div`,t+` leaflet-bar`),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,t+`-in`,n,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,t+`-out`,n,this._zoomOut),this._updateDisabled(),e.on(`zoomend zoomlevelschange`,this._updateDisabled,this),n},onRemove:function(e){e.off(`zoomend zoomlevelschange`,this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,s,c){var l=create$1(`a`,n,s);return l.innerHTML=e,l.href=`#`,l.title=t,l.setAttribute(`role`,`button`),l.setAttribute(`aria-label`,t),disableClickPropagation(l),on(l,`click`,stop),on(l,`click`,c,this),on(l,`click`,this._refocusOnMap,this),l},_updateDisabled:function(){var e=this._map,t=`leaflet-disabled`;removeClass(this._zoomInButton,t),removeClass(this._zoomOutButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`false`),this._zoomOutButton.setAttribute(`aria-disabled`,`false`),(this._disabled||e._zoom===e.getMinZoom())&&(addClass(this._zoomOutButton,t),this._zoomOutButton.setAttribute(`aria-disabled`,`true`)),(this._disabled||e._zoom===e.getMaxZoom())&&(addClass(this._zoomInButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`true`))}});J.mergeOptions({zoomControl:!0}),J.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new He,this.addControl(this.zoomControl))});var zoom=function(e){return new He(e)},Ue=Be.extend({options:{position:`bottomleft`,maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t=`leaflet-control-scale`,n=create$1(`div`,t),s=this.options;return this._addScales(s,t+`-line`,n),e.on(s.updateWhenIdle?`moveend`:`move`,this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?`moveend`:`move`,this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=create$1(`div`,t,n)),e.imperial&&(this._iScale=create$1(`div`,t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+` m`:t/1e3+` km`;this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t=e*3.2808399,n,s,c;t>5280?(n=t/5280,s=this._getRoundNum(n),this._updateScale(this._iScale,s+` mi`,s/n)):(c=this._getRoundNum(t),this._updateScale(this._iScale,c+` ft`,c/t))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+`px`,e.innerHTML=t},_getRoundNum:function(e){var t=10**((Math.floor(e)+``).length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}}),scale=function(e){return new Ue(e)},We=Be.extend({options:{position:`bottomright`,prefix:`<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">`+(U.inlineSvg?`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> `:``)+`Leaflet</a>`},initialize:function(e){setOptions(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=create$1(`div`,`leaflet-control-attribution`),disableClickPropagation(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on(`layeradd`,this._addAttribution,this),this._container},onRemove:function(e){e.off(`layeradd`,this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once(`remove`,function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(`, `)),this._container.innerHTML=n.join(` <span aria-hidden="true">|</span> `)}}});J.mergeOptions({attributionControl:!0}),J.addInitHook(function(){this.options.attributionControl&&new We().addTo(this)});var attribution=function(e){return new We(e)};Be.Layers=Ve,Be.Zoom=He,Be.Scale=Ue,Be.Attribution=We,control.layers=layers,control.zoom=zoom,control.scale=scale,control.attribution=attribution;var Ge=Class.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ge.addTo=function(e,t){return e.addHandler(t,this),this};var Ke={Events:g},qe=U.touch?`touchstart mousedown`:`mousedown`,Je=_.extend({options:{clickTolerance:3},initialize:function(e,t,n,s){setOptions(this,s),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||=(on(this._dragStartTarget,qe,this._onDown,this),!0)},disable:function(){this._enabled&&(Je._dragging===this&&this.finishDrag(!0),off(this._dragStartTarget,qe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!hasClass(this._element,`leaflet-zoom-anim`))){if(e.touches&&e.touches.length!==1){Je._dragging===this&&this.finishDrag();return}if(!(Je._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(Je._dragging=this,this._preventOutline&&preventOutline(this._element),disableImageDrag(),disableTextSelection(),!this._moving)){this.fire(`down`);var t=e.touches?e.touches[0]:e,n=getSizedParentNode(this._element);this._startPoint=new Point(t.clientX,t.clientY),this._startPos=getPosition(this._element),this._parentScale=getScale(n);var s=e.type===`mousedown`;on(document,s?`mousemove`:`touchmove`,this._onMove,this),on(document,s?`mouseup`:`touchend touchcancel`,this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var t=e.touches&&e.touches.length===1?e.touches[0]:e,n=new Point(t.clientX,t.clientY)._subtract(this._startPoint);!n.x&&!n.y||Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,preventDefault(e),this._moved||(this.fire(`dragstart`),this._moved=!0,addClass(document.body,`leaflet-dragging`),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),addClass(this._lastTarget,`leaflet-drag-target`)),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire(`predrag`,e),setPosition(this._element,this._newPos),this.fire(`drag`,e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){removeClass(document.body,`leaflet-dragging`),this._lastTarget&&=(removeClass(this._lastTarget,`leaflet-drag-target`),null),off(document,`mousemove touchmove`,this._onMove,this),off(document,`mouseup touchend touchcancel`,this._onUp,this),enableImageDrag(),enableTextSelection();var t=this._moved&&this._moving;this._moving=!1,Je._dragging=!1,t&&this.fire(`dragend`,{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function clipPolygon(e,t,n){var s,c=[1,4,2,8],l,d,f,p,m,h,g,_;for(l=0,h=e.length;l<h;l++)e[l]._code=_getBitCode(e[l],t);for(f=0;f<4;f++){for(g=c[f],s=[],l=0,h=e.length,d=h-1;l<h;d=l++)p=e[l],m=e[d],p._code&g?m._code&g||(_=_getEdgeIntersection(m,p,g,t,n),_._code=_getBitCode(_,t),s.push(_)):(m._code&g&&(_=_getEdgeIntersection(m,p,g,t,n),_._code=_getBitCode(_,t),s.push(_)),s.push(p));e=s}return e}function polygonCenter(e,t){var n,s,c,l,d,f,p,m,h;if(!e||e.length===0)throw Error(`latlngs not passed`);isFlat(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var g=toLatLng([0,0]),_=toLatLngBounds(e);_.getNorthWest().distanceTo(_.getSouthWest())*_.getNorthEast().distanceTo(_.getNorthWest())<1700&&(g=centroid(e));var v=e.length,y=[];for(n=0;n<v;n++){var b=toLatLng(e[n]);y.push(t.project(toLatLng([b.lat-g.lat,b.lng-g.lng])))}for(f=p=m=0,n=0,s=v-1;n<v;s=n++)c=y[n],l=y[s],d=c.y*l.x-l.y*c.x,p+=(c.x+l.x)*d,m+=(c.y+l.y)*d,f+=d*3;h=f===0?y[0]:[p/f,m/f];var x=t.unproject(toPoint(h));return toLatLng([x.lat+g.lat,x.lng+g.lng])}function centroid(e){for(var t=0,n=0,s=0,c=0;c<e.length;c++){var l=toLatLng(e[c]);t+=l.lat,n+=l.lng,s++}return toLatLng([t/s,n/s])}var Ye={__proto__:null,clipPolygon,polygonCenter,centroid};function simplify(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=_reducePoints(e,n),e=_simplifyDP(e,n),e}function pointToSegmentDistance(e,t,n){return Math.sqrt(_sqClosestPointOnSegment(e,t,n,!0))}function closestPointOnSegment(e,t,n){return _sqClosestPointOnSegment(e,t,n)}function _simplifyDP(e,t){var n=e.length,s=new(typeof Uint8Array<`u`?Uint8Array:Array)(n);s[0]=s[n-1]=1,_simplifyDPStep(e,s,t,0,n-1);var c,l=[];for(c=0;c<n;c++)s[c]&&l.push(e[c]);return l}function _simplifyDPStep(e,t,n,s,c){var l=0,d,f,p;for(f=s+1;f<=c-1;f++)p=_sqClosestPointOnSegment(e[f],e[s],e[c],!0),p>l&&(d=f,l=p);l>n&&(t[d]=1,_simplifyDPStep(e,t,n,s,d),_simplifyDPStep(e,t,n,d,c))}function _reducePoints(e,t){for(var n=[e[0]],s=1,c=0,l=e.length;s<l;s++)_sqDist(e[s],e[c])>t&&(n.push(e[s]),c=s);return c<l-1&&n.push(e[l-1]),n}var Xe;function clipSegment(e,t,n,s,c){var l=s?Xe:_getBitCode(e,n),d=_getBitCode(t,n),f,p,m;for(Xe=d;;){if(!(l|d))return[e,t];if(l&d)return!1;f=l||d,p=_getEdgeIntersection(e,t,f,n,c),m=_getBitCode(p,n),f===l?(e=p,l=m):(t=p,d=m)}}function _getEdgeIntersection(e,t,n,s,c){var l=t.x-e.x,d=t.y-e.y,f=s.min,p=s.max,m,h;return n&8?(m=e.x+l*(p.y-e.y)/d,h=p.y):n&4?(m=e.x+l*(f.y-e.y)/d,h=f.y):n&2?(m=p.x,h=e.y+d*(p.x-e.x)/l):n&1&&(m=f.x,h=e.y+d*(f.x-e.x)/l),new Point(m,h,c)}function _getBitCode(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function _sqDist(e,t){var n=t.x-e.x,s=t.y-e.y;return n*n+s*s}function _sqClosestPointOnSegment(e,t,n,s){var c=t.x,l=t.y,d=n.x-c,f=n.y-l,p=d*d+f*f,m;return p>0&&(m=((e.x-c)*d+(e.y-l)*f)/p,m>1?(c=n.x,l=n.y):m>0&&(c+=d*m,l+=f*m)),d=e.x-c,f=e.y-l,s?d*d+f*f:new Point(c,l)}function isFlat(e){return!l(e[0])||typeof e[0][0]!=`object`&&e[0][0]!==void 0}function _flat(e){return console.warn(`Deprecated use of _flat, please use L.LineUtil.isFlat instead.`),isFlat(e)}function polylineCenter(e,t){var n,s,c,l,d,f,p,m;if(!e||e.length===0)throw Error(`latlngs not passed`);isFlat(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var h=toLatLng([0,0]),g=toLatLngBounds(e);g.getNorthWest().distanceTo(g.getSouthWest())*g.getNorthEast().distanceTo(g.getNorthWest())<1700&&(h=centroid(e));var _=e.length,v=[];for(n=0;n<_;n++){var y=toLatLng(e[n]);v.push(t.project(toLatLng([y.lat-h.lat,y.lng-h.lng])))}for(n=0,s=0;n<_-1;n++)s+=v[n].distanceTo(v[n+1])/2;if(s===0)m=v[0];else for(n=0,l=0;n<_-1;n++)if(d=v[n],f=v[n+1],c=d.distanceTo(f),l+=c,l>s){p=(l-s)/c,m=[f.x-p*(f.x-d.x),f.y-p*(f.y-d.y)];break}var b=t.unproject(toPoint(m));return toLatLng([b.lat+h.lat,b.lng+h.lng])}var Ze={__proto__:null,simplify,pointToSegmentDistance,closestPointOnSegment,clipSegment,_getEdgeIntersection,_getBitCode,_sqClosestPointOnSegment,isFlat,_flat,polylineCenter},Qe={project:function(e){return new Point(e.lng,e.lat)},unproject:function(e){return new LatLng(e.y,e.x)},bounds:new Bounds([-180,-90],[180,90])},$e={R:6378137,R_MINOR:6356752.314245179,bounds:new Bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,s=e.lat*t,c=this.R_MINOR/n,l=Math.sqrt(1-c*c),d=l*Math.sin(s),f=Math.tan(Math.PI/4-s/2)/((1-d)/(1+d))**(l/2);return s=-n*Math.log(Math.max(f,1e-10)),new Point(e.lng*t*n,s)},unproject:function(e){for(var t=180/Math.PI,n=this.R,s=this.R_MINOR/n,c=Math.sqrt(1-s*s),l=Math.exp(-e.y/n),d=Math.PI/2-2*Math.atan(l),f=0,p=.1,m;f<15&&Math.abs(p)>1e-7;f++)m=c*Math.sin(d),m=((1-m)/(1+m))**(c/2),p=Math.PI/2-2*Math.atan(l*m)-d,d+=p;return new LatLng(d*t,e.x*t/n)}},et={__proto__:null,LonLat:Qe,Mercator:$e,SphericalMercator:S},tt=extend({},b,{code:`EPSG:3395`,projection:$e,transformation:function(){var e=.5/(Math.PI*$e.R);return toTransformation(e,.5,-e,.5)}()}),nt=extend({},b,{code:`EPSG:4326`,projection:Qe,transformation:toTransformation(1/180,1,-1/180,.5)}),rt=extend({},y,{projection:Qe,transformation:toTransformation(1,0,-1,0),scale:function(e){return 2**e},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,s=t.lat-e.lat;return Math.sqrt(n*n+s*s)},infinite:!0});y.Earth=b,y.EPSG3395=tt,y.EPSG3857=C,y.EPSG900913=T,y.EPSG4326=nt,y.Simple=rt;var it=_.extend({options:{pane:`overlayPane`,attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[stamp(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[stamp(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once(`remove`,function(){t.off(n,this)},this)}this.onAdd(t),this.fire(`add`),t.fire(`layeradd`,{layer:this})}}});J.include({addLayer:function(e){if(!e._layerAdd)throw Error(`The provided object is not a Layer.`);var t=stamp(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=stamp(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire(`layerremove`,{layer:e}),e.fire(`remove`)),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return stamp(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){e=e?l(e)?e:[e]:[];for(var t=0,n=e.length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[stamp(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=stamp(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var s in this._zoomBoundLayers){var c=this._zoomBoundLayers[s].options;e=c.minZoom===void 0?e:Math.min(e,c.minZoom),t=c.maxZoom===void 0?t:Math.max(t,c.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire(`zoomlevelschange`),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var at=it.extend({initialize:function(e,t){setOptions(this,t),this._layers={};var n,s;if(e)for(n=0,s=e.length;n<s;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return(typeof e==`number`?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t=Array.prototype.slice.call(arguments,1),n,s;for(n in this._layers)s=this._layers[n],s[e]&&s[e].apply(s,t);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke(`setZIndex`,e)},getLayerId:function(e){return stamp(e)}}),layerGroup=function(e,t){return new at(e,t)},ot=at.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),at.prototype.addLayer.call(this,e),this.fire(`layeradd`,{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),at.prototype.removeLayer.call(this,e),this.fire(`layerremove`,{layer:e})):this},setStyle:function(e){return this.invoke(`setStyle`,e)},bringToFront:function(){return this.invoke(`bringToFront`)},bringToBack:function(){return this.invoke(`bringToBack`)},getBounds:function(){var e=new LatLngBounds;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),featureGroup=function(e,t){return new ot(e,t)},st=Class.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){setOptions(this,e)},createIcon:function(e){return this._createIcon(`icon`,e)},createShadow:function(e){return this._createIcon(`shadow`,e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if(e===`icon`)throw Error(`iconUrl not set in Icon options (see the docs).`);return null}var s=this._createImg(n,t&&t.tagName===`IMG`?t:null);return this._setIconStyles(s,e),(this.options.crossOrigin||this.options.crossOrigin===``)&&(s.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),s},_setIconStyles:function(e,t){var n=this.options,s=n[t+`Size`];typeof s==`number`&&(s=[s,s]);var c=toPoint(s),l=toPoint(t===`shadow`&&n.shadowAnchor||n.iconAnchor||c&&c.divideBy(2,!0));e.className=`leaflet-marker-`+t+` `+(n.className||``),l&&(e.style.marginLeft=-l.x+`px`,e.style.marginTop=-l.y+`px`),c&&(e.style.width=c.x+`px`,e.style.height=c.y+`px`)},_createImg:function(e,t){return t||=document.createElement(`img`),t.src=e,t},_getIconUrl:function(e){return U.retina&&this.options[e+`RetinaUrl`]||this.options[e+`Url`]}});function icon(e){return new st(e)}var ct=st.extend({options:{iconUrl:`marker-icon.png`,iconRetinaUrl:`marker-icon-2x.png`,shadowUrl:`marker-shadow.png`,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof ct.imagePath!=`string`&&(ct.imagePath=this._detectIconPath()),(this.options.imagePath||ct.imagePath)+st.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var strip=function(e,t,n){var s=t.exec(e);return s&&s[n]};return e=strip(e,/^url\((['"])?(.+)\1\)$/,2),e&&strip(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=create$1(`div`,`leaflet-default-icon-path`,document.body),t=getStyle(e,`background-image`)||getStyle(e,`backgroundImage`);if(document.body.removeChild(e),t=this._stripUrl(t),t)return t;var n=document.querySelector(`link[href$="leaflet.css"]`);return n?n.href.substring(0,n.href.length-11-1):``}}),lt=Ge.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||=new Je(e,e,!0),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),addClass(e,`leaflet-marker-draggable`)},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&removeClass(this._marker._icon,`leaflet-marker-draggable`)},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,s=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,l=getPosition(t._icon),d=n.getPixelBounds(),f=n.getPixelOrigin(),p=toBounds(d.min._subtract(f).add(c),d.max._subtract(f).subtract(c));if(!p.contains(l)){var m=toPoint((Math.max(p.max.x,l.x)-p.max.x)/(d.max.x-p.max.x)-(Math.min(p.min.x,l.x)-p.min.x)/(d.min.x-p.min.x),(Math.max(p.max.y,l.y)-p.max.y)/(d.max.y-p.max.y)-(Math.min(p.min.y,l.y)-p.min.y)/(d.min.y-p.min.y)).multiplyBy(s);n.panBy(m,{animate:!1}),this._draggable._newPos._add(m),this._draggable._startPos._add(m),setPosition(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire(`movestart`).fire(`dragstart`)},_onPreDrag:function(e){this._marker.options.autoPan&&(cancelAnimFrame(this._panRequest),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,s=getPosition(t._icon),c=t._map.layerPointToLatLng(s);n&&setPosition(n,s),t._latlng=c,e.latlng=c,e.oldLatLng=this._oldLatLng,t.fire(`move`,e).fire(`drag`,e)},_onDragEnd:function(e){cancelAnimFrame(this._panRequest),delete this._oldLatLng,this._marker.fire(`moveend`).fire(`dragend`,e)}}),ut=it.extend({options:{icon:new ct,interactive:!0,keyboard:!0,title:``,alt:`Marker`,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:`markerPane`,shadowPane:`shadowPane`,bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){setOptions(this,t),this._latlng=toLatLng(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on(`zoomanim`,this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off(`zoomanim`,this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=toLatLng(e),this.update(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t=`leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`),n=e.icon.createIcon(this._icon),s=!1;n!==this._icon&&(this._icon&&this._removeIcon(),s=!0,e.title&&(n.title=e.title),n.tagName===`IMG`&&(n.alt=e.alt||``)),addClass(n,t),e.keyboard&&(n.tabIndex=`0`,n.setAttribute(`role`,`button`)),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&on(n,`focus`,this._panOnFocus,this);var c=e.icon.createShadow(this._shadow),l=!1;c!==this._shadow&&(this._removeShadow(),l=!0),c&&(addClass(c,t),c.alt=``),this._shadow=c,e.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&l&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&off(this._icon,`focus`,this._panOnFocus,this),remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&remove(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&setPosition(this._icon,e),this._shadow&&setPosition(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(addClass(this._icon,`leaflet-interactive`),this.addInteractiveTarget(this._icon),lt)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new lt(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&setOpacity(this._icon,e),this._shadow&&setOpacity(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?toPoint(t.iconSize):toPoint(0,0),s=t.iconAnchor?toPoint(t.iconAnchor):toPoint(0,0);e.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:n.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function marker(e,t){return new ut(e,t)}var dt=it.extend({options:{stroke:!0,color:`#3388ff`,weight:3,opacity:1,lineCap:`round`,lineJoin:`round`,dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:`evenodd`,interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return setOptions(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,`weight`)&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ft=dt.extend({options:{fill:!0,radius:10},initialize:function(e,t){setOptions(this,t),this._latlng=toLatLng(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=toLatLng(e),this.redraw(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return dt.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),s=[e+n,t+n];this._pxBounds=new Bounds(this._point.subtract(s),this._point.add(s))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function circleMarker(e,t){return new ft(e,t)}var pt=ft.extend({initialize:function(e,t,n){if(typeof t==`number`&&(t=extend({},n,{radius:t})),setOptions(this,t),this._latlng=toLatLng(e),isNaN(this.options.radius))throw Error(`Circle radius cannot be NaN`);this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:dt.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,s=n.options.crs;if(s.distance===b.distance){var c=Math.PI/180,l=this._mRadius/b.R/c,d=n.project([t+l,e]),f=n.project([t-l,e]),p=d.add(f).divideBy(2),m=n.unproject(p).lat,h=Math.acos((Math.cos(l*c)-Math.sin(t*c)*Math.sin(m*c))/(Math.cos(t*c)*Math.cos(m*c)))/c;(isNaN(h)||h===0)&&(h=l/Math.cos(Math.PI/180*t)),this._point=p.subtract(n.getPixelOrigin()),this._radius=isNaN(h)?0:p.x-n.project([m,e-h]).x,this._radiusY=p.y-d.y}else{var g=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(g).x}this._updateBounds()}});function circle(e,t,n){return new pt(e,t,n)}var mt=dt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){setOptions(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,n=null,s=_sqClosestPointOnSegment,c,l,d=0,f=this._parts.length;d<f;d++)for(var p=this._parts[d],m=1,h=p.length;m<h;m++){c=p[m-1],l=p[m];var g=s(e,c,l,!0);g<t&&(t=g,n=s(e,c,l))}return n&&(n.distance=Math.sqrt(t)),n},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return polylineCenter(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t||=this._defaultShape(),e=toLatLng(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new LatLngBounds,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return isFlat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=isFlat(e),s=0,c=e.length;s<c;s++)n?(t[s]=toLatLng(e[s]),this._bounds.extend(t[s])):t[s]=this._convertLatLngs(e[s]);return t},_project:function(){var e=new Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new Point(e,e);this._rawPxBounds&&(this._pxBounds=new Bounds([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var s=e[0]instanceof LatLng,c=e.length,l,d;if(s){for(d=[],l=0;l<c;l++)d[l]=this._map.latLngToLayerPoint(e[l]),n.extend(d[l]);t.push(d)}else for(l=0;l<c;l++)this._projectLatlngs(e[l],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var t=this._parts,n,s,c,l,d,f,p;for(n=0,c=0,l=this._rings.length;n<l;n++)for(p=this._rings[n],s=0,d=p.length;s<d-1;s++)f=clipSegment(p[s],p[s+1],e,s,!0),f&&(t[c]=t[c]||[],t[c].push(f[0]),(f[1]!==p[s+1]||s===d-2)&&(t[c].push(f[1]),c++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,s=e.length;n<s;n++)e[n]=simplify(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,s,c,l,d,f,p=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,l=this._parts.length;n<l;n++)for(f=this._parts[n],s=0,d=f.length,c=d-1;s<d;c=s++)if(!(!t&&s===0)&&pointToSegmentDistance(e,f[c],f[s])<=p)return!0;return!1}});function polyline(e,t){return new mt(e,t)}mt._flat=_flat;var ht=mt.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return polygonCenter(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=mt.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof LatLng&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){mt.prototype._setLatLngs.call(this,e),isFlat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return isFlat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new Point(t,t);if(e=new Bounds(e.min.subtract(n),e.max.add(n)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var s=0,c=this._rings.length,l;s<c;s++)l=clipPolygon(this._rings[s],e,!0),l.length&&this._parts.push(l)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t=!1,n,s,c,l,d,f,p,m;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(l=0,p=this._parts.length;l<p;l++)for(n=this._parts[l],d=0,m=n.length,f=m-1;d<m;f=d++)s=n[d],c=n[f],s.y>e.y!=c.y>e.y&&e.x<(c.x-s.x)*(e.y-s.y)/(c.y-s.y)+s.x&&(t=!t);return t||mt.prototype._containsPoint.call(this,e,!0)}});function polygon(e,t){return new ht(e,t)}var gt=ot.extend({initialize:function(e,t){setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t=l(e)?e:e.features,n,s,c;if(t){for(n=0,s=t.length;n<s;n++)c=t[n],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var d=this.options;if(d.filter&&!d.filter(e))return this;var f=geometryToLayer(e,d);return f?(f.feature=asFeature(e),f.defaultOptions=f.options,this.resetStyle(f),d.onEachFeature&&d.onEachFeature(e,f),this.addLayer(f)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=extend({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&(typeof t==`function`&&(t=t(e.feature)),e.setStyle(t))}});function geometryToLayer(e,t){var n=e.type===`Feature`?e.geometry:e,s=n?n.coordinates:null,c=[],l=t&&t.pointToLayer,d=t&&t.coordsToLatLng||coordsToLatLng,f,p,m,h;if(!s&&!n)return null;switch(n.type){case`Point`:return f=d(s),_pointToLayer(l,e,f,t);case`MultiPoint`:for(m=0,h=s.length;m<h;m++)f=d(s[m]),c.push(_pointToLayer(l,e,f,t));return new ot(c);case`LineString`:case`MultiLineString`:return p=coordsToLatLngs(s,n.type===`LineString`?0:1,d),new mt(p,t);case`Polygon`:case`MultiPolygon`:return p=coordsToLatLngs(s,n.type===`Polygon`?1:2,d),new ht(p,t);case`GeometryCollection`:for(m=0,h=n.geometries.length;m<h;m++){var g=geometryToLayer({geometry:n.geometries[m],type:`Feature`,properties:e.properties},t);g&&c.push(g)}return new ot(c);case`FeatureCollection`:for(m=0,h=n.features.length;m<h;m++){var _=geometryToLayer(n.features[m],t);_&&c.push(_)}return new ot(c);default:throw Error(`Invalid GeoJSON object.`)}}function _pointToLayer(e,t,n,s){return e?e(t,n):new ut(n,s&&s.markersInheritOptions&&s)}function coordsToLatLng(e){return new LatLng(e[1],e[0],e[2])}function coordsToLatLngs(e,t,n){for(var s=[],c=0,l=e.length,d;c<l;c++)d=t?coordsToLatLngs(e[c],t-1,n):(n||coordsToLatLng)(e[c]),s.push(d);return s}function latLngToCoords(e,t){return e=toLatLng(e),e.alt===void 0?[formatNum(e.lng,t),formatNum(e.lat,t)]:[formatNum(e.lng,t),formatNum(e.lat,t),formatNum(e.alt,t)]}function latLngsToCoords(e,t,n,s){for(var c=[],l=0,d=e.length;l<d;l++)c.push(t?latLngsToCoords(e[l],isFlat(e[l])?0:t-1,n,s):latLngToCoords(e[l],s));return!t&&n&&c.length>0&&c.push(c[0].slice()),c}function getFeature(e,t){return e.feature?extend({},e.feature,{geometry:t}):asFeature(t)}function asFeature(e){return e.type===`Feature`||e.type===`FeatureCollection`?e:{type:`Feature`,properties:{},geometry:e}}var _t={toGeoJSON:function(e){return getFeature(this,{type:`Point`,coordinates:latLngToCoords(this.getLatLng(),e)})}};ut.include(_t),pt.include(_t),ft.include(_t),mt.include({toGeoJSON:function(e){var t=!isFlat(this._latlngs),n=latLngsToCoords(this._latlngs,+!!t,!1,e);return getFeature(this,{type:(t?`Multi`:``)+`LineString`,coordinates:n})}}),ht.include({toGeoJSON:function(e){var t=!isFlat(this._latlngs),n=t&&!isFlat(this._latlngs[0]),s=latLngsToCoords(this._latlngs,n?2:+!!t,!0,e);return t||(s=[s]),getFeature(this,{type:(n?`Multi`:``)+`Polygon`,coordinates:s})}}),at.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),getFeature(this,{type:`MultiPoint`,coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(t===`MultiPoint`)return this.toMultiPoint(e);var n=t===`GeometryCollection`,s=[];return this.eachLayer(function(t){if(t.toGeoJSON){var c=t.toGeoJSON(e);if(n)s.push(c.geometry);else{var l=asFeature(c);l.type===`FeatureCollection`?s.push.apply(s,l.features):s.push(l)}}}),n?getFeature(this,{geometries:s,type:`GeometryCollection`}):{type:`FeatureCollection`,features:s}}});function geoJSON(e,t){return new gt(e,t)}var vt=geoJSON,yt=it.extend({options:{opacity:1,alt:``,interactive:!1,crossOrigin:!1,errorOverlayUrl:``,zIndex:1,className:``},initialize:function(e,t,n){this._url=e,this._bounds=toLatLngBounds(t),setOptions(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(addClass(this._image,`leaflet-interactive`),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&toFront(this._image),this},bringToBack:function(){return this._map&&toBack(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=toLatLngBounds(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName===`IMG`,t=this._image=e?this._url:create$1(`img`);if(addClass(t,`leaflet-image-layer`),this._zoomAnimated&&addClass(t,`leaflet-zoom-animated`),this.options.className&&addClass(t,this.options.className),t.onselectstart=falseFn,t.onmousemove=falseFn,t.onload=bind(this.fire,this,`load`),t.onerror=bind(this._overlayOnError,this,`error`),(this.options.crossOrigin||this.options.crossOrigin===``)&&(t.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=t.src;return}t.src=this._url,t.alt=this.options.alt},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;setTransform(this._image,n,t)},_reset:function(){var e=this._image,t=new Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();setPosition(e,t.min),e.style.width=n.x+`px`,e.style.height=n.y+`px`},_updateOpacity:function(){setOpacity(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire(`error`);var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),imageOverlay=function(e,t,n){return new yt(e,t,n)},bt=yt.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName===`VIDEO`,t=this._image=e?this._url:create$1(`video`);if(addClass(t,`leaflet-image-layer`),this._zoomAnimated&&addClass(t,`leaflet-zoom-animated`),this.options.className&&addClass(t,this.options.className),t.onselectstart=falseFn,t.onmousemove=falseFn,t.onloadeddata=bind(this.fire,this,`load`),e){for(var n=t.getElementsByTagName(`source`),s=[],c=0;c<n.length;c++)s.push(n[c].src);this._url=n.length>0?s:[t.src];return}l(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,`objectFit`)&&(t.style.objectFit=`fill`),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var d=0;d<this._url.length;d++){var f=create$1(`source`);f.src=this._url[d],t.appendChild(f)}}});function videoOverlay(e,t,n){return new bt(e,t,n)}var xt=yt.extend({_initImage:function(){var e=this._image=this._url;addClass(e,`leaflet-image-layer`),this._zoomAnimated&&addClass(e,`leaflet-zoom-animated`),this.options.className&&addClass(e,this.options.className),e.onselectstart=falseFn,e.onmousemove=falseFn}});function svgOverlay(e,t,n){return new xt(e,t,n)}var St=it.extend({options:{interactive:!1,offset:[0,0],className:``,pane:void 0,content:``},initialize:function(e,t){e&&(e instanceof LatLng||l(e))?(this._latlng=toLatLng(e),setOptions(this,t)):(setOptions(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&setOpacity(this._container,1),this.bringToFront(),this.options.interactive&&(addClass(this._container,`leaflet-interactive`),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(setOpacity(this._container,0),this._removeTimeout=setTimeout(bind(remove,void 0,this._container),200)):remove(this._container),this.options.interactive&&(removeClass(this._container,`leaflet-interactive`),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=toLatLng(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility=`hidden`,this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility=``,this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&toFront(this._container),this},bringToBack:function(){return this._map&&toBack(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof ot){t=null;var n=this._source._layers;for(var s in n)if(n[s]._map){t=n[s];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else if(t.getBounds)e=t.getBounds().getCenter();else throw Error(`Unable to get source layer LatLng.`);return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t=typeof this._content==`function`?this._content(this._source||this):this._content;if(typeof t==`string`)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire(`contentupdate`)}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=toPoint(this.options.offset),n=this._getAnchor();this._zoomAnimated?setPosition(this._container,e.add(n)):t=t.add(e).add(n);var s=this._containerBottom=-t.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=s+`px`,this._container.style.left=c+`px`}},_getAnchor:function(){return[0,0]}});J.include({_initOverlay:function(e,t,n,s){var c=t;return c instanceof e||(c=new e(s).setContent(t)),n&&c.setLatLng(n),c}}),it.include({_initOverlay:function(e,t,n,s){var c=n;return c instanceof e?(setOptions(c,s),c._source=this):(c=t&&!s?t:new e(s,this),c.setContent(n)),c}});var Ct=St.extend({options:{pane:`popupPane`,offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:``},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,St.prototype.openOn.call(this,e)},onAdd:function(e){St.prototype.onAdd.call(this,e),e.fire(`popupopen`,{popup:this}),this._source&&(this._source.fire(`popupopen`,{popup:this},!0),this._source instanceof dt||this._source.on(`preclick`,stopPropagation))},onRemove:function(e){St.prototype.onRemove.call(this,e),e.fire(`popupclose`,{popup:this}),this._source&&(this._source.fire(`popupclose`,{popup:this},!0),this._source instanceof dt||this._source.off(`preclick`,stopPropagation))},getEvents:function(){var e=St.prototype.getEvents.call(this);return(this.options.closeOnClick===void 0?this._map.options.closePopupOnClick:this.options.closeOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e=`leaflet-popup`,t=this._container=create$1(`div`,e+` `+(this.options.className||``)+` leaflet-zoom-animated`),n=this._wrapper=create$1(`div`,e+`-content-wrapper`,t);if(this._contentNode=create$1(`div`,e+`-content`,n),disableClickPropagation(t),disableScrollPropagation(this._contentNode),on(t,`contextmenu`,stopPropagation),this._tipContainer=create$1(`div`,e+`-tip-container`,t),this._tip=create$1(`div`,e+`-tip`,this._tipContainer),this.options.closeButton){var s=this._closeButton=create$1(`a`,e+`-close-button`,t);s.setAttribute(`role`,`button`),s.setAttribute(`aria-label`,`Close popup`),s.href=`#close`,s.innerHTML=`<span aria-hidden="true">&#215;</span>`,on(s,`click`,function(e){preventDefault(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width=``,t.whiteSpace=`nowrap`;var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+`px`,t.whiteSpace=``,t.height=``;var s=e.offsetHeight,c=this.options.maxHeight,l=`leaflet-popup-scrolled`;c&&s>c?(t.height=c+`px`,addClass(e,l)):removeClass(e,l),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();setPosition(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,t=parseInt(getStyle(this._container,`marginBottom`),10)||0,n=this._container.offsetHeight+t,s=this._containerWidth,c=new Point(this._containerLeft,-n-this._containerBottom);c._add(getPosition(this._container));var l=e.layerPointToContainerPoint(c),d=toPoint(this.options.autoPanPadding),f=toPoint(this.options.autoPanPaddingTopLeft||d),p=toPoint(this.options.autoPanPaddingBottomRight||d),m=e.getSize(),h=0,g=0;l.x+s+p.x>m.x&&(h=l.x+s-m.x+p.x),l.x-h-f.x<0&&(h=l.x-f.x),l.y+n+p.y>m.y&&(g=l.y+n-m.y+p.y),l.y-g-f.y<0&&(g=l.y-f.y),(h||g)&&(this.options.keepInView&&(this._autopanning=!0),e.fire(`autopanstart`).panBy([h,g]))}},_getAnchor:function(){return toPoint(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),popup=function(e,t){return new Ct(e,t)};J.mergeOptions({closePopupOnClick:!0}),J.include({openPopup:function(e,t,n){return this._initOverlay(Ct,e,t,n).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),it.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Ct,this._popup,e,t),this._popupHandlersAdded||=(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),!0),this},unbindPopup:function(){return this._popup&&=(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,null),this},openPopup:function(e){return this._popup&&(this instanceof ot||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){stop(e);var t=e.layer||e.target;if(this._popup._source===t&&!(t instanceof dt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=t,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var wt=St.extend({options:{pane:`tooltipPane`,offset:[0,0],direction:`auto`,permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){St.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire(`tooltipopen`,{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire(`tooltipopen`,{tooltip:this},!0))},onRemove:function(e){St.prototype.onRemove.call(this,e),e.fire(`tooltipclose`,{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire(`tooltipclose`,{tooltip:this},!0))},getEvents:function(){var e=St.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e=`leaflet-tooltip `+(this.options.className||``)+` leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`);this._contentNode=this._container=create$1(`div`,e),this._container.setAttribute(`role`,`tooltip`),this._container.setAttribute(`id`,`leaflet-tooltip-`+stamp(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,s=this._map,c=this._container,l=s.latLngToContainerPoint(s.getCenter()),d=s.layerPointToContainerPoint(e),f=this.options.direction,p=c.offsetWidth,m=c.offsetHeight,h=toPoint(this.options.offset),g=this._getAnchor();f===`top`?(t=p/2,n=m):f===`bottom`?(t=p/2,n=0):f===`center`?(t=p/2,n=m/2):f===`right`?(t=0,n=m/2):f===`left`?(t=p,n=m/2):d.x<l.x?(f=`right`,t=0,n=m/2):(f=`left`,t=p+(h.x+g.x)*2,n=m/2),e=e.subtract(toPoint(t,n,!0)).add(h).add(g),removeClass(c,`leaflet-tooltip-right`),removeClass(c,`leaflet-tooltip-left`),removeClass(c,`leaflet-tooltip-top`),removeClass(c,`leaflet-tooltip-bottom`),addClass(c,`leaflet-tooltip-`+f),setPosition(c,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&setOpacity(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return toPoint(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),tooltip=function(e,t){return new wt(e,t)};J.include({openTooltip:function(e,t,n){return this._initOverlay(wt,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),it.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(wt,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&=(this._initTooltipInteractions(!0),this.closeTooltip(),null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var t=e?`off`:`on`,n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof ot||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&(on(t,`focus`,function(){this._tooltip._source=e,this.openTooltip()},this),on(t,`blur`,this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&t.setAttribute(`aria-describedby`,this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once(`moveend`,function(){t._openOnceFlag=!1,t._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var t=e.latlng,n,s;this._tooltip.options.sticky&&e.originalEvent&&(n=this._map.mouseEventToContainerPoint(e.originalEvent),s=this._map.containerPointToLayerPoint(n),t=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(t)}});var Tt=st.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:`leaflet-div-icon`},createIcon:function(e){var t=e&&e.tagName===`DIV`?e:document.createElement(`div`),n=this.options;if(n.html instanceof Element?(empty(t),t.appendChild(n.html)):t.innerHTML=n.html===!1?``:n.html,n.bgPos){var s=toPoint(n.bgPos);t.style.backgroundPosition=-s.x+`px `+-s.y+`px`}return this._setIconStyles(t,`icon`),t},createShadow:function(){return null}});function divIcon(e){return new Tt(e)}st.Default=ct;var Et=it.extend({options:{tileSize:256,opacity:1,updateWhenIdle:U.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:`tilePane`,className:``,keepBuffer:2},initialize:function(e){setOptions(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),remove(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||=throttle(this._onMoveEnd,this.options.updateInterval,this),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement(`div`)},getTileSize:function(){var e=this.options.tileSize;return e instanceof Point?e:new Point(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t=this.getPane().children,n=-e(-1/0,1/0),s=0,c=t.length,l;s<c;s++)l=t[s].style.zIndex,t[s]!==this._container&&l&&(n=e(n,+l));isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!U.ielt9){setOpacity(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var s in this._tiles){var c=this._tiles[s];if(!(!c.current||!c.loaded)){var l=Math.min(1,(e-c.loaded)/200);setOpacity(c.el,l),l<1?t=!0:(c.active?n=!0:this._onOpaqueTile(c),c.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this))}},_onOpaqueTile:falseFn,_initContainer:function(){this._container||(this._container=create$1(`div`,`leaflet-layer `+(this.options.className||``)),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(e!==void 0){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(remove(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var s=this._levels[e],c=this._map;return s||(s=this._levels[e]={},s.el=create$1(`div`,`leaflet-tile-container leaflet-zoom-animated`,this._container),s.el.style.zIndex=t,s.origin=c.project(c.unproject(c.getPixelOrigin()),e).round(),s.zoom=e,this._setZoomTransform(s,c.getCenter(),c.getZoom()),s.el.offsetWidth,this._onCreateLevel(s)),this._level=s,s}},_onUpdateLevel:falseFn,_onRemoveLevel:falseFn,_onCreateLevel:falseFn,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)t=this._tiles[e],t.retain=t.current;for(e in this._tiles)if(t=this._tiles[e],t.current&&!t.active){var s=t.coords;this._retainParent(s.x,s.y,s.z,s.z-5)||this._retainChildren(s.x,s.y,s.z,s.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)remove(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,s){var c=Math.floor(e/2),l=Math.floor(t/2),d=n-1,f=new Point(+c,+l);f.z=+d;var p=this._tileCoordsToKey(f),m=this._tiles[p];return m&&m.active?(m.retain=!0,!0):(m&&m.loaded&&(m.retain=!0),d>s?this._retainParent(c,l,d,s):!1)},_retainChildren:function(e,t,n,s){for(var c=2*e;c<2*e+2;c++)for(var l=2*t;l<2*t+2;l++){var d=new Point(c,l);d.z=n+1;var f=this._tileCoordsToKey(d),p=this._tiles[f];if(p&&p.active){p.retain=!0;continue}else p&&p.loaded&&(p.retain=!0);n+1<s&&this._retainChildren(c,l,n+1,s)}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,s){var c=Math.round(t);c=this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?void 0:this._clampZoom(c);var l=this.options.updateWhenZooming&&c!==this._tileZoom;(!s||l)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var s=this._map.getZoomScale(n,e.zoom),c=e.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(t,n)).round();U.any3d?setTransform(e.el,c,s):setPosition(e.el,c)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),s=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],s).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],s).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],s).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],s).y/n.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),s=t.getZoomScale(n,this._tileZoom),c=t.project(e,this._tileZoom).floor(),l=t.getSize().divideBy(s*2);return new Bounds(c.subtract(l),c.add(l))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom!==void 0){var s=this._getTiledPixelBounds(e),c=this._pxBoundsToTileRange(s),l=c.getCenter(),d=[],f=this.options.keepBuffer,p=new Bounds(c.getBottomLeft().subtract([f,-f]),c.getTopRight().add([f,-f]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw Error(`Attempted to load an infinite number of tiles`);for(var m in this._tiles){var h=this._tiles[m].coords;(h.z!==this._tileZoom||!p.contains(new Point(h.x,h.y)))&&(this._tiles[m].current=!1)}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var g=c.min.y;g<=c.max.y;g++)for(var _=c.min.x;_<=c.max.x;_++){var v=new Point(_,g);if(v.z=this._tileZoom,this._isValidTile(v)){var y=this._tiles[this._tileCoordsToKey(v)];y?y.current=!0:d.push(v)}}if(d.sort(function(e,t){return e.distanceTo(l)-t.distanceTo(l)}),d.length!==0){this._loading||(this._loading=!0,this.fire(`loading`));var b=document.createDocumentFragment();for(_=0;_<d.length;_++)this._addTile(d[_],b);this._level.el.appendChild(b)}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var s=this._tileCoordsToBounds(e);return toLatLngBounds(this.options.bounds).overlaps(s)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),s=e.scaleBy(n),c=s.add(n);return[t.unproject(s,e.z),t.unproject(c,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new LatLngBounds(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+`:`+e.y+`:`+e.z},_keyToTileCoords:function(e){var t=e.split(`:`),n=new Point(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(remove(t.el),delete this._tiles[e],this.fire(`tileunload`,{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){addClass(e,`leaflet-tile`);var t=this.getTileSize();e.style.width=t.x+`px`,e.style.height=t.y+`px`,e.onselectstart=falseFn,e.onmousemove=falseFn,U.ielt9&&this.options.opacity<1&&setOpacity(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),s=this._tileCoordsToKey(e),c=this.createTile(this._wrapCoords(e),bind(this._tileReady,this,e));this._initTile(c),this.createTile.length<2&&requestAnimFrame(bind(this._tileReady,this,e,null,c)),setPosition(c,n),this._tiles[s]={el:c,coords:e,current:!0},t.appendChild(c),this.fire(`tileloadstart`,{tile:c,coords:e})},_tileReady:function(e,t,n){t&&this.fire(`tileerror`,{error:t,tile:n,coords:e});var s=this._tileCoordsToKey(e);n=this._tiles[s],n&&(n.loaded=+new Date,this._map._fadeAnimated?(setOpacity(n.el,0),cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(addClass(n.el,`leaflet-tile-loaded`),this.fire(`tileload`,{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire(`load`),U.ielt9||!this._map._fadeAnimated?requestAnimFrame(this._pruneTiles,this):setTimeout(bind(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new Point(this._wrapX?wrapNum(e.x,this._wrapX):e.x,this._wrapY?wrapNum(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new Bounds(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function gridLayer(e){return new Et(e)}var Dt=Et.extend({options:{minZoom:0,maxZoom:18,subdomains:`abc`,errorTileUrl:``,zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,t=setOptions(this,t),t.detectRetina&&U.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),typeof t.subdomains==`string`&&(t.subdomains=t.subdomains.split(``)),this.on(`tileunload`,this._onTileRemove)},setUrl:function(e,t){return this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement(`img`);return on(n,`load`,bind(this._tileOnLoad,this,t,n)),on(n,`error`,bind(this._tileOnError,this,t,n)),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),typeof this.options.referrerPolicy==`string`&&(n.referrerPolicy=this.options.referrerPolicy),n.alt=``,n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:U.retina?`@2x`:``,s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=n),t[`-y`]=n}return template(this._url,extend(t,this.options))},_tileOnLoad:function(e,t){U.ielt9?setTimeout(bind(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var s=this.options.errorTileUrl;s&&t.getAttribute(`src`)!==s&&(t.src=s),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,s=this.options.zoomOffset;return n&&(e=t-e),e+s},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,t.onload=falseFn,t.onerror=falseFn,!t.complete)){t.src=d;var n=this._tiles[e].coords;remove(t),delete this._tiles[e],this.fire(`tileabort`,{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute(`src`,d),Et.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(!(!this._map||n&&n.getAttribute(`src`)===d))return Et.prototype._tileReady.call(this,e,t,n)}});function tileLayer(e,t){return new Dt(e,t)}var Ot=Dt.extend({defaultWmsParams:{service:`WMS`,request:`GetMap`,layers:``,styles:``,format:`image/jpeg`,transparent:!1,version:`1.1.1`},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var n=extend({},this.defaultWmsParams);for(var s in t)s in this.options||(n[s]=t[s]);t=setOptions(this,t);var c=t.detectRetina&&U.retina?2:1,l=this.getTileSize();n.width=l.x*c,n.height=l.y*c,this.wmsParams=n},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?`crs`:`srs`;this.wmsParams[t]=this._crs.code,Dt.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,s=toBounds(n.project(t[0]),n.project(t[1])),c=s.min,l=s.max,d=(this._wmsVersion>=1.3&&this._crs===nt?[c.y,c.x,l.y,l.x]:[c.x,c.y,l.x,l.y]).join(`,`),f=Dt.prototype.getTileUrl.call(this,e);return f+getParamString(this.wmsParams,f,this.options.uppercase)+(this.options.uppercase?`&BBOX=`:`&bbox=`)+d},setParams:function(e,t){return extend(this.wmsParams,e),t||this.redraw(),this}});function tileLayerWMS(e,t){return new Ot(e,t)}Dt.WMS=Ot,tileLayer.wms=tileLayerWMS;var kt=it.extend({options:{padding:.1},initialize:function(e){setOptions(this,e),stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),addClass(this._container,`leaflet-zoom-animated`)),this.getPane().appendChild(this._container),this._update(),this.on(`update`,this._updatePaths,this)},onRemove:function(){this.off(`update`,this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,t),l=s.multiplyBy(-n).add(c).subtract(this._map._getNewPixelOrigin(e,t));U.any3d?setTransform(this._container,l,n):setPosition(this._container,l)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new Bounds(n,n.add(t.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),At=kt.extend({options:{tolerance:0},getEvents:function(){var e=kt.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){kt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement(`canvas`);on(e,`mousemove`,this._onMouseMove,this),on(e,`click dblclick mousedown mouseup contextmenu`,this._onClick,this),on(e,`mouseout`,this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext(`2d`)},_destroyContainer:function(){cancelAnimFrame(this._redrawRequest),delete this._ctx,remove(this._container),off(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;for(var t in this._redrawBounds=null,this._layers)e=this._layers[t],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){kt.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),s=U.retina?2:1;setPosition(t,e.min),t.width=s*n.x,t.height=s*n.y,t.style.width=n.x+`px`,t.style.height=n.y+`px`,U.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire(`update`)}},_reset:function(){kt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[stamp(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,s=t.prev;n?n.prev=s:this._drawLast=s,s?s.next=n:this._drawFirst=n,delete e._order,delete this._layers[stamp(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray==`string`){var t=e.options.dashArray.split(/[, ]+/),n=[],s,c;for(c=0;c<t.length;c++){if(s=Number(t[c]),isNaN(s))return;n.push(s)}e.options._dashArray=n}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Bounds,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)e=s.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,s,c,l,d=e._parts,f=d.length,p=this._ctx;if(f){for(p.beginPath(),n=0;n<f;n++){for(s=0,c=d[n].length;s<c;s++)l=d[n][s],p[s?`lineTo`:`moveTo`](l.x,l.y);t&&p.closePath()}this._fillStroke(p,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var t=e._point,n=this._ctx,s=Math.max(Math.round(e._radius),1),c=(Math.max(Math.round(e._radiusY),1)||s)/s;c!==1&&(n.save(),n.scale(1,c)),n.beginPath(),n.arc(t.x,t.y/c,s,0,Math.PI*2,!1),c!==1&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||`evenodd`)),n.stroke&&n.weight!==0&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t=this._map.mouseEventToLayerPoint(e),n,s,c=this._drawFirst;c;c=c.next)n=c.layer,n.options.interactive&&n._containsPoint(t)&&(!(e.type===`click`||e.type===`preclick`)||!this._map._draggableMoved(n))&&(s=n);this._fireEvent(s?[s]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(removeClass(this._container,`leaflet-interactive`),this._fireEvent([t],e,`mouseout`),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,s,c=this._drawFirst;c;c=c.next)n=c.layer,n.options.interactive&&n._containsPoint(t)&&(s=n);s!==this._hoveredLayer&&(this._handleMouseOut(e),s&&(addClass(this._container,`leaflet-interactive`),this._fireEvent([s],e,`mouseover`),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(bind(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,s=t.prev;if(n)n.prev=s;else return;s?s.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,s=t.prev;if(s)s.next=n;else return;n?n.prev=s:s&&(this._drawLast=s),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}}});function canvas(e){return U.canvas?new At(e):null}var jt=(function(){try{return document.namespaces.add(`lvml`,`urn:schemas-microsoft-com:vml`),function(e){return document.createElement(`<lvml:`+e+` class="lvml">`)}}catch{}return function(e){return document.createElement(`<`+e+` xmlns="urn:schemas-microsoft.com:vml" class="lvml">`)}})(),Mt={_initContainer:function(){this._container=create$1(`div`,`leaflet-vml-container`)},_update:function(){this._map._animatingZoom||(kt.prototype._update.call(this),this.fire(`update`))},_initPath:function(e){var t=e._container=jt(`shape`);addClass(t,`leaflet-vml-shape `+(this.options.className||``)),t.coordsize=`1 1`,e._path=jt(`path`),t.appendChild(e._path),this._updateStyle(e),this._layers[stamp(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;remove(t),e.removeInteractiveTarget(t),delete this._layers[stamp(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,s=e.options,c=e._container;c.stroked=!!s.stroke,c.filled=!!s.fill,s.stroke?(t||=e._stroke=jt(`stroke`),c.appendChild(t),t.weight=s.weight+`px`,t.color=s.color,t.opacity=s.opacity,s.dashArray?t.dashStyle=l(s.dashArray)?s.dashArray.join(` `):s.dashArray.replace(/( *, *)/g,` `):t.dashStyle=``,t.endcap=s.lineCap.replace(`butt`,`flat`),t.joinstyle=s.lineJoin):t&&(c.removeChild(t),e._stroke=null),s.fill?(n||=e._fill=jt(`fill`),c.appendChild(n),n.color=s.fillColor||s.color,n.opacity=s.fillOpacity):n&&(c.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),s=Math.round(e._radiusY||n);this._setPath(e,e._empty()?`M0 0`:`AL `+t.x+`,`+t.y+` `+n+`,`+s+` 0,23592600`)},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){toFront(e._container)},_bringToBack:function(e){toBack(e._container)}},Nt=U.vml?jt:svgCreate,Pt=kt.extend({_initContainer:function(){this._container=Nt(`svg`),this._container.setAttribute(`pointer-events`,`none`),this._rootGroup=Nt(`g`),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){remove(this._container),off(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){kt.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,n.setAttribute(`width`,t.x),n.setAttribute(`height`,t.y)),setPosition(n,e.min),n.setAttribute(`viewBox`,[e.min.x,e.min.y,t.x,t.y].join(` `)),this.fire(`update`)}},_initPath:function(e){var t=e._path=Nt(`path`);e.options.className&&addClass(t,e.options.className),e.options.interactive&&addClass(t,`leaflet-interactive`),this._updateStyle(e),this._layers[stamp(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){remove(e._path),e.removeInteractiveTarget(e._path),delete this._layers[stamp(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute(`stroke`,n.color),t.setAttribute(`stroke-opacity`,n.opacity),t.setAttribute(`stroke-width`,n.weight),t.setAttribute(`stroke-linecap`,n.lineCap),t.setAttribute(`stroke-linejoin`,n.lineJoin),n.dashArray?t.setAttribute(`stroke-dasharray`,n.dashArray):t.removeAttribute(`stroke-dasharray`),n.dashOffset?t.setAttribute(`stroke-dashoffset`,n.dashOffset):t.removeAttribute(`stroke-dashoffset`)):t.setAttribute(`stroke`,`none`),n.fill?(t.setAttribute(`fill`,n.fillColor||n.color),t.setAttribute(`fill-opacity`,n.fillOpacity),t.setAttribute(`fill-rule`,n.fillRule||`evenodd`)):t.setAttribute(`fill`,`none`))},_updatePoly:function(e,t){this._setPath(e,pointsToPath(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),s=Math.max(Math.round(e._radiusY),1)||n,c=`a`+n+`,`+s+` 0 1,0 `,l=e._empty()?`M0 0`:`M`+(t.x-n)+`,`+t.y+c+n*2+`,0 `+c+-n*2+`,0 `;this._setPath(e,l)},_setPath:function(e,t){e._path.setAttribute(`d`,t)},_bringToFront:function(e){toFront(e._path)},_bringToBack:function(e){toBack(e._path)}});U.vml&&Pt.include(Mt);function svg(e){return U.svg||U.vml?new Pt(e):null}J.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||=this._renderer=this._createRenderer(),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if(e===`overlayPane`||e===void 0)return!1;var t=this._paneRenderers[e];return t===void 0&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&canvas(e)||svg(e)}});var Ft=ht.extend({initialize:function(e,t){ht.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=toLatLngBounds(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function rectangle(e,t){return new Ft(e,t)}Pt.create=Nt,Pt.pointsToPath=pointsToPath,gt.geometryToLayer=geometryToLayer,gt.coordsToLatLng=coordsToLatLng,gt.coordsToLatLngs=coordsToLatLngs,gt.latLngToCoords=latLngToCoords,gt.latLngsToCoords=latLngsToCoords,gt.getFeature=getFeature,gt.asFeature=asFeature,J.mergeOptions({boxZoom:!0});var It=Ge.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on(`unload`,this._destroy,this)},addHooks:function(){on(this._container,`mousedown`,this._onMouseDown,this)},removeHooks:function(){off(this._container,`mousedown`,this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){remove(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),disableTextSelection(),disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(e),on(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=create$1(`div`,`leaflet-zoom-box`,this._container),addClass(this._container,`leaflet-crosshair`),this._map.fire(`boxzoomstart`)),this._point=this._map.mouseEventToContainerPoint(e);var t=new Bounds(this._point,this._startPoint),n=t.getSize();setPosition(this._box,t.min),this._box.style.width=n.x+`px`,this._box.style.height=n.y+`px`},_finish:function(){this._moved&&(remove(this._box),removeClass(this._container,`leaflet-crosshair`)),enableTextSelection(),enableImageDrag(),off(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(bind(this._resetState,this),0);var t=new LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire(`boxzoomend`,{boxZoomBounds:t})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});J.addInitHook(`addHandler`,`boxZoom`,It),J.mergeOptions({doubleClickZoom:!0});var Lt=Ge.extend({addHooks:function(){this._map.on(`dblclick`,this._onDoubleClick,this)},removeHooks:function(){this._map.off(`dblclick`,this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),s=t.options.zoomDelta,c=e.originalEvent.shiftKey?n-s:n+s;t.options.doubleClickZoom===`center`?t.setZoom(c):t.setZoomAround(e.containerPoint,c)}});J.addInitHook(`addHandler`,`doubleClickZoom`,Lt),J.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Rt=Ge.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Je(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on(`predrag`,this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on(`predrag`,this._onPreDragWrap,this),e.on(`zoomend`,this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}addClass(this._map._container,`leaflet-grab leaflet-touch-drag`),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){removeClass(this._map._container,`leaflet-grab`),removeClass(this._map._container,`leaflet-touch-drag`),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=toLatLngBounds(this._map.options.maxBounds);this._offsetLimit=toBounds(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire(`movestart`).fire(`dragstart`),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire(`move`,e).fire(`drag`,e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,s=this._draggable._newPos.x,c=(s-t+n)%e+t-n,l=(s+t+n)%e-t-n,d=Math.abs(c+n)<Math.abs(l+n)?c:l;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=d},_onDragEnd:function(e){var t=this._map,n=t.options,s=!n.inertia||e.noInertia||this._times.length<2;if(t.fire(`dragend`,e),s)t.fire(`moveend`);else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),l=(this._lastTime-this._times[0])/1e3,d=n.easeLinearity,f=c.multiplyBy(d/l),p=f.distanceTo([0,0]),m=Math.min(n.inertiaMaxSpeed,p),h=f.multiplyBy(m/p),g=m/(n.inertiaDeceleration*d),_=h.multiplyBy(-g/2).round();!_.x&&!_.y?t.fire(`moveend`):(_=t._limitOffset(_,t.options.maxBounds),requestAnimFrame(function(){t.panBy(_,{duration:g,easeLinearity:d,noMoveStart:!0,animate:!0})}))}}});J.addInitHook(`addHandler`,`dragging`,Rt),J.mergeOptions({keyboard:!0,keyboardPanDelta:80});var zt=Ge.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex=`0`),on(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,s=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(s,n)}},_onFocus:function(){this._focused=!0,this._map.fire(`focus`)},_onBlur:function(){this._focused=!1,this._map.fire(`blur`)},_setPanDelta:function(e){var t=this._panKeys={},n=this.keyCodes,s,c;for(s=0,c=n.left.length;s<c;s++)t[n.left[s]]=[-1*e,0];for(s=0,c=n.right.length;s<c;s++)t[n.right[s]]=[e,0];for(s=0,c=n.down.length;s<c;s++)t[n.down[s]]=[0,e];for(s=0,c=n.up.length;s<c;s++)t[n.up[s]]=[0,-1*e]},_setZoomDelta:function(e){var t=this._zoomKeys={},n=this.keyCodes,s,c;for(s=0,c=n.zoomIn.length;s<c;s++)t[n.zoomIn[s]]=e;for(s=0,c=n.zoomOut.length;s<c;s++)t[n.zoomOut[s]]=-e},_addHooks:function(){on(document,`keydown`,this._onKeyDown,this)},_removeHooks:function(){off(document,`keydown`,this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=e.keyCode,n=this._map,s;if(t in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(s=this._panKeys[t],e.shiftKey&&(s=toPoint(s).multiplyBy(3)),n.options.maxBounds&&(s=n._limitOffset(toPoint(s),n.options.maxBounds)),n.options.worldCopyJump){var c=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(s)));n.panTo(c)}else n.panBy(s)}else if(t in this._zoomKeys)n.setZoom(n.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[t]);else if(t===27&&n._popup&&n._popup.options.closeOnEscapeKey)n.closePopup();else return;stop(e)}}});J.addInitHook(`addHandler`,`keyboard`,zt),J.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Bt=Ge.extend({addHooks:function(){on(this._map._container,`wheel`,this._onWheelScroll,this),this._delta=0},removeHooks:function(){off(this._map._container,`wheel`,this._onWheelScroll,this)},_onWheelScroll:function(e){var t=getWheelDelta(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||=+new Date;var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(bind(this._performZoom,this),s),stop(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,l=n?Math.ceil(c/n)*n:c,d=e._limitZoom(t+(this._delta>0?l:-l))-t;this._delta=0,this._startTime=null,d&&(e.options.scrollWheelZoom===`center`?e.setZoom(t+d):e.setZoomAround(this._lastMousePos,t+d))}});J.addInitHook(`addHandler`,`scrollWheelZoom`,Bt);var Vt=600;J.mergeOptions({tapHold:U.touchNative&&U.safari&&U.mobile,tapTolerance:15});var Ht=Ge.extend({addHooks:function(){on(this._map._container,`touchstart`,this._onDown,this)},removeHooks:function(){off(this._map._container,`touchstart`,this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var t=e.touches[0];this._startPos=this._newPos=new Point(t.clientX,t.clientY),this._holdTimeout=setTimeout(bind(function(){this._cancel(),this._isTapValid()&&(on(document,`touchend`,preventDefault),on(document,`touchend touchcancel`,this._cancelClickPrevent),this._simulateEvent(`contextmenu`,t))},this),Vt),on(document,`touchend touchcancel contextmenu`,this._cancel,this),on(document,`touchmove`,this._onMove,this)}},_cancelClickPrevent:function cancelClickPrevent(){off(document,`touchend`,preventDefault),off(document,`touchend touchcancel`,cancelClickPrevent)},_cancel:function(){clearTimeout(this._holdTimeout),off(document,`touchend touchcancel contextmenu`,this._cancel,this),off(document,`touchmove`,this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new Point(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});J.addInitHook(`addHandler`,`tapHold`,Ht),J.mergeOptions({touchZoom:U.touch,bounceAtZoomLimits:!0});var Ut=Ge.extend({addHooks:function(){addClass(this._map._container,`leaflet-touch-zoom`),on(this._map._container,`touchstart`,this._onTouchStart,this)},removeHooks:function(){removeClass(this._map._container,`leaflet-touch-zoom`),off(this._map._container,`touchstart`,this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(!(!e.touches||e.touches.length!==2||t._animatingZoom||this._zooming)){var n=t.mouseEventToContainerPoint(e.touches[0]),s=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.touchZoom!==`center`&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),on(document,`touchmove`,this._onTouchMove,this),on(document,`touchend touchcancel`,this._onTouchEnd,this),preventDefault(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),s=t.mouseEventToContainerPoint(e.touches[1]),c=n.distanceTo(s)/this._startDist;if(this._zoom=t.getScaleZoom(c,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&c<1||this._zoom>t.getMaxZoom()&&c>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom===`center`){if(this._center=this._startLatLng,c===1)return}else{var l=n._add(s)._divideBy(2)._subtract(this._centerPoint);if(c===1&&l.x===0&&l.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(l),this._zoom)}this._moved||=(t._moveStart(!0,!1),!0),cancelAnimFrame(this._animRequest);var d=bind(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimFrame(d,this,!0),preventDefault(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,cancelAnimFrame(this._animRequest),off(document,`touchmove`,this._onTouchMove,this),off(document,`touchend touchcancel`,this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});J.addInitHook(`addHandler`,`touchZoom`,Ut),J.BoxZoom=It,J.DoubleClickZoom=Lt,J.Drag=Rt,J.Keyboard=zt,J.ScrollWheelZoom=Bt,J.TapHold=Ht,J.TouchZoom=Ut,e.Bounds=Bounds,e.Browser=U,e.CRS=y,e.Canvas=At,e.Circle=pt,e.CircleMarker=ft,e.Class=Class,e.Control=Be,e.DivIcon=Tt,e.DivOverlay=St,e.DomEvent=Re,e.DomUtil=K,e.Draggable=Je,e.Evented=_,e.FeatureGroup=ot,e.GeoJSON=gt,e.GridLayer=Et,e.Handler=Ge,e.Icon=st,e.ImageOverlay=yt,e.LatLng=LatLng,e.LatLngBounds=LatLngBounds,e.Layer=it,e.LayerGroup=at,e.LineUtil=Ze,e.Map=J,e.Marker=ut,e.Mixin=Ke,e.Path=dt,e.Point=Point,e.PolyUtil=Ye,e.Polygon=ht,e.Polyline=mt,e.Popup=Ct,e.PosAnimation=ze,e.Projection=et,e.Rectangle=Ft,e.Renderer=kt,e.SVG=Pt,e.SVGOverlay=xt,e.TileLayer=Dt,e.Tooltip=wt,e.Transformation=Transformation,e.Util=h,e.VideoOverlay=bt,e.bind=bind,e.bounds=toBounds,e.canvas=canvas,e.circle=circle,e.circleMarker=circleMarker,e.control=control,e.divIcon=divIcon,e.extend=extend,e.featureGroup=featureGroup,e.geoJSON=geoJSON,e.geoJson=vt,e.gridLayer=gridLayer,e.icon=icon,e.imageOverlay=imageOverlay,e.latLng=toLatLng,e.latLngBounds=toLatLngBounds,e.layerGroup=layerGroup,e.map=createMap,e.marker=marker,e.point=toPoint,e.polygon=polygon,e.polyline=polyline,e.popup=popup,e.rectangle=rectangle,e.setOptions=setOptions,e.stamp=stamp,e.svg=svg,e.svgOverlay=svgOverlay,e.tileLayer=tileLayer,e.tooltip=tooltip,e.transformation=toTransformation,e.version=t,e.videoOverlay=videoOverlay;var Wt=window.L;e.noConflict=function(){return window.L=Wt,this},window.L=e}))}))(),1);(function(e,t,n){function o(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}L.drawVersion=`1.0.4`,L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:`Cancel drawing`,text:`Cancel`},finish:{title:`Finish drawing`,text:`Finish`},undo:{title:`Delete last point drawn`,text:`Delete last point`},buttons:{polyline:`Draw a polyline`,polygon:`Draw a polygon`,rectangle:`Draw a rectangle`,circle:`Draw a circle`,marker:`Draw a marker`,circlemarker:`Draw a circlemarker`}},handlers:{circle:{tooltip:{start:`Click and drag to draw circle.`},radius:`Radius`},circlemarker:{tooltip:{start:`Click map to place circle marker.`}},marker:{tooltip:{start:`Click map to place marker.`}},polygon:{tooltip:{start:`Click to start drawing shape.`,cont:`Click to continue drawing shape.`,end:`Click first point to close this shape.`}},polyline:{error:`<strong>Error:</strong> shape edges cannot cross!`,tooltip:{start:`Click to start drawing line.`,cont:`Click to continue drawing line.`,end:`Click last point to finish line.`}},rectangle:{tooltip:{start:`Click and drag to draw rectangle.`}},simpleshape:{tooltip:{end:`Release mouse to finish drawing.`}}}},edit:{toolbar:{actions:{save:{title:`Save changes`,text:`Save`},cancel:{title:`Cancel editing, discards all changes`,text:`Cancel`},clearAll:{title:`Clear all layers`,text:`Clear All`}},buttons:{edit:`Edit layers`,editDisabled:`No layers to edit`,remove:`Delete layers`,removeDisabled:`No layers to delete`}},handlers:{edit:{tooltip:{text:`Drag handles or markers to edit features.`,subtext:`Click cancel to undo changes.`}},remove:{tooltip:{text:`Click on a feature to remove.`}}}}},L.Draw.Event={},L.Draw.Event.CREATED=`draw:created`,L.Draw.Event.EDITED=`draw:edited`,L.Draw.Event.DELETED=`draw:deleted`,L.Draw.Event.DRAWSTART=`draw:drawstart`,L.Draw.Event.DRAWSTOP=`draw:drawstop`,L.Draw.Event.DRAWVERTEX=`draw:drawvertex`,L.Draw.Event.EDITSTART=`draw:editstart`,L.Draw.Event.EDITMOVE=`draw:editmove`,L.Draw.Event.EDITRESIZE=`draw:editresize`,L.Draw.Event.EDITVERTEX=`draw:editvertex`,L.Draw.Event.EDITSTOP=`draw:editstop`,L.Draw.Event.DELETESTART=`draw:deletestart`,L.Draw.Event.DELETESTOP=`draw:deletestop`,L.Draw.Event.TOOLBAROPENED=`draw:toolbaropened`,L.Draw.Event.TOOLBARCLOSED=`draw:toolbarclosed`,L.Draw.Event.MARKERCONTEXT=`draw:markercontext`,L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(e,t){this._map=e,this._container=e._container,this._overlayPane=e._panes.overlayPane,this._popupPane=e._panes.popupPane,t&&t.shapeOptions&&(t.shapeOptions=L.Util.extend({},this.options.shapeOptions,t.shapeOptions)),L.setOptions(this,t);var n=L.version.split(`.`);parseInt(n[0],10)===1&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire(`enabled`,{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire(`disabled`,{handler:this.type}))},addHooks:function(){var e=this._map;e&&(L.DomUtil.disableTextSelection(),e.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,`keyup`,this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,`keyup`,this._cancelDrawing,this))},setOptions:function(e){L.setOptions(this,e)},_fireCreatedEvent:function(e){this._map.fire(L.Draw.Event.CREATED,{layer:e,layerType:this.type})},_cancelDrawing:function(e){e.keyCode===27&&(this._map.fire(`draw:canceled`,{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:`polyline`},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:`#b00b00`,timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:`leaflet-div-icon leaflet-editing-icon`}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:`leaflet-div-icon leaflet-editing-icon leaflet-touch-icon`}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:`#3388ff`,weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(e,t){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,t&&t.drawError&&(t.drawError=L.Util.extend({},this.options.drawError,t.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,e,t)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||=L.marker(this._map.getCenter(),{icon:L.divIcon({className:`leaflet-mouse-marker`,iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset}),this._mouseMarker.on(`mouseout`,this._onMouseOut,this).on(`mousemove`,this._onMouseMove,this).on(`mousedown`,this._onMouseDown,this).on(`mouseup`,this._onMouseUp,this).addTo(this._map),this._map.on(`mouseup`,this._onMouseUp,this).on(`mousemove`,this._onMouseMove,this).on(`zoomlevelschange`,this._onZoomEnd,this).on(`touchstart`,this._onTouch,this).on(`zoomend`,this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off(`mousedown`,this._onMouseDown,this).off(`mouseout`,this._onMouseOut,this).off(`mouseup`,this._onMouseUp,this).off(`mousemove`,this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off(`mouseup`,this._onMouseUp,this).off(`mousemove`,this._onMouseMove,this).off(`zoomlevelschange`,this._onZoomEnd,this).off(`zoomend`,this._onZoomEnd,this).off(`touchstart`,this._onTouch,this).off(`click`,this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var e=this._markers.pop(),t=this._poly,n=t.getLatLngs(),s=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(e),t.getLatLngs().length<2&&this._map.removeLayer(t),this._vertexChanged(s,!1)}},addVertex:function(e){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(e))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(e)),this._poly.addLatLng(e),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(e,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var e=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),t=this._poly.newLatLngIntersects(e[e.length-1]);if(!this.options.allowIntersection&&t||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(e){var t=this._map.mouseEventToLayerPoint(e.originalEvent),n=this._map.layerPointToLatLng(t);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(t),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(e.originalEvent)},_vertexChanged:function(e,t){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(e,t),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(e){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(e),this._clickHandled=!0,this._disableNewMarkers();var t=e.originalEvent,n=t.clientX,s=t.clientY;this._startPoint.call(this,n,s)}},_startPoint:function(e,t){this._mouseDownOrigin=L.point(e,t)},_onMouseUp:function(e){var t=e.originalEvent,n=t.clientX,s=t.clientY;this._endPoint.call(this,n,s,e),this._clickHandled=null},_endPoint:function(t,n,s){if(this._mouseDownOrigin){var c=L.point(t,n).distanceTo(this._mouseDownOrigin),l=this._calculateFinishDistance(s.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(s.latlng),this._finishShape()):l<10&&L.Browser.touch?this._finishShape():Math.abs(c)<9*(e.devicePixelRatio||1)&&this.addVertex(s.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(e){var t,n,s=e.originalEvent;!s.touches||!s.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(t=s.touches[0].clientX,n=s.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,t,n),this._endPoint.call(this,t,n,e),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(e){var t;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var s=this._map.latLngToContainerPoint(n.getLatLng()),c=new L.Marker(e,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),l=this._map.latLngToContainerPoint(c.getLatLng());t=s.distanceTo(l)}else t=1/0;return t},_updateFinishHandler:function(){var e=this._markers.length;e>1&&this._markers[e-1].on(`click`,this._finishShape,this),e>2&&this._markers[e-2].off(`click`,this._finishShape,this)},_createMarker:function(e){var t=new L.Marker(e,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(t),t},_updateGuide:function(e){var t=this._markers?this._markers.length:0;t>0&&(e||=this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[t-1].getLatLng()),e))},_updateTooltip:function(e){var t=this._getTooltipText();e&&this._tooltip.updatePosition(e),this._errorShown||this._tooltip.updateContent(t)},_drawGuide:function(e,t){var n,s,c,l=Math.floor(Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)),d=this.options.guidelineDistance,f=this.options.maxGuideLineLength,p=l>f?l-f:d;for(this._guidesContainer||=L.DomUtil.create(`div`,`leaflet-draw-guides`,this._overlayPane);p<l;p+=this.options.guidelineDistance)n=p/l,s={x:Math.floor(e.x*(1-n)+n*t.x),y:Math.floor(e.y*(1-n)+n*t.y)},c=L.DomUtil.create(`div`,`leaflet-draw-guide-dash`,this._guidesContainer),c.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(c,s)},_updateGuideColor:function(e){if(this._guidesContainer)for(var t=0,n=this._guidesContainer.childNodes.length;t<n;t++)this._guidesContainer.childNodes[t].style.backgroundColor=e},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var e,t,n=this.options.showLength;return this._markers.length===0?e={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(t=n?this._getMeasurementString():``,e=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:t}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:t}),e},_updateRunningMeasure:function(e,t){var n,s,c=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(n=c-(t?2:1),s=L.GeometryUtil.isVersion07x()?e.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(e,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=s*(t?1:-1))},_getMeasurementString:function(){var e,t=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return e=L.GeometryUtil.isVersion07x()?n&&t&&t.distanceTo?this._measurementRunningTotal+t.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&t?this._measurementRunningTotal+this._map.distance(t,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(e,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&=(clearTimeout(this._hideErrorTimeout),null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off(`click`,this._finishShape,this)},_fireCreatedEvent:function(){var e=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,e)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:`polygon`},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:`#3388ff`,weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(e,t){L.Draw.Polyline.prototype.initialize.call(this,e,t),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var e=this._markers.length;e===1&&this._markers[0].on(`click`,this._finishShape,this),e>2&&(this._markers[e-1].on(`dblclick`,this._finishShape,this),e>3&&this._markers[e-2].off(`dblclick`,this._finishShape,this))},_getTooltipText:function(){var e,t;return this._markers.length===0?e=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(e=L.drawLocal.draw.handlers.polygon.tooltip.cont,t=this._getMeasurementString()):(e=L.drawLocal.draw.handlers.polygon.tooltip.end,t=this._getMeasurementString()),{text:e,subtext:t}},_getMeasurementString:function(){var e=this._area,t=``;return e||this.options.showLength?(this.options.showLength&&(t=L.Draw.Polyline.prototype._getMeasurementString.call(this)),e&&(t+=`<br>`+L.GeometryUtil.readableArea(e,this.options.metric,this.options.precision)),t):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(e,t){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,e,t)},_cleanUpShape:function(){var e=this._markers.length;e>0&&(this._markers[0].off(`click`,this._finishShape,this),e>2&&this._markers[e-1].off(`dblclick`,this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(e,t){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,e,t)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor=`crosshair`,this._tooltip.updateContent({text:this._initialLabelText}),this._map.on(`mousedown`,this._onMouseDown,this).on(`mousemove`,this._onMouseMove,this).on(`touchstart`,this._onMouseDown,this).on(`touchmove`,this._onMouseMove,this),t.addEventListener(`touchstart`,L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor=``,this._map.off(`mousedown`,this._onMouseDown,this).off(`mousemove`,this._onMouseMove,this).off(`touchstart`,this._onMouseDown,this).off(`touchmove`,this._onMouseMove,this),L.DomEvent.off(t,`mouseup`,this._onMouseUp,this),L.DomEvent.off(t,`touchend`,this._onMouseUp,this),t.removeEventListener(`touchstart`,L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(e){this._isDrawing=!0,this._startLatLng=e.latlng,L.DomEvent.on(t,`mouseup`,this._onMouseUp,this).on(t,`touchend`,this._onMouseUp,this).preventDefault(e.originalEvent)},_onMouseMove:function(e){var t=e.latlng;this._tooltip.updatePosition(t),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(t))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:`rectangle`},options:{shapeOptions:{stroke:!0,color:`#3388ff`,weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(e,t){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,e,t)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(e){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!o(e.target,`leaflet-pane`)||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(e){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,e)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,e),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var e=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,e)},_getTooltipText:function(){var e,t,n,s=L.Draw.SimpleShape.prototype._getTooltipText.call(this),c=this._shape,l=this.options.showArea;return c&&(e=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),t=L.GeometryUtil.geodesicArea(e),n=l?L.GeometryUtil.readableArea(t,this.options.metric):``),{text:s.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:`marker`},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(e,t){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,e,t)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||=L.marker(this._map.getCenter(),{icon:L.divIcon({className:`leaflet-mouse-marker`,iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset}),this._mouseMarker.on(`click`,this._onClick,this).addTo(this._map),this._map.on(`mousemove`,this._onMouseMove,this),this._map.on(`click`,this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off(`click`,this._onClick,this).off(`click`,this._onTouch,this),this._marker&&(this._marker.off(`click`,this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off(`click`,this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off(`mousemove`,this._onMouseMove,this))},_onMouseMove:function(e){var t=e.latlng;this._tooltip.updatePosition(t),this._mouseMarker.setLatLng(t),this._marker?(t=this._mouseMarker.getLatLng(),this._marker.setLatLng(t)):(this._marker=this._createMarker(t),this._marker.on(`click`,this._onClick,this),this._map.on(`click`,this._onClick,this).addLayer(this._marker))},_createMarker:function(e){return new L.Marker(e,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(e){this._onMouseMove(e),this._onClick()},_fireCreatedEvent:function(){var e=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,e)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:`circlemarker`},options:{stroke:!0,color:`#3388ff`,weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(e,t){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,e,t)},_fireCreatedEvent:function(){var e=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,e)},_createMarker:function(e){return new L.CircleMarker(e,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:`circle`},options:{shapeOptions:{stroke:!0,color:`#3388ff`,weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(e,t){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,e,t)},_drawShape:function(e){if(L.GeometryUtil.isVersion07x())var t=this._startLatLng.distanceTo(e);else var t=this._map.distance(this._startLatLng,e);this._shape?this._shape.setRadius(t):(this._shape=new L.Circle(this._startLatLng,t,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var e=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,e)},_onMouseMove:function(e){var t,n=e.latlng,s=this.options.showRadius,c=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),t=this._shape.getRadius().toFixed(1);var l=``;s&&(l=L.drawLocal.draw.handlers.circle.radius+`: `+L.GeometryUtil.readableDistance(t,c,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:l})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(e,t){this._marker=e,L.setOptions(this,t)},addHooks:function(){var e=this._marker;e.dragging.enable(),e.on(`dragend`,this._onDragEnd,e),this._toggleMarkerHighlight()},removeHooks:function(){var e=this._marker;e.dragging.disable(),e.off(`dragend`,this._onDragEnd,e),this._toggleMarkerHighlight()},_onDragEnd:function(e){var t=e.target;t.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:t})},_toggleMarkerHighlight:function(){var e=this._marker._icon;e&&(e.style.display=`none`,L.DomUtil.hasClass(e,`leaflet-edit-marker-selected`)?(L.DomUtil.removeClass(e,`leaflet-edit-marker-selected`),this._offsetMarker(e,-4)):(L.DomUtil.addClass(e,`leaflet-edit-marker-selected`),this._offsetMarker(e,4)),e.style.display=``)},_offsetMarker:function(e,t){var n=parseInt(e.style.marginTop,10)-t,s=parseInt(e.style.marginLeft,10)-t;e.style.marginTop=n+`px`,e.style.marginLeft=s+`px`}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(e){this.latlngs=[e._latlngs],e._holes&&(this.latlngs=this.latlngs.concat(e._holes)),this._poly=e,this._poly.on(`revert-edited`,this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(e){for(var t=0;t<this._verticesHandlers.length;t++)e(this._verticesHandlers[t])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(e){e.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(e){e.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(e){e.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var e=0;e<this.latlngs.length;e++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[e],this._poly.options.poly))},_updateLatLngs:function(e){this.latlngs=[e.layer._latlngs],e.layer._holes&&(this.latlngs=this.latlngs.concat(e.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:`leaflet-div-icon leaflet-editing-icon`}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:`leaflet-div-icon leaflet-editing-icon leaflet-touch-icon`}),drawError:{color:`#b00b00`,timeout:1e3}},initialize:function(e,t,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=e,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=t,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var e=this._poly,t=e._path;e instanceof L.Polygon||(e.options.fill=!1,e.options.editing&&(e.options.editing.fill=!1)),t&&e.options.editing&&e.options.editing.className&&(e.options.original.className&&e.options.original.className.split(` `).forEach(function(e){L.DomUtil.removeClass(t,e)}),e.options.editing.className.split(` `).forEach(function(e){L.DomUtil.addClass(t,e)})),e.setStyle(e.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var e=this._poly,t=e._path;t&&e.options.editing&&e.options.editing.className&&(e.options.editing.className.split(` `).forEach(function(e){L.DomUtil.removeClass(t,e)}),e.options.original.className&&e.options.original.className.split(` `).forEach(function(e){L.DomUtil.addClass(t,e)})),e.setStyle(e.options.original),e._map&&(e._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||=new L.LayerGroup,this._markers=[];var e,t,n,s,c=this._defaultShape();for(e=0,n=c.length;e<n;e++)s=this._createMarker(c[e],e),s.on(`click`,this._onMarkerClick,this),s.on(`contextmenu`,this._onContextMenu,this),this._markers.push(s);var l,d;for(e=0,t=n-1;e<n;t=e++)(e!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(l=this._markers[t],d=this._markers[e],this._createMiddleMarker(l,d),this._updatePrevNext(l,d))},_createMarker:function(e,t){var n=new L.Marker.Touch(e,{draggable:!0,icon:this.options.icon});return n._origLatLng=e,n._index=t,n.on(`dragstart`,this._onMarkerDragStart,this).on(`drag`,this._onMarkerDrag,this).on(`dragend`,this._fireEdit,this).on(`touchmove`,this._onTouchMove,this).on(`touchend`,this._fireEdit,this).on(`MSPointerMove`,this._onTouchMove,this).on(`MSPointerUp`,this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire(`editstart`)},_spliceLatLngs:function(){var e=this._defaultShape(),t=[].splice.apply(e,arguments);return this._poly._convertLatLngs(e,!0),this._poly.redraw(),t},_removeMarker:function(e){var t=e._index;this._markerGroup.removeLayer(e),this._markers.splice(t,1),this._spliceLatLngs(t,1),this._updateIndexes(t,-1),e.off(`dragstart`,this._onMarkerDragStart,this).off(`drag`,this._onMarkerDrag,this).off(`dragend`,this._fireEdit,this).off(`touchmove`,this._onMarkerDrag,this).off(`touchend`,this._fireEdit,this).off(`click`,this._onMarkerClick,this).off(`MSPointerMove`,this._onTouchMove,this).off(`MSPointerUp`,this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire(`edit`),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(e){var t=e.target,n=this._poly,s=L.LatLngUtil.cloneLatLng(t._origLatLng);if(L.extend(t._origLatLng,t._latlng),n.options.poly){var c=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){L.extend(t._origLatLng,s),t.setLatLng(s);var l=n.options.color;n.setStyle({color:this.options.drawError.color}),c&&c.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){n.setStyle({color:l}),c&&c.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}t._middleLeft&&t._middleLeft.setLatLng(this._getMiddleLatLng(t._prev,t)),t._middleRight&&t._middleRight.setLatLng(this._getMiddleLatLng(t,t._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var d=this._poly.getLatLngs();this._poly._convertLatLngs(d,!0),this._poly.redraw(),this._poly.fire(`editdrag`)},_onMarkerClick:function(e){var t=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=e.target;this._defaultShape().length<t||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(e){var t=e.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:t,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(e){var t=this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]),n=this._map.layerPointToLatLng(t),s=e.target;L.extend(s._origLatLng,n),s._middleLeft&&s._middleLeft.setLatLng(this._getMiddleLatLng(s._prev,s)),s._middleRight&&s._middleRight.setLatLng(this._getMiddleLatLng(s,s._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(e,t){this._markerGroup.eachLayer(function(n){n._index>e&&(n._index+=t)})},_createMiddleMarker:function(e,t){var i,o,a,n=this._getMiddleLatLng(e,t),s=this._createMarker(n);s.setOpacity(.6),e._middleRight=t._middleLeft=s,o=function(){s.off(`touchmove`,o,this);var c=t._index;s._index=c,s.off(`click`,i,this).on(`click`,this._onMarkerClick,this),n.lat=s.getLatLng().lat,n.lng=s.getLatLng().lng,this._spliceLatLngs(c,0,n),this._markers.splice(c,0,s),s.setOpacity(1),this._updateIndexes(c,1),t._index++,this._updatePrevNext(e,s),this._updatePrevNext(s,t),this._poly.fire(`editstart`)},a=function(){s.off(`dragstart`,o,this),s.off(`dragend`,a,this),s.off(`touchmove`,o,this),this._createMiddleMarker(e,s),this._createMiddleMarker(s,t)},i=function(){o.call(this),a.call(this),this._fireEdit()},s.on(`click`,i,this).on(`dragstart`,o,this).on(`dragend`,a,this).on(`touchmove`,o,this),this._markerGroup.addLayer(s)},_updatePrevNext:function(e,t){e&&(e._next=t),t&&(t._prev=e)},_getMiddleLatLng:function(e,t){var n=this._poly._map,s=n.project(e.getLatLng()),c=n.project(t.getLatLng());return n.unproject(s._add(c)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on(`add`,function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on(`remove`,function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:`leaflet-div-icon leaflet-editing-icon leaflet-edit-move`}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:`leaflet-div-icon leaflet-editing-icon leaflet-edit-resize`}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:`leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon`}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:`leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon`})},initialize:function(e,t){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=e,L.Util.setOptions(this,t)},addHooks:function(){var e=this._shape;this._shape._map&&(this._map=this._shape._map,e.setStyle(e.options.editing),e._map&&(this._map=e._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var e=this._shape;if(e.setStyle(e.options.original),e._map){this._unbindMarker(this._moveMarker);for(var t=0,n=this._resizeMarkers.length;t<n;t++)this._unbindMarker(this._resizeMarkers[t]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||=new L.LayerGroup,this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(e,t){var n=new L.Marker.Touch(e,{draggable:!0,icon:t,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(e){e.on(`dragstart`,this._onMarkerDragStart,this).on(`drag`,this._onMarkerDrag,this).on(`dragend`,this._onMarkerDragEnd,this).on(`touchstart`,this._onTouchStart,this).on(`touchmove`,this._onTouchMove,this).on(`MSPointerMove`,this._onTouchMove,this).on(`touchend`,this._onTouchEnd,this).on(`MSPointerUp`,this._onTouchEnd,this)},_unbindMarker:function(e){e.off(`dragstart`,this._onMarkerDragStart,this).off(`drag`,this._onMarkerDrag,this).off(`dragend`,this._onMarkerDragEnd,this).off(`touchstart`,this._onTouchStart,this).off(`touchmove`,this._onTouchMove,this).off(`MSPointerMove`,this._onTouchMove,this).off(`touchend`,this._onTouchEnd,this).off(`MSPointerUp`,this._onTouchEnd,this)},_onMarkerDragStart:function(e){e.target.setOpacity(0),this._shape.fire(`editstart`)},_fireEdit:function(){this._shape.edited=!0,this._shape.fire(`edit`)},_onMarkerDrag:function(e){var t=e.target,n=t.getLatLng();t===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire(`editdrag`)},_onMarkerDragEnd:function(e){e.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(e){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,e),typeof this._getCorners==`function`){var t=this._getCorners(),n=e.target,s=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=t[(s+2)%4],this._toggleCornerMarkers(0,s)}this._shape.fire(`editstart`)},_onTouchMove:function(e){var t=this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]),n=this._map.layerPointToLatLng(t);return e.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(e){e.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var e=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var e=this._getCorners();this._resizeMarkers=[];for(var t=0,n=e.length;t<n;t++)this._resizeMarkers.push(this._createMarker(e[t],this.options.resizeIcon)),this._resizeMarkers[t]._cornerIndex=t},_onMarkerDragStart:function(e){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,e);var t=this._getCorners(),n=e.target._cornerIndex;this._oppositeCorner=t[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(e){var t,n,s=e.target;s===this._moveMarker&&(t=this._shape.getBounds(),n=t.getCenter(),s.setLatLng(n)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,e)},_move:function(e){for(var t,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),s=this._shape.getBounds().getCenter(),c=[],l=0,d=n.length;l<d;l++)t=[n[l].lat-s.lat,n[l].lng-s.lng],c.push([e.lat+t[0],e.lng+t[1]]);this._shape.setLatLngs(c),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(e){var t;this._shape.setBounds(L.latLngBounds(e,this._oppositeCorner)),t=this._shape.getBounds(),this._moveMarker.setLatLng(t.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var e=this._shape.getBounds();return[e.getNorthWest(),e.getNorthEast(),e.getSouthEast(),e.getSouthWest()]},_toggleCornerMarkers:function(e){for(var t=0,n=this._resizeMarkers.length;t<n;t++)this._resizeMarkers[t].setOpacity(e)},_repositionCornerMarkers:function(){for(var e=this._getCorners(),t=0,n=this._resizeMarkers.length;t<n;t++)this._resizeMarkers[t].setLatLng(e[t])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var e=this._shape.getLatLng();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(e){if(this._resizeMarkers.length){var t=this._getResizeMarkerPoint(e);this._resizeMarkers[0].setLatLng(t)}this._shape.setLatLng(e),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on(`add`,function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on(`remove`,function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var e=this._shape.getLatLng(),t=this._getResizeMarkerPoint(e);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(t,this.options.resizeIcon))},_getResizeMarkerPoint:function(e){var t=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(e);return this._map.unproject([n.x+t,n.y-t])},_resize:function(e){var t=this._moveMarker.getLatLng();radius=L.GeometryUtil.isVersion07x()?t.distanceTo(e):this._map.distance(t,e),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+`<br />`+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+`: `+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,`touchstart`,this._onTouchStart,this),L.DomEvent.on(this._container,`touchend`,this._onTouchEnd,this),L.DomEvent.on(this._container,`touchmove`,this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,`MSPointerDown`,this._onTouchStart,this),L.DomEvent.on(this._container,`MSPointerUp`,this._onTouchEnd,this),L.DomEvent.on(this._container,`MSPointerMove`,this._onTouchMove,this),L.DomEvent.on(this._container,`MSPointerCancel`,this._onTouchCancel,this)):(L.DomEvent.on(this._container,`touchcancel`,this._onTouchCancel,this),L.DomEvent.on(this._container,`touchleave`,this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,`touchstart`,this._onTouchStart,this),L.DomEvent.off(this._container,`touchend`,this._onTouchEnd,this),L.DomEvent.off(this._container,`touchmove`,this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,`MSPointerDown`,this._onTouchStart,this),L.DomEvent.off(this._container,`MSPointerUp`,this._onTouchEnd,this),L.DomEvent.off(this._container,`MSPointerMove`,this._onTouchMove,this),L.DomEvent.off(this._container,`MSPointerCancel`,this._onTouchCancel,this)):(L.DomEvent.off(this._container,`touchcancel`,this._onTouchCancel,this),L.DomEvent.off(this._container,`touchleave`,this._onTouchLeave,this))},_touchEvent:function(e,t){var n={};if(e.touches!==void 0){if(!e.touches.length)return;n=e.touches[0]}else if(e.pointerType!==`touch`||(n=e,!this._filterClick(e)))return;var s=this._map.mouseEventToContainerPoint(n),c=this._map.mouseEventToLayerPoint(n),l=this._map.layerPointToLatLng(c);this._map.fire(t,{latlng:l,layerPoint:c,containerPoint:s,pageX:n.pageX,pageY:n.pageY,originalEvent:e})},_filterClick:function(e){var t=e.timeStamp||e.originalEvent.timeStamp,n=L.DomEvent._lastClick&&t-L.DomEvent._lastClick;return n&&n>100&&n<500||e.target._simulatedClick&&!e._simulated?(L.DomEvent.stop(e),!1):(L.DomEvent._lastClick=t,!0)},_onTouchStart:function(e){this._map._loaded&&this._touchEvent(e,`touchstart`)},_onTouchEnd:function(e){this._map._loaded&&this._touchEvent(e,`touchend`)},_onTouchCancel:function(e){if(this._map._loaded){var t=`touchcancel`;this._detectIE()&&(t=`pointercancel`),this._touchEvent(e,t)}},_onTouchLeave:function(e){this._map._loaded&&this._touchEvent(e,`touchleave`)},_onTouchMove:function(e){this._map._loaded&&this._touchEvent(e,`touchmove`)},_detectIE:function(){var t=e.navigator.userAgent,n=t.indexOf(`MSIE `);if(n>0)return parseInt(t.substring(n+5,t.indexOf(`.`,n)),10);if(t.indexOf(`Trident/`)>0){var s=t.indexOf(`rv:`);return parseInt(t.substring(s+3,t.indexOf(`.`,s)),10)}var c=t.indexOf(`Edge/`);return c>0&&parseInt(t.substring(c+5,t.indexOf(`.`,c)),10)}}),L.Map.addInitHook(`addHandler`,`touchExtend`,L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var e=this._icon,t=[`dblclick`,`mousedown`,`mouseover`,`mouseout`,`contextmenu`,`touchstart`,`touchend`,`touchmove`];this._detectIE?t.concat([`MSPointerDown`,`MSPointerUp`,`MSPointerMove`,`MSPointerCancel`]):t.concat([`touchcancel`]),L.DomUtil.addClass(e,`leaflet-clickable`),L.DomEvent.on(e,`click`,this._onMouseClick,this),L.DomEvent.on(e,`keypress`,this._onKeyPress,this);for(var n=0;n<t.length;n++)L.DomEvent.on(e,t[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var t=e.navigator.userAgent,n=t.indexOf(`MSIE `);if(n>0)return parseInt(t.substring(n+5,t.indexOf(`.`,n)),10);if(t.indexOf(`Trident/`)>0){var s=t.indexOf(`rv:`);return parseInt(t.substring(s+3,t.indexOf(`.`,s)),10)}var c=t.indexOf(`Edge/`);return c>0&&parseInt(t.substring(c+5,t.indexOf(`.`,c)),10)}}),L.LatLngUtil={cloneLatLngs:function(e){for(var t=[],n=0,s=e.length;n<s;n++)Array.isArray(e[n])?t.push(L.LatLngUtil.cloneLatLngs(e[n])):t.push(this.cloneLatLng(e[n]));return t},cloneLatLng:function(e){return L.latLng(e.lat,e.lng)}},function(){var e={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(e){var t,n,s=e.length,c=0,l=Math.PI/180;if(s>2){for(var d=0;d<s;d++)t=e[d],n=e[(d+1)%s],c+=(n.lng-t.lng)*l*(2+Math.sin(t.lat*l)+Math.sin(n.lat*l));c=6378137*c*6378137/2}return Math.abs(c)},formattedNumber:function(e,t){var n=parseFloat(e).toFixed(t),s=L.drawLocal.format&&L.drawLocal.format.numeric,c=s&&s.delimiters,l=c&&c.thousands,d=c&&c.decimal;if(l||d){var f=n.split(`.`);n=l?f[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1`+l):f[0],d||=`.`,f.length>1&&(n=n+d+f[1])}return n},readableArea:function(t,n,s){var c,l,s=L.Util.extend({},e,s);return n?(l=[`ha`,`m`],type=typeof n,type===`string`?l=[n]:type!==`boolean`&&(l=n),c=t>=1e6&&l.indexOf(`km`)!==-1?L.GeometryUtil.formattedNumber(1e-6*t,s.km)+` km²`:t>=1e4&&l.indexOf(`ha`)!==-1?L.GeometryUtil.formattedNumber(1e-4*t,s.ha)+` ha`:L.GeometryUtil.formattedNumber(t,s.m)+` m²`):(t/=.836127,c=t>=3097600?L.GeometryUtil.formattedNumber(t/3097600,s.mi)+` mi²`:t>=4840?L.GeometryUtil.formattedNumber(t/4840,s.ac)+` acres`:L.GeometryUtil.formattedNumber(t,s.yd)+` yd²`),c},readableDistance:function(t,n,s,c,l){var d,l=L.Util.extend({},e,l);switch(n?typeof n==`string`?n:`metric`:s?`feet`:c?`nauticalMile`:`yards`){case`metric`:d=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,l.km)+` km`:L.GeometryUtil.formattedNumber(t,l.m)+` m`;break;case`feet`:t*=3.28083,d=L.GeometryUtil.formattedNumber(t,l.ft)+` ft`;break;case`nauticalMile`:t*=.53996,d=L.GeometryUtil.formattedNumber(t/1e3,l.nm)+` nm`;break;default:t*=1.09361,d=t>1760?L.GeometryUtil.formattedNumber(t/1760,l.mi)+` miles`:L.GeometryUtil.formattedNumber(t,l.yd)+` yd`}return d},isVersion07x:function(){var e=L.version.split(`.`);return parseInt(e[0],10)===0&&parseInt(e[1],10)===7}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(e,t,n,s){return this._checkCounterclockwise(e,n,s)!==this._checkCounterclockwise(t,n,s)&&this._checkCounterclockwise(e,t,n)!==this._checkCounterclockwise(e,t,s)},_checkCounterclockwise:function(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}}),L.Polyline.include({intersects:function(){var e,t,n,s=this._getProjectedPoints(),c=s?s.length:0;if(this._tooFewPointsForIntersection())return!1;for(e=c-1;e>=3;e--)if(t=s[e-1],n=s[e],this._lineSegmentsIntersectsRange(t,n,e-2))return!0;return!1},newLatLngIntersects:function(e,t){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(e),t)},newPointIntersects:function(e,t){var n=this._getProjectedPoints(),s=n?n.length:0,c=n?n[s-1]:null,l=s-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(c,e,l,+!!t)},_tooFewPointsForIntersection:function(e){var t=this._getProjectedPoints(),n=t?t.length:0;return n+=e||0,!t||n<=3},_lineSegmentsIntersectsRange:function(e,t,n,s){var c,l,d=this._getProjectedPoints();s||=0;for(var f=n;f>s;f--)if(c=d[f-1],l=d[f],L.LineUtil.segmentsIntersect(e,t,c,l))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var e=[],t=this._defaultShape(),n=0;n<t.length;n++)e.push(this._map.latLngToLayerPoint(t[n]));return e}}),L.Polygon.include({intersects:function(){var e,t,n,s,c=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(e=c.length,t=c[0],n=c[e-1],s=e-2,this._lineSegmentsIntersectsRange(n,t,s,1)))}}),L.Control.Draw=L.Control.extend({options:{position:`topleft`,draw:{},edit:!1},initialize:function(e){if(L.version<`0.7`)throw Error(`Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/`);L.Control.prototype.initialize.call(this,e);var t;this._toolbars={},L.DrawToolbar&&this.options.draw&&(t=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=t,this._toolbars[L.DrawToolbar.TYPE].on(`enable`,this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(t=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=t,this._toolbars[L.EditToolbar.TYPE].on(`enable`,this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(e){var t,n=L.DomUtil.create(`div`,`leaflet-draw`),s=!1;for(var c in this._toolbars)this._toolbars.hasOwnProperty(c)&&(t=this._toolbars[c].addToolbar(e))&&(s||=(L.DomUtil.hasClass(t,`leaflet-draw-toolbar-top`)||L.DomUtil.addClass(t.childNodes[0],`leaflet-draw-toolbar-top`),!0),n.appendChild(t));return n},onRemove:function(){for(var e in this._toolbars)this._toolbars.hasOwnProperty(e)&&this._toolbars[e].removeToolbar()},setDrawingOptions:function(e){for(var t in this._toolbars)this._toolbars[t]instanceof L.DrawToolbar&&this._toolbars[t].setOptions(e)},_toolbarEnabled:function(e){var t=e.target;for(var n in this._toolbars)this._toolbars[n]!==t&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(e){L.setOptions(this,e),this._modes={},this._actionButtons=[],this._activeMode=null;var t=L.version.split(`.`);parseInt(t[0],10)===1&&parseInt(t[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(e){var t,n=L.DomUtil.create(`div`,`leaflet-draw-section`),s=0,c=this._toolbarClass||``,l=this.getModeHandlers(e);for(this._toolbarContainer=L.DomUtil.create(`div`,`leaflet-draw-toolbar leaflet-bar`),this._map=e,t=0;t<l.length;t++)l[t].enabled&&this._initModeHandler(l[t].handler,this._toolbarContainer,s++,c,l[t].title);if(s)return this._lastButtonIndex=--s,this._actionsContainer=L.DomUtil.create(`ul`,`leaflet-draw-actions`),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var e in this._modes)this._modes.hasOwnProperty(e)&&(this._disposeButton(this._modes[e].button,this._modes[e].handler.enable,this._modes[e].handler),this._modes[e].handler.disable(),this._modes[e].handler.off(`enabled`,this._handlerActivated,this).off(`disabled`,this._handlerDeactivated,this));this._modes={};for(var t=0,n=this._actionButtons.length;t<n;t++)this._disposeButton(this._actionButtons[t].button,this._actionButtons[t].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(e,t,n,s,c){var l=e.type;this._modes[l]={},this._modes[l].handler=e,this._modes[l].button=this._createButton({type:l,title:c,className:s+`-`+l,container:t,callback:this._modes[l].handler.enable,context:this._modes[l].handler}),this._modes[l].buttonIndex=n,this._modes[l].handler.on(`enabled`,this._handlerActivated,this).on(`disabled`,this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!e.MSStream},_createButton:function(e){var t=L.DomUtil.create(`a`,e.className||``,e.container),n=L.DomUtil.create(`span`,`sr-only`,e.container);t.href=`#`,t.appendChild(n),e.title&&(t.title=e.title,n.innerHTML=e.title),e.text&&(t.innerHTML=e.text,n.innerHTML=e.text);var s=this._detectIOS()?`touchstart`:`click`;return L.DomEvent.on(t,`click`,L.DomEvent.stopPropagation).on(t,`mousedown`,L.DomEvent.stopPropagation).on(t,`dblclick`,L.DomEvent.stopPropagation).on(t,`touchstart`,L.DomEvent.stopPropagation).on(t,`click`,L.DomEvent.preventDefault).on(t,s,e.callback,e.context),t},_disposeButton:function(e,t){var n=this._detectIOS()?`touchstart`:`click`;L.DomEvent.off(e,`click`,L.DomEvent.stopPropagation).off(e,`mousedown`,L.DomEvent.stopPropagation).off(e,`dblclick`,L.DomEvent.stopPropagation).off(e,`touchstart`,L.DomEvent.stopPropagation).off(e,`click`,L.DomEvent.preventDefault).off(e,n,t)},_handlerActivated:function(e){this.disable(),this._activeMode=this._modes[e.handler],L.DomUtil.addClass(this._activeMode.button,`leaflet-draw-toolbar-button-enabled`),this._showActionsToolbar(),this.fire(`enable`)},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,`leaflet-draw-toolbar-button-enabled`),this._activeMode=null,this.fire(`disable`)},_createActions:function(e){var t,n,s,c,l=this._actionsContainer,d=this.getActions(e),f=d.length;for(n=0,s=this._actionButtons.length;n<s;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];l.firstChild;)l.removeChild(l.firstChild);for(var p=0;p<f;p++)`enabled`in d[p]&&!d[p].enabled||(t=L.DomUtil.create(`li`,``,l),c=this._createButton({title:d[p].title,text:d[p].text,container:t,callback:d[p].callback,context:d[p].context}),this._actionButtons.push({button:c,callback:d[p].callback}))},_showActionsToolbar:function(){var e=this._activeMode.buttonIndex,t=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+`px`,e===0&&(L.DomUtil.addClass(this._toolbarContainer,`leaflet-draw-toolbar-notop`),L.DomUtil.addClass(this._actionsContainer,`leaflet-draw-actions-top`)),e===t&&(L.DomUtil.addClass(this._toolbarContainer,`leaflet-draw-toolbar-nobottom`),L.DomUtil.addClass(this._actionsContainer,`leaflet-draw-actions-bottom`)),this._actionsContainer.style.display=`block`,this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display=`none`,L.DomUtil.removeClass(this._toolbarContainer,`leaflet-draw-toolbar-notop`),L.DomUtil.removeClass(this._toolbarContainer,`leaflet-draw-toolbar-nobottom`),L.DomUtil.removeClass(this._actionsContainer,`leaflet-draw-actions-top`),L.DomUtil.removeClass(this._actionsContainer,`leaflet-draw-actions-bottom`),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(e){this._map=e,this._popupPane=e._panes.popupPane,this._visible=!1,this._container=e.options.drawControlTooltips?L.DomUtil.create(`div`,`leaflet-draw-tooltip`,this._popupPane):null,this._singleLineLabel=!1,this._map.on(`mouseout`,this._onMouseOut,this)},dispose:function(){this._map.off(`mouseout`,this._onMouseOut,this),this._container&&=(this._popupPane.removeChild(this._container),null)},updateContent:function(e){return this._container?(e.subtext=e.subtext||``,e.subtext.length!==0||this._singleLineLabel?e.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,`leaflet-draw-tooltip-single`),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,`leaflet-draw-tooltip-single`),this._singleLineLabel=!0),this._container.innerHTML=(e.subtext.length>0?`<span class="leaflet-draw-tooltip-subtext">`+e.subtext+`</span><br />`:``)+`<span>`+e.text+`</span>`,e.text||e.subtext?(this._visible=!0,this._container.style.visibility=`inherit`):(this._visible=!1,this._container.style.visibility=`hidden`),this):this},updatePosition:function(e){var t=this._map.latLngToLayerPoint(e),n=this._container;return this._container&&(this._visible&&(n.style.visibility=`inherit`),L.DomUtil.setPosition(n,t)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,`leaflet-error-draw-tooltip`),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,`leaflet-error-draw-tooltip`),this},_onMouseOut:function(){this._container&&(this._container.style.visibility=`hidden`)}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:`draw`},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(e){for(var t in this.options)this.options.hasOwnProperty(t)&&e[t]&&(e[t]=L.extend({},this.options[t],e[t]));this._toolbarClass=`leaflet-draw-draw`,L.Toolbar.prototype.initialize.call(this,e)},getModeHandlers:function(e){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(e,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(e,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(e,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(e,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(e,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(e,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(e){return[{enabled:e.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:e.completeShape,context:e},{enabled:e.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:e.deleteLastVertex,context:e},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(e){for(var t in L.setOptions(this,e),this._modes)this._modes.hasOwnProperty(t)&&e.hasOwnProperty(t)&&this._modes[t].handler.setOptions(e[t])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:`edit`},options:{edit:{selectedPathOptions:{dashArray:`10, 10`,fill:!0,fillColor:`#fe57a1`,fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(e){e.edit&&(e.edit.selectedPathOptions===void 0&&(e.edit.selectedPathOptions=this.options.edit.selectedPathOptions),e.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,e.edit.selectedPathOptions)),e.remove&&=L.extend({},this.options.remove,e.remove),e.poly&&=L.extend({},this.options.poly,e.poly),this._toolbarClass=`leaflet-draw-edit`,L.Toolbar.prototype.initialize.call(this,e),this._selectedFeatureCount=0},getModeHandlers:function(e){var t=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(e,{featureGroup:t,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(e,{featureGroup:t}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(e){var t=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return e.removeAllLayers&&t.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),t},addToolbar:function(e){var t=L.Toolbar.prototype.addToolbar.call(this,e);return this._checkDisabled(),this.options.featureGroup.on(`layeradd layerremove`,this._checkDisabled,this),t},removeToolbar:function(){this.options.featureGroup.off(`layeradd layerremove`,this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var e,t=this.options.featureGroup.getLayers().length!==0;this.options.edit&&(e=this._modes[L.EditToolbar.Edit.TYPE].button,t?L.DomUtil.removeClass(e,`leaflet-disabled`):L.DomUtil.addClass(e,`leaflet-disabled`),e.setAttribute(`title`,t?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(e=this._modes[L.EditToolbar.Delete.TYPE].button,t?L.DomUtil.removeClass(e,`leaflet-disabled`):L.DomUtil.addClass(e,`leaflet-disabled`),e.setAttribute(`title`,t?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:`edit`},initialize:function(e,t){if(L.Handler.prototype.initialize.call(this,e),L.setOptions(this,t),this._featureGroup=t.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw Error(`options.featureGroup must be a L.FeatureGroup`);this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(`.`);parseInt(n[0],10)===1&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire(`enabled`,{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on(`layeradd`,this._enableLayerEdit,this).on(`layerremove`,this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off(`layeradd`,this._enableLayerEdit,this).off(`layerremove`,this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire(`disabled`,{handler:this.type}))},addHooks:function(){var e=this._map;e&&(e.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),e._editTooltip=this._tooltip,this._updateTooltip(),this._map.on(`mousemove`,this._onMouseMove,this).on(`touchmove`,this._onMouseMove,this).on(`MSPointerMove`,this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off(`mousemove`,this._onMouseMove,this).off(`touchmove`,this._onMouseMove,this).off(`MSPointerMove`,this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(e){this._revertLayer(e)},this)},save:function(){var e=new L.LayerGroup;this._featureGroup.eachLayer(function(t){t.edited&&=(e.addLayer(t),!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:e})},_backupLayer:function(e){var t=L.Util.stamp(e);this._uneditedLayerProps[t]||(e instanceof L.Polyline||e instanceof L.Polygon||e instanceof L.Rectangle?this._uneditedLayerProps[t]={latlngs:L.LatLngUtil.cloneLatLngs(e.getLatLngs())}:e instanceof L.Circle?this._uneditedLayerProps[t]={latlng:L.LatLngUtil.cloneLatLng(e.getLatLng()),radius:e.getRadius()}:(e instanceof L.Marker||e instanceof L.CircleMarker)&&(this._uneditedLayerProps[t]={latlng:L.LatLngUtil.cloneLatLng(e.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(e){var t=L.Util.stamp(e);e.edited=!1,this._uneditedLayerProps.hasOwnProperty(t)&&(e instanceof L.Polyline||e instanceof L.Polygon||e instanceof L.Rectangle?e.setLatLngs(this._uneditedLayerProps[t].latlngs):e instanceof L.Circle?(e.setLatLng(this._uneditedLayerProps[t].latlng),e.setRadius(this._uneditedLayerProps[t].radius)):(e instanceof L.Marker||e instanceof L.CircleMarker)&&e.setLatLng(this._uneditedLayerProps[t].latlng),e.fire(`revert-edited`,{layer:e}))},_enableLayerEdit:function(e){var t,n,s=e.layer||e.target||e;this._backupLayer(s),this.options.poly&&(n=L.Util.extend({},this.options.poly),s.options.poly=n),this.options.selectedPathOptions&&(t=L.Util.extend({},this.options.selectedPathOptions),t.maintainColor&&(t.color=s.options.color,t.fillColor=s.options.fillColor),s.options.original=L.extend({},s.options),s.options.editing=t),s instanceof L.Marker?(s.editing&&s.editing.enable(),s.dragging.enable(),s.on(`dragend`,this._onMarkerDragEnd).on(`touchmove`,this._onTouchMove,this).on(`MSPointerMove`,this._onTouchMove,this).on(`touchend`,this._onMarkerDragEnd,this).on(`MSPointerUp`,this._onMarkerDragEnd,this)):s.editing.enable()},_disableLayerEdit:function(e){var t=e.layer||e.target||e;t.edited=!1,t.editing&&t.editing.disable(),delete t.options.editing,delete t.options.original,this._selectedPathOptions&&(t instanceof L.Marker?this._toggleMarkerHighlight(t):(t.setStyle(t.options.previousOptions),delete t.options.previousOptions)),t instanceof L.Marker?(t.dragging.disable(),t.off(`dragend`,this._onMarkerDragEnd,this).off(`touchmove`,this._onTouchMove,this).off(`MSPointerMove`,this._onTouchMove,this).off(`touchend`,this._onMarkerDragEnd,this).off(`MSPointerUp`,this._onMarkerDragEnd,this)):t.editing.disable()},_onMouseMove:function(e){this._tooltip.updatePosition(e.latlng)},_onMarkerDragEnd:function(e){var t=e.target;t.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:t})},_onTouchMove:function(e){var t=e.originalEvent.changedTouches[0],n=this._map.mouseEventToLayerPoint(t),s=this._map.layerPointToLatLng(n);e.target.setLatLng(s)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:`remove`},initialize:function(e,t){if(L.Handler.prototype.initialize.call(this,e),L.Util.setOptions(this,t),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw Error(`options.featureGroup must be a L.FeatureGroup`);this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(`.`);parseInt(n[0],10)===1&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire(`enabled`,{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on(`layeradd`,this._enableLayerDelete,this).on(`layerremove`,this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off(`layeradd`,this._enableLayerDelete,this).off(`layerremove`,this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire(`disabled`,{handler:this.type}))},addHooks:function(){var e=this._map;e&&(e.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on(`mousemove`,this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off(`mousemove`,this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(e){this._deletableLayers.addLayer(e),e.fire(`revert-deleted`,{layer:e})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(e){this._removeLayer({layer:e})},this),this.save()},_enableLayerDelete:function(e){(e.layer||e.target||e).on(`click`,this._removeLayer,this)},_disableLayerDelete:function(e){var t=e.layer||e.target||e;t.off(`click`,this._removeLayer,this),this._deletedLayers.removeLayer(t)},_removeLayer:function(e){var t=e.layer||e.target||e;this._deletableLayers.removeLayer(t),this._deletedLayers.addLayer(t),t.fire(`deleted`)},_onMouseMove:function(e){this._tooltip.updatePosition(e.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document),__commonJSMin(((e,t)=>{(function(n,s){typeof e==`object`&&t!==void 0?s(e):typeof define==`function`&&define.amd?define([`exports`],s):(n||=self,s((n.Leaflet=n.Leaflet||{},n.Leaflet.markercluster={})))})(e,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:`#222`,opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire(`layeradd`,{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire(`layeradd`,{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire(`layeradd`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,n=this._zoom;if(e.__parent)for(;t.__parent._zoom>=n;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire(`layerremove`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire(`layerremove`,{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire(`layerremove`,{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var n=this._featureGroup,s=this._nonPointGroup,c=this.options.chunkedLoading,l=this.options.chunkInterval,d=this.options.chunkProgress,f=e.length,p=0,m=!0,h;if(this._map){var g=new Date().getTime(),_=L.bind(function(){var v=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();p<f&&!(c&&p%200==0&&new Date().getTime()-v>l);p++){if(h=e[p],h instanceof L.LayerGroup){m&&=(e=e.slice(),!1),this._extractNonGroupLayers(h,e),f=e.length;continue}if(!h.getLatLng){s.addLayer(h),t||this.fire(`layeradd`,{layer:h});continue}if(!this.hasLayer(h)&&(this._addLayer(h,this._maxZoom),t||this.fire(`layeradd`,{layer:h}),h.__parent&&h.__parent.getChildCount()===2)){var y=h.__parent.getAllChildMarkers(),b=y[0]===h?y[1]:y[0];n.removeLayer(b)}}d&&d(p,f,new Date().getTime()-g),p===f?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(_,this.options.chunkDelay)},this);_()}else for(var v=this._needsClustering;p<f;p++){if(h=e[p],h instanceof L.LayerGroup){m&&=(e=e.slice(),!1),this._extractNonGroupLayers(h,e),f=e.length;continue}if(!h.getLatLng){s.addLayer(h);continue}this.hasLayer(h)||v.push(h)}return this},removeLayers:function(e){var t,n,s=e.length,c=this._featureGroup,l=this._nonPointGroup,d=!0;if(!this._map){for(t=0;t<s;t++){if(n=e[t],n instanceof L.LayerGroup){d&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),s=e.length;continue}this._arraySplice(this._needsClustering,n),l.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire(`layerremove`,{layer:n})}return this}if(this._unspiderfy){this._unspiderfy();var f=e.slice(),p=s;for(t=0;t<p;t++){if(n=f[t],n instanceof L.LayerGroup){this._extractNonGroupLayers(n,f),p=f.length;continue}this._unspiderfyLayer(n)}}for(t=0;t<s;t++){if(n=e[t],n instanceof L.LayerGroup){d&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),s=e.length;continue}if(!n.__parent){l.removeLayer(n),this.fire(`layerremove`,{layer:n});continue}this._removeLayer(n,!0,!0),this.fire(`layerremove`,{layer:n}),c.hasLayer(n)&&(c.removeLayer(n),n.clusterShow&&n.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n=this._needsClustering.slice(),s=this._needsRemoving,c,l,d;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),l=n.length-1;l>=0;l--){for(c=!0,d=s.length-1;d>=0;d--)if(s[d].layer===n[l]){c=!1;break}c&&e.call(t,n[l])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(n){L.stamp(n)===e&&(t=n)}),t},hasLayer:function(e){if(!e)return!1;var t,n=this._needsClustering;for(t=n.length-1;t>=0;t--)if(n[t]===e)return!0;for(n=this._needsRemoving,t=n.length-1;t>=0;t--)if(n[t].layer===e)return!1;return!!(e.__parent&&e.__parent._group===this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,callback){var t=this._map;typeof callback!=`function`&&(callback=function(){});var showMarker=function(){(t.hasLayer(e)||t.hasLayer(e.__parent))&&!this._inZoomAnimation&&(this._map.off(`moveend`,showMarker,this),this.off(`animationend`,showMarker,this),t.hasLayer(e)?callback():e.__parent._icon&&(this.once(`spiderfied`,callback,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?callback():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on(`moveend`,showMarker,this),this._map.panTo(e.getLatLng())):(this._map.on(`moveend`,showMarker,this),this.on(`animationend`,showMarker,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,n,s;if(!isFinite(this._map.getMaxZoom()))throw`Map has no maxZoom specified`;for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;t<n;t++)s=this._needsRemoving[t],s.newlatlng=s.layer._latlng,s.layer._latlng=s.latlng;for(t=0,n=this._needsRemoving.length;t<n;t++)s=this._needsRemoving[t],this._removeLayer(s.layer,!0),s.layer._latlng=s.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on(`zoomend`,this._zoomEnd,this),this._map.on(`moveend`,this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(e){e.off(`zoomend`,this._zoomEnd,this),e.off(`moveend`,this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,s=this._gridUnclustered,c=Math.floor(this._map.getMinZoom());t>=c&&s[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,n){e._latlng=t,this.removeLayer(e),e._latlng=n,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,n){var s=this._gridClusters,c=this._gridUnclustered,l=this._featureGroup,d=this._map,f=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var p=e.__parent,m=p._markers,h;for(this._arraySplice(m,e);p&&(p._childCount--,p._boundsNeedUpdate=!0,!(p._zoom<f));)t&&p._childCount<=1?(h=p._markers[0]===e?p._markers[1]:p._markers[0],s[p._zoom].removeObject(p,d.project(p._cLatLng,p._zoom)),c[p._zoom].addObject(h,d.project(h.getLatLng(),p._zoom)),this._arraySplice(p.__parent._childClusters,p),p.__parent._markers.push(h),h.__parent=p.__parent,p._icon&&(l.removeLayer(p),n||l.addLayer(h))):p._iconNeedsUpdate=!0,p=p.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,n){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e=`cluster`+e}L.FeatureGroup.prototype.fire.call(this,e,t,n)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,`cluster`+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),n=` marker-cluster-`;return t<10?n+=`small`:t<100?n+=`medium`:n+=`large`,new L.DivIcon({html:`<div><span>`+t+`</span></div>`,className:`marker-cluster`+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,s=this.options.zoomToBoundsOnClick,c=this.options.spiderfyOnEveryZoom;(t||s||c)&&this.on(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),n&&(this.on(`clustermouseover`,this._showCoverage,this),this.on(`clustermouseout`,this._hideCoverage,this),e.on(`zoomend`,this._hideCoverage,this))},_zoomOrSpiderfy:function(e){var t=e.layer,n=t;if(!(e.type===`clusterkeypress`&&e.originalEvent&&e.originalEvent.keyCode!==13)){for(;n._childClusters.length===1;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),this.options.spiderfyOnEveryZoom&&t.spiderfy(),e.originalEvent&&e.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&=(this._map.removeLayer(this._shownPolygon),null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,s=this.options.spiderfyOnEveryZoom,c=this._map;(e||n||s)&&this.off(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),t&&(this.off(`clustermouseover`,this._showCoverage,this),this.off(`clustermouseout`,this._hideCoverage,this),c.off(`zoomend`,this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,radiusFn=n;typeof n!=`function`&&(radiusFn=function(){return n}),this.options.disableClusteringAtZoom!==null&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var s=e;s>=t;s--)this._gridClusters[s]=new L.DistanceGrid(radiusFn(s)),this._gridUnclustered[s]=new L.DistanceGrid(radiusFn(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var n=this._gridClusters,s=this._gridUnclustered,c=Math.floor(this._map.getMinZoom()),l,d;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=c;t--){l=this._map.project(e.getLatLng(),t);var f=n[t].getNearObject(l);if(f){f._addChild(e),e.__parent=f;return}if(f=s[t].getNearObject(l),f){var p=f.__parent;p&&this._removeLayer(f,!1);var m=new this._markerCluster(this,t,f,e);n[t].addObject(m,this._map.project(m._cLatLng,t)),f.__parent=m,e.__parent=m;var h=m;for(d=t-1;d>p._zoom;d--)h=new this._markerCluster(this,d,h),n[d].addObject(h,this._map.project(f.getLatLng(),d));p._addChild(h),this._removeFromGridUnclustered(f,t);return}s[t].addObject(e,l)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||=setTimeout(L.bind(this._processQueue,this),300)},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return t!==void 0&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(t._childCount===2){t._addToMap();var n=t.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var n=e.getLayers(),s=0,c;for(t||=[];s<n.length;s++){if(c=n[s],c instanceof L.LayerGroup){this._extractNonGroupLayers(c,t);continue}t.push(c)}return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=` leaflet-cluster-anim`,this._inZoomAnimation++},_animationZoomIn:function(e,t){var n=this._getExpandedVisibleBounds(),s=this._featureGroup,c=Math.floor(this._map.getMinZoom()),l;this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,c,function(c){var d=c._latlng,f=c._markers,p;for(n.contains(d)||(d=null),c._isSingleParent()&&e+1===t?(s.removeLayer(c),c._recursivelyAddChildrenToMap(null,t,n)):(c.clusterHide(),c._recursivelyAddChildrenToMap(d,t,n)),l=f.length-1;l>=0;l--)p=f[l],n.contains(p._latlng)||s.removeLayer(p)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),s.eachLayer(function(e){!(e instanceof L.MarkerCluster)&&e._icon&&e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,c,function(e){s.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,s=this._featureGroup;s.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){s.removeLayer(e),e.clusterShow(),n._animationEnd()})):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,n){var s=this._getExpandedVisibleBounds(),c=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(s,c,t+1,n);var l=this;this._forceLayout(),e._recursivelyBecomeVisible(s,n),this._enqueue(function(){if(e._childCount===1){var d=e._markers[0];this._ignoreMove=!0,d.setLatLng(d.getLatLng()),this._ignoreMove=!1,d.clusterShow&&d.clusterShow()}else e._recursively(s,n,c,function(e){e._recursivelyRemoveChildrenFromMap(s,c,t+1)});l._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``)),this._inZoomAnimation--,this.fire(`animationend`)},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,n,s){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),s&&this._addChild(s)},getAllChildMarkers:function(e,t){e||=[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(e,t);for(var s=this._markers.length-1;s>=0;s--)t&&this._markers[s].__dragStart||e.push(this._markers[s]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t=this._childClusters.slice(),n=this._group._map,s=n.getBoundsZoom(this._bounds),c=this._zoom+1,l=n.getZoom(),d;t.length>0&&s>c;){c++;var f=[];for(d=0;d<t.length;d++)f=f.concat(t[d]._childClusters);t=f}s>c?this._group._map.setView(this._latlng,c):s<=l?this._group._map.setView(this._latlng,l+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&=(this._iconObj=this._group.options.iconCreateFunction(this),!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||=e._cLatLng||e._latlng},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e=this._markers,t=this._childClusters,n=0,s=0,c=this._childCount,l,d,f,p;if(c!==0){for(this._resetBounds(),l=0;l<e.length;l++)f=e[l]._latlng,this._bounds.extend(f),n+=f.lat,s+=f.lng;for(l=0;l<t.length;l++)d=t[l],d._boundsNeedUpdate&&d._recalculateBounds(),this._bounds.extend(d._bounds),f=d._wLatLng,p=d._childCount,n+=f.lat*p,s+=f.lng*p;this._latlng=this._wLatLng=new L.LatLng(n/c,s/c),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,n){this._recursively(e,this._group._map.getMinZoom(),n-1,function(e){var n=e._markers,s,c;for(s=n.length-1;s>=0;s--)c=n[s],c._icon&&(c._setPos(t),c.clusterHide())},function(e){var n=e._childClusters,s,c;for(s=n.length-1;s>=0;s--)c=n[s],c._icon&&(c._setPos(t),c.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,n,s){this._recursively(e,s,t,function(c){c._recursivelyAnimateChildrenIn(e,c._group._map.latLngToLayerPoint(c.getLatLng()).round(),n),c._isSingleParent()&&n-1===s?(c.clusterShow(),c._recursivelyRemoveChildrenFromMap(e,t,n)):c.clusterHide(),c._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,n){this._recursively(n,this._group._map.getMinZoom()-1,t,function(s){if(t!==s._zoom)for(var c=s._markers.length-1;c>=0;c--){var l=s._markers[c];n.contains(l._latlng)&&(e&&(l._backupLatlng=l.getLatLng(),l.setLatLng(e),l.clusterHide&&l.clusterHide()),s._group._featureGroup.addLayer(l))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._restorePosition();else for(var c=this._childClusters.length-1;c>=0;c--)this._childClusters[c]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n,s){var c,l;this._recursively(e,t-1,n-1,function(e){for(l=e._markers.length-1;l>=0;l--)c=e._markers[l],(!s||!s.contains(c._latlng))&&(e._group._featureGroup.removeLayer(c),c.clusterShow&&c.clusterShow())},function(e){for(l=e._childClusters.length-1;l>=0;l--)c=e._childClusters[l],(!s||!s.contains(c._latlng))&&(e._group._featureGroup.removeLayer(c),c.clusterShow&&c.clusterShow())})},_recursively:function(e,t,n,s,c){var l=this._childClusters,d=this._zoom,f,p;if(t<=d&&(s&&s(this),c&&d===n&&c(this)),d<t||d<n)for(f=l.length-1;f>=0;f--)p=l[f],p._boundsNeedUpdate&&p._recalculateBounds(),e.intersects(p._bounds)&&p._recursively(e,t,n,s,c)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),s=this._getCoord(t.y),c=this._grid,l=c[s]=c[s]||{},d=l[n]=l[n]||[],f=L.Util.stamp(e);this._objectPoint[f]=t,d.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n=this._getCoord(t.x),s=this._getCoord(t.y),c=this._grid,l=c[s]=c[s]||{},d=l[n]=l[n]||[],f,p;for(delete this._objectPoint[L.Util.stamp(e)],f=0,p=d.length;f<p;f++)if(d[f]===e)return d.splice(f,1),p===1&&delete l[n],!0},eachObject:function(e,t){var n,s,c,l,d,f,p,m=this._grid;for(n in m)for(s in d=m[n],d)for(f=d[s],c=0,l=f.length;c<l;c++)p=e.call(t,f[c]),p&&(c--,l--)},getNearObject:function(e){var t=this._getCoord(e.x),n=this._getCoord(e.y),s,c,l,d,f,p,m,h,g=this._objectPoint,_=this._sqCellSize,v=null;for(s=n-1;s<=n+1;s++)if(d=this._grid[s],d){for(c=t-1;c<=t+1;c++)if(f=d[c],f)for(l=0,p=f.length;l<p;l++)m=f[l],h=this._sqDist(g[L.Util.stamp(m)],e),(h<_||h<=_&&v===null)&&(_=h,v=m)}return v},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var n=t.x-e.x,s=t.y-e.y;return n*n+s*s}},(function(){L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var n=0,s=null,c=[],l,d,f;for(l=t.length-1;l>=0;l--){if(d=t[l],f=this.getDistant(d,e),f>0)c.push(d);else continue;f>n&&(n=f,s=d)}return{maxPoint:s,newPoints:c}},buildConvexHull:function(e,t){var n=[],s=this.findMostDistantPointFromBaseLine(e,t);return s.maxPoint?(n=n.concat(this.buildConvexHull([e[0],s.maxPoint],s.newPoints)),n=n.concat(this.buildConvexHull([s.maxPoint,e[1]],s.newPoints)),n):[e[0]]},getConvexHull:function(e){var t=!1,n=!1,s=!1,c=!1,l=null,d=null,f=null,p=null,m=null,h=null,g;for(g=e.length-1;g>=0;g--){var _=e[g];(t===!1||_.lat>t)&&(l=_,t=_.lat),(n===!1||_.lat<n)&&(d=_,n=_.lat),(s===!1||_.lng>s)&&(f=_,s=_.lng),(c===!1||_.lng<c)&&(p=_,c=_.lng)}return n===t?(h=p,m=f):(h=d,m=l),[].concat(this.buildConvexHull([h,m],e),this.buildConvexHull([m,h],e))}}})(),L.MarkerCluster.include({getConvexHull:function(){var e=this.getAllChildMarkers(),t=[],n,s;for(s=e.length-1;s>=0;s--)n=e[s].getLatLng(),t.push(n);return L.QuickHull.getConvexHull(t)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var e=this.getAllChildMarkers(null,!0),t=this._group._map.latLngToLayerPoint(this._latlng),n;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?n=this._group.options.spiderfyShapePositions(e.length,t):e.length>=this._circleSpiralSwitchover?n=this._generatePointsSpiral(e.length,t):(t.y+=10,n=this._generatePointsCircle(e.length,t)),this._animationSpiderfy(e,n)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,s=this._2PI/e,c=[],l,d;for(n=Math.max(n,35),c.length=e,l=0;l<e;l++)d=this._circleStartAngle+l*s,c[l]=new L.Point(t.x+n*Math.cos(d),t.y+n*Math.sin(d))._round();return c},_generatePointsSpiral:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier,s=n*this._spiralLengthStart,c=n*this._spiralFootSeparation,l=n*this._spiralLengthFactor*this._2PI,d=0,f=[],p;for(f.length=e,p=e;p>=0;p--)p<e&&(f[p]=new L.Point(t.x+s*Math.cos(d),t.y+s*Math.sin(d))._round()),d+=c/s+p*5e-4,s+=l/d;return f},_noanimationUnspiderfy:function(){var e=this._group,t=e._map,n=e._featureGroup,s=this.getAllChildMarkers(null,!0),c,l;for(e._ignoreMove=!0,this.setOpacity(1),l=s.length-1;l>=0;l--)c=s[l],n.removeLayer(c),c._preSpiderfyLatlng&&(c.setLatLng(c._preSpiderfyLatlng),delete c._preSpiderfyLatlng),c.setZIndexOffset&&c.setZIndexOffset(0),c._spiderLeg&&(t.removeLayer(c._spiderLeg),delete c._spiderLeg);e.fire(`unspiderfied`,{cluster:this,markers:s}),e._ignoreMove=!1,e._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n=this._group,s=n._map,c=n._featureGroup,l=this._group.options.spiderLegPolylineOptions,d,f,p,m;for(n._ignoreMove=!0,d=0;d<e.length;d++)m=s.layerPointToLatLng(t[d]),f=e[d],p=new L.Polyline([this._latlng,m],l),s.addLayer(p),f._spiderLeg=p,f._preSpiderfyLatlng=f._latlng,f.setLatLng(m),f.setZIndexOffset&&f.setZIndexOffset(1e6),c.addLayer(f);this.setOpacity(.3),n._ignoreMove=!1,n.fire(`spiderfied`,{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var n=this,s=this._group,c=s._map,l=s._featureGroup,d=this._latlng,f=c.latLngToLayerPoint(d),p=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),h=m.opacity,g,_,v,y,b,x;for(h===void 0&&(h=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(m.opacity=0,m.className=(m.className||``)+` leaflet-cluster-spider-leg`):m.opacity=h,s._ignoreMove=!0,g=0;g<e.length;g++)_=e[g],x=c.layerPointToLatLng(t[g]),v=new L.Polyline([d,x],m),c.addLayer(v),_._spiderLeg=v,p&&(y=v._path,b=y.getTotalLength()+.1,y.style.strokeDasharray=b,y.style.strokeDashoffset=b),_.setZIndexOffset&&_.setZIndexOffset(1e6),_.clusterHide&&_.clusterHide(),l.addLayer(_),_._setPos&&_._setPos(f);for(s._forceLayout(),s._animationStart(),g=e.length-1;g>=0;g--)x=c.layerPointToLatLng(t[g]),_=e[g],_._preSpiderfyLatlng=_._latlng,_.setLatLng(x),_.clusterShow&&_.clusterShow(),p&&(v=_._spiderLeg,y=v._path,y.style.strokeDashoffset=0,v.setStyle({opacity:h}));this.setOpacity(.3),s._ignoreMove=!1,setTimeout(function(){s._animationEnd(),s.fire(`spiderfied`,{cluster:n,markers:e})},200)},_animationUnspiderfy:function(e){var t=this,n=this._group,s=n._map,c=n._featureGroup,l=e?s._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):s.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),f=L.Path.SVG,p,m,h,g,_,v;for(n._ignoreMove=!0,n._animationStart(),this.setOpacity(1),m=d.length-1;m>=0;m--)p=d[m],p._preSpiderfyLatlng&&(p.closePopup(),p.setLatLng(p._preSpiderfyLatlng),delete p._preSpiderfyLatlng,v=!0,p._setPos&&(p._setPos(l),v=!1),p.clusterHide&&(p.clusterHide(),v=!1),v&&c.removeLayer(p),f&&(h=p._spiderLeg,g=h._path,_=g.getTotalLength()+.1,g.style.strokeDashoffset=_,h.setStyle({opacity:0})));n._ignoreMove=!1,setTimeout(function(){var e=0;for(m=d.length-1;m>=0;m--)p=d[m],p._spiderLeg&&e++;for(m=d.length-1;m>=0;m--)p=d[m],p._spiderLeg&&(p.clusterShow&&p.clusterShow(),p.setZIndexOffset&&p.setZIndexOffset(0),e>1&&c.removeLayer(p),s.removeLayer(p._spiderLeg),delete p._spiderLeg);n._animationEnd(),n.fire(`unspiderfied`,{cluster:t,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on(`click`,this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on(`zoomstart`,this._unspiderfyZoomStart,this),this._map.on(`zoomend`,this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off(`click`,this._unspiderfyWrapper,this),this._map.off(`zoomstart`,this._unspiderfyZoomStart,this),this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._map.off(`zoomend`,this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on(`zoomanim`,this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,`leaflet-touching`)||(this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=n,Object.defineProperty(e,"__esModule",{value:!0})})}))();var Q=Symbol(`newer`),$=Symbol(`older`),Entry=class{key;value;constructor(e,t){this.key=e,this.value=t,this[Q]=void 0,this[$]=void 0}},LRUMap=class{size;limit;oldest;newest;_keymap;constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[Q]&&(e===this.oldest&&(this.oldest=e[Q]),e[Q][$]=e[$]),e[$]&&(e[$][Q]=e[Q]),e[Q]=void 0,e[$]=this.newest,this.newest&&(this.newest[Q]=e),this.newest=e)}assign(e){let t,n=this.limit||Number.MAX_VALUE;this._keymap.clear();let s=e[Symbol.iterator]();for(let e=s.next();!e.done;e=s.next()){let s=new Entry(e.value[0],e.value[1]);if(this._keymap.set(s.key,s),t?(t[Q]=s,s[$]=t):this.oldest=s,t=s,n--==0)throw Error(`overflow`)}this.newest=t,this.size=this._keymap.size}get(e){let t=this._keymap.get(e);if(t)return this._markEntryAsUsed(t),t.value}set(e,t){let n=this._keymap.get(e);return n?(n.value=t,this._markEntryAsUsed(n),this):(this._keymap.set(e,n=new Entry(e,t)),this.newest?(this.newest[Q]=n,n[$]=this.newest):this.oldest=n,this.newest=n,++this.size,this.size>this.limit&&this.shift(),this)}shift(){let e=this.oldest;if(e)return this.oldest[Q]?(this.oldest=this.oldest[Q],this.oldest[$]=void 0):(this.oldest=void 0,this.newest=void 0),e[Q]=e[$]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){let t=this._keymap.get(e);if(t)return this._keymap.delete(t.key),t[Q]&&t[$]?(t[$][Q]=t[Q],t[Q][$]=t[$]):t[Q]?(t[Q][$]=void 0,this.oldest=t[Q]):t[$]?(t[$][Q]=void 0,this.newest=t[$]):this.oldest=this.newest=void 0,this.size--,t.value}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new KeyIterator(this.oldest)}values(){return new ValueIterator(this.oldest)}entries(){return this}[Symbol.iterator](){return new EntryIterator(this.oldest)}forEach(e,t){typeof t!=`object`&&(t=this);let n=this.oldest;for(;n;)e.call(t,n.value,n.key,this),n=n[Q]}toJSON(){let e=Array(this.size),t=0,n=this.oldest;for(;n;)e[t++]={key:n.key,value:n.value},n=n[Q];return e}toString(){let e=``,t=this.oldest;for(;t;)e+=String(t.key)+`:`+t.value,t=t[Q],t&&(e+=` < `);return e}};function EntryIterator(e){this.entry=e}EntryIterator.prototype[Symbol.iterator]=function(){return this},EntryIterator.prototype.next=function(){let e=this.entry;return e?(this.entry=e[Q],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function KeyIterator(e){this.entry=e}KeyIterator.prototype[Symbol.iterator]=function(){return this},KeyIterator.prototype.next=function(){let e=this.entry;return e?(this.entry=e[Q],{done:!1,value:e.key}):{done:!0,value:void 0}};function ValueIterator(e){this.entry=e}ValueIterator.prototype[Symbol.iterator]=function(){return this},ValueIterator.prototype.next=function(){let e=this.entry;return e?(this.entry=e[Q],{done:!1,value:e.value}):{done:!0,value:void 0}};function waitForAPI(e,t){let n=0,s=null;s=setInterval(function(){if(n>=20)throw clearInterval(s),Error(`window.google not found after 10 seconds`);window.google&&window.google.maps&&window.google.maps.Map&&(clearInterval(s),e.call(t)),++n},500)}L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:`roadmap`,maxNativeZoom:21},initialize:function(e){L.GridLayer.prototype.initialize.call(this,e),this._tileCallbacks={},this._lru=new LRUMap(100),this._imagesPerTile=this.options.type===`hybrid`?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(e){L.GridLayer.prototype.onAdd.call(this,e),this._initMutantContainer(),this._logoContainer&&e._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&e._controlCorners.bottomright.appendChild(this._attributionContainer),waitForAPI(()=>{this._map&&(this._initMutant(),google.maps.event.addListenerOnce(this._mutant,`idle`,()=>{this._map&&(this._checkZoomLevels(),this._mutantIsReady=!0)}))})},onRemove:function(e){L.GridLayer.prototype.onRemove.call(this,e),this._observer.disconnect(),e._container.removeChild(this._mutantContainer),this._logoContainer&&L.DomUtil.remove(this._logoContainer),this._attributionContainer&&L.DomUtil.remove(this._attributionContainer),this._mutant&&google.maps.event.clearListeners(this._mutant,`idle`)},addGoogleLayer:function(e,t){return this._subLayers||={},this.whenReady(()=>{var n=google.maps[e],s=new n(t);s.setMap(this._mutant),this._subLayers[e]=s}),this},removeGoogleLayer:function(e){return this.whenReady(()=>{var t=this._subLayers&&this._subLayers[e];t&&(t.setMap(null),delete this._subLayers[e])}),this},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create(`div`,`leaflet-google-mutant leaflet-top leaflet-left`),this._mutantContainer.id=`_MutantContainer_`+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.pointerEvents=`none`,this._mutantContainer.style.visibility=`hidden`,L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);let e=this._mutantContainer.style;this._map.options.zoomSnap<1?(e.width=`180%`,e.height=`180%`):(e.width=`100%`,e.height=`100%`),e.zIndex=-1,this._attachObserver(this._mutantContainer)},_initMutant:function(){if(!this._mutant){var e={center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,styles:this.options.styles||[],backgroundColor:`transparent`};this.options.mapId!=null&&(e.mapId=this.options.mapId);var t=new google.maps.Map(this._mutantContainer,e);this._mutant=t,this._update(),this.fire(`spawned`,{mapObject:t}),this._waitControls(),this.once(`controls_ready`,this._setupAttribution)}},_attachObserver:function _attachObserver(e){this._observer||=new MutationObserver(this._onMutations.bind(this)),this._observer.observe(e,{childList:!0,subtree:!0}),Array.prototype.forEach.call(e.querySelectorAll(`img`),this._boundOnMutatedImage)},_waitControls:function(){let e=setInterval(()=>{let t=this._mutant.__gm.layoutManager;if(!t)return;clearInterval(e);let n;Object.keys(t).forEach(function(e){let s=t[e];s.get&&s.get(1)instanceof Node&&(n=s)}),this.fire(`controls_ready`,{positions:n})},50)},_setupAttribution:function(e){if(!this._map)return;let t=google.maps.ControlPosition,n=this._attributionContainer=e.positions.get(t.BOTTOM_RIGHT);L.DomUtil.addClass(n,`leaflet-control leaflet-control-attribution`),L.DomEvent.disableClickPropagation(n),n.style.height=`14px`,this._map._controlCorners.bottomright.appendChild(n),this._logoContainer=e.positions.get(t.BOTTOM_LEFT),this._logoContainer.style.pointerEvents=`auto`,this._map._controlCorners.bottomleft.appendChild(this._logoContainer)},_onMutations:function _onMutations(e){for(var t=0;t<e.length;++t)for(var n=e[t],s=0;s<n.addedNodes.length;++s){var c=n.addedNodes[s];c instanceof HTMLImageElement?this._onMutatedImage(c):c instanceof HTMLElement&&Array.prototype.forEach.call(c.querySelectorAll(`img`),this._boundOnMutatedImage)}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+|VinaFnapurmBegrtn)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,_onMutatedImage:function _onMutatedImage(e){let t,n=e.src.match(this._roadRegexp),s=0;if(n?(t={z:n[1],x:n[2],y:n[3]},this._imagesPerTile>1&&(e.style.zIndex=1,s=1)):(n=e.src.match(this._satRegexp),n&&(t={x:n[1],y:n[2],z:n[3]}),s=0),t){var c=this._tileCoordsToKey(t);e.style.position=`absolute`;var l=c+`/`+s;this._lru.set(l,e),l in this._tileCallbacks&&this._tileCallbacks[l]&&(this._tileCallbacks[l].forEach(t=>t(e)),delete this._tileCallbacks[l])}},createTile:function(e,t){let n=this._tileCoordsToKey(e),s=L.DomUtil.create(`div`);s.style.textAlign=`left`,s.dataset.pending=this._imagesPerTile,t=t.bind(this,null,s);for(var c=0;c<this._imagesPerTile;++c){let e=n+`/`+c,l=this._lru.get(e);l?(s.appendChild(this._clone(l)),--s.dataset.pending):(this._tileCallbacks[e]=this._tileCallbacks[e]||[],this._tileCallbacks[e].push(function(e){return function(n){e.appendChild(this._clone(n)),--e.dataset.pending,parseInt(e.dataset.pending)||t()}.bind(this)}.bind(this)(s)))}return parseInt(s.dataset.pending)||L.Util.requestAnimFrame(t),s},_clone:function(e){let t=e.cloneNode(!0);return t.style.visibility=`visible`,t},_checkZoomLevels:function(){let e=this._map.getZoom(),t=this._mutant.getZoom();!e||!t||(t!==e||t>this.options.maxNativeZoom)&&this._setMaxNativeZoom(t)},_setMaxNativeZoom:function(e){e!==this.options.maxNativeZoom&&(this.options.maxNativeZoom=e,this._resetView())},_update:function(e){if(this._mutant){e||=this._map.getCenter();let t=new google.maps.LatLng(e.lat,e.lng),n=Math.round(this._map.getZoom()),s=this._mutant.getZoom();this._mutant.setCenter(t),n!==s&&(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this,e)},whenReady:function(e,t){return this._mutant?e.call(t||this,{target:this}):this.on(`spawned`,e,t),this}}),L.gridLayer.googleMutant=function(e){return new L.GridLayer.GoogleMutant(e)};var hn=L.GridLayer.GoogleMutant,gn={iconColor:`#1EB300`,iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}},_n=Z.Icon.extend({options:{icon:`leaf`,iconSize:gn.iconSize.circle,iconAnchor:gn.iconAnchor.marker,iconShape:`marker`,iconStyle:``,innerIconAnchor:[0,3],innerIconStyle:``,isAlphaNumericIcon:!1,text:1,borderColor:gn.iconColor,borderWidth:2,borderStyle:`solid`,backgroundColor:`white`,textColor:gn.iconColor,customClasses:``,spin:!1,prefix:`fa`,html:``},initialize(e){this.applyDefaults(e),this.options=!e||!e.html?Z.Util.setOptions(this,e):e},applyDefaults(e){e&&(!e.iconSize&&e.iconShape&&(e.iconSize=gn.iconSize[e.iconShape]),!e.iconAnchor&&e.iconShape&&(e.iconAnchor=gn.iconAnchor[e.iconShape]),!e.popupAnchor&&e.iconShape&&(e.popupAnchor=gn.popupAnchor[e.iconShape]),e.innerIconAnchor||(e.iconShape===`circle`||e.iconShape===`marker`)&&(e.iconShape===`circle`&&e.isAlphaNumericIcon?e.innerIconAnchor=[0,-1]:e.iconShape===`marker`&&!e.isAlphaNumericIcon&&(e.innerIconAnchor=gn.innerIconAnchor[e.iconShape])))},createIcon(){let e=document.createElement(`div`),t=this.options;if(e.innerHTML=t.html?t.html:this.createIconInnerHtml(),this._setIconStyles(e),this.options.iconShape===`marker`){let n=document.createElement(`div`);return n.className=`beautify-marker`+(t.props.owner._currSelRow===t.props.row?` selected`:``),n.appendChild(e),n}return e},createIconInnerHtml(){let e=this.options;if(e.iconShape===`circle-dot`||e.iconShape===`rectangle-dot`||e.iconShape===`doughnut`)return``;let t=this.getInnerIconStyle(e);if(e.isAlphaNumericIcon)return`<div style="`+t+`">`+e.text+`</div>`;let n=``;return e.spin&&(n=` fa-spin`),`<i class="`+e.prefix+` `+e.icon+n+`" style="`+t+`"></i>`},getInnerIconStyle(e){let t=(0,Z.point)(e.innerIconAnchor);return`color:`+e.textColor+`;margin-top:`+t.y+`px; margin-left:`+t.x+`px;`+e.innerIconStyle},_setIconStyles(e){let t=this.options,n=(0,Z.point)(t.iconSize),s=(0,Z.point)(t.iconAnchor);if(e.className=`beautify-marker `,t.iconShape&&(e.className+=t.iconShape),t.customClasses&&(e.className+=` `+t.customClasses),e.style.backgroundColor=t.backgroundColor,e.style.color=t.textColor,e.style.borderColor=t.borderColor,e.style.borderWidth=t.borderWidth+`px`,e.style.borderStyle=t.borderStyle,n&&(e.style.width=n.x+`px`,e.style.height=n.y+`px`),s&&(e.style.marginLeft=-s.x+`px`,e.style.marginTop=-s.y+`px`),t.iconStyle){let n=e.getAttribute(`style`);n+=t.iconStyle,e.setAttribute(`style`,n)}}});function BeautifyIcon(e){return new _n(e)}var LeafletLayer=class extends Z.Layer{_rootGroup},D3SvgOverlay=class extends LeafletLayer{_svg;map;selection;projection;_pixelOrigin;_zoomDiff;_zoom;_scale;_shift;_wgsOrigin;_wgsInitialShift;constructor(e={}){super(),this._options(e)}svg(){return this._rootGroup}_drawCallback;drawCallback(e){return arguments.length?(this._drawCallback=e,this):this._drawCallback}getBounds(){if(!this.selection||!this.projection)return new Z.LatLngBounds([-90,-180],[90,180]);let e=this.selection.node().getBBox(),t;try{t=this.projection.layerPointToLatLng(new Z.Point(e.x,e.y+e.height))}catch{t=[-90,-180]}let n;try{n=this.projection.layerPointToLatLng(new Z.Point(e.x+e.width,e.y))}catch{n=[90,180]}return new Z.LatLngBounds(t,n)}_undef(e){return e===void 0}_options(e){return this._undef(e)?this.options:(e.zoomHide=this._undef(e.zoomHide)?!1:e.zoomHide,e.zoomDraw=this._undef(e.zoomDraw)?!0:e.zoomDraw,this.options=e)}draw(){!this.map||!this._drawCallback||(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/2**(this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))}_zoomChange(e){let t=this._undef(e.zoom)?this.map._zoom:e.zoom;this._zoomDiff=t-this._zoom,this._scale=2**this._zoomDiff,this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));let n=[`translate(`,this._shift.x,`,`,this._shift.y,`) `],s=[`scale(`,this._scale,`,`,this._scale,`) `];this._rootGroup.attr(`transform`,n.concat(s).join(``)),this.options.zoomDraw&&this.draw()}onAdd(e){this.map=e;let n=this;return this._svg=Z.svg(),e.addLayer(this._svg),this._rootGroup=(0,t.select)(this._svg._rootGroup).classed(`d3-overlay`,!0),this._rootGroup.classed(`leaflet-zoom-hide`,this.options.zoomDraw),this.selection=this._rootGroup,this._pixelOrigin=e.getPixelOrigin(),this._wgsOrigin=Z.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Z.point(0,0),this._scale=1,this.projection={latLngToLayerPoint(e,t){return t=n._undef(t)?n._zoom:t,n.map.project(Z.latLng(e),t)._subtract(n._pixelOrigin)},layerPointToLatLng(e,t){t=n._undef(t)?n._zoom:t;let s=Z.point(e).add(n._pixelOrigin);return n.map.unproject(s,t)},unitsPerMeter:256*2**n._zoom/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(e.getCenter().lat*Math.PI/180))/2**(e.getZoom()+8),map:n.map,layer:n,scale:1},this.projection._projectPoint=function(e,t){let s=n.projection.latLngToLayerPoint(new Z.LatLng(t,e));this.stream.point(s.x,s.y)},this.projection.pathFromGeojson=path_default().projection(transform_default$1({point:this.projection._projectPoint})),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this}getEvents(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}}onRemove(e){return this._svg.remove(),this}addTo(e){return e.addLayer(this),this}},vn=__toESM(__commonJSMin(((e,t)=>{t!==void 0&&(t.exports=simpleheat);function simpleheat(e){if(!(this instanceof simpleheat))return new simpleheat(e);this._canvas=e=typeof e==`string`?document.getElementById(e):e,this._ctx=e.getContext(`2d`),this._width=e.width,this._height=e.height,this._max=1,this._data=[]}simpleheat.prototype={defaultRadius:25,defaultGradient:{.4:`blue`,.6:`cyan`,.7:`lime`,.8:`yellow`,1:`red`},data:function(e){return this._data=e,this},max:function(e){return this._max=e,this},add:function(e){return this._data.push(e),this},clear:function(){return this._data=[],this},radius:function(e,t){t=t===void 0?15:t;var n=this._circle=this._createCanvas(),s=n.getContext(`2d`),c=this._r=e+t;return n.width=n.height=c*2,s.shadowOffsetX=s.shadowOffsetY=c*2,s.shadowBlur=t,s.shadowColor=`black`,s.beginPath(),s.arc(-c,-c,e,0,Math.PI*2,!0),s.closePath(),s.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function(e){var t=this._createCanvas(),n=t.getContext(`2d`),s=n.createLinearGradient(0,0,0,256);for(var c in t.width=1,t.height=256,e)s.addColorStop(+c,e[c]);return n.fillStyle=s,n.fillRect(0,0,1,256),this._grad=n.getImageData(0,0,1,256).data,this},draw:function(e){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var t=this._ctx;t.clearRect(0,0,this._width,this._height);for(var n=0,s=this._data.length,c;n<s;n++)c=this._data[n],t.globalAlpha=Math.max(c[2]/this._max,e===void 0?.05:e),t.drawImage(this._circle,c[0]-this._r,c[1]-this._r);var l=t.getImageData(0,0,this._width,this._height);return this._colorize(l.data,this._grad),t.putImageData(l,0,0),this},_colorize:function(e,t){for(var n=0,s=e.length,c;n<s;n+=4)c=e[n+3]*4,c&&(e[n]=t[c],e[n+1]=t[c+1],e[n+2]=t[c+2])},_createCanvas:function(){return typeof document<`u`?document.createElement(`canvas`):new this._canvas.constructor}}}))(),1),yn=window.simpleheat||vn&&vn.default||vn,LeafletLayer2=class extends Z.Layer{},HeatLayer$1=class extends LeafletLayer2{static{__name(this,`HeatLayer`)}_latlngs;_heat;_frame;_canvas;constructor(e,t={}){super(t),this._latlngs=e}initialize(e){this.setOptions(e)}setLatLngs(e){return this._latlngs=e,this.redraw()}addLatLng(e){return this._latlngs.push(e),this.redraw()}setOptions(e){return this.options=e,this._heat&&this._updateOptions(),this.redraw()}redraw(){return this._heat&&!this._frame&&!this._map._animating&&(this._frame=Z.Util.requestAnimFrame(this._redraw,this)),this}onAdd(e){return this._map=e,this._canvas||this._initCanvas(),e._panes.overlayPane.appendChild(this._canvas),e.on(`moveend`,this._reset,this),e.options.zoomAnimation&&Z.Browser.any3d&&e.on(`zoomanim`,this._animateZoom,this),this._reset(),this}onRemove(e){return e.getPanes().overlayPane.removeChild(this._canvas),e.off(`moveend`,this._reset,this),e.options.zoomAnimation&&e.off(`zoomanim`,this._animateZoom,this),this}addTo(e){return e.addLayer(this),this}_initCanvas(){let e=this._canvas=Z.DomUtil.create(`canvas`,`leaflet-heatmap-layer leaflet-layer`),t=Z.DomUtil.testProp([`transformOrigin`,`WebkitTransformOrigin`,`msTransformOrigin`]);e.style[t]=`50% 50%`;let n=this._map.getSize();e.width=n.x,e.height=n.y;let s=this._map.options.zoomAnimation&&Z.Browser.any3d;Z.DomUtil.addClass(e,`leaflet-zoom-`+(s?`animated`:`hide`)),this._heat=yn(e),this._updateOptions()}_updateOptions(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)}_reset(){let e=this._map.containerPointToLayerPoint([0,0]);Z.DomUtil.setPosition(this._canvas,e);let t=this._map.getSize();this._heat._width!==t.x&&(this._canvas.width=this._heat._width=t.x),this._heat._height!==t.y&&(this._canvas.height=this._heat._height=t.y),this._redraw()}_redraw(){let e=[],t=this._heat._r,n=this._map.getSize(),s=new Z.Bounds(Z.point([-t,-t]),n.add([t,t])),c=this.options.max===void 0?1:this.options.max,l=this.options.maxZoom===void 0?this._map.getMaxZoom():this.options.maxZoom,d=1/2**Math.max(0,Math.min(l-this._map.getZoom(),12)),f=t/2,p=[],m=this._map._getMapPanePos(),h=m.x%f,g=m.y%f,_,v,y,b,x,S,C,T,E;for(_=0,v=this._latlngs.length;_<v;_++)y=this._map.latLngToContainerPoint(this._latlngs[_]),s.contains(y)&&(x=Math.floor((y.x-h)/f)+2,S=Math.floor((y.y-g)/f)+2,E=(this._latlngs[_].alt===void 0?this._latlngs[_][2]===void 0?1:+this._latlngs[_][2]:this._latlngs[_].alt)*d,p[S]=p[S]||[],b=p[S][x],b?(b[0]=(b[0]*b[2]+y.x*E)/(b[2]+E),b[1]=(b[1]*b[2]+y.y*E)/(b[2]+E),b[2]+=E):p[S][x]=[y.x,y.y,E]);for(_=0,v=p.length;_<v;_++)if(p[_])for(C=0,T=p[_].length;C<T;C++)b=p[_][C],b&&e.push([Math.round(b[0]),Math.round(b[1]),Math.min(b[2],c)]);this._heat.data(e).draw(this.options.minOpacity),this._frame=null}_animateZoom(e){let t=this._map.getZoomScale(e.zoom),n=this._map._getCenterOffset(e.center)._multiplyBy(-t).subtract(this._map._getMapPanePos());Z.DomUtil.setTransform?Z.DomUtil.setTransform(this._canvas,n,t):this._canvas.style[Z.DomUtil.TRANSFORM]=Z.DomUtil.getTranslateString(n)+` scale(`+t+`)`}},bn=Z.default.MarkerClusterGroup,TileLayer=class extends t.Widget{_layer=new Z.FeatureGroup;_crs=Z.CRS.EPSG3857;constructor(e=!1){super(),this._layer.__hpcc_layer=this}crs(){return this._crs}attribution(){return``}clear(){this._layer.clearLayers()}add(e){this._layer.addLayer(e)}_initPromise;init(){return this._initPromise||=Promise.resolve(),this._initPromise}hasBounds(){return!1}getBounds(){return this._layer.getBounds()}layerEnter(e){e.addLayer(this._layer)}layerUpdate(e){}layerExit(e){this._layer.clearLayers(),e.removeLayer(this._layer)}zoomEnd(e){}moveEnd(e){}viewReset(e){}},xn=resolve(`Albers`).scale(.5),Sn=resolve(`AlbersUsaPr`).scale(.5),Cn=Z.Util.extend({},Z.CRS,{projection:{project(e){let t=Sn([e.lng,e.lat]);return t||=xn([e.lng,e.lat]),new Z.Point(t[0],t[1])},unproject(e){if(!isNaN(e.x)&&!isNaN(e.y)){let t=xn.invert([e.x,e.y]);return new Z.LatLng(t[1],t[0])}else return new Z.LatLng(0,0)}},transformation:new Z.Transformation(1,0,1,0),infinite:!0}),AlbersLayer=class extends TileLayer{_crs=Cn;constructor(){super()}hasBounds(){return!0}getBounds(){return new Z.LatLngBounds([20,-123],[49,-64])}};AlbersLayer.prototype._class+=` map_AlbersLayer`;var BlankLayer=class extends TileLayer{constructor(){super()}};BlankLayer.prototype._class+=` map_BlankLayer`;var GMapLayer=class extends TileLayer{constructor(){super()}init(){return this._initPromise||=requireGoogleMap(),this._initPromise}attribution(){return window.__hpcc_gmap_apikey?``:`DEVELOPER USE ONLY (@hpcc-js)`}getMaxZoom(){return 23}layerEnter(e){super.layerEnter(e),this.add(new hn({type:`roadmap`,styles:this.googleMapStyles()}))}};GMapLayer.prototype._class+=` map_GMapLayer`,GMapLayer.prototype.publish(`googleMapStyles`,{},`object`,`Styling for map colors etc`,null,{tags:[`Basic`]});var MapBoxLayer=class extends TileLayer{constructor(){super()}attribution(){return window.__hpcc_mapbox_apikey?``:`DEVELOPER USE ONLY (@hpcc-js)`}getMaxZoom(){return 18}layerEnter(e){super.layerEnter(e),window.__hpcc_mapbox_apikey||console.warn(`__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)`);let t=window.__hpcc_mapbox_apikey||`pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw`;this.add(new Z.TileLayer(`https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token=${t}`,{attribution:`Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>`,maxZoom:18,id:`streets-v11`,accessToken:t}))}};MapBoxLayer.prototype._class+=` map_MapBoxLayer`;var OpenStreetLayer=class extends TileLayer{constructor(){super()}attribution(){return``}getMaxZoom(){return 18}layerEnter(e){super.layerEnter(e),this.add(new Z.TileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{attribution:`Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>`,maxZoom:18,id:`open.streets`}))}};OpenStreetLayer.prototype._class+=` map_MapBoxLayer`;var Leaflet=class extends t.HTMLWidget{_leafletElement;_leafletMap;_iconBar=new t.IconBar().buttons([new t.Button().faChar(`fa-plus`).tooltip(`Zoom in`).on(`click`,()=>{this.zoomPlus()}),new t.Button().faChar(`fa-minus`).tooltip(`Zoom out`).on(`click`,()=>{this.zoomMinus()}),new t.Spacer,new t.Button().faChar(`fa-arrows-alt`).tooltip(`Zoom to fit`).on(`click`,()=>{this.zoomToFit()})]);_blankLayer=new BlankLayer;_albersLayer=new AlbersLayer;_mapBoxLayer=new MapBoxLayer;_openStreetLayer=new OpenStreetLayer;_gmapLayer=new GMapLayer;constructor(){super(),this.baseLayer()}zoom(){return this._leafletMap.getZoom()}zoomPlus(){this._leafletMap.zoomIn()}zoomMinus(){this._leafletMap.zoomOut()}zoomToDefault(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})}zoomToFit(){let e;this.mapType()===`AlbersPR`?e=this._albersLayer.getBounds():this.layers().filter(e=>e.hasBounds()).forEach(t=>{e?e.extend(t.getBounds()):e=t.getBounds()}),e&&e.isValid()?this._leafletMap.fitBounds(e,{maxZoom:14}):this.zoomToDefault()}syncLayers(e,t,n){let s=[...e],c=[],l=[];this._leafletMap.eachLayer(e=>{let t=s.indexOf(e.__hpcc_layer);t>=0?(c.push(e.__hpcc_layer),s.splice(t,1)):e.__hpcc_layer&&l.push(e.__hpcc_layer)}),s.forEach(e=>{e.layerEnter(this._leafletMap),e.layerUpdate(this._leafletMap)}),c.forEach(e=>{e.layerUpdate(this._leafletMap)}),l.forEach(e=>{e.layerExit(this._leafletMap)})}_owner;isLayer(){return this._owner!==void 0&&this._owner!==this}baseLayer(){switch(this.mapType()){case`AlbersPR`:this.map(this._albersLayer);break;case`MapBox`:this.map(this._mapBoxLayer);break;case`OpenStreet`:this.map(this._openStreetLayer);break;case`Google`:this.map(this._gmapLayer);break;default:this.map(this._blankLayer);break}return this.map()}enter(e,t){super.enter(e,t),t.style(`position`,`relative`),this._leafletElement=t.append(`div`).style(`position`,`absolute`).style(`width`,`${this.width()}px`).style(`height`,`${this.height()}px`),this._iconBar.target(e)}_prevCRS;update(e,t){super.update(e,t),this._leafletElement.style(`width`,`${this.width()}px`).style(`height`,`${this.height()}px`);let n=this.baseLayer();this._prevCRS!==n.crs()&&(this._prevCRS=n.crs(),this._leafletMap&&(this.syncLayers([],e,t),this._leafletMap.remove(),this._leafletElement.html(``)),this._leafletMap=new Z.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:this.mapType()===`AlbersPR`?.1:1,crs:n.crs(),maxZoom:n.getMaxZoom?n.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(n.attribution()),this._leafletMap.on(`zoomend`,e=>this.layers().forEach(t=>t.zoomEnd(e))),this._leafletMap.on(`moveend`,e=>this.layers().forEach(t=>t.moveEnd(e))),this._leafletMap.on(`viewreset`,e=>this.layers().forEach(t=>t.viewReset(e))),this._renderCount=0),this.syncLayers([n,...this.layers()],e,t),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady(function(){this.zoomToFit()},this),this._iconBar.visible(this.showToolbar()).render(e=>{let t=e.getBBox();e.element().style(`z-index`,5e3).style(`left`,`${this.width()-t.width-4}px`)})}exit(e,t){this._iconBar.target(null),super.exit(e,t)}render(e){let t=[this.baseLayer().init(),...this.layers().map(e=>e.init())];return Promise.all(t).then(()=>{super.render(e)}),this}};Leaflet.prototype._class+=` map_Leaflet`,Leaflet.prototype.publish(`showToolbar`,!0,`boolean`,`Show toolbar`,void 0,{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`mapType`,`Google`,`set`,`Base Layer Type`,[`None`,`AlbersPR`,`MapBox`,`OpenStreet`,`Google`],{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`map`,null,`widget`,`Base Layer`,void 0,{internal:!0}),Leaflet.prototype.publish(`layers`,[],`propertyArray`,`Layers`,void 0,{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`defaultLat`,42.877742,`number`,`Center Latitude`,void 0,{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`defaultLong`,-97.380979,`number`,`Center Longitude`,void 0,{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`defaultZoom`,4,`number`,`Zoom Level`,void 0,{hidden:e=>e.isLayer()}),Leaflet.prototype.publish(`autoZoomToFit`,!0,`boolean`,`Auto zoom to fit Data`,void 0,{hidden:e=>e.isLayer()});var FeatureLayer=class extends Leaflet{_layer;_selection;constructor(e=!1){super(),this._layer=e?new bn:new Z.FeatureGroup,this._layer.__hpcc_layer=this,t.Utility.SimpleSelectionMixin.call(this),this.layers([this])}owner(e){this._owner=e}valid(){return!0}clear(){this._layer.clearLayers()}add(e){this._layer.addLayer(e)}maxZoom(){return this._owner._leafletMap.getMaxZoom()||24}zoom(){return this._owner._leafletMap.getZoom()}visibleBounds(){return this._owner._leafletMap.getBounds()}_initPromise;init(){return this._initPromise||=Promise.resolve(),this._initPromise}hasBounds(){return!1}getBounds(){return this._layer.getBounds()}style(e,n){return n===void 0?(0,t.select)(this._layer.getPane()).style(e):((0,t.select)(this._layer.getPane()).style(e,n),this)}propValue(e,t,n){return(e<0?n:t[e])||n}layerEnter(e){e.addLayer(this._layer);let n=(0,t.select)(e.getContainer()).select(`.leaflet-pane.leaflet-marker-pane`);this._selection.widgetElement(n)}layerUpdate(e){}layerExit(e){this._layer.clearLayers(),e.removeLayer(this._layer)}zoomEnd(e){}moveEnd(e){}viewReset(e){}};FeatureLayer.prototype._class+=` map_FeatureLayer`,FeatureLayer.prototype.mixin(t.Utility.SimpleSelectionMixin),FeatureLayer.prototype.publishReset([`layers`]);var ClusterLayer=class extends FeatureLayer{constructor(e=!0){super(e)}};ClusterLayer.prototype._class+=` map_ClusterLayer`;var D3SurfaceLayer=class extends FeatureLayer{_lfd3=new D3SvgOverlay().drawCallback((e,t)=>this.layerUpdate(void 0,t));hasBounds(){return!0}getBounds(){return this._lfd3.getBounds()}layerEnter(e){super.layerEnter(e),this.add(this._lfd3)}layerUpdate(e,t){super.layerUpdate(e)}clickHandler(e,t){}},Circles=class extends ClusterLayer{hasBounds(){return!0}layerUpdate(e){super.layerUpdate(e);let t=this.columns(),n=t.indexOf(this.latitudeColumn()),s=t.indexOf(this.longitudeColumn()),c=t.indexOf(this.strokeColorColumn()),l=t.indexOf(this.fillColorColumn());this.clear(),this.data().filter(e=>!this.omitNullLatLong()||!!e[n]&&!!e[s]).forEach(e=>{this.add(new Z.Circle([e[n],e[s]],{color:this.propValue(c,e,this.strokeColor()),fill:!0,fillColor:this.propValue(l,e,this.fillColor()),fillOpacity:this.fillOpacity(),radius:this.radius(),origRow:e}).on(`click`,t=>this.clickHandler(t,e)))})}clickHandler(e,t){}};Circles.prototype._class+=` map_Circles`,Circles.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Circles.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),Circles.prototype.publish(`radius`,50,`number`,`Radius (meters)`),Circles.prototype.publish(`strokeColor`,`#376cea`,`html-color`,`Stroke Color`,null,{optional:!0}),Circles.prototype.publish(`strokeColorColumn`,null,`set`,`Stroke color column`,function(){return this.columns()},{optional:!0}),Circles.prototype.publish(`fillColor`,`#376cea`,`html-color`,`Fill Color`,null,{optional:!0}),Circles.prototype.publish(`fillColorColumn`,null,`set`,`Fill color column`,function(){return this.columns()},{optional:!0}),Circles.prototype.publish(`fillOpacity`,.5,`number`,`Opacity`,null,{tags:[`Advanced`]}),Circles.prototype.publish(`omitNullLatLong`,!0,`boolean`,`Remove lat=0,lng=0 from pinsData`,null,{tags:[`Basic`]});var D3Circles=class extends D3SurfaceLayer{layerUpdate(e,t){super.layerUpdate(e,t);let n=this._lfd3._rootGroup;t||=this._lfd3.projection;let s=this.columns(),c=s.indexOf(this.latitudeColumn()),l=s.indexOf(this.longitudeColumn()),d=s.indexOf(this.strokeColorColumn()),f=s.indexOf(this.fillColorColumn());function toLatLng(e){return{lat:+e[c],lng:+e[l]}}let p=n.selectAll(`circle`).data(this.data().filter(e=>!this.omitNullLatLong()||!!e[c]&&!!e[l]));p.enter().append(`circle`).merge(p).attr(`cx`,e=>t.latLngToLayerPoint(toLatLng(e)).x).attr(`cy`,e=>t.latLngToLayerPoint(toLatLng(e)).y).attr(`r`,Math.max(3/t.scale,this.radius()/t.metresPerPixel)).style(`fill-opacity`,this.fillOpacity()).style(`stroke`,e=>this.propValue(d,e,this.strokeColor())).attr(`stroke-width`,Math.max(1/t.scale,1/t.metresPerPixel)).style(`fill`,e=>this.propValue(f,e,this.fillColor())),p.exit().remove()}clickHandler(e,t){}};D3Circles.prototype._class+=` map_D3Circles`,D3Circles.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),D3Circles.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),D3Circles.prototype.publish(`radius`,50,`number`,`Radius (meters)`),D3Circles.prototype.publish(`strokeColor`,`#376cea`,`html-color`,`Stroke Color`,null,{optional:!0}),D3Circles.prototype.publish(`strokeColorColumn`,null,`set`,`Stroke color column`,function(){return this.columns()},{optional:!0}),D3Circles.prototype.publish(`fillColor`,`#376cea`,`html-color`,`Fill Color`,null,{optional:!0}),D3Circles.prototype.publish(`fillColorColumn`,null,`set`,`Fill color column`,function(){return this.columns()},{optional:!0}),D3Circles.prototype.publish(`fillOpacity`,.5,`number`,`Opacity`,null,{tags:[`Advanced`]}),D3Circles.prototype.publish(`omitNullLatLong`,!0,`boolean`,`Remove lat=0,lng=0 from pinsData`,null,{tags:[`Basic`]});var ClusterCircles=class extends FeatureLayer{_palette;createIcon(e,n,s){let c=(0,t.hsl)(n);return c.opacity=.5,new Z.DivIcon({className:`cluster-circle`,iconSize:new Z.Point(40,40),html:`<div style='opacity:${this.opacity()};background-color:${c.toString()}'><div style='background-color:${n}'><span style='color:${t.Palette.textColor(n)}'>${s(e)}</span></div></div>`})}layerUpdate(e){super.layerUpdate(e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+`_`+this.id()));let n=this.cellFunc(this.latitudeColumn(),0),s=this.cellFunc(this.longitudeColumn(),0),latLongFunc=e=>[+n(e),+s(e)],c=this.cellFunc(this.weightColumn(),0),l=this.data(),d=(0,t.extent)(l,c),f=this.weightFormat()?(0,t.format)(this.weightFormat()):e=>e;this.clear(),l.forEach(e=>{let t=new Z.Marker(latLongFunc(e),{icon:this.createIcon(c(e),this._palette(c(e),d[0],d[1]),f),origRow:e}).on(`click`,t=>this.clickHandler(t,e));t.bindTooltip(`Weight: `+c(e)),this.add(t)})}clickHandler(e,t){}};ClusterCircles.prototype._class+=` map_ClusterCircles`,ClusterCircles.prototype._palette=t.Palette.rainbow(`default`),ClusterCircles.prototype.publish(`paletteID`,`YlOrRd`,`set`,`Color palette for this widget`,ClusterCircles.prototype._palette.switch()),ClusterCircles.prototype.publish(`useClonedPalette`,!1,`boolean`,`Enable or disable using a cloned palette`),ClusterCircles.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),ClusterCircles.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),ClusterCircles.prototype.publish(`weightColumn`,null,`set`,`Weight column`,function(){return this.columns()},{optional:!0}),ClusterCircles.prototype.publish(`weightFormat`,`,`,`string`,`Number format for weight`),ClusterCircles.prototype.publish(`opacity`,.66,`number`,`Opacity`,null,{tags:[`Advanced`]});function fixDateLine(e,t){let n=t.getLatLngs();n.forEach(function(e){e.forEach(function(e){if(Array.isArray(e)){let t=0,n=0,s=0,c=0;e.forEach(function(e){e.lat>-62&&(e.lng>165?++c:e.lng<-165&&++s,e.lng>0?++n:e.lng<0&&++t)}),s>0&&c>0&&e.forEach(function(e){e.lng>165&&t>n?e.lng-=360:e.lng<-165&&n>t&&(e.lng+=360)})}})}),t.setLatLngs(n)}var TopoJSON=class extends Z.GeoJSON{constructor(e,t){super(e,{...t,onEachFeature:(e,n)=>{t.onEachFeature&&t.onEachFeature(e,n),fixDateLine(e,n)}})}addData(e){let t,n;if(e.type===`Topology`){for(n in e.objects)e.objects.hasOwnProperty(n)&&(t=feature_default(e,e.objects[n]),super.addData.call(this,t));return this}return super.addData.call(this,e),this}},World=class extends FeatureLayer{_features;_palette;_dataMap={};_dataMinWeight=null;_dataMaxWeight=null;constructor(){super(),t.Utility.SimpleSelectionMixin.call(this)}hasBounds(){return!0}getBounds(){let e=super.getBounds();return e.isValid()?new Z.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Z.LatLngBounds([90,-180],[-90,180])}updateDataMap(e){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;let t=this;e.forEach(function(e){t._dataMap[e[0]]=e,(!t._dataMinWeight||e[1]<t._dataMinWeight)&&(t._dataMinWeight=e[1]),(!t._dataMaxWeight||e[1]>t._dataMaxWeight)&&(t._dataMaxWeight=e[1])})}data(e){let t=super.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),t}styleFeature(e){let t=this._dataMap[e.properties.hpccID],n=t?this._palette(t[1],this._dataMinWeight,this._dataMaxWeight):`transparent`;return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:n,fillOpacity:this.opacity()}}svgGlowID(){return this.id()+`_svgGlow`}_topoJson;_svgElement;layerEnter(e){super.layerEnter(e),this._svgElement||(this._svgElement=(0,t.select)(e.getContainer()).select(`.leaflet-pane.leaflet-overlay-pane > svg`),new t.SVGGlowFilter(this._svgElement.append(`defs`),this.svgGlowID()),this._selection.widgetElement(this._svgElement))}_prevFeatures;layerUpdate(e){this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new TopoJSON(this._features,{onEachFeature:(e,t)=>{t.on(`click`,e=>this.clickHandler(e,t,t.feature.properties.hpccID))}}).bindTooltip(e=>this.tooltipHandler(e,e.feature.properties.hpccID),{direction:`top`,sticky:!0}),this.add(this._topoJson)),super.layerUpdate(e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+`_`+this.id())),this._topoJson.setStyle(e=>this.styleFeature(e))}clickHandler(e,t,n){let s=this._selection.click(e.originalEvent.target);return this.click(this.rowToObj(this._dataMap[n]),this.columns()[0],s),s}tooltipText(e,t){return t}tooltipHandler(e,t){let n=this._dataMap[t],s=n&&n[1]||``;return this.tooltipText(this.rowToObj(n),`<b>${t}</b>: ${s}`)}click(e,t,n){}};World.prototype._class+=` map_World`,World.prototype._palette=t.Palette.rainbow(`default`),World.prototype.mixin(t.Utility.SimpleSelectionMixin),World.prototype.publish(`paletteID`,`YlOrRd`,`set`,`Color palette for this widget`,World.prototype._palette.switch(),{tags:[`Basic`,`Shared`]}),World.prototype.publish(`useClonedPalette`,!1,`boolean`,`Enable or disable using a cloned palette`,null,{tags:[`Intermediate`,`Shared`]}),World.prototype.publish(`opacity`,.5,`number`,`Opacity`,null,{tags:[`Advanced`]}),World.prototype.publish(`meshVisible`,!0,`boolean`,`Mesh Visibility`),World.prototype.publish(`meshColor`,`black`,`html-color`,`Stroke Color`),World.prototype.publish(`meshStrokeWidth`,.25,`number`,`Stroke Width`),World.prototype.publish(`internalOnly`,!1,`boolean`,`Internal mesh only`);var wn=null,Countries=class extends World{constructor(){super()}init(){return this._initPromise||=new Promise((e,t)=>{wn&&e(wn),Zt(`${topoJsonFolder()}/countries.json`,function(t){wn=t,e(wn)})}).then(e=>{this._features=feature_default(e.topology,e.topology.objects.countries).features;for(let t in this._features)if(this._features[t].id){let n=this._features[t].id,s=e.countryNames[n]?.name;this._features[t].properties.hpccID=s}}),this._initPromise}tooltipHandler(e,t){let n=this._dataMap[t],s=n&&n[1]||``;return this.tooltipText(this.rowToObj(n),`<b>${t}</b>: ${s}`)}};function del(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}var DrawLayer=class extends FeatureLayer{_polylines=[];_polygons=[];_rectangles=[];_circles=[];_drawControl;hasBounds(){return!0}drawOptions(){let e={marker:!1,circlemarker:!1};return this.enableCircle()||(e.circle=!1),this.enablePolyline()||(e.polyline=!1),this.enableRectangle()||(e.rectangle=!1),this.enablePolygon()||(e.polygon=!1),e}save(){return{polylines:this._polylines.map(e=>e.getLatLngs()),polygons:this._polygons.map(e=>e.getLatLngs()),rectangles:this._rectangles.map(e=>e.getBounds()),circles:this._circles.map(e=>({center:e.getLatLng(),radius:e.getRadius()}))}}restore(e){this.clear(),this._polylines=(e.polylines||[]).map(e=>new Z.Polyline(e)),this._polygons=(e.polygons||[]).map(e=>new Z.Polygon(e)),this._rectangles=(e.rectangles||[]).map(e=>new Z.Rectangle(e)),this._circles=(e.circles||[]).map(e=>new Z.Circle(e.center,{radius:e.radius})),this._polylines.forEach(e=>this.add(e)),this._polygons.forEach(e=>this.add(e)),this._rectangles.forEach(e=>this.add(e)),this._circles.forEach(e=>this.add(e))}_drawOptionsHash;layerEnter(e){super.layerEnter(e),e.on(Z.Draw.Event.CREATED,e=>{let t=e.layerType,n=e.layer;switch(t){case`polyline`:this._polylines.push(n);break;case`polygon`:this._polygons.push(n);break;case`rectangle`:this._rectangles.push(n);break;case`circle`:this._circles.push(n);break;default:alert(t)}this.add(n),this.changed(`ADD`,n)}),e.on(Z.Draw.Event.EDITED,e=>{e.layers.eachLayer(e=>{this.changed(`UPDATE`,e)})}),e.on(Z.Draw.Event.DELETED,e=>{e.layers.eachLayer(e=>{del(this._polylines,e),del(this._polygons,e),del(this._rectangles,e),del(this._circles,e),this.changed(`DELETE`,e)})})}layerUpdate(e){super.layerUpdate(e),this.style(`opacity`,this.opacity());let t=this.drawOptions(),n=(0,c.hashSum)(t);this._drawOptionsHash!==n&&(this._drawOptionsHash=n,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new Z.Control.Draw({position:`topleft`,draw:t,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))}layerExit(e){super.layerExit(e)}changed(e,t){}};DrawLayer.prototype._class+=` map_DrawLayer`,DrawLayer.prototype.publish(`opacity`,1,`number`,`Layer Opacity`),DrawLayer.prototype.publish(`enablePolyline`,!0,`boolean`,`Enable Polyline Creation`),DrawLayer.prototype.publish(`enablePolygon`,!0,`boolean`,`Enable Polygon Creation`),DrawLayer.prototype.publish(`enableRectangle`,!0,`boolean`,`Enable Rectangle Creation`),DrawLayer.prototype.publish(`enableCircle`,!0,`boolean`,`Enable Circle Creation`);var HeatLayer=class extends FeatureLayer{hasBounds(){return!0}layerUpdate(e){super.layerUpdate(e),this.style(`opacity`,this.opacity());let t=this.columns(),n=this.latitudeColumn_exists()?t.indexOf(this.latitudeColumn()):0,s=this.longitudeColumn_exists()?t.indexOf(this.longitudeColumn()):1,c=t.indexOf(this.weightColumn());this.clear();let l,d=new HeatLayer$1(this.data().filter(e=>!this.omitNullLatLong()||!!e[n]&&!!e[s]).map(e=>(l?l.extend([e[n],e[s]]):l=new Z.LatLngBounds([e[n],e[s]]),[e[n],e[s],this.weightColumn_exists()?e[c]:.5])),{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});d.getBounds=()=>l,this.add(d)}};HeatLayer.prototype._class+=` map_Heat`,HeatLayer.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),HeatLayer.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),HeatLayer.prototype.publish(`weightColumn`,null,`set`,`Optional normalized intensity (0 -> 1) `,function(){return this.columns()},{optional:!0}),HeatLayer.prototype.publish(`omitNullLatLong`,!0,`boolean`,`Remove lat=0,lng=0 from IconsData`,null,{tags:[`Basic`]}),HeatLayer.prototype.publish(`opacity`,.5,`number`,`Layer Opacity`),HeatLayer.prototype.publish(`minOpacity`,.5,`number`,`The minimum opacity the heat will start at`,null,{tags:[`Basic`]}),HeatLayer.prototype.publish(`max`,1,`number`,`maximum point intensity, 1.0 by default`,null,{tags:[`Basic`]}),HeatLayer.prototype.publish(`radius`,25,`number`,`radius of each point of the heatmap, 25 by default`,null,{tags:[`Basic`]}),HeatLayer.prototype.publish(`blur`,15,`number`,`amount of blur, 15 by default`,null,{tags:[`Basic`]}),HeatLayer.prototype.publish(`gradient`,null,`object`,`color gradient config`,null,{tags:[`Basic`],optional:!0});var Markers=class extends ClusterLayer{constructor(e=!1){super(e)}hasBounds(){return!0}tooltipText(e,t){return``+t}popupText(e,t){return``+t}_hashSum;layerUpdate(e,t){if(super.layerUpdate(e),!t)return;let n=this.columns(),s=n.indexOf(this.latitudeColumn()),c=n.indexOf(this.longitudeColumn()),l=n.indexOf(this.tooltipColumn()),d=n.indexOf(this.popupColumn()),f=this._db.checksum(),p=this.hashSum([],{dbChecksum:f});this._hashSum!==p&&(this._hashSum=p,this.clear(),this.data().filter(e=>!this.omitNullLatLong()||!!e[s]&&!!e[c]).forEach(e=>{let n=new Z.Marker([e[s],e[c]],t(e)).on(`click`,t=>this.clickHandler(t,n,e)),f=this.tooltipText(this.rowToObj(e),this.propValue(l,e,``));f&&n.bindTooltip(f,{direction:this.tooltipDirection(),offset:(0,Z.point)(this.tooltipOffsetX(),this.tooltipOffsetY())});let p=this.popupText(this.rowToObj(e),this.propValue(d,e,``));p&&n.bindPopup(p,{offset:(0,Z.point)(this.popupOffsetX(),this.popupOffsetY())}),this.add(n)}))}_currSelRow;clickHandler(e,t,n){let s=this._selection.click(t._icon);this._currSelRow=s?n:void 0,this.click(this.rowToObj(n),``,s)}click(e,t,n){}};Markers.prototype._class+=` map_Markers`,Markers.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Markers.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),Markers.prototype.publish(`omitNullLatLong`,!0,`boolean`,`Remove lat=0,lng=0 from IconsData`,null,{tags:[`Basic`]}),Markers.prototype.publish(`tooltipColumn`,null,`set`,`Tooltip column`,function(){return this.columns()},{optional:!0}),Markers.prototype.publish(`tooltipDirection`,`auto`,`set`,`Tooltip direction`,[`auto`,`left`,`top`,`right`,`bottom`,`center`]),Markers.prototype.publish(`tooltipOffsetX`,0,`number`,`Tooltip offset X`),Markers.prototype.publish(`tooltipOffsetY`,0,`number`,`Tooltip offset Y`),Markers.prototype.publish(`popupColumn`,null,`set`,`Popup column`,function(){return this.columns()},{optional:!0}),Markers.prototype.publish(`popupOffsetX`,0,`number`,`Tooltip offset X`),Markers.prototype.publish(`popupOffsetY`,0,`number`,`Tooltip offset Y`);var Icons=class extends Markers{constructor(e=!1){super(e)}layerUpdate(e){let t=this.columns().indexOf(this.iconUrlColumn());super.layerUpdate(e,e=>({icon:new Z.Icon({iconUrl:this.propValue(t,e,this.iconUrl()),iconSize:[this.iconWidth(),this.iconHeight()],iconAnchor:[this.iconAnchorX(),this.iconAnchorY()],props:{owner:this,row:e}}),draggable:!1}))}};Icons.prototype._class+=` map_Icons`,Icons.prototype.publish(`iconUrl`,``,`string`,`Icon URL`,null),Icons.prototype.publish(`iconUrlColumn`,null,`set`,`Icon URL column`,function(){return this.columns()},{optional:!0}),Icons.prototype.publish(`iconWidth`,32,`number`,`Icon width`),Icons.prototype.publish(`iconHeight`,32,`number`,`Icon height`),Icons.prototype.publish(`iconAnchorX`,16,`number`,`Icon Anchor X`),Icons.prototype.publish(`iconAnchorY`,32,`number`,`Icon Anchor Y`);var ClusterIcons=class extends Icons{constructor(){super(!0)}};ClusterIcons.prototype._class+=` map_ClusterIcons`;function lngLat2LatLng(e){return[e[1],e[0]]}var calcSpread=(e,t)=>(t[0]<-90?e[0]++:t[0]>90&&e[1]++,e),shiftLeft=e=>e>90?e-360:e,shiftRight=e=>e<-90?e+360:e,shiftPoint=e=>{let t=e?shiftLeft:shiftRight;return e=>[t(e[0]),e[1]]},Polygons=class extends FeatureLayer{_palette;fixDateLine(e){let[t,n]=e.reduce(calcSpread,[0,0]);return t&&n?e.map(shiftPoint(t>n)):e}hasBounds(){return!0}updateHexagons(){this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+`_`+this.id()));let e=this.cellFunc(this.polygonColumn(),[]),n=this.cellFunc(this.weightColumn(),0),s=this.data(),c=(0,t.extent)(s,n);this.clear(),s.forEach(t=>{this.add(new Z.Polygon(this.fixDateLine(e(t)).map(lngLat2LatLng),{color:this._palette(c[1],c[0],c[1]),fillColor:this._palette(n(t),c[0],c[1]),fillOpacity:this.opacity(),weight:1,origRow:t}).on(`click`,e=>this.clickHandler(e,t)))})}layerUpdate(e){super.layerUpdate(e),this.updateHexagons()}zoomEnd(e){super.zoomEnd(e)}moveEnd(e){super.moveEnd(e),this.updateHexagons()}clickHandler(e,t){}};Polygons.prototype._class+=` map_Polygons`,Polygons.prototype._palette=t.Palette.rainbow(`default`),Polygons.prototype.publish(`paletteID`,`YlOrRd`,`set`,`Color palette for this widget`,Polygons.prototype._palette.switch(),{tags:[`Basic`,`Shared`]}),Polygons.prototype.publish(`useClonedPalette`,!1,`boolean`,`Enable or disable using a cloned palette`,null,{tags:[`Intermediate`,`Shared`]}),Polygons.prototype.publish(`polygonColumn`,null,`set`,`Polygon column`,function(){return this.columns()},{optional:!0}),Polygons.prototype.publish(`weightColumn`,null,`set`,`Weight column`,function(){return this.columns()},{optional:!0}),Polygons.prototype.publish(`opacity`,.5,`number`,`Opacity`,null,{tags:[`Advanced`]});var Tn=4096/2/Math.PI,Path=class extends D3SurfaceLayer{lineData(){let e=this.columns(),t=e.indexOf(this.latitudeColumn()),n=e.indexOf(this.longitudeColumn()),s=[],c;return this.data().forEach(e=>{let l=[e[n],e[t]];c&&s.push({type:`LineString`,coordinates:[l,c]}),c=l}),s}isNull(e){return!e[0]&&!e[1]}isNull2(e){return this.omitNullLatLong()?this.isNull(e[0])||this.isNull(e[1]):!1}layerUpdate(e,t){super.layerUpdate(e,t);let n=this._lfd3._rootGroup;t||=this._lfd3.projection,this._lfd3.svg().selectAll(`defs`).data([void 0]).enter().append(`defs`).append(`marker`).attr(`class`,`marker`).attr(`id`,this._id+`_arrowHead`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`polyline`).attr(`points`,`0,0 10,5 0,10 1,5`),this._lfd3.svg().select(`defs > marker`).style(`fill`,this.strokeColor()).style(`stroke`,null);let s=t.latLngToLayerPoint({lat:0,lng:0}),c=resolve(`Mercator`).scale(Tn).translate([s.x,s.y]),l=path_default().projection(c),d=n.selectAll(`.dataEdge`).data(this.lineData().filter(e=>!this.isNull2(e.coordinates)));d.enter().append(`path`).attr(`class`,`dataEdge`).attr(`marker-end`,`url(#`+this._id+`_arrowHead)`).merge(d).attr(`d`,l).style(`stroke`,this.strokeColor()).style(`fill`,`none`).attr(`stroke-width`,1/t.scale),d.exit().remove()}clickHandler(e,t){}};Path.prototype._class+=` map_Path`,Path.prototype.publish(`latitudeColumn`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Path.prototype.publish(`longitudeColumn`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0}),Path.prototype.publish(`strokeColor`,` #666666`,`html-color`,`Stroke Color`,null,{optional:!0}),Path.prototype.publish(`omitNullLatLong`,!0,`boolean`,`Remove lat=0,lng=0 from pinsData`,null,{tags:[`Basic`]});var Lines$1=class extends Path{static{__name(this,`Lines`)}lineData(){let e=this.columns(),t=e.indexOf(this.latitudeColumn()),n=e.indexOf(this.longitudeColumn()),s=e.indexOf(this.latitude2Column()),c=e.indexOf(this.longitude2Column()),l=[];return this.data().forEach(e=>{let d=[e[n],e[t]],f=[e[c],e[s]];l.push({type:`LineString`,coordinates:[d,f]})}),l}};Lines$1.prototype._class+=` map_Lines`,Lines$1.prototype.publish(`latitude2Column`,null,`set`,`Latitude column`,function(){return this.columns()},{optional:!0}),Lines$1.prototype.publish(`longitude2Column`,null,`set`,`Longitude column`,function(){return this.columns()},{optional:!0});var Pins$1=class extends Markers{static{__name(this,`Pins`)}constructor(e=!1){super(e)}layerUpdate(e){let t=this.columns(),n=t.indexOf(this.faCharColumn()),s=t.indexOf(this.faCharColorColumn()),c=t.indexOf(this.strokeColorColumn()),l=t.indexOf(this.fillColorColumn());super.layerUpdate(e,e=>({icon:BeautifyIcon({iconShape:`marker`,icon:this.propValue(n,e,this.faChar()),textColor:this.propValue(s,e,this.faCharColor()),borderColor:this.propValue(c,e,this.strokeColor()),backgroundColor:this.propValue(l,e,this.fillColor()),props:{owner:this,row:e}}),draggable:!1}))}};Pins$1.prototype._class+=` map_Pins`,Pins$1.prototype.publish(`faChar`,`fa-circle`,`string`,`Default font awesome character`),Pins$1.prototype.publish(`faCharColumn`,null,`set`,`Font awesome column`,function(){return this.columns()},{optional:!0}),Pins$1.prototype.publish(`faCharColor`,`#ffffff`,`html-color`,`Default font awesome Color`),Pins$1.prototype.publish(`faCharColorColumn`,null,`set`,`Font awesome color column`,function(){return this.columns()},{optional:!0}),Pins$1.prototype.publish(`strokeColor`,`transparent`,`html-color`,`Default stroke Color`,null,{optional:!0}),Pins$1.prototype.publish(`strokeColorColumn`,null,`set`,`Stroke color column`,function(){return this.columns()},{optional:!0}),Pins$1.prototype.publish(`fillColor`,`#376cea`,`html-color`,`Default fill Color`,null,{optional:!0}),Pins$1.prototype.publish(`fillColorColumn`,null,`set`,`Fill color column`,function(){return this.columns()},{optional:!0});var ClusterPins=class extends Pins$1{constructor(){super(!0)}};ClusterPins.prototype._class+=` map_ClusterPins`;var En={GB:[`administrative_area_level_3`,`administrative_area_level_2`,`administrative_area_level_1`],IE:[`administrative_area_level_2`,`administrative_area_level_1`],ND:[`administrative_area_level_2`,`administrative_area_level_1`]},Dn={};function cachedRegion(e){return Dn[e]||(Dn[e]={topology:void 0,nameIdx:{},codeIdx:{}}),Dn[e]}var Region=class extends World{constructor(){super()}fetchTopo(e){return cachedRegion(e).topology?Promise.resolve(cachedRegion(e).topology):new Promise((t,n)=>{Zt(`${topoJsonFolder()}/${e}.json`,function(n){cachedRegion(e).topology=n,t(n)})})}fetchTopoIdx(e){for(let t in cachedRegion(e).nameIdx)return Promise.resolve(cachedRegion(e).nameIdx);return new Promise((t,n)=>{Zt(`${topoJsonFolder()}/${e}_idx.json`,function(n){let{nameIdx:s,codeIdx:c}=cachedRegion(e);En[e]?.forEach(e=>{for(let t in n[e]){let l=n[e][t];Array.isArray(l)&&(s[t]||(s[t]={code:void 0,codes:[]}),s[t].codes=s[t].codes.concat(l),l.length===1&&(s[t].code=s[t].codes[0]),l.forEach(e=>{c[e]||(c[e]={name:void 0,score:9999,names:[]}),l.length<=c[e].score&&(c[e].name=t,c[e].score=l.length),c[e].names.push(t)}))}}),t(s)})})}updateDataMap(e){let t=[],n=cachedRegion(this.region()).nameIdx;return e.forEach(e=>{let s=n[e[0]]?.codes;s?s?.forEach(n=>{t.push([n,e[1],e])}):t.push([e[0],e[1],e])}),super.updateDataMap(t)}_prevRegion;init(){let e=this.region();return(!this._initPromise||this._prevRegion!==e)&&(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then(([e,t])=>{this._features=feature_default(e,e.objects.PolbndA).features;for(let e in this._features){let t=this._features[e].id||e;this._features[e].properties.hpccID=t}this.updateDataMap(this.data())})),this._initPromise}tooltipHandler(e,t){let n=this._dataMap[t],s=cachedRegion(this.region()).codeIdx,c=n&&n[1]||``,l=s[t]?.names.map(e=>s[t]?.name===e?`<u>${e}</u>`:e).join(`, `);return this.tooltipText(this.rowToObj(n),`<b>${n&&n[2][0]||l||t}</b>: ${c}`)}};Region.prototype._class+=` map_Region`,Region.prototype.publish(`region`,`GB`,`set`,`Region Data`,`AT.BE.BG.BR.CHLI.CY.CZ.DE.DK.EE.ES.FI.FR.GB.GE.GR.HR.HU.IE.IS.IT.KS.LT.LU.LV.MD.MK.MT.ND.NL.NO.PL.PT.RO.RS.SE.SI.SK.UA`.split(`.`));var Text=class extends Markers{constructor(e=!1){super(e)}layerUpdate(e){let n=this.columns(),s=n.indexOf(this.textColumn()),c=n.indexOf(this.textColorColumn()),l=n.indexOf(this.strokeColorColumn()),d=n.indexOf(this.fillColorColumn());super.layerUpdate(e,e=>{let n=this.propValue(s,e,this.text()),f=this.textSize(n,this.fontFamily(),this.fontSize());return this.textFormat_exists()&&(n=(0,t.format)(this.textFormat())(n)),{icon:BeautifyIcon({iconShape:`rectangle`,iconAnchor:[f.width/2+this.textOffsetX(),f.height/2+this.textOffsetY()],html:`<span style="
2
+ ${this.fontFamily_exists()?`font-family:${this.fontFamily()};`:``}
3
+ font-size:${this.fontSize()}px;
4
+ pointer-events: none;
5
+ white-space:nowrap;
6
+ ">${n}</span>`,textColor:this.propValue(c,e,this.textColor()),borderColor:this.propValue(l,e,this.strokeColor()),backgroundColor:this.propValue(d,e,this.fillColor()),props:{owner:this,row:e}}),draggable:!1}})}};Text.prototype._class+=` map_Text`,Text.prototype.publish(`textOffsetX`,0,`number`,`Horizontal offset of text`),Text.prototype.publish(`textOffsetY`,0,`number`,`Vertical offset of text`),Text.prototype.publish(`text`,``,`string`,`Default text`),Text.prototype.publish(`textColumn`,null,`set`,`Font awesome column`,function(){return this.columns()},{optional:!0}),Text.prototype.publish(`textColor`,`#ffffff`,`html-color`,`Default font awesome Color`),Text.prototype.publish(`textColorColumn`,null,`set`,`Text color column`,function(){return this.columns()},{optional:!0}),Text.prototype.publish(`textFontFamily`,null,`set`,`Text color column`,function(){return this.columns()},{optional:!0}),Text.prototype.publish(`strokeColor`,`transparent`,`html-color`,`Default stroke Color`,null,{optional:!0}),Text.prototype.publish(`strokeColorColumn`,null,`set`,`Stroke color column`,function(){return this.columns()},{optional:!0}),Text.prototype.publish(`fillColor`,`#376cea`,`html-color`,`Default fill Color`,null,{optional:!0}),Text.prototype.publish(`fillColorColumn`,null,`set`,`Fill color column`,function(){return this.columns()},{optional:!0}),Text.prototype.publish(`fontFamily`,null,`string`,`Font family`,null,{optional:!0}),Text.prototype.publish(`fontSize`,16,`number`,`Font family`,null,{optional:!0}),Text.prototype.publish(`textFormat`,null,`string`,`Format rules for text`,null,{optional:!0});var US=class extends World{constructor(){super()}getBounds(){let e=super.getBounds();return new Z.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])}},On=null,kn={},USCounties=class extends US{init(){return this._initPromise||=new Promise((e,t)=>{On&&e(On),Zt(`${topoJsonFolder()}/us-counties.json`,function(t){On=t,e(On)})}).then(e=>{this._features=feature_default(e.topology,e.topology.objects.counties).features;for(let t in this._features)if(this._features[t].id){let n=this._features[t].id,s=e.countyNames[n];this._features[t].properties.hpccID=n,kn[n]=s}}),this._initPromise}tooltipHandler(e,t){let n=this._dataMap[t],s=n&&n[1]||``;return this.tooltipText(this.rowToObj(n),`<b>${kn[t]}</b>: ${s}`)}};USCounties.prototype._class+=` map_USCounties`;var An=null,jn={},USStates=class extends US{init(){return this._initPromise||=new Promise((e,t)=>{An&&e(An),Zt(`${topoJsonFolder()}/us-states.json`,function(t){An=t,e(An)})}).then(e=>{this._features=feature_default(e.topology,e.topology.objects.states).features;for(let t in this._features)if(this._features[t].id){let{code:n,name:s}=e.stateNames[this._features[t].id];this._features[t].properties.hpccID=n,jn[n]=s}}),this._initPromise}tooltipHandler(e,t){let n=this._dataMap[t],s=n&&n[1]||``;return this.tooltipText(this.rowToObj(n),`<b>${jn[t]}</b>: ${s}`)}};USStates.prototype._class+=` map_USStates`;var Mn=__exportAll({Circles:()=>Circles,ClusterCircles:()=>ClusterCircles,ClusterIcons:()=>ClusterIcons,ClusterLayer:()=>ClusterLayer,ClusterPins:()=>ClusterPins,Countries:()=>Countries,D3Circles:()=>D3Circles,D3SurfaceLayer:()=>D3SurfaceLayer,DrawLayer:()=>DrawLayer,FeatureLayer:()=>FeatureLayer,HeatLayer:()=>HeatLayer,Icons:()=>Icons,Leaflet:()=>Leaflet,Lines:()=>Lines$1,Markers:()=>Markers,Path:()=>Path,Pins:()=>Pins$1,Polygons:()=>Polygons,Region:()=>Region,Text:()=>Text,TileLayer:()=>TileLayer,USCounties:()=>USCounties,USStates:()=>USStates,World:()=>World});e.BUILD_VERSION=b,e.CanvasPinLayer=CanvasPinLayer,e.CanvasPins=CanvasPins,e.Choropleth=Choropleth,e.ChoroplethContinents=ChoroplethContinents,e.ChoroplethCounties=ChoroplethCounties,e.ChoroplethCountries=ChoroplethCountries,e.ChoroplethStates=ChoroplethStates,e.ChoroplethStatesHeat=ChoroplethStatesHeat,e.GMap=X,e.GMapCounties=GMapCounties,e.GMapGraph=GMapGraph,e.GMapHeat=GMapHeat,e.GMapLayered=GMapLayered,e.GMapPin=GMapPin,e.GMapPinLine=GMapPinLine,e.GeoHash=GeoHash,e.Graph=Graph,e.Graticule=Graticule,e.Heat=Heat,e.IChoropleth=IChoropleth,e.Layer=Layer,e.Layered=Layered,Object.defineProperty(e,"Leaflet",{enumerable:!0,get:function(){return Mn}}),e.Lines=Lines,e.OpenStreet=mn,e.PKG_NAME=v,e.PKG_VERSION=y,e.Pins=Pins,e.TopoJSONChoropleth=TopoJSONChoropleth,Object.defineProperty(e,"google",{enumerable:!0,get:function(){return Y}}),e.projections=qt,e.requireGoogleMap=requireGoogleMap,e.requireGoogleMapTimeout=requireGoogleMapTimeout,e.resolve=resolve,e.topoJsonFolder=topoJsonFolder,e.types=Kt});
2
7
  //# sourceMappingURL=index.umd.cjs.map
3
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}.map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25}.map_Layered .data{stroke:none;stroke-width:.25}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}.map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}.map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{pointer-events:auto;cursor:auto}.gm-style img{max-width:none}.gm-style label{width:auto;display:inline}.map_Layered .pin>path{cursor:pointer;stroke:#000}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}.map_Layered .marker{fill:#656565;stroke:none}.map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}.map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}.map_Heat canvas{pointer-events:none}.map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url(\"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e\");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url(\"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e\")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:\"\";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-in;-moz-transition:-moz-transform .3s ease-out,opacity .3s ease-in;-o-transition:-o-transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset .3s ease-out,-webkit-stroke-opacity .3s ease-in;-moz-transition:-moz-stroke-dashoffset .3s ease-out,-moz-stroke-opacity .3s ease-in;-o-transition:-o-stroke-dashoffset .3s ease-out,-o-stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px}.beautify-marker{text-align:center;font-weight:700;font-family:monospace;position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.beautify-marker.selected>div{outline:none;border-color:red;box-shadow:0 0 10px red}.beautify-marker.circle,.beautify-marker.circle-dot,.beautify-marker.doughnut{border-radius:100%}.beautify-marker.marker{border-radius:50% 50% 0% 100%/50% 100% 0% 50%;transform:rotate(45deg)}.beautify-marker.marker>*{transform:rotate(-45deg)}g.d3-overlay *{pointer-events:visiblePainted}.map_Leaflet .leaflet-container{background-color:#f000;background:#f000}.cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{width:40px;height:40px;text-align:center;border-radius:20px}.cluster-circle>div>div{display:inline-block;margin-top:5px;width:30px;height:30px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle span{line-height:30px}.leaflet-interactive.selected{stroke:red;stroke-width:1.25px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
8
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}.map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25px}.map_Layered .data{stroke:none;stroke-width:.25px}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}.map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}.map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{pointer-events:auto;cursor:auto}.gm-style img{max-width:none}.gm-style label{width:auto;display:inline}.map_Layered .pin>path{cursor:pointer;stroke:#000}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}.map_Layered .marker{fill:#656565;stroke:none}.map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}.map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}.map_Heat canvas{pointer-events:none}.map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:"";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:linear-gradient(#0000,#0000),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:linear-gradient(#0000,#0000),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{text-align:center;text-decoration:none;display:block}.leaflet-draw a .sr-only{clip:rect(0,0,0,0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.leaflet-draw-actions{white-space:nowrap;margin:0;padding:0;list-style:none;display:none;position:absolute;top:0;left:26px}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{left:auto;right:26px}.leaflet-touch .leaflet-right .leaflet-draw-actions{left:auto;right:32px}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{border-radius:4px 0 0 4px}.leaflet-draw-actions a{color:#fff;background-color:#919187;border-left:1px solid #aaa;height:28px;padding-left:10px;padding-right:10px;font:11px/28px Helvetica Neue,Arial,Helvetica,sans-serif;text-decoration:none}.leaflet-touch .leaflet-draw-actions a{height:30px;font-size:12px;line-height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{cursor:crosshair;background-color:#fff}.leaflet-draw-tooltip{color:#fff;visibility:hidden;white-space:nowrap;z-index:6;background:#00000080;border:1px solid #0000;border-radius:4px;margin-top:-21px;margin-left:20px;padding:4px 8px;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;position:absolute}.leaflet-draw-tooltip:before{content:"";border-top:6px solid #0000;border-bottom:6px solid #0000;border-right:6px solid #00000080;position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{color:#b94a48;background-color:#f2dede;border:1px solid #e6b6bd}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{opacity:.6;width:5px;height:5px;font-size:1%;position:absolute}.leaflet-edit-marker-selected{box-sizing:content-box;background-color:#fe57a11a;border:4px dashed #fe57a199;border-radius:4px}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-in;-o-transition:-o-transform .3s ease-out, opacity .3s ease-in;-moz-transition:-moz-transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset .3s ease-out,-webkit-stroke-opacity .3s ease-in;-o-transition:-o-stroke-dashoffset .3s ease-out, -o-stroke-opacity .3s ease-in;-moz-transition:-moz-stroke-dashoffset .3s ease-out,-moz-stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;margin-left:5px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px}.beautify-marker{text-align:center;box-sizing:border-box;font-family:monospace;font-weight:700;position:absolute}.beautify-marker.selected>div{border-color:red;outline:none;box-shadow:0 0 10px red}.beautify-marker.circle,.beautify-marker.circle-dot,.beautify-marker.doughnut{border-radius:100%}.beautify-marker.marker{border-radius:50% 50% 0% 100%/50% 100% 0% 50%;transform:rotate(45deg)}.beautify-marker.marker>*{transform:rotate(-45deg)}g.d3-overlay *{pointer-events:visiblePainted}.map_Leaflet .leaflet-container{background:#f000}.cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{text-align:center;border-radius:20px;width:40px;height:40px}.cluster-circle>div>div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif;display:inline-block}.cluster-circle span{line-height:30px}.leaflet-interactive.selected{stroke:red;stroke-width:1.25px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();