@hpcc-js/map 3.4.4 → 3.4.6

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.
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- var t,e,i,o=Object.defineProperty,n=(t,e)=>o(t,"name",{value:e,configurable:!0}),s=(t,e,i)=>((t,e,i)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);import{CanvasWidget as r,merge as a,range as l,SVGZoomWidget as h,select as u,Utility as c,Palette as p,dispatch as d,map as _,HTMLWidget as f,Shape as m,Platform as g,Widget as y,IconBar as v,Button as w,Spacer as b,hsl as x,extent as M,format as C,SVGGlowFilter as P}from"@hpcc-js/common";import{ITooltip as k}from"@hpcc-js/api";import{AbsoluteSurface as E}from"@hpcc-js/layout";import{promiseTimeout as T,hashSum as S}from"@hpcc-js/util";import{Graph as O,Edge as z}from"@hpcc-js/graph";import{HeatMap as D}from"@hpcc-js/other";function I(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:/* @__PURE__ */n(()=>o[e],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}n(I,"_mergeNamespaces");const A="@hpcc-js/map",B="3.4.4",R="3.17.0";function Z(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return N(this.cover(e,i),e,i,t)}function N(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 j(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)N(this,r[i],a[i],t[i]);return this}function H(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 G(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t}function F(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 U(t,e,i,o,n){this.node=t,this.x0=e,this.y0=i,this.x1=o,this.y1=n}function W(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 U(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 U(f[3],m,g,r,a),new U(f[2],n,g,m,a),new U(f[1],m,s,r,g),new U(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 w=Math.sqrt(i=L);u=t-w,c=e-w,p=t+w,d=e+w,o=f.data}}return o}function V(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 q(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this}function Y(){return this._root}function $(){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 U(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 U(i,h,u,s,r)),(i=l[2])&&a.push(new U(i,o,u,h,r)),(i=l[1])&&a.push(new U(i,h,n,s,u)),(i=l[0])&&a.push(new U(i,o,n,h,u))}return this}function X(t){var e,i=[],o=[];for(this._root&&i.push(new U(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 U(s,r,a,u,c)),(s=n[1])&&i.push(new U(s,u,a,l,c)),(s=n[2])&&i.push(new U(s,r,c,u,h)),(s=n[3])&&i.push(new U(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 J(t){return t[0]}function Q(t){return arguments.length?(this._x=t,this):this._x}function tt(t){return t[1]}function et(t){return arguments.length?(this._y=t,this):this._y}function it(t,e,i){var o=new ot(null==e?J:e,null==i?tt:i,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function ot(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 nt(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}n(Z,"tree_add"),n(N,"add$1"),n(j,"addAll"),n(H,"tree_cover"),n(G,"tree_data"),n(F,"tree_extent"),n(U,"Quad"),n(W,"tree_find"),n(V,"tree_remove"),n(q,"removeAll"),n(Y,"tree_root"),n($,"tree_size"),n(K,"tree_visit"),n(X,"tree_visitAfter"),n(J,"defaultX"),n(Q,"tree_x"),n(tt,"defaultY"),n(et,"tree_y"),n(it,"quadtree"),n(ot,"Quadtree$1"),n(nt,"leaf_copy");var st=it.prototype=ot.prototype;st.copy=function(){var t,e,i=new ot(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=nt(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]=nt(e));return i},st.add=Z,st.addAll=j,st.cover=H,st.data=G,st.extent=F,st.find=W,st.remove=V,st.removeAll=q,st.root=Y,st.size=$,st.visit=K,st.visitAfter=X,st.x=Q,st.y=et;const rt=class _Quadtree{_pin_h=0;_pin_w=0;_tree;constructor(t,e,i,o){this._pin_h=i,this._pin_w=o,this._tree=it().extent(t).addAll(e)}searchRect(t,e,i,o){const n=[];return this._tree.visit((r,a,l,h,u)=>{let c=!1;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}};n(rt,"Quadtree");let at=rt;const lt=class _CanvasPins extends r{_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 at([[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(),s=this.arrowWidth(),r=this.pinHeight(),a=this.pinWidth(),l=this.radiusWeightMult();let h=0;function u(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 c(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=>{h<t.weight&&(h=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=a/2;this.useWeightedRadius()&&(e+=a*(l*t.weight/h)),u({icon:t.weight,left:Math.floor(t[0]-e)+.5,top:Math.floor(t[1]-e-o)+.5,radius:e})}else c({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-a/2)+.5,top:Math.floor(t[1]-r-o)+.5,width:a,height:r,arrow_height:o,arrow_width:s})}),n(u,"drawCirclePin"),n(c,"drawSquarePin"),n(p,"drawArrow"),n(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}};n(lt,"CanvasPins");let ht=lt;function ut(){return new ct}function ct(){this.reset()}ht.prototype._class+=" map_CanvasPins",ht.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),ht.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),n(ut,"adder"),n(ct,"Adder"),ct.prototype={constructor:ct,reset:/* @__PURE__ */n(function(){this.s=this.t=0},"reset"),add:/* @__PURE__ */n(function(t){dt(pt,t,this.t),dt(this,pt.s,this.s),this.s?this.t+=pt.t:this.s=pt.t},"add"),valueOf:/* @__PURE__ */n(function(){return this.s},"valueOf")};var pt=new ct;function dt(t,e,i){var o=t.s=e+i,n=o-e,s=o-n;t.t=e-s+(i-n)}n(dt,"add");var _t=1e-6,ft=1e-12,mt=Math.PI,gt=mt/2,yt=mt/4,vt=2*mt,Lt=180/mt,wt=mt/180,bt=Math.abs,xt=Math.atan,Mt=Math.atan2,Ct=Math.cos,Pt=Math.ceil,kt=Math.exp,Et=Math.log,Tt=Math.pow,St=Math.sin,Ot=Math.sign||function(t){return t>0?1:t<0?-1:0},zt=Math.sqrt,Dt=Math.tan;function It(t){return t>1?0:t<-1?mt:Math.acos(t)}function At(t){return t>1?gt:t<-1?-gt:Math.asin(t)}function Bt(t){return(t=St(t/2))*t}function Rt(){}function Zt(t,e){t&&jt.hasOwnProperty(t.type)&&jt[t.type](t,e)}n(It,"acos"),n(At,"asin"),n(Bt,"haversin"),n(Rt,"noop$1"),n(Zt,"streamGeometry");var Nt={Feature:/* @__PURE__ */n(function(t,e){Zt(t.geometry,e)},"Feature"),FeatureCollection:/* @__PURE__ */n(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)Zt(i[o].geometry,e)},"FeatureCollection")},jt={Sphere:/* @__PURE__ */n(function(t,e){e.sphere()},"Sphere"),Point:/* @__PURE__ */n(function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},"Point"),MultiPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){Ht(t.coordinates,e,0)},"LineString"),MultiLineString:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)Ht(i[o],e,0)},"MultiLineString"),Polygon:/* @__PURE__ */n(function(t,e){Gt(t.coordinates,e)},"Polygon"),MultiPolygon:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)Gt(i[o],e)},"MultiPolygon"),GeometryCollection:/* @__PURE__ */n(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)Zt(i[o],e)},"GeometryCollection")};function Ht(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 Gt(t,e){var i=-1,o=t.length;for(e.polygonStart();++i<o;)Ht(t[i],e,1);e.polygonEnd()}function Ft(t,e){t&&Nt.hasOwnProperty(t.type)?Nt[t.type](t,e):Zt(t,e)}n(Ht,"streamLine"),n(Gt,"streamPolygon"),n(Ft,"geoStream");var Ut,Wt,Vt,qt,Yt,$t=ut(),Kt=ut(),Xt={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:/* @__PURE__ */n(function(){$t.reset(),Xt.lineStart=Jt,Xt.lineEnd=Qt},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){var t=+$t;Kt.add(t<0?vt+t:t),this.lineStart=this.lineEnd=this.point=Rt},"polygonEnd"),sphere:/* @__PURE__ */n(function(){Kt.add(vt)},"sphere")};function Jt(){Xt.point=te}function Qt(){ee(Ut,Wt)}function te(t,e){Xt.point=ee,Ut=t,Wt=e,Vt=t*=wt,qt=Ct(e=(e*=wt)/2+yt),Yt=St(e)}function ee(t,e){var i=(t*=wt)-Vt,o=i>=0?1:-1,n=o*i,s=Ct(e=(e*=wt)/2+yt),r=St(e),a=Yt*r,l=qt*s+a*Ct(n),h=a*o*St(n);$t.add(Mt(h,l)),Vt=t,qt=s,Yt=r}function ie(t){return Kt.reset(),Ft(t,Xt),2*Kt}function oe(t){return[Mt(t[1],t[0]),At(t[2])]}function ne(t){var e=t[0],i=t[1],o=Ct(i);return[o*Ct(e),o*St(e),St(i)]}function se(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function re(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 ae(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function le(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function he(t){var e=zt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}n(Jt,"areaRingStart$1"),n(Qt,"areaRingEnd$1"),n(te,"areaPointFirst$1"),n(ee,"areaPoint$1"),n(ie,"area"),n(oe,"spherical"),n(ne,"cartesian"),n(se,"cartesianDot"),n(re,"cartesianCross"),n(ae,"cartesianAddInPlace"),n(le,"cartesianScale"),n(he,"cartesianNormalizeInPlace");var ue,ce,pe,de,_e,fe,me,ge,ye,ve,Le,we,be,xe,Me,Ce,Pe,ke,Ee,Te,Se,Oe,ze,De,Ie,Ae,Be=ut(),Re={point:Ze,lineStart:je,lineEnd:He,polygonStart:/* @__PURE__ */n(function(){Re.point=Ge,Re.lineStart=Fe,Re.lineEnd=Ue,Be.reset(),Xt.polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Xt.polygonEnd(),Re.point=Ze,Re.lineStart=je,Re.lineEnd=He,$t<0?(ue=-(pe=180),ce=-(de=90)):Be>_t?de=90:Be<-_t&&(ce=-90),ve[0]=ue,ve[1]=pe},"polygonEnd"),sphere:/* @__PURE__ */n(function(){ue=-(pe=180),ce=-(de=90)},"sphere")};function Ze(t,e){ye.push(ve=[ue=t,pe=t]),e<ce&&(ce=e),e>de&&(de=e)}function Ne(t,e){var i=ne([t*wt,e*wt]);if(ge){var o=re(ge,i),n=re([o[1],-o[0],0],o);he(n),n=oe(n);var s,r=t-_e,a=r>0?1:-1,l=n[0]*Lt*a,h=bt(r)>180;h^(a*_e<l&&l<a*t)?(s=n[1]*Lt)>de&&(de=s):h^(a*_e<(l=(l+360)%360-180)&&l<a*t)?(s=-n[1]*Lt)<ce&&(ce=s):(e<ce&&(ce=e),e>de&&(de=e)),h?t<_e?We(ue,t)>We(ue,pe)&&(pe=t):We(t,pe)>We(ue,pe)&&(ue=t):pe>=ue?(t<ue&&(ue=t),t>pe&&(pe=t)):t>_e?We(ue,t)>We(ue,pe)&&(pe=t):We(t,pe)>We(ue,pe)&&(ue=t)}else ye.push(ve=[ue=t,pe=t]);e<ce&&(ce=e),e>de&&(de=e),ge=i,_e=t}function je(){Re.point=Ne}function He(){ve[0]=ue,ve[1]=pe,Re.point=Ze,ge=null}function Ge(t,e){if(ge){var i=t-_e;Be.add(bt(i)>180?i+(i>0?360:-360):i)}else fe=t,me=e;Xt.point(t,e),Ne(t,e)}function Fe(){Xt.lineStart()}function Ue(){Ge(fe,me),Xt.lineEnd(),bt(Be)>_t&&(ue=-(pe=180)),ve[0]=ue,ve[1]=pe,ge=null}function We(t,e){return(e-=t)<0?e+360:e}function Ve(t,e){return t[0]-e[0]}function qe(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Ye(t){var e,i,o,n,s,r,a;if(de=pe=-(ue=ce=1/0),ye=[],Ft(t,Re),i=ye.length){for(ye.sort(Ve),e=1,s=[o=ye[0]];e<i;++e)qe(o,(n=ye[e])[0])||qe(o,n[1])?(We(o[0],n[1])>We(o[0],o[1])&&(o[1]=n[1]),We(n[0],o[1])>We(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=We(o[1],n[0]))>r&&(r=a,ue=n[0],pe=o[1])}return ye=ve=null,ue===1/0||ce===1/0?[[NaN,NaN],[NaN,NaN]]:[[ue,ce],[pe,de]]}n(Ze,"boundsPoint$2"),n(Ne,"linePoint"),n(je,"boundsLineStart"),n(He,"boundsLineEnd"),n(Ge,"boundsRingPoint"),n(Fe,"boundsRingStart"),n(Ue,"boundsRingEnd"),n(We,"angle"),n(Ve,"rangeCompare"),n(qe,"rangeContains"),n(Ye,"bounds");var $e={sphere:Rt,point:Ke,lineStart:Je,lineEnd:ei,polygonStart:/* @__PURE__ */n(function(){$e.lineStart=ii,$e.lineEnd=oi},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){$e.lineStart=Je,$e.lineEnd=ei},"polygonEnd")};function Ke(t,e){t*=wt;var i=Ct(e*=wt);Xe(i*Ct(t),i*St(t),St(e))}function Xe(t,e,i){++Le,be+=(t-be)/Le,xe+=(e-xe)/Le,Me+=(i-Me)/Le}function Je(){$e.point=Qe}function Qe(t,e){t*=wt;var i=Ct(e*=wt);De=i*Ct(t),Ie=i*St(t),Ae=St(e),$e.point=ti,Xe(De,Ie,Ae)}function ti(t,e){t*=wt;var i=Ct(e*=wt),o=i*Ct(t),n=i*St(t),s=St(e),r=Mt(zt((r=Ie*s-Ae*n)*r+(r=Ae*o-De*s)*r+(r=De*n-Ie*o)*r),De*o+Ie*n+Ae*s);we+=r,Ce+=r*(De+(De=o)),Pe+=r*(Ie+(Ie=n)),ke+=r*(Ae+(Ae=s)),Xe(De,Ie,Ae)}function ei(){$e.point=Ke}function ii(){$e.point=ni}function oi(){si(Oe,ze),$e.point=Ke}function ni(t,e){Oe=t,ze=e,t*=wt,e*=wt,$e.point=si;var i=Ct(e);De=i*Ct(t),Ie=i*St(t),Ae=St(e),Xe(De,Ie,Ae)}function si(t,e){t*=wt;var i=Ct(e*=wt),o=i*Ct(t),n=i*St(t),s=St(e),r=Ie*s-Ae*n,a=Ae*o-De*s,l=De*n-Ie*o,h=zt(r*r+a*a+l*l),u=At(h),c=h&&-u/h;Ee+=c*r,Te+=c*a,Se+=c*l,we+=u,Ce+=u*(De+(De=o)),Pe+=u*(Ie+(Ie=n)),ke+=u*(Ae+(Ae=s)),Xe(De,Ie,Ae)}function ri(t){Le=we=be=xe=Me=Ce=Pe=ke=Ee=Te=Se=0,Ft(t,$e);var e=Ee,i=Te,o=Se,n=e*e+i*i+o*o;return n<ft&&(e=Ce,i=Pe,o=ke,we<_t&&(e=be,i=xe,o=Me),(n=e*e+i*i+o*o)<ft)?[NaN,NaN]:[Mt(i,e)*Lt,At(o/zt(n))*Lt]}function ai(t){return function(){return t}}function li(t,e){function i(i,o){return i=t(i,o),e(i[0],i[1])}return n(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 hi(t,e){return[bt(t)>mt?t+Math.round(-t/vt)*vt:t,e]}function ui(t,e,i){return(t%=vt)?e||i?li(pi(t),di(e,i)):pi(t):e||i?di(e,i):hi}function ci(t){return function(e,i){return[(e+=t)>mt?e-vt:e<-mt?e+vt:e,i]}}function pi(t){var e=ci(t);return e.invert=ci(-t),e}function di(t,e){var i=Ct(t),o=St(t),s=Ct(e),r=St(e);function a(t,e){var n=Ct(e),a=Ct(t)*n,l=St(t)*n,h=St(e),u=h*i+a*o;return[Mt(l*s-u*r,a*i-h*o),At(u*s+l*r)]}return n(a,"rotation"),a.invert=function(t,e){var n=Ct(e),a=Ct(t)*n,l=St(t)*n,h=St(e),u=h*s-l*r;return[Mt(l*s+h*r,a*i+u*o),At(u*i-a*o)]},a}function _i(t){function e(e){return(e=t(e[0]*wt,e[1]*wt))[0]*=Lt,e[1]*=Lt,e}return t=ui(t[0]*wt,t[1]*wt,t.length>2?t[2]*wt:0),n(e,"forward"),e.invert=function(e){return(e=t.invert(e[0]*wt,e[1]*wt))[0]*=Lt,e[1]*=Lt,e},e}function fi(t,e,i,o,n,s){if(i){var r=Ct(e),a=St(e),l=o*i;null==n?(n=e+o*vt,s=e-l/2):(n=mi(r,n),s=mi(r,s),(o>0?n<s:n>s)&&(n+=o*vt));for(var h,u=n;o>0?u>s:u<s;u-=l)h=oe([r,-a*Ct(u),-a*St(u)]),t.point(h[0],h[1])}}function mi(t,e){(e=ne(e))[0]-=t,he(e);var i=It(-e[1]);return((-e[2]<0?-i:i)+vt-_t)%vt}function gi(){var t,e,i=ai([0,0]),o=ai(90),s=ai(6),r={point:a};function a(i,o){t.push(i=e(i,o)),i[0]*=Lt,i[1]*=Lt}function l(){var n=i.apply(this,arguments),a=o.apply(this,arguments)*wt,l=s.apply(this,arguments)*wt;return t=[],e=ui(-n[0]*wt,-n[1]*wt,0).invert,fi(r,a,l,1),n={type:"Polygon",coordinates:[t]},t=e=null,n}return n(a,"point"),n(l,"circle"),l.center=function(t){return arguments.length?(i="function"==typeof t?t:ai([+t[0],+t[1]]),l):i},l.radius=function(t){return arguments.length?(o="function"==typeof t?t:ai(+t),l):o},l.precision=function(t){return arguments.length?(s="function"==typeof t?t:ai(+t),l):s},l}function yi(){var t,e=[];return{point:/* @__PURE__ */n(function(e,i,o){t.push([e,i,o])},"point"),lineStart:/* @__PURE__ */n(function(){e.push(t=[])},"lineStart"),lineEnd:Rt,rejoin:/* @__PURE__ */n(function(){e.length>1&&e.push(e.pop().concat(e.shift()))},"rejoin"),result:/* @__PURE__ */n(function(){var i=e;return e=[],t=null,i},"result")}}function vi(t,e){return bt(t[0]-e[0])<_t&&bt(t[1]-e[1])<_t}function Li(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 wi(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(vi(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 Li(o,t,null,!0)),l.push(i.o=new Li(o,null,i,!1)),a.push(i=new Li(r,t,null,!1)),l.push(i.o=new Li(r,null,i,!0))}}),a.length){for(l.sort(e),bi(a),bi(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 bi(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}}n(Ke,"centroidPoint$1"),n(Xe,"centroidPointCartesian"),n(Je,"centroidLineStart$1"),n(Qe,"centroidLinePointFirst"),n(ti,"centroidLinePoint"),n(ei,"centroidLineEnd$1"),n(ii,"centroidRingStart$1"),n(oi,"centroidRingEnd$1"),n(ni,"centroidRingPointFirst"),n(si,"centroidRingPoint"),n(ri,"centroid"),n(ai,"constant$1"),n(li,"compose"),n(hi,"rotationIdentity"),hi.invert=hi,n(ui,"rotateRadians"),n(ci,"forwardRotationLambda"),n(pi,"rotationLambda"),n(di,"rotationPhiGamma"),n(_i,"rotation"),n(fi,"circleStream"),n(mi,"circleRadius"),n(gi,"circle$1"),n(yi,"clipBuffer"),n(vi,"pointEqual"),n(Li,"Intersection"),n(wi,"clipRejoin"),n(bi,"link");var xi=ut();function Mi(t){return bt(t[0])<=mt?t[0]:Ot(t[0])*((bt(t[0])+mt)%vt-mt)}function Ci(t,e){var i=Mi(e),o=e[1],n=St(o),s=[St(i),-Ct(i),0],r=0,a=0;xi.reset(),1===n?o=gt+_t:-1===n&&(o=-gt-_t);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=Mi(p),_=p[1]/2+yt,f=St(_),m=Ct(_),g=0;g<c;++g,d=v,f=w,m=b,p=y){var y=u[g],v=Mi(y),L=y[1]/2+yt,w=St(L),b=Ct(L),x=v-d,M=x>=0?1:-1,C=M*x,P=C>mt,k=f*w;if(xi.add(Mt(k*M*St(C),m*b+k*Ct(C))),r+=P?x+M*vt:x,P^d>=i^v>=i){var E=re(ne(p),ne(y));he(E);var T=re(s,E);he(T);var S=(P^x>=0?-1:1)*At(T[2]);(o>S||o===S&&(E[0]||E[1]))&&(a+=P^x>=0?1:-1)}}return(r<-_t||r<_t&&xi<-_t)^1&a}function Pi(t,e,i,o){return function(s){var r,l,h,u=e(s),c=yi(),p=e(c),d=!1,_={point:f,lineStart:g,lineEnd:y,polygonStart:/* @__PURE__ */n(function(){_.point=v,_.lineStart=L,_.lineEnd=w,l=[],r=[]},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){_.point=f,_.lineStart=g,_.lineEnd=y,l=a(l);var t=Ci(r,o);l.length?(d||(s.polygonStart(),d=!0),wi(l,Ei,t,i,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),i(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),l=r=null},"polygonEnd"),sphere:/* @__PURE__ */n(function(){s.polygonStart(),s.lineStart(),i(null,null,1,s),s.lineEnd(),s.polygonEnd()},"sphere")};function f(e,i){t(e,i)&&s.point(e,i)}function m(t,e){u.point(t,e)}function g(){_.point=m,u.lineStart()}function y(){_.point=f,u.lineEnd()}function v(t,e){h.push([t,e]),p.point(t,e)}function L(){p.lineStart(),h=[]}function w(){v(h[0][0],h[0][1]),p.lineEnd();var t,e,i,o,n=p.clean(),a=c.result(),u=a.length;if(h.pop(),r.push(h),h=null,u)if(1&n){if((e=(i=a[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 u>1&&2&n&&a.push(a.pop().concat(a.shift())),l.push(a.filter(ki))}return n(f,"point"),n(m,"pointLine"),n(g,"lineStart"),n(y,"lineEnd"),n(v,"pointRing"),n(L,"ringStart"),n(w,"ringEnd"),_}}function ki(t){return t.length>1}function Ei(t,e){return((t=t.x)[0]<0?t[1]-gt-_t:gt-t[1])-((e=e.x)[0]<0?e[1]-gt-_t:gt-e[1])}n(Mi,"longitude"),n(Ci,"polygonContains"),n(Pi,"clip"),n(ki,"validSegment"),n(Ei,"compareIntersection");const Ti=Pi(function(){return!0},Si,zi,[-mt,-gt]);function Si(t){var e,i=NaN,o=NaN,s=NaN;return{lineStart:/* @__PURE__ */n(function(){t.lineStart(),e=1},"lineStart"),point:/* @__PURE__ */n(function(n,r){var a=n>0?mt:-mt,l=bt(n-i);bt(l-mt)<_t?(t.point(i,o=(o+r)/2>0?gt:-gt),t.point(s,o),t.lineEnd(),t.lineStart(),t.point(a,o),t.point(n,o),e=0):s!==a&&l>=mt&&(bt(i-s)<_t&&(i-=s*_t),bt(n-a)<_t&&(n-=a*_t),o=Oi(i,o,n,r),t.point(s,o),t.lineEnd(),t.lineStart(),t.point(a,o),e=0),t.point(i=n,o=r),s=a},"point"),lineEnd:/* @__PURE__ */n(function(){t.lineEnd(),i=o=NaN},"lineEnd"),clean:/* @__PURE__ */n(function(){return 2-e},"clean")}}function Oi(t,e,i,o){var n,s,r=St(t-i);return bt(r)>_t?xt((St(e)*(s=Ct(o))*St(i)-St(o)*(n=Ct(e))*St(t))/(n*s*r)):(e+o)/2}function zi(t,e,i,o){var n;if(null==t)n=i*gt,o.point(-mt,n),o.point(0,n),o.point(mt,n),o.point(mt,0),o.point(mt,-n),o.point(0,-n),o.point(-mt,-n),o.point(-mt,0),o.point(-mt,n);else if(bt(t[0]-e[0])>_t){var s=t[0]<e[0]?mt:-mt;n=i*s/2,o.point(-s,n),o.point(0,n),o.point(s,n)}else o.point(e[0],e[1])}function Di(t){var e=Ct(t),i=6*wt,o=e>0,s=bt(e)>_t;function r(e,o,n,s){fi(s,t,i,n,e,o)}function a(t,i){return Ct(t)*Ct(i)>e}function l(t){var e,i,r,l,c;return{lineStart:/* @__PURE__ */n(function(){l=r=!1,c=1},"lineStart"),point:/* @__PURE__ */n(function(n,p){var d,_=[n,p],f=a(n,p),m=o?f?0:u(n,p):f?u(n+(n<0?mt:-mt),p):0;if(!e&&(l=r=f)&&t.lineStart(),f!==r&&(!(d=h(e,_))||vi(e,d)||vi(_,d))&&(_[2]=1),f!==r)c=0,f?(t.lineStart(),d=h(_,e),t.point(d[0],d[1])):(d=h(e,_),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(s&&e&&o^f){var g;m&i||!(g=h(_,e,!0))||(c=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&&vi(e,_)||t.point(_[0],_[1]),e=_,r=f,i=m},"point"),lineEnd:/* @__PURE__ */n(function(){r&&t.lineEnd(),e=null},"lineEnd"),clean:/* @__PURE__ */n(function(){return c|(l&&r)<<1},"clean")}}function h(t,i,o){var n=[1,0,0],s=re(ne(t),ne(i)),r=se(s,s),a=s[0],l=r-a*a;if(!l)return!o&&t;var h=e*r/l,u=-e*a/l,c=re(n,s),p=le(n,h);ae(p,le(s,u));var d=c,_=se(p,d),f=se(d,d),m=_*_-f*(se(p,p)-1);if(!(m<0)){var g=zt(m),y=le(d,(-_-g)/f);if(ae(y,p),y=oe(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=bt(M-mt)<_t;if(!C&&x<b&&(v=b,b=x,x=v),C||M<_t?C?b+x>0^y[1]<(bt(y[0]-L)<_t?b:x):b<=y[1]&&y[1]<=x:M>mt^(L<=y[0]&&y[0]<=w)){var P=le(d,(-_+g)/f);return ae(P,p),[y,oe(P)]}}}function u(e,i){var n=o?t:mt-t,s=0;return e<-n?s|=1:e>n&&(s|=2),i<-n?s|=4:i>n&&(s|=8),s}return n(r,"interpolate"),n(a,"visible"),n(l,"clipLine"),n(h,"intersect"),n(u,"code"),Pi(a,l,r,o?[0,-t]:[-mt,t-mt])}function Ii(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}}}}}n(Si,"clipAntimeridianLine"),n(Oi,"clipAntimeridianIntersect"),n(zi,"clipAntimeridianInterpolate"),n(Di,"clipCircle"),n(Ii,"clipLine");var Ai=1e9,Bi=-Ai;function Ri(t,e,i,o){function s(n,s){return t<=n&&n<=i&&e<=s&&s<=o}function r(n,s,r,a){var h=0,c=0;if(null==n||(h=l(n,r))!==(c=l(s,r))||u(n,s)<0^r>0)do{a.point(0===h||3===h?t:i,h>1?o:e)}while((h=(h+r+4)%4)!==c);else a.point(s[0],s[1])}function l(o,n){return bt(o[0]-t)<_t?n>0?0:3:bt(o[0]-i)<_t?n>0?2:1:bt(o[1]-e)<_t?n>0?1:0:n>0?3:2}function h(t,e){return u(t.x,e.x)}function u(t,e){var i=l(t,1),o=l(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 n(s,"visible"),n(r,"interpolate"),n(l,"corner"),n(h,"compareIntersection"),n(u,"comparePoint"),function(l){var u,c,p,d,_,f,m,g,y,v,L,w=l,b=yi(),x={point:M,lineStart:E,lineEnd:T,polygonStart:P,polygonEnd:k};function M(t,e){s(t,e)&&w.point(t,e)}function C(){for(var e=0,i=0,n=c.length;i<n;++i)for(var s,r,a=c[i],l=1,h=a.length,u=a[0],p=u[0],d=u[1];l<h;++l)s=p,r=d,p=(u=a[l])[0],d=u[1],r<=o?d>o&&(p-s)*(o-r)>(d-r)*(t-s)&&++e:d<=o&&(p-s)*(o-r)<(d-r)*(t-s)&&--e;return e}function P(){w=b,u=[],c=[],L=!0}function k(){var t=C(),e=L&&t,i=(u=a(u)).length;(e||i)&&(l.polygonStart(),e&&(l.lineStart(),r(null,null,1,l),l.lineEnd()),i&&wi(u,h,t,r,l),l.polygonEnd()),w=l,u=c=p=null}function E(){x.point=S,c&&c.push(p=[]),v=!0,y=!1,m=g=NaN}function T(){u&&(S(d,_),f&&y&&b.rejoin(),u.push(b.result())),x.point=M,y&&w.lineEnd()}function S(n,r){var a=s(n,r);if(c&&p.push([n,r]),v)d=n,_=r,f=a,v=!1,a&&(w.lineStart(),w.point(n,r));else if(a&&y)w.point(n,r);else{var l=[m=Math.max(Bi,Math.min(Ai,m)),g=Math.max(Bi,Math.min(Ai,g))],h=[n=Math.max(Bi,Math.min(Ai,n)),r=Math.max(Bi,Math.min(Ai,r))];Ii(l,h,t,e,i,o)?(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(n,r),L=!1)}m=n,g=r,y=a}return n(M,"point"),n(C,"polygonInside"),n(P,"polygonStart"),n(k,"polygonEnd"),n(E,"lineStart"),n(T,"lineEnd"),n(S,"linePoint"),x}}function Zi(){var t,e,i,o=0,s=0,r=960,a=500;return i={stream:/* @__PURE__ */n(function(i){return t&&e===i?t:t=Ri(o,s,r,a)(e=i)},"stream"),extent:/* @__PURE__ */n(function(n){return arguments.length?(o=+n[0][0],s=+n[0][1],r=+n[1][0],a=+n[1][1],t=e=null,i):[[o,s],[r,a]]},"extent")}}n(Ri,"clipRectangle"),n(Zi,"extent");var Ni,ji,Hi,Gi=ut(),Fi={sphere:Rt,point:Rt,lineStart:Ui,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt};function Ui(){Fi.point=Vi,Fi.lineEnd=Wi}function Wi(){Fi.point=Fi.lineEnd=Rt}function Vi(t,e){Ni=t*=wt,ji=St(e*=wt),Hi=Ct(e),Fi.point=qi}function qi(t,e){t*=wt;var i=St(e*=wt),o=Ct(e),n=bt(t-Ni),s=Ct(n),r=o*St(n),a=Hi*i-ji*o*s,l=ji*i+Hi*o*s;Gi.add(Mt(zt(r*r+a*a),l)),Ni=t,ji=i,Hi=o}function Yi(t){return Gi.reset(),Ft(t,Fi),+Gi}n(Ui,"lengthLineStart"),n(Wi,"lengthLineEnd"),n(Vi,"lengthPointFirst$1"),n(qi,"lengthPoint$1"),n(Yi,"length");var $i=[null,null],Ki={type:"LineString",coordinates:$i};function Xi(t,e){return $i[0]=t,$i[1]=e,Yi(Ki)}n(Xi,"distance");var Ji={Feature:/* @__PURE__ */n(function(t,e){return to(t.geometry,e)},"Feature"),FeatureCollection:/* @__PURE__ */n(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)if(to(i[o].geometry,e))return!0;return!1},"FeatureCollection")},Qi={Sphere:/* @__PURE__ */n(function(){return!0},"Sphere"),Point:/* @__PURE__ */n(function(t,e){return eo(t.coordinates,e)},"Point"),MultiPoint:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(eo(i[o],e))return!0;return!1},"MultiPoint"),LineString:/* @__PURE__ */n(function(t,e){return io(t.coordinates,e)},"LineString"),MultiLineString:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(io(i[o],e))return!0;return!1},"MultiLineString"),Polygon:/* @__PURE__ */n(function(t,e){return oo(t.coordinates,e)},"Polygon"),MultiPolygon:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(oo(i[o],e))return!0;return!1},"MultiPolygon"),GeometryCollection:/* @__PURE__ */n(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)if(to(i[o],e))return!0;return!1},"GeometryCollection")};function to(t,e){return!(!t||!Qi.hasOwnProperty(t.type))&&Qi[t.type](t,e)}function eo(t,e){return 0===Xi(t,e)}function io(t,e){for(var i,o,n,s=0,r=t.length;s<r;s++){if(0===(o=Xi(t[s],e)))return!0;if(s>0&&(n=Xi(t[s],t[s-1]))>0&&i<=n&&o<=n&&(i+o-n)*(1-Math.pow((i-o)/n,2))<ft*n)return!0;i=o}return!1}function oo(t,e){return!!Ci(t.map(no),so(e))}function no(t){return(t=t.map(so)).pop(),t}function so(t){return[t[0]*wt,t[1]*wt]}function ro(t,e){return(t&&Ji.hasOwnProperty(t.type)?Ji[t.type]:to)(t,e)}function ao(t,e,i){var o=l(t,e-_t,i).concat(e);return function(t){return o.map(function(e){return[t,e]})}}function lo(t,e,i){var o=l(t,e-_t,i).concat(e);return function(t){return o.map(function(e){return[e,t]})}}function ho(){var t,e,i,o,s,r,a,h,u,c,p,d,_=10,f=_,m=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:L()}}function L(){return l(Pt(o/m)*m,i,m).map(p).concat(l(Pt(h/g)*g,a,g).map(d)).concat(l(Pt(e/_)*_,t,_).filter(function(t){return bt(t%m)>_t}).map(u)).concat(l(Pt(r/f)*f,s,f).filter(function(t){return bt(t%g)>_t}).map(c))}return n(v,"graticule"),n(L,"lines"),v.lines=function(){return L().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(d(a).slice(1),p(i).reverse().slice(1),d(h).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],h=+t[0][1],a=+t[1][1],o>i&&(t=o,o=i,i=t),h>a&&(t=h,h=a,a=t),v.precision(y)):[[o,h],[i,a]]},v.extentMinor=function(i){return arguments.length?(e=+i[0][0],t=+i[1][0],r=+i[0][1],s=+i[1][1],e>t&&(i=e,e=t,t=i),r>s&&(i=r,r=s,s=i),v.precision(y)):[[e,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(n){return arguments.length?(y=+n,u=ao(r,s,90),c=lo(e,t,y),p=ao(h,a,90),d=lo(o,i,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function uo(){return ho()()}function co(t,e){var i=t[0]*wt,o=t[1]*wt,n=e[0]*wt,s=e[1]*wt,r=Ct(o),a=St(o),l=Ct(s),h=St(s),u=r*Ct(i),c=r*St(i),p=l*Ct(n),d=l*St(n),_=2*At(zt(Bt(s-o)+r*l*Bt(n-i))),f=St(_),m=_?function(t){var e=St(t*=_)/f,i=St(_-t)/f,o=i*u+e*p,n=i*c+e*d,s=i*a+e*h;return[Mt(n,o)*Lt,Mt(s,zt(o*o+n*n))*Lt]}:function(){return[i*Lt,o*Lt]};return m.distance=_,m}function po(t){return t}n(to,"containsGeometry"),n(eo,"containsPoint"),n(io,"containsLine"),n(oo,"containsPolygon"),n(no,"ringRadians"),n(so,"pointRadians"),n(ro,"contains"),n(ao,"graticuleX"),n(lo,"graticuleY"),n(ho,"graticule"),n(uo,"graticule10"),n(co,"interpolate"),n(po,"identity$2");var _o,fo,mo,go,yo=ut(),vo=ut(),Lo={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:/* @__PURE__ */n(function(){Lo.lineStart=wo,Lo.lineEnd=Mo},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Lo.lineStart=Lo.lineEnd=Lo.point=Rt,yo.add(bt(vo)),vo.reset()},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=yo/2;return yo.reset(),t},"result")};function wo(){Lo.point=bo}function bo(t,e){Lo.point=xo,_o=mo=t,fo=go=e}function xo(t,e){vo.add(go*t-mo*e),mo=t,go=e}function Mo(){xo(_o,fo)}n(wo,"areaRingStart"),n(bo,"areaPointFirst"),n(xo,"areaPoint"),n(Mo,"areaRingEnd");var Co=1/0,Po=Co,ko=-Co,Eo=ko,To={point:So,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:/* @__PURE__ */n(function(){var t=[[Co,Po],[ko,Eo]];return ko=Eo=-(Po=Co=1/0),t},"result")};function So(t,e){t<Co&&(Co=t),t>ko&&(ko=t),e<Po&&(Po=e),e>Eo&&(Eo=e)}n(So,"boundsPoint$1");var Oo,zo,Do,Io,Ao=0,Bo=0,Ro=0,Zo=0,No=0,jo=0,Ho=0,Go=0,Fo=0,Uo={point:Wo,lineStart:Vo,lineEnd:$o,polygonStart:/* @__PURE__ */n(function(){Uo.lineStart=Ko,Uo.lineEnd=Xo},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Uo.point=Wo,Uo.lineStart=Vo,Uo.lineEnd=$o},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=Fo?[Ho/Fo,Go/Fo]:jo?[Zo/jo,No/jo]:Ro?[Ao/Ro,Bo/Ro]:[NaN,NaN];return Ao=Bo=Ro=Zo=No=jo=Ho=Go=Fo=0,t},"result")};function Wo(t,e){Ao+=t,Bo+=e,++Ro}function Vo(){Uo.point=qo}function qo(t,e){Uo.point=Yo,Wo(Do=t,Io=e)}function Yo(t,e){var i=t-Do,o=e-Io,n=zt(i*i+o*o);Zo+=n*(Do+t)/2,No+=n*(Io+e)/2,jo+=n,Wo(Do=t,Io=e)}function $o(){Uo.point=Wo}function Ko(){Uo.point=Jo}function Xo(){Qo(Oo,zo)}function Jo(t,e){Uo.point=Qo,Wo(Oo=Do=t,zo=Io=e)}function Qo(t,e){var i=t-Do,o=e-Io,n=zt(i*i+o*o);Zo+=n*(Do+t)/2,No+=n*(Io+e)/2,jo+=n,Ho+=(n=Io*t-Do*e)*(Do+t),Go+=n*(Io+e),Fo+=3*n,Wo(Do=t,Io=e)}function tn(t){this._context=t}n(Wo,"centroidPoint"),n(Vo,"centroidLineStart"),n(qo,"centroidPointFirstLine"),n(Yo,"centroidPointLine"),n($o,"centroidLineEnd"),n(Ko,"centroidRingStart"),n(Xo,"centroidRingEnd"),n(Jo,"centroidPointFirstRing"),n(Qo,"centroidPointRing"),n(tn,"PathContext"),tn.prototype={_radius:4.5,pointRadius:/* @__PURE__ */n(function(t){return this._radius=t,this},"pointRadius"),polygonStart:/* @__PURE__ */n(function(){this._line=0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this._line=NaN},"polygonEnd"),lineStart:/* @__PURE__ */n(function(){this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){0===this._line&&this._context.closePath(),this._point=NaN},"lineEnd"),point:/* @__PURE__ */n(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,vt)}},"point"),result:Rt};var en,on,nn,sn,rn,an=ut(),ln={point:Rt,lineStart:/* @__PURE__ */n(function(){ln.point=hn},"lineStart"),lineEnd:/* @__PURE__ */n(function(){en&&un(on,nn),ln.point=Rt},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){en=!0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){en=null},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=+an;return an.reset(),t},"result")};function hn(t,e){ln.point=un,on=sn=t,nn=rn=e}function un(t,e){sn-=t,rn-=e,an.add(zt(sn*sn+rn*rn)),sn=t,rn=e}function cn(){this._string=[]}function pn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function dn(t,e){var i,o,s=4.5;function r(t){return t&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),Ft(t,i(o))),o.result()}return n(r,"path"),r.area=function(t){return Ft(t,i(Lo)),Lo.result()},r.measure=function(t){return Ft(t,i(ln)),ln.result()},r.bounds=function(t){return Ft(t,i(To)),To.result()},r.centroid=function(t){return Ft(t,i(Uo)),Uo.result()},r.projection=function(e){return arguments.length?(i=null==e?(t=null,po):(t=e).stream,r):t},r.context=function(t){return arguments.length?(o=null==t?(e=null,new cn):new tn(e=t),"function"!=typeof s&&o.pointRadius(s),r):e},r.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),r):s},r.projection(t).context(e)}function _n(t){return{stream:fn(t)}}function fn(t){return function(e){var i=new mn;for(var o in t)i[o]=t[o];return i.stream=e,i}}function mn(){}function gn(t,e,i){var o=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),Ft(i,t.stream(To)),e(To.result()),null!=o&&t.clipExtent(o),t}function yn(t,e,i){return gn(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 vn(t,e,i){return yn(t,[[0,0],e],i)}function Ln(t,e,i){return gn(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 wn(t,e,i){return gn(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)}n(hn,"lengthPointFirst"),n(un,"lengthPoint"),n(cn,"PathString"),cn.prototype={_radius:4.5,_circle:pn(4.5),pointRadius:/* @__PURE__ */n(function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},"pointRadius"),polygonStart:/* @__PURE__ */n(function(){this._line=0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this._line=NaN},"polygonEnd"),lineStart:/* @__PURE__ */n(function(){this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){0===this._line&&this._string.push("Z"),this._point=NaN},"lineEnd"),point:/* @__PURE__ */n(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=pn(this._radius)),this._string.push("M",t,",",e,this._circle)}},"point"),result:/* @__PURE__ */n(function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null},"result")},n(pn,"circle"),n(dn,"d3GeoPath"),n(_n,"d3GeoTransform"),n(fn,"transformer"),n(mn,"TransformStream"),mn.prototype={constructor:mn,point:/* @__PURE__ */n(function(t,e){this.stream.point(t,e)},"point"),sphere:/* @__PURE__ */n(function(){this.stream.sphere()},"sphere"),lineStart:/* @__PURE__ */n(function(){this.stream.lineStart()},"lineStart"),lineEnd:/* @__PURE__ */n(function(){this.stream.lineEnd()},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){this.stream.polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this.stream.polygonEnd()},"polygonEnd")},n(gn,"fit"),n(yn,"fitExtent$1"),n(vn,"fitSize$1"),n(Ln,"fitWidth"),n(wn,"fitHeight");var bn=Ct(30*wt);function xn(t,e){return+e?Cn(t,e):Mn(t)}function Mn(t){return fn({point:/* @__PURE__ */n(function(e,i){e=t(e,i),this.stream.point(e[0],e[1])},"point")})}function Cn(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=zt(L*L+w*w+b*b),M=At(b/=x),C=bt(bt(b)-1)<_t||bt(s-c)<_t?(s+c)/2:Mt(w,L),P=t(C,M),k=P[0],E=P[1],T=k-o,S=E-n,O=y*T-g*S;(O*O/v>e||bt((g*T+y*S)/v-.5)>.3||r*p+a*d+l*_<bn)&&(i(o,n,s,r,a,l,k,E,C,L/=x,w/=x,b,f,m),m.point(k,E),i(k,E,C,L,w,b,h,u,c,p,d,_,f,m))}}return n(i,"resampleLineTo"),function(e){var o,s,r,a,l,h,u,c,p,d,_,f,m={point:g,lineStart:y,lineEnd:L,polygonStart:/* @__PURE__ */n(function(){e.polygonStart(),m.lineStart=w},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){e.polygonEnd(),m.lineStart=y},"polygonEnd")};function g(i,o){i=t(i,o),e.point(i[0],i[1])}function y(){c=NaN,m.point=v,e.lineStart()}function v(o,n){var s=ne([o,n]),r=t(o,n);i(c,p,u,d,_,f,c=r[0],p=r[1],u=o,d=s[0],_=s[1],f=s[2],16,e),e.point(c,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),s=c,r=p,a=d,l=_,h=f,m.point=v}function x(){i(c,p,u,d,_,f,s,r,o,a,l,h,16,e),m.lineEnd=L,L()}return n(g,"point"),n(y,"lineStart"),n(v,"linePoint"),n(L,"lineEnd"),n(w,"ringStart"),n(b,"ringPoint"),n(x,"ringEnd"),m}}n(xn,"resample"),n(Mn,"resampleNone"),n(Cn,"resample$1");var Pn=fn({point:/* @__PURE__ */n(function(t,e){this.stream.point(t*wt,e*wt)},"point")});function kn(t){return fn({point:/* @__PURE__ */n(function(e,i){var o=t(e,i);return this.stream.point(o[0],o[1])},"point")})}function En(t,e,i,o,s){function r(n,r){return[e+t*(n*=o),i-t*(r*=s)]}return n(r,"transform"),r.invert=function(n,r){return[(n-e)/t*o,(i-r)/t*s]},r}function Tn(t,e,i,o,s,r){var a=Ct(r),l=St(r),h=a*t,u=l*t,c=a/t,p=l/t,d=(l*i-a*e)/t,_=(l*e+a*i)/t;function f(t,n){return[h*(t*=o)-u*(n*=s)+e,i-u*t-h*n]}return n(f,"transform"),f.invert=function(t,e){return[o*(c*t-p*e+d),s*(_-p*t-c*e)]},f}function Sn(t){return On(function(){return t})()}function On(t){var e,i,o,s,r,a,l,h,u,c,p=150,d=480,_=250,f=0,m=0,g=0,y=0,v=0,L=0,w=1,b=1,x=null,M=Ti,C=null,P=po,k=.5;function E(t){return h(t[0]*wt,t[1]*wt)}function T(t){return(t=h.invert(t[0],t[1]))&&[t[0]*Lt,t[1]*Lt]}function S(){var t=Tn(p,0,0,w,b,L).apply(null,e(f,m)),o=(L?Tn:En)(p,d-t[0],_-t[1],w,b,L);return i=ui(g,y,v),l=li(e,o),h=li(i,l),a=xn(l,k),O()}function O(){return u=c=null,E}return n(E,"projection"),n(T,"invert"),E.stream=function(t){return u&&c===t?u:u=Pn(kn(i)(M(a(P(c=t)))))},E.preclip=function(t){return arguments.length?(M=t,x=void 0,O()):M},E.postclip=function(t){return arguments.length?(P=t,C=o=s=r=null,O()):P},E.clipAngle=function(t){return arguments.length?(M=+t?Di(x=t*wt):(x=null,Ti),O()):x*Lt},E.clipExtent=function(t){return arguments.length?(P=null==t?(C=o=s=r=null,po):Ri(C=+t[0][0],o=+t[0][1],s=+t[1][0],r=+t[1][1]),O()):null==C?null:[[C,o],[s,r]]},E.scale=function(t){return arguments.length?(p=+t,S()):p},E.translate=function(t){return arguments.length?(d=+t[0],_=+t[1],S()):[d,_]},E.center=function(t){return arguments.length?(f=t[0]%360*wt,m=t[1]%360*wt,S()):[f*Lt,m*Lt]},E.rotate=function(t){return arguments.length?(g=t[0]%360*wt,y=t[1]%360*wt,v=t.length>2?t[2]%360*wt:0,S()):[g*Lt,y*Lt,v*Lt]},E.angle=function(t){return arguments.length?(L=t%360*wt,S()):L*Lt},E.reflectX=function(t){return arguments.length?(w=t?-1:1,S()):w<0},E.reflectY=function(t){return arguments.length?(b=t?-1:1,S()):b<0},E.precision=function(t){return arguments.length?(a=xn(l,k=t*t),O()):zt(k)},E.fitExtent=function(t,e){return yn(E,t,e)},E.fitSize=function(t,e){return vn(E,t,e)},E.fitWidth=function(t,e){return Ln(E,t,e)},E.fitHeight=function(t,e){return wn(E,t,e)},n(S,"recenter"),n(O,"reset"),function(){return e=t.apply(this,arguments),E.invert=e.invert&&T,S()}}function zn(t){var e=0,i=mt/3,o=On(t),n=o(e,i);return n.parallels=function(t){return arguments.length?o(e=t[0]*wt,i=t[1]*wt):[e*Lt,i*Lt]},n}function Dn(t){var e=Ct(t);function i(t,i){return[t*e,St(i)/e]}return n(i,"forward"),i.invert=function(t,i){return[t/e,At(i*e)]},i}function In(t,e){var i=St(t),o=(i+St(e))/2;if(bt(o)<_t)return Dn(t);var s=1+i*(2*o-i),r=zt(s)/o;function a(t,e){var i=zt(s-2*o*St(e))/o;return[i*St(t*=o),r-i*Ct(t)]}return n(a,"project"),a.invert=function(t,e){var i=r-e,n=Mt(t,bt(i))*Ot(i);return i*o<0&&(n-=mt*Ot(t)*Ot(i)),[n/o,At((s-(t*t+i*i)*o*o)/(2*o))]},a}function An(){return zn(In).scale(155.424).center([0,33.6442])}function Bn(){return An().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Rn(t){var e=t.length;return{point:/* @__PURE__ */n(function(i,o){for(var n=-1;++n<e;)t[n].point(i,o)},"point"),sphere:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].sphere()},"sphere"),lineStart:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].lineStart()},"lineStart"),lineEnd:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].lineEnd()},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].polygonEnd()},"polygonEnd")}}function Zn(){var t,e,i,o,s,r,a=Bn(),l=An().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h=An().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:/* @__PURE__ */n(function(t,e){r=[t,e]},"point")};function c(t){var e=t[0],n=t[1];return r=null,i.point(e,n),r||(o.point(e,n),r)||(s.point(e,n),r)}function p(){return t=e=null,c}return n(c,"albersUsa"),c.invert=function(t){var e=a.scale(),i=a.translate(),o=(t[0]-i[0])/e,n=(t[1]-i[1])/e;return(n>=.12&&n<.234&&o>=-.425&&o<-.214?l:n>=.166&&n<.234&&o>=-.214&&o<-.115?h:a).invert(t)},c.stream=function(i){return t&&e===i?t:t=Rn([a.stream(e=i),l.stream(i),h.stream(i)])},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),h.precision(t),p()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),h.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),n=+t[0],r=+t[1];return i=a.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),o=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+_t,r+.12*e+_t],[n-.214*e-_t,r+.234*e-_t]]).stream(u),s=h.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+_t,r+.166*e+_t],[n-.115*e-_t,r+.234*e-_t]]).stream(u),p()},c.fitExtent=function(t,e){return yn(c,t,e)},c.fitSize=function(t,e){return vn(c,t,e)},c.fitWidth=function(t,e){return Ln(c,t,e)},c.fitHeight=function(t,e){return wn(c,t,e)},n(p,"reset"),c.scale(1070)}function Nn(t){return function(e,i){var o=Ct(e),n=Ct(i),s=t(o*n);return[s*n*St(e),s*St(i)]}}function jn(t){return function(e,i){var o=zt(e*e+i*i),n=t(o),s=St(n),r=Ct(n);return[Mt(e*s,o*r),At(o&&i*s/o)]}}n(kn,"transformRotate"),n(En,"scaleTranslate"),n(Tn,"scaleTranslateRotate"),n(Sn,"projection"),n(On,"projectionMutator"),n(zn,"conicProjection"),n(Dn,"cylindricalEqualAreaRaw"),n(In,"conicEqualAreaRaw"),n(An,"geoConicEqualArea"),n(Bn,"geoAlbers"),n(Rn,"multiplex$1"),n(Zn,"albersUsa"),n(Nn,"azimuthalRaw"),n(jn,"azimuthalInvert");var Hn=Nn(function(t){return zt(2/(1+t))});function Gn(){return Sn(Hn).scale(124.75).clipAngle(179.999)}Hn.invert=jn(function(t){return 2*At(t/2)}),n(Gn,"azimuthalEqualArea");var Fn=Nn(function(t){return(t=It(t))&&t/St(t)});function Un(){return Sn(Fn).scale(79.4188).clipAngle(179.999)}function Wn(t,e){return[t,Et(Dt((gt+e)/2))]}function Vn(){return qn(Wn).scale(961/vt)}function qn(t){var e,i,o,s=Sn(t),r=s.center,a=s.scale,l=s.translate,h=s.clipExtent,u=null;function c(){var n=mt*a(),r=s(_i(s.rotate()).invert([0,0]));return h(null==u?[[r[0]-n,r[1]-n],[r[0]+n,r[1]+n]]:t===Wn?[[Math.max(r[0]-n,u),e],[Math.min(r[0]+n,i),o]]:[[u,Math.max(r[1]-n,e)],[i,Math.min(r[1]+n,o)]])}return s.scale=function(t){return arguments.length?(a(t),c()):a()},s.translate=function(t){return arguments.length?(l(t),c()):l()},s.center=function(t){return arguments.length?(r(t),c()):r()},s.clipExtent=function(t){return arguments.length?(null==t?u=e=i=o=null:(u=+t[0][0],e=+t[0][1],i=+t[1][0],o=+t[1][1]),c()):null==u?null:[[u,e],[i,o]]},n(c,"reclip"),c()}function Yn(t){return Dt((gt+t)/2)}function $n(t,e){var i=Ct(t),o=t===e?St(t):Et(i/Ct(e))/Et(Yn(e)/Yn(t)),s=i*Tt(Yn(t),o)/o;if(!o)return Wn;function r(t,e){s>0?e<-gt+_t&&(e=-gt+_t):e>gt-_t&&(e=gt-_t);var i=s/Tt(Yn(e),o);return[i*St(o*t),s-i*Ct(o*t)]}return n(r,"project"),r.invert=function(t,e){var i=s-e,n=Ot(o)*zt(t*t+i*i),r=Mt(t,bt(i))*Ot(i);return i*o<0&&(r-=mt*Ot(t)*Ot(i)),[r/o,2*xt(Tt(s/n,1/o))-gt]},r}function Kn(){return zn($n).scale(109.5).parallels([30,30])}function Xn(t,e){return[t,e]}function Jn(){return Sn(Xn).scale(152.63)}function Qn(t,e){var i=Ct(t),o=t===e?St(t):(i-Ct(e))/(e-t),s=i/o+t;if(bt(o)<_t)return Xn;function r(t,e){var i=s-e,n=o*t;return[i*St(n),s-i*Ct(n)]}return n(r,"project"),r.invert=function(t,e){var i=s-e,n=Mt(t,bt(i))*Ot(i);return i*o<0&&(n-=mt*Ot(t)*Ot(i)),[n/o,s-Ot(o)*zt(t*t+i*i)]},r}function ts(){return zn(Qn).scale(131.154).center([0,13.9389])}Fn.invert=jn(function(t){return t}),n(Un,"azimuthalEquidistant"),n(Wn,"mercatorRaw"),Wn.invert=function(t,e){return[t,2*xt(kt(e))-gt]},n(Vn,"mercator"),n(qn,"mercatorProjection"),n(Yn,"tany"),n($n,"conicConformalRaw"),n(Kn,"conicConformal"),n(Xn,"equirectangularRaw"),Xn.invert=Xn,n(Jn,"equirectangular"),n(Qn,"conicEquidistantRaw"),n(ts,"conicEquidistant");var es=1.340264,is=-.081106,os=893e-6,ns=.003796,ss=zt(3)/2;function rs(t,e){var i=At(ss*St(e)),o=i*i,n=o*o*o;return[t*Ct(i)/(ss*(es+3*is*o+n*(7*os+9*ns*o))),i*(es+is*o+n*(os+ns*o))]}function as(){return Sn(rs).scale(177.158)}function ls(t,e){var i=Ct(e),o=Ct(t)*i;return[i*St(t)/o,St(e)/o]}function hs(){return Sn(ls).scale(144.049).clipAngle(60)}function us(){var t,e,i,o,s,r,a,l=1,h=0,u=0,c=1,p=1,d=0,_=null,f=1,m=1,g=fn({point:/* @__PURE__ */n(function(t,e){var i=L([t,e]);this.stream.point(i[0],i[1])},"point")}),y=po;function v(){return f=l*c,m=l*p,r=a=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+h,n+u]}return n(v,"reset"),n(L,"projection"),L.invert=function(i){var o=i[0]-h,n=i[1]-u;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 r&&a===t?r:r=g(y(a=t))},L.postclip=function(t){return arguments.length?(y=t,_=i=o=s=null,v()):y},L.clipExtent=function(t){return arguments.length?(y=null==t?(_=i=o=s=null,po):Ri(_=+t[0][0],i=+t[0][1],o=+t[1][0],s=+t[1][1]),v()):null==_?null:[[_,i],[o,s]]},L.scale=function(t){return arguments.length?(l=+t,v()):l},L.translate=function(t){return arguments.length?(h=+t[0],u=+t[1],v()):[h,u]},L.angle=function(i){return arguments.length?(e=St(d=i%360*wt),t=Ct(d),v()):d*Lt},L.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},L.reflectY=function(t){return arguments.length?(p=t?-1:1,v()):p<0},L.fitExtent=function(t,e){return yn(L,t,e)},L.fitSize=function(t,e){return vn(L,t,e)},L.fitWidth=function(t,e){return Ln(L,t,e)},L.fitHeight=function(t,e){return wn(L,t,e)},L}function cs(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 ps(){return Sn(cs).scale(175.295)}function ds(t,e){return[Ct(e)*St(t),St(e)]}function _s(){return Sn(ds).scale(249.5).clipAngle(90.000001)}function fs(t,e){var i=Ct(e),o=1+Ct(t)*i;return[i*St(t)/o,St(e)/o]}function ms(){return Sn(fs).scale(250).clipAngle(142)}function gs(t,e){return[Et(Dt((gt+e)/2)),-t]}function ys(){var t=qn(gs),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)}n(rs,"equalEarthRaw"),rs.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*(es+is*n+s*(os+ns*n))-e)/(es+3*is*n+s*(7*os+9*ns*n)))*o)*n*n,!(bt(i)<ft));++r);return[ss*t*(es+3*is*n+s*(7*os+9*ns*n))/Ct(o),At(St(o)/ss)]},n(as,"equalEarth"),n(ls,"gnomonicRaw"),ls.invert=jn(xt),n(hs,"gnomonic"),n(us,"identity$1"),n(cs,"naturalEarth1Raw"),cs.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(bt(i)>_t&&--n>0);return[t/(.8707+(s=o*o)*(s*(s*s*s*(.003971-.001529*s)-.013791)-.131979)),o]},n(ps,"naturalEarth1"),n(ds,"orthographicRaw"),ds.invert=jn(At),n(_s,"orthographic"),n(fs,"stereographicRaw"),fs.invert=jn(function(t){return 2*xt(t)}),n(ms,"stereographic"),n(gs,"transverseMercatorRaw"),gs.invert=function(t,e){return[-e,2*xt(kt(t))-gt]},n(ys,"transverseMercator");const vs=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,geoAlbers:Bn,geoAlbersUsa:Zn,geoArea:ie,geoAzimuthalEqualArea:Gn,geoAzimuthalEqualAreaRaw:Hn,geoAzimuthalEquidistant:Un,geoAzimuthalEquidistantRaw:Fn,geoBounds:Ye,geoCentroid:ri,geoCircle:gi,geoClipAntimeridian:Ti,geoClipCircle:Di,geoClipExtent:Zi,geoClipRectangle:Ri,geoConicConformal:Kn,geoConicConformalRaw:$n,geoConicEqualArea:An,geoConicEqualAreaRaw:In,geoConicEquidistant:ts,geoConicEquidistantRaw:Qn,geoContains:ro,geoDistance:Xi,geoEqualEarth:as,geoEqualEarthRaw:rs,geoEquirectangular:Jn,geoEquirectangularRaw:Xn,geoGnomonic:hs,geoGnomonicRaw:ls,geoGraticule:ho,geoGraticule10:uo,geoIdentity:us,geoInterpolate:co,geoLength:Yi,geoMercator:Vn,geoMercatorRaw:Wn,geoNaturalEarth1:ps,geoNaturalEarth1Raw:cs,geoOrthographic:_s,geoOrthographicRaw:ds,geoPath:dn,geoProjection:Sn,geoProjectionMutator:On,geoRotation:_i,geoStereographic:ms,geoStereographicRaw:fs,geoStream:Ft,geoTransform:_n,geoTransverseMercator:ys,geoTransverseMercatorRaw:gs},Symbol.toStringTag,{value:"Module"}));function Ls(){}n(Ls,"noop");let ws=1/0,bs=ws,xs=-ws,Ms=xs;function Cs(t,e){t<ws&&(ws=t),t>xs&&(xs=t),e<bs&&(bs=e),e>Ms&&(Ms=e)}n(Cs,"boundsPoint");const Ps={point:Cs,lineStart:Ls,lineEnd:Ls,polygonStart:Ls,polygonEnd:Ls,result(){const t=[[ws,bs],[xs,Ms]];return xs=Ms=-(bs=ws=1/0),t}};function ks(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),Ft(i,t.stream(Ps));const r=Ps.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 Es(t,e,i){return ks(t,[[0,0],e],i)}n(ks,"fitExtent"),n(Es,"fitSize");const Ts=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)}};n(Ts,"Geohash"),s(Ts,"base32","0123456789bcdefghjkmnpqrstuvwxyz");let Ss=Ts;function Os(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 zs(){let t,e;const i=1e-6,o=Bn();let s;const r=An().rotate([154,0]).center([-2,58.5]).parallels([55,65]);let a;const l=An().rotate([157,0]).center([-3,19.9]).parallels([8,18]);let h;const u=An().rotate([66,0]).center([0,18]).parallels([8,18]);let c,p;const d={point:/* @__PURE__ */n((t,e)=>{p=[t,e]},"point")},_=/* @__PURE__ */n(function(t){const e=t[0],i=t[1];return p=null,s.point(e,i),p||(a.point(e,i),p)||(h.point(e,i),p)||c.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,s=(t[1]-i[1])/e;return(s>=.12&&s<.234&&n>=-.425&&n<-.214?r:s>=.166&&s<.234&&n>=-.214&&n<-.115?l:s>=.204&&s<.234&&n>=.32&&n<.38?u:o).invert(t)},_.stream=function(i){return t&&e===i?t:t=Os([o.stream(e=i),r.stream(i),l.stream(i),u.stream(i)])},_.precision=function(t){return arguments.length?(o.precision(t),r.precision(t),l.precision(t),u.precision(t),f()):o.precision()},_.scale=function(t){return arguments.length?(o.scale(t),r.scale(.35*t),l.scale(t),u.scale(t),_.translate(o.translate())):o.scale()},_.translate=function(t){if(!arguments.length)return o.translate();const e=o.scale(),n=+t[0],p=+t[1];return s=o.translate(t).clipExtent([[n-.455*e,p-.238*e],[n+.455*e,p+.238*e]]).stream(d),a=r.translate([n-.307*e,p+.201*e]).clipExtent([[n-.425*e+i,p+.12*e+i],[n-.214*e-i,p+.234*e-i]]).stream(d),h=l.translate([n-.205*e,p+.212*e]).clipExtent([[n-.214*e+i,p+.166*e+i],[n-.115*e-i,p+.234*e-i]]).stream(d),c=u.translate([n+.35*e,p+.224*e]).clipExtent([[n+.32*e,p+.204*e],[n+.38*e,p+.234*e]]).stream(d),f()},_.fitExtent=function(t,e){return ks(_,t,e)},_.fitSize=function(t,e){return Es(_,t,e)},n(f,"reset"),_.scale(1070)}n(Os,"multiplex"),n(zs,"albersUsaPr");var Ds=/* @__PURE__ */(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))(Ds||{});const Is=[],As={};for(const L in Ds)"string"==typeof L&&(Is.push(L),As[L]="AlbersUsaPr"===L?zs:vs[`geo${L}`]);function Bs(t){const e=As[t];return e?e():(console.warn("Unknown projection: "+t),Vn())}n(Bs,"resolve");const Rs=2048/Math.PI,Zs=class _Layered extends h{_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,e){super.update(t,e);const i=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),o=this;i.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=u(this),t._domElement=o._parentOverlay.append("div"),t.layerEnter(o,t._svgElement,t._domElement)}).merge(i).each(function(t){t.layerUpdate(o)}),i.exit().each(function(t){t.layerExit(o),t._domElement.remove()}).remove(),i.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 e=this;return this.preRender().then(function(){h.prototype.render.call(e,function(i){e._layersTarget&&(e._renderCount&&e._autoScaleOnNextRender||e._prevAutoScaleMode!==e.autoScaleMode())?(e._prevAutoScaleMode=e.autoScaleMode(),e._autoScaleOnNextRender=!1,e.autoScale(),t&&t(i)):t&&t(i)})}),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())}}};n(Zs,"Layered");let Ns=Zs;Ns.prototype._class+=" map_Layered",Ns.prototype.publish("projection",null,"set","Map projection type",Is),Ns.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),Ns.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),Ns.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),Ns.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),Ns.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});const js=Ns.prototype.projection;Ns.prototype.projection=function(t){const e=js.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=Bs(t).scale(Rs).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=dn().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};const Hs=class _Layer extends Ns{_svgElement;_domElement;_topoJsonPromise;constructor(){super(),k.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(){Ns.prototype.render.apply(e,i)}),this}layerZoomed(t){}};n(Hs,"Layer");let Gs=Hs;Gs.prototype._class+=" map_Layer",Gs.prototype.implements(k.prototype);const Fs=class _CanvasPinLayer extends Gs{_pinsTransform;pins;_prevProjection;constructor(){super(),this.pins=new ht}layerEnter(t,e,i){Gs.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){Gs.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){Gs.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()}};n(Fs,"CanvasPinLayer");let Us=Fs;function Ws(t){return t}function Vs(t){if(null==t)return Ws;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 qs(t,e){for(var i,o=t.length,n=o-e;n<--o;)i=t[n],t[n++]=t[o],t[o]=i}function Ys(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return $s(t,e)})}:$s(t,e)}function $s(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=Vs(t.transform),o=t.arcs;function s(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&&qs(e,r)}function r(t){return i(t)}function a(t){for(var e=[],i=0,o=t.length;i<o;++i)s(t[i],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function h(t){return t.map(l)}function u(t){var e,i=t.type;switch(i){case"GeometryCollection":return{type:i,geometries:t.geometries.map(u)};case"Point":e=r(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(r);break;case"LineString":e=a(t.arcs);break;case"MultiLineString":e=t.arcs.map(a);break;case"Polygon":e=h(t.arcs);break;case"MultiPolygon":e=t.arcs.map(h);break;default:return null}return{type:i,coordinates:e}}return n(s,"arc"),n(r,"point"),n(a,"line"),n(l,"ring"),n(h,"polygon"),n(u,"geometry"),u(e)}function Xs(t,e){var i={},o={},s={},r=[],a=-1;function l(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 h(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}),r.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[++a],e[a]=i,e[o]=n)}),e.forEach(function(t){var e,i,n=l(t),r=n[0],a=n[1];if(e=s[r])if(delete s[e.end],e.push(t),e.end=a,i=o[a]){delete o[i.start];var h=i===e?e:e.concat(i);o[h.start=e.start]=s[h.end=i.end]=h}else o[e.start]=s[e.end]=e;else if(e=o[a])if(delete o[e.start],e.unshift(t),e.start=r,i=s[r]){delete s[i.end];var u=i===e?e:i.concat(e);o[u.start=i.start]=s[u.end=e.end]=u}else o[e.start]=s[e.end]=e;else o[(e=[t]).start=r]=s[e.end=a]=e}),n(l,"ends"),n(h,"flush"),h(s,o),h(o,s),e.forEach(function(t){i[t<0?~t:t]||r.push([t])}),r}function Js(t){return Ks(t,Qs.apply(this,arguments))}function Qs(t,e,i){var o,n,s;if(arguments.length>1)o=tr(t,e,i);else for(n=0,o=new Array(s=t.arcs.length);n<s;++n)o[n]=n;return{type:"MultiLineString",arcs:Xs(t,o)}}function tr(t,e,i){var o,s=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:o})}function l(t){t.forEach(a)}function h(t){t.forEach(l)}function u(t){t.forEach(h)}function c(t){switch(o=t,t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"LineString":l(t.arcs);break;case"MultiLineString":case"Polygon":h(t.arcs);break;case"MultiPolygon":u(t.arcs)}}return n(a,"extract0"),n(l,"extract1"),n(h,"extract2"),n(u,"extract3"),n(c,"geometry"),c(e),r.forEach(null==i?function(t){s.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&s.push(t[0].i)}),s}Us.prototype._class+=" map_CanvasPinLayer",Us.prototype.publishProxy("clusterMode","pins","clusterMode"),Us.prototype.publishProxy("allCircles","pins","allCircles"),Us.prototype.publishProxy("showQuadtree","pins","showQuadtree"),Us.prototype.publishProxy("useAveragePos","pins","useAveragePos"),Us.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),Us.prototype.publishProxy("enableClustering","pins","enableClustering"),Us.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),Us.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),Us.prototype.publishProxy("searchRectMult","pins","searchRectMult"),Us.prototype.publishProxy("pinHeight","pins","pinHeight"),Us.prototype.publishProxy("pinWidth","pins","pinWidth"),Us.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),Us.prototype.publishProxy("pinFontSize","pins","pinFontSize"),Us.prototype.publishProxy("arrowHeight","pins","arrowHeight"),Us.prototype.publishProxy("arrowWidth","pins","arrowWidth"),Us.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),n(Ws,"identity"),n(Vs,"transform"),n(qs,"reverse"),n(Ys,"feature_default"),n($s,"feature"),n(Ks,"object"),n(Xs,"stitch"),n(Js,"mesh"),n(Qs,"meshArcs"),n(tr,"extractArcs");let er=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function ir(t){if(!arguments.length)return er;const e=er;return er=t,e}n(ir,"topoJsonFolder");const or=class _Choropleth extends Gs{_dataMap={};_path=u(null);_dataMinWeight;_dataMaxWeight;_choroplethData;_choroplethTransform;_choropleth;_choroTopology;_choroTopologyObjects;_prevProjection;_prevInternalOnly;constructor(){super(),c.SimpleSelectionMixin.call(this)}data(t){const e=Gs.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){Gs.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(Gs.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(Js(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){}};n(or,"Choropleth");let nr=or;function sr(t,e){var i,o,s,r,a=d("beforesend","progress","load","error"),l=_(),h=new XMLHttpRequest,u=null,c=null,p=0;function f(t){var e,o=h.status;if(!o&&ar(h)||o>=200&&o<300||304===o){if(s)try{e=s.call(i,h)}catch(n){return void a.call("error",i,n)}else e=h;a.call("load",i,e)}else a.call("error",i,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=f:h.onreadystatechange=function(t){h.readyState>3&&f(t)},n(f,"respond"),h.onprogress=function(t){a.call("progress",i,t)},i={header:/* @__PURE__ */n(function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),i)},"header"),mimeType:/* @__PURE__ */n(function(t){return arguments.length?(o=null==t?null:t+"",i):o},"mimeType"),responseType:/* @__PURE__ */n(function(t){return arguments.length?(r=t,i):r},"responseType"),timeout:/* @__PURE__ */n(function(t){return arguments.length?(p=+t,i):p},"timeout"),user:/* @__PURE__ */n(function(t){return arguments.length<1?u:(u=null==t?null:t+"",i)},"user"),password:/* @__PURE__ */n(function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},"password"),response:/* @__PURE__ */n(function(t){return s=t,i},"response"),get:/* @__PURE__ */n(function(t,e){return i.send("GET",t,e)},"get"),post:/* @__PURE__ */n(function(t,e){return i.send("POST",t,e)},"post"),send:/* @__PURE__ */n(function(e,n,s){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each(function(t,e){h.setRequestHeader(e,t)}),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=r&&(h.responseType=r),p>0&&(h.timeout=p),null==s&&"function"==typeof n&&(s=n,n=null),null!=s&&1===s.length&&(s=rr(s)),null!=s&&i.on("error",s).on("load",function(t){s(null,t)}),a.call("beforesend",i,h),h.send(null==n?null:n),i},"send"),abort:/* @__PURE__ */n(function(){return h.abort(),i},"abort"),on:/* @__PURE__ */n(function(){var t=a.on.apply(a,arguments);return t===a?i:t},"on")},i}function rr(t){return function(e,i){t(null==e?i:null)}}function ar(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function lr(t,e){return function(i,o){var n=sr(i).mimeType(t).response(e);if(null!=o){if("function"!=typeof o)throw new Error("invalid callback: "+o);return n.get(o)}return n}}nr.prototype._class+=" map_Choropleth",nr.prototype.mixin(c.SimpleSelectionMixin),nr.prototype._palette=p.rainbow("default"),nr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",nr.prototype._palette.switch(),{tags:["Basic","Shared"]}),nr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),nr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),nr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),nr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),nr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),nr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),nr.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0}),n(sr,"request"),n(rr,"fixCallback"),n(ar,"hasResponse"),n(lr,"type$1");const hr=lr("application/json",function(t){return JSON.parse(t.responseText)});let ur=null,cr=null,pr=null;const dr=class _ChoroplethCountries extends nr{_choroTopologyObjectsCountries;_choroTopologyObjectsLand;choroPaths;constructor(){super()}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=ur.topology,this._choroTopologyObjectsCountries=ur.topology.objects.countries,this._choroTopologyObjectsLand=ur.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){return o.tooltipFormat({label:t[0],value:t[1]})})}layerUpdate(t){nr.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(pr[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)=>{ur&&t(),hr(`${ir()}/countries.json`,function(e){ur=e,cr=Ys(ur.topology,ur.topology.objects.countries).features,pr={};for(const t in cr)cr[t].id&&ur.countryNames[cr[t].id]&&(pr[ur.countryNames[cr[t].id].name]=cr[t]);t()})})),this._topoJsonPromise}};n(dr,"ChoroplethCountries");let _r=dr;_r.prototype._class+=" map_ChoroplethCountries";const fr=class _ChoroplethContinents extends _r{constructor(){super()}layerEnter(t,e,i){_r.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand}};n(fr,"ChoroplethContinents");let mr=fr;mr.prototype._class+=" map_ChoroplethContinents";let gr=null,yr=null,vr=null;const Lr=class _ChoroplethCounties extends nr{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=gr.topology,this._choroTopologyObjects=gr.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=t[0];return o.tooltipFormat({label:gr.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})}layerUpdate(t){nr.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(vr[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)=>{gr&&t(),hr(`${ir()}/us-counties.json`,function(e){gr=e,yr=Ys(gr.topology,gr.topology.objects.counties).features,vr={};for(const t in yr)yr[t].id&&(vr[yr[t].id]=yr[t]);t()})})),this._topoJsonPromise}};n(Lr,"ChoroplethCounties"),s(Lr,"__inputs",[{id:"fips",type:"string"},{id:"value",type:"number"}]);let wr=Lr;wr.prototype._class+=" map_ChoroplethCounties",wr.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");let br=null,xr=null,Mr=null;const Cr=class _ChoroplethStates extends nr{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=br.topology,this._choroTopologyObjects=br.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=Mr[t[0]].id;return o.tooltipFormat({label:br.stateNames[e].name,value:t[1]})})}layerUpdate(t){nr.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(Mr[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)=>{br&&t(),hr(`${ir()}/us-states.json`,function(e){br=e,xr=Ys(br.topology,br.topology.objects.states).features,Mr={};for(const t in xr)xr[t].id&&(Mr[br.stateNames[xr[t].id].code]=xr[t]);t()})})),this._topoJsonPromise}};n(Cr,"ChoroplethStates"),s(Cr,"__inputs",[{id:"state",type:"string"},{id:"value",type:"number"}]);let Pr=Cr;Pr.prototype._class+=" map_ChoroplethStates";const kr=class _ChoroplethStatesHeat extends Ns{constructor(){super()}};n(kr,"ChoroplethStatesHeat");let Er=kr;Er.prototype._class+=" map_ChoroplethStatesHeat";const Tr=class _GeoHash extends Gs{_dataMinWeight;_dataMaxWeight;geohash;_geoHashTransform;geoHashPaths;constructor(){super()}data(t){const e=Gs.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,e,i){Gs.prototype.layerEnter.apply(this,arguments),this.geohash=new Ss,this._geoHashTransform=e.append("g").attr("class","map_GeoHash"),this._selection=new c.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=u(null)}layerUpdate(t){Gs.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){}};n(Tr,"GeoHash");let Sr=Tr;function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Sr.prototype._class+=" map_GeoHash",Sr.prototype._palette=p.rainbow("default"),Sr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Sr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Sr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Sr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Sr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Sr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Sr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),n(Or,"getDefaultExportFromCjs");var zr,Dr={exports:{}};function Ir(){return zr||(zr=1,t=Dr,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,s=[],r=[],a=null,l={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};l.VERSION=t,l.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",l._googleMockApiObject={},l.load=function(t){null===i?!0===o?t&&s.push(t):(o=!0,window[l.WINDOW_CALLBACK_NAME]=function(){h(t)},l.createLoader()):t&&t(i)},l.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=l.createUrl(),document.body.appendChild(e)},l.isLoaded=function(){return null!==i},l.createUrl=function(){var t=l.URL;return t+="?callback="+l.WINDOW_CALLBACK_NAME,l.KEY&&(t+="&key="+l.KEY),l.LIBRARIES.length>0&&(t+="&libraries="+l.LIBRARIES.join(",")),l.CLIENT&&(t+="&client="+l.CLIENT),l.CHANNEL&&(t+="&channel="+l.CHANNEL),l.LANGUAGE&&(t+="&language="+l.LANGUAGE),l.REGION&&(t+="&region="+l.REGION),l.VERSION&&(t+="&v="+l.VERSION),t},l.release=function(h){var u=/* @__PURE__ */n(function(){l.KEY=null,l.LIBRARIES=[],l.CLIENT=null,l.CHANNEL=null,l.LANGUAGE=null,l.REGION=null,l.VERSION=t,i=null,o=!1,s=[],r=[],void 0!==window.google&&delete window.google,void 0!==window[l.WINDOW_CALLBACK_NAME]&&delete window[l.WINDOW_CALLBACK_NAME],null!==a&&(l.createLoader=a,a=null),null!==e&&(e.parentElement.removeChild(e),e=null),h&&h()},"release");o?l.load(function(){u()}):u()},l.onLoad=function(t){r.push(t)},l.makeMock=function(){a=l.createLoader,l.createLoader=function(){window.google=l._googleMockApiObject,window[l.WINDOW_CALLBACK_NAME]()}};var h=/* @__PURE__ */n(function(t){var e;for(o=!1,null===i&&(i=window.google),e=0;e<r.length;e++)r[e](i);for(t&&t(i),e=0;e<s.length;e++)s[e](i);s=[]},"ready");return l}()}()),Dr.exports;var t}n(Ir,"requireGoogle");var Ar=Ir();const Br=/* @__PURE__ */Or(Ar),Rr=Br||/* @__PURE__ */I({__proto__:null,default:Br},[Ar]);let Zr,Nr=null,jr=15e3;function Hr(t){jr=t}function Gr(t){return Zr||(Zr=T(jr,new Promise(function(e,i){if(Nr)e();else if(t)Nr=t,e();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{Rr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",Rr.LIBRARIES=["geometry","drawing"],Rr.load(function(t){Nr=t,e()})}catch(o){console.warn(`Failed to initialize Google Map API: ${o.message}`),e()}}})).catch(t=>{console.warn(`Timed out initializing Google Map API after ${jr}ms.`)})),Zr}function Fr(t,e,i){function o(t,e,i){Nr.maps.OverlayView.call(this),this._div=null,this._worldSurface=e,this._viewportSurface=i,this._map=t,this.setMap(t);const o=this;Nr.maps.event.addListener(t,"bounds_changed",function(){o.draw()}),Nr.maps.event.addListener(t,"projection_changed",function(){o.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 n(o,"Overlay"),o.prototype=Nr.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels");this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){const t=this.getProjection();if(!t)return;const e=this._map.getBounds(),i=t.fromLatLngToDivPixel(e.getCenter()),o=t.fromLatLngToDivPixel(e.getSouthWest()),n=t.fromLatLngToDivPixel(e.getNorthEast()),s={x:o.x,y:n.y},r={x:n.x,y:o.y},a=t.getWorldWidth();for(;r.x<s.x+100;)r.x+=a;for(;s.x>i.x;)s.x-=a,r.x-=a;s.x===this._prevMin.x&&s.y===this._prevMin.y&&r.x===this._prevMax.x&&r.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(s.x).widgetY(s.y).widgetWidth(r.x-s.x).widgetHeight(r.y-s.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=s,this._prevMax=r):this._viewportSurface.lazyRender());const l=t.fromLatLngToDivPixel(new Nr.maps.LatLng(85,-179.9)),h=t.fromLatLngToDivPixel(new Nr.maps.LatLng(-85,179.9));for(;h.x<l.x+100;)h.x+=a;for(;l.x>i.x;)l.x-=a,h.x-=a;l.x===this._prevWorldMin.x&&l.y===this._prevWorldMin.y&&h.x===this._prevWorldMax.x&&h.y===this._prevWorldMax.y||(this._worldSurface.widgetX(l.x).widgetY(l.y).widgetWidth(h.x-l.x).widgetHeight(h.y-l.y).render(),this._prevWorldMin=h,this._prevWorldMax=h)},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(t,e,i)}n(Hr,"requireGoogleMapTimeout"),n(Gr,"requireGoogleMap"),n(Fr,"createOverlay");const Ur=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:/* @__PURE__ */n(t=>{e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},"circle"),rectangle:/* @__PURE__ */n(t=>{e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},"rectangle"),polygon:/* @__PURE__ */n(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:/* @__PURE__ */n(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(t){const e=JSON.parse(t),i=0,o=.45,s="#1f77b4",r=!0,a=!0,l={circle:/* @__PURE__ */n((t,e)=>new Nr.maps.Circle({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,center:t.pos,radius:t.radius}),"circle"),rectangle:/* @__PURE__ */n((t,e)=>new Nr.maps.Rectangle({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,bounds:{north:t.bounds.ne.lat,west:t.bounds.sw.lng,south:t.bounds.sw.lat,east:t.bounds.ne.lng}}),"rectangle"),polygon:/* @__PURE__ */n((t,e)=>new Nr.maps.Polygon({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,paths:t.vertices}),"polygon"),polyline:/* @__PURE__ */n((t,e)=>new Nr.maps.Polyline({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,path:t.vertices}),"polyline")};for(let n=0;n<e.length;n++){const t=l[e[n].type](e[n],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:e[n].type,overlay:t})}}};n(Ur,"UserShapeSelectionBag");let Wr=Ur;const Vr=class _GMap extends f{_overlay;_userShapes;_worldSurface;_viewportSurface;_googleMapNode;_googleMap;_googleGeocoder;_prevCenterLat;_prevCenterLong;_googleStreetViewService;_googleMapPanorama;_prevZoom;_prevStreetView;_circleMap;_pinMap;_drawingManager;_prevCenterAddress;_userShapeSelection;constructor(){super(),this._tag="div";const t=this;function e(e,i,o){const n=t._overlay.getProjection(),s=n.fromLatLngToDivPixel(new Nr.maps.LatLng(i,o)),r=n.getWorldWidth(),a=parseFloat(e.widgetX()),l=parseFloat(e.widgetY()),h=parseFloat(e.widgetWidth());for(s.x-=a,s.y-=l;s.x<0;)s.x+=r;for(;s.x>h;)s.x-=r;return s}n(e,"calcProjection"),this._userShapes=new Wr(this),this._worldSurface=new E,this._worldSurface.project=function(t,i){return e(this,t,i)},this._viewportSurface=new E,this._viewportSurface.project=function(t,i){return e(this,t,i)}}data(t){return f.prototype.data.apply(this,arguments)}getMapType(){switch(this.type()){case"terrain":return Nr.maps.MapTypeId.TERRAIN;case"road":default:return Nr.maps.MapTypeId.ROADMAP;case"satellite":return Nr.maps.MapTypeId.SATELLITE;case"hybrid":return Nr.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(t){const e=f.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",t.width+"px").style("height",t.height+"px"),Nr.maps.event.trigger(this._googleMap,"resize")),e}enter(t,e){super.enter(t,e);const i=this;this._googleGeocoder=new Nr.maps.Geocoder,this._googleMapNode=e.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new Nr.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new Nr.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=Fr(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){i.centerLat(i._googleMap.center.lat()),i._prevCenterLat=i.centerLat(),i.centerLong(i._googleMap.center.lng()),i._prevCenterLong=i.centerLong(),i._googleMapPanorama.setPosition({lat:i.centerLat(),lng:i.centerLong()}),i.zoom(i._googleMap.getZoom()),i._prevZoom=i.zoom(),i._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){i.zoom(i._googleMap.zoom),i._prevZoom=i.zoom()}),this._googleStreetViewService=new Nr.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){i.streetView(i._googleMapPanorama.getVisible()),i._prevStreetView=i.streetView()}),this._circleMap=_([]),this._pinMap=_([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();const o={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new Nr.maps.drawing.DrawingManager({drawingMode:Nr.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:Nr.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:o,circleOptions:o,polygonOptions:o}),this.drawingState()&&this._userShapes.load(this.drawingState())}update(t,e){const i=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(t,e){if(e===Nr.maps.GeocoderStatus.OK){const e=t[0].geometry.bounds||t[0].geometry.viewport;i._googleMap.fitBounds(e),i.streetView()&&i.useComputedHeading()&&i.streetViewAt({lat:t[0].geometry.location.lat(),lng:t[0].geometry.location.lng()},50)}else i.statusError({data:t,status:e})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new Nr.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),Nr.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){_GMap.prototype.onDrawingComplete.apply(i,arguments)})):(this._drawingManager.setMap(null),Nr.maps.event.clearInstanceListeners(this._drawingManager))}render(t){const e=this,i=arguments;return Gr().then(()=>{super.render.apply(e,i)}),this}streetViewAt(t,e=1e3){const i=this,o=this.outdoorStreetViewOnly()?Nr.maps.StreetViewSource.OUTDOOR:Nr.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:t,radius:e,source:o},function(e,o){if("OK"===o){const o=new Nr.maps.Marker({position:t,map:i._googleMap}),n=Nr.maps.geometry.spherical.computeHeading(e.location.latLng,new Nr.maps.LatLng(t.lat,t.lng));i._googleMapPanorama.setPano(e.location.pano),i._googleMapPanorama.setPov({heading:n,pitch:0}),i.showStreetViewMarker()||o.setVisible(!1),i._googleMapPanorama.setVisible(!0);const s=Nr.maps.event.addListener(i._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(o.setMap(null),Nr.maps.event.removeListener(s))})}else i.statusError({data:e,status:o})})}updateCircles(){function t(t){return t[0]+"_"+t[1]}n(t,"rowID");const e=[],i=_(this._circleMap.keys(),function(t){return t});this.data().forEach(function(o){i.remove(t(o)),o[3]&&!this._circleMap.has(t(o))?e.push(o):o[3]&&this._circleMap.has(t(o))||!o[3]&&this._circleMap.has(t(o))&&i.set(t(o),!0)},this),e.forEach(function(e){const i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);const o=this;i.each(function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)})}updatePins(){function t(t){return t[0]+"_"+t[1]}n(t,"rowID");const e=[],i=[],o=_(this._pinMap.keys(),function(t){return t});this.data().forEach(function(n){o.remove(t(n)),n[2]&&!this._pinMap.has(t(n))?e.push(n):n[2]&&this._pinMap.has(t(n))?i.push(n):!n[2]&&this._pinMap.has(t(n))&&o.set(t(n),!0)},this),e.forEach(function(e){const i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),i.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);const s=this;o.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(t,e,i){return new Nr.maps.Marker({position:new Nr.maps.LatLng(t,e),animation:Nr.maps.Animation.DROP,title:i.title||"",icon:this.createIcon(i),map:this._googleMap})}createCircle(t,e,i){return i.radius=i.radius||1,new Nr.maps.Circle({center:new Nr.maps.LatLng(t,e),radius:16093*i.radius/10,fillColor:i.fillColor||"red",strokeColor:i.strokeColor||i.fillColor||"black",strokeWeight:.5,map:this._googleMap})}zoomTo(t,e){if(!this._renderCount)return this;e=e||this.singleZoomToMaxZoom();let i=0;const o=new Nr.maps.LatLngBounds;switch(t.forEach(function(t){const e=new Nr.maps.LatLng(t[0],t[1]);o.extend(e),++i}),i){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(e);break;default:this._googleMap.fitBounds(o)}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(t){if(t.type!==Nr.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);const e=t.overlay;e.__hpcc_type=t.type,this._userShapes.add(e);const i=this;let o=!1;window.addEventListener("keydown",function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)}),window.addEventListener("keyup",function(t){!1===t.ctrlKey&&(o=!1)}),Nr.maps.event.addListener(e,"click",function(t){return i.userShapeSelection(e),t&&!0===o&&(i.deleteUserShape(e),i.drawingState(JSON.stringify(i._userShapes.save()))),!1}),this.userShapeSelection(e),this.drawingState(JSON.stringify(this._userShapes.save()))}}statusError(t){console.warn("Data not found for this location.")}};n(Vr,"GMap");let qr=Vr;qr.prototype._class+=" map_GMap",qr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),qr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),qr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),qr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),qr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),qr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),qr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),qr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),qr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),qr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),qr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),qr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),qr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),qr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),qr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),qr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),qr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),qr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),qr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:/* @__PURE__ */n(t=>!1===t.drawingTools(),"disable")}),qr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const Yr=class _OverlayLayered extends Ns{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}};n(Yr,"OverlayLayered");let $r=Yr;const Kr=class _GMapLayered extends qr{layered;constructor(){super(),this.layered=new $r(this,this._viewportSurface),this._viewportSurface.widget(this.layered)}invert(t,e){return this.layered.invert(t,e)}rproject(t,e){const i=this.layered.getProjection().fromDivPixelToLatLng(new Nr.maps.Point(t,e));return{lat:i.lat(),lng:i.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)})})})}};n(Kr,"GMapLayered");let Xr=Kr;Xr.prototype._class+=" map_GMapLayered";const Jr=class _GMapCounties extends Xr{_counties;_view;_palette;_dataMinWeight;_dataMaxWeight;constructor(){super();const t=this;this._counties=(new wr).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){}};n(Jr,"GMapCounties");let Qr=Jr;Qr.prototype._class+=" map_GMapCounties",Qr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");const ta=class _GMapGraph extends qr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=(new O).layout("None").zoomable(!1),e=t.render,i=this;t.render=function(t){const o=[],n=[];let s=null;i.data().forEach(function(t){const e=i._viewportSurface.project(t[0],t[1]),r=(new m).shape("circle").radius(3).data(t).pos(e);o.push(r),s&&n.push((new z).sourceVertex(s).targetVertex(r).sourceMarker("none").targetMarker("arrow")),s=r}),this.data({vertices:o,edges:n});return e.apply(this,arguments)},this._viewportSurface.widget(t)}};n(ta,"GMapGraph");let ea=ta;ea.prototype._class+=" map_GMapGraph";const ia=class _GMapHeat extends qr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=new D,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)}};n(ia,"GMapHeat");let oa=ia;oa.prototype._class+=" map_GMapHeat";let na=(n(t=class extends Gs{_geohash;_pinsTransform;pinsPaths;constructor(){super(),c.SimpleSelectionMixin.call(this),this._geohash=new Ss}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,e,i){Gs.prototype.layerEnter.apply(this,arguments),this._pinsTransform=e,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=u(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})}layerUpdate(t){Gs.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 e=this,i=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t.origRow),"geohash",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t.origRow),"geohash",e._selection.selected(this))}).on("mouseover",function(t){g.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&e.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&e.tooltip.show.apply(this,arguments)}).each(function(t){const e=u(this);e.append("path").attr("class","data"),e.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);i.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 o=this.svgPinPath();i.selectAll("path.data").attr("d",o).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:e.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:e.fillColor()}),this.pinsPaths.exit().remove()}layerZoomed(t){Gs.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){}},"Pins"),t);na.prototype._class+=" map_Pins",na.prototype.mixin(c.SimpleSelectionMixin),na.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),na.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),na.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),na.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),na.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),na.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),na.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),na.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),na.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),na.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),na.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),na.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),na.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),na.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>"circle"!==t.pinType(),"disable")}),na.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 sa=class _GMapPin extends Xr{_pins;_view;constructor(){super();const t=this;this._pins=(new na).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){}};n(sa,"GMapPin");let ra=sa;ra.prototype._class+=" map_GMapPin",ra.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),ra.prototype.publishProxy("pinColor","_pins","fillColor"),ra.prototype.publishProxy("pinType","_pins","pinType"),ra.prototype.publishProxy("pinWidth","_pins","pinWidth"),ra.prototype.publishProxy("pinHeight","_pins","pinHeight"),ra.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),ra.prototype.publishProxy("pinRadius","_pins","pinRadius"),ra.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),ra.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),ra.prototype.publishProxy("textBaseline","_pins","textBaseline"),ra.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),ra.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),ra.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),ra.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),ra.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),ra.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),ra.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");let aa=(n(e=class extends Gs{dataEdges;_edgesTransform;constructor(){super()}data(t){const e=Gs.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){Gs.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){Gs.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){Gs.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}},"Lines"),e);aa.prototype._class+=" map_Lines",aa.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});const la=class _GMapPinLine extends Xr{_lines;_pins;_fromView;_toView;_linesView;constructor(){super();const t=this;this._lines=new aa,this._pins=(new na).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){}};n(la,"GMapPinLine");let ha=la;ha.prototype._class+=" map_GMapPinLine",ha.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),ha.prototype.publish("fromPinColor","green","html-color","From Pin Color"),ha.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toPinColor","red","html-color","To Pin Color"),ha.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});const ua=class _Graph extends na{dataEdges=[];_edgesTransform;constructor(){super()}importJSON(t){const e=na.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=na.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){na.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){na.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){na.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}};n(ua,"Graph");let ca=ua;ca.prototype._class+=" map_Graph";const pa=class _Graticule extends Gs{_dataMap={};_path=u(null);_graticule;_graticulePath;_graticuleOutlinePath;_prevProjection;constructor(){super()}layerEnter(t,e,i){Gs.prototype.layerEnter.apply(this,arguments),this._graticule=ho(),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}};n(pa,"Graticule");let da=pa;da.prototype._class+=" map_Graticule",da.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),da.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),da.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");const _a=class _Heat extends Gs{_heatTransform;heat;_prevProjection;constructor(){super()}layerEnter(t,e,i){Gs.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 D).target(this._heatTransform.node())}layerUpdate(t){Gs.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){Gs.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()}};n(_a,"Heat");let fa=_a;function ma(){}function ga(t){return t.k}function ya(t){return[t.x,t.y]}function va(t){return function(){return t}}function La(){let t=0,e=0,i=960,o=500,s=!0,r=!0,a=256,l=ga,h=ya,u=0;function c(){const n=+l.apply(this,arguments),c=h.apply(this,arguments),p=Math.log2(n/a),d=Math.round(Math.max(p+u,0)),_=Math.pow(2,p-d)*a,f=+c[0]-n/2,m=+c[1]-n/2,g=Math.max(s?0:-1/0,Math.floor((t-f)/_)),y=Math.min(s?1<<d:1/0,Math.ceil((i-f)/_)),v=Math.max(r?0:-1/0,Math.floor((e-m)/_)),L=Math.min(r?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 n(c,"tile"),c.size=function(n){return arguments.length?(t=e=0,i=+n[0],o=+n[1],c):[i-t,o-e]},c.extent=function(n){return arguments.length?(t=+n[0][0],e=+n[0][1],i=+n[1][0],o=+n[1][1],c):[[t,e],[i,o]]},c.scale=function(t){return arguments.length?(l="function"==typeof t?t:va(+t),c):l},c.translate=function(t){return arguments.length?(h="function"==typeof t?t:va([+t[0],+t[1]]),c):h},c.zoomDelta=function(t){return arguments.length?(u=+t,c):u},c.tileSize=function(t){return arguments.length?(a=+t,c):a},c.clamp=function(t){return arguments.length?(s=r=!!t,c):s&&r},c.clampX=function(t){return arguments.length?(s=!!t,c):s},c.clampY=function(t){return arguments.length?(r=!!t,c):r},c}fa.prototype._class+=" map_Heat",fa.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),fa.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),fa.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),n(ma,"IChoropleth"),ma.prototype._palette=p.rainbow("default"),ma.prototype.click=function(t,e,i){},n(ga,"defaultScale"),n(ya,"defaultTranslate"),n(va,"constant"),n(La,"d3Tile");const wa=4096,ba=class _OpenStreet extends Gs{_tile;_openStreet;_copyright;_copyrightBBox;_prevTileProvider;_zoomLayerID=0;_prevZoomLevel;constructor(){super(),this.autoScaleMode("none")}layerEnter(t,e,i){Gs.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=La().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 e=t.zoomScale(),i=t.zoomTranslate(),o=this._tile.scale(e*wa).translate(i)(),n=o.scale/e;o.translate[0],o.scale,o.translate[1],o.scale;const s=Math.round(1e3*n);this._prevZoomLevel!==s&&(this._prevZoomLevel=s,this._zoomLayerID++);const r=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],t=>t),a=r.enter().append("g").attr("class","scaleG").attr("transform",Ma(n)).merge(r);r.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){u(this).selectAll(".image").attr("xlink:href",null)}).remove();a.selectAll(".image").data(o,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)}};n(ba,"OpenStreet"),s(ba,"_copyrightText","© OpenStreetMap contributors");let xa=ba;function Ma(t,e){return"translate(-2048,-2048) scale("+t/256+")"}xa.prototype._class+=" map_OpenStreet",xa.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]}),n(Ma,"stringify");const Ca=class _TopoJSONChoropleth extends nr{_prevRegion;choroPaths;_choroTopologyIndex;_choroTopologyFeatures;constructor(){super(),this.projection("Mercator")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=o.columns(),i=e&&e.length?e[0]:"Location",n=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:n[0],series:i,value:t[1]})})}layerUpdate(t){nr.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){hr(`${ir()}/${t.region()}.json`,function(i){function o(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=Ys(t._choroTopology,t._choroTopologyObjects).features,hr(`${ir()}/${t.region()}_idx.json`,o).on("error",function(t){o({})}),n(o,"indexLoad")})})}return this._topoJsonPromise}};n(Ca,"TopoJSONChoropleth");let Pa=Ca;Pa.prototype._class+=" map_TopoJSONChoropleth",Pa.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 ka,Ea={exports:{}};function Ta(){return ka||(ka=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}n(i,"extend");var o=Object.create||/* @__PURE__ */function(){function t(){}return n(t,"F"),function(e){return t.prototype=e,new t}}();function s(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)}}n(s,"bind");var r=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++r),t._leaflet_id}function l(t,e,i){var o,s,r,a;return a=/* @__PURE__ */n(function(){o=!1,s&&(r.apply(i,s),s=!1)},"later"),r=/* @__PURE__ */n(function(){o?s=arguments:(t.apply(i,arguments),setTimeout(a,e),o=!0)},"wrapperFn"),r}function h(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 u(){return!1}function c(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("&")}n(a,"stamp"),n(l,"throttle"),n(h,"wrapNum"),n(u,"falseFn"),n(c,"formatNum"),n(p,"trim"),n(d,"splitWords"),n(_,"setOptions"),n(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})}n(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}n(v,"indexOf");var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}n(b,"getPrefixed");var x=0;function M(t){var e=+/* @__PURE__ */new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}n(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,s(t,e));t.call(e)}function E(t){t&&P.call(window,t)}n(k,"requestAnimFrame"),n(E,"cancelAnimFrame");var T={__proto__:null,extend:i,create:o,bind:s,get lastId(){return r},stamp:a,throttle:l,wrapNum:h,falseFn:u,formatNum:c,trim:p,splitWords:d,setOptions:_,getParamString:f,template:g,isArray:y,indexOf:v,emptyImageUrl:w,requestFn:C,cancelFn:P,requestAnimFrame:k,cancelAnimFrame:E};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)}}n(S,"Class"),S.extend=function(t){var e=/* @__PURE__ */n(function(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},"NewClass"),s=e.__super__=this.prototype,r=o(s);for(var a in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&i(e,t.statics),t.includes&&(O(t.includes),i.apply(null,[r].concat(t.includes))),i(r,t),delete r.statics,delete r.includes,r.options&&(r.options=s.options?o(s.options):{},i(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return i(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},n(O,"checkDeprecatedMixinEvents");var z={on:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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=u,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=u;delete this._events[t]}},"_off"),fire:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},"addEventParent"),removeEventParent:/* @__PURE__ */n(function(t){return this._eventParents&&delete this._eventParents[a(t)],this},"removeEventParent"),_propagateEvent:/* @__PURE__ */n(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}n(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:/* @__PURE__ */n(function(){return new I(this.x,this.y)},"clone"),add:/* @__PURE__ */n(function(t){return this.clone()._add(B(t))},"add"),_add:/* @__PURE__ */n(function(t){return this.x+=t.x,this.y+=t.y,this},"_add"),subtract:/* @__PURE__ */n(function(t){return this.clone()._subtract(B(t))},"subtract"),_subtract:/* @__PURE__ */n(function(t){return this.x-=t.x,this.y-=t.y,this},"_subtract"),divideBy:/* @__PURE__ */n(function(t){return this.clone()._divideBy(t)},"divideBy"),_divideBy:/* @__PURE__ */n(function(t){return this.x/=t,this.y/=t,this},"_divideBy"),multiplyBy:/* @__PURE__ */n(function(t){return this.clone()._multiplyBy(t)},"multiplyBy"),_multiplyBy:/* @__PURE__ */n(function(t){return this.x*=t,this.y*=t,this},"_multiplyBy"),scaleBy:/* @__PURE__ */n(function(t){return new I(this.x*t.x,this.y*t.y)},"scaleBy"),unscaleBy:/* @__PURE__ */n(function(t){return new I(this.x/t.x,this.y/t.y)},"unscaleBy"),round:/* @__PURE__ */n(function(){return this.clone()._round()},"round"),_round:/* @__PURE__ */n(function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},"_round"),floor:/* @__PURE__ */n(function(){return this.clone()._floor()},"floor"),_floor:/* @__PURE__ */n(function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},"_floor"),ceil:/* @__PURE__ */n(function(){return this.clone()._ceil()},"ceil"),_ceil:/* @__PURE__ */n(function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},"_ceil"),trunc:/* @__PURE__ */n(function(){return this.clone()._trunc()},"trunc"),_trunc:/* @__PURE__ */n(function(){return this.x=A(this.x),this.y=A(this.y),this},"_trunc"),distanceTo:/* @__PURE__ */n(function(t){var e=(t=B(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},"distanceTo"),equals:/* @__PURE__ */n(function(t){return(t=B(t)).x===this.x&&t.y===this.y},"equals"),contains:/* @__PURE__ */n(function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},"contains"),toString:/* @__PURE__ */n(function(){return"Point("+c(this.x)+", "+c(this.y)+")"},"toString")},n(B,"toPoint"),n(R,"Bounds"),R.prototype={extend:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},"getCenter"),getBottomLeft:/* @__PURE__ */n(function(){return B(this.min.x,this.max.y)},"getBottomLeft"),getTopRight:/* @__PURE__ */n(function(){return B(this.max.x,this.min.y)},"getTopRight"),getTopLeft:/* @__PURE__ */n(function(){return this.min},"getTopLeft"),getBottomRight:/* @__PURE__ */n(function(){return this.max},"getBottomRight"),getSize:/* @__PURE__ */n(function(){return this.max.subtract(this.min)},"getSize"),contains:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return!(!this.min||!this.max)},"isValid"),pad:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return!!t&&(t=Z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))},"equals")},n(Z,"toBounds"),n(N,"LatLngBounds"),N.prototype={extend:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return new H((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},"getCenter"),getSouthWest:/* @__PURE__ */n(function(){return this._southWest},"getSouthWest"),getNorthEast:/* @__PURE__ */n(function(){return this._northEast},"getNorthEast"),getNorthWest:/* @__PURE__ */n(function(){return new H(this.getNorth(),this.getWest())},"getNorthWest"),getSouthEast:/* @__PURE__ */n(function(){return new H(this.getSouth(),this.getEast())},"getSouthEast"),getWest:/* @__PURE__ */n(function(){return this._southWest.lng},"getWest"),getSouth:/* @__PURE__ */n(function(){return this._southWest.lat},"getSouth"),getEast:/* @__PURE__ */n(function(){return this._northEast.lng},"getEast"),getNorth:/* @__PURE__ */n(function(){return this._northEast.lat},"getNorth"),contains:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},"toBBoxString"),equals:/* @__PURE__ */n(function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},"equals"),isValid:/* @__PURE__ */n(function(){return!(!this._southWest||!this._northEast)},"isValid")},n(j,"toLatLngBounds"),n(H,"LatLng"),H.prototype={equals:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},"toString"),distanceTo:/* @__PURE__ */n(function(t){return W.distance(this,G(t))},"distanceTo"),wrap:/* @__PURE__ */n(function(){return W.wrapLatLng(this)},"wrap"),toBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return new H(this.lat,this.lng,this.alt)},"clone")},n(G,"toLatLng");var F,U={latLngToPoint:/* @__PURE__ */n(function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},"latLngToPoint"),pointToLatLng:/* @__PURE__ */n(function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},"pointToLatLng"),project:/* @__PURE__ */n(function(t){return this.projection.project(t)},"project"),unproject:/* @__PURE__ */n(function(t){return this.projection.unproject(t)},"unproject"),scale:/* @__PURE__ */n(function(t){return 256*Math.pow(2,t)},"scale"),zoom:/* @__PURE__ */n(function(t){return Math.log(t/256)/Math.LN2},"zoom"),getProjectedBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new H(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},"wrapLatLng"),wrapLatLngBounds:/* @__PURE__ */n(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({},U,{wrapLng:[-180,180],R:6371e3,distance:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:(F=V*Math.PI,new R([-F,-F],[F,F]))};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)}n(Y,"Transformation"),Y.prototype={transform:/* @__PURE__ */n(function(t,e){return this._transform(t.clone(),e)},"transform"),_transform:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return e=e||1,new I((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)},"untransform")},n($,"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"}n(Q,"svgCreate"),n(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,Et=!window.L_NO_TOUCH&&(kt||Pt),Tt=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:/* @__PURE__ */n(function(){t=!0},"get")});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,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}n(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:Et,touchNative:kt,mobileOpera:Tt,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",Ft=jt.msPointer?"MSPointerUp":"pointerup",Ut=jt.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Ht,touchmove:Gt,touchend:Ft,touchcancel:Ut},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),u)}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(Ft,Qt,!0),document.addEventListener(Ut,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}n($t,"addPointerListener"),n(Kt,"removePointerListener"),n(Xt,"_globalPointerDown"),n(Jt,"_globalPointerMove"),n(Qt,"_globalPointerUp"),n(te,"_addPointerDocListener"),n(ee,"_handlePointer"),n(ie,"_onPointerStart"),n(oe,"makeDblclick");var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,o=0;function s(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 n(s,"simDblclick"),t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}n(se,"addDoubleTapListener"),n(re,"removeDoubleTapListener");var ae,le,he,ue,ce,pe=Te(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),de=Te(["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&&Ee(t,e)}function Ee(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 Te(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function 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(n(fe,"get"),n(me,"getStyle"),n(ge,"create$1"),n(ye,"remove"),n(ve,"empty"),n(Le,"toFront"),n(we,"toBack"),n(be,"hasClass"),n(xe,"addClass"),n(Me,"removeClass"),n(Ce,"setClass"),n(Pe,"getClass"),n(ke,"setOpacity"),n(Ee,"_setOpacityIE"),n(Te,"testProp"),n(Se,"setTransform"),n(Oe,"setPosition"),n(ze,"getPosition"),"onselectstart"in document)ae=/* @__PURE__ */n(function(){He(window,"selectstart",Xe)},"disableTextSelection"),le=/* @__PURE__ */n(function(){Fe(window,"selectstart",Xe)},"enableTextSelection");else{var De=Te(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=/* @__PURE__ */n(function(){if(De){var t=document.documentElement.style;he=t[De],t[De]="none"}},"disableTextSelection"),le=/* @__PURE__ */n(function(){De&&(document.documentElement.style[De]=he,he=void 0)},"enableTextSelection")}function Ie(){He(window,"dragstart",Xe)}function Ae(){Fe(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,Fe(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}}n(Ie,"disableImageDrag"),n(Ae,"enableImageDrag"),n(Be,"preventOutline"),n(Re,"restoreOutline"),n(Ze,"getSizedParentNode"),n(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:Te,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}n(He,"on");var Ge="_leaflet_events";function Fe(t,e,i,o){if(1===arguments.length)Ue(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)Ue(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 Ue(t,e){for(var i in t[Ge]){var o=i.split(/\d/)[0];e&&!e(o)||qe(t,o,null,null,i)}}n(Fe,"off"),n(Ue,"batchRemove");var We={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ve(t,e,i,o){var s=e+a(i)+(o?"_"+a(o):"");if(t[Ge]&&t[Ge][s])return this;var r=/* @__PURE__ */n(function(e){return i.call(o||t,e||window.event)},"handler"),l=r;!jt.touchNative&&jt.pointer&&0===e.indexOf("touch")?r=$t(t,e,r):jt.touch&&"dblclick"===e?r=se(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(We[e]||e,r,!!jt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=/* @__PURE__ */n(function(e){e=e||window.event,oi(t,e)&&l(e)},"handler"),t.addEventListener(We[e],r,!1)):t.addEventListener(e,l,!1):t.attachEvent("on"+e,r),t[Ge]=t[Ge]||{},t[Ge][s]=r}function qe(t,e,i,o,n){n=n||e+a(i)+(o?"_"+a(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)}n(Ve,"addOne"),n(qe,"removeOne"),n(Ye,"stopPropagation"),n($e,"disableScrollPropagation"),n(Ke,"disableClickPropagation"),n(Xe,"preventDefault"),n(Je,"stop"),n(Qe,"getPropagationPath"),n(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}n(ii,"getWheelDelta"),n(oi,"isExternalTarget");var ni={__proto__:null,on:He,off:Fe,stopPropagation:Ye,disableScrollPropagation:$e,disableClickPropagation:Ke,preventDefault:Xe,stop:Je,getPropagationPath:Qe,getMousePosition:ti,getWheelDelta:ii,isExternalTarget:oi,addListener:He,removeListener:Fe},si=D.extend({run:/* @__PURE__ */n(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=+/* @__PURE__ */new Date,this.fire("start"),this._animate()},"run"),stop:/* @__PURE__ */n(function(){this._inProgress&&(this._step(!0),this._complete())},"stop"),_animate:/* @__PURE__ */n(function(){this._animId=k(this._animate,this),this._step()},"_animate"),_step:/* @__PURE__ */n(function(t){var e=+/* @__PURE__ */new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},"_step"),_runFrame:/* @__PURE__ */n(function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Oe(this._el,i),this.fire("step")},"_runFrame"),_complete:/* @__PURE__ */n(function(){E(this._animId),this._inProgress=!1,this.fire("end")},"_complete"),_easeOut:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){e=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},"setZoom"),zoomIn:/* @__PURE__ */n(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},"zoomIn"),zoomOut:/* @__PURE__ */n(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},"zoomOut"),setZoomAround:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.fitBounds([[-90,-180],[90,180]],t)},"fitWorld"),panTo:/* @__PURE__ */n(function(t,e){return this.setView(t,this._zoom,{pan:e})},"panTo"),panBy:/* @__PURE__ */n(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:/* @__PURE__ */n(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()),s=this.project(t),r=this.getSize(),a=this._zoom;t=G(t),e=void 0===e?a:e;var l=Math.max(r.x,r.y),h=l*this.getZoomScale(a,e),u=s.distanceTo(o)||1,c=1.42,p=c*c;function d(t){var e=(h*h-l*l+(t?-1:1)*p*p*u*u)/(2*(t?h:l)*p*u),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)}n(d,"r"),n(_,"sinh"),n(f,"cosh"),n(m,"tanh");var g=d(0);function y(t){return l*(f(g)/f(g+c*t))}function v(t){return l*(f(g)*m(g+c*t)-_(g))/p}function L(t){return 1-Math.pow(1-t,1.5)}n(y,"w"),n(v,"u"),n(L,"easeOut");var w=Date.now(),b=(d(1)-g)/c,x=i.duration?1e3*i.duration:1e3*b*.8;function M(){var i=(Date.now()-w)/x,n=L(i)*b;i<=1?(this._flyToFrame=k(M,this),this._move(this.unproject(o.add(s.subtract(o).multiplyBy(v(n)/u)),a),this.getScaleZoom(l/y(n),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return n(M,"frame"),this._moveStart(!0,i.noMoveStart),M.call(this),this},"flyTo"),flyToBounds:/* @__PURE__ */n(function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},"flyToBounds"),setMaxBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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(),n=e.divideBy(2).round(),r=o.divideBy(2).round(),a=n.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(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},"invalidateSize"),stop:/* @__PURE__ */n(function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},"stop"),locate:/* @__PURE__ */n(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=s(this._handleGeolocationResponse,this),o=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},"locate"),stopLocate:/* @__PURE__ */n(function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},"stopLocate"),_handleGeolocationError:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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&&(E(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},"getCenter"),getZoom:/* @__PURE__ */n(function(){return this._zoom},"getZoom"),getBounds:/* @__PURE__ */n(function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},"getBounds"),getMinZoom:/* @__PURE__ */n(function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},"getMinZoom"),getMaxZoom:/* @__PURE__ */n(function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},"getMaxZoom"),getBoundsZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){var i=this._getTopLeftPoint(t,e);return new R(i,i.add(this.getSize()))},"getPixelBounds"),getPixelOrigin:/* @__PURE__ */n(function(){return this._checkIfLoaded(),this._pixelOrigin},"getPixelOrigin"),getPixelWorldBounds:/* @__PURE__ */n(function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},"getPixelWorldBounds"),getPane:/* @__PURE__ */n(function(t){return"string"==typeof t?this._panes[t]:t},"getPane"),getPanes:/* @__PURE__ */n(function(){return this._panes},"getPanes"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),getZoomScale:/* @__PURE__ */n(function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},"getZoomScale"),getScaleZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},"project"),unproject:/* @__PURE__ */n(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},"unproject"),layerPointToLatLng:/* @__PURE__ */n(function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},"layerPointToLatLng"),latLngToLayerPoint:/* @__PURE__ */n(function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},"latLngToLayerPoint"),wrapLatLng:/* @__PURE__ */n(function(t){return this.options.crs.wrapLatLng(G(t))},"wrapLatLng"),wrapLatLngBounds:/* @__PURE__ */n(function(t){return this.options.crs.wrapLatLngBounds(j(t))},"wrapLatLngBounds"),distance:/* @__PURE__ */n(function(t,e){return this.options.crs.distance(G(t),G(e))},"distance"),containerPointToLayerPoint:/* @__PURE__ */n(function(t){return B(t).subtract(this._getMapPanePos())},"containerPointToLayerPoint"),layerPointToContainerPoint:/* @__PURE__ */n(function(t){return B(t).add(this._getMapPanePos())},"layerPointToContainerPoint"),containerPointToLatLng:/* @__PURE__ */n(function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},"containerPointToLatLng"),latLngToContainerPoint:/* @__PURE__ */n(function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},"latLngToContainerPoint"),mouseEventToContainerPoint:/* @__PURE__ */n(function(t){return ti(t,this._container)},"mouseEventToContainerPoint"),mouseEventToLayerPoint:/* @__PURE__ */n(function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},"mouseEventToLayerPoint"),mouseEventToLatLng:/* @__PURE__ */n(function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},"mouseEventToLatLng"),_initContainer:/* @__PURE__ */n(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=a(e)},"_initContainer"),_initLayout:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},"_moveStart"),_move:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t&&this.fire("zoomend"),this.fire("moveend")},"_moveEnd"),_stop:/* @__PURE__ */n(function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},"_stop"),_rawPanBy:/* @__PURE__ */n(function(t){Oe(this._mapPane,this._getMapPanePos().subtract(t))},"_rawPanBy"),_getZoomSpan:/* @__PURE__ */n(function(){return this.getMaxZoom()-this.getMinZoom()},"_getZoomSpan"),_panInsideMaxBounds:/* @__PURE__ */n(function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},"_panInsideMaxBounds"),_checkIfLoaded:/* @__PURE__ */n(function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},"_checkIfLoaded"),_initEvents:/* @__PURE__ */n(function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Fe: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:/* @__PURE__ */n(function(){E(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},"_onResize"),_onScroll:/* @__PURE__ */n(function(){this._container.scrollTop=0,this._container.scrollLeft=0},"_onScroll"),_onMoveEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(var i,o=[],n="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[a(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!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||r||n||!this.listens(e,!0)||(o=[this]),o},"_findEventTargets"),_isClickDisabled:/* @__PURE__ */n(function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},"_isClickDisabled"),_handleDOMEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},"_draggableMoved"),_clearHandlers:/* @__PURE__ */n(function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},"_clearHandlers"),whenReady:/* @__PURE__ */n(function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},"whenReady"),_getMapPanePos:/* @__PURE__ */n(function(){return ze(this._mapPane)||new I(0,0)},"_getMapPanePos"),_moved:/* @__PURE__ */n(function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},"_moved"),_getTopLeftPoint:/* @__PURE__ */n(function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},"_getTopLeftPoint"),_getNewPixelOrigin:/* @__PURE__ */n(function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},"_getNewPixelOrigin"),_latLngToNewLayerPoint:/* @__PURE__ */n(function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},"_latLngToNewLayerPoint"),_latLngBoundsToNewLayerBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},"_getCenterLayerPoint"),_getCenterOffset:/* @__PURE__ */n(function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},"_getCenterOffset"),_limitCenter:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.fire("move")},"_onPanTransitionStep"),_onPanTransitionEnd:/* @__PURE__ */n(function(){Me(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},"_onPanTransitionEnd"),_tryAnimatedPan:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ye(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},"_destroyAnimProxy"),_animMoveEnd:/* @__PURE__ */n(function(){var t=this.getCenter(),e=this.getZoom();Se(this._proxy,this.project(t,e),this.getZoomScale(e,1))},"_animMoveEnd"),_catchTransitionEnd:/* @__PURE__ */n(function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},"_catchTransitionEnd"),_nothingToAnimate:/* @__PURE__ */n(function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},"_nothingToAnimate"),_tryAnimatedZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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(s(this._onZoomTransitionEnd,this),250))},"_animateZoom"),_onZoomTransitionEnd:/* @__PURE__ */n(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)}n(ai,"createMap");var li=S.extend({options:{position:"topright"},initialize:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),getPosition:/* @__PURE__ */n(function(){return this.options.position},"getPosition"),setPosition:/* @__PURE__ */n(function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},"setPosition"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),addTo:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()},"_refocusOnMap")}),hi=/* @__PURE__ */n(function(t){return new li(t)},"control");ri.include({addControl:/* @__PURE__ */n(function(t){return t.addTo(this),this},"addControl"),removeControl:/* @__PURE__ */n(function(t){return t.remove(),this},"removeControl"),_initControlPos:/* @__PURE__ */n(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)}n(o,"createCorner"),o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},"_initControlPos"),_clearControlPos:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i,o){return i<o?-1:o<i?1:0},"sortFunction")},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return li.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},"addTo"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._addLayer(t,e),this._map?this._update():this},"addBaseLayer"),addOverlay:/* @__PURE__ */n(function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},"addOverlay"),removeLayer:/* @__PURE__ */n(function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},"removeLayer"),expand:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return Me(this._container,"leaflet-control-layers-expanded"),this},"collapse"),_initLayout:/* @__PURE__ */n(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 s=this._layersLink=ge("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),He(s,{keydown:/* @__PURE__ */n(function(t){13===t.keyCode&&this._expandSafely()},"keydown"),click:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},"_getLayer"),_addLayer:/* @__PURE__ */n(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(s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},"_onLayerChange"),_createRadioElement:/* @__PURE__ */n(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:/* @__PURE__ */n(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_"+a(this),o),this._layerControlInputs.push(e),e.layerId=a(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._map&&!this.options.collapsed&&this.expand(),this},"_expandIfNotCollapsed"),_expandSafely:/* @__PURE__ */n(function(){var t=this._section;this._preventClick=!0,He(t,"click",Xe),this.expand();var e=this;setTimeout(function(){Fe(t,"click",Xe),e._preventClick=!1})},"_expandSafely")}),ci=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},"onRemove"),disable:/* @__PURE__ */n(function(){return this._disabled=!0,this._updateDisabled(),this},"disable"),enable:/* @__PURE__ */n(function(){return this._disabled=!1,this._updateDisabled(),this},"enable"),_zoomIn:/* @__PURE__ */n(function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomIn"),_zoomOut:/* @__PURE__ */n(function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomOut"),_createButton:/* @__PURE__ */n(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:/* @__PURE__ */n(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=/* @__PURE__ */n(function(t){return new pi(t)},"zoom"),_i=li.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},"onRemove"),_addScales:/* @__PURE__ */n(function(t,e,i){t.metric&&(this._mScale=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},"_addScales"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},"_updateScales"),_updateMetric:/* @__PURE__ */n(function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},"_updateMetric"),_updateImperial:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},"_updateScale"),_getRoundNum:/* @__PURE__ */n(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=/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){_(this,t),this._attributions={}},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off("layeradd",this._addAttribution,this)},"onRemove"),_addAttribution:/* @__PURE__ */n(function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},"_addAttribution"),setPrefix:/* @__PURE__ */n(function(t){return this.options.prefix=t,this._update(),this},"setPrefix"),addAttribution:/* @__PURE__ */n(function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},"addAttribution"),removeAttribution:/* @__PURE__ */n(function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},"removeAttribution"),_update:/* @__PURE__ */n(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=/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map=t},"initialize"),enable:/* @__PURE__ */n(function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},"enable"),disable:/* @__PURE__ */n(function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},"disable"),enabled:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i,o){_(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},"initialize"),enable:/* @__PURE__ */n(function(){this._enabled||(He(this._dragStartTarget,wi,this._onDown,this),this._enabled=!0)},"enable"),disable:/* @__PURE__ */n(function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Fe(this._dragStartTarget,wi,this._onDown,this),this._enabled=!1,this._moved=!1)},"disable"),_onDown:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Oe(this._element,this._newPos),this.fire("drag",t)},"_updatePosition"),_onUp:/* @__PURE__ */n(function(){this._enabled&&this.finishDrag()},"_onUp"),finishDrag:/* @__PURE__ */n(function(t){Me(document.body,"leaflet-dragging"),this._lastTarget&&(Me(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Fe(document,"mousemove touchmove",this._onMove,this),Fe(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])}n(xi,"clipPolygon"),n(Mi,"polygonCenter"),n(Ci,"centroid");var Pi,ki={__proto__:null,clipPolygon:xi,polygonCenter:Mi,centroid:Ci};function Ei(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Oi(t=Di(t,i),i)}function Ti(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])}n(Ei,"simplify"),n(Ti,"pointToSegmentDistance"),n(Si,"closestPointOnSegment"),n(Oi,"_simplifyDP"),n(zi,"_simplifyDPStep"),n(Di,"_reducePoints"),n(Ii,"clipSegment"),n(Ai,"_getEdgeIntersection"),n(Bi,"_getBitCode"),n(Ri,"_sqDist"),n(Zi,"_sqClosestPointOnSegment"),n(Ni,"isFlat"),n(ji,"_flat"),n(Hi,"polylineCenter");var Gi={__proto__:null,simplify:Ei,pointToSegmentDistance:Ti,closestPointOnSegment:Si,clipSegment:Ii,_getEdgeIntersection:Ai,_getBitCode:Bi,_sqClosestPointOnSegment:Zi,isFlat:Ni,_flat:ji,polylineCenter:Hi},Fi={project:/* @__PURE__ */n(function(t){return new I(t.lng,t.lat)},"project"),unproject:/* @__PURE__ */n(function(t){return new H(t.y,t.x)},"unproject"),bounds:new R([-180,-90],[180,90])},Ui={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:/* @__PURE__ */n(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:/* @__PURE__ */n(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:Fi,Mercator:Ui,SphericalMercator:q},Vi=i({},W,{code:"EPSG:3395",projection:Ui,transformation:function(){var t=.5/(Math.PI*Ui.R);return $(t,.5,-t,.5)}()}),qi=i({},W,{code:"EPSG:4326",projection:Fi,transformation:$(1/180,1,-1/180,.5)}),Yi=i({},U,{projection:Fi,transformation:$(1,0,-1,0),scale:/* @__PURE__ */n(function(t){return Math.pow(2,t)},"scale"),zoom:/* @__PURE__ */n(function(t){return Math.log(t)/Math.LN2},"zoom"),distance:/* @__PURE__ */n(function(t,e){var i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},"distance"),infinite:!0});U.Earth=W,U.EPSG3395=Vi,U.EPSG3857=X,U.EPSG900913=J,U.EPSG4326=qi,U.Simple=Yi;var $i=D.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:/* @__PURE__ */n(function(t){return t.addLayer(this),this},"addTo"),remove:/* @__PURE__ */n(function(){return this.removeFrom(this._map||this._mapToAdd)},"remove"),removeFrom:/* @__PURE__ */n(function(t){return t&&t.removeLayer(this),this},"removeFrom"),getPane:/* @__PURE__ */n(function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},"getPane"),addInteractiveTarget:/* @__PURE__ */n(function(t){return this._map._targets[a(t)]=this,this},"addInteractiveTarget"),removeInteractiveTarget:/* @__PURE__ */n(function(t){return delete this._map._targets[a(t)],this},"removeInteractiveTarget"),getAttribution:/* @__PURE__ */n(function(){return this.options.attribution},"getAttribution"),_layerAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(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:/* @__PURE__ */n(function(t){var e=a(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:/* @__PURE__ */n(function(t){return a(t)in this._layers},"hasLayer"),eachLayer:/* @__PURE__ */n(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),_addLayers:/* @__PURE__ */n(function(t){for(var e=0,i=(t=t?y(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},"_addLayers"),_addZoomLimit:/* @__PURE__ */n(function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},"_addZoomLimit"),_removeZoomLimit:/* @__PURE__ */n(function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},"_removeZoomLimit"),_updateZoomLevels:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},"addLayer"),removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},"hasLayer"),clearLayers:/* @__PURE__ */n(function(){return this.eachLayer(this.removeLayer,this)},"clearLayers"),invoke:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this.eachLayer(t.addLayer,t)},"onAdd"),onRemove:/* @__PURE__ */n(function(t){this.eachLayer(t.removeLayer,t)},"onRemove"),eachLayer:/* @__PURE__ */n(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),getLayer:/* @__PURE__ */n(function(t){return this._layers[t]},"getLayer"),getLayers:/* @__PURE__ */n(function(){var t=[];return this.eachLayer(t.push,t),t},"getLayers"),setZIndex:/* @__PURE__ */n(function(t){return this.invoke("setZIndex",t)},"setZIndex"),getLayerId:/* @__PURE__ */n(function(t){return a(t)},"getLayerId")}),Xi=/* @__PURE__ */n(function(t,e){return new Ki(t,e)},"layerGroup"),Ji=Ki.extend({addLayer:/* @__PURE__ */n(function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},"addLayer"),removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.invoke("setStyle",t)},"setStyle"),bringToFront:/* @__PURE__ */n(function(){return this.invoke("bringToFront")},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this.invoke("bringToBack")},"bringToBack"),getBounds:/* @__PURE__ */n(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=/* @__PURE__ */n(function(t,e){return new Ji(t,e)},"featureGroup"),to=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),createIcon:/* @__PURE__ */n(function(t){return this._createIcon("icon",t)},"createIcon"),createShadow:/* @__PURE__ */n(function(t){return this._createIcon("shadow",t)},"createShadow"),_createIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return(e=e||document.createElement("img")).src=t,e},"_createImg"),_getIconUrl:/* @__PURE__ */n(function(t){return jt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]},"_getIconUrl")});function eo(t){return new to(t)}n(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:/* @__PURE__ */n(function(t){return"string"!=typeof io.imagePath&&(io.imagePath=this._detectIconPath()),(this.options.imagePath||io.imagePath)+to.prototype._getIconUrl.call(this,t)},"_getIconUrl"),_stripUrl:/* @__PURE__ */n(function(t){var e=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._marker=t},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moved},"moved"),_adjustPan:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},"_onDragStart"),_onPreDrag:/* @__PURE__ */n(function(t){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},"_onPreDrag"),_onDrag:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){E(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:/* @__PURE__ */n(function(t,e){_(this,e),this._latlng=G(t)},"initialize"),onAdd:/* @__PURE__ */n(function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},"onAdd"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{zoom:this.update,viewreset:this.update}},"getEvents"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setLatLng:/* @__PURE__ */n(function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),setZIndexOffset:/* @__PURE__ */n(function(t){return this.options.zIndexOffset=t,this.update()},"setZIndexOffset"),getIcon:/* @__PURE__ */n(function(){return this.options.icon},"getIcon"),setIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._icon},"getElement"),update:/* @__PURE__ */n(function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},"update"),_initIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Fe(this._icon,"focus",this._panOnFocus,this),ye(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},"_removeIcon"),_removeShadow:/* @__PURE__ */n(function(){this._shadow&&ye(this._shadow),this._shadow=null},"_removeShadow"),_setPos:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},"_updateZIndex"),_animateZoom:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},"_animateZoom"),_initInteraction:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},"setOpacity"),_updateOpacity:/* @__PURE__ */n(function(){var t=this.options.opacity;this._icon&&ke(this._icon,t),this._shadow&&ke(this._shadow,t)},"_updateOpacity"),_bringToFront:/* @__PURE__ */n(function(){this._updateZIndex(this.options.riseOffset)},"_bringToFront"),_resetZIndex:/* @__PURE__ */n(function(){this._updateZIndex(0)},"_resetZIndex"),_panOnFocus:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.options.icon.options.popupAnchor},"_getPopupAnchor"),_getTooltipAnchor:/* @__PURE__ */n(function(){return this.options.icon.options.tooltipAnchor},"_getTooltipAnchor")});function so(t,e){return new no(t,e)}n(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:/* @__PURE__ */n(function(t){this._renderer=t.getRenderer(this)},"beforeAdd"),onAdd:/* @__PURE__ */n(function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},"onAdd"),onRemove:/* @__PURE__ */n(function(){this._renderer._removePath(this)},"onRemove"),redraw:/* @__PURE__ */n(function(){return this._map&&this._renderer._updatePath(this),this},"redraw"),setStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._renderer&&this._renderer._bringToFront(this),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._renderer&&this._renderer._bringToBack(this),this},"bringToBack"),getElement:/* @__PURE__ */n(function(){return this._path},"getElement"),_reset:/* @__PURE__ */n(function(){this._project(),this._update()},"_reset"),_clickTolerance:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){_(this,e),this._latlng=G(t),this._radius=this.options.radius},"initialize"),setLatLng:/* @__PURE__ */n(function(t){var e=this._latlng;return this._latlng=G(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setRadius:/* @__PURE__ */n(function(t){return this.options.radius=this._radius=t,this.redraw()},"setRadius"),getRadius:/* @__PURE__ */n(function(){return this._radius},"getRadius"),setStyle:/* @__PURE__ */n(function(t){var e=t&&t.radius||this._radius;return ro.prototype.setStyle.call(this,t),this.setRadius(e),this},"setStyle"),_project:/* @__PURE__ */n(function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},"_project"),_updateBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&this._updatePath()},"_update"),_updatePath:/* @__PURE__ */n(function(){this._renderer._updateCircle(this)},"_updatePath"),_empty:/* @__PURE__ */n(function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},"_empty"),_containsPoint:/* @__PURE__ */n(function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},"_containsPoint")});function lo(t,e){return new ao(t,e)}n(lo,"circleMarker");var ho=ao.extend({initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._mRadius=t,this.redraw()},"setRadius"),getRadius:/* @__PURE__ */n(function(){return this._mRadius},"getRadius"),getBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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)}n(uo,"circle");var co=ro.extend({options:{smoothFactor:1,noClip:!1},initialize:/* @__PURE__ */n(function(t,e){_(this,e),this._setLatLngs(t)},"initialize"),getLatLngs:/* @__PURE__ */n(function(){return this._latlngs},"getLatLngs"),setLatLngs:/* @__PURE__ */n(function(t){return this._setLatLngs(t),this.redraw()},"setLatLngs"),isEmpty:/* @__PURE__ */n(function(){return!this._latlngs.length},"isEmpty"),closestLayerPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._bounds},"getBounds"),addLatLng:/* @__PURE__ */n(function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},"addLatLng"),_setLatLngs:/* @__PURE__ */n(function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},"_setLatLngs"),_defaultShape:/* @__PURE__ */n(function(){return Ni(this._latlngs)?this._latlngs:this._latlngs[0]},"_defaultShape"),_convertLatLngs:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=Ei(t[i],e)},"_simplifyPoints"),_update:/* @__PURE__ */n(function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},"_update"),_updatePath:/* @__PURE__ */n(function(){this._renderer._updatePoly(this)},"_updatePath"),_containsPoint:/* @__PURE__ */n(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)&&Ti(t,a[n],a[o])<=l)return!0;return!1},"_containsPoint")});function po(t,e){return new co(t,e)}n(po,"polyline"),co._flat=ji;var _o=co.extend({options:{fill:!0},isEmpty:/* @__PURE__ */n(function(){return!this._latlngs.length||!this._latlngs[0].length},"isEmpty"),getCenter:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){co.prototype._setLatLngs.call(this,t),Ni(this._latlngs)&&(this._latlngs=[this._latlngs])},"_setLatLngs"),_defaultShape:/* @__PURE__ */n(function(){return Ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},"_defaultShape"),_clipPoints:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._renderer._updatePoly(this,!0)},"_updatePath"),_containsPoint:/* @__PURE__ */n(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)}n(fo,"polygon");var mo=Ji.extend({initialize:/* @__PURE__ */n(function(t,e){_(this,e),this._layers={},t&&this.addData(t)},"initialize"),addData:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},"setStyle"),_setLayerStyle:/* @__PURE__ */n(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?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(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}}n(go,"geometryToLayer"),n(yo,"_pointToLayer"),n(vo,"coordsToLatLng"),n(Lo,"coordsToLatLngs"),n(wo,"latLngToCoords"),n(bo,"latLngsToCoords"),n(xo,"getFeature"),n(Mo,"asFeature");var Co={toGeoJSON:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),xo(this,{type:"MultiPoint",coordinates:e})},"toMultiPoint"),toGeoJSON:/* @__PURE__ */n(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")}),n(Po,"geoJSON");var ko=Po,Eo=$i.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:/* @__PURE__ */n(function(t,e,i){this._url=t,this._bounds=j(e),_(this,i)},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ye(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},"onRemove"),setOpacity:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},"setOpacity"),setStyle:/* @__PURE__ */n(function(t){return t.opacity&&this.setOpacity(t.opacity),this},"setStyle"),bringToFront:/* @__PURE__ */n(function(){return this._map&&Le(this._image),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&we(this._image),this},"bringToBack"),setUrl:/* @__PURE__ */n(function(t){return this._url=t,this._image&&(this._image.src=t),this},"setUrl"),setBounds:/* @__PURE__ */n(function(t){return this._bounds=j(t),this._map&&this._reset(),this},"setBounds"),getEvents:/* @__PURE__ */n(function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),setZIndex:/* @__PURE__ */n(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),getBounds:/* @__PURE__ */n(function(){return this._bounds},"getBounds"),getElement:/* @__PURE__ */n(function(){return this._image},"getElement"),_initImage:/* @__PURE__ */n(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=u,e.onmousemove=u,e.onload=s(this.fire,this,"load"),e.onerror=s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ke(this._image,this.options.opacity)},"_updateOpacity"),_updateZIndex:/* @__PURE__ */n(function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},"_updateZIndex"),_overlayOnError:/* @__PURE__ */n(function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},"_overlayOnError"),getCenter:/* @__PURE__ */n(function(){return this._bounds.getCenter()},"getCenter")}),To=/* @__PURE__ */n(function(t,e,i){return new Eo(t,e,i)},"imageOverlay"),So=Eo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:/* @__PURE__ */n(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=u,e.onmousemove=u,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],n=0;n<i.length;n++)o.push(i[n].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)}n(Oo,"videoOverlay");var zo=Eo.extend({_initImage:/* @__PURE__ */n(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=u,t.onmousemove=u},"_initImage")});function Do(t,e,i){return new zo(t,e,i)}n(Do,"svgOverlay");var Io=$i.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},"openOn"),close:/* @__PURE__ */n(function(){return this._map&&this._map.removeLayer(this),this},"close"),toggle:/* @__PURE__ */n(function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},"toggle"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t._fadeAnimated?(ke(this._container,0),this._removeTimeout=setTimeout(s(ye,void 0,this._container),200)):ye(this._container),this.options.interactive&&(Me(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},"onRemove"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setLatLng:/* @__PURE__ */n(function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},"setLatLng"),getContent:/* @__PURE__ */n(function(){return this._content},"getContent"),setContent:/* @__PURE__ */n(function(t){return this._content=t,this.update(),this},"setContent"),getElement:/* @__PURE__ */n(function(){return this._container},"getElement"),update:/* @__PURE__ */n(function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},"update"),getEvents:/* @__PURE__ */n(function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),isOpen:/* @__PURE__ */n(function(){return!!this._map&&this._map.hasLayer(this)},"isOpen"),bringToFront:/* @__PURE__ */n(function(){return this._map&&Le(this._container),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&we(this._container),this},"bringToBack"),_prepareOpen:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return[0,0]},"_getAnchor")});ri.include({_initOverlay:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Oe(this._container,e.add(i))},"_animateZoom"),_adjustPan:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])},"_getAnchor")}),Bo=/* @__PURE__ */n(function(t,e){return new Ao(t,e)},"popup");ri.mergeOptions({closePopupOnClick:!0}),ri.include({openPopup:/* @__PURE__ */n(function(t,e,i){return this._initOverlay(Ao,t,e,i).openOn(this),this},"openPopup"),closePopup:/* @__PURE__ */n(function(t){return(t=arguments.length?t:this._popup)&&t.close(),this},"closePopup")}),$i.include({bindPopup:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._popup&&this._popup.close(),this},"closePopup"),togglePopup:/* @__PURE__ */n(function(){return this._popup&&this._popup.toggle(this),this},"togglePopup"),isPopupOpen:/* @__PURE__ */n(function(){return!!this._popup&&this._popup.isOpen()},"isPopupOpen"),setPopupContent:/* @__PURE__ */n(function(t){return this._popup&&this._popup.setContent(t),this},"setPopupContent"),getPopup:/* @__PURE__ */n(function(){return this._popup},"getPopup"),_openPopup:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._popup.setLatLng(t.latlng)},"_movePopup"),_onKeyPress:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=Io.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},"getEvents"),_initLayout:/* @__PURE__ */n(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-"+a(this))},"_initLayout"),_updateLayout:/* @__PURE__ */n(function(){},"_updateLayout"),_adjustPan:/* @__PURE__ */n(function(){},"_adjustPan"),_setPosition:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},"_updatePosition"),setOpacity:/* @__PURE__ */n(function(t){this.options.opacity=t,this._container&&ke(this._container,t)},"setOpacity"),_animateZoom:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},"_animateZoom"),_getAnchor:/* @__PURE__ */n(function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])},"_getAnchor")}),Zo=/* @__PURE__ */n(function(t,e){return new Ro(t,e)},"tooltip");ri.include({openTooltip:/* @__PURE__ */n(function(t,e,i){return this._initOverlay(Ro,t,e,i).openOn(this),this},"openTooltip"),closeTooltip:/* @__PURE__ */n(function(t){return t.close(),this},"closeTooltip")}),$i.include({bindTooltip:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},"unbindTooltip"),_initTooltipInteractions:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._tooltip)return this._tooltip.close()},"closeTooltip"),toggleTooltip:/* @__PURE__ */n(function(){return this._tooltip&&this._tooltip.toggle(this),this},"toggleTooltip"),isTooltipOpen:/* @__PURE__ */n(function(){return this._tooltip.isOpen()},"isTooltipOpen"),setTooltipContent:/* @__PURE__ */n(function(t){return this._tooltip&&this._tooltip.setContent(t),this},"setTooltipContent"),getTooltip:/* @__PURE__ */n(function(){return this._tooltip},"getTooltip"),_addFocusListeners:/* @__PURE__ */n(function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},"_addFocusListeners"),_addFocusListenersOnLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},"_setAriaDescribedByOnLayer"),_openTooltip:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return null},"createShadow")});function jo(t){return new No(t)}n(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:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),onAdd:/* @__PURE__ */n(function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},"onAdd"),beforeAdd:/* @__PURE__ */n(function(t){t._addZoomLimit(this)},"beforeAdd"),onRemove:/* @__PURE__ */n(function(t){this._removeAllTiles(),ye(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},"onRemove"),bringToFront:/* @__PURE__ */n(function(){return this._map&&(Le(this._container),this._setAutoZIndex(Math.max)),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&(we(this._container),this._setAutoZIndex(Math.min)),this},"bringToBack"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),setOpacity:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._updateOpacity(),this},"setOpacity"),setZIndex:/* @__PURE__ */n(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),isLoading:/* @__PURE__ */n(function(){return this._loading},"isLoading"),redraw:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=l(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),createTile:/* @__PURE__ */n(function(){return document.createElement("div")},"createTile"),getTileSize:/* @__PURE__ */n(function(){var t=this.options.tileSize;return t instanceof I?t:new I(t,t)},"getTileSize"),_updateZIndex:/* @__PURE__ */n(function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},"_updateZIndex"),_setAutoZIndex:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._map&&!jt.ielt9){ke(this._container,this.options.opacity);var t=+/* @__PURE__ */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&&(E(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},"_updateOpacity"),_onOpaqueTile:u,_initContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(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()),u(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},"_updateLevels"),_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},"_removeTilesAtZoom"),_removeAllTiles:/* @__PURE__ */n(function(){for(var t in this._tiles)this._removeTile(t)},"_removeAllTiles"),_invalidateAll:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},"_resetView"),_animateZoom:/* @__PURE__ */n(function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},"_animateZoom"),_clampZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},"_setZoomTransforms"),_setZoomTransform:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&!this._map._animatingZoom&&this._update()},"_onMoveEnd"),_getTiledPixelBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},"_keyToBounds"),_tileCoordsToNwSe:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t.x+":"+t.y+":"+t.z},"_tileCoordsToKey"),_keyToTileCoords:/* @__PURE__ */n(function(t){var e=t.split(":"),i=new I(+e[0],+e[1]);return i.z=+e[2],i},"_keyToTileCoords"),_removeTile:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){xe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,jt.ielt9&&this.options.opacity<1&&ke(t,this.options.opacity)},"_initTile"),_addTile:/* @__PURE__ */n(function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&k(s(this._tileReady,this,t,null,n)),Oe(n,i),this._tiles[o]={el:n,coords:t,current:!0},e.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},"_addTile"),_tileReady:/* @__PURE__ */n(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=+/* @__PURE__ */new Date,this._map._fadeAnimated?(ke(i.el,0),E(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(s(this._pruneTiles,this),250)))},"_tileReady"),_getTilePos:/* @__PURE__ */n(function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},"_getTilePos"),_wrapCoords:/* @__PURE__ */n(function(t){var e=new I(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},"_wrapCoords"),_pxBoundsToTileRange:/* @__PURE__ */n(function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},"_pxBoundsToTileRange"),_noTilesToLoad:/* @__PURE__ */n(function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0},"_noTilesToLoad")});function Go(t){return new Ho(t)}n(Go,"gridLayer");var Fo=Ho.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},"setUrl"),createTile:/* @__PURE__ */n(function(t,e){var i=document.createElement("img");return He(i,"load",s(this._tileOnLoad,this,e,i)),He(i,"error",s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){jt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},"_tileOnLoad"),_tileOnError:/* @__PURE__ */n(function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},"_tileOnError"),_onTileRemove:/* @__PURE__ */n(function(t){t.tile.onload=null},"_onTileRemove"),_getZoomForUrl:/* @__PURE__ */n(function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},"_getZoomForUrl"),_getSubdomain:/* @__PURE__ */n(function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},"_getSubdomain"),_abortLoading:/* @__PURE__ */n(function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,!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:/* @__PURE__ */n(function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",w),Ho.prototype._removeTile.call(this,t)},"_removeTile"),_tileReady:/* @__PURE__ */n(function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==w))return Ho.prototype._tileReady.call(this,t,e,i)},"_tileReady")});function Uo(t,e){return new Fo(t,e)}n(Uo,"tileLayer");var Wo=Fo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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,Fo.prototype.onAdd.call(this,t)},"onAdd"),getTileUrl:/* @__PURE__ */n(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=Fo.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},"getTileUrl"),setParams:/* @__PURE__ */n(function(t,e){return i(this.wmsParams,t),e||this.redraw(),this},"setParams")});function Vo(t,e){return new Wo(t,e)}n(Vo,"tileLayerWMS"),Fo.WMS=Wo,Uo.wms=Vo;var qo=$i.extend({options:{padding:.1},initialize:/* @__PURE__ */n(function(t){_(this,t),a(this),this._layers=this._layers||{}},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.off("update",this._updatePaths,this),this._destroyContainer()},"onRemove"),getEvents:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._updateTransform(t.center,t.zoom)},"_onAnimZoom"),_onZoom:/* @__PURE__ */n(function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},"_onZoom"),_updateTransform:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},"_reset"),_onZoomEnd:/* @__PURE__ */n(function(){for(var t in this._layers)this._layers[t]._project()},"_onZoomEnd"),_updatePaths:/* @__PURE__ */n(function(){for(var t in this._layers)this._layers[t]._update()},"_updatePaths"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=qo.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},"getEvents"),_onViewPreReset:/* @__PURE__ */n(function(){this._postponeUpdatePaths=!0},"_onViewPreReset"),onAdd:/* @__PURE__ */n(function(){qo.prototype.onAdd.call(this),this._draw()},"onAdd"),_initContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){E(this._redrawRequest),delete this._ctx,ye(this._container),Fe(this._container),delete this._container},"_destroyContainer"),_updatePaths:/* @__PURE__ */n(function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},"_updatePaths"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){qo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},"_reset"),_initPath:/* @__PURE__ */n(function(t){this._updateDashArray(t),this._layers[a(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:/* @__PURE__ */n(function(t){this._requestRedraw(t)},"_addPath"),_removePath:/* @__PURE__ */n(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[a(t)],this._requestRedraw(t)},"_removePath"),_updatePath:/* @__PURE__ */n(function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},"_updatePath"),_updateStyle:/* @__PURE__ */n(function(t){this._updateDashArray(t),this._requestRedraw(t)},"_updateStyle"),_updateDashArray:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},"_requestRedraw"),_extendRedrawBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},"_redraw"),_clear:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},"_onMouseMove"),_handleMouseOut:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){if(!this._mouseHoverThrottled){for(var i,o,n=this._drawFirst;n;n=n.next)(i=n.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(s(function(){this._mouseHoverThrottled=!1},this),32)}},"_handleMouseHover"),_fireEvent:/* @__PURE__ */n(function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},"_fireEvent"),_bringToFront:/* @__PURE__ */n(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:/* @__PURE__ */n(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}n($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:/* @__PURE__ */n(function(){this._container=ge("div","leaflet-vml-container")},"_initContainer"),_update:/* @__PURE__ */n(function(){this._map._animatingZoom||(qo.prototype._update.call(this),this.fire("update"))},"_update"),_initPath:/* @__PURE__ */n(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[a(t)]=t},"_initPath"),_addPath:/* @__PURE__ */n(function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},"_addPath"),_removePath:/* @__PURE__ */n(function(t){var e=t._container;ye(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},"_removePath"),_updateStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){t._path.v=e},"_setPath"),_bringToFront:/* @__PURE__ */n(function(t){Le(t._container)},"_bringToFront"),_bringToBack:/* @__PURE__ */n(function(t){we(t._container)},"_bringToBack")},Jo=jt.vml?Ko:Q,Qo=qo.extend({_initContainer:/* @__PURE__ */n(function(){this._container=Jo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Jo("g"),this._container.appendChild(this._rootGroup)},"_initContainer"),_destroyContainer:/* @__PURE__ */n(function(){ye(this._container),Fe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},"_destroyContainer"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(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[a(t)]=t},"_initPath"),_addPath:/* @__PURE__ */n(function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},"_addPath"),_removePath:/* @__PURE__ */n(function(t){ye(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},"_removePath"),_updatePath:/* @__PURE__ */n(function(t){t._project(),t._update()},"_updatePath"),_updateStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._setPath(t,tt(t._parts,e))},"_updatePoly"),_updateCircle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){t._path.setAttribute("d",e)},"_setPath"),_bringToFront:/* @__PURE__ */n(function(t){Le(t._path)},"_bringToFront"),_bringToBack:/* @__PURE__ */n(function(t){we(t._path)},"_bringToBack")});function tn(t){return jt.svg||jt.vml?new Qo(t):null}jt.vml&&Qo.include(Xo),n(tn,"svg"),ri.include({getRenderer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.options.preferCanvas&&$o(t)||tn(t)},"_createRenderer")});var en=_o.extend({initialize:/* @__PURE__ */n(function(t,e){_o.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},"initialize"),setBounds:/* @__PURE__ */n(function(t){return this.setLatLngs(this._boundsToLatLngs(t))},"setBounds"),_boundsToLatLngs:/* @__PURE__ */n(function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]},"_boundsToLatLngs")});function on(t,e){return new en(t,e)}n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._container,"mousedown",this._onMouseDown,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._container,"mousedown",this._onMouseDown,this)},"removeHooks"),moved:/* @__PURE__ */n(function(){return this._moved},"moved"),_destroy:/* @__PURE__ */n(function(){ye(this._pane),delete this._pane},"_destroy"),_resetState:/* @__PURE__ */n(function(){this._resetStateTimeout=0,this._moved=!1},"_resetState"),_clearDeferredResetState:/* @__PURE__ */n(function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},"_clearDeferredResetState"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._moved&&(ye(this._box),Me(this._container,"leaflet-crosshair")),le(),Ae(),Fe(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},"_finish"),_onMouseUp:/* @__PURE__ */n(function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map.on("dblclick",this._onDoubleClick,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){this._map.off("dblclick",this._onDoubleClick,this)},"removeHooks"),_onDoubleClick:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){Me(this._map._container,"leaflet-grab"),Me(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},"removeHooks"),moved:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moved},"moved"),moving:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moving},"moving"),_onDragStart:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(this._map.options.inertia){var e=this._lastTime=+/* @__PURE__ */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:/* @__PURE__ */n(function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},"_prunePositions"),_onZoomEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return t-(t-e)*this._viscosity},"_viscousLimit"),_onPreDragLimit:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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(+/* @__PURE__ */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:/* @__PURE__ */n(function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._removeHooks(),Fe(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},"removeHooks"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._focused=!0,this._map.fire("focus")},"_onFocus"),_onBlur:/* @__PURE__ */n(function(){this._focused=!1,this._map.fire("blur")},"_onBlur"),_setPanDelta:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(document,"keydown",this._onKeyDown,this)},"_addHooks"),_removeHooks:/* @__PURE__ */n(function(){Fe(document,"keydown",this._onKeyDown,this)},"_removeHooks"),_onKeyDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._map._container,"wheel",this._onWheelScroll,this)},"removeHooks"),_onWheelScroll:/* @__PURE__ */n(function(t){var e=ii(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+/* @__PURE__ */new Date);var o=Math.max(i-(+/* @__PURE__ */new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),o),Je(t)},"_onWheelScroll"),_performZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._map._container,"touchstart",this._onDown,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._map._container,"touchstart",this._onDown,this)},"removeHooks"),_onDown:/* @__PURE__ */n(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(s(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:/* @__PURE__ */n(function t(){Fe(document,"touchend",Xe),Fe(document,"touchend touchcancel",t)},"cancelClickPrevent"),_cancel:/* @__PURE__ */n(function(){clearTimeout(this._holdTimeout),Fe(document,"touchend touchcancel contextmenu",this._cancel,this),Fe(document,"touchmove",this._onMove,this)},"_cancel"),_onMove:/* @__PURE__ */n(function(t){var e=t.touches[0];this._newPos=new I(e.clientX,e.clientY)},"_onMove"),_isTapValid:/* @__PURE__ */n(function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},"_isTapValid"),_simulateEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){xe(this._map._container,"leaflet-touch-zoom"),He(this._map._container,"touchstart",this._onTouchStart,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Me(this._map._container,"leaflet-touch-zoom"),Fe(this._map._container,"touchstart",this._onTouchStart,this)},"removeHooks"),_onTouchStart:/* @__PURE__ */n(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:/* @__PURE__ */n(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]),n=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(n,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&n<1||this._zoom>e.getMaxZoom()&&n>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===n)return}else{var r=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===n&&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),E(this._animRequest);var a=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=k(a,this,!0),Xe(t)}},"_onTouchMove"),_onTouchEnd:/* @__PURE__ */n(function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Fe(document,"touchmove",this._onTouchMove,this),Fe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1},"_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=U,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=Eo,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=Fo,t.Tooltip=Ro,t.Transformation=Y,t.Util=T,t.VideoOverlay=So,t.bind=s,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=To,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=a,t.svg=tn,t.svgOverlay=Do,t.tileLayer=Uo,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}(Ea.exports)),Ea.exports}n(Ta,"requireLeafletSrc");var Sa=Ta();const Oa=/* @__PURE__ */Or(Sa);!function(t,e){function i(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}var o;n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},"removeHooks"),setOptions:/* @__PURE__ */n(function(t){L.setOptions(this,t)},"setOptions"),_fireCreatedEvent:/* @__PURE__ */n(function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},"_fireCreatedEvent"),_cancelDrawing:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},"completeShape"),_finishShape:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return!0},"_shapeIsValid"),_onZoomEnd:/* @__PURE__ */n(function(){null!==this._markers&&this._updateGuide()},"_onZoomEnd"),_onMouseMove:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._mouseDownOrigin=L.point(t,e)},"_startPoint"),_onMouseUp:/* @__PURE__ */n(function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},"_onMouseUp"),_endPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},"_onMouseOut"),_calculateFinishDistance:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},"_updateTooltip"),_drawGuide:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},"_clearGuides"),_getTooltipText:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},"_clearHideErrorTimeout"),_disableNewMarkers:/* @__PURE__ */n(function(){this._disableMarkers=!0},"_disableNewMarkers"),_enableNewMarkers:/* @__PURE__ */n(function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},"_enableNewMarkers"),_cleanUpShape:/* @__PURE__ */n(function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},"_cleanUpShape"),_fireCreatedEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},"initialize"),_updateFinishHandler:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._markers.length>=3},"_shapeIsValid"),_vertexChanged:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{text:this._endLabelText}},"_getTooltipText"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},"_onMouseMove"),_onMouseUp:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},"disable"),_onMouseUp:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_getTooltipText:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},"_createMarker"),_onClick:/* @__PURE__ */n(function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},"_onClick"),_onTouch:/* @__PURE__ */n(function(t){this._onMouseMove(t),this._onClick()},"_onTouch"),_fireCreatedEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_createMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_onMouseMove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._marker=t,L.setOptions(this,e)},"initialize"),addHooks:/* @__PURE__ */n(function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"addHooks"),removeHooks:/* @__PURE__ */n(function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"removeHooks"),_onDragEnd:/* @__PURE__ */n(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onDragEnd"),_toggleMarkerHighlight:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},"_defaultShape"),_eachVertexHandler:/* @__PURE__ */n(function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},"_eachVertexHandler"),addHooks:/* @__PURE__ */n(function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},"addHooks"),removeHooks:/* @__PURE__ */n(function(){this._eachVertexHandler(function(t){t.removeHooks()})},"removeHooks"),updateMarkers:/* @__PURE__ */n(function(){this._eachVertexHandler(function(t){t.updateMarkers()})},"updateMarkers"),_initHandlers:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},"_defaultShape"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._poly.fire("editstart")},"_onMarkerDragStart"),_spliceLatLngs:/* @__PURE__ */n(function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},"_spliceLatLngs"),_removeMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},"_updateIndexes"),_createMiddleMarker:/* @__PURE__ */n(function(t,e){var i,o,s,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,o=/* @__PURE__ */n(function(){a.off("touchmove",o,this);var n=e._index;a._index=n,a.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(n,0,r),this._markers.splice(n,0,a),a.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},"o"),s=/* @__PURE__ */n(function(){a.off("dragstart",o,this),a.off("dragend",s,this),a.off("touchmove",o,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},"a"),i=/* @__PURE__ */n(function(){o.call(this),s.call(this),this._fireEdit()},"i"),a.on("click",i,this).on("dragstart",o,this).on("dragend",s,this).on("touchmove",o,this),this._markerGroup.addLayer(a)},"_createMiddleMarker"),_updatePrevNext:/* @__PURE__ */n(function(t,e){t&&(t._next=e),e&&(e._prev=t)},"_updatePrevNext"),_getMiddleLatLng:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:/* @__PURE__ */n(function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},"_initMarkers"),_createMoveMarker:/* @__PURE__ */n(function(){},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(function(){},"_createResizeMarker"),_createMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(0),this._shape.fire("editstart")},"_onMarkerDragStart"),_fireEdit:/* @__PURE__ */n(function(){this._shape.edited=!0,this._shape.fire("edit")},"_fireEdit"),_onMarkerDrag:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(1),this._fireEdit()},"_onMarkerDragEnd"),_onTouchStart:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},"_onTouchEnd"),_move:/* @__PURE__ */n(function(){},"_move"),_resize:/* @__PURE__ */n(function(){},"_resize")}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:/* @__PURE__ */n(function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},"_getCorners"),_toggleCornerMarkers:/* @__PURE__ */n(function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},"_toggleCornerMarkers"),_repositionCornerMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(function(){this._resizeMarkers=[]},"_createResizeMarker"),_move:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},"_createResizeMarker"),_getResizeMarkerPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},"_onTouchStart"),_onTouchEnd:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchend")},"_onTouchEnd"),_onTouchCancel:/* @__PURE__ */n(function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},"_onTouchCancel"),_onTouchLeave:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},"_onTouchLeave"),_onTouchMove:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},"_onTouchMove"),_detectIE:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},"_initInteraction"),_initInteractionLegacy:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)},"isVersion07x")}),L.Util.extend(L.LineUtil,{segmentsIntersect:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},"newLatLngIntersects"),newPointIntersects:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},"_tooFewPointsForIntersection"),_lineSegmentsIntersectsRange:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},"onRemove"),setDrawingOptions:/* @__PURE__ */n(function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},"setDrawingOptions"),_toolbarEnabled:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return null!==this._activeMode},"enabled"),disable:/* @__PURE__ */n(function(){this.enabled()&&this._activeMode.handler.disable()},"disable"),addToolbar:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},"_detectIOS"),_createButton:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},"_handlerDeactivated"),_createActions:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},"dispose"),updateContent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},"showAsError"),removeError:/* @__PURE__ */n(function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},"removeError"),_onMouseOut:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},"removeToolbar"),disable:/* @__PURE__ */n(function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},"disable"),_save:/* @__PURE__ */n(function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},"_save"),_clearAllLayers:/* @__PURE__ */n(function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},"_clearAllLayers"),_checkDisabled:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},"revertLayers"),save:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},"_getTooltipText"),_updateTooltip:/* @__PURE__ */n(function(){this._tooltip.updateContent(this._getTooltipText())},"_updateTooltip"),_revertLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_onMarkerDragEnd:/* @__PURE__ */n(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onMarkerDragEnd"),_onTouchMove:/* @__PURE__ */n(function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},"_onTouchMove"),_hasAvailableLayers:/* @__PURE__ */n(function(){return 0!==this._featureGroup.getLayers().length},"_hasAvailableLayers")}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},"revertLayers"),save:/* @__PURE__ */n(function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},"save"),removeAllLayers:/* @__PURE__ */n(function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},"removeAllLayers"),_enableLayerDelete:/* @__PURE__ */n(function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},"_enableLayerDelete"),_disableLayerDelete:/* @__PURE__ */n(function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},"_disableLayerDelete"),_removeLayer:/* @__PURE__ */n(function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},"_removeLayer"),_onMouseMove:/* @__PURE__ */n(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_hasAvailableLayers:/* @__PURE__ */n(function(){return 0!==this._deletableLayers.getLayers().length},"_hasAvailableLayers")})}(window,document);var za,Da={exports:{}};function Ia(){return za||(za=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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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=/* @__PURE__ */(new Date).getTime(),p=L.bind(function(){var d=/* @__PURE__ */(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(s&&h%200==0&&/* @__PURE__ */(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,/* @__PURE__ */(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},"getLayers"),getLayer:/* @__PURE__ */n(function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},"getLayer"),hasLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){var i=this._map;"function"!=typeof e&&(e=/* @__PURE__ */n(function(){},"callback"));var o=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},"getVisibleParent"),_arraySplice:/* @__PURE__ */n(function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},"_arraySplice"),_removeFromGridUnclustered:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.__dragStart=t.target._latlng},"_childMarkerDragStart"),_childMarkerMoved:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},"_moveChild"),_childMarkerDragEnd:/* @__PURE__ */n(function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},"_childMarkerDragEnd"),_removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},"_isOrIsParent"),fire:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},"listens"),_defaultIconCreateFunction:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},"_hideCoverage"),_unbindEvents:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},"_zoomEnd"),_moveEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,o=i;"function"!=typeof i&&(o=/* @__PURE__ */n(function(){return i},"radiusFn")),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var s=t;s>=e;s--)this._gridClusters[s]=new L.DistanceGrid(o(s)),this._gridUnclustered[s]=new L.DistanceGrid(o(s));this._topClusterLevel=new this._markerCluster(this,e-1)},"_generateInitialClusters"),_addLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},"_refreshClustersIcons"),_enqueue:/* @__PURE__ */n(function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},"_enqueue"),_processQueue:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},"_getExpandedVisibleBounds"),_checkBoundsMaxLat:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:/* @__PURE__ */n(function(){return 1},"getChildCount"),getAllChildMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){},"_animationStart"),_animationZoomIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._animationAddLayerNonAnimated(t,e)},"_animationAddLayer")},_withAnimation:{_animationStart:/* @__PURE__ */n(function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},"_animationStart"),_animationZoomIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},"_animationEnd"),_forceLayout:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._childCount},"getChildCount"),zoomToBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},"getBounds"),_updateIcon:/* @__PURE__ */n(function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},"_updateIcon"),createIcon:/* @__PURE__ */n(function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},"createIcon"),createShadow:/* @__PURE__ */n(function(){return this._iconObj.createShadow()},"createShadow"),_addChild:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},"_setClusterCenter"),_resetBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},"_addToMap"),_recursivelyAnimateChildrenIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},"_recursivelyBecomeVisible"),_recursivelyAddChildrenToMap:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},"_restorePosition"),_recursivelyRemoveChildrenFromMap:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount},"_isSingleParent")});L.Marker.include({clusterHide:/* @__PURE__ */n(function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},"clusterHide"),clusterShow:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this.removeObject(t),this.addObject(t,e)},"updateObject"),removeObject:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},"_getCoord"),_sqDist:/* @__PURE__ */n(function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o},"_sqDist")},L.QuickHull={getDistant:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},"unspiderfy"),_generatePointsCircle:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._noanimationUnspiderfy()},"_animationUnspiderfy")}),L.MarkerCluster.include({_animationSpiderfy:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._unspiderfy.apply(this,arguments)},"unspiderfy"),_spiderfierOnAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},"_unspiderfyZoomStart"),_unspiderfyZoomAnim:/* @__PURE__ */n(function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},"_unspiderfyZoomAnim"),_unspiderfyWrapper:/* @__PURE__ */n(function(){this._unspiderfy()},"_unspiderfyWrapper"),_unspiderfy:/* @__PURE__ */n(function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},"_unspiderfy"),_noanimationUnspiderfy:/* @__PURE__ */n(function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},"_noanimationUnspiderfy"),_unspiderfyLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},"_flagParentsIconsNeedUpdate"),_refreshSingleMarkerModeMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(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})}(Da.exports)),Da.exports}n(Ia,"requireLeaflet_markerclusterSrc"),Ia();const Aa=Symbol("newer"),Ba=Symbol("older"),Ra=class _Entry{key;value;constructor(t,e){this.key=t,this.value=e,this[Aa]=void 0,this[Ba]=void 0}};n(Ra,"Entry");let Za=Ra;const Na=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=/* @__PURE__ */new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}_markEntryAsUsed(t){t!==this.newest&&(t[Aa]&&(t===this.oldest&&(this.oldest=t[Aa]),t[Aa][Ba]=t[Ba]),t[Ba]&&(t[Ba][Aa]=t[Aa]),t[Aa]=void 0,t[Ba]=this.newest,this.newest&&(this.newest[Aa]=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 Za(n.value[0],n.value[1]);if(this._keymap.set(t.key,t),e?(e[Aa]=t,t[Ba]=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 Za(t,e)),this.newest?(this.newest[Aa]=i,i[Ba]=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[Aa]?(this.oldest=this.oldest[Aa],this.oldest[Ba]=void 0):(this.oldest=void 0,this.newest=void 0),t[Aa]=t[Ba]=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[Aa]&&e[Ba]?(e[Ba][Aa]=e[Aa],e[Aa][Ba]=e[Ba]):e[Aa]?(e[Aa][Ba]=void 0,this.oldest=e[Aa]):e[Ba]?(e[Ba][Aa]=void 0,this.newest=e[Ba]):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 Ga(this.oldest)}values(){return new Fa(this.oldest)}entries(){return this}[Symbol.iterator](){return new Ha(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[Aa]}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[Aa];return t}toString(){let t="",e=this.oldest;for(;e;)t+=String(e.key)+":"+e.value,e=e[Aa],e&&(t+=" < ");return t}};n(Na,"LRUMap");let ja=Na;function Ha(t){this.entry=t}function Ga(t){this.entry=t}function Fa(t){this.entry=t}function Ua(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)}n(Ha,"EntryIterator"),Ha.prototype[Symbol.iterator]=function(){return this},Ha.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},n(Ga,"KeyIterator"),Ga.prototype[Symbol.iterator]=function(){return this},Ga.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:t.key}):{done:!0,value:void 0}},n(Fa,"ValueIterator"),Fa.prototype[Symbol.iterator]=function(){return this},Fa.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:t.value}):{done:!0,value:void 0}},n(Ua,"waitForAPI"),L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:/* @__PURE__ */n(function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new ja(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},"initialize"),onAdd:/* @__PURE__ */n(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),Ua(()=>{this._map&&(this._initMutant(),google.maps.event.addListenerOnce(this._mutant,"idle",()=>{this._map&&(this._checkZoomLevels(),this._mutantIsReady=!0)}))})},"onAdd"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.whenReady(()=>{var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])}),this},"removeGoogleLayer"),_initMutantContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){const e=t.cloneNode(!0);return e.style.visibility="visible",e},"_clone"),_checkZoomLevels:/* @__PURE__ */n(function(){const t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},"_checkZoomLevels"),_setMaxNativeZoom:/* @__PURE__ */n(function(t){t!==this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},"_setMaxNativeZoom"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(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,Va={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]}},qa=Sa.Icon.extend({options:{icon:"leaf",iconSize:Va.iconSize.circle,iconAnchor:Va.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:Va.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:Va.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize(t){this.applyDefaults(t),this.options=t&&t.html?t:Sa.Util.setOptions(this,t)},applyDefaults(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=Va.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=Va.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=Va.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=Va.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=Sa.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=Sa.point(e.iconSize),o=Sa.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 Ya(t){return new qa(t)}n(Ya,"BeautifyIcon");const $a=class _LeafletLayer extends Sa.Layer{_rootGroup};n($a,"LeafletLayer");let Ka=$a;const Xa=class _D3SvgOverlay extends Ka{_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 Sa.LatLngBounds([-90,-180],[90,180]);const t=this.selection.node().getBBox();let e,i;try{e=this.projection.layerPointToLatLng(new Sa.Point(t.x,t.y+t.height))}catch(o){e=[-90,-180]}try{i=this.projection.layerPointToLatLng(new Sa.Point(t.x+t.width,t.y))}catch(o){i=[90,180]}return new Sa.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 e=this;return this._svg=Sa.svg(),t.addLayer(this._svg),this._rootGroup=u(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=Sa.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Sa.point(0,0),this._scale=1,this.projection={latLngToLayerPoint(t,i){i=e._undef(i)?e._zoom:i;return e.map.project(Sa.latLng(t),i)._subtract(e._pixelOrigin)},layerPointToLatLng(t,i){i=e._undef(i)?e._zoom:i;const o=Sa.point(t).add(e._pixelOrigin);return e.map.unproject(o,i)},unitsPerMeter:256*Math.pow(2,e._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:e.map,layer:e,scale:1},this.projection._projectPoint=function(t,i){const o=e.projection.latLngToLayerPoint(new Sa.LatLng(i,t));this.stream.point(o.x,o.y)},this.projection.pathFromGeojson=dn().projection(_n({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}};n(Xa,"D3SvgOverlay");let Ja=Xa;var Qa,tl={exports:{}};function el(){return Qa||(Qa=1,function(){function t(e){if(!(this instanceof t))return new t(e);this._canvas=e="string"==typeof e?document.getElementById(e):e,this._ctx=e.getContext("2d"),this._width=e.width,this._height=e.height,this._max=1,this._data=[]}tl.exports=t,n(t,"simpleheat"),t.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:/* @__PURE__ */n(function(t){return this._data=t,this},"data"),max:/* @__PURE__ */n(function(t){return this._max=t,this},"max"),add:/* @__PURE__ */n(function(t){return this._data.push(t),this},"add"),clear:/* @__PURE__ */n(function(){return this._data=[],this},"clear"),radius:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._width=this._canvas.width,this._height=this._canvas.height},"resize"),gradient:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor},"_createCanvas")}}()),tl.exports}n(el,"requireSimpleheat");var il=el();const ol=/* @__PURE__ */Or(il),nl=/* @__PURE__ */I({__proto__:null,default:ol},[il]),sl=window.simpleheat||nl&&ol||nl,rl=class _LeafletLayer2 extends Sa.Layer{};n(rl,"LeafletLayer2");let al=rl,ll=(n(i=class extends al{_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=Sa.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&&Sa.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=Sa.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=Sa.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&&Sa.Browser.any3d;Sa.DomUtil.addClass(t,"leaflet-zoom-"+(o?"animated":"hide")),this._heat=sl(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]);Sa.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 Sa.Bounds(Sa.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());Sa.DomUtil.setTransform?Sa.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[Sa.DomUtil.TRANSFORM]=Sa.DomUtil.getTranslateString(i)+" scale("+e+")"}},"HeatLayer"),i);const hl=Oa.MarkerClusterGroup,ul=class _TileLayer extends y{_layer=new Sa.FeatureGroup;_crs=Sa.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){}};n(ul,"TileLayer");let cl=ul;const pl=Bs("Albers").scale(.5),dl=Bs("AlbersUsaPr").scale(.5),_l={project(t){let e=dl([t.lng,t.lat]);return e||(e=pl([t.lng,t.lat])),new Sa.Point(e[0],e[1])},unproject(t){if(isNaN(t.x)||isNaN(t.y))return new Sa.LatLng(0,0);{const e=pl.invert([t.x,t.y]);return new Sa.LatLng(e[1],e[0])}}},fl=Sa.Util.extend({},Sa.CRS,{projection:_l,transformation:new Sa.Transformation(1,0,1,0),infinite:!0}),ml=class _AlbersLayer extends cl{_crs=fl;constructor(){super()}hasBounds(){return!0}getBounds(){return new Sa.LatLngBounds([20,-123],[49,-64])}};n(ml,"AlbersLayer");let gl=ml;gl.prototype._class+=" map_AlbersLayer";const yl=class _BlankLayer extends cl{constructor(){super()}};n(yl,"BlankLayer");let vl=yl;vl.prototype._class+=" map_BlankLayer";const Ll=class _GMapLayer extends cl{constructor(){super()}init(){return this._initPromise||(this._initPromise=Gr()),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()}))}};n(Ll,"GMapLayer");let wl=Ll;wl.prototype._class+=" map_GMapLayer",wl.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const bl=class _MapBoxLayer extends cl{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 Sa.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}))}};n(bl,"MapBoxLayer");let xl=bl;xl.prototype._class+=" map_MapBoxLayer";const Ml=class _OpenStreetLayer extends cl{constructor(){super()}attribution(){return""}getMaxZoom(){return 18}layerEnter(t){super.layerEnter(t),this.add(new Sa.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"}))}};n(Ml,"OpenStreetLayer");let Cl=Ml;Cl.prototype._class+=" map_MapBoxLayer";const Pl=class _Leaflet extends f{_leafletElement;_leafletMap;_iconBar=(new v).buttons([(new w).faChar("fa-plus").tooltip("Zoom in").on("click",()=>{this.zoomPlus()}),(new w).faChar("fa-minus").tooltip("Zoom out").on("click",()=>{this.zoomMinus()}),new b,(new w).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",()=>{this.zoomToFit()})]);_blankLayer=new vl;_albersLayer=new gl;_mapBoxLayer=new xl;_openStreetLayer=new Cl;_gmapLayer=new wl;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 Sa.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}};n(Pl,"Leaflet");let kl=Pl;kl.prototype._class+=" map_Leaflet",kl.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),kl.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")});const El=class _FeatureLayer extends kl{_layer;_selection;constructor(t=!1){super(),this._layer=t?new hl:new Sa.FeatureGroup,this._layer.__hpcc_layer=this,c.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,e){return void 0===e?u(this._layer.getPane()).style(t):(u(this._layer.getPane()).style(t,e),this)}propValue(t,e,i){return(t<0?i:e[t])||i}layerEnter(t){t.addLayer(this._layer);const e=u(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(e)}layerUpdate(t){}layerExit(t){this._layer.clearLayers(),t.removeLayer(this._layer)}zoomEnd(t){}moveEnd(t){}viewReset(t){}};n(El,"FeatureLayer");let Tl=El;Tl.prototype._class+=" map_FeatureLayer",Tl.prototype.mixin(c.SimpleSelectionMixin),Tl.prototype.publishReset(["layers"]);const Sl=class _ClusterLayer extends Tl{constructor(t=!0){super(t)}};n(Sl,"ClusterLayer");let Ol=Sl;Ol.prototype._class+=" map_ClusterLayer";const zl=class _D3SurfaceLayer extends Tl{_lfd3=(new Ja).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){}};n(zl,"D3SurfaceLayer");let Dl=zl;const Il=class _Circles extends Ol{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 Sa.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){}};n(Il,"Circles");let Al=Il;Al.prototype._class+=" map_Circles",Al.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("radius",50,"number","Radius (meters)"),Al.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Al.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Al.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Al.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const Bl=class _D3Circles extends Dl{layerUpdate(t,e){super.layerUpdate(t,e);const i=this._lfd3._rootGroup;e=e||this._lfd3.projection;const o=this.columns(),s=o.indexOf(this.latitudeColumn()),r=o.indexOf(this.longitudeColumn()),a=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());function h(t){return{lat:+t[s],lng:+t[r]}}n(h,"toLatLng");const u=i.selectAll("circle").data(this.data().filter(t=>!this.omitNullLatLong()||!!t[s]&&!!t[r]));u.enter().append("circle").merge(u).attr("cx",t=>e.latLngToLayerPoint(h(t)).x).attr("cy",t=>e.latLngToLayerPoint(h(t)).y).attr("r",Math.max(3/e.scale,this.radius()/e.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",t=>this.propValue(a,t,this.strokeColor())).attr("stroke-width",Math.max(1/e.scale,1/e.metresPerPixel)).style("fill",t=>this.propValue(l,t,this.fillColor())),u.exit().remove()}clickHandler(t,e){}};n(Bl,"D3Circles");let Rl=Bl;Rl.prototype._class+=" map_D3Circles",Rl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("radius",50,"number","Radius (meters)"),Rl.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Rl.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Rl.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Rl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const Zl=class _ClusterCircles extends Tl{_palette;createIcon(t,e,i){const o=x(e);return o.opacity=.5,new Sa.DivIcon({className:"cluster-circle",iconSize:new Sa.Point(40,40),html:`<div style='opacity:${this.opacity()};background-color:${o.toString()}'><div style='background-color:${e}'><span style='color:${p.textColor(e)}'>${i(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 e=this.cellFunc(this.latitudeColumn(),0),i=this.cellFunc(this.longitudeColumn(),0),o=/* @__PURE__ */n(t=>[+e(t),+i(t)],"latLongFunc"),s=this.cellFunc(this.weightColumn(),0),r=this.data(),a=M(r,s),l=this.weightFormat()?C(this.weightFormat()):t=>t;this.clear(),r.forEach(t=>{const e=new Sa.Marker(o(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){}};n(Zl,"ClusterCircles");let Nl=Zl;function jl(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)}Nl.prototype._class+=" map_ClusterCircles",Nl.prototype._palette=p.rainbow("default"),Nl.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Nl.prototype._palette.switch()),Nl.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Nl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("weightFormat",",","string","Number format for weight"),Nl.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]}),n(jl,"fixDateLine");const Hl=class _TopoJSON extends Sa.GeoJSON{constructor(t,e){super(t,{...e,onEachFeature:/* @__PURE__ */n((t,i)=>{e.onEachFeature&&e.onEachFeature(t,i),jl(0,i)},"onEachFeature")})}addData(t){let e,i;if("Topology"===t.type){for(i in t.objects)t.objects.hasOwnProperty(i)&&(e=Ys(t,t.objects[i]),super.addData.call(this,e));return this}return super.addData.call(this,t),this}};n(Hl,"TopoJSON");let Gl=Hl;const Fl=class _World extends Tl{_features;_palette;_dataMap={};_dataMinWeight=null;_dataMaxWeight=null;constructor(){super(),c.SimpleSelectionMixin.call(this)}hasBounds(){return!0}getBounds(){const t=super.getBounds();return t.isValid()?new Sa.LatLngBounds([t.getNorth(),t.getWest()],[t.getSouth(),t.getEast()]):new Sa.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=u(t.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");const e=this._svgElement.append("defs");new P(e,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}}_prevFeatures;layerUpdate(t){this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Gl(this._features,{onEachFeature:/* @__PURE__ */n((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){}};n(Fl,"World");let Ul=Fl;Ul.prototype._class+=" map_World",Ul.prototype._palette=p.rainbow("default"),Ul.prototype.mixin(c.SimpleSelectionMixin),Ul.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Ul.prototype._palette.switch(),{tags:["Basic","Shared"]}),Ul.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Ul.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Ul.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Ul.prototype.publish("meshColor","black","html-color","Stroke Color"),Ul.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Ul.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");let Wl=null;const Vl=class _Countries extends Ul{constructor(){super()}init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Wl&&t(Wl),hr(`${ir()}/countries.json`,function(e){Wl=e,t(Wl)})}).then(t=>{this._features=Ys(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}`)}};n(Vl,"Countries");let ql=Vl;function Yl(t,e){const i=t.indexOf(e);i>=0&&t.splice(i,1)}n(Yl,"del");const $l=class _DrawLayer extends Tl{_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 Sa.Polyline(t)),this._polygons=(t.polygons||[]).map(t=>new Sa.Polygon(t)),this._rectangles=(t.rectangles||[]).map(t=>new Sa.Rectangle(t)),this._circles=(t.circles||[]).map(t=>new Sa.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(Sa.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(Sa.Draw.Event.EDITED,t=>{t.layers.eachLayer(t=>{this.changed("UPDATE",t)})}),t.on(Sa.Draw.Event.DELETED,t=>{t.layers.eachLayer(t=>{Yl(this._polylines,t),Yl(this._polygons,t),Yl(this._rectangles,t),Yl(this._circles,t),this.changed("DELETE",t)})})}layerUpdate(t){super.layerUpdate(t),this.style("opacity",this.opacity());const e=this.drawOptions(),i=S(e);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&t.removeControl(this._drawControl),this._drawControl=new Sa.Control.Draw({position:"topleft",draw:e,edit:{featureGroup:this._layer}}),t.addControl(this._drawControl))}layerExit(t){super.layerExit(t)}changed(t,e){}};n($l,"DrawLayer");let Kl=$l;Kl.prototype._class+=" map_DrawLayer",Kl.prototype.publish("opacity",1,"number","Layer Opacity"),Kl.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Kl.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Kl.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Kl.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");const Xl=class _HeatLayer extends Tl{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 Sa.LatLngBounds([t[i],t[o]]),[t[i],t[o],this.weightColumn_exists()?t[n]:.5])),a=new ll(r,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});a.getBounds=()=>s,this.add(a)}};n(Xl,"HeatLayer");let Jl=Xl;Jl.prototype._class+=" map_Heat",Jl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Jl.prototype.publish("opacity",.5,"number","Layer Opacity"),Jl.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),Jl.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),Jl.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),Jl.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),Jl.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});const Ql=class _Markers extends Ol{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 Sa.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:Sa.point(this.tooltipOffsetX(),this.tooltipOffsetY())});const l=this.popupText(this.rowToObj(t),this.propValue(r,t,""));l&&i.bindPopup(l,{offset:Sa.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){}};n(Ql,"Markers");let th=Ql;th.prototype._class+=" map_Markers",th.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),th.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),th.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),th.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),th.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),th.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),th.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),th.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),th.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),th.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");const eh=class _Icons extends th{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns().indexOf(this.iconUrlColumn());super.layerUpdate(t,t=>({icon:new Sa.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}))}};n(eh,"Icons");let ih=eh;ih.prototype._class+=" map_Icons",ih.prototype.publish("iconUrl","","string","Icon URL",null),ih.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("iconWidth",32,"number","Icon width"),ih.prototype.publish("iconHeight",32,"number","Icon height"),ih.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),ih.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");const oh=class _ClusterIcons extends ih{constructor(){super(!0)}};n(oh,"ClusterIcons");let nh=oh;function sh(t){return[t[1],t[0]]}nh.prototype._class+=" map_ClusterIcons",n(sh,"lngLat2LatLng");const rh=/* @__PURE__ */n((t,e)=>(e[0]<-90?t[0]++:e[0]>90&&t[1]++,t),"calcSpread"),ah=/* @__PURE__ */n(t=>t>90?t-360:t,"shiftLeft"),lh=/* @__PURE__ */n(t=>t<-90?t+360:t,"shiftRight"),hh=/* @__PURE__ */n(t=>{const e=t?ah:lh;return t=>[e(t[0]),t[1]]},"shiftPoint"),uh=class _Polygons extends Tl{_palette;fixDateLine(t){const[e,i]=t.reduce(rh,[0,0]);return e&&i?t.map(hh(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(),[]),e=this.cellFunc(this.weightColumn(),0),i=this.data(),o=M(i,e);this.clear(),i.forEach(i=>{this.add(new Sa.Polygon(this.fixDateLine(t(i)).map(sh),{color:this._palette(o[1],o[0],o[1]),fillColor:this._palette(e(i),o[0],o[1]),fillOpacity:this.opacity(),weight:1,origRow:i}).on("click",t=>this.clickHandler(t,i)))})}layerUpdate(t){super.layerUpdate(t),this.updateHexagons()}zoomEnd(t){super.zoomEnd(t)}moveEnd(t){super.moveEnd(t),this.updateHexagons()}clickHandler(t,e){}};n(uh,"Polygons");let ch=uh;ch.prototype._class+=" map_Polygons",ch.prototype._palette=p.rainbow("default"),ch.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ch.prototype._palette.switch(),{tags:["Basic","Shared"]}),ch.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ch.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),ch.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),ch.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});const ph=2048/Math.PI,dh=class _Path extends Dl{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=Bs("Mercator").scale(ph).translate([o.x,o.y]),s=dn().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){}};n(dh,"Path");let _h=dh;_h.prototype._class+=" map_Path",_h.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),_h.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),_h.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),_h.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const fh=class _Lines extends _h{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}};n(fh,"Lines");let mh=fh;mh.prototype._class+=" map_Lines",mh.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),mh.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});const gh=class _Pins extends th{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:Ya({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}))}};n(gh,"Pins");let yh=gh;yh.prototype._class+=" map_Pins",yh.prototype.publish("faChar","fa-circle","string","Default font awesome character"),yh.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),yh.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),yh.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),yh.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});const vh=class _ClusterPins extends yh{constructor(){super(!0)}};n(vh,"ClusterPins");let Lh=vh;Lh.prototype._class+=" map_ClusterPins";const wh={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"]},bh={};function xh(t){return bh[t]||(bh[t]={topology:void 0,nameIdx:{},codeIdx:{}}),bh[t]}n(xh,"cachedRegion");const Mh=class _Region extends Ul{constructor(){super()}fetchTopo(t){return xh(t).topology?Promise.resolve(xh(t).topology):new Promise((e,i)=>{hr(`${ir()}/${t}.json`,function(i){xh(t).topology=i,e(i)})})}fetchTopoIdx(t){for(const e in xh(t).nameIdx)return Promise.resolve(xh(t).nameIdx);return new Promise((e,i)=>{hr(`${ir()}/${t}_idx.json`,function(i){const{nameIdx:o,codeIdx:n}=xh(t);wh[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=xh(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=Ys(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=xh(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}`)}};n(Mh,"Region");let Ch=Mh;Ch.prototype._class+=" map_Region",Ch.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 Ph=class _Text extends th{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns(),i=e.indexOf(this.textColumn()),o=e.indexOf(this.textColorColumn()),n=e.indexOf(this.strokeColorColumn()),s=e.indexOf(this.fillColorColumn());super.layerUpdate(t,t=>{let e=this.propValue(i,t,this.text());const r=this.textSize(e,this.fontFamily(),this.fontSize());return this.textFormat_exists()&&(e=C(this.textFormat())(e)),{icon:Ya({iconShape:"rectangle",iconAnchor:[r.width/2+this.textOffsetX(),r.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 ">${e}</span>`,textColor:this.propValue(o,t,this.textColor()),borderColor:this.propValue(n,t,this.strokeColor()),backgroundColor:this.propValue(s,t,this.fillColor()),props:{owner:this,row:t}}),draggable:!1}})}};n(Ph,"Text");let kh=Ph;kh.prototype._class+=" map_Text",kh.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),kh.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),kh.prototype.publish("text","","string","Default text"),kh.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),kh.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),kh.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),kh.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),kh.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),kh.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});const Eh=class _US extends Ul{constructor(){super()}getBounds(){const t=super.getBounds();return new Sa.LatLngBounds([t.getNorth(),t.getWest()],[17.755278,-64.565])}};n(Eh,"US");let Th=Eh,Sh=null;const Oh={},zh=class _USCounties extends Th{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Sh&&t(Sh),hr(`${ir()}/us-counties.json`,function(e){Sh=e,t(Sh)})}).then(t=>{this._features=Ys(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,Oh[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${Oh[e]}</b>: ${o}`)}};n(zh,"USCounties");let Dh=zh;Dh.prototype._class+=" map_USCounties";let Ih=null;const Ah={},Bh=class _USStates extends Th{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Ih&&t(Ih),hr(`${ir()}/us-states.json`,function(e){Ih=e,t(Ih)})}).then(t=>{this._features=Ys(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,Ah[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${Ah[e]}</b>: ${o}`)}};n(Bh,"USStates");let Rh=Bh;Rh.prototype._class+=" map_USStates";const Zh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Circles:Al,ClusterCircles:Nl,ClusterIcons:nh,ClusterLayer:Ol,ClusterPins:Lh,Countries:ql,D3Circles:Rl,D3SurfaceLayer:Dl,DrawLayer:Kl,FeatureLayer:Tl,HeatLayer:Jl,Icons:ih,Leaflet:kl,Lines:mh,Markers:th,Path:_h,Pins:yh,Polygons:ch,Region:Ch,Text:kh,TileLayer:cl,USCounties:Dh,USStates:Rh,World:Ul},Symbol.toStringTag,{value:"Module"}));export{R as BUILD_VERSION,Us as CanvasPinLayer,ht as CanvasPins,nr as Choropleth,mr as ChoroplethContinents,wr as ChoroplethCounties,_r as ChoroplethCountries,Pr as ChoroplethStates,Er as ChoroplethStatesHeat,qr as GMap,Qr as GMapCounties,ea as GMapGraph,oa as GMapHeat,Xr as GMapLayered,ra as GMapPin,ha as GMapPinLine,Sr as GeoHash,ca as Graph,da as Graticule,fa as Heat,ma as IChoropleth,Gs as Layer,Ns as Layered,Zh as Leaflet,aa as Lines,xa as OpenStreet,A as PKG_NAME,B as PKG_VERSION,na as Pins,Pa as TopoJSONChoropleth,Nr as google,As as projections,Gr as requireGoogleMap,Hr as requireGoogleMapTimeout,Bs as resolve,ir as topoJsonFolder,Is as types};
1
+ var t,e,i,o=Object.defineProperty,n=(t,e)=>o(t,"name",{value:e,configurable:!0}),s=(t,e,i)=>((t,e,i)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);import{CanvasWidget as r,merge as a,range as l,SVGZoomWidget as h,select as u,Utility as c,Palette as p,dispatch as d,map as _,HTMLWidget as f,Shape as m,Platform as g,Widget as y,IconBar as v,Button as w,Spacer as b,hsl as x,extent as M,format as C,SVGGlowFilter as P}from"@hpcc-js/common";import{ITooltip as k}from"@hpcc-js/api";import{AbsoluteSurface as E}from"@hpcc-js/layout";import{promiseTimeout as T,hashSum as S}from"@hpcc-js/util";import{Graph as O,Edge as z}from"@hpcc-js/graph";import{HeatMap as D}from"@hpcc-js/other";function I(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:/* @__PURE__ */n(()=>o[e],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}n(I,"_mergeNamespaces");const A="@hpcc-js/map",B="3.4.6",R="3.19.0";function Z(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return N(this.cover(e,i),e,i,t)}function N(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 j(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)N(this,r[i],a[i],t[i]);return this}function H(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 G(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t}function F(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 U(t,e,i,o,n){this.node=t,this.x0=e,this.y0=i,this.x1=o,this.y1=n}function W(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 U(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 U(f[3],m,g,r,a),new U(f[2],n,g,m,a),new U(f[1],m,s,r,g),new U(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 w=Math.sqrt(i=L);u=t-w,c=e-w,p=t+w,d=e+w,o=f.data}}return o}function V(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 q(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this}function Y(){return this._root}function $(){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 U(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 U(i,h,u,s,r)),(i=l[2])&&a.push(new U(i,o,u,h,r)),(i=l[1])&&a.push(new U(i,h,n,s,u)),(i=l[0])&&a.push(new U(i,o,n,h,u))}return this}function X(t){var e,i=[],o=[];for(this._root&&i.push(new U(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 U(s,r,a,u,c)),(s=n[1])&&i.push(new U(s,u,a,l,c)),(s=n[2])&&i.push(new U(s,r,c,u,h)),(s=n[3])&&i.push(new U(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 J(t){return t[0]}function Q(t){return arguments.length?(this._x=t,this):this._x}function tt(t){return t[1]}function et(t){return arguments.length?(this._y=t,this):this._y}function it(t,e,i){var o=new ot(null==e?J:e,null==i?tt:i,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function ot(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 nt(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}n(Z,"tree_add"),n(N,"add$1"),n(j,"addAll"),n(H,"tree_cover"),n(G,"tree_data"),n(F,"tree_extent"),n(U,"Quad"),n(W,"tree_find"),n(V,"tree_remove"),n(q,"removeAll"),n(Y,"tree_root"),n($,"tree_size"),n(K,"tree_visit"),n(X,"tree_visitAfter"),n(J,"defaultX"),n(Q,"tree_x"),n(tt,"defaultY"),n(et,"tree_y"),n(it,"quadtree"),n(ot,"Quadtree$1"),n(nt,"leaf_copy");var st=it.prototype=ot.prototype;st.copy=function(){var t,e,i=new ot(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=nt(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]=nt(e));return i},st.add=Z,st.addAll=j,st.cover=H,st.data=G,st.extent=F,st.find=W,st.remove=V,st.removeAll=q,st.root=Y,st.size=$,st.visit=K,st.visitAfter=X,st.x=Q,st.y=et;const rt=class _Quadtree{_pin_h=0;_pin_w=0;_tree;constructor(t,e,i,o){this._pin_h=i,this._pin_w=o,this._tree=it().extent(t).addAll(e)}searchRect(t,e,i,o){const n=[];return this._tree.visit((r,a,l,h,u)=>{let c=!1;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}};n(rt,"Quadtree");let at=rt;const lt=class _CanvasPins extends r{_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 at([[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(),s=this.arrowWidth(),r=this.pinHeight(),a=this.pinWidth(),l=this.radiusWeightMult();let h=0;function u(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 c(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=>{h<t.weight&&(h=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=a/2;this.useWeightedRadius()&&(e+=a*(l*t.weight/h)),u({icon:t.weight,left:Math.floor(t[0]-e)+.5,top:Math.floor(t[1]-e-o)+.5,radius:e})}else c({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-a/2)+.5,top:Math.floor(t[1]-r-o)+.5,width:a,height:r,arrow_height:o,arrow_width:s})}),n(u,"drawCirclePin"),n(c,"drawSquarePin"),n(p,"drawArrow"),n(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}};n(lt,"CanvasPins");let ht=lt;function ut(){return new ct}function ct(){this.reset()}ht.prototype._class+=" map_CanvasPins",ht.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),ht.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),ht.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),n(ut,"adder"),n(ct,"Adder"),ct.prototype={constructor:ct,reset:/* @__PURE__ */n(function(){this.s=this.t=0},"reset"),add:/* @__PURE__ */n(function(t){dt(pt,t,this.t),dt(this,pt.s,this.s),this.s?this.t+=pt.t:this.s=pt.t},"add"),valueOf:/* @__PURE__ */n(function(){return this.s},"valueOf")};var pt=new ct;function dt(t,e,i){var o=t.s=e+i,n=o-e,s=o-n;t.t=e-s+(i-n)}n(dt,"add");var _t=1e-6,ft=1e-12,mt=Math.PI,gt=mt/2,yt=mt/4,vt=2*mt,Lt=180/mt,wt=mt/180,bt=Math.abs,xt=Math.atan,Mt=Math.atan2,Ct=Math.cos,Pt=Math.ceil,kt=Math.exp,Et=Math.log,Tt=Math.pow,St=Math.sin,Ot=Math.sign||function(t){return t>0?1:t<0?-1:0},zt=Math.sqrt,Dt=Math.tan;function It(t){return t>1?0:t<-1?mt:Math.acos(t)}function At(t){return t>1?gt:t<-1?-gt:Math.asin(t)}function Bt(t){return(t=St(t/2))*t}function Rt(){}function Zt(t,e){t&&jt.hasOwnProperty(t.type)&&jt[t.type](t,e)}n(It,"acos"),n(At,"asin"),n(Bt,"haversin"),n(Rt,"noop$1"),n(Zt,"streamGeometry");var Nt={Feature:/* @__PURE__ */n(function(t,e){Zt(t.geometry,e)},"Feature"),FeatureCollection:/* @__PURE__ */n(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)Zt(i[o].geometry,e)},"FeatureCollection")},jt={Sphere:/* @__PURE__ */n(function(t,e){e.sphere()},"Sphere"),Point:/* @__PURE__ */n(function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},"Point"),MultiPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){Ht(t.coordinates,e,0)},"LineString"),MultiLineString:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)Ht(i[o],e,0)},"MultiLineString"),Polygon:/* @__PURE__ */n(function(t,e){Gt(t.coordinates,e)},"Polygon"),MultiPolygon:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)Gt(i[o],e)},"MultiPolygon"),GeometryCollection:/* @__PURE__ */n(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)Zt(i[o],e)},"GeometryCollection")};function Ht(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 Gt(t,e){var i=-1,o=t.length;for(e.polygonStart();++i<o;)Ht(t[i],e,1);e.polygonEnd()}function Ft(t,e){t&&Nt.hasOwnProperty(t.type)?Nt[t.type](t,e):Zt(t,e)}n(Ht,"streamLine"),n(Gt,"streamPolygon"),n(Ft,"geoStream");var Ut,Wt,Vt,qt,Yt,$t=ut(),Kt=ut(),Xt={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:/* @__PURE__ */n(function(){$t.reset(),Xt.lineStart=Jt,Xt.lineEnd=Qt},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){var t=+$t;Kt.add(t<0?vt+t:t),this.lineStart=this.lineEnd=this.point=Rt},"polygonEnd"),sphere:/* @__PURE__ */n(function(){Kt.add(vt)},"sphere")};function Jt(){Xt.point=te}function Qt(){ee(Ut,Wt)}function te(t,e){Xt.point=ee,Ut=t,Wt=e,Vt=t*=wt,qt=Ct(e=(e*=wt)/2+yt),Yt=St(e)}function ee(t,e){var i=(t*=wt)-Vt,o=i>=0?1:-1,n=o*i,s=Ct(e=(e*=wt)/2+yt),r=St(e),a=Yt*r,l=qt*s+a*Ct(n),h=a*o*St(n);$t.add(Mt(h,l)),Vt=t,qt=s,Yt=r}function ie(t){return Kt.reset(),Ft(t,Xt),2*Kt}function oe(t){return[Mt(t[1],t[0]),At(t[2])]}function ne(t){var e=t[0],i=t[1],o=Ct(i);return[o*Ct(e),o*St(e),St(i)]}function se(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function re(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 ae(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function le(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function he(t){var e=zt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}n(Jt,"areaRingStart$1"),n(Qt,"areaRingEnd$1"),n(te,"areaPointFirst$1"),n(ee,"areaPoint$1"),n(ie,"area"),n(oe,"spherical"),n(ne,"cartesian"),n(se,"cartesianDot"),n(re,"cartesianCross"),n(ae,"cartesianAddInPlace"),n(le,"cartesianScale"),n(he,"cartesianNormalizeInPlace");var ue,ce,pe,de,_e,fe,me,ge,ye,ve,Le,we,be,xe,Me,Ce,Pe,ke,Ee,Te,Se,Oe,ze,De,Ie,Ae,Be=ut(),Re={point:Ze,lineStart:je,lineEnd:He,polygonStart:/* @__PURE__ */n(function(){Re.point=Ge,Re.lineStart=Fe,Re.lineEnd=Ue,Be.reset(),Xt.polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Xt.polygonEnd(),Re.point=Ze,Re.lineStart=je,Re.lineEnd=He,$t<0?(ue=-(pe=180),ce=-(de=90)):Be>_t?de=90:Be<-_t&&(ce=-90),ve[0]=ue,ve[1]=pe},"polygonEnd"),sphere:/* @__PURE__ */n(function(){ue=-(pe=180),ce=-(de=90)},"sphere")};function Ze(t,e){ye.push(ve=[ue=t,pe=t]),e<ce&&(ce=e),e>de&&(de=e)}function Ne(t,e){var i=ne([t*wt,e*wt]);if(ge){var o=re(ge,i),n=re([o[1],-o[0],0],o);he(n),n=oe(n);var s,r=t-_e,a=r>0?1:-1,l=n[0]*Lt*a,h=bt(r)>180;h^(a*_e<l&&l<a*t)?(s=n[1]*Lt)>de&&(de=s):h^(a*_e<(l=(l+360)%360-180)&&l<a*t)?(s=-n[1]*Lt)<ce&&(ce=s):(e<ce&&(ce=e),e>de&&(de=e)),h?t<_e?We(ue,t)>We(ue,pe)&&(pe=t):We(t,pe)>We(ue,pe)&&(ue=t):pe>=ue?(t<ue&&(ue=t),t>pe&&(pe=t)):t>_e?We(ue,t)>We(ue,pe)&&(pe=t):We(t,pe)>We(ue,pe)&&(ue=t)}else ye.push(ve=[ue=t,pe=t]);e<ce&&(ce=e),e>de&&(de=e),ge=i,_e=t}function je(){Re.point=Ne}function He(){ve[0]=ue,ve[1]=pe,Re.point=Ze,ge=null}function Ge(t,e){if(ge){var i=t-_e;Be.add(bt(i)>180?i+(i>0?360:-360):i)}else fe=t,me=e;Xt.point(t,e),Ne(t,e)}function Fe(){Xt.lineStart()}function Ue(){Ge(fe,me),Xt.lineEnd(),bt(Be)>_t&&(ue=-(pe=180)),ve[0]=ue,ve[1]=pe,ge=null}function We(t,e){return(e-=t)<0?e+360:e}function Ve(t,e){return t[0]-e[0]}function qe(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Ye(t){var e,i,o,n,s,r,a;if(de=pe=-(ue=ce=1/0),ye=[],Ft(t,Re),i=ye.length){for(ye.sort(Ve),e=1,s=[o=ye[0]];e<i;++e)qe(o,(n=ye[e])[0])||qe(o,n[1])?(We(o[0],n[1])>We(o[0],o[1])&&(o[1]=n[1]),We(n[0],o[1])>We(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=We(o[1],n[0]))>r&&(r=a,ue=n[0],pe=o[1])}return ye=ve=null,ue===1/0||ce===1/0?[[NaN,NaN],[NaN,NaN]]:[[ue,ce],[pe,de]]}n(Ze,"boundsPoint$2"),n(Ne,"linePoint"),n(je,"boundsLineStart"),n(He,"boundsLineEnd"),n(Ge,"boundsRingPoint"),n(Fe,"boundsRingStart"),n(Ue,"boundsRingEnd"),n(We,"angle"),n(Ve,"rangeCompare"),n(qe,"rangeContains"),n(Ye,"bounds");var $e={sphere:Rt,point:Ke,lineStart:Je,lineEnd:ei,polygonStart:/* @__PURE__ */n(function(){$e.lineStart=ii,$e.lineEnd=oi},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){$e.lineStart=Je,$e.lineEnd=ei},"polygonEnd")};function Ke(t,e){t*=wt;var i=Ct(e*=wt);Xe(i*Ct(t),i*St(t),St(e))}function Xe(t,e,i){++Le,be+=(t-be)/Le,xe+=(e-xe)/Le,Me+=(i-Me)/Le}function Je(){$e.point=Qe}function Qe(t,e){t*=wt;var i=Ct(e*=wt);De=i*Ct(t),Ie=i*St(t),Ae=St(e),$e.point=ti,Xe(De,Ie,Ae)}function ti(t,e){t*=wt;var i=Ct(e*=wt),o=i*Ct(t),n=i*St(t),s=St(e),r=Mt(zt((r=Ie*s-Ae*n)*r+(r=Ae*o-De*s)*r+(r=De*n-Ie*o)*r),De*o+Ie*n+Ae*s);we+=r,Ce+=r*(De+(De=o)),Pe+=r*(Ie+(Ie=n)),ke+=r*(Ae+(Ae=s)),Xe(De,Ie,Ae)}function ei(){$e.point=Ke}function ii(){$e.point=ni}function oi(){si(Oe,ze),$e.point=Ke}function ni(t,e){Oe=t,ze=e,t*=wt,e*=wt,$e.point=si;var i=Ct(e);De=i*Ct(t),Ie=i*St(t),Ae=St(e),Xe(De,Ie,Ae)}function si(t,e){t*=wt;var i=Ct(e*=wt),o=i*Ct(t),n=i*St(t),s=St(e),r=Ie*s-Ae*n,a=Ae*o-De*s,l=De*n-Ie*o,h=zt(r*r+a*a+l*l),u=At(h),c=h&&-u/h;Ee+=c*r,Te+=c*a,Se+=c*l,we+=u,Ce+=u*(De+(De=o)),Pe+=u*(Ie+(Ie=n)),ke+=u*(Ae+(Ae=s)),Xe(De,Ie,Ae)}function ri(t){Le=we=be=xe=Me=Ce=Pe=ke=Ee=Te=Se=0,Ft(t,$e);var e=Ee,i=Te,o=Se,n=e*e+i*i+o*o;return n<ft&&(e=Ce,i=Pe,o=ke,we<_t&&(e=be,i=xe,o=Me),(n=e*e+i*i+o*o)<ft)?[NaN,NaN]:[Mt(i,e)*Lt,At(o/zt(n))*Lt]}function ai(t){return function(){return t}}function li(t,e){function i(i,o){return i=t(i,o),e(i[0],i[1])}return n(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 hi(t,e){return[bt(t)>mt?t+Math.round(-t/vt)*vt:t,e]}function ui(t,e,i){return(t%=vt)?e||i?li(pi(t),di(e,i)):pi(t):e||i?di(e,i):hi}function ci(t){return function(e,i){return[(e+=t)>mt?e-vt:e<-mt?e+vt:e,i]}}function pi(t){var e=ci(t);return e.invert=ci(-t),e}function di(t,e){var i=Ct(t),o=St(t),s=Ct(e),r=St(e);function a(t,e){var n=Ct(e),a=Ct(t)*n,l=St(t)*n,h=St(e),u=h*i+a*o;return[Mt(l*s-u*r,a*i-h*o),At(u*s+l*r)]}return n(a,"rotation"),a.invert=function(t,e){var n=Ct(e),a=Ct(t)*n,l=St(t)*n,h=St(e),u=h*s-l*r;return[Mt(l*s+h*r,a*i+u*o),At(u*i-a*o)]},a}function _i(t){function e(e){return(e=t(e[0]*wt,e[1]*wt))[0]*=Lt,e[1]*=Lt,e}return t=ui(t[0]*wt,t[1]*wt,t.length>2?t[2]*wt:0),n(e,"forward"),e.invert=function(e){return(e=t.invert(e[0]*wt,e[1]*wt))[0]*=Lt,e[1]*=Lt,e},e}function fi(t,e,i,o,n,s){if(i){var r=Ct(e),a=St(e),l=o*i;null==n?(n=e+o*vt,s=e-l/2):(n=mi(r,n),s=mi(r,s),(o>0?n<s:n>s)&&(n+=o*vt));for(var h,u=n;o>0?u>s:u<s;u-=l)h=oe([r,-a*Ct(u),-a*St(u)]),t.point(h[0],h[1])}}function mi(t,e){(e=ne(e))[0]-=t,he(e);var i=It(-e[1]);return((-e[2]<0?-i:i)+vt-_t)%vt}function gi(){var t,e,i=ai([0,0]),o=ai(90),s=ai(6),r={point:a};function a(i,o){t.push(i=e(i,o)),i[0]*=Lt,i[1]*=Lt}function l(){var n=i.apply(this,arguments),a=o.apply(this,arguments)*wt,l=s.apply(this,arguments)*wt;return t=[],e=ui(-n[0]*wt,-n[1]*wt,0).invert,fi(r,a,l,1),n={type:"Polygon",coordinates:[t]},t=e=null,n}return n(a,"point"),n(l,"circle"),l.center=function(t){return arguments.length?(i="function"==typeof t?t:ai([+t[0],+t[1]]),l):i},l.radius=function(t){return arguments.length?(o="function"==typeof t?t:ai(+t),l):o},l.precision=function(t){return arguments.length?(s="function"==typeof t?t:ai(+t),l):s},l}function yi(){var t,e=[];return{point:/* @__PURE__ */n(function(e,i,o){t.push([e,i,o])},"point"),lineStart:/* @__PURE__ */n(function(){e.push(t=[])},"lineStart"),lineEnd:Rt,rejoin:/* @__PURE__ */n(function(){e.length>1&&e.push(e.pop().concat(e.shift()))},"rejoin"),result:/* @__PURE__ */n(function(){var i=e;return e=[],t=null,i},"result")}}function vi(t,e){return bt(t[0]-e[0])<_t&&bt(t[1]-e[1])<_t}function Li(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 wi(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(vi(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 Li(o,t,null,!0)),l.push(i.o=new Li(o,null,i,!1)),a.push(i=new Li(r,t,null,!1)),l.push(i.o=new Li(r,null,i,!0))}}),a.length){for(l.sort(e),bi(a),bi(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 bi(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}}n(Ke,"centroidPoint$1"),n(Xe,"centroidPointCartesian"),n(Je,"centroidLineStart$1"),n(Qe,"centroidLinePointFirst"),n(ti,"centroidLinePoint"),n(ei,"centroidLineEnd$1"),n(ii,"centroidRingStart$1"),n(oi,"centroidRingEnd$1"),n(ni,"centroidRingPointFirst"),n(si,"centroidRingPoint"),n(ri,"centroid"),n(ai,"constant$1"),n(li,"compose"),n(hi,"rotationIdentity"),hi.invert=hi,n(ui,"rotateRadians"),n(ci,"forwardRotationLambda"),n(pi,"rotationLambda"),n(di,"rotationPhiGamma"),n(_i,"rotation"),n(fi,"circleStream"),n(mi,"circleRadius"),n(gi,"circle$1"),n(yi,"clipBuffer"),n(vi,"pointEqual"),n(Li,"Intersection"),n(wi,"clipRejoin"),n(bi,"link");var xi=ut();function Mi(t){return bt(t[0])<=mt?t[0]:Ot(t[0])*((bt(t[0])+mt)%vt-mt)}function Ci(t,e){var i=Mi(e),o=e[1],n=St(o),s=[St(i),-Ct(i),0],r=0,a=0;xi.reset(),1===n?o=gt+_t:-1===n&&(o=-gt-_t);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=Mi(p),_=p[1]/2+yt,f=St(_),m=Ct(_),g=0;g<c;++g,d=v,f=w,m=b,p=y){var y=u[g],v=Mi(y),L=y[1]/2+yt,w=St(L),b=Ct(L),x=v-d,M=x>=0?1:-1,C=M*x,P=C>mt,k=f*w;if(xi.add(Mt(k*M*St(C),m*b+k*Ct(C))),r+=P?x+M*vt:x,P^d>=i^v>=i){var E=re(ne(p),ne(y));he(E);var T=re(s,E);he(T);var S=(P^x>=0?-1:1)*At(T[2]);(o>S||o===S&&(E[0]||E[1]))&&(a+=P^x>=0?1:-1)}}return(r<-_t||r<_t&&xi<-_t)^1&a}function Pi(t,e,i,o){return function(s){var r,l,h,u=e(s),c=yi(),p=e(c),d=!1,_={point:f,lineStart:g,lineEnd:y,polygonStart:/* @__PURE__ */n(function(){_.point=v,_.lineStart=L,_.lineEnd=w,l=[],r=[]},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){_.point=f,_.lineStart=g,_.lineEnd=y,l=a(l);var t=Ci(r,o);l.length?(d||(s.polygonStart(),d=!0),wi(l,Ei,t,i,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),i(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),l=r=null},"polygonEnd"),sphere:/* @__PURE__ */n(function(){s.polygonStart(),s.lineStart(),i(null,null,1,s),s.lineEnd(),s.polygonEnd()},"sphere")};function f(e,i){t(e,i)&&s.point(e,i)}function m(t,e){u.point(t,e)}function g(){_.point=m,u.lineStart()}function y(){_.point=f,u.lineEnd()}function v(t,e){h.push([t,e]),p.point(t,e)}function L(){p.lineStart(),h=[]}function w(){v(h[0][0],h[0][1]),p.lineEnd();var t,e,i,o,n=p.clean(),a=c.result(),u=a.length;if(h.pop(),r.push(h),h=null,u)if(1&n){if((e=(i=a[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 u>1&&2&n&&a.push(a.pop().concat(a.shift())),l.push(a.filter(ki))}return n(f,"point"),n(m,"pointLine"),n(g,"lineStart"),n(y,"lineEnd"),n(v,"pointRing"),n(L,"ringStart"),n(w,"ringEnd"),_}}function ki(t){return t.length>1}function Ei(t,e){return((t=t.x)[0]<0?t[1]-gt-_t:gt-t[1])-((e=e.x)[0]<0?e[1]-gt-_t:gt-e[1])}n(Mi,"longitude"),n(Ci,"polygonContains"),n(Pi,"clip"),n(ki,"validSegment"),n(Ei,"compareIntersection");const Ti=Pi(function(){return!0},Si,zi,[-mt,-gt]);function Si(t){var e,i=NaN,o=NaN,s=NaN;return{lineStart:/* @__PURE__ */n(function(){t.lineStart(),e=1},"lineStart"),point:/* @__PURE__ */n(function(n,r){var a=n>0?mt:-mt,l=bt(n-i);bt(l-mt)<_t?(t.point(i,o=(o+r)/2>0?gt:-gt),t.point(s,o),t.lineEnd(),t.lineStart(),t.point(a,o),t.point(n,o),e=0):s!==a&&l>=mt&&(bt(i-s)<_t&&(i-=s*_t),bt(n-a)<_t&&(n-=a*_t),o=Oi(i,o,n,r),t.point(s,o),t.lineEnd(),t.lineStart(),t.point(a,o),e=0),t.point(i=n,o=r),s=a},"point"),lineEnd:/* @__PURE__ */n(function(){t.lineEnd(),i=o=NaN},"lineEnd"),clean:/* @__PURE__ */n(function(){return 2-e},"clean")}}function Oi(t,e,i,o){var n,s,r=St(t-i);return bt(r)>_t?xt((St(e)*(s=Ct(o))*St(i)-St(o)*(n=Ct(e))*St(t))/(n*s*r)):(e+o)/2}function zi(t,e,i,o){var n;if(null==t)n=i*gt,o.point(-mt,n),o.point(0,n),o.point(mt,n),o.point(mt,0),o.point(mt,-n),o.point(0,-n),o.point(-mt,-n),o.point(-mt,0),o.point(-mt,n);else if(bt(t[0]-e[0])>_t){var s=t[0]<e[0]?mt:-mt;n=i*s/2,o.point(-s,n),o.point(0,n),o.point(s,n)}else o.point(e[0],e[1])}function Di(t){var e=Ct(t),i=6*wt,o=e>0,s=bt(e)>_t;function r(e,o,n,s){fi(s,t,i,n,e,o)}function a(t,i){return Ct(t)*Ct(i)>e}function l(t){var e,i,r,l,c;return{lineStart:/* @__PURE__ */n(function(){l=r=!1,c=1},"lineStart"),point:/* @__PURE__ */n(function(n,p){var d,_=[n,p],f=a(n,p),m=o?f?0:u(n,p):f?u(n+(n<0?mt:-mt),p):0;if(!e&&(l=r=f)&&t.lineStart(),f!==r&&(!(d=h(e,_))||vi(e,d)||vi(_,d))&&(_[2]=1),f!==r)c=0,f?(t.lineStart(),d=h(_,e),t.point(d[0],d[1])):(d=h(e,_),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(s&&e&&o^f){var g;m&i||!(g=h(_,e,!0))||(c=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&&vi(e,_)||t.point(_[0],_[1]),e=_,r=f,i=m},"point"),lineEnd:/* @__PURE__ */n(function(){r&&t.lineEnd(),e=null},"lineEnd"),clean:/* @__PURE__ */n(function(){return c|(l&&r)<<1},"clean")}}function h(t,i,o){var n=[1,0,0],s=re(ne(t),ne(i)),r=se(s,s),a=s[0],l=r-a*a;if(!l)return!o&&t;var h=e*r/l,u=-e*a/l,c=re(n,s),p=le(n,h);ae(p,le(s,u));var d=c,_=se(p,d),f=se(d,d),m=_*_-f*(se(p,p)-1);if(!(m<0)){var g=zt(m),y=le(d,(-_-g)/f);if(ae(y,p),y=oe(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=bt(M-mt)<_t;if(!C&&x<b&&(v=b,b=x,x=v),C||M<_t?C?b+x>0^y[1]<(bt(y[0]-L)<_t?b:x):b<=y[1]&&y[1]<=x:M>mt^(L<=y[0]&&y[0]<=w)){var P=le(d,(-_+g)/f);return ae(P,p),[y,oe(P)]}}}function u(e,i){var n=o?t:mt-t,s=0;return e<-n?s|=1:e>n&&(s|=2),i<-n?s|=4:i>n&&(s|=8),s}return n(r,"interpolate"),n(a,"visible"),n(l,"clipLine"),n(h,"intersect"),n(u,"code"),Pi(a,l,r,o?[0,-t]:[-mt,t-mt])}function Ii(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}}}}}n(Si,"clipAntimeridianLine"),n(Oi,"clipAntimeridianIntersect"),n(zi,"clipAntimeridianInterpolate"),n(Di,"clipCircle"),n(Ii,"clipLine");var Ai=1e9,Bi=-Ai;function Ri(t,e,i,o){function s(n,s){return t<=n&&n<=i&&e<=s&&s<=o}function r(n,s,r,a){var h=0,c=0;if(null==n||(h=l(n,r))!==(c=l(s,r))||u(n,s)<0^r>0)do{a.point(0===h||3===h?t:i,h>1?o:e)}while((h=(h+r+4)%4)!==c);else a.point(s[0],s[1])}function l(o,n){return bt(o[0]-t)<_t?n>0?0:3:bt(o[0]-i)<_t?n>0?2:1:bt(o[1]-e)<_t?n>0?1:0:n>0?3:2}function h(t,e){return u(t.x,e.x)}function u(t,e){var i=l(t,1),o=l(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 n(s,"visible"),n(r,"interpolate"),n(l,"corner"),n(h,"compareIntersection"),n(u,"comparePoint"),function(l){var u,c,p,d,_,f,m,g,y,v,L,w=l,b=yi(),x={point:M,lineStart:E,lineEnd:T,polygonStart:P,polygonEnd:k};function M(t,e){s(t,e)&&w.point(t,e)}function C(){for(var e=0,i=0,n=c.length;i<n;++i)for(var s,r,a=c[i],l=1,h=a.length,u=a[0],p=u[0],d=u[1];l<h;++l)s=p,r=d,p=(u=a[l])[0],d=u[1],r<=o?d>o&&(p-s)*(o-r)>(d-r)*(t-s)&&++e:d<=o&&(p-s)*(o-r)<(d-r)*(t-s)&&--e;return e}function P(){w=b,u=[],c=[],L=!0}function k(){var t=C(),e=L&&t,i=(u=a(u)).length;(e||i)&&(l.polygonStart(),e&&(l.lineStart(),r(null,null,1,l),l.lineEnd()),i&&wi(u,h,t,r,l),l.polygonEnd()),w=l,u=c=p=null}function E(){x.point=S,c&&c.push(p=[]),v=!0,y=!1,m=g=NaN}function T(){u&&(S(d,_),f&&y&&b.rejoin(),u.push(b.result())),x.point=M,y&&w.lineEnd()}function S(n,r){var a=s(n,r);if(c&&p.push([n,r]),v)d=n,_=r,f=a,v=!1,a&&(w.lineStart(),w.point(n,r));else if(a&&y)w.point(n,r);else{var l=[m=Math.max(Bi,Math.min(Ai,m)),g=Math.max(Bi,Math.min(Ai,g))],h=[n=Math.max(Bi,Math.min(Ai,n)),r=Math.max(Bi,Math.min(Ai,r))];Ii(l,h,t,e,i,o)?(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(n,r),L=!1)}m=n,g=r,y=a}return n(M,"point"),n(C,"polygonInside"),n(P,"polygonStart"),n(k,"polygonEnd"),n(E,"lineStart"),n(T,"lineEnd"),n(S,"linePoint"),x}}function Zi(){var t,e,i,o=0,s=0,r=960,a=500;return i={stream:/* @__PURE__ */n(function(i){return t&&e===i?t:t=Ri(o,s,r,a)(e=i)},"stream"),extent:/* @__PURE__ */n(function(n){return arguments.length?(o=+n[0][0],s=+n[0][1],r=+n[1][0],a=+n[1][1],t=e=null,i):[[o,s],[r,a]]},"extent")}}n(Ri,"clipRectangle"),n(Zi,"extent");var Ni,ji,Hi,Gi=ut(),Fi={sphere:Rt,point:Rt,lineStart:Ui,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt};function Ui(){Fi.point=Vi,Fi.lineEnd=Wi}function Wi(){Fi.point=Fi.lineEnd=Rt}function Vi(t,e){Ni=t*=wt,ji=St(e*=wt),Hi=Ct(e),Fi.point=qi}function qi(t,e){t*=wt;var i=St(e*=wt),o=Ct(e),n=bt(t-Ni),s=Ct(n),r=o*St(n),a=Hi*i-ji*o*s,l=ji*i+Hi*o*s;Gi.add(Mt(zt(r*r+a*a),l)),Ni=t,ji=i,Hi=o}function Yi(t){return Gi.reset(),Ft(t,Fi),+Gi}n(Ui,"lengthLineStart"),n(Wi,"lengthLineEnd"),n(Vi,"lengthPointFirst$1"),n(qi,"lengthPoint$1"),n(Yi,"length");var $i=[null,null],Ki={type:"LineString",coordinates:$i};function Xi(t,e){return $i[0]=t,$i[1]=e,Yi(Ki)}n(Xi,"distance");var Ji={Feature:/* @__PURE__ */n(function(t,e){return to(t.geometry,e)},"Feature"),FeatureCollection:/* @__PURE__ */n(function(t,e){for(var i=t.features,o=-1,n=i.length;++o<n;)if(to(i[o].geometry,e))return!0;return!1},"FeatureCollection")},Qi={Sphere:/* @__PURE__ */n(function(){return!0},"Sphere"),Point:/* @__PURE__ */n(function(t,e){return eo(t.coordinates,e)},"Point"),MultiPoint:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(eo(i[o],e))return!0;return!1},"MultiPoint"),LineString:/* @__PURE__ */n(function(t,e){return io(t.coordinates,e)},"LineString"),MultiLineString:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(io(i[o],e))return!0;return!1},"MultiLineString"),Polygon:/* @__PURE__ */n(function(t,e){return oo(t.coordinates,e)},"Polygon"),MultiPolygon:/* @__PURE__ */n(function(t,e){for(var i=t.coordinates,o=-1,n=i.length;++o<n;)if(oo(i[o],e))return!0;return!1},"MultiPolygon"),GeometryCollection:/* @__PURE__ */n(function(t,e){for(var i=t.geometries,o=-1,n=i.length;++o<n;)if(to(i[o],e))return!0;return!1},"GeometryCollection")};function to(t,e){return!(!t||!Qi.hasOwnProperty(t.type))&&Qi[t.type](t,e)}function eo(t,e){return 0===Xi(t,e)}function io(t,e){for(var i,o,n,s=0,r=t.length;s<r;s++){if(0===(o=Xi(t[s],e)))return!0;if(s>0&&(n=Xi(t[s],t[s-1]))>0&&i<=n&&o<=n&&(i+o-n)*(1-Math.pow((i-o)/n,2))<ft*n)return!0;i=o}return!1}function oo(t,e){return!!Ci(t.map(no),so(e))}function no(t){return(t=t.map(so)).pop(),t}function so(t){return[t[0]*wt,t[1]*wt]}function ro(t,e){return(t&&Ji.hasOwnProperty(t.type)?Ji[t.type]:to)(t,e)}function ao(t,e,i){var o=l(t,e-_t,i).concat(e);return function(t){return o.map(function(e){return[t,e]})}}function lo(t,e,i){var o=l(t,e-_t,i).concat(e);return function(t){return o.map(function(e){return[e,t]})}}function ho(){var t,e,i,o,s,r,a,h,u,c,p,d,_=10,f=_,m=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:L()}}function L(){return l(Pt(o/m)*m,i,m).map(p).concat(l(Pt(h/g)*g,a,g).map(d)).concat(l(Pt(e/_)*_,t,_).filter(function(t){return bt(t%m)>_t}).map(u)).concat(l(Pt(r/f)*f,s,f).filter(function(t){return bt(t%g)>_t}).map(c))}return n(v,"graticule"),n(L,"lines"),v.lines=function(){return L().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(d(a).slice(1),p(i).reverse().slice(1),d(h).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],h=+t[0][1],a=+t[1][1],o>i&&(t=o,o=i,i=t),h>a&&(t=h,h=a,a=t),v.precision(y)):[[o,h],[i,a]]},v.extentMinor=function(i){return arguments.length?(e=+i[0][0],t=+i[1][0],r=+i[0][1],s=+i[1][1],e>t&&(i=e,e=t,t=i),r>s&&(i=r,r=s,s=i),v.precision(y)):[[e,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(n){return arguments.length?(y=+n,u=ao(r,s,90),c=lo(e,t,y),p=ao(h,a,90),d=lo(o,i,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function uo(){return ho()()}function co(t,e){var i=t[0]*wt,o=t[1]*wt,n=e[0]*wt,s=e[1]*wt,r=Ct(o),a=St(o),l=Ct(s),h=St(s),u=r*Ct(i),c=r*St(i),p=l*Ct(n),d=l*St(n),_=2*At(zt(Bt(s-o)+r*l*Bt(n-i))),f=St(_),m=_?function(t){var e=St(t*=_)/f,i=St(_-t)/f,o=i*u+e*p,n=i*c+e*d,s=i*a+e*h;return[Mt(n,o)*Lt,Mt(s,zt(o*o+n*n))*Lt]}:function(){return[i*Lt,o*Lt]};return m.distance=_,m}function po(t){return t}n(to,"containsGeometry"),n(eo,"containsPoint"),n(io,"containsLine"),n(oo,"containsPolygon"),n(no,"ringRadians"),n(so,"pointRadians"),n(ro,"contains"),n(ao,"graticuleX"),n(lo,"graticuleY"),n(ho,"graticule"),n(uo,"graticule10"),n(co,"interpolate"),n(po,"identity$2");var _o,fo,mo,go,yo=ut(),vo=ut(),Lo={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:/* @__PURE__ */n(function(){Lo.lineStart=wo,Lo.lineEnd=Mo},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Lo.lineStart=Lo.lineEnd=Lo.point=Rt,yo.add(bt(vo)),vo.reset()},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=yo/2;return yo.reset(),t},"result")};function wo(){Lo.point=bo}function bo(t,e){Lo.point=xo,_o=mo=t,fo=go=e}function xo(t,e){vo.add(go*t-mo*e),mo=t,go=e}function Mo(){xo(_o,fo)}n(wo,"areaRingStart"),n(bo,"areaPointFirst"),n(xo,"areaPoint"),n(Mo,"areaRingEnd");var Co=1/0,Po=Co,ko=-Co,Eo=ko,To={point:So,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:/* @__PURE__ */n(function(){var t=[[Co,Po],[ko,Eo]];return ko=Eo=-(Po=Co=1/0),t},"result")};function So(t,e){t<Co&&(Co=t),t>ko&&(ko=t),e<Po&&(Po=e),e>Eo&&(Eo=e)}n(So,"boundsPoint$1");var Oo,zo,Do,Io,Ao=0,Bo=0,Ro=0,Zo=0,No=0,jo=0,Ho=0,Go=0,Fo=0,Uo={point:Wo,lineStart:Vo,lineEnd:$o,polygonStart:/* @__PURE__ */n(function(){Uo.lineStart=Ko,Uo.lineEnd=Xo},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){Uo.point=Wo,Uo.lineStart=Vo,Uo.lineEnd=$o},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=Fo?[Ho/Fo,Go/Fo]:jo?[Zo/jo,No/jo]:Ro?[Ao/Ro,Bo/Ro]:[NaN,NaN];return Ao=Bo=Ro=Zo=No=jo=Ho=Go=Fo=0,t},"result")};function Wo(t,e){Ao+=t,Bo+=e,++Ro}function Vo(){Uo.point=qo}function qo(t,e){Uo.point=Yo,Wo(Do=t,Io=e)}function Yo(t,e){var i=t-Do,o=e-Io,n=zt(i*i+o*o);Zo+=n*(Do+t)/2,No+=n*(Io+e)/2,jo+=n,Wo(Do=t,Io=e)}function $o(){Uo.point=Wo}function Ko(){Uo.point=Jo}function Xo(){Qo(Oo,zo)}function Jo(t,e){Uo.point=Qo,Wo(Oo=Do=t,zo=Io=e)}function Qo(t,e){var i=t-Do,o=e-Io,n=zt(i*i+o*o);Zo+=n*(Do+t)/2,No+=n*(Io+e)/2,jo+=n,Ho+=(n=Io*t-Do*e)*(Do+t),Go+=n*(Io+e),Fo+=3*n,Wo(Do=t,Io=e)}function tn(t){this._context=t}n(Wo,"centroidPoint"),n(Vo,"centroidLineStart"),n(qo,"centroidPointFirstLine"),n(Yo,"centroidPointLine"),n($o,"centroidLineEnd"),n(Ko,"centroidRingStart"),n(Xo,"centroidRingEnd"),n(Jo,"centroidPointFirstRing"),n(Qo,"centroidPointRing"),n(tn,"PathContext"),tn.prototype={_radius:4.5,pointRadius:/* @__PURE__ */n(function(t){return this._radius=t,this},"pointRadius"),polygonStart:/* @__PURE__ */n(function(){this._line=0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this._line=NaN},"polygonEnd"),lineStart:/* @__PURE__ */n(function(){this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){0===this._line&&this._context.closePath(),this._point=NaN},"lineEnd"),point:/* @__PURE__ */n(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,vt)}},"point"),result:Rt};var en,on,nn,sn,rn,an=ut(),ln={point:Rt,lineStart:/* @__PURE__ */n(function(){ln.point=hn},"lineStart"),lineEnd:/* @__PURE__ */n(function(){en&&un(on,nn),ln.point=Rt},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){en=!0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){en=null},"polygonEnd"),result:/* @__PURE__ */n(function(){var t=+an;return an.reset(),t},"result")};function hn(t,e){ln.point=un,on=sn=t,nn=rn=e}function un(t,e){sn-=t,rn-=e,an.add(zt(sn*sn+rn*rn)),sn=t,rn=e}function cn(){this._string=[]}function pn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function dn(t,e){var i,o,s=4.5;function r(t){return t&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),Ft(t,i(o))),o.result()}return n(r,"path"),r.area=function(t){return Ft(t,i(Lo)),Lo.result()},r.measure=function(t){return Ft(t,i(ln)),ln.result()},r.bounds=function(t){return Ft(t,i(To)),To.result()},r.centroid=function(t){return Ft(t,i(Uo)),Uo.result()},r.projection=function(e){return arguments.length?(i=null==e?(t=null,po):(t=e).stream,r):t},r.context=function(t){return arguments.length?(o=null==t?(e=null,new cn):new tn(e=t),"function"!=typeof s&&o.pointRadius(s),r):e},r.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),r):s},r.projection(t).context(e)}function _n(t){return{stream:fn(t)}}function fn(t){return function(e){var i=new mn;for(var o in t)i[o]=t[o];return i.stream=e,i}}function mn(){}function gn(t,e,i){var o=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),Ft(i,t.stream(To)),e(To.result()),null!=o&&t.clipExtent(o),t}function yn(t,e,i){return gn(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 vn(t,e,i){return yn(t,[[0,0],e],i)}function Ln(t,e,i){return gn(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 wn(t,e,i){return gn(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)}n(hn,"lengthPointFirst"),n(un,"lengthPoint"),n(cn,"PathString"),cn.prototype={_radius:4.5,_circle:pn(4.5),pointRadius:/* @__PURE__ */n(function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},"pointRadius"),polygonStart:/* @__PURE__ */n(function(){this._line=0},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this._line=NaN},"polygonEnd"),lineStart:/* @__PURE__ */n(function(){this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){0===this._line&&this._string.push("Z"),this._point=NaN},"lineEnd"),point:/* @__PURE__ */n(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=pn(this._radius)),this._string.push("M",t,",",e,this._circle)}},"point"),result:/* @__PURE__ */n(function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null},"result")},n(pn,"circle"),n(dn,"d3GeoPath"),n(_n,"d3GeoTransform"),n(fn,"transformer"),n(mn,"TransformStream"),mn.prototype={constructor:mn,point:/* @__PURE__ */n(function(t,e){this.stream.point(t,e)},"point"),sphere:/* @__PURE__ */n(function(){this.stream.sphere()},"sphere"),lineStart:/* @__PURE__ */n(function(){this.stream.lineStart()},"lineStart"),lineEnd:/* @__PURE__ */n(function(){this.stream.lineEnd()},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){this.stream.polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){this.stream.polygonEnd()},"polygonEnd")},n(gn,"fit"),n(yn,"fitExtent$1"),n(vn,"fitSize$1"),n(Ln,"fitWidth"),n(wn,"fitHeight");var bn=Ct(30*wt);function xn(t,e){return+e?Cn(t,e):Mn(t)}function Mn(t){return fn({point:/* @__PURE__ */n(function(e,i){e=t(e,i),this.stream.point(e[0],e[1])},"point")})}function Cn(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=zt(L*L+w*w+b*b),M=At(b/=x),C=bt(bt(b)-1)<_t||bt(s-c)<_t?(s+c)/2:Mt(w,L),P=t(C,M),k=P[0],E=P[1],T=k-o,S=E-n,O=y*T-g*S;(O*O/v>e||bt((g*T+y*S)/v-.5)>.3||r*p+a*d+l*_<bn)&&(i(o,n,s,r,a,l,k,E,C,L/=x,w/=x,b,f,m),m.point(k,E),i(k,E,C,L,w,b,h,u,c,p,d,_,f,m))}}return n(i,"resampleLineTo"),function(e){var o,s,r,a,l,h,u,c,p,d,_,f,m={point:g,lineStart:y,lineEnd:L,polygonStart:/* @__PURE__ */n(function(){e.polygonStart(),m.lineStart=w},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){e.polygonEnd(),m.lineStart=y},"polygonEnd")};function g(i,o){i=t(i,o),e.point(i[0],i[1])}function y(){c=NaN,m.point=v,e.lineStart()}function v(o,n){var s=ne([o,n]),r=t(o,n);i(c,p,u,d,_,f,c=r[0],p=r[1],u=o,d=s[0],_=s[1],f=s[2],16,e),e.point(c,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),s=c,r=p,a=d,l=_,h=f,m.point=v}function x(){i(c,p,u,d,_,f,s,r,o,a,l,h,16,e),m.lineEnd=L,L()}return n(g,"point"),n(y,"lineStart"),n(v,"linePoint"),n(L,"lineEnd"),n(w,"ringStart"),n(b,"ringPoint"),n(x,"ringEnd"),m}}n(xn,"resample"),n(Mn,"resampleNone"),n(Cn,"resample$1");var Pn=fn({point:/* @__PURE__ */n(function(t,e){this.stream.point(t*wt,e*wt)},"point")});function kn(t){return fn({point:/* @__PURE__ */n(function(e,i){var o=t(e,i);return this.stream.point(o[0],o[1])},"point")})}function En(t,e,i,o,s){function r(n,r){return[e+t*(n*=o),i-t*(r*=s)]}return n(r,"transform"),r.invert=function(n,r){return[(n-e)/t*o,(i-r)/t*s]},r}function Tn(t,e,i,o,s,r){var a=Ct(r),l=St(r),h=a*t,u=l*t,c=a/t,p=l/t,d=(l*i-a*e)/t,_=(l*e+a*i)/t;function f(t,n){return[h*(t*=o)-u*(n*=s)+e,i-u*t-h*n]}return n(f,"transform"),f.invert=function(t,e){return[o*(c*t-p*e+d),s*(_-p*t-c*e)]},f}function Sn(t){return On(function(){return t})()}function On(t){var e,i,o,s,r,a,l,h,u,c,p=150,d=480,_=250,f=0,m=0,g=0,y=0,v=0,L=0,w=1,b=1,x=null,M=Ti,C=null,P=po,k=.5;function E(t){return h(t[0]*wt,t[1]*wt)}function T(t){return(t=h.invert(t[0],t[1]))&&[t[0]*Lt,t[1]*Lt]}function S(){var t=Tn(p,0,0,w,b,L).apply(null,e(f,m)),o=(L?Tn:En)(p,d-t[0],_-t[1],w,b,L);return i=ui(g,y,v),l=li(e,o),h=li(i,l),a=xn(l,k),O()}function O(){return u=c=null,E}return n(E,"projection"),n(T,"invert"),E.stream=function(t){return u&&c===t?u:u=Pn(kn(i)(M(a(P(c=t)))))},E.preclip=function(t){return arguments.length?(M=t,x=void 0,O()):M},E.postclip=function(t){return arguments.length?(P=t,C=o=s=r=null,O()):P},E.clipAngle=function(t){return arguments.length?(M=+t?Di(x=t*wt):(x=null,Ti),O()):x*Lt},E.clipExtent=function(t){return arguments.length?(P=null==t?(C=o=s=r=null,po):Ri(C=+t[0][0],o=+t[0][1],s=+t[1][0],r=+t[1][1]),O()):null==C?null:[[C,o],[s,r]]},E.scale=function(t){return arguments.length?(p=+t,S()):p},E.translate=function(t){return arguments.length?(d=+t[0],_=+t[1],S()):[d,_]},E.center=function(t){return arguments.length?(f=t[0]%360*wt,m=t[1]%360*wt,S()):[f*Lt,m*Lt]},E.rotate=function(t){return arguments.length?(g=t[0]%360*wt,y=t[1]%360*wt,v=t.length>2?t[2]%360*wt:0,S()):[g*Lt,y*Lt,v*Lt]},E.angle=function(t){return arguments.length?(L=t%360*wt,S()):L*Lt},E.reflectX=function(t){return arguments.length?(w=t?-1:1,S()):w<0},E.reflectY=function(t){return arguments.length?(b=t?-1:1,S()):b<0},E.precision=function(t){return arguments.length?(a=xn(l,k=t*t),O()):zt(k)},E.fitExtent=function(t,e){return yn(E,t,e)},E.fitSize=function(t,e){return vn(E,t,e)},E.fitWidth=function(t,e){return Ln(E,t,e)},E.fitHeight=function(t,e){return wn(E,t,e)},n(S,"recenter"),n(O,"reset"),function(){return e=t.apply(this,arguments),E.invert=e.invert&&T,S()}}function zn(t){var e=0,i=mt/3,o=On(t),n=o(e,i);return n.parallels=function(t){return arguments.length?o(e=t[0]*wt,i=t[1]*wt):[e*Lt,i*Lt]},n}function Dn(t){var e=Ct(t);function i(t,i){return[t*e,St(i)/e]}return n(i,"forward"),i.invert=function(t,i){return[t/e,At(i*e)]},i}function In(t,e){var i=St(t),o=(i+St(e))/2;if(bt(o)<_t)return Dn(t);var s=1+i*(2*o-i),r=zt(s)/o;function a(t,e){var i=zt(s-2*o*St(e))/o;return[i*St(t*=o),r-i*Ct(t)]}return n(a,"project"),a.invert=function(t,e){var i=r-e,n=Mt(t,bt(i))*Ot(i);return i*o<0&&(n-=mt*Ot(t)*Ot(i)),[n/o,At((s-(t*t+i*i)*o*o)/(2*o))]},a}function An(){return zn(In).scale(155.424).center([0,33.6442])}function Bn(){return An().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Rn(t){var e=t.length;return{point:/* @__PURE__ */n(function(i,o){for(var n=-1;++n<e;)t[n].point(i,o)},"point"),sphere:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].sphere()},"sphere"),lineStart:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].lineStart()},"lineStart"),lineEnd:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].lineEnd()},"lineEnd"),polygonStart:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].polygonStart()},"polygonStart"),polygonEnd:/* @__PURE__ */n(function(){for(var i=-1;++i<e;)t[i].polygonEnd()},"polygonEnd")}}function Zn(){var t,e,i,o,s,r,a=Bn(),l=An().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h=An().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:/* @__PURE__ */n(function(t,e){r=[t,e]},"point")};function c(t){var e=t[0],n=t[1];return r=null,i.point(e,n),r||(o.point(e,n),r)||(s.point(e,n),r)}function p(){return t=e=null,c}return n(c,"albersUsa"),c.invert=function(t){var e=a.scale(),i=a.translate(),o=(t[0]-i[0])/e,n=(t[1]-i[1])/e;return(n>=.12&&n<.234&&o>=-.425&&o<-.214?l:n>=.166&&n<.234&&o>=-.214&&o<-.115?h:a).invert(t)},c.stream=function(i){return t&&e===i?t:t=Rn([a.stream(e=i),l.stream(i),h.stream(i)])},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),h.precision(t),p()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),h.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),n=+t[0],r=+t[1];return i=a.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),o=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+_t,r+.12*e+_t],[n-.214*e-_t,r+.234*e-_t]]).stream(u),s=h.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+_t,r+.166*e+_t],[n-.115*e-_t,r+.234*e-_t]]).stream(u),p()},c.fitExtent=function(t,e){return yn(c,t,e)},c.fitSize=function(t,e){return vn(c,t,e)},c.fitWidth=function(t,e){return Ln(c,t,e)},c.fitHeight=function(t,e){return wn(c,t,e)},n(p,"reset"),c.scale(1070)}function Nn(t){return function(e,i){var o=Ct(e),n=Ct(i),s=t(o*n);return[s*n*St(e),s*St(i)]}}function jn(t){return function(e,i){var o=zt(e*e+i*i),n=t(o),s=St(n),r=Ct(n);return[Mt(e*s,o*r),At(o&&i*s/o)]}}n(kn,"transformRotate"),n(En,"scaleTranslate"),n(Tn,"scaleTranslateRotate"),n(Sn,"projection"),n(On,"projectionMutator"),n(zn,"conicProjection"),n(Dn,"cylindricalEqualAreaRaw"),n(In,"conicEqualAreaRaw"),n(An,"geoConicEqualArea"),n(Bn,"geoAlbers"),n(Rn,"multiplex$1"),n(Zn,"albersUsa"),n(Nn,"azimuthalRaw"),n(jn,"azimuthalInvert");var Hn=Nn(function(t){return zt(2/(1+t))});function Gn(){return Sn(Hn).scale(124.75).clipAngle(179.999)}Hn.invert=jn(function(t){return 2*At(t/2)}),n(Gn,"azimuthalEqualArea");var Fn=Nn(function(t){return(t=It(t))&&t/St(t)});function Un(){return Sn(Fn).scale(79.4188).clipAngle(179.999)}function Wn(t,e){return[t,Et(Dt((gt+e)/2))]}function Vn(){return qn(Wn).scale(961/vt)}function qn(t){var e,i,o,s=Sn(t),r=s.center,a=s.scale,l=s.translate,h=s.clipExtent,u=null;function c(){var n=mt*a(),r=s(_i(s.rotate()).invert([0,0]));return h(null==u?[[r[0]-n,r[1]-n],[r[0]+n,r[1]+n]]:t===Wn?[[Math.max(r[0]-n,u),e],[Math.min(r[0]+n,i),o]]:[[u,Math.max(r[1]-n,e)],[i,Math.min(r[1]+n,o)]])}return s.scale=function(t){return arguments.length?(a(t),c()):a()},s.translate=function(t){return arguments.length?(l(t),c()):l()},s.center=function(t){return arguments.length?(r(t),c()):r()},s.clipExtent=function(t){return arguments.length?(null==t?u=e=i=o=null:(u=+t[0][0],e=+t[0][1],i=+t[1][0],o=+t[1][1]),c()):null==u?null:[[u,e],[i,o]]},n(c,"reclip"),c()}function Yn(t){return Dt((gt+t)/2)}function $n(t,e){var i=Ct(t),o=t===e?St(t):Et(i/Ct(e))/Et(Yn(e)/Yn(t)),s=i*Tt(Yn(t),o)/o;if(!o)return Wn;function r(t,e){s>0?e<-gt+_t&&(e=-gt+_t):e>gt-_t&&(e=gt-_t);var i=s/Tt(Yn(e),o);return[i*St(o*t),s-i*Ct(o*t)]}return n(r,"project"),r.invert=function(t,e){var i=s-e,n=Ot(o)*zt(t*t+i*i),r=Mt(t,bt(i))*Ot(i);return i*o<0&&(r-=mt*Ot(t)*Ot(i)),[r/o,2*xt(Tt(s/n,1/o))-gt]},r}function Kn(){return zn($n).scale(109.5).parallels([30,30])}function Xn(t,e){return[t,e]}function Jn(){return Sn(Xn).scale(152.63)}function Qn(t,e){var i=Ct(t),o=t===e?St(t):(i-Ct(e))/(e-t),s=i/o+t;if(bt(o)<_t)return Xn;function r(t,e){var i=s-e,n=o*t;return[i*St(n),s-i*Ct(n)]}return n(r,"project"),r.invert=function(t,e){var i=s-e,n=Mt(t,bt(i))*Ot(i);return i*o<0&&(n-=mt*Ot(t)*Ot(i)),[n/o,s-Ot(o)*zt(t*t+i*i)]},r}function ts(){return zn(Qn).scale(131.154).center([0,13.9389])}Fn.invert=jn(function(t){return t}),n(Un,"azimuthalEquidistant"),n(Wn,"mercatorRaw"),Wn.invert=function(t,e){return[t,2*xt(kt(e))-gt]},n(Vn,"mercator"),n(qn,"mercatorProjection"),n(Yn,"tany"),n($n,"conicConformalRaw"),n(Kn,"conicConformal"),n(Xn,"equirectangularRaw"),Xn.invert=Xn,n(Jn,"equirectangular"),n(Qn,"conicEquidistantRaw"),n(ts,"conicEquidistant");var es=1.340264,is=-.081106,os=893e-6,ns=.003796,ss=zt(3)/2;function rs(t,e){var i=At(ss*St(e)),o=i*i,n=o*o*o;return[t*Ct(i)/(ss*(es+3*is*o+n*(7*os+9*ns*o))),i*(es+is*o+n*(os+ns*o))]}function as(){return Sn(rs).scale(177.158)}function ls(t,e){var i=Ct(e),o=Ct(t)*i;return[i*St(t)/o,St(e)/o]}function hs(){return Sn(ls).scale(144.049).clipAngle(60)}function us(){var t,e,i,o,s,r,a,l=1,h=0,u=0,c=1,p=1,d=0,_=null,f=1,m=1,g=fn({point:/* @__PURE__ */n(function(t,e){var i=L([t,e]);this.stream.point(i[0],i[1])},"point")}),y=po;function v(){return f=l*c,m=l*p,r=a=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+h,n+u]}return n(v,"reset"),n(L,"projection"),L.invert=function(i){var o=i[0]-h,n=i[1]-u;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 r&&a===t?r:r=g(y(a=t))},L.postclip=function(t){return arguments.length?(y=t,_=i=o=s=null,v()):y},L.clipExtent=function(t){return arguments.length?(y=null==t?(_=i=o=s=null,po):Ri(_=+t[0][0],i=+t[0][1],o=+t[1][0],s=+t[1][1]),v()):null==_?null:[[_,i],[o,s]]},L.scale=function(t){return arguments.length?(l=+t,v()):l},L.translate=function(t){return arguments.length?(h=+t[0],u=+t[1],v()):[h,u]},L.angle=function(i){return arguments.length?(e=St(d=i%360*wt),t=Ct(d),v()):d*Lt},L.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},L.reflectY=function(t){return arguments.length?(p=t?-1:1,v()):p<0},L.fitExtent=function(t,e){return yn(L,t,e)},L.fitSize=function(t,e){return vn(L,t,e)},L.fitWidth=function(t,e){return Ln(L,t,e)},L.fitHeight=function(t,e){return wn(L,t,e)},L}function cs(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 ps(){return Sn(cs).scale(175.295)}function ds(t,e){return[Ct(e)*St(t),St(e)]}function _s(){return Sn(ds).scale(249.5).clipAngle(90.000001)}function fs(t,e){var i=Ct(e),o=1+Ct(t)*i;return[i*St(t)/o,St(e)/o]}function ms(){return Sn(fs).scale(250).clipAngle(142)}function gs(t,e){return[Et(Dt((gt+e)/2)),-t]}function ys(){var t=qn(gs),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)}n(rs,"equalEarthRaw"),rs.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*(es+is*n+s*(os+ns*n))-e)/(es+3*is*n+s*(7*os+9*ns*n)))*o)*n*n,!(bt(i)<ft));++r);return[ss*t*(es+3*is*n+s*(7*os+9*ns*n))/Ct(o),At(St(o)/ss)]},n(as,"equalEarth"),n(ls,"gnomonicRaw"),ls.invert=jn(xt),n(hs,"gnomonic"),n(us,"identity$1"),n(cs,"naturalEarth1Raw"),cs.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(bt(i)>_t&&--n>0);return[t/(.8707+(s=o*o)*(s*(s*s*s*(.003971-.001529*s)-.013791)-.131979)),o]},n(ps,"naturalEarth1"),n(ds,"orthographicRaw"),ds.invert=jn(At),n(_s,"orthographic"),n(fs,"stereographicRaw"),fs.invert=jn(function(t){return 2*xt(t)}),n(ms,"stereographic"),n(gs,"transverseMercatorRaw"),gs.invert=function(t,e){return[-e,2*xt(kt(t))-gt]},n(ys,"transverseMercator");const vs=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,geoAlbers:Bn,geoAlbersUsa:Zn,geoArea:ie,geoAzimuthalEqualArea:Gn,geoAzimuthalEqualAreaRaw:Hn,geoAzimuthalEquidistant:Un,geoAzimuthalEquidistantRaw:Fn,geoBounds:Ye,geoCentroid:ri,geoCircle:gi,geoClipAntimeridian:Ti,geoClipCircle:Di,geoClipExtent:Zi,geoClipRectangle:Ri,geoConicConformal:Kn,geoConicConformalRaw:$n,geoConicEqualArea:An,geoConicEqualAreaRaw:In,geoConicEquidistant:ts,geoConicEquidistantRaw:Qn,geoContains:ro,geoDistance:Xi,geoEqualEarth:as,geoEqualEarthRaw:rs,geoEquirectangular:Jn,geoEquirectangularRaw:Xn,geoGnomonic:hs,geoGnomonicRaw:ls,geoGraticule:ho,geoGraticule10:uo,geoIdentity:us,geoInterpolate:co,geoLength:Yi,geoMercator:Vn,geoMercatorRaw:Wn,geoNaturalEarth1:ps,geoNaturalEarth1Raw:cs,geoOrthographic:_s,geoOrthographicRaw:ds,geoPath:dn,geoProjection:Sn,geoProjectionMutator:On,geoRotation:_i,geoStereographic:ms,geoStereographicRaw:fs,geoStream:Ft,geoTransform:_n,geoTransverseMercator:ys,geoTransverseMercatorRaw:gs},Symbol.toStringTag,{value:"Module"}));function Ls(){}n(Ls,"noop");let ws=1/0,bs=ws,xs=-ws,Ms=xs;function Cs(t,e){t<ws&&(ws=t),t>xs&&(xs=t),e<bs&&(bs=e),e>Ms&&(Ms=e)}n(Cs,"boundsPoint");const Ps={point:Cs,lineStart:Ls,lineEnd:Ls,polygonStart:Ls,polygonEnd:Ls,result(){const t=[[ws,bs],[xs,Ms]];return xs=Ms=-(bs=ws=1/0),t}};function ks(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),Ft(i,t.stream(Ps));const r=Ps.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 Es(t,e,i){return ks(t,[[0,0],e],i)}n(ks,"fitExtent"),n(Es,"fitSize");const Ts=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)}};n(Ts,"Geohash"),s(Ts,"base32","0123456789bcdefghjkmnpqrstuvwxyz");let Ss=Ts;function Os(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 zs(){let t,e;const i=1e-6,o=Bn();let s;const r=An().rotate([154,0]).center([-2,58.5]).parallels([55,65]);let a;const l=An().rotate([157,0]).center([-3,19.9]).parallels([8,18]);let h;const u=An().rotate([66,0]).center([0,18]).parallels([8,18]);let c,p;const d={point:/* @__PURE__ */n((t,e)=>{p=[t,e]},"point")},_=/* @__PURE__ */n(function(t){const e=t[0],i=t[1];return p=null,s.point(e,i),p||(a.point(e,i),p)||(h.point(e,i),p)||c.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,s=(t[1]-i[1])/e;return(s>=.12&&s<.234&&n>=-.425&&n<-.214?r:s>=.166&&s<.234&&n>=-.214&&n<-.115?l:s>=.204&&s<.234&&n>=.32&&n<.38?u:o).invert(t)},_.stream=function(i){return t&&e===i?t:t=Os([o.stream(e=i),r.stream(i),l.stream(i),u.stream(i)])},_.precision=function(t){return arguments.length?(o.precision(t),r.precision(t),l.precision(t),u.precision(t),f()):o.precision()},_.scale=function(t){return arguments.length?(o.scale(t),r.scale(.35*t),l.scale(t),u.scale(t),_.translate(o.translate())):o.scale()},_.translate=function(t){if(!arguments.length)return o.translate();const e=o.scale(),n=+t[0],p=+t[1];return s=o.translate(t).clipExtent([[n-.455*e,p-.238*e],[n+.455*e,p+.238*e]]).stream(d),a=r.translate([n-.307*e,p+.201*e]).clipExtent([[n-.425*e+i,p+.12*e+i],[n-.214*e-i,p+.234*e-i]]).stream(d),h=l.translate([n-.205*e,p+.212*e]).clipExtent([[n-.214*e+i,p+.166*e+i],[n-.115*e-i,p+.234*e-i]]).stream(d),c=u.translate([n+.35*e,p+.224*e]).clipExtent([[n+.32*e,p+.204*e],[n+.38*e,p+.234*e]]).stream(d),f()},_.fitExtent=function(t,e){return ks(_,t,e)},_.fitSize=function(t,e){return Es(_,t,e)},n(f,"reset"),_.scale(1070)}n(Os,"multiplex"),n(zs,"albersUsaPr");var Ds=/* @__PURE__ */(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))(Ds||{});const Is=[],As={};for(const L in Ds)"string"==typeof L&&(Is.push(L),As[L]="AlbersUsaPr"===L?zs:vs[`geo${L}`]);function Bs(t){const e=As[t];return e?e():(console.warn("Unknown projection: "+t),Vn())}n(Bs,"resolve");const Rs=2048/Math.PI,Zs=class _Layered extends h{_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,e){super.update(t,e);const i=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),o=this;i.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=u(this),t._domElement=o._parentOverlay.append("div"),t.layerEnter(o,t._svgElement,t._domElement)}).merge(i).each(function(t){t.layerUpdate(o)}),i.exit().each(function(t){t.layerExit(o),t._domElement.remove()}).remove(),i.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 e=this;return this.preRender().then(function(){h.prototype.render.call(e,function(i){e._layersTarget&&(e._renderCount&&e._autoScaleOnNextRender||e._prevAutoScaleMode!==e.autoScaleMode())?(e._prevAutoScaleMode=e.autoScaleMode(),e._autoScaleOnNextRender=!1,e.autoScale(),t&&t(i)):t&&t(i)})}),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())}}};n(Zs,"Layered");let Ns=Zs;Ns.prototype._class+=" map_Layered",Ns.prototype.publish("projection",null,"set","Map projection type",Is),Ns.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),Ns.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),Ns.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),Ns.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),Ns.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});const js=Ns.prototype.projection;Ns.prototype.projection=function(t){const e=js.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=Bs(t).scale(Rs).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=dn().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};const Hs=class _Layer extends Ns{_svgElement;_domElement;_topoJsonPromise;constructor(){super(),k.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(){Ns.prototype.render.apply(e,i)}),this}layerZoomed(t){}};n(Hs,"Layer");let Gs=Hs;Gs.prototype._class+=" map_Layer",Gs.prototype.implements(k.prototype);const Fs=class _CanvasPinLayer extends Gs{_pinsTransform;pins;_prevProjection;constructor(){super(),this.pins=new ht}layerEnter(t,e,i){Gs.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){Gs.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){Gs.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()}};n(Fs,"CanvasPinLayer");let Us=Fs;function Ws(t){return t}function Vs(t){if(null==t)return Ws;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 qs(t,e){for(var i,o=t.length,n=o-e;n<--o;)i=t[n],t[n++]=t[o],t[o]=i}function Ys(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return $s(t,e)})}:$s(t,e)}function $s(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=Vs(t.transform),o=t.arcs;function s(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&&qs(e,r)}function r(t){return i(t)}function a(t){for(var e=[],i=0,o=t.length;i<o;++i)s(t[i],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function h(t){return t.map(l)}function u(t){var e,i=t.type;switch(i){case"GeometryCollection":return{type:i,geometries:t.geometries.map(u)};case"Point":e=r(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(r);break;case"LineString":e=a(t.arcs);break;case"MultiLineString":e=t.arcs.map(a);break;case"Polygon":e=h(t.arcs);break;case"MultiPolygon":e=t.arcs.map(h);break;default:return null}return{type:i,coordinates:e}}return n(s,"arc"),n(r,"point"),n(a,"line"),n(l,"ring"),n(h,"polygon"),n(u,"geometry"),u(e)}function Xs(t,e){var i={},o={},s={},r=[],a=-1;function l(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 h(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}),r.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[++a],e[a]=i,e[o]=n)}),e.forEach(function(t){var e,i,n=l(t),r=n[0],a=n[1];if(e=s[r])if(delete s[e.end],e.push(t),e.end=a,i=o[a]){delete o[i.start];var h=i===e?e:e.concat(i);o[h.start=e.start]=s[h.end=i.end]=h}else o[e.start]=s[e.end]=e;else if(e=o[a])if(delete o[e.start],e.unshift(t),e.start=r,i=s[r]){delete s[i.end];var u=i===e?e:i.concat(e);o[u.start=i.start]=s[u.end=e.end]=u}else o[e.start]=s[e.end]=e;else o[(e=[t]).start=r]=s[e.end=a]=e}),n(l,"ends"),n(h,"flush"),h(s,o),h(o,s),e.forEach(function(t){i[t<0?~t:t]||r.push([t])}),r}function Js(t){return Ks(t,Qs.apply(this,arguments))}function Qs(t,e,i){var o,n,s;if(arguments.length>1)o=tr(t,e,i);else for(n=0,o=new Array(s=t.arcs.length);n<s;++n)o[n]=n;return{type:"MultiLineString",arcs:Xs(t,o)}}function tr(t,e,i){var o,s=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:o})}function l(t){t.forEach(a)}function h(t){t.forEach(l)}function u(t){t.forEach(h)}function c(t){switch(o=t,t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"LineString":l(t.arcs);break;case"MultiLineString":case"Polygon":h(t.arcs);break;case"MultiPolygon":u(t.arcs)}}return n(a,"extract0"),n(l,"extract1"),n(h,"extract2"),n(u,"extract3"),n(c,"geometry"),c(e),r.forEach(null==i?function(t){s.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&s.push(t[0].i)}),s}Us.prototype._class+=" map_CanvasPinLayer",Us.prototype.publishProxy("clusterMode","pins","clusterMode"),Us.prototype.publishProxy("allCircles","pins","allCircles"),Us.prototype.publishProxy("showQuadtree","pins","showQuadtree"),Us.prototype.publishProxy("useAveragePos","pins","useAveragePos"),Us.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),Us.prototype.publishProxy("enableClustering","pins","enableClustering"),Us.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),Us.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),Us.prototype.publishProxy("searchRectMult","pins","searchRectMult"),Us.prototype.publishProxy("pinHeight","pins","pinHeight"),Us.prototype.publishProxy("pinWidth","pins","pinWidth"),Us.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),Us.prototype.publishProxy("pinFontSize","pins","pinFontSize"),Us.prototype.publishProxy("arrowHeight","pins","arrowHeight"),Us.prototype.publishProxy("arrowWidth","pins","arrowWidth"),Us.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),Us.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),n(Ws,"identity"),n(Vs,"transform"),n(qs,"reverse"),n(Ys,"feature_default"),n($s,"feature"),n(Ks,"object"),n(Xs,"stitch"),n(Js,"mesh"),n(Qs,"meshArcs"),n(tr,"extractArcs");let er=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function ir(t){if(!arguments.length)return er;const e=er;return er=t,e}n(ir,"topoJsonFolder");const or=class _Choropleth extends Gs{_dataMap={};_path=u(null);_dataMinWeight;_dataMaxWeight;_choroplethData;_choroplethTransform;_choropleth;_choroTopology;_choroTopologyObjects;_prevProjection;_prevInternalOnly;constructor(){super(),c.SimpleSelectionMixin.call(this)}data(t){const e=Gs.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){Gs.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(Gs.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(Js(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){}};n(or,"Choropleth");let nr=or;function sr(t,e){var i,o,s,r,a=d("beforesend","progress","load","error"),l=_(),h=new XMLHttpRequest,u=null,c=null,p=0;function f(t){var e,o=h.status;if(!o&&ar(h)||o>=200&&o<300||304===o){if(s)try{e=s.call(i,h)}catch(n){return void a.call("error",i,n)}else e=h;a.call("load",i,e)}else a.call("error",i,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=f:h.onreadystatechange=function(t){h.readyState>3&&f(t)},n(f,"respond"),h.onprogress=function(t){a.call("progress",i,t)},i={header:/* @__PURE__ */n(function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),i)},"header"),mimeType:/* @__PURE__ */n(function(t){return arguments.length?(o=null==t?null:t+"",i):o},"mimeType"),responseType:/* @__PURE__ */n(function(t){return arguments.length?(r=t,i):r},"responseType"),timeout:/* @__PURE__ */n(function(t){return arguments.length?(p=+t,i):p},"timeout"),user:/* @__PURE__ */n(function(t){return arguments.length<1?u:(u=null==t?null:t+"",i)},"user"),password:/* @__PURE__ */n(function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},"password"),response:/* @__PURE__ */n(function(t){return s=t,i},"response"),get:/* @__PURE__ */n(function(t,e){return i.send("GET",t,e)},"get"),post:/* @__PURE__ */n(function(t,e){return i.send("POST",t,e)},"post"),send:/* @__PURE__ */n(function(e,n,s){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each(function(t,e){h.setRequestHeader(e,t)}),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=r&&(h.responseType=r),p>0&&(h.timeout=p),null==s&&"function"==typeof n&&(s=n,n=null),null!=s&&1===s.length&&(s=rr(s)),null!=s&&i.on("error",s).on("load",function(t){s(null,t)}),a.call("beforesend",i,h),h.send(null==n?null:n),i},"send"),abort:/* @__PURE__ */n(function(){return h.abort(),i},"abort"),on:/* @__PURE__ */n(function(){var t=a.on.apply(a,arguments);return t===a?i:t},"on")},i}function rr(t){return function(e,i){t(null==e?i:null)}}function ar(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function lr(t,e){return function(i,o){var n=sr(i).mimeType(t).response(e);if(null!=o){if("function"!=typeof o)throw new Error("invalid callback: "+o);return n.get(o)}return n}}nr.prototype._class+=" map_Choropleth",nr.prototype.mixin(c.SimpleSelectionMixin),nr.prototype._palette=p.rainbow("default"),nr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",nr.prototype._palette.switch(),{tags:["Basic","Shared"]}),nr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),nr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),nr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),nr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),nr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),nr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),nr.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0}),n(sr,"request"),n(rr,"fixCallback"),n(ar,"hasResponse"),n(lr,"type$1");const hr=lr("application/json",function(t){return JSON.parse(t.responseText)});let ur=null,cr=null,pr=null;const dr=class _ChoroplethCountries extends nr{_choroTopologyObjectsCountries;_choroTopologyObjectsLand;choroPaths;constructor(){super()}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=ur.topology,this._choroTopologyObjectsCountries=ur.topology.objects.countries,this._choroTopologyObjectsLand=ur.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){return o.tooltipFormat({label:t[0],value:t[1]})})}layerUpdate(t){nr.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(pr[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)=>{ur&&t(),hr(`${ir()}/countries.json`,function(e){ur=e,cr=Ys(ur.topology,ur.topology.objects.countries).features,pr={};for(const t in cr)cr[t].id&&ur.countryNames[cr[t].id]&&(pr[ur.countryNames[cr[t].id].name]=cr[t]);t()})})),this._topoJsonPromise}};n(dr,"ChoroplethCountries");let _r=dr;_r.prototype._class+=" map_ChoroplethCountries";const fr=class _ChoroplethContinents extends _r{constructor(){super()}layerEnter(t,e,i){_r.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand}};n(fr,"ChoroplethContinents");let mr=fr;mr.prototype._class+=" map_ChoroplethContinents";let gr=null,yr=null,vr=null;const Lr=class _ChoroplethCounties extends nr{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=gr.topology,this._choroTopologyObjects=gr.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=t[0];return o.tooltipFormat({label:gr.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})}layerUpdate(t){nr.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(vr[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)=>{gr&&t(),hr(`${ir()}/us-counties.json`,function(e){gr=e,yr=Ys(gr.topology,gr.topology.objects.counties).features,vr={};for(const t in yr)yr[t].id&&(vr[yr[t].id]=yr[t]);t()})})),this._topoJsonPromise}};n(Lr,"ChoroplethCounties"),s(Lr,"__inputs",[{id:"fips",type:"string"},{id:"value",type:"number"}]);let wr=Lr;wr.prototype._class+=" map_ChoroplethCounties",wr.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");let br=null,xr=null,Mr=null;const Cr=class _ChoroplethStates extends nr{choroPaths;constructor(){super(),this.projection("AlbersUsaPr")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._choroTopology=br.topology,this._choroTopologyObjects=br.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=Mr[t[0]].id;return o.tooltipFormat({label:br.stateNames[e].name,value:t[1]})})}layerUpdate(t){nr.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(Mr[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)=>{br&&t(),hr(`${ir()}/us-states.json`,function(e){br=e,xr=Ys(br.topology,br.topology.objects.states).features,Mr={};for(const t in xr)xr[t].id&&(Mr[br.stateNames[xr[t].id].code]=xr[t]);t()})})),this._topoJsonPromise}};n(Cr,"ChoroplethStates"),s(Cr,"__inputs",[{id:"state",type:"string"},{id:"value",type:"number"}]);let Pr=Cr;Pr.prototype._class+=" map_ChoroplethStates";const kr=class _ChoroplethStatesHeat extends Ns{constructor(){super()}};n(kr,"ChoroplethStatesHeat");let Er=kr;Er.prototype._class+=" map_ChoroplethStatesHeat";const Tr=class _GeoHash extends Gs{_dataMinWeight;_dataMaxWeight;geohash;_geoHashTransform;geoHashPaths;constructor(){super()}data(t){const e=Gs.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,e,i){Gs.prototype.layerEnter.apply(this,arguments),this.geohash=new Ss,this._geoHashTransform=e.append("g").attr("class","map_GeoHash"),this._selection=new c.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=u(null)}layerUpdate(t){Gs.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){}};n(Tr,"GeoHash");let Sr=Tr;function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Sr.prototype._class+=" map_GeoHash",Sr.prototype._palette=p.rainbow("default"),Sr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Sr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Sr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Sr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Sr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Sr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Sr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),n(Or,"getDefaultExportFromCjs");var zr,Dr={exports:{}};function Ir(){return zr||(zr=1,t=Dr,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,s=[],r=[],a=null,l={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};l.VERSION=t,l.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",l._googleMockApiObject={},l.load=function(t){null===i?!0===o?t&&s.push(t):(o=!0,window[l.WINDOW_CALLBACK_NAME]=function(){h(t)},l.createLoader()):t&&t(i)},l.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=l.createUrl(),document.body.appendChild(e)},l.isLoaded=function(){return null!==i},l.createUrl=function(){var t=l.URL;return t+="?callback="+l.WINDOW_CALLBACK_NAME,l.KEY&&(t+="&key="+l.KEY),l.LIBRARIES.length>0&&(t+="&libraries="+l.LIBRARIES.join(",")),l.CLIENT&&(t+="&client="+l.CLIENT),l.CHANNEL&&(t+="&channel="+l.CHANNEL),l.LANGUAGE&&(t+="&language="+l.LANGUAGE),l.REGION&&(t+="&region="+l.REGION),l.VERSION&&(t+="&v="+l.VERSION),t},l.release=function(h){var u=/* @__PURE__ */n(function(){l.KEY=null,l.LIBRARIES=[],l.CLIENT=null,l.CHANNEL=null,l.LANGUAGE=null,l.REGION=null,l.VERSION=t,i=null,o=!1,s=[],r=[],void 0!==window.google&&delete window.google,void 0!==window[l.WINDOW_CALLBACK_NAME]&&delete window[l.WINDOW_CALLBACK_NAME],null!==a&&(l.createLoader=a,a=null),null!==e&&(e.parentElement.removeChild(e),e=null),h&&h()},"release");o?l.load(function(){u()}):u()},l.onLoad=function(t){r.push(t)},l.makeMock=function(){a=l.createLoader,l.createLoader=function(){window.google=l._googleMockApiObject,window[l.WINDOW_CALLBACK_NAME]()}};var h=/* @__PURE__ */n(function(t){var e;for(o=!1,null===i&&(i=window.google),e=0;e<r.length;e++)r[e](i);for(t&&t(i),e=0;e<s.length;e++)s[e](i);s=[]},"ready");return l}()}()),Dr.exports;var t}n(Ir,"requireGoogle");var Ar=Ir();const Br=/* @__PURE__ */Or(Ar),Rr=Br||/* @__PURE__ */I({__proto__:null,default:Br},[Ar]);let Zr,Nr=null,jr=15e3;function Hr(t){jr=t}function Gr(t){return Zr||(Zr=T(jr,new Promise(function(e,i){if(Nr)e();else if(t)Nr=t,e();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{Rr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",Rr.LIBRARIES=["geometry","drawing"],Rr.load(function(t){Nr=t,e()})}catch(o){console.warn(`Failed to initialize Google Map API: ${o.message}`),e()}}})).catch(t=>{console.warn(`Timed out initializing Google Map API after ${jr}ms.`)})),Zr}function Fr(t,e,i){function o(t,e,i){Nr.maps.OverlayView.call(this),this._div=null,this._worldSurface=e,this._viewportSurface=i,this._map=t,this.setMap(t);const o=this;Nr.maps.event.addListener(t,"bounds_changed",function(){o.draw()}),Nr.maps.event.addListener(t,"projection_changed",function(){o.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 n(o,"Overlay"),o.prototype=Nr.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels");this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){const t=this.getProjection();if(!t)return;const e=this._map.getBounds(),i=t.fromLatLngToDivPixel(e.getCenter()),o=t.fromLatLngToDivPixel(e.getSouthWest()),n=t.fromLatLngToDivPixel(e.getNorthEast()),s={x:o.x,y:n.y},r={x:n.x,y:o.y},a=t.getWorldWidth();for(;r.x<s.x+100;)r.x+=a;for(;s.x>i.x;)s.x-=a,r.x-=a;s.x===this._prevMin.x&&s.y===this._prevMin.y&&r.x===this._prevMax.x&&r.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(s.x).widgetY(s.y).widgetWidth(r.x-s.x).widgetHeight(r.y-s.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=s,this._prevMax=r):this._viewportSurface.lazyRender());const l=t.fromLatLngToDivPixel(new Nr.maps.LatLng(85,-179.9)),h=t.fromLatLngToDivPixel(new Nr.maps.LatLng(-85,179.9));for(;h.x<l.x+100;)h.x+=a;for(;l.x>i.x;)l.x-=a,h.x-=a;l.x===this._prevWorldMin.x&&l.y===this._prevWorldMin.y&&h.x===this._prevWorldMax.x&&h.y===this._prevWorldMax.y||(this._worldSurface.widgetX(l.x).widgetY(l.y).widgetWidth(h.x-l.x).widgetHeight(h.y-l.y).render(),this._prevWorldMin=h,this._prevWorldMax=h)},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(t,e,i)}n(Hr,"requireGoogleMapTimeout"),n(Gr,"requireGoogleMap"),n(Fr,"createOverlay");const Ur=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:/* @__PURE__ */n(t=>{e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},"circle"),rectangle:/* @__PURE__ */n(t=>{e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},"rectangle"),polygon:/* @__PURE__ */n(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:/* @__PURE__ */n(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(t){const e=JSON.parse(t),i=0,o=.45,s="#1f77b4",r=!0,a=!0,l={circle:/* @__PURE__ */n((t,e)=>new Nr.maps.Circle({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,center:t.pos,radius:t.radius}),"circle"),rectangle:/* @__PURE__ */n((t,e)=>new Nr.maps.Rectangle({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,bounds:{north:t.bounds.ne.lat,west:t.bounds.sw.lng,south:t.bounds.sw.lat,east:t.bounds.ne.lng}}),"rectangle"),polygon:/* @__PURE__ */n((t,e)=>new Nr.maps.Polygon({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,paths:t.vertices}),"polygon"),polyline:/* @__PURE__ */n((t,e)=>new Nr.maps.Polyline({strokeWeight:t.strokeWeight||i,fillColor:t.fillColor||s,fillOpacity:t.fillOpacity||o,editable:t.editable||r,clickable:t.clickable||a,map:e,path:t.vertices}),"polyline")};for(let n=0;n<e.length;n++){const t=l[e[n].type](e[n],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:e[n].type,overlay:t})}}};n(Ur,"UserShapeSelectionBag");let Wr=Ur;const Vr=class _GMap extends f{_overlay;_userShapes;_worldSurface;_viewportSurface;_googleMapNode;_googleMap;_googleGeocoder;_prevCenterLat;_prevCenterLong;_googleStreetViewService;_googleMapPanorama;_prevZoom;_prevStreetView;_circleMap;_pinMap;_drawingManager;_prevCenterAddress;_userShapeSelection;constructor(){super(),this._tag="div";const t=this;function e(e,i,o){const n=t._overlay.getProjection(),s=n.fromLatLngToDivPixel(new Nr.maps.LatLng(i,o)),r=n.getWorldWidth(),a=parseFloat(e.widgetX()),l=parseFloat(e.widgetY()),h=parseFloat(e.widgetWidth());for(s.x-=a,s.y-=l;s.x<0;)s.x+=r;for(;s.x>h;)s.x-=r;return s}n(e,"calcProjection"),this._userShapes=new Wr(this),this._worldSurface=new E,this._worldSurface.project=function(t,i){return e(this,t,i)},this._viewportSurface=new E,this._viewportSurface.project=function(t,i){return e(this,t,i)}}data(t){return f.prototype.data.apply(this,arguments)}getMapType(){switch(this.type()){case"terrain":return Nr.maps.MapTypeId.TERRAIN;case"road":default:return Nr.maps.MapTypeId.ROADMAP;case"satellite":return Nr.maps.MapTypeId.SATELLITE;case"hybrid":return Nr.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(t){const e=f.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",t.width+"px").style("height",t.height+"px"),Nr.maps.event.trigger(this._googleMap,"resize")),e}enter(t,e){super.enter(t,e);const i=this;this._googleGeocoder=new Nr.maps.Geocoder,this._googleMapNode=e.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new Nr.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new Nr.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=Fr(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){i.centerLat(i._googleMap.center.lat()),i._prevCenterLat=i.centerLat(),i.centerLong(i._googleMap.center.lng()),i._prevCenterLong=i.centerLong(),i._googleMapPanorama.setPosition({lat:i.centerLat(),lng:i.centerLong()}),i.zoom(i._googleMap.getZoom()),i._prevZoom=i.zoom(),i._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){i.zoom(i._googleMap.zoom),i._prevZoom=i.zoom()}),this._googleStreetViewService=new Nr.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){i.streetView(i._googleMapPanorama.getVisible()),i._prevStreetView=i.streetView()}),this._circleMap=_([]),this._pinMap=_([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();const o={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new Nr.maps.drawing.DrawingManager({drawingMode:Nr.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:Nr.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:o,circleOptions:o,polygonOptions:o}),this.drawingState()&&this._userShapes.load(this.drawingState())}update(t,e){const i=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(t,e){if(e===Nr.maps.GeocoderStatus.OK){const e=t[0].geometry.bounds||t[0].geometry.viewport;i._googleMap.fitBounds(e),i.streetView()&&i.useComputedHeading()&&i.streetViewAt({lat:t[0].geometry.location.lat(),lng:t[0].geometry.location.lng()},50)}else i.statusError({data:t,status:e})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new Nr.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),Nr.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){_GMap.prototype.onDrawingComplete.apply(i,arguments)})):(this._drawingManager.setMap(null),Nr.maps.event.clearInstanceListeners(this._drawingManager))}render(t){const e=this,i=arguments;return Gr().then(()=>{super.render.apply(e,i)}),this}streetViewAt(t,e=1e3){const i=this,o=this.outdoorStreetViewOnly()?Nr.maps.StreetViewSource.OUTDOOR:Nr.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:t,radius:e,source:o},function(e,o){if("OK"===o){const o=new Nr.maps.Marker({position:t,map:i._googleMap}),n=Nr.maps.geometry.spherical.computeHeading(e.location.latLng,new Nr.maps.LatLng(t.lat,t.lng));i._googleMapPanorama.setPano(e.location.pano),i._googleMapPanorama.setPov({heading:n,pitch:0}),i.showStreetViewMarker()||o.setVisible(!1),i._googleMapPanorama.setVisible(!0);const s=Nr.maps.event.addListener(i._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(o.setMap(null),Nr.maps.event.removeListener(s))})}else i.statusError({data:e,status:o})})}updateCircles(){function t(t){return t[0]+"_"+t[1]}n(t,"rowID");const e=[],i=_(this._circleMap.keys(),function(t){return t});this.data().forEach(function(o){i.remove(t(o)),o[3]&&!this._circleMap.has(t(o))?e.push(o):o[3]&&this._circleMap.has(t(o))||!o[3]&&this._circleMap.has(t(o))&&i.set(t(o),!0)},this),e.forEach(function(e){const i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);const o=this;i.each(function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)})}updatePins(){function t(t){return t[0]+"_"+t[1]}n(t,"rowID");const e=[],i=[],o=_(this._pinMap.keys(),function(t){return t});this.data().forEach(function(n){o.remove(t(n)),n[2]&&!this._pinMap.has(t(n))?e.push(n):n[2]&&this._pinMap.has(t(n))?i.push(n):!n[2]&&this._pinMap.has(t(n))&&o.set(t(n),!0)},this),e.forEach(function(e){const i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),i.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);const s=this;o.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(t,e,i){return new Nr.maps.Marker({position:new Nr.maps.LatLng(t,e),animation:Nr.maps.Animation.DROP,title:i.title||"",icon:this.createIcon(i),map:this._googleMap})}createCircle(t,e,i){return i.radius=i.radius||1,new Nr.maps.Circle({center:new Nr.maps.LatLng(t,e),radius:16093*i.radius/10,fillColor:i.fillColor||"red",strokeColor:i.strokeColor||i.fillColor||"black",strokeWeight:.5,map:this._googleMap})}zoomTo(t,e){if(!this._renderCount)return this;e=e||this.singleZoomToMaxZoom();let i=0;const o=new Nr.maps.LatLngBounds;switch(t.forEach(function(t){const e=new Nr.maps.LatLng(t[0],t[1]);o.extend(e),++i}),i){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(e);break;default:this._googleMap.fitBounds(o)}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(t){if(t.type!==Nr.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);const e=t.overlay;e.__hpcc_type=t.type,this._userShapes.add(e);const i=this;let o=!1;window.addEventListener("keydown",function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)}),window.addEventListener("keyup",function(t){!1===t.ctrlKey&&(o=!1)}),Nr.maps.event.addListener(e,"click",function(t){return i.userShapeSelection(e),t&&!0===o&&(i.deleteUserShape(e),i.drawingState(JSON.stringify(i._userShapes.save()))),!1}),this.userShapeSelection(e),this.drawingState(JSON.stringify(this._userShapes.save()))}}statusError(t){console.warn("Data not found for this location.")}};n(Vr,"GMap");let qr=Vr;qr.prototype._class+=" map_GMap",qr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),qr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),qr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),qr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),qr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),qr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),qr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),qr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),qr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),qr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),qr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),qr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),qr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),qr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),qr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),qr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),qr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),qr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),qr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:/* @__PURE__ */n(t=>!1===t.drawingTools(),"disable")}),qr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const Yr=class _OverlayLayered extends Ns{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}};n(Yr,"OverlayLayered");let $r=Yr;const Kr=class _GMapLayered extends qr{layered;constructor(){super(),this.layered=new $r(this,this._viewportSurface),this._viewportSurface.widget(this.layered)}invert(t,e){return this.layered.invert(t,e)}rproject(t,e){const i=this.layered.getProjection().fromDivPixelToLatLng(new Nr.maps.Point(t,e));return{lat:i.lat(),lng:i.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)})})})}};n(Kr,"GMapLayered");let Xr=Kr;Xr.prototype._class+=" map_GMapLayered";const Jr=class _GMapCounties extends Xr{_counties;_view;_palette;_dataMinWeight;_dataMaxWeight;constructor(){super();const t=this;this._counties=(new wr).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){}};n(Jr,"GMapCounties");let Qr=Jr;Qr.prototype._class+=" map_GMapCounties",Qr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");const ta=class _GMapGraph extends qr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=(new O).layout("None").zoomable(!1),e=t.render,i=this;t.render=function(t){const o=[],n=[];let s=null;i.data().forEach(function(t){const e=i._viewportSurface.project(t[0],t[1]),r=(new m).shape("circle").radius(3).data(t).pos(e);o.push(r),s&&n.push((new z).sourceVertex(s).targetVertex(r).sourceMarker("none").targetMarker("arrow")),s=r}),this.data({vertices:o,edges:n});return e.apply(this,arguments)},this._viewportSurface.widget(t)}};n(ta,"GMapGraph");let ea=ta;ea.prototype._class+=" map_GMapGraph";const ia=class _GMapHeat extends qr{constructor(){super()}enter(){super.enter.apply(this,arguments);const t=new D,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)}};n(ia,"GMapHeat");let oa=ia;oa.prototype._class+=" map_GMapHeat";let na=(n(t=class extends Gs{_geohash;_pinsTransform;pinsPaths;constructor(){super(),c.SimpleSelectionMixin.call(this),this._geohash=new Ss}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,e,i){Gs.prototype.layerEnter.apply(this,arguments),this._pinsTransform=e,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=u(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})}layerUpdate(t){Gs.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 e=this,i=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t.origRow),"geohash",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t.origRow),"geohash",e._selection.selected(this))}).on("mouseover",function(t){g.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&e.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&e.tooltip.show.apply(this,arguments)}).each(function(t){const e=u(this);e.append("path").attr("class","data"),e.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);i.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 o=this.svgPinPath();i.selectAll("path.data").attr("d",o).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:e.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:e.fillColor()}),this.pinsPaths.exit().remove()}layerZoomed(t){Gs.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){}},"Pins"),t);na.prototype._class+=" map_Pins",na.prototype.mixin(c.SimpleSelectionMixin),na.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),na.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),na.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),na.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),na.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),na.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),na.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),na.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),na.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),na.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),na.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),na.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),na.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),na.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["pin","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>-1===["rectangle","rectangle-pin"].indexOf(t.pinType()),"disable")}),na.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:/* @__PURE__ */n(t=>"circle"!==t.pinType(),"disable")}),na.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 sa=class _GMapPin extends Xr{_pins;_view;constructor(){super();const t=this;this._pins=(new na).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){}};n(sa,"GMapPin");let ra=sa;ra.prototype._class+=" map_GMapPin",ra.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),ra.prototype.publishProxy("pinColor","_pins","fillColor"),ra.prototype.publishProxy("pinType","_pins","pinType"),ra.prototype.publishProxy("pinWidth","_pins","pinWidth"),ra.prototype.publishProxy("pinHeight","_pins","pinHeight"),ra.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),ra.prototype.publishProxy("pinRadius","_pins","pinRadius"),ra.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),ra.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),ra.prototype.publishProxy("textBaseline","_pins","textBaseline"),ra.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),ra.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),ra.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),ra.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),ra.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),ra.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),ra.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");let aa=(n(e=class extends Gs{dataEdges;_edgesTransform;constructor(){super()}data(t){const e=Gs.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){Gs.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){Gs.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){Gs.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}},"Lines"),e);aa.prototype._class+=" map_Lines",aa.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});const la=class _GMapPinLine extends Xr{_lines;_pins;_fromView;_toView;_linesView;constructor(){super();const t=this;this._lines=new aa,this._pins=(new na).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){}};n(la,"GMapPinLine");let ha=la;ha.prototype._class+=" map_GMapPinLine",ha.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),ha.prototype.publish("fromPinColor","green","html-color","From Pin Color"),ha.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toPinColor","red","html-color","To Pin Color"),ha.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),ha.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});const ua=class _Graph extends na{dataEdges=[];_edgesTransform;constructor(){super()}importJSON(t){const e=na.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=na.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){na.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){na.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){na.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")}};n(ua,"Graph");let ca=ua;ca.prototype._class+=" map_Graph";const pa=class _Graticule extends Gs{_dataMap={};_path=u(null);_graticule;_graticulePath;_graticuleOutlinePath;_prevProjection;constructor(){super()}layerEnter(t,e,i){Gs.prototype.layerEnter.apply(this,arguments),this._graticule=ho(),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}};n(pa,"Graticule");let da=pa;da.prototype._class+=" map_Graticule",da.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),da.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),da.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");const _a=class _Heat extends Gs{_heatTransform;heat;_prevProjection;constructor(){super()}layerEnter(t,e,i){Gs.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 D).target(this._heatTransform.node())}layerUpdate(t){Gs.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){Gs.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()}};n(_a,"Heat");let fa=_a;function ma(){}function ga(t){return t.k}function ya(t){return[t.x,t.y]}function va(t){return function(){return t}}function La(){let t=0,e=0,i=960,o=500,s=!0,r=!0,a=256,l=ga,h=ya,u=0;function c(){const n=+l.apply(this,arguments),c=h.apply(this,arguments),p=Math.log2(n/a),d=Math.round(Math.max(p+u,0)),_=Math.pow(2,p-d)*a,f=+c[0]-n/2,m=+c[1]-n/2,g=Math.max(s?0:-1/0,Math.floor((t-f)/_)),y=Math.min(s?1<<d:1/0,Math.ceil((i-f)/_)),v=Math.max(r?0:-1/0,Math.floor((e-m)/_)),L=Math.min(r?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 n(c,"tile"),c.size=function(n){return arguments.length?(t=e=0,i=+n[0],o=+n[1],c):[i-t,o-e]},c.extent=function(n){return arguments.length?(t=+n[0][0],e=+n[0][1],i=+n[1][0],o=+n[1][1],c):[[t,e],[i,o]]},c.scale=function(t){return arguments.length?(l="function"==typeof t?t:va(+t),c):l},c.translate=function(t){return arguments.length?(h="function"==typeof t?t:va([+t[0],+t[1]]),c):h},c.zoomDelta=function(t){return arguments.length?(u=+t,c):u},c.tileSize=function(t){return arguments.length?(a=+t,c):a},c.clamp=function(t){return arguments.length?(s=r=!!t,c):s&&r},c.clampX=function(t){return arguments.length?(s=!!t,c):s},c.clampY=function(t){return arguments.length?(r=!!t,c):r},c}fa.prototype._class+=" map_Heat",fa.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),fa.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),fa.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),n(ma,"IChoropleth"),ma.prototype._palette=p.rainbow("default"),ma.prototype.click=function(t,e,i){},n(ga,"defaultScale"),n(ya,"defaultTranslate"),n(va,"constant"),n(La,"d3Tile");const wa=4096,ba=class _OpenStreet extends Gs{_tile;_openStreet;_copyright;_copyrightBBox;_prevTileProvider;_zoomLayerID=0;_prevZoomLevel;constructor(){super(),this.autoScaleMode("none")}layerEnter(t,e,i){Gs.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=La().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 e=t.zoomScale(),i=t.zoomTranslate(),o=this._tile.scale(e*wa).translate(i)(),n=o.scale/e;o.translate[0],o.scale,o.translate[1],o.scale;const s=Math.round(1e3*n);this._prevZoomLevel!==s&&(this._prevZoomLevel=s,this._zoomLayerID++);const r=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],t=>t),a=r.enter().append("g").attr("class","scaleG").attr("transform",Ma(n)).merge(r);r.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){u(this).selectAll(".image").attr("xlink:href",null)}).remove();a.selectAll(".image").data(o,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)}};n(ba,"OpenStreet"),s(ba,"_copyrightText","© OpenStreetMap contributors");let xa=ba;function Ma(t,e){return"translate(-2048,-2048) scale("+t/256+")"}xa.prototype._class+=" map_OpenStreet",xa.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]}),n(Ma,"stringify");const Ca=class _TopoJSONChoropleth extends nr{_prevRegion;choroPaths;_choroTopologyIndex;_choroTopologyFeatures;constructor(){super(),this.projection("Mercator")}layerEnter(t,e,i){nr.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=u(null);const o=this;this.tooltipHTML(function(t){const e=o.columns(),i=e&&e.length?e[0]:"Location",n=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:n[0],series:i,value:t[1]})})}layerUpdate(t){nr.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){hr(`${ir()}/${t.region()}.json`,function(i){function o(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=Ys(t._choroTopology,t._choroTopologyObjects).features,hr(`${ir()}/${t.region()}_idx.json`,o).on("error",function(t){o({})}),n(o,"indexLoad")})})}return this._topoJsonPromise}};n(Ca,"TopoJSONChoropleth");let Pa=Ca;Pa.prototype._class+=" map_TopoJSONChoropleth",Pa.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 ka,Ea={exports:{}};function Ta(){return ka||(ka=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}n(i,"extend");var o=Object.create||/* @__PURE__ */function(){function t(){}return n(t,"F"),function(e){return t.prototype=e,new t}}();function s(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)}}n(s,"bind");var r=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++r),t._leaflet_id}function l(t,e,i){var o,s,r,a;return a=/* @__PURE__ */n(function(){o=!1,s&&(r.apply(i,s),s=!1)},"later"),r=/* @__PURE__ */n(function(){o?s=arguments:(t.apply(i,arguments),setTimeout(a,e),o=!0)},"wrapperFn"),r}function h(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 u(){return!1}function c(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("&")}n(a,"stamp"),n(l,"throttle"),n(h,"wrapNum"),n(u,"falseFn"),n(c,"formatNum"),n(p,"trim"),n(d,"splitWords"),n(_,"setOptions"),n(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})}n(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}n(v,"indexOf");var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}n(b,"getPrefixed");var x=0;function M(t){var e=+/* @__PURE__ */new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}n(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,s(t,e));t.call(e)}function E(t){t&&P.call(window,t)}n(k,"requestAnimFrame"),n(E,"cancelAnimFrame");var T={__proto__:null,extend:i,create:o,bind:s,get lastId(){return r},stamp:a,throttle:l,wrapNum:h,falseFn:u,formatNum:c,trim:p,splitWords:d,setOptions:_,getParamString:f,template:g,isArray:y,indexOf:v,emptyImageUrl:w,requestFn:C,cancelFn:P,requestAnimFrame:k,cancelAnimFrame:E};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)}}n(S,"Class"),S.extend=function(t){var e=/* @__PURE__ */n(function(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},"NewClass"),s=e.__super__=this.prototype,r=o(s);for(var a in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&i(e,t.statics),t.includes&&(O(t.includes),i.apply(null,[r].concat(t.includes))),i(r,t),delete r.statics,delete r.includes,r.options&&(r.options=s.options?o(s.options):{},i(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return i(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},n(O,"checkDeprecatedMixinEvents");var z={on:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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=u,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=u;delete this._events[t]}},"_off"),fire:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},"addEventParent"),removeEventParent:/* @__PURE__ */n(function(t){return this._eventParents&&delete this._eventParents[a(t)],this},"removeEventParent"),_propagateEvent:/* @__PURE__ */n(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}n(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:/* @__PURE__ */n(function(){return new I(this.x,this.y)},"clone"),add:/* @__PURE__ */n(function(t){return this.clone()._add(B(t))},"add"),_add:/* @__PURE__ */n(function(t){return this.x+=t.x,this.y+=t.y,this},"_add"),subtract:/* @__PURE__ */n(function(t){return this.clone()._subtract(B(t))},"subtract"),_subtract:/* @__PURE__ */n(function(t){return this.x-=t.x,this.y-=t.y,this},"_subtract"),divideBy:/* @__PURE__ */n(function(t){return this.clone()._divideBy(t)},"divideBy"),_divideBy:/* @__PURE__ */n(function(t){return this.x/=t,this.y/=t,this},"_divideBy"),multiplyBy:/* @__PURE__ */n(function(t){return this.clone()._multiplyBy(t)},"multiplyBy"),_multiplyBy:/* @__PURE__ */n(function(t){return this.x*=t,this.y*=t,this},"_multiplyBy"),scaleBy:/* @__PURE__ */n(function(t){return new I(this.x*t.x,this.y*t.y)},"scaleBy"),unscaleBy:/* @__PURE__ */n(function(t){return new I(this.x/t.x,this.y/t.y)},"unscaleBy"),round:/* @__PURE__ */n(function(){return this.clone()._round()},"round"),_round:/* @__PURE__ */n(function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},"_round"),floor:/* @__PURE__ */n(function(){return this.clone()._floor()},"floor"),_floor:/* @__PURE__ */n(function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},"_floor"),ceil:/* @__PURE__ */n(function(){return this.clone()._ceil()},"ceil"),_ceil:/* @__PURE__ */n(function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},"_ceil"),trunc:/* @__PURE__ */n(function(){return this.clone()._trunc()},"trunc"),_trunc:/* @__PURE__ */n(function(){return this.x=A(this.x),this.y=A(this.y),this},"_trunc"),distanceTo:/* @__PURE__ */n(function(t){var e=(t=B(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},"distanceTo"),equals:/* @__PURE__ */n(function(t){return(t=B(t)).x===this.x&&t.y===this.y},"equals"),contains:/* @__PURE__ */n(function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},"contains"),toString:/* @__PURE__ */n(function(){return"Point("+c(this.x)+", "+c(this.y)+")"},"toString")},n(B,"toPoint"),n(R,"Bounds"),R.prototype={extend:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},"getCenter"),getBottomLeft:/* @__PURE__ */n(function(){return B(this.min.x,this.max.y)},"getBottomLeft"),getTopRight:/* @__PURE__ */n(function(){return B(this.max.x,this.min.y)},"getTopRight"),getTopLeft:/* @__PURE__ */n(function(){return this.min},"getTopLeft"),getBottomRight:/* @__PURE__ */n(function(){return this.max},"getBottomRight"),getSize:/* @__PURE__ */n(function(){return this.max.subtract(this.min)},"getSize"),contains:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return!(!this.min||!this.max)},"isValid"),pad:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return!!t&&(t=Z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))},"equals")},n(Z,"toBounds"),n(N,"LatLngBounds"),N.prototype={extend:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return new H((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},"getCenter"),getSouthWest:/* @__PURE__ */n(function(){return this._southWest},"getSouthWest"),getNorthEast:/* @__PURE__ */n(function(){return this._northEast},"getNorthEast"),getNorthWest:/* @__PURE__ */n(function(){return new H(this.getNorth(),this.getWest())},"getNorthWest"),getSouthEast:/* @__PURE__ */n(function(){return new H(this.getSouth(),this.getEast())},"getSouthEast"),getWest:/* @__PURE__ */n(function(){return this._southWest.lng},"getWest"),getSouth:/* @__PURE__ */n(function(){return this._southWest.lat},"getSouth"),getEast:/* @__PURE__ */n(function(){return this._northEast.lng},"getEast"),getNorth:/* @__PURE__ */n(function(){return this._northEast.lat},"getNorth"),contains:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},"toBBoxString"),equals:/* @__PURE__ */n(function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},"equals"),isValid:/* @__PURE__ */n(function(){return!(!this._southWest||!this._northEast)},"isValid")},n(j,"toLatLngBounds"),n(H,"LatLng"),H.prototype={equals:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},"toString"),distanceTo:/* @__PURE__ */n(function(t){return W.distance(this,G(t))},"distanceTo"),wrap:/* @__PURE__ */n(function(){return W.wrapLatLng(this)},"wrap"),toBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return new H(this.lat,this.lng,this.alt)},"clone")},n(G,"toLatLng");var F,U={latLngToPoint:/* @__PURE__ */n(function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},"latLngToPoint"),pointToLatLng:/* @__PURE__ */n(function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},"pointToLatLng"),project:/* @__PURE__ */n(function(t){return this.projection.project(t)},"project"),unproject:/* @__PURE__ */n(function(t){return this.projection.unproject(t)},"unproject"),scale:/* @__PURE__ */n(function(t){return 256*Math.pow(2,t)},"scale"),zoom:/* @__PURE__ */n(function(t){return Math.log(t/256)/Math.LN2},"zoom"),getProjectedBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new H(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},"wrapLatLng"),wrapLatLngBounds:/* @__PURE__ */n(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({},U,{wrapLng:[-180,180],R:6371e3,distance:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:(F=V*Math.PI,new R([-F,-F],[F,F]))};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)}n(Y,"Transformation"),Y.prototype={transform:/* @__PURE__ */n(function(t,e){return this._transform(t.clone(),e)},"transform"),_transform:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return e=e||1,new I((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)},"untransform")},n($,"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"}n(Q,"svgCreate"),n(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,Et=!window.L_NO_TOUCH&&(kt||Pt),Tt=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:/* @__PURE__ */n(function(){t=!0},"get")});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,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}n(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:Et,touchNative:kt,mobileOpera:Tt,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",Ft=jt.msPointer?"MSPointerUp":"pointerup",Ut=jt.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Ht,touchmove:Gt,touchend:Ft,touchcancel:Ut},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),u)}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(Ft,Qt,!0),document.addEventListener(Ut,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}n($t,"addPointerListener"),n(Kt,"removePointerListener"),n(Xt,"_globalPointerDown"),n(Jt,"_globalPointerMove"),n(Qt,"_globalPointerUp"),n(te,"_addPointerDocListener"),n(ee,"_handlePointer"),n(ie,"_onPointerStart"),n(oe,"makeDblclick");var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,o=0;function s(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 n(s,"simDblclick"),t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}n(se,"addDoubleTapListener"),n(re,"removeDoubleTapListener");var ae,le,he,ue,ce,pe=Te(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),de=Te(["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&&Ee(t,e)}function Ee(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 Te(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function 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(n(fe,"get"),n(me,"getStyle"),n(ge,"create$1"),n(ye,"remove"),n(ve,"empty"),n(Le,"toFront"),n(we,"toBack"),n(be,"hasClass"),n(xe,"addClass"),n(Me,"removeClass"),n(Ce,"setClass"),n(Pe,"getClass"),n(ke,"setOpacity"),n(Ee,"_setOpacityIE"),n(Te,"testProp"),n(Se,"setTransform"),n(Oe,"setPosition"),n(ze,"getPosition"),"onselectstart"in document)ae=/* @__PURE__ */n(function(){He(window,"selectstart",Xe)},"disableTextSelection"),le=/* @__PURE__ */n(function(){Fe(window,"selectstart",Xe)},"enableTextSelection");else{var De=Te(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=/* @__PURE__ */n(function(){if(De){var t=document.documentElement.style;he=t[De],t[De]="none"}},"disableTextSelection"),le=/* @__PURE__ */n(function(){De&&(document.documentElement.style[De]=he,he=void 0)},"enableTextSelection")}function Ie(){He(window,"dragstart",Xe)}function Ae(){Fe(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,Fe(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}}n(Ie,"disableImageDrag"),n(Ae,"enableImageDrag"),n(Be,"preventOutline"),n(Re,"restoreOutline"),n(Ze,"getSizedParentNode"),n(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:Te,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}n(He,"on");var Ge="_leaflet_events";function Fe(t,e,i,o){if(1===arguments.length)Ue(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)Ue(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 Ue(t,e){for(var i in t[Ge]){var o=i.split(/\d/)[0];e&&!e(o)||qe(t,o,null,null,i)}}n(Fe,"off"),n(Ue,"batchRemove");var We={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ve(t,e,i,o){var s=e+a(i)+(o?"_"+a(o):"");if(t[Ge]&&t[Ge][s])return this;var r=/* @__PURE__ */n(function(e){return i.call(o||t,e||window.event)},"handler"),l=r;!jt.touchNative&&jt.pointer&&0===e.indexOf("touch")?r=$t(t,e,r):jt.touch&&"dblclick"===e?r=se(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(We[e]||e,r,!!jt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=/* @__PURE__ */n(function(e){e=e||window.event,oi(t,e)&&l(e)},"handler"),t.addEventListener(We[e],r,!1)):t.addEventListener(e,l,!1):t.attachEvent("on"+e,r),t[Ge]=t[Ge]||{},t[Ge][s]=r}function qe(t,e,i,o,n){n=n||e+a(i)+(o?"_"+a(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)}n(Ve,"addOne"),n(qe,"removeOne"),n(Ye,"stopPropagation"),n($e,"disableScrollPropagation"),n(Ke,"disableClickPropagation"),n(Xe,"preventDefault"),n(Je,"stop"),n(Qe,"getPropagationPath"),n(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}n(ii,"getWheelDelta"),n(oi,"isExternalTarget");var ni={__proto__:null,on:He,off:Fe,stopPropagation:Ye,disableScrollPropagation:$e,disableClickPropagation:Ke,preventDefault:Xe,stop:Je,getPropagationPath:Qe,getMousePosition:ti,getWheelDelta:ii,isExternalTarget:oi,addListener:He,removeListener:Fe},si=D.extend({run:/* @__PURE__ */n(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=+/* @__PURE__ */new Date,this.fire("start"),this._animate()},"run"),stop:/* @__PURE__ */n(function(){this._inProgress&&(this._step(!0),this._complete())},"stop"),_animate:/* @__PURE__ */n(function(){this._animId=k(this._animate,this),this._step()},"_animate"),_step:/* @__PURE__ */n(function(t){var e=+/* @__PURE__ */new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},"_step"),_runFrame:/* @__PURE__ */n(function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Oe(this._el,i),this.fire("step")},"_runFrame"),_complete:/* @__PURE__ */n(function(){E(this._animId),this._inProgress=!1,this.fire("end")},"_complete"),_easeOut:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){e=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},"setZoom"),zoomIn:/* @__PURE__ */n(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},"zoomIn"),zoomOut:/* @__PURE__ */n(function(t,e){return t=t||(jt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},"zoomOut"),setZoomAround:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.fitBounds([[-90,-180],[90,180]],t)},"fitWorld"),panTo:/* @__PURE__ */n(function(t,e){return this.setView(t,this._zoom,{pan:e})},"panTo"),panBy:/* @__PURE__ */n(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:/* @__PURE__ */n(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()),s=this.project(t),r=this.getSize(),a=this._zoom;t=G(t),e=void 0===e?a:e;var l=Math.max(r.x,r.y),h=l*this.getZoomScale(a,e),u=s.distanceTo(o)||1,c=1.42,p=c*c;function d(t){var e=(h*h-l*l+(t?-1:1)*p*p*u*u)/(2*(t?h:l)*p*u),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)}n(d,"r"),n(_,"sinh"),n(f,"cosh"),n(m,"tanh");var g=d(0);function y(t){return l*(f(g)/f(g+c*t))}function v(t){return l*(f(g)*m(g+c*t)-_(g))/p}function L(t){return 1-Math.pow(1-t,1.5)}n(y,"w"),n(v,"u"),n(L,"easeOut");var w=Date.now(),b=(d(1)-g)/c,x=i.duration?1e3*i.duration:1e3*b*.8;function M(){var i=(Date.now()-w)/x,n=L(i)*b;i<=1?(this._flyToFrame=k(M,this),this._move(this.unproject(o.add(s.subtract(o).multiplyBy(v(n)/u)),a),this.getScaleZoom(l/y(n),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return n(M,"frame"),this._moveStart(!0,i.noMoveStart),M.call(this),this},"flyTo"),flyToBounds:/* @__PURE__ */n(function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},"flyToBounds"),setMaxBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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(),n=e.divideBy(2).round(),r=o.divideBy(2).round(),a=n.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(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},"invalidateSize"),stop:/* @__PURE__ */n(function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},"stop"),locate:/* @__PURE__ */n(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=s(this._handleGeolocationResponse,this),o=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},"locate"),stopLocate:/* @__PURE__ */n(function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},"stopLocate"),_handleGeolocationError:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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&&(E(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},"getCenter"),getZoom:/* @__PURE__ */n(function(){return this._zoom},"getZoom"),getBounds:/* @__PURE__ */n(function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},"getBounds"),getMinZoom:/* @__PURE__ */n(function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},"getMinZoom"),getMaxZoom:/* @__PURE__ */n(function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},"getMaxZoom"),getBoundsZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){var i=this._getTopLeftPoint(t,e);return new R(i,i.add(this.getSize()))},"getPixelBounds"),getPixelOrigin:/* @__PURE__ */n(function(){return this._checkIfLoaded(),this._pixelOrigin},"getPixelOrigin"),getPixelWorldBounds:/* @__PURE__ */n(function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},"getPixelWorldBounds"),getPane:/* @__PURE__ */n(function(t){return"string"==typeof t?this._panes[t]:t},"getPane"),getPanes:/* @__PURE__ */n(function(){return this._panes},"getPanes"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),getZoomScale:/* @__PURE__ */n(function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},"getZoomScale"),getScaleZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},"project"),unproject:/* @__PURE__ */n(function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},"unproject"),layerPointToLatLng:/* @__PURE__ */n(function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},"layerPointToLatLng"),latLngToLayerPoint:/* @__PURE__ */n(function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},"latLngToLayerPoint"),wrapLatLng:/* @__PURE__ */n(function(t){return this.options.crs.wrapLatLng(G(t))},"wrapLatLng"),wrapLatLngBounds:/* @__PURE__ */n(function(t){return this.options.crs.wrapLatLngBounds(j(t))},"wrapLatLngBounds"),distance:/* @__PURE__ */n(function(t,e){return this.options.crs.distance(G(t),G(e))},"distance"),containerPointToLayerPoint:/* @__PURE__ */n(function(t){return B(t).subtract(this._getMapPanePos())},"containerPointToLayerPoint"),layerPointToContainerPoint:/* @__PURE__ */n(function(t){return B(t).add(this._getMapPanePos())},"layerPointToContainerPoint"),containerPointToLatLng:/* @__PURE__ */n(function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},"containerPointToLatLng"),latLngToContainerPoint:/* @__PURE__ */n(function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},"latLngToContainerPoint"),mouseEventToContainerPoint:/* @__PURE__ */n(function(t){return ti(t,this._container)},"mouseEventToContainerPoint"),mouseEventToLayerPoint:/* @__PURE__ */n(function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},"mouseEventToLayerPoint"),mouseEventToLatLng:/* @__PURE__ */n(function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},"mouseEventToLatLng"),_initContainer:/* @__PURE__ */n(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=a(e)},"_initContainer"),_initLayout:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},"_moveStart"),_move:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t&&this.fire("zoomend"),this.fire("moveend")},"_moveEnd"),_stop:/* @__PURE__ */n(function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},"_stop"),_rawPanBy:/* @__PURE__ */n(function(t){Oe(this._mapPane,this._getMapPanePos().subtract(t))},"_rawPanBy"),_getZoomSpan:/* @__PURE__ */n(function(){return this.getMaxZoom()-this.getMinZoom()},"_getZoomSpan"),_panInsideMaxBounds:/* @__PURE__ */n(function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},"_panInsideMaxBounds"),_checkIfLoaded:/* @__PURE__ */n(function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},"_checkIfLoaded"),_initEvents:/* @__PURE__ */n(function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Fe: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:/* @__PURE__ */n(function(){E(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},"_onResize"),_onScroll:/* @__PURE__ */n(function(){this._container.scrollTop=0,this._container.scrollLeft=0},"_onScroll"),_onMoveEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(var i,o=[],n="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[a(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!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||r||n||!this.listens(e,!0)||(o=[this]),o},"_findEventTargets"),_isClickDisabled:/* @__PURE__ */n(function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},"_isClickDisabled"),_handleDOMEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},"_draggableMoved"),_clearHandlers:/* @__PURE__ */n(function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},"_clearHandlers"),whenReady:/* @__PURE__ */n(function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},"whenReady"),_getMapPanePos:/* @__PURE__ */n(function(){return ze(this._mapPane)||new I(0,0)},"_getMapPanePos"),_moved:/* @__PURE__ */n(function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},"_moved"),_getTopLeftPoint:/* @__PURE__ */n(function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},"_getTopLeftPoint"),_getNewPixelOrigin:/* @__PURE__ */n(function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},"_getNewPixelOrigin"),_latLngToNewLayerPoint:/* @__PURE__ */n(function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},"_latLngToNewLayerPoint"),_latLngBoundsToNewLayerBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},"_getCenterLayerPoint"),_getCenterOffset:/* @__PURE__ */n(function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},"_getCenterOffset"),_limitCenter:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.fire("move")},"_onPanTransitionStep"),_onPanTransitionEnd:/* @__PURE__ */n(function(){Me(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},"_onPanTransitionEnd"),_tryAnimatedPan:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ye(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},"_destroyAnimProxy"),_animMoveEnd:/* @__PURE__ */n(function(){var t=this.getCenter(),e=this.getZoom();Se(this._proxy,this.project(t,e),this.getZoomScale(e,1))},"_animMoveEnd"),_catchTransitionEnd:/* @__PURE__ */n(function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},"_catchTransitionEnd"),_nothingToAnimate:/* @__PURE__ */n(function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},"_nothingToAnimate"),_tryAnimatedZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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(s(this._onZoomTransitionEnd,this),250))},"_animateZoom"),_onZoomTransitionEnd:/* @__PURE__ */n(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)}n(ai,"createMap");var li=S.extend({options:{position:"topright"},initialize:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),getPosition:/* @__PURE__ */n(function(){return this.options.position},"getPosition"),setPosition:/* @__PURE__ */n(function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},"setPosition"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),addTo:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()},"_refocusOnMap")}),hi=/* @__PURE__ */n(function(t){return new li(t)},"control");ri.include({addControl:/* @__PURE__ */n(function(t){return t.addTo(this),this},"addControl"),removeControl:/* @__PURE__ */n(function(t){return t.remove(),this},"removeControl"),_initControlPos:/* @__PURE__ */n(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)}n(o,"createCorner"),o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},"_initControlPos"),_clearControlPos:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i,o){return i<o?-1:o<i?1:0},"sortFunction")},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return li.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},"addTo"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._addLayer(t,e),this._map?this._update():this},"addBaseLayer"),addOverlay:/* @__PURE__ */n(function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},"addOverlay"),removeLayer:/* @__PURE__ */n(function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},"removeLayer"),expand:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return Me(this._container,"leaflet-control-layers-expanded"),this},"collapse"),_initLayout:/* @__PURE__ */n(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 s=this._layersLink=ge("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),He(s,{keydown:/* @__PURE__ */n(function(t){13===t.keyCode&&this._expandSafely()},"keydown"),click:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},"_getLayer"),_addLayer:/* @__PURE__ */n(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(s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},"_onLayerChange"),_createRadioElement:/* @__PURE__ */n(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:/* @__PURE__ */n(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_"+a(this),o),this._layerControlInputs.push(e),e.layerId=a(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._map&&!this.options.collapsed&&this.expand(),this},"_expandIfNotCollapsed"),_expandSafely:/* @__PURE__ */n(function(){var t=this._section;this._preventClick=!0,He(t,"click",Xe),this.expand();var e=this;setTimeout(function(){Fe(t,"click",Xe),e._preventClick=!1})},"_expandSafely")}),ci=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},"onRemove"),disable:/* @__PURE__ */n(function(){return this._disabled=!0,this._updateDisabled(),this},"disable"),enable:/* @__PURE__ */n(function(){return this._disabled=!1,this._updateDisabled(),this},"enable"),_zoomIn:/* @__PURE__ */n(function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomIn"),_zoomOut:/* @__PURE__ */n(function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},"_zoomOut"),_createButton:/* @__PURE__ */n(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:/* @__PURE__ */n(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=/* @__PURE__ */n(function(t){return new pi(t)},"zoom"),_i=li.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},"onRemove"),_addScales:/* @__PURE__ */n(function(t,e,i){t.metric&&(this._mScale=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},"_addScales"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},"_updateScales"),_updateMetric:/* @__PURE__ */n(function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},"_updateMetric"),_updateImperial:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},"_updateScale"),_getRoundNum:/* @__PURE__ */n(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=/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){_(this,t),this._attributions={}},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.off("layeradd",this._addAttribution,this)},"onRemove"),_addAttribution:/* @__PURE__ */n(function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},"_addAttribution"),setPrefix:/* @__PURE__ */n(function(t){return this.options.prefix=t,this._update(),this},"setPrefix"),addAttribution:/* @__PURE__ */n(function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},"addAttribution"),removeAttribution:/* @__PURE__ */n(function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},"removeAttribution"),_update:/* @__PURE__ */n(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=/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map=t},"initialize"),enable:/* @__PURE__ */n(function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},"enable"),disable:/* @__PURE__ */n(function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},"disable"),enabled:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i,o){_(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},"initialize"),enable:/* @__PURE__ */n(function(){this._enabled||(He(this._dragStartTarget,wi,this._onDown,this),this._enabled=!0)},"enable"),disable:/* @__PURE__ */n(function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Fe(this._dragStartTarget,wi,this._onDown,this),this._enabled=!1,this._moved=!1)},"disable"),_onDown:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Oe(this._element,this._newPos),this.fire("drag",t)},"_updatePosition"),_onUp:/* @__PURE__ */n(function(){this._enabled&&this.finishDrag()},"_onUp"),finishDrag:/* @__PURE__ */n(function(t){Me(document.body,"leaflet-dragging"),this._lastTarget&&(Me(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Fe(document,"mousemove touchmove",this._onMove,this),Fe(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])}n(xi,"clipPolygon"),n(Mi,"polygonCenter"),n(Ci,"centroid");var Pi,ki={__proto__:null,clipPolygon:xi,polygonCenter:Mi,centroid:Ci};function Ei(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Oi(t=Di(t,i),i)}function Ti(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])}n(Ei,"simplify"),n(Ti,"pointToSegmentDistance"),n(Si,"closestPointOnSegment"),n(Oi,"_simplifyDP"),n(zi,"_simplifyDPStep"),n(Di,"_reducePoints"),n(Ii,"clipSegment"),n(Ai,"_getEdgeIntersection"),n(Bi,"_getBitCode"),n(Ri,"_sqDist"),n(Zi,"_sqClosestPointOnSegment"),n(Ni,"isFlat"),n(ji,"_flat"),n(Hi,"polylineCenter");var Gi={__proto__:null,simplify:Ei,pointToSegmentDistance:Ti,closestPointOnSegment:Si,clipSegment:Ii,_getEdgeIntersection:Ai,_getBitCode:Bi,_sqClosestPointOnSegment:Zi,isFlat:Ni,_flat:ji,polylineCenter:Hi},Fi={project:/* @__PURE__ */n(function(t){return new I(t.lng,t.lat)},"project"),unproject:/* @__PURE__ */n(function(t){return new H(t.y,t.x)},"unproject"),bounds:new R([-180,-90],[180,90])},Ui={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:/* @__PURE__ */n(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:/* @__PURE__ */n(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:Fi,Mercator:Ui,SphericalMercator:q},Vi=i({},W,{code:"EPSG:3395",projection:Ui,transformation:function(){var t=.5/(Math.PI*Ui.R);return $(t,.5,-t,.5)}()}),qi=i({},W,{code:"EPSG:4326",projection:Fi,transformation:$(1/180,1,-1/180,.5)}),Yi=i({},U,{projection:Fi,transformation:$(1,0,-1,0),scale:/* @__PURE__ */n(function(t){return Math.pow(2,t)},"scale"),zoom:/* @__PURE__ */n(function(t){return Math.log(t)/Math.LN2},"zoom"),distance:/* @__PURE__ */n(function(t,e){var i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},"distance"),infinite:!0});U.Earth=W,U.EPSG3395=Vi,U.EPSG3857=X,U.EPSG900913=J,U.EPSG4326=qi,U.Simple=Yi;var $i=D.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:/* @__PURE__ */n(function(t){return t.addLayer(this),this},"addTo"),remove:/* @__PURE__ */n(function(){return this.removeFrom(this._map||this._mapToAdd)},"remove"),removeFrom:/* @__PURE__ */n(function(t){return t&&t.removeLayer(this),this},"removeFrom"),getPane:/* @__PURE__ */n(function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},"getPane"),addInteractiveTarget:/* @__PURE__ */n(function(t){return this._map._targets[a(t)]=this,this},"addInteractiveTarget"),removeInteractiveTarget:/* @__PURE__ */n(function(t){return delete this._map._targets[a(t)],this},"removeInteractiveTarget"),getAttribution:/* @__PURE__ */n(function(){return this.options.attribution},"getAttribution"),_layerAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(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:/* @__PURE__ */n(function(t){var e=a(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:/* @__PURE__ */n(function(t){return a(t)in this._layers},"hasLayer"),eachLayer:/* @__PURE__ */n(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),_addLayers:/* @__PURE__ */n(function(t){for(var e=0,i=(t=t?y(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},"_addLayers"),_addZoomLimit:/* @__PURE__ */n(function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},"_addZoomLimit"),_removeZoomLimit:/* @__PURE__ */n(function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},"_removeZoomLimit"),_updateZoomLevels:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},"addLayer"),removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},"hasLayer"),clearLayers:/* @__PURE__ */n(function(){return this.eachLayer(this.removeLayer,this)},"clearLayers"),invoke:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this.eachLayer(t.addLayer,t)},"onAdd"),onRemove:/* @__PURE__ */n(function(t){this.eachLayer(t.removeLayer,t)},"onRemove"),eachLayer:/* @__PURE__ */n(function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},"eachLayer"),getLayer:/* @__PURE__ */n(function(t){return this._layers[t]},"getLayer"),getLayers:/* @__PURE__ */n(function(){var t=[];return this.eachLayer(t.push,t),t},"getLayers"),setZIndex:/* @__PURE__ */n(function(t){return this.invoke("setZIndex",t)},"setZIndex"),getLayerId:/* @__PURE__ */n(function(t){return a(t)},"getLayerId")}),Xi=/* @__PURE__ */n(function(t,e){return new Ki(t,e)},"layerGroup"),Ji=Ki.extend({addLayer:/* @__PURE__ */n(function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},"addLayer"),removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.invoke("setStyle",t)},"setStyle"),bringToFront:/* @__PURE__ */n(function(){return this.invoke("bringToFront")},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this.invoke("bringToBack")},"bringToBack"),getBounds:/* @__PURE__ */n(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=/* @__PURE__ */n(function(t,e){return new Ji(t,e)},"featureGroup"),to=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),createIcon:/* @__PURE__ */n(function(t){return this._createIcon("icon",t)},"createIcon"),createShadow:/* @__PURE__ */n(function(t){return this._createIcon("shadow",t)},"createShadow"),_createIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return(e=e||document.createElement("img")).src=t,e},"_createImg"),_getIconUrl:/* @__PURE__ */n(function(t){return jt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]},"_getIconUrl")});function eo(t){return new to(t)}n(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:/* @__PURE__ */n(function(t){return"string"!=typeof io.imagePath&&(io.imagePath=this._detectIconPath()),(this.options.imagePath||io.imagePath)+to.prototype._getIconUrl.call(this,t)},"_getIconUrl"),_stripUrl:/* @__PURE__ */n(function(t){var e=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._marker=t},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moved},"moved"),_adjustPan:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},"_onDragStart"),_onPreDrag:/* @__PURE__ */n(function(t){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},"_onPreDrag"),_onDrag:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){E(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:/* @__PURE__ */n(function(t,e){_(this,e),this._latlng=G(t)},"initialize"),onAdd:/* @__PURE__ */n(function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},"onAdd"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{zoom:this.update,viewreset:this.update}},"getEvents"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setLatLng:/* @__PURE__ */n(function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),setZIndexOffset:/* @__PURE__ */n(function(t){return this.options.zIndexOffset=t,this.update()},"setZIndexOffset"),getIcon:/* @__PURE__ */n(function(){return this.options.icon},"getIcon"),setIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._icon},"getElement"),update:/* @__PURE__ */n(function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},"update"),_initIcon:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Fe(this._icon,"focus",this._panOnFocus,this),ye(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},"_removeIcon"),_removeShadow:/* @__PURE__ */n(function(){this._shadow&&ye(this._shadow),this._shadow=null},"_removeShadow"),_setPos:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},"_updateZIndex"),_animateZoom:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},"_animateZoom"),_initInteraction:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},"setOpacity"),_updateOpacity:/* @__PURE__ */n(function(){var t=this.options.opacity;this._icon&&ke(this._icon,t),this._shadow&&ke(this._shadow,t)},"_updateOpacity"),_bringToFront:/* @__PURE__ */n(function(){this._updateZIndex(this.options.riseOffset)},"_bringToFront"),_resetZIndex:/* @__PURE__ */n(function(){this._updateZIndex(0)},"_resetZIndex"),_panOnFocus:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.options.icon.options.popupAnchor},"_getPopupAnchor"),_getTooltipAnchor:/* @__PURE__ */n(function(){return this.options.icon.options.tooltipAnchor},"_getTooltipAnchor")});function so(t,e){return new no(t,e)}n(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:/* @__PURE__ */n(function(t){this._renderer=t.getRenderer(this)},"beforeAdd"),onAdd:/* @__PURE__ */n(function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},"onAdd"),onRemove:/* @__PURE__ */n(function(){this._renderer._removePath(this)},"onRemove"),redraw:/* @__PURE__ */n(function(){return this._map&&this._renderer._updatePath(this),this},"redraw"),setStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._renderer&&this._renderer._bringToFront(this),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._renderer&&this._renderer._bringToBack(this),this},"bringToBack"),getElement:/* @__PURE__ */n(function(){return this._path},"getElement"),_reset:/* @__PURE__ */n(function(){this._project(),this._update()},"_reset"),_clickTolerance:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){_(this,e),this._latlng=G(t),this._radius=this.options.radius},"initialize"),setLatLng:/* @__PURE__ */n(function(t){var e=this._latlng;return this._latlng=G(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},"setLatLng"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setRadius:/* @__PURE__ */n(function(t){return this.options.radius=this._radius=t,this.redraw()},"setRadius"),getRadius:/* @__PURE__ */n(function(){return this._radius},"getRadius"),setStyle:/* @__PURE__ */n(function(t){var e=t&&t.radius||this._radius;return ro.prototype.setStyle.call(this,t),this.setRadius(e),this},"setStyle"),_project:/* @__PURE__ */n(function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},"_project"),_updateBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&this._updatePath()},"_update"),_updatePath:/* @__PURE__ */n(function(){this._renderer._updateCircle(this)},"_updatePath"),_empty:/* @__PURE__ */n(function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},"_empty"),_containsPoint:/* @__PURE__ */n(function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},"_containsPoint")});function lo(t,e){return new ao(t,e)}n(lo,"circleMarker");var ho=ao.extend({initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._mRadius=t,this.redraw()},"setRadius"),getRadius:/* @__PURE__ */n(function(){return this._mRadius},"getRadius"),getBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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)}n(uo,"circle");var co=ro.extend({options:{smoothFactor:1,noClip:!1},initialize:/* @__PURE__ */n(function(t,e){_(this,e),this._setLatLngs(t)},"initialize"),getLatLngs:/* @__PURE__ */n(function(){return this._latlngs},"getLatLngs"),setLatLngs:/* @__PURE__ */n(function(t){return this._setLatLngs(t),this.redraw()},"setLatLngs"),isEmpty:/* @__PURE__ */n(function(){return!this._latlngs.length},"isEmpty"),closestLayerPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._bounds},"getBounds"),addLatLng:/* @__PURE__ */n(function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},"addLatLng"),_setLatLngs:/* @__PURE__ */n(function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},"_setLatLngs"),_defaultShape:/* @__PURE__ */n(function(){return Ni(this._latlngs)?this._latlngs:this._latlngs[0]},"_defaultShape"),_convertLatLngs:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=Ei(t[i],e)},"_simplifyPoints"),_update:/* @__PURE__ */n(function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},"_update"),_updatePath:/* @__PURE__ */n(function(){this._renderer._updatePoly(this)},"_updatePath"),_containsPoint:/* @__PURE__ */n(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)&&Ti(t,a[n],a[o])<=l)return!0;return!1},"_containsPoint")});function po(t,e){return new co(t,e)}n(po,"polyline"),co._flat=ji;var _o=co.extend({options:{fill:!0},isEmpty:/* @__PURE__ */n(function(){return!this._latlngs.length||!this._latlngs[0].length},"isEmpty"),getCenter:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){co.prototype._setLatLngs.call(this,t),Ni(this._latlngs)&&(this._latlngs=[this._latlngs])},"_setLatLngs"),_defaultShape:/* @__PURE__ */n(function(){return Ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},"_defaultShape"),_clipPoints:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._renderer._updatePoly(this,!0)},"_updatePath"),_containsPoint:/* @__PURE__ */n(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)}n(fo,"polygon");var mo=Ji.extend({initialize:/* @__PURE__ */n(function(t,e){_(this,e),this._layers={},t&&this.addData(t)},"initialize"),addData:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},"setStyle"),_setLayerStyle:/* @__PURE__ */n(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?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(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}}n(go,"geometryToLayer"),n(yo,"_pointToLayer"),n(vo,"coordsToLatLng"),n(Lo,"coordsToLatLngs"),n(wo,"latLngToCoords"),n(bo,"latLngsToCoords"),n(xo,"getFeature"),n(Mo,"asFeature");var Co={toGeoJSON:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),xo(this,{type:"MultiPoint",coordinates:e})},"toMultiPoint"),toGeoJSON:/* @__PURE__ */n(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")}),n(Po,"geoJSON");var ko=Po,Eo=$i.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:/* @__PURE__ */n(function(t,e,i){this._url=t,this._bounds=j(e),_(this,i)},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ye(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},"onRemove"),setOpacity:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},"setOpacity"),setStyle:/* @__PURE__ */n(function(t){return t.opacity&&this.setOpacity(t.opacity),this},"setStyle"),bringToFront:/* @__PURE__ */n(function(){return this._map&&Le(this._image),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&we(this._image),this},"bringToBack"),setUrl:/* @__PURE__ */n(function(t){return this._url=t,this._image&&(this._image.src=t),this},"setUrl"),setBounds:/* @__PURE__ */n(function(t){return this._bounds=j(t),this._map&&this._reset(),this},"setBounds"),getEvents:/* @__PURE__ */n(function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),setZIndex:/* @__PURE__ */n(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),getBounds:/* @__PURE__ */n(function(){return this._bounds},"getBounds"),getElement:/* @__PURE__ */n(function(){return this._image},"getElement"),_initImage:/* @__PURE__ */n(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=u,e.onmousemove=u,e.onload=s(this.fire,this,"load"),e.onerror=s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){ke(this._image,this.options.opacity)},"_updateOpacity"),_updateZIndex:/* @__PURE__ */n(function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},"_updateZIndex"),_overlayOnError:/* @__PURE__ */n(function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},"_overlayOnError"),getCenter:/* @__PURE__ */n(function(){return this._bounds.getCenter()},"getCenter")}),To=/* @__PURE__ */n(function(t,e,i){return new Eo(t,e,i)},"imageOverlay"),So=Eo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:/* @__PURE__ */n(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=u,e.onmousemove=u,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],n=0;n<i.length;n++)o.push(i[n].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)}n(Oo,"videoOverlay");var zo=Eo.extend({_initImage:/* @__PURE__ */n(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=u,t.onmousemove=u},"_initImage")});function Do(t,e,i){return new zo(t,e,i)}n(Do,"svgOverlay");var Io=$i.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},"openOn"),close:/* @__PURE__ */n(function(){return this._map&&this._map.removeLayer(this),this},"close"),toggle:/* @__PURE__ */n(function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},"toggle"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t._fadeAnimated?(ke(this._container,0),this._removeTimeout=setTimeout(s(ye,void 0,this._container),200)):ye(this._container),this.options.interactive&&(Me(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},"onRemove"),getLatLng:/* @__PURE__ */n(function(){return this._latlng},"getLatLng"),setLatLng:/* @__PURE__ */n(function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},"setLatLng"),getContent:/* @__PURE__ */n(function(){return this._content},"getContent"),setContent:/* @__PURE__ */n(function(t){return this._content=t,this.update(),this},"setContent"),getElement:/* @__PURE__ */n(function(){return this._container},"getElement"),update:/* @__PURE__ */n(function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},"update"),getEvents:/* @__PURE__ */n(function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),isOpen:/* @__PURE__ */n(function(){return!!this._map&&this._map.hasLayer(this)},"isOpen"),bringToFront:/* @__PURE__ */n(function(){return this._map&&Le(this._container),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&we(this._container),this},"bringToBack"),_prepareOpen:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return[0,0]},"_getAnchor")});ri.include({_initOverlay:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Oe(this._container,e.add(i))},"_animateZoom"),_adjustPan:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])},"_getAnchor")}),Bo=/* @__PURE__ */n(function(t,e){return new Ao(t,e)},"popup");ri.mergeOptions({closePopupOnClick:!0}),ri.include({openPopup:/* @__PURE__ */n(function(t,e,i){return this._initOverlay(Ao,t,e,i).openOn(this),this},"openPopup"),closePopup:/* @__PURE__ */n(function(t){return(t=arguments.length?t:this._popup)&&t.close(),this},"closePopup")}),$i.include({bindPopup:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._popup&&this._popup.close(),this},"closePopup"),togglePopup:/* @__PURE__ */n(function(){return this._popup&&this._popup.toggle(this),this},"togglePopup"),isPopupOpen:/* @__PURE__ */n(function(){return!!this._popup&&this._popup.isOpen()},"isPopupOpen"),setPopupContent:/* @__PURE__ */n(function(t){return this._popup&&this._popup.setContent(t),this},"setPopupContent"),getPopup:/* @__PURE__ */n(function(){return this._popup},"getPopup"),_openPopup:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._popup.setLatLng(t.latlng)},"_movePopup"),_onKeyPress:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=Io.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},"getEvents"),_initLayout:/* @__PURE__ */n(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-"+a(this))},"_initLayout"),_updateLayout:/* @__PURE__ */n(function(){},"_updateLayout"),_adjustPan:/* @__PURE__ */n(function(){},"_adjustPan"),_setPosition:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},"_updatePosition"),setOpacity:/* @__PURE__ */n(function(t){this.options.opacity=t,this._container&&ke(this._container,t)},"setOpacity"),_animateZoom:/* @__PURE__ */n(function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},"_animateZoom"),_getAnchor:/* @__PURE__ */n(function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])},"_getAnchor")}),Zo=/* @__PURE__ */n(function(t,e){return new Ro(t,e)},"tooltip");ri.include({openTooltip:/* @__PURE__ */n(function(t,e,i){return this._initOverlay(Ro,t,e,i).openOn(this),this},"openTooltip"),closeTooltip:/* @__PURE__ */n(function(t){return t.close(),this},"closeTooltip")}),$i.include({bindTooltip:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},"unbindTooltip"),_initTooltipInteractions:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._tooltip)return this._tooltip.close()},"closeTooltip"),toggleTooltip:/* @__PURE__ */n(function(){return this._tooltip&&this._tooltip.toggle(this),this},"toggleTooltip"),isTooltipOpen:/* @__PURE__ */n(function(){return this._tooltip.isOpen()},"isTooltipOpen"),setTooltipContent:/* @__PURE__ */n(function(t){return this._tooltip&&this._tooltip.setContent(t),this},"setTooltipContent"),getTooltip:/* @__PURE__ */n(function(){return this._tooltip},"getTooltip"),_addFocusListeners:/* @__PURE__ */n(function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},"_addFocusListeners"),_addFocusListenersOnLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},"_setAriaDescribedByOnLayer"),_openTooltip:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return null},"createShadow")});function jo(t){return new No(t)}n(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:/* @__PURE__ */n(function(t){_(this,t)},"initialize"),onAdd:/* @__PURE__ */n(function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},"onAdd"),beforeAdd:/* @__PURE__ */n(function(t){t._addZoomLimit(this)},"beforeAdd"),onRemove:/* @__PURE__ */n(function(t){this._removeAllTiles(),ye(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},"onRemove"),bringToFront:/* @__PURE__ */n(function(){return this._map&&(Le(this._container),this._setAutoZIndex(Math.max)),this},"bringToFront"),bringToBack:/* @__PURE__ */n(function(){return this._map&&(we(this._container),this._setAutoZIndex(Math.min)),this},"bringToBack"),getContainer:/* @__PURE__ */n(function(){return this._container},"getContainer"),setOpacity:/* @__PURE__ */n(function(t){return this.options.opacity=t,this._updateOpacity(),this},"setOpacity"),setZIndex:/* @__PURE__ */n(function(t){return this.options.zIndex=t,this._updateZIndex(),this},"setZIndex"),isLoading:/* @__PURE__ */n(function(){return this._loading},"isLoading"),redraw:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=l(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},"getEvents"),createTile:/* @__PURE__ */n(function(){return document.createElement("div")},"createTile"),getTileSize:/* @__PURE__ */n(function(){var t=this.options.tileSize;return t instanceof I?t:new I(t,t)},"getTileSize"),_updateZIndex:/* @__PURE__ */n(function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},"_updateZIndex"),_setAutoZIndex:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._map&&!jt.ielt9){ke(this._container,this.options.opacity);var t=+/* @__PURE__ */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&&(E(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},"_updateOpacity"),_onOpaqueTile:u,_initContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(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()),u(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},"_updateLevels"),_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},"_removeTilesAtZoom"),_removeAllTiles:/* @__PURE__ */n(function(){for(var t in this._tiles)this._removeTile(t)},"_removeAllTiles"),_invalidateAll:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},"_resetView"),_animateZoom:/* @__PURE__ */n(function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},"_animateZoom"),_clampZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},"_setZoomTransforms"),_setZoomTransform:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&!this._map._animatingZoom&&this._update()},"_onMoveEnd"),_getTiledPixelBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},"_keyToBounds"),_tileCoordsToNwSe:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t.x+":"+t.y+":"+t.z},"_tileCoordsToKey"),_keyToTileCoords:/* @__PURE__ */n(function(t){var e=t.split(":"),i=new I(+e[0],+e[1]);return i.z=+e[2],i},"_keyToTileCoords"),_removeTile:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){xe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,jt.ielt9&&this.options.opacity<1&&ke(t,this.options.opacity)},"_initTile"),_addTile:/* @__PURE__ */n(function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&k(s(this._tileReady,this,t,null,n)),Oe(n,i),this._tiles[o]={el:n,coords:t,current:!0},e.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},"_addTile"),_tileReady:/* @__PURE__ */n(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=+/* @__PURE__ */new Date,this._map._fadeAnimated?(ke(i.el,0),E(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(s(this._pruneTiles,this),250)))},"_tileReady"),_getTilePos:/* @__PURE__ */n(function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},"_getTilePos"),_wrapCoords:/* @__PURE__ */n(function(t){var e=new I(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},"_wrapCoords"),_pxBoundsToTileRange:/* @__PURE__ */n(function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},"_pxBoundsToTileRange"),_noTilesToLoad:/* @__PURE__ */n(function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0},"_noTilesToLoad")});function Go(t){return new Ho(t)}n(Go,"gridLayer");var Fo=Ho.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},"setUrl"),createTile:/* @__PURE__ */n(function(t,e){var i=document.createElement("img");return He(i,"load",s(this._tileOnLoad,this,e,i)),He(i,"error",s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){jt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},"_tileOnLoad"),_tileOnError:/* @__PURE__ */n(function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},"_tileOnError"),_onTileRemove:/* @__PURE__ */n(function(t){t.tile.onload=null},"_onTileRemove"),_getZoomForUrl:/* @__PURE__ */n(function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},"_getZoomForUrl"),_getSubdomain:/* @__PURE__ */n(function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},"_getSubdomain"),_abortLoading:/* @__PURE__ */n(function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,!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:/* @__PURE__ */n(function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",w),Ho.prototype._removeTile.call(this,t)},"_removeTile"),_tileReady:/* @__PURE__ */n(function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==w))return Ho.prototype._tileReady.call(this,t,e,i)},"_tileReady")});function Uo(t,e){return new Fo(t,e)}n(Uo,"tileLayer");var Wo=Fo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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,Fo.prototype.onAdd.call(this,t)},"onAdd"),getTileUrl:/* @__PURE__ */n(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=Fo.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},"getTileUrl"),setParams:/* @__PURE__ */n(function(t,e){return i(this.wmsParams,t),e||this.redraw(),this},"setParams")});function Vo(t,e){return new Wo(t,e)}n(Vo,"tileLayerWMS"),Fo.WMS=Wo,Uo.wms=Vo;var qo=$i.extend({options:{padding:.1},initialize:/* @__PURE__ */n(function(t){_(this,t),a(this),this._layers=this._layers||{}},"initialize"),onAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.off("update",this._updatePaths,this),this._destroyContainer()},"onRemove"),getEvents:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._updateTransform(t.center,t.zoom)},"_onAnimZoom"),_onZoom:/* @__PURE__ */n(function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},"_onZoom"),_updateTransform:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},"_reset"),_onZoomEnd:/* @__PURE__ */n(function(){for(var t in this._layers)this._layers[t]._project()},"_onZoomEnd"),_updatePaths:/* @__PURE__ */n(function(){for(var t in this._layers)this._layers[t]._update()},"_updatePaths"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=qo.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},"getEvents"),_onViewPreReset:/* @__PURE__ */n(function(){this._postponeUpdatePaths=!0},"_onViewPreReset"),onAdd:/* @__PURE__ */n(function(){qo.prototype.onAdd.call(this),this._draw()},"onAdd"),_initContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){E(this._redrawRequest),delete this._ctx,ye(this._container),Fe(this._container),delete this._container},"_destroyContainer"),_updatePaths:/* @__PURE__ */n(function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},"_updatePaths"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){qo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},"_reset"),_initPath:/* @__PURE__ */n(function(t){this._updateDashArray(t),this._layers[a(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:/* @__PURE__ */n(function(t){this._requestRedraw(t)},"_addPath"),_removePath:/* @__PURE__ */n(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[a(t)],this._requestRedraw(t)},"_removePath"),_updatePath:/* @__PURE__ */n(function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},"_updatePath"),_updateStyle:/* @__PURE__ */n(function(t){this._updateDashArray(t),this._requestRedraw(t)},"_updateStyle"),_updateDashArray:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},"_requestRedraw"),_extendRedrawBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},"_redraw"),_clear:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},"_onMouseMove"),_handleMouseOut:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){if(!this._mouseHoverThrottled){for(var i,o,n=this._drawFirst;n;n=n.next)(i=n.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(s(function(){this._mouseHoverThrottled=!1},this),32)}},"_handleMouseHover"),_fireEvent:/* @__PURE__ */n(function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},"_fireEvent"),_bringToFront:/* @__PURE__ */n(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:/* @__PURE__ */n(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}n($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:/* @__PURE__ */n(function(){this._container=ge("div","leaflet-vml-container")},"_initContainer"),_update:/* @__PURE__ */n(function(){this._map._animatingZoom||(qo.prototype._update.call(this),this.fire("update"))},"_update"),_initPath:/* @__PURE__ */n(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[a(t)]=t},"_initPath"),_addPath:/* @__PURE__ */n(function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},"_addPath"),_removePath:/* @__PURE__ */n(function(t){var e=t._container;ye(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},"_removePath"),_updateStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){t._path.v=e},"_setPath"),_bringToFront:/* @__PURE__ */n(function(t){Le(t._container)},"_bringToFront"),_bringToBack:/* @__PURE__ */n(function(t){we(t._container)},"_bringToBack")},Jo=jt.vml?Ko:Q,Qo=qo.extend({_initContainer:/* @__PURE__ */n(function(){this._container=Jo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Jo("g"),this._container.appendChild(this._rootGroup)},"_initContainer"),_destroyContainer:/* @__PURE__ */n(function(){ye(this._container),Fe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},"_destroyContainer"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(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[a(t)]=t},"_initPath"),_addPath:/* @__PURE__ */n(function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},"_addPath"),_removePath:/* @__PURE__ */n(function(t){ye(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},"_removePath"),_updatePath:/* @__PURE__ */n(function(t){t._project(),t._update()},"_updatePath"),_updateStyle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._setPath(t,tt(t._parts,e))},"_updatePoly"),_updateCircle:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){t._path.setAttribute("d",e)},"_setPath"),_bringToFront:/* @__PURE__ */n(function(t){Le(t._path)},"_bringToFront"),_bringToBack:/* @__PURE__ */n(function(t){we(t._path)},"_bringToBack")});function tn(t){return jt.svg||jt.vml?new Qo(t):null}jt.vml&&Qo.include(Xo),n(tn,"svg"),ri.include({getRenderer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.options.preferCanvas&&$o(t)||tn(t)},"_createRenderer")});var en=_o.extend({initialize:/* @__PURE__ */n(function(t,e){_o.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},"initialize"),setBounds:/* @__PURE__ */n(function(t){return this.setLatLngs(this._boundsToLatLngs(t))},"setBounds"),_boundsToLatLngs:/* @__PURE__ */n(function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]},"_boundsToLatLngs")});function on(t,e){return new en(t,e)}n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._container,"mousedown",this._onMouseDown,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._container,"mousedown",this._onMouseDown,this)},"removeHooks"),moved:/* @__PURE__ */n(function(){return this._moved},"moved"),_destroy:/* @__PURE__ */n(function(){ye(this._pane),delete this._pane},"_destroy"),_resetState:/* @__PURE__ */n(function(){this._resetStateTimeout=0,this._moved=!1},"_resetState"),_clearDeferredResetState:/* @__PURE__ */n(function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},"_clearDeferredResetState"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._moved&&(ye(this._box),Me(this._container,"leaflet-crosshair")),le(),Ae(),Fe(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},"_finish"),_onMouseUp:/* @__PURE__ */n(function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map.on("dblclick",this._onDoubleClick,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){this._map.off("dblclick",this._onDoubleClick,this)},"removeHooks"),_onDoubleClick:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){Me(this._map._container,"leaflet-grab"),Me(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},"removeHooks"),moved:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moved},"moved"),moving:/* @__PURE__ */n(function(){return this._draggable&&this._draggable._moving},"moving"),_onDragStart:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){if(this._map.options.inertia){var e=this._lastTime=+/* @__PURE__ */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:/* @__PURE__ */n(function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},"_prunePositions"),_onZoomEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return t-(t-e)*this._viscosity},"_viscousLimit"),_onPreDragLimit:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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(+/* @__PURE__ */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:/* @__PURE__ */n(function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._removeHooks(),Fe(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},"removeHooks"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._focused=!0,this._map.fire("focus")},"_onFocus"),_onBlur:/* @__PURE__ */n(function(){this._focused=!1,this._map.fire("blur")},"_onBlur"),_setPanDelta:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(document,"keydown",this._onKeyDown,this)},"_addHooks"),_removeHooks:/* @__PURE__ */n(function(){Fe(document,"keydown",this._onKeyDown,this)},"_removeHooks"),_onKeyDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._map._container,"wheel",this._onWheelScroll,this)},"removeHooks"),_onWheelScroll:/* @__PURE__ */n(function(t){var e=ii(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+/* @__PURE__ */new Date);var o=Math.max(i-(+/* @__PURE__ */new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),o),Je(t)},"_onWheelScroll"),_performZoom:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){He(this._map._container,"touchstart",this._onDown,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Fe(this._map._container,"touchstart",this._onDown,this)},"removeHooks"),_onDown:/* @__PURE__ */n(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(s(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:/* @__PURE__ */n(function t(){Fe(document,"touchend",Xe),Fe(document,"touchend touchcancel",t)},"cancelClickPrevent"),_cancel:/* @__PURE__ */n(function(){clearTimeout(this._holdTimeout),Fe(document,"touchend touchcancel contextmenu",this._cancel,this),Fe(document,"touchmove",this._onMove,this)},"_cancel"),_onMove:/* @__PURE__ */n(function(t){var e=t.touches[0];this._newPos=new I(e.clientX,e.clientY)},"_onMove"),_isTapValid:/* @__PURE__ */n(function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},"_isTapValid"),_simulateEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){xe(this._map._container,"leaflet-touch-zoom"),He(this._map._container,"touchstart",this._onTouchStart,this)},"addHooks"),removeHooks:/* @__PURE__ */n(function(){Me(this._map._container,"leaflet-touch-zoom"),Fe(this._map._container,"touchstart",this._onTouchStart,this)},"removeHooks"),_onTouchStart:/* @__PURE__ */n(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:/* @__PURE__ */n(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]),n=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(n,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&n<1||this._zoom>e.getMaxZoom()&&n>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===n)return}else{var r=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===n&&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),E(this._animRequest);var a=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=k(a,this,!0),Xe(t)}},"_onTouchMove"),_onTouchEnd:/* @__PURE__ */n(function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Fe(document,"touchmove",this._onTouchMove,this),Fe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1},"_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=U,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=Eo,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=Fo,t.Tooltip=Ro,t.Transformation=Y,t.Util=T,t.VideoOverlay=So,t.bind=s,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=To,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=a,t.svg=tn,t.svgOverlay=Do,t.tileLayer=Uo,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}(Ea.exports)),Ea.exports}n(Ta,"requireLeafletSrc");var Sa=Ta();const Oa=/* @__PURE__ */Or(Sa);!function(t,e){function i(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}var o;n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},"removeHooks"),setOptions:/* @__PURE__ */n(function(t){L.setOptions(this,t)},"setOptions"),_fireCreatedEvent:/* @__PURE__ */n(function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},"_fireCreatedEvent"),_cancelDrawing:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},"completeShape"),_finishShape:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return!0},"_shapeIsValid"),_onZoomEnd:/* @__PURE__ */n(function(){null!==this._markers&&this._updateGuide()},"_onZoomEnd"),_onMouseMove:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._mouseDownOrigin=L.point(t,e)},"_startPoint"),_onMouseUp:/* @__PURE__ */n(function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},"_onMouseUp"),_endPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},"_onMouseOut"),_calculateFinishDistance:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},"_updateTooltip"),_drawGuide:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},"_clearGuides"),_getTooltipText:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},"_clearHideErrorTimeout"),_disableNewMarkers:/* @__PURE__ */n(function(){this._disableMarkers=!0},"_disableNewMarkers"),_enableNewMarkers:/* @__PURE__ */n(function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},"_enableNewMarkers"),_cleanUpShape:/* @__PURE__ */n(function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},"_cleanUpShape"),_fireCreatedEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},"initialize"),_updateFinishHandler:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._markers.length>=3},"_shapeIsValid"),_vertexChanged:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{text:this._endLabelText}},"_getTooltipText"),_onMouseDown:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},"_onMouseMove"),_onMouseUp:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},"disable"),_onMouseUp:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_getTooltipText:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},"_createMarker"),_onClick:/* @__PURE__ */n(function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},"_onClick"),_onTouch:/* @__PURE__ */n(function(t){this._onMouseMove(t),this._onClick()},"_onTouch"),_fireCreatedEvent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_createMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},"_fireCreatedEvent"),_onMouseMove:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._marker=t,L.setOptions(this,e)},"initialize"),addHooks:/* @__PURE__ */n(function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"addHooks"),removeHooks:/* @__PURE__ */n(function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},"removeHooks"),_onDragEnd:/* @__PURE__ */n(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onDragEnd"),_toggleMarkerHighlight:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},"_defaultShape"),_eachVertexHandler:/* @__PURE__ */n(function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},"_eachVertexHandler"),addHooks:/* @__PURE__ */n(function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},"addHooks"),removeHooks:/* @__PURE__ */n(function(){this._eachVertexHandler(function(t){t.removeHooks()})},"removeHooks"),updateMarkers:/* @__PURE__ */n(function(){this._eachVertexHandler(function(t){t.updateMarkers()})},"updateMarkers"),_initHandlers:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},"_defaultShape"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._poly.fire("editstart")},"_onMarkerDragStart"),_spliceLatLngs:/* @__PURE__ */n(function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},"_spliceLatLngs"),_removeMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},"_updateIndexes"),_createMiddleMarker:/* @__PURE__ */n(function(t,e){var i,o,s,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,o=/* @__PURE__ */n(function(){a.off("touchmove",o,this);var n=e._index;a._index=n,a.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(n,0,r),this._markers.splice(n,0,a),a.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},"o"),s=/* @__PURE__ */n(function(){a.off("dragstart",o,this),a.off("dragend",s,this),a.off("touchmove",o,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},"a"),i=/* @__PURE__ */n(function(){o.call(this),s.call(this),this._fireEdit()},"i"),a.on("click",i,this).on("dragstart",o,this).on("dragend",s,this).on("touchmove",o,this),this._markerGroup.addLayer(a)},"_createMiddleMarker"),_updatePrevNext:/* @__PURE__ */n(function(t,e){t&&(t._next=e),e&&(e._prev=t)},"_updatePrevNext"),_getMiddleLatLng:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._markerGroup.clearLayers(),this._initMarkers()},"updateMarkers"),_initMarkers:/* @__PURE__ */n(function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},"_initMarkers"),_createMoveMarker:/* @__PURE__ */n(function(){},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(function(){},"_createResizeMarker"),_createMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(0),this._shape.fire("editstart")},"_onMarkerDragStart"),_fireEdit:/* @__PURE__ */n(function(){this._shape.edited=!0,this._shape.fire("edit")},"_fireEdit"),_onMarkerDrag:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(1),this._fireEdit()},"_onMarkerDragEnd"),_onTouchStart:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},"_onTouchEnd"),_move:/* @__PURE__ */n(function(){},"_move"),_resize:/* @__PURE__ */n(function(){},"_resize")}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:/* @__PURE__ */n(function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},"_getCorners"),_toggleCornerMarkers:/* @__PURE__ */n(function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},"_toggleCornerMarkers"),_repositionCornerMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},"_createMoveMarker"),_createResizeMarker:/* @__PURE__ */n(function(){this._resizeMarkers=[]},"_createResizeMarker"),_move:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},"_createResizeMarker"),_getResizeMarkerPoint:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},"initialize"),addHooks:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},"_onTouchStart"),_onTouchEnd:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchend")},"_onTouchEnd"),_onTouchCancel:/* @__PURE__ */n(function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},"_onTouchCancel"),_onTouchLeave:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},"_onTouchLeave"),_onTouchMove:/* @__PURE__ */n(function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},"_onTouchMove"),_detectIE:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},"_initInteraction"),_initInteractionLegacy:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)},"isVersion07x")}),L.Util.extend(L.LineUtil,{segmentsIntersect:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},"newLatLngIntersects"),newPointIntersects:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},"_tooFewPointsForIntersection"),_lineSegmentsIntersectsRange:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},"onRemove"),setDrawingOptions:/* @__PURE__ */n(function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},"setDrawingOptions"),_toolbarEnabled:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return null!==this._activeMode},"enabled"),disable:/* @__PURE__ */n(function(){this.enabled()&&this._activeMode.handler.disable()},"disable"),addToolbar:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},"_detectIOS"),_createButton:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},"_handlerDeactivated"),_createActions:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},"dispose"),updateContent:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},"showAsError"),removeError:/* @__PURE__ */n(function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},"removeError"),_onMouseOut:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},"removeToolbar"),disable:/* @__PURE__ */n(function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},"disable"),_save:/* @__PURE__ */n(function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},"_save"),_clearAllLayers:/* @__PURE__ */n(function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},"_clearAllLayers"),_checkDisabled:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},"revertLayers"),save:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},"_getTooltipText"),_updateTooltip:/* @__PURE__ */n(function(){this._tooltip.updateContent(this._getTooltipText())},"_updateTooltip"),_revertLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_onMarkerDragEnd:/* @__PURE__ */n(function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},"_onMarkerDragEnd"),_onTouchMove:/* @__PURE__ */n(function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},"_onTouchMove"),_hasAvailableLayers:/* @__PURE__ */n(function(){return 0!==this._featureGroup.getLayers().length},"_hasAvailableLayers")}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},"revertLayers"),save:/* @__PURE__ */n(function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},"save"),removeAllLayers:/* @__PURE__ */n(function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},"removeAllLayers"),_enableLayerDelete:/* @__PURE__ */n(function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},"_enableLayerDelete"),_disableLayerDelete:/* @__PURE__ */n(function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},"_disableLayerDelete"),_removeLayer:/* @__PURE__ */n(function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},"_removeLayer"),_onMouseMove:/* @__PURE__ */n(function(t){this._tooltip.updatePosition(t.latlng)},"_onMouseMove"),_hasAvailableLayers:/* @__PURE__ */n(function(){return 0!==this._deletableLayers.getLayers().length},"_hasAvailableLayers")})}(window,document);var za,Da={exports:{}};function Ia(){return za||(za=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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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=/* @__PURE__ */(new Date).getTime(),p=L.bind(function(){var d=/* @__PURE__ */(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(s&&h%200==0&&/* @__PURE__ */(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,/* @__PURE__ */(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},"getLayers"),getLayer:/* @__PURE__ */n(function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},"getLayer"),hasLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){var i=this._map;"function"!=typeof e&&(e=/* @__PURE__ */n(function(){},"callback"));var o=/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},"getVisibleParent"),_arraySplice:/* @__PURE__ */n(function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},"_arraySplice"),_removeFromGridUnclustered:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t.target.__dragStart=t.target._latlng},"_childMarkerDragStart"),_childMarkerMoved:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},"_moveChild"),_childMarkerDragEnd:/* @__PURE__ */n(function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},"_childMarkerDragEnd"),_removeLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},"_isOrIsParent"),fire:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},"listens"),_defaultIconCreateFunction:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},"_hideCoverage"),_unbindEvents:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},"_zoomEnd"),_moveEnd:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,o=i;"function"!=typeof i&&(o=/* @__PURE__ */n(function(){return i},"radiusFn")),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var s=t;s>=e;s--)this._gridClusters[s]=new L.DistanceGrid(o(s)),this._gridUnclustered[s]=new L.DistanceGrid(o(s));this._topClusterLevel=new this._markerCluster(this,e-1)},"_generateInitialClusters"),_addLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},"_refreshClustersIcons"),_enqueue:/* @__PURE__ */n(function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},"_enqueue"),_processQueue:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},"_getExpandedVisibleBounds"),_checkBoundsMaxLat:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:/* @__PURE__ */n(function(){return 1},"getChildCount"),getAllChildMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){},"_animationStart"),_animationZoomIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._animationAddLayerNonAnimated(t,e)},"_animationAddLayer")},_withAnimation:{_animationStart:/* @__PURE__ */n(function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},"_animationStart"),_animationZoomIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},"_animationEnd"),_forceLayout:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._childCount},"getChildCount"),zoomToBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},"getBounds"),_updateIcon:/* @__PURE__ */n(function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},"_updateIcon"),createIcon:/* @__PURE__ */n(function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},"createIcon"),createShadow:/* @__PURE__ */n(function(){return this._iconObj.createShadow()},"createShadow"),_addChild:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},"_setClusterCenter"),_resetBounds:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},"_addToMap"),_recursivelyAnimateChildrenIn:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},"_recursivelyBecomeVisible"),_recursivelyAddChildrenToMap:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},"_restorePosition"),_recursivelyRemoveChildrenFromMap:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount},"_isSingleParent")});L.Marker.include({clusterHide:/* @__PURE__ */n(function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},"clusterHide"),clusterShow:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t,e){this.removeObject(t),this.addObject(t,e)},"updateObject"),removeObject:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},"_getCoord"),_sqDist:/* @__PURE__ */n(function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o},"_sqDist")},L.QuickHull={getDistant:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},"unspiderfy"),_generatePointsCircle:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._noanimationUnspiderfy()},"_animationUnspiderfy")}),L.MarkerCluster.include({_animationSpiderfy:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._unspiderfy.apply(this,arguments)},"unspiderfy"),_spiderfierOnAdd:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},"_unspiderfyZoomStart"),_unspiderfyZoomAnim:/* @__PURE__ */n(function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},"_unspiderfyZoomAnim"),_unspiderfyWrapper:/* @__PURE__ */n(function(){this._unspiderfy()},"_unspiderfyWrapper"),_unspiderfy:/* @__PURE__ */n(function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},"_unspiderfy"),_noanimationUnspiderfy:/* @__PURE__ */n(function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},"_noanimationUnspiderfy"),_unspiderfyLayer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},"_flagParentsIconsNeedUpdate"),_refreshSingleMarkerModeMarkers:/* @__PURE__ */n(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:/* @__PURE__ */n(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})}(Da.exports)),Da.exports}n(Ia,"requireLeaflet_markerclusterSrc"),Ia();const Aa=Symbol("newer"),Ba=Symbol("older"),Ra=class _Entry{key;value;constructor(t,e){this.key=t,this.value=e,this[Aa]=void 0,this[Ba]=void 0}};n(Ra,"Entry");let Za=Ra;const Na=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=/* @__PURE__ */new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}_markEntryAsUsed(t){t!==this.newest&&(t[Aa]&&(t===this.oldest&&(this.oldest=t[Aa]),t[Aa][Ba]=t[Ba]),t[Ba]&&(t[Ba][Aa]=t[Aa]),t[Aa]=void 0,t[Ba]=this.newest,this.newest&&(this.newest[Aa]=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 Za(n.value[0],n.value[1]);if(this._keymap.set(t.key,t),e?(e[Aa]=t,t[Ba]=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 Za(t,e)),this.newest?(this.newest[Aa]=i,i[Ba]=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[Aa]?(this.oldest=this.oldest[Aa],this.oldest[Ba]=void 0):(this.oldest=void 0,this.newest=void 0),t[Aa]=t[Ba]=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[Aa]&&e[Ba]?(e[Ba][Aa]=e[Aa],e[Aa][Ba]=e[Ba]):e[Aa]?(e[Aa][Ba]=void 0,this.oldest=e[Aa]):e[Ba]?(e[Ba][Aa]=void 0,this.newest=e[Ba]):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 Ga(this.oldest)}values(){return new Fa(this.oldest)}entries(){return this}[Symbol.iterator](){return new Ha(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[Aa]}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[Aa];return t}toString(){let t="",e=this.oldest;for(;e;)t+=String(e.key)+":"+e.value,e=e[Aa],e&&(t+=" < ");return t}};n(Na,"LRUMap");let ja=Na;function Ha(t){this.entry=t}function Ga(t){this.entry=t}function Fa(t){this.entry=t}function Ua(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)}n(Ha,"EntryIterator"),Ha.prototype[Symbol.iterator]=function(){return this},Ha.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},n(Ga,"KeyIterator"),Ga.prototype[Symbol.iterator]=function(){return this},Ga.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:t.key}):{done:!0,value:void 0}},n(Fa,"ValueIterator"),Fa.prototype[Symbol.iterator]=function(){return this},Fa.prototype.next=function(){const t=this.entry;return t?(this.entry=t[Aa],{done:!1,value:t.value}):{done:!0,value:void 0}},n(Ua,"waitForAPI"),L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:/* @__PURE__ */n(function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new ja(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},"initialize"),onAdd:/* @__PURE__ */n(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),Ua(()=>{this._map&&(this._initMutant(),google.maps.event.addListenerOnce(this._mutant,"idle",()=>{this._map&&(this._checkZoomLevels(),this._mutantIsReady=!0)}))})},"onAdd"),onRemove:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){return this.whenReady(()=>{var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])}),this},"removeGoogleLayer"),_initMutantContainer:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(t){const e=t.cloneNode(!0);return e.style.visibility="visible",e},"_clone"),_checkZoomLevels:/* @__PURE__ */n(function(){const t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},"_checkZoomLevels"),_setMaxNativeZoom:/* @__PURE__ */n(function(t){t!==this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},"_setMaxNativeZoom"),_update:/* @__PURE__ */n(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:/* @__PURE__ */n(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,Va={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]}},qa=Sa.Icon.extend({options:{icon:"leaf",iconSize:Va.iconSize.circle,iconAnchor:Va.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:Va.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:Va.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize(t){this.applyDefaults(t),this.options=t&&t.html?t:Sa.Util.setOptions(this,t)},applyDefaults(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=Va.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=Va.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=Va.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=Va.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=Sa.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=Sa.point(e.iconSize),o=Sa.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 Ya(t){return new qa(t)}n(Ya,"BeautifyIcon");const $a=class _LeafletLayer extends Sa.Layer{_rootGroup};n($a,"LeafletLayer");let Ka=$a;const Xa=class _D3SvgOverlay extends Ka{_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 Sa.LatLngBounds([-90,-180],[90,180]);const t=this.selection.node().getBBox();let e,i;try{e=this.projection.layerPointToLatLng(new Sa.Point(t.x,t.y+t.height))}catch(o){e=[-90,-180]}try{i=this.projection.layerPointToLatLng(new Sa.Point(t.x+t.width,t.y))}catch(o){i=[90,180]}return new Sa.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 e=this;return this._svg=Sa.svg(),t.addLayer(this._svg),this._rootGroup=u(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=Sa.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Sa.point(0,0),this._scale=1,this.projection={latLngToLayerPoint(t,i){i=e._undef(i)?e._zoom:i;return e.map.project(Sa.latLng(t),i)._subtract(e._pixelOrigin)},layerPointToLatLng(t,i){i=e._undef(i)?e._zoom:i;const o=Sa.point(t).add(e._pixelOrigin);return e.map.unproject(o,i)},unitsPerMeter:256*Math.pow(2,e._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:e.map,layer:e,scale:1},this.projection._projectPoint=function(t,i){const o=e.projection.latLngToLayerPoint(new Sa.LatLng(i,t));this.stream.point(o.x,o.y)},this.projection.pathFromGeojson=dn().projection(_n({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}};n(Xa,"D3SvgOverlay");let Ja=Xa;var Qa,tl={exports:{}};function el(){return Qa||(Qa=1,function(){function t(e){if(!(this instanceof t))return new t(e);this._canvas=e="string"==typeof e?document.getElementById(e):e,this._ctx=e.getContext("2d"),this._width=e.width,this._height=e.height,this._max=1,this._data=[]}tl.exports=t,n(t,"simpleheat"),t.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:/* @__PURE__ */n(function(t){return this._data=t,this},"data"),max:/* @__PURE__ */n(function(t){return this._max=t,this},"max"),add:/* @__PURE__ */n(function(t){return this._data.push(t),this},"add"),clear:/* @__PURE__ */n(function(){return this._data=[],this},"clear"),radius:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){this._width=this._canvas.width,this._height=this._canvas.height},"resize"),gradient:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(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:/* @__PURE__ */n(function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor},"_createCanvas")}}()),tl.exports}n(el,"requireSimpleheat");var il=el();const ol=/* @__PURE__ */Or(il),nl=/* @__PURE__ */I({__proto__:null,default:ol},[il]),sl=window.simpleheat||nl&&ol||nl,rl=class _LeafletLayer2 extends Sa.Layer{};n(rl,"LeafletLayer2");let al=rl,ll=(n(i=class extends al{_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=Sa.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&&Sa.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=Sa.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=Sa.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&&Sa.Browser.any3d;Sa.DomUtil.addClass(t,"leaflet-zoom-"+(o?"animated":"hide")),this._heat=sl(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]);Sa.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 Sa.Bounds(Sa.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());Sa.DomUtil.setTransform?Sa.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[Sa.DomUtil.TRANSFORM]=Sa.DomUtil.getTranslateString(i)+" scale("+e+")"}},"HeatLayer"),i);const hl=Oa.MarkerClusterGroup,ul=class _TileLayer extends y{_layer=new Sa.FeatureGroup;_crs=Sa.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){}};n(ul,"TileLayer");let cl=ul;const pl=Bs("Albers").scale(.5),dl=Bs("AlbersUsaPr").scale(.5),_l={project(t){let e=dl([t.lng,t.lat]);return e||(e=pl([t.lng,t.lat])),new Sa.Point(e[0],e[1])},unproject(t){if(isNaN(t.x)||isNaN(t.y))return new Sa.LatLng(0,0);{const e=pl.invert([t.x,t.y]);return new Sa.LatLng(e[1],e[0])}}},fl=Sa.Util.extend({},Sa.CRS,{projection:_l,transformation:new Sa.Transformation(1,0,1,0),infinite:!0}),ml=class _AlbersLayer extends cl{_crs=fl;constructor(){super()}hasBounds(){return!0}getBounds(){return new Sa.LatLngBounds([20,-123],[49,-64])}};n(ml,"AlbersLayer");let gl=ml;gl.prototype._class+=" map_AlbersLayer";const yl=class _BlankLayer extends cl{constructor(){super()}};n(yl,"BlankLayer");let vl=yl;vl.prototype._class+=" map_BlankLayer";const Ll=class _GMapLayer extends cl{constructor(){super()}init(){return this._initPromise||(this._initPromise=Gr()),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()}))}};n(Ll,"GMapLayer");let wl=Ll;wl.prototype._class+=" map_GMapLayer",wl.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});const bl=class _MapBoxLayer extends cl{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 Sa.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}))}};n(bl,"MapBoxLayer");let xl=bl;xl.prototype._class+=" map_MapBoxLayer";const Ml=class _OpenStreetLayer extends cl{constructor(){super()}attribution(){return""}getMaxZoom(){return 18}layerEnter(t){super.layerEnter(t),this.add(new Sa.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"}))}};n(Ml,"OpenStreetLayer");let Cl=Ml;Cl.prototype._class+=" map_MapBoxLayer";const Pl=class _Leaflet extends f{_leafletElement;_leafletMap;_iconBar=(new v).buttons([(new w).faChar("fa-plus").tooltip("Zoom in").on("click",()=>{this.zoomPlus()}),(new w).faChar("fa-minus").tooltip("Zoom out").on("click",()=>{this.zoomMinus()}),new b,(new w).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",()=>{this.zoomToFit()})]);_blankLayer=new vl;_albersLayer=new gl;_mapBoxLayer=new xl;_openStreetLayer=new Cl;_gmapLayer=new wl;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 Sa.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}};n(Pl,"Leaflet");let kl=Pl;kl.prototype._class+=" map_Leaflet",kl.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),kl.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")}),kl.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:/* @__PURE__ */n(t=>t.isLayer(),"hidden")});const El=class _FeatureLayer extends kl{_layer;_selection;constructor(t=!1){super(),this._layer=t?new hl:new Sa.FeatureGroup,this._layer.__hpcc_layer=this,c.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,e){return void 0===e?u(this._layer.getPane()).style(t):(u(this._layer.getPane()).style(t,e),this)}propValue(t,e,i){return(t<0?i:e[t])||i}layerEnter(t){t.addLayer(this._layer);const e=u(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(e)}layerUpdate(t){}layerExit(t){this._layer.clearLayers(),t.removeLayer(this._layer)}zoomEnd(t){}moveEnd(t){}viewReset(t){}};n(El,"FeatureLayer");let Tl=El;Tl.prototype._class+=" map_FeatureLayer",Tl.prototype.mixin(c.SimpleSelectionMixin),Tl.prototype.publishReset(["layers"]);const Sl=class _ClusterLayer extends Tl{constructor(t=!0){super(t)}};n(Sl,"ClusterLayer");let Ol=Sl;Ol.prototype._class+=" map_ClusterLayer";const zl=class _D3SurfaceLayer extends Tl{_lfd3=(new Ja).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){}};n(zl,"D3SurfaceLayer");let Dl=zl;const Il=class _Circles extends Ol{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 Sa.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){}};n(Il,"Circles");let Al=Il;Al.prototype._class+=" map_Circles",Al.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("radius",50,"number","Radius (meters)"),Al.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Al.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Al.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Al.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Al.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const Bl=class _D3Circles extends Dl{layerUpdate(t,e){super.layerUpdate(t,e);const i=this._lfd3._rootGroup;e=e||this._lfd3.projection;const o=this.columns(),s=o.indexOf(this.latitudeColumn()),r=o.indexOf(this.longitudeColumn()),a=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());function h(t){return{lat:+t[s],lng:+t[r]}}n(h,"toLatLng");const u=i.selectAll("circle").data(this.data().filter(t=>!this.omitNullLatLong()||!!t[s]&&!!t[r]));u.enter().append("circle").merge(u).attr("cx",t=>e.latLngToLayerPoint(h(t)).x).attr("cy",t=>e.latLngToLayerPoint(h(t)).y).attr("r",Math.max(3/e.scale,this.radius()/e.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",t=>this.propValue(a,t,this.strokeColor())).attr("stroke-width",Math.max(1/e.scale,1/e.metresPerPixel)).style("fill",t=>this.propValue(l,t,this.fillColor())),u.exit().remove()}clickHandler(t,e){}};n(Bl,"D3Circles");let Rl=Bl;Rl.prototype._class+=" map_D3Circles",Rl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("radius",50,"number","Radius (meters)"),Rl.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Rl.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Rl.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Rl.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Rl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const Zl=class _ClusterCircles extends Tl{_palette;createIcon(t,e,i){const o=x(e);return o.opacity=.5,new Sa.DivIcon({className:"cluster-circle",iconSize:new Sa.Point(40,40),html:`<div style='opacity:${this.opacity()};background-color:${o.toString()}'><div style='background-color:${e}'><span style='color:${p.textColor(e)}'>${i(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 e=this.cellFunc(this.latitudeColumn(),0),i=this.cellFunc(this.longitudeColumn(),0),o=/* @__PURE__ */n(t=>[+e(t),+i(t)],"latLongFunc"),s=this.cellFunc(this.weightColumn(),0),r=this.data(),a=M(r,s),l=this.weightFormat()?C(this.weightFormat()):t=>t;this.clear(),r.forEach(t=>{const e=new Sa.Marker(o(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){}};n(Zl,"ClusterCircles");let Nl=Zl;function jl(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)}Nl.prototype._class+=" map_ClusterCircles",Nl.prototype._palette=p.rainbow("default"),Nl.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Nl.prototype._palette.switch()),Nl.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Nl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),Nl.prototype.publish("weightFormat",",","string","Number format for weight"),Nl.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]}),n(jl,"fixDateLine");const Hl=class _TopoJSON extends Sa.GeoJSON{constructor(t,e){super(t,{...e,onEachFeature:/* @__PURE__ */n((t,i)=>{e.onEachFeature&&e.onEachFeature(t,i),jl(0,i)},"onEachFeature")})}addData(t){let e,i;if("Topology"===t.type){for(i in t.objects)t.objects.hasOwnProperty(i)&&(e=Ys(t,t.objects[i]),super.addData.call(this,e));return this}return super.addData.call(this,t),this}};n(Hl,"TopoJSON");let Gl=Hl;const Fl=class _World extends Tl{_features;_palette;_dataMap={};_dataMinWeight=null;_dataMaxWeight=null;constructor(){super(),c.SimpleSelectionMixin.call(this)}hasBounds(){return!0}getBounds(){const t=super.getBounds();return t.isValid()?new Sa.LatLngBounds([t.getNorth(),t.getWest()],[t.getSouth(),t.getEast()]):new Sa.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=u(t.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");const e=this._svgElement.append("defs");new P(e,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}}_prevFeatures;layerUpdate(t){this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Gl(this._features,{onEachFeature:/* @__PURE__ */n((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){}};n(Fl,"World");let Ul=Fl;Ul.prototype._class+=" map_World",Ul.prototype._palette=p.rainbow("default"),Ul.prototype.mixin(c.SimpleSelectionMixin),Ul.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Ul.prototype._palette.switch(),{tags:["Basic","Shared"]}),Ul.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Ul.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Ul.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Ul.prototype.publish("meshColor","black","html-color","Stroke Color"),Ul.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Ul.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");let Wl=null;const Vl=class _Countries extends Ul{constructor(){super()}init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Wl&&t(Wl),hr(`${ir()}/countries.json`,function(e){Wl=e,t(Wl)})}).then(t=>{this._features=Ys(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}`)}};n(Vl,"Countries");let ql=Vl;function Yl(t,e){const i=t.indexOf(e);i>=0&&t.splice(i,1)}n(Yl,"del");const $l=class _DrawLayer extends Tl{_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 Sa.Polyline(t)),this._polygons=(t.polygons||[]).map(t=>new Sa.Polygon(t)),this._rectangles=(t.rectangles||[]).map(t=>new Sa.Rectangle(t)),this._circles=(t.circles||[]).map(t=>new Sa.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(Sa.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(Sa.Draw.Event.EDITED,t=>{t.layers.eachLayer(t=>{this.changed("UPDATE",t)})}),t.on(Sa.Draw.Event.DELETED,t=>{t.layers.eachLayer(t=>{Yl(this._polylines,t),Yl(this._polygons,t),Yl(this._rectangles,t),Yl(this._circles,t),this.changed("DELETE",t)})})}layerUpdate(t){super.layerUpdate(t),this.style("opacity",this.opacity());const e=this.drawOptions(),i=S(e);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&t.removeControl(this._drawControl),this._drawControl=new Sa.Control.Draw({position:"topleft",draw:e,edit:{featureGroup:this._layer}}),t.addControl(this._drawControl))}layerExit(t){super.layerExit(t)}changed(t,e){}};n($l,"DrawLayer");let Kl=$l;Kl.prototype._class+=" map_DrawLayer",Kl.prototype.publish("opacity",1,"number","Layer Opacity"),Kl.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Kl.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Kl.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Kl.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");const Xl=class _HeatLayer extends Tl{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 Sa.LatLngBounds([t[i],t[o]]),[t[i],t[o],this.weightColumn_exists()?t[n]:.5])),a=new ll(r,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});a.getBounds=()=>s,this.add(a)}};n(Xl,"HeatLayer");let Jl=Xl;Jl.prototype._class+=" map_Heat",Jl.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),Jl.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Jl.prototype.publish("opacity",.5,"number","Layer Opacity"),Jl.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),Jl.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),Jl.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),Jl.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),Jl.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});const Ql=class _Markers extends Ol{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 Sa.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:Sa.point(this.tooltipOffsetX(),this.tooltipOffsetY())});const l=this.popupText(this.rowToObj(t),this.propValue(r,t,""));l&&i.bindPopup(l,{offset:Sa.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){}};n(Ql,"Markers");let th=Ql;th.prototype._class+=" map_Markers",th.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),th.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),th.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),th.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),th.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),th.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),th.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),th.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),th.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),th.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");const eh=class _Icons extends th{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns().indexOf(this.iconUrlColumn());super.layerUpdate(t,t=>({icon:new Sa.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}))}};n(eh,"Icons");let ih=eh;ih.prototype._class+=" map_Icons",ih.prototype.publish("iconUrl","","string","Icon URL",null),ih.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),ih.prototype.publish("iconWidth",32,"number","Icon width"),ih.prototype.publish("iconHeight",32,"number","Icon height"),ih.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),ih.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");const oh=class _ClusterIcons extends ih{constructor(){super(!0)}};n(oh,"ClusterIcons");let nh=oh;function sh(t){return[t[1],t[0]]}nh.prototype._class+=" map_ClusterIcons",n(sh,"lngLat2LatLng");const rh=/* @__PURE__ */n((t,e)=>(e[0]<-90?t[0]++:e[0]>90&&t[1]++,t),"calcSpread"),ah=/* @__PURE__ */n(t=>t>90?t-360:t,"shiftLeft"),lh=/* @__PURE__ */n(t=>t<-90?t+360:t,"shiftRight"),hh=/* @__PURE__ */n(t=>{const e=t?ah:lh;return t=>[e(t[0]),t[1]]},"shiftPoint"),uh=class _Polygons extends Tl{_palette;fixDateLine(t){const[e,i]=t.reduce(rh,[0,0]);return e&&i?t.map(hh(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(),[]),e=this.cellFunc(this.weightColumn(),0),i=this.data(),o=M(i,e);this.clear(),i.forEach(i=>{this.add(new Sa.Polygon(this.fixDateLine(t(i)).map(sh),{color:this._palette(o[1],o[0],o[1]),fillColor:this._palette(e(i),o[0],o[1]),fillOpacity:this.opacity(),weight:1,origRow:i}).on("click",t=>this.clickHandler(t,i)))})}layerUpdate(t){super.layerUpdate(t),this.updateHexagons()}zoomEnd(t){super.zoomEnd(t)}moveEnd(t){super.moveEnd(t),this.updateHexagons()}clickHandler(t,e){}};n(uh,"Polygons");let ch=uh;ch.prototype._class+=" map_Polygons",ch.prototype._palette=p.rainbow("default"),ch.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ch.prototype._palette.switch(),{tags:["Basic","Shared"]}),ch.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ch.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),ch.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),ch.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});const ph=2048/Math.PI,dh=class _Path extends Dl{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=Bs("Mercator").scale(ph).translate([o.x,o.y]),s=dn().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){}};n(dh,"Path");let _h=dh;_h.prototype._class+=" map_Path",_h.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),_h.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),_h.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),_h.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});const fh=class _Lines extends _h{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}};n(fh,"Lines");let mh=fh;mh.prototype._class+=" map_Lines",mh.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),mh.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});const gh=class _Pins extends th{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:Ya({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}))}};n(gh,"Pins");let yh=gh;yh.prototype._class+=" map_Pins",yh.prototype.publish("faChar","fa-circle","string","Default font awesome character"),yh.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),yh.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),yh.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),yh.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),yh.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});const vh=class _ClusterPins extends yh{constructor(){super(!0)}};n(vh,"ClusterPins");let Lh=vh;Lh.prototype._class+=" map_ClusterPins";const wh={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"]},bh={};function xh(t){return bh[t]||(bh[t]={topology:void 0,nameIdx:{},codeIdx:{}}),bh[t]}n(xh,"cachedRegion");const Mh=class _Region extends Ul{constructor(){super()}fetchTopo(t){return xh(t).topology?Promise.resolve(xh(t).topology):new Promise((e,i)=>{hr(`${ir()}/${t}.json`,function(i){xh(t).topology=i,e(i)})})}fetchTopoIdx(t){for(const e in xh(t).nameIdx)return Promise.resolve(xh(t).nameIdx);return new Promise((e,i)=>{hr(`${ir()}/${t}_idx.json`,function(i){const{nameIdx:o,codeIdx:n}=xh(t);wh[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=xh(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=Ys(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=xh(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}`)}};n(Mh,"Region");let Ch=Mh;Ch.prototype._class+=" map_Region",Ch.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 Ph=class _Text extends th{constructor(t=!1){super(t)}layerUpdate(t){const e=this.columns(),i=e.indexOf(this.textColumn()),o=e.indexOf(this.textColorColumn()),n=e.indexOf(this.strokeColorColumn()),s=e.indexOf(this.fillColorColumn());super.layerUpdate(t,t=>{let e=this.propValue(i,t,this.text());const r=this.textSize(e,this.fontFamily(),this.fontSize());return this.textFormat_exists()&&(e=C(this.textFormat())(e)),{icon:Ya({iconShape:"rectangle",iconAnchor:[r.width/2+this.textOffsetX(),r.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 ">${e}</span>`,textColor:this.propValue(o,t,this.textColor()),borderColor:this.propValue(n,t,this.strokeColor()),backgroundColor:this.propValue(s,t,this.fillColor()),props:{owner:this,row:t}}),draggable:!1}})}};n(Ph,"Text");let kh=Ph;kh.prototype._class+=" map_Text",kh.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),kh.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),kh.prototype.publish("text","","string","Default text"),kh.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),kh.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),kh.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),kh.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),kh.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),kh.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),kh.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});const Eh=class _US extends Ul{constructor(){super()}getBounds(){const t=super.getBounds();return new Sa.LatLngBounds([t.getNorth(),t.getWest()],[17.755278,-64.565])}};n(Eh,"US");let Th=Eh,Sh=null;const Oh={},zh=class _USCounties extends Th{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Sh&&t(Sh),hr(`${ir()}/us-counties.json`,function(e){Sh=e,t(Sh)})}).then(t=>{this._features=Ys(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,Oh[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${Oh[e]}</b>: ${o}`)}};n(zh,"USCounties");let Dh=zh;Dh.prototype._class+=" map_USCounties";let Ih=null;const Ah={},Bh=class _USStates extends Th{init(){return this._initPromise||(this._initPromise=new Promise((t,e)=>{Ih&&t(Ih),hr(`${ir()}/us-states.json`,function(e){Ih=e,t(Ih)})}).then(t=>{this._features=Ys(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,Ah[i]=o}})),this._initPromise}tooltipHandler(t,e){const i=this._dataMap[e],o=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),`<b>${Ah[e]}</b>: ${o}`)}};n(Bh,"USStates");let Rh=Bh;Rh.prototype._class+=" map_USStates";const Zh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Circles:Al,ClusterCircles:Nl,ClusterIcons:nh,ClusterLayer:Ol,ClusterPins:Lh,Countries:ql,D3Circles:Rl,D3SurfaceLayer:Dl,DrawLayer:Kl,FeatureLayer:Tl,HeatLayer:Jl,Icons:ih,Leaflet:kl,Lines:mh,Markers:th,Path:_h,Pins:yh,Polygons:ch,Region:Ch,Text:kh,TileLayer:cl,USCounties:Dh,USStates:Rh,World:Ul},Symbol.toStringTag,{value:"Module"}));export{R as BUILD_VERSION,Us as CanvasPinLayer,ht as CanvasPins,nr as Choropleth,mr as ChoroplethContinents,wr as ChoroplethCounties,_r as ChoroplethCountries,Pr as ChoroplethStates,Er as ChoroplethStatesHeat,qr as GMap,Qr as GMapCounties,ea as GMapGraph,oa as GMapHeat,Xr as GMapLayered,ra as GMapPin,ha as GMapPinLine,Sr as GeoHash,ca as Graph,da as Graticule,fa as Heat,ma as IChoropleth,Gs as Layer,Ns as Layered,Zh as Leaflet,aa as Lines,xa as OpenStreet,A as PKG_NAME,B as PKG_VERSION,na as Pins,Pa as TopoJSONChoropleth,Nr as google,As as projections,Gr as requireGoogleMap,Hr as requireGoogleMapTimeout,Bs as resolve,ir as topoJsonFolder,Is as types};
2
2
  //# sourceMappingURL=index.js.map
3
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)}}();