@hpcc-js/map 2.63.0 → 2.68.0
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.es6.js +2698 -2676
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +2698 -2676
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +11 -10
- package/src/Choropleth.ts +1 -1
- package/src/ChoroplethCounties.ts +1 -1
- package/src/ChoroplethCountries.ts +1 -1
- package/src/ChoroplethStates.ts +1 -1
- package/src/TopoJSONChoropleth.ts +2 -2
- package/src/__package__.ts +2 -2
- package/src/leaflet/Countries.ts +1 -1
- package/src/leaflet/Region.ts +1 -1
- package/src/leaflet/TopoJSON.ts +1 -1
- package/src/leaflet/USCounties.ts +1 -1
- package/src/leaflet/USStates.ts +1 -1
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t=t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,function(t,e,i,n,o,r,a){"use strict";var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(){return(h=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function u(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||e)}function c(t,e,i,n){if(isNaN(e)||isNaN(i))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:n},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&i===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function p(t,e,i,n,o){this.node=t,this.x0=e,this.y0=i,this.x1=n,this.y1=o}function d(t){return t[0]}function f(t){return t[1]}function _(t,e,i){var n=new m(null==e?d:e,null==i?f:i,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function m(t,e,i,n,o,r){this._x=t,this._y=e,this._x0=i,this._y0=n,this._x1=o,this._y1=r,this._root=void 0}function g(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}var y=_.prototype=m.prototype;y.copy=function(){var t,e,i=new m(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return i;if(!n.length)return i._root=g(n),i;for(t=[{source:n,target:i._root=new Array(4)}];n=t.pop();)for(var o=0;o<4;++o)(e=n.source[o])&&(e.length?t.push({source:e,target:n.target[o]=new Array(4)}):n.target[o]=g(e));return i},y.add=function(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return c(this.cover(e,i),e,i,t)},y.addAll=function(t){var e,i,n,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,p=-1/0;for(i=0;i<r;++i)isNaN(n=+this._x.call(null,e=t[i]))||isNaN(o=+this._y.call(null,e))||(a[i]=n,s[i]=o,n<l&&(l=n),n>u&&(u=n),o<h&&(h=o),o>p&&(p=o));if(l>u||h>p)return this;for(this.cover(l,h).cover(u,p),i=0;i<r;++i)c(this,a[i],s[i],t[i]);return this},y.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,o=this._x1,r=this._y1;if(isNaN(i))o=(i=Math.floor(t))+1,r=(n=Math.floor(e))+1;else{for(var a,s,l=o-i,h=this._root;i>t||t>=o||n>e||e>=r;)switch(s=(e<n)<<1|t<i,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=i+l,r=n+l;break;case 1:i=o-l,r=n+l;break;case 2:o=i+l,n=r-l;break;case 3:i=o-l,n=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=o,this._y1=r,this},y.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},y.extent=function(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]]},y.find=function(t,e,i){var n,o,r,a,s,l,h,u=this._x0,c=this._y0,d=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new p(m,u,c,d,f)),null==i?i=1/0:(u=t-i,c=e-i,d=t+i,f=e+i,i*=i);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>d||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new p(m[3],g,y,a,s),new p(m[2],o,y,g,s),new p(m[1],g,r,a,y),new p(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<i){var w=Math.sqrt(i=L);u=t-w,c=e-w,d=t+w,f=e+w,n=m.data}}return n},y.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,i,n,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=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(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):e?(o?e[c]=o: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=o,this)},y.removeAll=function(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this},y.root=function(){return this._root},y.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y.visit=function(t){var e,i,n,o,r,a,s=[],l=this._root;for(l&&s.push(new p(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(n+r)/2,u=(o+a)/2;(i=l[3])&&s.push(new p(i,h,u,r,a)),(i=l[2])&&s.push(new p(i,n,u,h,a)),(i=l[1])&&s.push(new p(i,h,o,r,u)),(i=l[0])&&s.push(new p(i,n,o,h,u))}return this},y.visitAfter=function(t){var e,i=[],n=[];for(this._root&&i.push(new p(this._root,this._x0,this._y0,this._x1,this._y1));e=i.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&i.push(new p(r,a,s,u,c)),(r=o[1])&&i.push(new p(r,u,s,l,c)),(r=o[2])&&i.push(new p(r,a,c,u,h)),(r=o[3])&&i.push(new p(r,u,c,l,h))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},y.x=function(t){return arguments.length?(this._x=t,this):this._x},y.y=function(t){return arguments.length?(this._y=t,this):this._y};var v=function(){function t(t,e,i,n){this._pin_h=0,this._pin_w=0,this._pin_h=i,this._pin_w=n,this._tree=_().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,i,n){var o=[];return this._tree.visit(function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:i,top:e,bottom:n},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=i||s>=n||l<t||h<e}),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit(function(e,i,n,o,r){t.push([i,n,o-i,r-n])}),t},t}(),b=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,i){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var n=(this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this.skewedData():this.data()).map(function(t){return u([],t)}).map(function(t){return 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(n):n,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,i=this;this._overlap_count=0;var n=this.pinHeight(),o=this.pinWidth(),r=o/2,a=n/2,s=new v([[0,0],[this.size().width,this.size().height]],t,n,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map(function(t){if(!t.already_flagged){var i=e.searchRectMult(),n=t[0]-r*i,o=t[1]-a*i-8,l=t[0]+r*i,h=t[1]+a*i-8;t.overlap_arr=s.searchRect(n,o,l,h).filter(function(e){return e!==t}),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t});return l.forEach(function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(u([t],t.overlap_arr)))}),l;case"grid":for(var h=u([],t),c=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/c),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=c*m,y=p*_,b=c*(m+1),L=p*(_+1),w=s.searchRect(g,y,b,L);if(w.length>1){var x=g+c/2,C=y+p/2;h.push(M(w,x,C))}}return h}return t;function M(t,e,n){var o=t.reduce(function(t,e){return e.already_flagged=!0,t+e[2]},0);return{0:void 0!==e?e:i.useAveragePos()?t.reduce(function(t,e){return t+e[0]*e[2]},0)/o:t[0][0],1:void 0!==n?n:i.useAveragePos()?t.reduce(function(t,e){return t+e[1]*e[2]},0)/o:t[0][1],weight:t.reduce(function(t,e){return t+e[2]},0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach(function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])}))},e.prototype.draw=function(t){var e=this,i=this,n=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t){n.font=i.pinFontSize()+"px '"+i.pinFontFamily()+"'";var e=t.left+t.width/2,o=t.top+t.height/2;n.textAlign="center",n.textBaseline="middle",n.fillStyle="#000000";for(var r=0,a=n.measureText(t.icon).width;a>t.width||!i.shrinkFontToPin();)r++,n.font=i.pinFontSize()-r+"px '"+i.pinFontFamily()+"'",a=n.measureText(t.icon).width;n.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter(function(t){return t.is_cluster}).forEach(function(t){h<t.weight&&(h=t.weight)}),t.filter(function(t){return!t.already_flagged}).sort(function(t,e){return t[1]>e[1]?1:-1}).forEach(function(t){if(t.is_cluster||e.allCircles()){var i=s/2;e.useWeightedRadius()&&(i+=s*(l*t.weight/h)),(c={icon:t.weight,left:Math.floor(t[0]-i)+.5,top:Math.floor(t[1]-i-o)+.5,radius:i,arrow_height:o,arrow_width:r}).width=2*c.radius,c.height=c.width,n.fillStyle="#FFFFFF",n.strokeStyle="#000000",n.beginPath(),n.arc(c.left+c.width/2,c.top+c.height/2,c.radius,0,2*Math.PI),n.closePath(),n.fill(),n.stroke(),u(c)}else!function(t){n.fillStyle=t.fillStyle,n.strokeStyle="#000000",n.fillRect(t.left,t.top,t.width,t.height),n.strokeRect(t.left,t.top,t.width,t.height),function t(e,i){var o=e.left+e.width/2-e.arrow_width/2;var r=e.left+e.width/2;var a=e.left+e.width/2+e.arrow_width/2;var s=e.top+e.height;var l=s+e.arrow_height;var h=s;i?(n.fillStyle="#FFFFFF",n.strokeStyle="#FFFFFF",s-=2,l-=2,h-=2):(n.fillStyle="#FFFFFF",n.strokeStyle="#000000");n.beginPath();n.moveTo(o,s);n.lineTo(r,l);n.lineTo(a,h);n.lineTo(o,s);n.closePath();n.stroke();n.fill();i||t(e,!0)}(t),u(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var c})},e.prototype.skewedData=function(){var t=this,e=[],i=this.data(),n=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/n.width,s=r/n.height;return i.forEach(function(i){var n=Math.abs(i[0]-t.topLeftX()),o=Math.abs(i[1]-t.topLeftY()),r=n/a,l=o/s;e.push([r,l,i[2]])}),e},e}(e.CanvasWidget);function w(){return new x}function x(){this.reset()}b.prototype._class+=" map_CanvasPins",b.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),b.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),b.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),b.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),b.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),b.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),x.prototype={constructor:x,reset:function(){this.s=this.t=0},add:function(t){M(C,t,this.t),M(this,C.s,this.s),this.s?this.t+=C.t:this.s=C.t},valueOf:function(){return this.s}};var C=new x;function M(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var k=1e-6,P=1e-12,I=Math.PI,E=I/2,A=I/4,T=2*I,S=180/I,z=I/180,D=Math.abs,O=Math.atan,N=Math.atan2,B=Math.cos,Z=Math.ceil,j=Math.exp,R=Math.log,G=Math.pow,H=Math.sin,U=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,F=Math.tan;function V(t){return t>1?0:t<-1?I:Math.acos(t)}function Y(t){return t>1?E:t<-1?-E:Math.asin(t)}function q(t){return(t=H(t/2))*t}function X(){}function K(t,e){t&&Q.hasOwnProperty(t.type)&&Q[t.type](t,e)}var J={Feature:function(t,e){K(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)K(i[n].geometry,e)}},Q={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){$(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)$(i[n],e,0)},Polygon:function(t,e){tt(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)tt(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)K(i[n],e)}};function $(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function tt(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)$(t[i],e,1);e.polygonEnd()}function et(t,e){t&&J.hasOwnProperty(t.type)?J[t.type](t,e):K(t,e)}var it,nt,ot,rt,at,st=w(),lt=w(),ht={point:X,lineStart:X,lineEnd:X,polygonStart:function(){st.reset(),ht.lineStart=ut,ht.lineEnd=ct},polygonEnd:function(){var t=+st;lt.add(t<0?T+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){lt.add(T)}};function ut(){ht.point=pt}function ct(){dt(it,nt)}function pt(t,e){ht.point=dt,it=t,nt=e,ot=t*=z,rt=B(e=(e*=z)/2+A),at=H(e)}function dt(t,e){var i=(t*=z)-ot,n=i>=0?1:-1,o=n*i,r=B(e=(e*=z)/2+A),a=H(e),s=at*a,l=rt*r+s*B(o),h=s*n*H(o);st.add(N(h,l)),ot=t,rt=r,at=a}function ft(t){return[N(t[1],t[0]),Y(t[2])]}function _t(t){var e=t[0],i=t[1],n=B(i);return[n*B(e),n*H(e),H(i)]}function mt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function gt(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 yt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function bt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Lt,wt,xt,Ct,Mt,kt,Pt,It,Et,At,Tt,St,zt,Dt,Ot,Nt,Bt,Zt,jt,Rt,Gt,Ht,Ut,Wt,Ft,Vt,Yt=w(),qt={point:Xt,lineStart:Jt,lineEnd:Qt,polygonStart:function(){qt.point=$t,qt.lineStart=te,qt.lineEnd=ee,Yt.reset(),ht.polygonStart()},polygonEnd:function(){ht.polygonEnd(),qt.point=Xt,qt.lineStart=Jt,qt.lineEnd=Qt,st<0?(Lt=-(xt=180),wt=-(Ct=90)):Yt>k?Ct=90:Yt<-k&&(wt=-90),At[0]=Lt,At[1]=xt},sphere:function(){Lt=-(xt=180),wt=-(Ct=90)}};function Xt(t,e){Et.push(At=[Lt=t,xt=t]),e<wt&&(wt=e),e>Ct&&(Ct=e)}function Kt(t,e){var i=_t([t*z,e*z]);if(It){var n=gt(It,i),o=gt([n[1],-n[0],0],n);bt(o),o=ft(o);var r,a=t-Mt,s=a>0?1:-1,l=o[0]*S*s,h=D(a)>180;h^(s*Mt<l&&l<s*t)?(r=o[1]*S)>Ct&&(Ct=r):h^(s*Mt<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*S)<wt&&(wt=r):(e<wt&&(wt=e),e>Ct&&(Ct=e)),h?t<Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t):xt>=Lt?(t<Lt&&(Lt=t),t>xt&&(xt=t)):t>Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t)}else Et.push(At=[Lt=t,xt=t]);e<wt&&(wt=e),e>Ct&&(Ct=e),It=i,Mt=t}function Jt(){qt.point=Kt}function Qt(){At[0]=Lt,At[1]=xt,qt.point=Xt,It=null}function $t(t,e){if(It){var i=t-Mt;Yt.add(D(i)>180?i+(i>0?360:-360):i)}else kt=t,Pt=e;ht.point(t,e),Kt(t,e)}function te(){ht.lineStart()}function ee(){$t(kt,Pt),ht.lineEnd(),D(Yt)>k&&(Lt=-(xt=180)),At[0]=Lt,At[1]=xt,It=null}function ie(t,e){return(e-=t)<0?e+360:e}function ne(t,e){return t[0]-e[0]}function oe(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var re={sphere:X,point:ae,lineStart:le,lineEnd:ce,polygonStart:function(){re.lineStart=pe,re.lineEnd=de},polygonEnd:function(){re.lineStart=le,re.lineEnd=ce}};function ae(t,e){t*=z;var i=B(e*=z);se(i*B(t),i*H(t),H(e))}function se(t,e,i){zt+=(t-zt)/++Tt,Dt+=(e-Dt)/Tt,Ot+=(i-Ot)/Tt}function le(){re.point=he}function he(t,e){t*=z;var i=B(e*=z);Wt=i*B(t),Ft=i*H(t),Vt=H(e),re.point=ue,se(Wt,Ft,Vt)}function ue(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=N(W((a=Ft*r-Vt*o)*a+(a=Vt*n-Wt*r)*a+(a=Wt*o-Ft*n)*a),Wt*n+Ft*o+Vt*r);St+=a,Nt+=a*(Wt+(Wt=n)),Bt+=a*(Ft+(Ft=o)),Zt+=a*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function ce(){re.point=ae}function pe(){re.point=fe}function de(){_e(Ht,Ut),re.point=ae}function fe(t,e){Ht=t,Ut=e,t*=z,e*=z,re.point=_e;var i=B(e);Wt=i*B(t),Ft=i*H(t),Vt=H(e),se(Wt,Ft,Vt)}function _e(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=Ft*r-Vt*o,s=Vt*n-Wt*r,l=Wt*o-Ft*n,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Rt+=c*s,Gt+=c*l,St+=u,Nt+=u*(Wt+(Wt=n)),Bt+=u*(Ft+(Ft=o)),Zt+=u*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function me(t){return function(){return t}}function ge(t,e){function i(i,n){return i=t(i,n),e(i[0],i[1])}return t.invert&&e.invert&&(i.invert=function(i,n){return(i=e.invert(i,n))&&t.invert(i[0],i[1])}),i}function ye(t,e){return[D(t)>I?t+Math.round(-t/T)*T:t,e]}function ve(t,e,i){return(t%=T)?e||i?ge(Le(t),we(e,i)):Le(t):e||i?we(e,i):ye}function be(t){return function(e,i){return[(e+=t)>I?e-T:e<-I?e+T:e,i]}}function Le(t){var e=be(t);return e.invert=be(-t),e}function we(t,e){var i=B(t),n=H(t),o=B(e),r=H(e);function a(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*i+s*n;return[N(l*o-u*r,s*i-h*n),Y(u*o+l*r)]}return a.invert=function(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*i+u*n),Y(u*i-s*n)]},a}function xe(t){function e(e){return(e=t(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e}return t=ve(t[0]*z,t[1]*z,t.length>2?t[2]*z:0),e.invert=function(e){return(e=t.invert(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e},e}function Ce(t,e,i,n,o,r){if(i){var a=B(e),s=H(e),l=n*i;null==o?(o=e+n*T,r=e-l/2):(o=Me(a,o),r=Me(a,r),(n>0?o<r:o>r)&&(o+=n*T));for(var h,u=o;n>0?u>r:u<r;u-=l)h=ft([a,-s*B(u),-s*H(u)]),t.point(h[0],h[1])}}function Me(t,e){(e=_t(e))[0]-=t,bt(e);var i=V(-e[1]);return((-e[2]<0?-i:i)+T-k)%T}function ke(){var t,e=[];return{point:function(e,i,n){t.push([e,i,n])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var i=e;return e=[],t=null,i}}}function Pe(t,e){return D(t[0]-e[0])<k&&D(t[1]-e[1])<k}function Ie(t,e,i,n){this.x=t,this.z=e,this.o=i,this.e=n,this.v=!1,this.n=this.p=null}function Ee(t,e,i,n,o){var r,a,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,i,n=t[0],a=t[e];if(Pe(n,a)){if(!n[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((n=t[r])[0],n[1]);return void o.lineEnd()}a[0]+=2*k}s.push(i=new Ie(n,t,null,!0)),l.push(i.o=new Ie(n,null,i,!1)),s.push(i=new Ie(a,t,null,!1)),l.push(i.o=new Ie(a,null,i,!0))}}),s.length){for(l.sort(e),Ae(s),Ae(l),r=0,a=l.length;r<a;++r)l[r].e=i=!i;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else n(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else n(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Ae(t){if(e=t.length){for(var e,i,n=0,o=t[0];++n<e;)o.n=i=t[n],i.p=o,o=i;o.n=i=t[0],i.p=o}}ye.invert=ye;var Te=w();function Se(t){return D(t[0])<=I?t[0]:U(t[0])*((D(t[0])+I)%T-I)}function ze(t,e){var i=Se(e),n=e[1],o=H(n),r=[H(i),-B(i),0],a=0,s=0;Te.reset(),1===o?n=E+k:-1===o&&(n=-E-k);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=Se(p),f=p[1]/2+A,_=H(f),m=B(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=Se(y),b=y[1]/2+A,L=H(b),w=B(b),x=v-d,C=x>=0?1:-1,M=C*x,P=M>I,S=_*L;if(Te.add(N(S*C*H(M),m*w+S*B(M))),a+=P?x+C*T:x,P^d>=i^v>=i){var z=gt(_t(p),_t(y));bt(z);var D=gt(r,z);bt(D);var O=(P^x>=0?-1:1)*Y(D[2]);(n>O||n===O&&(z[0]||z[1]))&&(s+=P^x>=0?1:-1)}}return(a<-k||a<k&&Te<-k)^1&s}function De(t,i,n,o){return function(r){var a,s,l,h=i(r),u=ke(),c=i(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=ze(a,o);s.length?(p||(r.polygonStart(),p=!0),Ee(s,Ne,t,n,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,i){t(e,i)&&r.point(e,i)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,i,n,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(i=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((n=i[t])[0],n[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Oe))}return d}}function Oe(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-E-k:E-t[1])-((e=e.x)[0]<0?e[1]-E-k:E-e[1])}var Be=De(function(){return!0},function(t){var e,i=NaN,n=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?I:-I,l=D(r-i);D(l-I)<k?(t.point(i,n=(n+a)/2>0?E:-E),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(r,n),e=0):o!==s&&l>=I&&(D(i-o)<k&&(i-=o*k),D(r-s)<k&&(r-=s*k),n=function(t,e,i,n){var o,r,a=H(t-i);return D(a)>k?O((H(e)*(r=B(n))*H(i)-H(n)*(o=B(e))*H(t))/(o*r*a)):(e+n)/2}(i,n,r,a),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(i=r,n=a),o=s},lineEnd:function(){t.lineEnd(),i=n=NaN},clean:function(){return 2-e}}},function(t,e,i,n){var o;if(null==t)o=i*E,n.point(-I,o),n.point(0,o),n.point(I,o),n.point(I,0),n.point(I,-o),n.point(0,-o),n.point(-I,-o),n.point(-I,0),n.point(-I,o);else if(D(t[0]-e[0])>k){var r=t[0]<e[0]?I:-I;o=i*r/2,n.point(-r,o),n.point(0,o),n.point(r,o)}else n.point(e[0],e[1])},[-I,-E]);function Ze(t){var e=B(t),i=6*z,n=e>0,o=D(e)>k;function r(t,i){return B(t)*B(i)>e}function a(t,i,n){var o=[1,0,0],r=gt(_t(t),_t(i)),a=mt(r,r),s=r[0],l=a-s*s;if(!l)return!n&&t;var h=e*a/l,u=-e*s/l,c=gt(o,r),p=vt(o,h);yt(p,vt(r,u));var d=c,f=mt(p,d),_=mt(d,d),m=f*f-_*(mt(p,p)-1);if(!(m<0)){var g=W(m),y=vt(d,(-f-g)/_);if(yt(y,p),y=ft(y),!n)return y;var v,b=t[0],L=i[0],w=t[1],x=i[1];L<b&&(v=b,b=L,L=v);var C=L-b,M=D(C-I)<k;if(!M&&x<w&&(v=w,w=x,x=v),M||C<k?M?w+x>0^y[1]<(D(y[0]-b)<k?w:x):w<=y[1]&&y[1]<=x:C>I^(b<=y[0]&&y[0]<=L)){var P=vt(d,(-f+g)/_);return yt(P,p),[y,ft(P)]}}}function s(e,i){var o=n?t:I-t,r=0;return e<-o?r|=1:e>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return De(r,function(t){var e,i,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=n?_?0:s(c,p):_?s(c+(c<0?I:-I),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Pe(e,d)||Pe(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&n^_){var g;m&i||!(g=a(f,e,!0))||(u=0,n?(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)))}!_||e&&Pe(e,f)||t.point(f[0],f[1]),e=f,l=_,i=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}},function(e,n,o,r){Ce(r,t,i,o,e,n)},n?[0,-t]:[-I,t-I])}var je=1e9,Re=-je;function Ge(t,i,n,o){function r(e,r){return t<=e&&e<=n&&i<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:n,u>1?o:i)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return D(e[0]-t)<k?o>0?0:3:D(e[0]-n)<k?o>0?2:1:D(e[1]-i)<k?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var i=s(t,1),n=s(e,1);return i!==n?i-n:0===i?e[1]-t[1]:1===i?t[0]-e[0]:2===i?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=ke(),w={point:x,lineStart:function(){w.point=C,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(C(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var i=function(){for(var e=0,i=0,n=u.length;i<n;++i)for(var r,a,s=u[i],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,c=s[l],p=c[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),n=v&&i,r=(h=e.merge(h)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Ee(h,l,i,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function C(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Re,Math.min(je,_)),m=Math.max(Re,Math.min(je,m))],h=[e=Math.max(Re,Math.min(je,e)),a=Math.max(Re,Math.min(je,a))];!function(t,e,i,n,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=i-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=n-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,i,n,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Ue,We,Fe=w(),Ve={sphere:X,point:X,lineStart:function(){Ve.point=qe,Ve.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){Ve.point=Ve.lineEnd=X}function qe(t,e){He=t*=z,Ue=H(e*=z),We=B(e),Ve.point=Xe}function Xe(t,e){t*=z;var i=H(e*=z),n=B(e),o=D(t-He),r=B(o),a=n*H(o),s=We*i-Ue*n*r,l=Ue*i+We*n*r;Fe.add(N(W(a*a+s*s),l)),He=t,Ue=i,We=n}function Ke(t){return Fe.reset(),et(t,Ve),+Fe}var Je=[null,null],Qe={type:"LineString",coordinates:Je};function $e(t,e){return Je[0]=t,Je[1]=e,Ke(Qe)}var ti={Feature:function(t,e){return ii(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)if(ii(i[n].geometry,e))return!0;return!1}},ei={Sphere:function(){return!0},Point:function(t,e){return ni(t.coordinates,e)},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ni(i[n],e))return!0;return!1},LineString:function(t,e){return oi(t.coordinates,e)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(oi(i[n],e))return!0;return!1},Polygon:function(t,e){return ri(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ri(i[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)if(ii(i[n],e))return!0;return!1}};function ii(t,e){return!(!t||!ei.hasOwnProperty(t.type))&&ei[t.type](t,e)}function ni(t,e){return 0===$e(t,e)}function oi(t,e){for(var i,n,o,r=0,a=t.length;r<a;r++){if(0===(n=$e(t[r],e)))return!0;if(r>0&&(o=$e(t[r],t[r-1]))>0&&i<=o&&n<=o&&(i+n-o)*(1-Math.pow((i-n)/o,2))<P*o)return!0;i=n}return!1}function ri(t,e){return!!ze(t.map(ai),si(e))}function ai(t){return(t=t.map(si)).pop(),t}function si(t){return[t[0]*z,t[1]*z]}function li(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[t,e]})}}function hi(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[e,t]})}}function ui(){var t,i,n,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(Z(o/_)*_,n,_).map(c).concat(e.range(Z(l/m)*m,s,m).map(p)).concat(e.range(Z(i/d)*d,t,d).filter(function(t){return D(t%_)>k}).map(h)).concat(e.range(Z(a/f)*f,r,f).filter(function(t){return D(t%m)>k}).map(u))}return y.lines=function(){return v().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(n).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],o>n&&(t=o,o=n,n=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[n,s]]},y.extentMinor=function(e){return arguments.length?(i=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],i>t&&(e=i,i=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[i,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=li(a,r,90),u=hi(i,t,g),c=li(l,s,90),p=hi(o,n,g),y):g},y.extentMajor([[-180,-90+k],[180,90-k]]).extentMinor([[-180,-80-k],[180,80+k]])}function ci(t){return t}var pi,di,fi,_i,mi=w(),gi=w(),yi={point:X,lineStart:X,lineEnd:X,polygonStart:function(){yi.lineStart=vi,yi.lineEnd=wi},polygonEnd:function(){yi.lineStart=yi.lineEnd=yi.point=X,mi.add(D(gi)),gi.reset()},result:function(){var t=mi/2;return mi.reset(),t}};function vi(){yi.point=bi}function bi(t,e){yi.point=Li,pi=fi=t,di=_i=e}function Li(t,e){gi.add(_i*t-fi*e),fi=t,_i=e}function wi(){Li(pi,di)}var xi=1/0,Ci=xi,Mi=-xi,ki=Mi,Pi={point:function(t,e){t<xi&&(xi=t);t>Mi&&(Mi=t);e<Ci&&(Ci=e);e>ki&&(ki=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[xi,Ci],[Mi,ki]];return Mi=ki=-(Ci=xi=1/0),t}};var Ii,Ei,Ai,Ti,Si=0,zi=0,Di=0,Oi=0,Ni=0,Bi=0,Zi=0,ji=0,Ri=0,Gi={point:Hi,lineStart:Ui,lineEnd:Vi,polygonStart:function(){Gi.lineStart=Yi,Gi.lineEnd=qi},polygonEnd:function(){Gi.point=Hi,Gi.lineStart=Ui,Gi.lineEnd=Vi},result:function(){var t=Ri?[Zi/Ri,ji/Ri]:Bi?[Oi/Bi,Ni/Bi]:Di?[Si/Di,zi/Di]:[NaN,NaN];return Si=zi=Di=Oi=Ni=Bi=Zi=ji=Ri=0,t}};function Hi(t,e){Si+=t,zi+=e,++Di}function Ui(){Gi.point=Wi}function Wi(t,e){Gi.point=Fi,Hi(Ai=t,Ti=e)}function Fi(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Hi(Ai=t,Ti=e)}function Vi(){Gi.point=Hi}function Yi(){Gi.point=Xi}function qi(){Ki(Ii,Ei)}function Xi(t,e){Gi.point=Ki,Hi(Ii=Ai=t,Ei=Ti=e)}function Ki(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Zi+=(o=Ti*t-Ai*e)*(Ai+t),ji+=o*(Ti+e),Ri+=3*o,Hi(Ai=t,Ti=e)}function Ji(t){this._context=t}Ji.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point: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,T)}},result:X};var Qi,$i,tn,en,nn,on=w(),rn={point:X,lineStart:function(){rn.point=an},lineEnd:function(){Qi&&sn($i,tn),rn.point=X},polygonStart:function(){Qi=!0},polygonEnd:function(){Qi=null},result:function(){var t=+on;return on.reset(),t}};function an(t,e){rn.point=sn,$i=en=t,tn=nn=e}function sn(t,e){en-=t,nn-=e,on.add(W(en*en+nn*nn)),en=t,nn=e}function ln(){this._string=[]}function hn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function un(t,e){var i,n,o=4.5;function r(t){return t&&("function"==typeof o&&n.pointRadius(+o.apply(this,arguments)),et(t,i(n))),n.result()}return r.area=function(t){return et(t,i(yi)),yi.result()},r.measure=function(t){return et(t,i(rn)),rn.result()},r.bounds=function(t){return et(t,i(Pi)),Pi.result()},r.centroid=function(t){return et(t,i(Gi)),Gi.result()},r.projection=function(e){return arguments.length?(i=null==e?(t=null,ci):(t=e).stream,r):t},r.context=function(t){return arguments.length?(n=null==t?(e=null,new ln):new Ji(e=t),"function"!=typeof o&&n.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(n.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function cn(t){return function(e){var i=new pn;for(var n in t)i[n]=t[n];return i.stream=e,i}}function pn(){}function dn(t,e,i){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),et(i,t.stream(Pi)),e(Pi.result()),null!=n&&t.clipExtent(n),t}function fn(t,e,i){return dn(t,function(i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+e[0][0]+(n-r*(i[1][0]+i[0][0]))/2,s=+e[0][1]+(o-r*(i[1][1]+i[0][1]))/2;t.scale(150*r).translate([a,s])},i)}function _n(t,e,i){return fn(t,[[0,0],e],i)}function mn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][0]-i[0][0]),r=(n-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];t.scale(150*o).translate([r,a])},i)}function gn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][1]-i[0][1]),r=-o*i[0][0],a=(n-o*(i[1][1]+i[0][1]))/2;t.scale(150*o).translate([r,a])},i)}ln.prototype={_radius:4.5,_circle:hn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point: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=hn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},pn.prototype={constructor:pn,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var yn=16,vn=B(30*z);function bn(t,e){return+e?function(t,e){function i(n,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-n,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),C=Y(w/=x),M=D(D(w)-1)<k||D(r-c)<k?(r+c)/2:N(L,b),P=t(M,C),I=P[0],E=P[1],A=I-n,T=E-o,S=y*A-g*T;(S*S/v>e||D((g*A+y*T)/v-.5)>.3||a*p+s*d+l*f<vn)&&(i(n,o,r,a,s,l,I,E,M,b/=x,L/=x,w,_,m),m.point(I,E),i(I,E,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var n,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(i,n){i=t(i,n),e.point(i[0],i[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(n,o){var r=_t([n,o]),a=t(n,o);i(u,c,h,p,d,f,u=a[0],c=a[1],h=n,p=r[0],d=r[1],f=r[2],yn,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(n=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){i(u,c,h,p,d,f,o,r,n,a,s,l,yn,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return cn({point:function(e,i){e=t(e,i),this.stream.point(e[0],e[1])}})}(t)}var Ln=cn({point:function(t,e){this.stream.point(t*z,e*z)}});function wn(t,e,i,n,o,r){var a=B(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*i-a*e)/t,d=(s*e+a*i)/t;function f(t,r){return[l*(t*=n)-h*(r*=o)+e,i-h*t-l*r]}return f.invert=function(t,e){return[n*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function xn(t){return Cn(function(){return t})()}function Cn(t){var e,i,n,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Be,C=null,M=ci,k=.5;function P(t){return l(t[0]*z,t[1]*z)}function I(t){return(t=l.invert(t[0],t[1]))&&[t[0]*S,t[1]*S]}function E(){var t=wn(c,0,0,b,L,v).apply(null,e(f,_)),n=(v?wn:function(t,e,i,n,o){function r(r,a){return[e+t*(r*=n),i-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*n,(i-a)/t*o]},r})(c,p-t[0],d-t[1],b,L,v);return i=ve(m,g,y),s=ge(e,n),l=ge(i,s),a=bn(s,k),A()}function A(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Ln(function(t){return cn({point:function(e,i){var n=t(e,i);return this.stream.point(n[0],n[1])}})}(i)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,A()):x},P.postclip=function(t){return arguments.length?(M=t,C=n=o=r=null,A()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Ze(w=t*z):(w=null,Be),A()):w*S},P.clipExtent=function(t){return arguments.length?(M=null==t?(C=n=o=r=null,ci):Ge(C=+t[0][0],n=+t[0][1],o=+t[1][0],r=+t[1][1]),A()):null==C?null:[[C,n],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,E()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],E()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*z,_=t[1]%360*z,E()):[f*S,_*S]},P.rotate=function(t){return arguments.length?(m=t[0]%360*z,g=t[1]%360*z,y=t.length>2?t[2]%360*z:0,E()):[m*S,g*S,y*S]},P.angle=function(t){return arguments.length?(v=t%360*z,E()):v*S},P.reflectX=function(t){return arguments.length?(b=t?-1:1,E()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,E()):L<0},P.precision=function(t){return arguments.length?(a=bn(s,k=t*t),A()):W(k)},P.fitExtent=function(t,e){return fn(P,t,e)},P.fitSize=function(t,e){return _n(P,t,e)},P.fitWidth=function(t,e){return mn(P,t,e)},P.fitHeight=function(t,e){return gn(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&I,E()}}function Mn(t){var e=0,i=I/3,n=Cn(t),o=n(e,i);return o.parallels=function(t){return arguments.length?n(e=t[0]*z,i=t[1]*z):[e*S,i*S]},o}function kn(t,e){var i=H(t),n=(i+H(e))/2;if(D(n)<k)return function(t){var e=B(t);function i(t,i){return[t*e,H(i)/e]}return i.invert=function(t,i){return[t/e,Y(i*e)]},i}(t);var o=1+i*(2*n-i),r=W(o)/n;function a(t,e){var i=W(o-2*n*H(e))/n;return[i*H(t*=n),r-i*B(t)]}return a.invert=function(t,e){var i=r-e,a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,Y((o-(t*t+i*i)*n*n)/(2*n))]},a}function Pn(){return Mn(kn).scale(155.424).center([0,33.6442])}function In(){return Pn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function En(t){return function(e,i){var n=B(e),o=B(i),r=t(n*o);return[r*o*H(e),r*H(i)]}}function An(t){return function(e,i){var n=W(e*e+i*i),o=t(n),r=H(o),a=B(o);return[N(e*r,n*a),Y(n&&i*r/n)]}}var Tn=En(function(t){return W(2/(1+t))});Tn.invert=An(function(t){return 2*Y(t/2)});var Sn=En(function(t){return(t=V(t))&&t/H(t)});function zn(t,e){return[t,R(F((E+e)/2))]}function Dn(){return On(zn).scale(961/T)}function On(t){var e,i,n,o=xn(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=I*a(),s=o(xe(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===zn?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,i),n]]:[[h,Math.max(s[1]-r,e)],[i,Math.min(s[1]+r,n)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=i=n=null:(h=+t[0][0],e=+t[0][1],i=+t[1][0],n=+t[1][1]),u()):null==h?null:[[h,e],[i,n]]},u()}function Nn(t){return F((E+t)/2)}function Bn(t,e){var i=B(t),n=t===e?H(t):R(i/B(e))/R(Nn(e)/Nn(t)),o=i*G(Nn(t),n)/n;if(!n)return zn;function r(t,e){o>0?e<-E+k&&(e=-E+k):e>E-k&&(e=E-k);var i=o/G(Nn(e),n);return[i*H(n*t),o-i*B(n*t)]}return r.invert=function(t,e){var i=o-e,r=U(n)*W(t*t+i*i),a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,2*O(G(o/r,1/n))-E]},r}function Zn(t,e){return[t,e]}function jn(t,e){var i=B(t),n=t===e?H(t):(i-B(e))/(e-t),o=i/n+t;if(D(n)<k)return Zn;function r(t,e){var i=o-e,r=n*t;return[i*H(r),o-i*B(r)]}return r.invert=function(t,e){var i=o-e,r=N(t,D(i))*U(i);return i*n<0&&(r-=I*U(t)*U(i)),[r/n,o-U(n)*W(t*t+i*i)]},r}Sn.invert=An(function(t){return t}),zn.invert=function(t,e){return[t,2*O(j(e))-E]},Zn.invert=Zn;var Rn=1.340264,Gn=-.081106,Hn=893e-6,Un=.003796,Wn=W(3)/2;function Fn(t,e){var i=Y(Wn*H(e)),n=i*i,o=n*n*n;return[t*B(i)/(Wn*(Rn+3*Gn*n+o*(7*Hn+9*Un*n))),i*(Rn+Gn*n+o*(Hn+Un*n))]}function Vn(t,e){var i=B(e),n=B(t)*i;return[i*H(t)/n,H(e)/n]}function Yn(t,e){var i=e*e,n=i*i;return[t*(.8707-.131979*i+n*(n*(.003971*i-.001529*n)-.013791)),e*(1.007226+i*(.015085+n*(.028874*i-.044475-.005916*n)))]}function qn(t,e){return[B(e)*H(t),H(e)]}function Xn(t,e){var i=B(e),n=1+B(t)*i;return[i*H(t)/n,H(e)/n]}function Kn(t,e){return[R(F((E+e)/2)),-t]}Fn.invert=function(t,e){for(var i,n=e,o=n*n,r=o*o*o,a=0;a<12&&(r=(o=(n-=i=(n*(Rn+Gn*o+r*(Hn+Un*o))-e)/(Rn+3*Gn*o+r*(7*Hn+9*Un*o)))*n)*o*o,!(D(i)<P));++a);return[Wn*t*(Rn+3*Gn*o+r*(7*Hn+9*Un*o))/B(n),Y(H(n)/Wn)]},Vn.invert=An(O),Yn.invert=function(t,e){var i,n=e,o=25;do{var r=n*n,a=r*r;n-=i=(n*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(D(i)>k&&--o>0);return[t/(.8707+(r=n*n)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),n]},qn.invert=An(Y),Xn.invert=An(function(t){return 2*O(t)}),Kn.invert=function(t,e){return[-e,2*O(j(t))-E]};var Jn=Object.freeze({__proto__:null,geoArea:function(t){return lt.reset(),et(t,ht),2*lt},geoBounds:function(t){var e,i,n,o,r,a,s;if(Ct=xt=-(Lt=wt=1/0),Et=[],et(t,qt),i=Et.length){for(Et.sort(ne),e=1,r=[n=Et[0]];e<i;++e)oe(n,(o=Et[e])[0])||oe(n,o[1])?(ie(n[0],o[1])>ie(n[0],n[1])&&(n[1]=o[1]),ie(o[0],n[1])>ie(n[0],n[1])&&(n[0]=o[0])):r.push(n=o);for(a=-1/0,e=0,n=r[i=r.length-1];e<=i;n=o,++e)o=r[e],(s=ie(n[1],o[0]))>a&&(a=s,Lt=o[0],xt=n[1])}return Et=At=null,Lt===1/0||wt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Lt,wt],[xt,Ct]]},geoCentroid:function(t){Tt=St=zt=Dt=Ot=Nt=Bt=Zt=jt=Rt=Gt=0,et(t,re);var e=jt,i=Rt,n=Gt,o=e*e+i*i+n*n;return o<P&&(e=Nt,i=Bt,n=Zt,St<k&&(e=zt,i=Dt,n=Ot),(o=e*e+i*i+n*n)<P)?[NaN,NaN]:[N(i,e)*S,Y(n/W(o))*S]},geoCircle:function(){var t,e,i=me([0,0]),n=me(90),o=me(6),r={point:function(i,n){t.push(i=e(i,n)),i[0]*=S,i[1]*=S}};function a(){var a=i.apply(this,arguments),s=n.apply(this,arguments)*z,l=o.apply(this,arguments)*z;return t=[],e=ve(-a[0]*z,-a[1]*z,0).invert,Ce(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(i="function"==typeof t?t:me([+t[0],+t[1]]),a):i},a.radius=function(t){return arguments.length?(n="function"==typeof t?t:me(+t),a):n},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:me(+t),a):o},a},geoClipAntimeridian:Be,geoClipCircle:Ze,geoClipExtent:function(){var t,e,i,n=0,o=0,r=960,a=500;return i={stream:function(i){return t&&e===i?t:t=Ge(n,o,r,a)(e=i)},extent:function(s){return arguments.length?(n=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,i):[[n,o],[r,a]]}}},geoClipRectangle:Ge,geoContains:function(t,e){return(t&&ti.hasOwnProperty(t.type)?ti[t.type]:ii)(t,e)},geoDistance:$e,geoGraticule:ui,geoGraticule10:function(){return ui()()},geoInterpolate:function(t,e){var i=t[0]*z,n=t[1]*z,o=e[0]*z,r=e[1]*z,a=B(n),s=H(n),l=B(r),h=H(r),u=a*B(i),c=a*H(i),p=l*B(o),d=l*H(o),f=2*Y(W(q(r-n)+a*l*q(o-i))),_=H(f),m=f?function(t){var e=H(t*=f)/_,i=H(f-t)/_,n=i*u+e*p,o=i*c+e*d,r=i*s+e*h;return[N(o,n)*S,N(r,W(n*n+o*o))*S]}:function(){return[i*S,n*S]};return m.distance=f,m},geoLength:Ke,geoPath:un,geoAlbers:In,geoAlbersUsa:function(){var t,e,i,n,o,r,a=In(),s=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,i.point(e,a),r||(n.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),i=a.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?s:o>=.166&&o<.234&&n>=-.214&&n<-.115?l:a).invert(t)},u.stream=function(i){return t&&e===i?t:(n=[a.stream(e=i),s.stream(i),l.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return i=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),n=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+k,u+.12*e+k],[r-.214*e-k,u+.234*e-k]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+k,u+.166*e+k],[r-.115*e-k,u+.234*e-k]]).stream(h),c()},u.fitExtent=function(t,e){return fn(u,t,e)},u.fitSize=function(t,e){return _n(u,t,e)},u.fitWidth=function(t,e){return mn(u,t,e)},u.fitHeight=function(t,e){return gn(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return xn(Tn).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Tn,geoAzimuthalEquidistant:function(){return xn(Sn).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Sn,geoConicConformal:function(){return Mn(Bn).scale(109.5).parallels([30,30])},geoConicConformalRaw:Bn,geoConicEqualArea:Pn,geoConicEqualAreaRaw:kn,geoConicEquidistant:function(){return Mn(jn).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:jn,geoEqualEarth:function(){return xn(Fn).scale(177.158)},geoEqualEarthRaw:Fn,geoEquirectangular:function(){return xn(Zn).scale(152.63)},geoEquirectangularRaw:Zn,geoGnomonic:function(){return xn(Vn).scale(144.049).clipAngle(60)},geoGnomonicRaw:Vn,geoIdentity:function(){var t,e,i,n,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=cn({point:function(t,e){var i=v([t,e]);this.stream.point(i[0],i[1])}}),g=ci;function y(){return f=s*u,_=s*c,r=a=null,v}function v(i){var n=i[0]*f,o=i[1]*_;if(p){var r=o*t-n*e;n=n*t+o*e,o=r}return[n+l,o+h]}return v.invert=function(i){var n=i[0]-l,o=i[1]-h;if(p){var r=o*t+n*e;n=n*t-o*e,o=r}return[n/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=i=n=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=i=n=o=null,ci):Ge(d=+t[0][0],i=+t[0][1],n=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,i],[n,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(i){return arguments.length?(e=H(p=i%360*z),t=B(p),y()):p*S},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return fn(v,t,e)},v.fitSize=function(t,e){return _n(v,t,e)},v.fitWidth=function(t,e){return mn(v,t,e)},v.fitHeight=function(t,e){return gn(v,t,e)},v},geoProjection:xn,geoProjectionMutator:Cn,geoMercator:Dn,geoMercatorRaw:zn,geoNaturalEarth1:function(){return xn(Yn).scale(175.295)},geoNaturalEarth1Raw:Yn,geoOrthographic:function(){return xn(qn).scale(249.5).clipAngle(90+k)},geoOrthographicRaw:qn,geoStereographic:function(){return xn(Xn).scale(250).clipAngle(142)},geoStereographicRaw:Xn,geoTransverseMercator:function(){var t=On(Kn),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)},geoTransverseMercatorRaw:Kn,geoRotation:xe,geoStream:et,geoTransform:function(t){return{stream:cn(t)}}});function Qn(){}var $n=1/0,to=$n,eo=-$n,io=eo;var no={point:function(t,e){t<$n&&($n=t),t>eo&&(eo=t),e<to&&(to=e),e>io&&(io=e)},lineStart:Qn,lineEnd:Qn,polygonStart:Qn,polygonEnd:Qn,result:function(){var t=[[$n,to],[eo,io]];return eo=io=-(to=$n=1/0),t}};function oo(t,e,i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),et(i,t.stream(no));var a=no.result(),s=Math.min(n/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(n-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var ro,ao=function(){function t(){}return t.prototype.encode=function(e,i,n){if(void 0===n){for(var o=1;o<=12;o++){var r=this.encode(e,i,o),a=this.decode(r);if(a.lat===e&&a.lon===i)return r}n=12}if(e=Number(e),i=Number(i),n=Number(n),isNaN(e)||isNaN(i)||isNaN(n))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<n;){if(h){var _=(d+f)/2;i>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),i=e.sw.lat,n=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(i+o)/2,s=(n+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-i)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-n)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var i=!0,n=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(i){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(n+o)/2;1===c?n=d:o=d}i=!i}}return{sw:{lat:n,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,i){if(e=e.toLowerCase(),i=i.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(i))throw new Error("Invalid direction");var n=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[i][r].indexOf(n)&&""!==o&&(o=this.adjacent(o,i)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[i][r].indexOf(n))},t.prototype.neighbours=function(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")}},t.prototype.contained=function(t,e,i,n,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(i)||i>180)&&(i=180),(isNaN(n)||n<=-90)&&(n=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,i,o),s=this.encode(n,i,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function so(){var t,e,i,n,o,r,a,s=1e-6,l=In(),h=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Pn().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,i.point(e,s),a||(n.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),i=l.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?h:o>=.166&&o<.234&&n>=-.214&&n<-.115?u:o>=.204&&o<.234&&n>=.32&&n<.38?c:l).invert(t)},d.stream=function(i){return t&&e===i?t:(n=[l.stream(e=i),h.stream(i),u.stream(i),c.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return i=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),n=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return oo(d,t,e)},d.fitSize=function(t,e){return function(t,e,i){return oo(t,[[0,0],e],i)}(d,t,e)},d.scale(1070)}!function(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"}(ro||(ro={}));var lo=[],ho={};for(var uo in ro)"string"==typeof uo&&(lo.push(uo),ho[uo]="AlbersUsaPr"===uo?so:Jn["geo"+uo]);function co(t){var e=ho[t];return e?e():(console.log("Unknown projection: "+t),Dn())}function po(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}po(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var fo=2048/Math.PI,_o=function(t){function i(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return l(i,t),i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),i},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},i.prototype.update=function(i,n){t.prototype.update.call(this,i,n);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),r=this;o.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)}).merge(o).each(function(t){t.layerUpdate(r)}),o.exit().each(function(t){t.layerExit(r),t._domElement.remove()}).remove(),o.order(),this.onZoomed()},i.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},i.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),i=this;e.each(function(t){t.layerZoomed(i)})},i.prototype.preRender=function(t){return Promise.all(this.layers().filter(function(t){return t.visible()}).map(function(t){return t.layerPreRender()}))},i.prototype.render=function(t){var i=this;return this.preRender().then(function(){e.SVGZoomWidget.prototype.render.call(i,function(e){i._layersTarget&&(i._renderCount&&i._autoScaleOnNextRender||i._prevAutoScaleMode!==i.autoScaleMode())?(i._prevAutoScaleMode=i.autoScaleMode(),i._autoScaleOnNextRender=!1,i.autoScale(),t&&t(e)):t&&t(e)})}),this},i.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},i.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},i.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},i}(e.SVGZoomWidget);_o.prototype._class+=" map_Layered",_o.prototype.publish("projection",null,"set","Map projection type",lo),_o.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),_o.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),_o.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),_o.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),_o.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var mo=_o.prototype.projection;_o.prototype.projection=function(t){var e=mo.apply(this,arguments);if(arguments.length){switch(this._d3GeoProjection=co(t).scale(fo).translate([0,0]),t){case"orthographic":this._d3GeoProjection.clipAngle(90).rotate([0,0])}this._d3GeoPath=un().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var go=function(t){function e(){var e=t.call(this)||this;return i.ITooltip.call(e),e}return l(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,i){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,i){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,i)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,i=arguments;return this.layerPreRender().then(function(){_o.prototype.render.apply(e,i)}),this},e.prototype.layerZoomed=function(t){},e}(_o);go.prototype._class+=" map_Layer",go.prototype.implements(i.ITooltip.prototype);var yo=function(t){function e(){var e=t.call(this)||this;return e.pins=new b,e}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.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())},e.prototype.layerUpdate=function(t){go.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)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),n=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map(function(o){var r=e?o[e.idx]:o[0],a=i?o[i.idx]:o[1],s=n?o[n.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]}):[]).render()},e}(go);function vo(t){return t}function bo(t,e){return"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return Lo(t,e)})}:Lo(t,e)}function Lo(t,e){var i=e.id,n=e.bbox,o=null==e.properties?{}:e.properties,r=wo(t,e);return null==i&&null==n?{type:"Feature",properties:o,geometry:r}:null==n?{type:"Feature",id:i,properties:o,geometry:r}:{type:"Feature",id:i,bbox:n,properties:o,geometry:r}}function wo(t,e){var i=function(t){if(null==t)return vo;var e,i,n=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=i=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*n+r,u[1]=(i+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),n=t.arcs;function o(t,e){e.length&&e.pop();for(var o=n[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(i(o[r],r));t<0&&function(t,e){for(var i,n=t.length,o=n-e;o<--n;)i=t[o],t[o++]=t[n],t[n]=i}(e,a)}function r(t){return i(t)}function a(t){for(var e=[],i=0,n=t.length;i<n;++i)o(t[i],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var i,n=e.type;switch(n){case"GeometryCollection":return{type:n,geometries:e.geometries.map(t)};case"Point":i=r(e.coordinates);break;case"MultiPoint":i=e.coordinates.map(r);break;case"LineString":i=a(e.arcs);break;case"MultiLineString":i=e.arcs.map(a);break;case"Polygon":i=l(e.arcs);break;case"MultiPolygon":i=e.arcs.map(l);break;default:return null}return{type:n,coordinates:i}}(e)}function xo(t,e){var i={},n={},o={},r=[],a=-1;function s(t,e){for(var n in t){var o=t[n];delete e[o.start],delete o.start,delete o.end,o.forEach(function(t){i[t<0?~t:t]=1}),r.push(o)}}return e.forEach(function(i,n){var o,r=t.arcs[i<0?~i:i];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=i,e[n]=o)}),e.forEach(function(e){var i,r,a=function(e){var i,n=t.arcs[e<0?~e:e],o=n[0];t.transform?(i=[0,0],n.forEach(function(t){i[0]+=t[0],i[1]+=t[1]})):i=n[n.length-1];return e<0?[i,o]:[o,i]}(e),s=a[0],l=a[1];if(i=o[s])if(delete o[i.end],i.push(e),i.end=l,r=n[l]){delete n[r.start];var h=r===i?i:i.concat(r);n[h.start=i.start]=o[h.end=r.end]=h}else n[i.start]=o[i.end]=i;else if(i=n[l])if(delete n[i.start],i.unshift(e),i.start=s,r=o[s]){delete o[r.end];var u=r===i?i:r.concat(i);n[u.start=r.start]=o[u.end=i.end]=u}else n[i.start]=o[i.end]=i;else n[(i=[e]).start=s]=o[i.end=l]=i}),s(o,n),s(n,o),e.forEach(function(t){i[t<0?~t:t]||r.push([t])}),r}function Co(t){return wo(t,function(t,e,i){var n,o,r;if(arguments.length>1)n=function(t,e,i){var n,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:n})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==i?function(t){o.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}(0,e,i);else for(o=0,n=new Array(r=t.arcs.length);o<r;++o)n[o]=o;return{type:"MultiLineString",arcs:xo(t,n)}}.apply(this,arguments))}yo.prototype._class+=" map_CanvasPinLayer",yo.prototype.publishProxy("clusterMode","pins","clusterMode"),yo.prototype.publishProxy("allCircles","pins","allCircles"),yo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),yo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),yo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),yo.prototype.publishProxy("enableClustering","pins","enableClustering"),yo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),yo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),yo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),yo.prototype.publishProxy("pinHeight","pins","pinHeight"),yo.prototype.publishProxy("pinWidth","pins","pinWidth"),yo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),yo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),yo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),yo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),yo.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});po(".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}");var Mo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function ko(t){if(!arguments.length)return Mo;var e=Mo;return Mo=t,e}var Po=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.data=function(t){var e=go.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var i=this;this.data().forEach(function(t){i._dataMap[t[0]]=t,(!i._dataMinWeight||t[1]<i._dataMinWeight)&&(i._dataMinWeight=t[1]),(!i._dataMaxWeight||t[1]>i._dataMaxWeight)&&(i._dataMaxWeight=t[1])})}return e},i.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},i.prototype.layerEnter=function(t,e,i){go.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")},i.prototype.layerUpdate=function(t,e){if(go.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(Co(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())},i.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},i.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":.5/e.zoomScale()+"px")},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);Po.prototype._class+=" map_Choropleth",Po.prototype.mixin(e.Utility.SimpleSelectionMixin),Po.prototype._palette=e.Palette.rainbow("default"),Po.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Po.prototype._palette.switch(),{tags:["Basic","Shared"]}),Po.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Po.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Po.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Po.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Po.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Po.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Po.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Eo,Ao=(Io="application/json",Eo=function(t){return JSON.parse(t.responseText)},function(t,i){var n=function(t,i){var n,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,i=h.status;if(!i&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||i>=200&&i<300||304===i){if(r)try{e=r.call(n,h)}catch(t){return void s.call("error",n,t)}else e=h;s.call("load",n,e)}else s.call("error",n,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in h||!/^(http(s)?:)?\/\//.test(t)||(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),n)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",n):o},responseType:function(t){return arguments.length?(a=t,n):a},timeout:function(t){return arguments.length?(p=+t,n):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return r=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,r){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!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof i&&(r=i,i=null),null!=r&&1===r.length&&(r=function(t){return function(e,i){t(null==e?i:null)}}(r)),null!=r&&n.on("error",r).on("load",function(t){r(null,t)}),s.call("beforesend",n,h),h.send(null==i?null:i),n},abort:function(){return h.abort(),n},on:function(){var t=s.on.apply(s,arguments);return t===s?n:t}},null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}(t).mimeType(Io).response(Eo);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}),To=null,So=null,zo=null,Do=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=To.topology,this._choroTopologyObjectsCountries=To.topology.objects.countries,this._choroTopologyObjectsLand=To.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){return o.tooltipFormat({label:t[0],value:t[1]})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(zo[e[0]]);return i||console.log("Unknown Country: "+e),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){To&&t(),Ao(ko()+"/countries.json",function(e){for(var i in So=bo((To=e).topology,To.topology.objects.countries).features,zo={},So)So[i].id&&To.countryNames[So[i].id]&&(zo[To.countryNames[So[i].id].name]=So[i]);t()})})),this._topoJsonPromise},i}(Po);Do.prototype._class+=" map_ChoroplethCountries";var Oo=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){Do.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Do);Oo.prototype._class+=" map_ChoroplethContinents";var No=null,Bo=null,Zo=null,jo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=No.topology,this._choroTopologyObjects=No.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=t[0];return o.tooltipFormat({label:No.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(Zo[e[0]]);return i||console.log("Unknown US County: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){No&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Bo=bo((No=e).topology,No.topology.objects.counties).features,Zo={},Bo)Bo[i].id&&(Zo[Bo[i].id]=Bo[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],i}(Po);jo.prototype._class+=" map_ChoroplethCounties",jo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var Ro=null,Go=null,Ho=null,Uo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ro.topology,this._choroTopologyObjects=Ro.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=Ho[t[0]].id;return o.tooltipFormat({label:Ro.stateNames[e].name,value:t[1]})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(Ho[e[0]]);return i||console.log("Unknown US State: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){Ro&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Go=bo((Ro=e).topology,Ro.topology.objects.states).features,Ho={},Go)Go[i].id&&(Ho[Ro.stateNames[Go[i].id].code]=Go[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],i}(Po);Uo.prototype._class+=" map_ChoroplethStates";var Wo=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);Wo.prototype._class+=" map_ChoroplethStatesHeat";po(".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}");var Fo=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.data=function(t){var e=go.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},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this.geohash=new ao,this._geoHashTransform=i.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},i.prototype.layerUpdate=function(t){go.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]});var 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){var n=e.geohash.bounds(i[0]),o={type:"LineString",coordinates:[[n.sw.lon,n.ne.lat],[n.ne.lon,n.ne.lat],[n.ne.lon,n.sw.lat],[n.sw.lon,n.sw.lat]]};return t._d3GeoPath(o)}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.geoHashPaths.exit().remove()},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);function Vo(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}Fo.prototype._class+=" map_GeoHash",Fo.prototype._palette=e.Palette.rainbow("default"),Fo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Fo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Fo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Fo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Fo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Fo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Fo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var Yo=Vo(function(t,e){!function(e,i){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t=null,e=null,i=!1,n=[],o=[],r=null,a={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};a.VERSION="3.18",a.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",a._googleMockApiObject={},a.load=function(t){null===e?!0===i?t&&n.push(t):(i=!0,window[a.WINDOW_CALLBACK_NAME]=function(){s(t)},a.createLoader()):t&&t(e)},a.createLoader=function(){(t=document.createElement("script")).type="text/javascript",t.src=a.createUrl(),document.body.appendChild(t)},a.isLoaded=function(){return null!==e},a.createUrl=function(){var t=a.URL;return t+="?callback="+a.WINDOW_CALLBACK_NAME,a.KEY&&(t+="&key="+a.KEY),a.LIBRARIES.length>0&&(t+="&libraries="+a.LIBRARIES.join(",")),a.CLIENT&&(t+="&client="+a.CLIENT+"&v="+a.VERSION),a.CHANNEL&&(t+="&channel="+a.CHANNEL),a.LANGUAGE&&(t+="&language="+a.LANGUAGE),a.REGION&&(t+="®ion="+a.REGION),t},a.release=function(s){var l=function(){a.KEY=null,a.LIBRARIES=[],a.CLIENT=null,a.CHANNEL=null,a.LANGUAGE=null,a.REGION=null,a.VERSION="3.18",e=null,i=!1,n=[],o=[],void 0!==window.google&&delete window.google,void 0!==window[a.WINDOW_CALLBACK_NAME]&&delete window[a.WINDOW_CALLBACK_NAME],null!==r&&(a.createLoader=r,r=null),null!==t&&(t.parentElement.removeChild(t),t=null),s&&s()};i?a.load(function(){l()}):l()},a.onLoad=function(t){o.push(t)},a.makeMock=function(){r=a.createLoader,a.createLoader=function(){window.google=a._googleMockApiObject,window[a.WINDOW_CALLBACK_NAME]()}};var s=function(t){var r;for(i=!1,null===e&&(e=window.google),r=0;r<o.length;r++)o[r](e);for(t&&t(e),r=0;r<n.length;r++)n[r](e);n=[]};return a}()}()}),qo=Object.freeze(Object.assign(Object.create(null),Yo,{default:Yo,__moduleExports:Yo}));po(".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}");var Xo=Yo||qo;t.google=null;var Ko,Jo=15e3;function Qo(e){return Ko||(Ko=o.promiseTimeout(Jo,new Promise(function(i,n){if(t.google)i();else if(e)t.google=e,i();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{Xo.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",Xo.LIBRARIES=["geometry","drawing"],Xo.load(function(e){t.google=e,i()})}catch(t){console.warn("Failed to initialize Google Map API: "+t.message),i()}}})).catch(function(t){console.warn("Timed out initializing Google Map API after "+Jo+"ms.")})),Ko}var $o=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map(function(e){return t._saveShape(e)})},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},i={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var i=t.getPath();e.vertices=[];for(var n=0;n<i.length;n++)e.vertices.push(i.getAt(n))},polyline:function(t){i.polygon(t)}};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},e.prototype._deserializeShapes=function(e){for(var i=JSON.parse(e),n=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,i){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,center:e.pos,radius:e.radius})},rectangle:function(e,i){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,i){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,paths:e.vertices})},polyline:function(e,i){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,path:e.vertices})}},h=0;h<i.length;h++){var u=l[i[h].type](i[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:i[h].type,overlay:u})}},e}(),tr=function(i){function o(){var e=i.call(this)||this;e._tag="div";var o=e;function r(e,i,n){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(i,n)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new $o(e),e._worldSurface=new n.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new n.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return l(o,i),o.prototype.data=function(t){return e.HTMLWidget.prototype.data.apply(this,arguments)},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID;default:return t.google.maps.MapTypeId.ROADMAP}},o.prototype.getMapOptions=function(){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()}},o.prototype.size=function(i){var n=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",i.width+"px").style("height",i.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),n},o.prototype.enter=function(n,o){i.prototype.enter.call(this,n,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,i,n){function o(e,i,n){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=i,this._viewportSurface=n,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",function(){o.draw()}),t.google.maps.event.addListener(e,"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 o.prototype=t.google.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(){var e=this.getProjection();if(e){for(var i=this._map.getBounds(),n=e.fromLatLngToDivPixel(i.getCenter()),o=e.fromLatLngToDivPixel(i.getSouthWest()),r=e.fromLatLngToDivPixel(i.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>n.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>n.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,i,n)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()}),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()}),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,i){var n=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},function(e,i){if(i===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;n._googleMap.fitBounds(o),n.streetView()&&n.useComputedHeading()&&n.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else n.statusError({data:e,status:i})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){o.prototype.onDrawingComplete.apply(n,arguments)})):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,n=arguments;return Qo().then(function(){i.prototype.render.apply(e,n)}),this},o.prototype.streetViewAt=function(e,i){void 0===i&&(i=1e3);var n=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:i,source:o},function(i,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:n._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(i.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));n._googleMapPanorama.setPano(i.location.pano),n._googleMapPanorama.setPov({heading:a,pitch:0}),n.showStreetViewMarker()||r.setVisible(!1),n._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(n._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))})}else n.statusError({data:i,status:o})})},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=e.map(this._circleMap.keys(),function(t){return t});this.data().forEach(function(e){n.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?i.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&n.set(t(e),!0)},this),i.forEach(function(e){var i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);var o=this;n.each(function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)})},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=[],o=e.map(this._pinMap.keys(),function(t){return t});this.data().forEach(function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?i.push(e):e[2]&&this._pinMap.has(t(e))?n.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)},this),i.forEach(function(e){var i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),n.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);var r=this;o.each(function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)})},o.prototype.createIcon=function(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}},o.prototype.createMarker=function(e,i,n){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,i),animation:t.google.maps.Animation.DROP,title:n.title||"",icon:this.createIcon(n),map:this._googleMap})},o.prototype.createCircle=function(e,i,n){return n.radius=n.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,i),radius:16093*n.radius/10,fillColor:n.fillColor||"red",strokeColor:n.strokeColor||n.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,i){if(!this._renderCount)return this;i=i||this.singleZoomToMaxZoom();var n=0,o=new t.google.maps.LatLngBounds;switch(e.forEach(function(e){var i=new t.google.maps.LatLng(e[0],e[1]);o.extend(i),++n}),n){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(i);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var i=e.overlay;i.__hpcc_type=e.type,this._userShapes.add(i);var n=this,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)}),t.google.maps.event.addListener(i,"click",function(t){return n.userShapeSelection(i),t&&!0===o&&(n.deleteUserShape(i),n.drawingState(JSON.stringify(n._userShapes.save()))),!1}),this.userShapeSelection(i),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.log("Data not found for this location.")},o}(e.HTMLWidget);tr.prototype._class+=" map_GMap",tr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),tr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),tr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),tr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),tr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),tr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),tr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),tr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),tr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),tr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),tr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),tr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),tr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),tr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),tr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),tr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),tr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var er=function(t){function e(e,i){var n=t.call(this)||this;return n.gmap=e,n.surface=i,n.autoScaleMode("none"),n.zoomable(!1).zoomDuration(10),n}return l(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){var n=i.getProjection();if(n){var o=new window.google.maps.LatLng(0,0),r=n.fromLatLngToDivPixel(o),a=i.surface.widgetX(),s=i.surface.widgetY(),l=[r.x-a,r.y-s],h=i.gmap._googleMap.getZoom();i.zoomTo(l,1/16*(1<<h),0)}e&&e(t)}),this},e}(_o),ir=function(e){function i(){var t=e.call(this)||this;return t.layered=new er(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return l(i,e),i.prototype.invert=function(t,e){return this.layered.invert(t,e)},i.prototype.rproject=function(e,i){var n=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,i));return{lat:n.lat(),lng:n.lng()}},i.prototype.updateCircles=function(){},i.prototype.updatePins=function(){},i.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},i.prototype.render=function(t){var i=this;return e.prototype.render.call(this,function(e){i.layered.preRender().then(function(){i.layered.render(function(e){t&&t(e)})})})},i}(tr);ir.prototype._class+=" map_GMapLayered";var nr=function(t){function e(){var e=t.call(this)||this,i=e;return e._counties=(new jo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",function(t,e,n){i.click(t,e,n)}).on("dblclick",function(t,e,n){i.dblclick(t,e,n)}),e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._counties])},e.prototype.update=function(e,i){this._counties.data(this.data()),t.prototype.update.call(this,e,i),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){if(console.log("as:"+i.autoScale()),i._renderCount>1&&i.autoScale()){var n=i._counties.getDataBounds();if(n.x&&n.y&&(!i._prevBounds||i._prevBounds.x!==n.x||i._prevBounds.y!==n.y||i._prevBounds.width!==n.width||i._prevBounds.height!==n.height)){i._prevBounds=n;var o=i.invert(n.x,n.y),r=i.invert(n.x+n.width,n.y+n.height);o&&r&&i.zoomTo([[o[1],o[0]],[r[1],r[0]]])}}e&&e(t)})},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);nr.prototype._class+=" map_GMapCounties",nr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var or=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var i=(new r.Graph).layout("None").zoomable(!1),n=i.render,o=this;i.render=function(t){var i=[],a=[],s=null;return o.data().forEach(function(t){var n=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(n);i.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l}),this.data({vertices:i,edges:a}),n.apply(this,arguments)},this._viewportSurface.widget(i)},i}(tr);or.prototype._class+=" map_GMapGraph";var rr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,i=e.render,n=this;e.render=function(t){return this.data(n.data().map(function(t){var e=n._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]})),i.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(tr);rr.prototype._class+=" map_GMapHeat";po(".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}");var ar=function(t){function i(){var i=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(i),i._geohash=new ao,i}return l(i,t),i.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),i=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter(function(t){var e=i?t[i.idx]:t[0],r=n?t[n.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r}).map(function(o,r){var a={idx:r,lat:i?o[i.idx]:o[0],long:n?o[n.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a},this)},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this._pinsTransform=i,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})},i.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],function(t){return t.idx});var i=this,n=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){i.click(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("dblclick",function(t){i.dblclick(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("mouseover",function(t){e.Platform.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.show.apply(this,arguments)}).each(function(t){var i=e.select(this);i.append("path").attr("class","data"),i.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);n.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:""});var o=this.svgPinPath();n.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:i.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:i.fillColor()}),this.pinsPaths.exit().remove()},i.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",function(e){var i=t.project(e.lat,e.long);return i||(i=[0,0]),"translate("+i[0]+", "+i[1]+")scale("+1/t.zoomScale()+")"})},i.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},i.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},i.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*i-o)/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"+-r+"l"+-o/2+","+n+"l"+-o/2+","+-n+"h"+-r+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=-e/2;return"M"+-t/2+","+(n+=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"+(2*i-t)+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),i=e/2,n=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-i+" "+n+", "+(e+i)+" "+n+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},i.prototype.circlePath=function(){var 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"},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);ar.prototype._class+=" map_Pins",ar.prototype.mixin(e.Utility.SimpleSelectionMixin),ar.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),ar.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),ar.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),ar.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),ar.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),ar.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),ar.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),ar.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),ar.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),ar.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),ar.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var sr=function(t){function e(){var e=t.call(this)||this,i=e;return e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n),i.clickStreetView(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.dblclick(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map(function(e){var 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)},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),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]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.clickStreetView=function(t,e,i){this.streetViewOnClick()&&this.streetViewAt({lat:+t[this.latitudeColumn()],lng:+t[this.longitudeColumn()]})},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);sr.prototype._class+=" map_GMapPin",sr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),sr.prototype.publishProxy("pinColor","_pins","fillColor"),sr.prototype.publishProxy("pinType","_pins","pinType"),sr.prototype.publishProxy("pinWidth","_pins","pinWidth"),sr.prototype.publishProxy("pinHeight","_pins","pinHeight"),sr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),sr.prototype.publishProxy("pinRadius","_pins","pinRadius"),sr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),sr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),sr.prototype.publishProxy("textBaseline","_pins","textBaseline"),sr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),sr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),sr.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),sr.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),sr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");po(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var lr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.data=function(t){var e=go.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},e.prototype.layerEnter=function(t,e,i){go.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")},e.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var 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()},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(go);lr.prototype._class+=" map_Lines",lr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var hr=function(t){function e(){var e=t.call(this)||this,i=e;return e._lines=new lr,e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map(function(e){var 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){var 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)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._lines,this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),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]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);hr.prototype._class+=" map_GMapPinLine",hr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),hr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),hr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toPinColor","red","html-color","To Pin Color"),hr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});po(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var ur=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return l(e,t),e.prototype.importJSON=function(t){var e=ar.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i.long,i.lat],[t.long,t.lat]]}),i=t.eol?null:t},this)}return e},e.prototype.data=function(t){var e=ar.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i[1],i[0]],[t[1],t[0]]]}),i=t},this)}return e},e.prototype.layerEnter=function(t,e,i){ar.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")},e.prototype.layerUpdate=function(t){ar.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var 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()},e.prototype.layerZoomed=function(t){ar.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(ar);ur.prototype._class+=" map_Graph";po(".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}");var cr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),i}return l(i,t),i.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._graticule=ui(),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")},i.prototype.layerUpdate=function(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())},i.prototype.layerExit=function(t){delete this._prevProjection},i}(go);cr.prototype._class+=" map_Graticule",cr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),cr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),cr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");po(".map_Heat{//pointer-events:none}.map_Heat canvas{pointer-events:none}");var pr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.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 a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){go.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)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map(function(n){var o=e?n[e.idx]:n[0],r=i?n[i.idx]:n[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],n[4]||.5]}):[]).render()},e}(go);function dr(){}function fr(t){return t.k}function _r(t){return[t.x,t.y]}function mr(t){return function(){return t}}pr.prototype._class+=" map_Heat",pr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype._palette=e.Palette.rainbow("default"),dr.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)};po(".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}");var gr=4096,yr=function(t){function i(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return l(i,t),i.prototype.layerEnter=function(t,e,n){go.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,4*gr]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(i._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},i.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,i=960,n=500,o=!0,r=!0,a=256,s=fr,l=_r,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((i-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((n-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,i=+o[0],n=+o[1],u):[i-t,n-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],i=+o[1][0],n=+o[1][1],u):[[t,e],[i,n]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:mr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:mr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().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(i._copyrightText):this._copyright.text(""),this.layerZoomed(t)},i.prototype.layerZoomed=function(t){var i=t.zoomScale(),n=t.zoomTranslate(),o=this._tile.scale(i*gr).translate(n)(),r=o.scale/i,a=(o.translate[0],o.scale,o.translate[1],o.scale,Math.round(1e3*r));this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],function(t){return t}),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate("+-gr/2+","+-gr/2+") scale("+t/256+")"}(r)).each(function(t){console.log(t)}).merge(s);s.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){e.select(this).selectAll(".image").attr("xlink:href",null)}).remove(),l.selectAll(".image").data(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"}).each(function(t){console.log("http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png")}).transition().duration(500).style("opacity",1)},i._copyrightText="© OpenStreetMap contributors",i}(go);yr.prototype._class+=" map_OpenStreet",yr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var vr=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);function br(){Po.call(this),this.projection("mercator")}vr.prototype._class+=" map_TestHeatMap",br.prototype=Object.create(Po.prototype),br.prototype.constructor=br,br.prototype._class+=" map_TopoJSONChoropleth",br.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"]),br.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var 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]})})},br.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments);var e=[],i=this;this.data().forEach(function(t){if(isNaN(t[0]))for(var n in i._choroTopologyIndex)for(var o in i._choroTopologyIndex[n])o===t[0]&&i._choroTopologyIndex[n][o].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){var n=t._d3GeoPath(i._choroTopologyFeatures[e[0]]);return n||console.log("Unknown Country: "+e),n}).style("fill",function(t){return i._palette(t[1],i._dataMinWeight,i._dataMaxWeight)}),this.choroPaths.exit().remove()},br.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise(function(e,i){Ao(ko()+"/"+t.region()+".json",function(i){function n(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=bo(t._choroTopology,t._choroTopologyObjects).features,Ao(ko()+"/"+t.region()+"_idx.json",n).on("error",function(t){n({})})})})}return this._topoJsonPromise};var Lr,wr=Vo(function(t,e){var i;window,i=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=10)}([function(t,e,i){!function(t){var e=Object.freeze;function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var r=0;function a(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function s(t,e,i){var n,o,r,a;return a=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function l(t,e,i){var n=e[1],o=e[0],r=n-o;return t===n&&i?t:((t-o)%r+r)%r+o}function h(){return!1}function u(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_-]+) *\}/g;function m(t,e){return t.replace(_,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var C=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,i){if(!i||C!==x)return C.call(window,o(t,e));t.call(e)}function P(t){t&&M.call(window,t)}var I=(Object.freeze||Object)({freeze:e,extend:i,create:n,bind:o,lastId:r,stamp:a,throttle:s,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:p,setOptions:d,getParamString:f,template:m,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:C,cancelFn:M,requestAnimFrame:k,cancelAnimFrame:P});function E(){}E.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=n(o);for(var a in r.constructor=e,e.prototype=r,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(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)}}(t.includes),i.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=i(n(r.options),t.options)),i(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},E.include=function(t){return i(this.prototype,t),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var A={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},r=n,a=0,s=r.length;a<s;a++)if(r[a].fn===e&&r[a].ctx===i)return;r.push(o)},_off:function(t,e,i){var n,o,r;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,r=n.length;o<r;o++){var a=n[o];if(a.ctx===i&&a.fn===e)return a.fn=h,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,r=n.length;o<r;o++)n[o].fn=h;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var r=o(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var T=E.extend(A);function S(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof S?t:g(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,i)}function O(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof O?t:new O(t,e)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return t instanceof B?t:new B(t,e)}function j(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 R(t,e,i){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(t){return t=D(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof S?D(t):N(t))instanceof O?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>e.x&&n.x<i.x,a=o.y>e.y&&n.y<i.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof B))return t?this.extend(R(t)||Z(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new B(new j(e.lat-n,e.lng-o),new j(i.lat+n,i.lng+o))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?R(t):Z(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&n.lat<i.lat,a=o.lng>e.lng&&n.lng<i.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){if(!t)return!1;t=R(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(void 0===e?1e-9:e)},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,R(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var G,H={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new O(n,o)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new j(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast(),s=new j(r.lat-n,r.lng-o),l=new j(a.lat-n,a.lng-o);return new B(s,l)}},U=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=r*r+Math.cos(n)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(G=6378137*Math.PI,new O([-G,-G],[G,G]))};function F(t,e,i,n){if(g(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=n}function V(t,e,i,n){return new F(t,e,i,n)}F.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform: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},untransform:function(t,e){return e=e||1,new S((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y=i({},U,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return V(t,.5,-t,.5)}()}),q=i({},Y,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,e){var i,n,o,r,a,s,l="";for(i=0,o=t.length;i<o;i++){for(a=t[i],n=0,r=a.length;n<r;n++)s=a[n],l+=(n?"L":"M")+s.x+" "+s.y;l+=e?Pt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,$=Q&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),it=Et("android"),nt=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=it&&Et("Google")&&ot<537&&!("AudioNode"in window),at=!!window.opera,st=Et("chrome"),lt=Et("gecko")&&!et&&!at&&!Q,ht=!st&&Et("safari"),ut=Et("phantom"),ct="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in J,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,_t="MozPerspective"in J,mt=!window.L_DISABLE_3D&&(dt||ft||_t)&&!ct&&!ut,gt="undefined"!=typeof orientation||Et("mobile"),yt=gt&&et,vt=gt&&ft,bt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!bt),wt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),xt=gt&&at,Ct=gt&<,Mt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),It=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var At=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:it,android23:nt,androidStock:rt,opera:at,chrome:st,gecko:lt,safari:ht,phantom:ut,opera12:ct,win:pt,ie3d:dt,webkit3d:ft,gecko3d:_t,any3d:mt,mobile:gt,mobileWebkit:yt,mobileWebkit3d:vt,msPointer:bt,pointer:Lt,touch:wt,mobileOpera:xt,mobileGecko:Ct,retina:Mt,canvas:kt,svg:Pt,vml:It}),Tt=bt?"MSPointerDown":"pointerdown",St=bt?"MSPointerMove":"pointermove",zt=bt?"MSPointerUp":"pointerup",Dt=bt?"MSPointerCancel":"pointercancel",Ot=["INPUT","SELECT","OPTION"],Nt={},Bt=!1,Zt=0;function jt(t,e,i,n){return"touchstart"===e?function(t,e,i){var n=o(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Ot.indexOf(t.target.tagName)<0))return;Ne(t)}Ut(t,e)});t["_leaflet_touchstart"+i]=n,t.addEventListener(Tt,n,!1),Bt||(document.documentElement.addEventListener(Tt,Rt,!0),document.documentElement.addEventListener(St,Gt,!0),document.documentElement.addEventListener(zt,Ht,!0),document.documentElement.addEventListener(Dt,Ht,!0),Bt=!0)}(t,i,n):"touchmove"===e?function(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Ut(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(St,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){var n=function(t){Ut(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(zt,n,!1),t.addEventListener(Dt,n,!1)}(t,i,n),this}function Rt(t){Nt[t.pointerId]=t,Zt++}function Gt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ht(t){delete Nt[t.pointerId],Zt--}function Ut(t,e){for(var i in t.touches=[],Nt)t.touches.push(Nt[i]);t.changedTouches=[t],e(t)}var Wt=bt?"MSPointerDown":Lt?"pointerdown":"touchstart",Ft=bt?"MSPointerUp":Lt?"pointerup":"touchend",Vt="_leaflet_";function Yt(t,e,i){var n,o,r=!1,a=250;function s(t){var e;if(Lt){if(!tt||"mouse"===t.pointerType)return;e=Zt}else e=t.touches.length;if(!(e>1)){var i=Date.now(),s=i-(n||i);o=t.touches?t.touches[0]:t,r=s>0&&s<=a,n=i}}function l(t){if(r&&!o.cancelBubble){if(Lt){if(!tt||"mouse"===t.pointerType)return;var i,a,s={};for(a in o)i=o[a],s[a]=i&&i.bind?i.bind(o):i;o=s}o.type="dblclick",o.button=0,e(o),n=null}}return t[Vt+Wt+i]=s,t[Vt+Ft+i]=l,t[Vt+"dblclick"+i]=e,t.addEventListener(Wt,s,!1),t.addEventListener(Ft,l,!1),t.addEventListener("dblclick",e,!1),this}function qt(t,e){var i=t[Vt+Wt+e],n=t[Vt+Ft+e],o=t[Vt+"dblclick"+e];return t.removeEventListener(Wt,i,!1),t.removeEventListener(Ft,n,!1),tt||t.removeEventListener("dblclick",o,!1),this}var Xt,Kt,Jt,Qt,$t,te=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function oe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function re(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function he(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=fe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ue(t,e)){var r=fe(t);de(t,(r?r+" ":"")+e)}}function pe(t,e){void 0!==t.classList?t.classList.remove(e):de(t,c((" "+fe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ge(t,e,i){var n=e||new S(0,0);t.style[te]=(dt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ye(t,e){t._leaflet_pos=e,mt?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ve(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Xt=function(){Ie(window,"selectstart",Ne)},Kt=function(){Ae(window,"selectstart",Ne)};else{var be=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Xt=function(){if(be){var t=document.documentElement.style;Jt=t[be],t[be]="none"}},Kt=function(){be&&(document.documentElement.style[be]=Jt,Jt=void 0)}}function Le(){Ie(window,"dragstart",Ne)}function we(){Ae(window,"dragstart",Ne)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),Qt=t,$t=t.style.outline,t.style.outline="none",Ie(window,"keydown",Ce))}function Ce(){Qt&&(Qt.style.outline=$t,Qt=void 0,$t=void 0,Ae(window,"keydown",Ce))}function Me(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ke(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Pe=(Object.freeze||Object)({TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ie,get:ne,getStyle:oe,create:re,remove:ae,empty:se,toFront:le,toBack:he,hasClass:ue,addClass:ce,removeClass:pe,setClass:de,getClass:fe,setOpacity:_e,testProp:me,setTransform:ge,setPosition:ye,getPosition:ve,disableTextSelection:Xt,enableTextSelection:Kt,disableImageDrag:Le,enableImageDrag:we,preventOutline:xe,restoreOutline:Ce,getSizedParentNode:Me,getScale:ke});function Ie(t,e,i,n){if("object"==typeof e)for(var o in e)Te(t,o,e[o],i);else{e=p(e);for(var r=0,a=e.length;r<a;r++)Te(t,e[r],i,n)}return this}var Ee="_leaflet_events";function Ae(t,e,i,n){if("object"==typeof e)for(var o in e)Se(t,o,e[o],i);else if(e){e=p(e);for(var r=0,a=e.length;r<a;r++)Se(t,e[r],i,n)}else{for(var s in t[Ee])Se(t,s,t[Ee][s]);delete t[Ee]}return this}function Te(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):"");if(t[Ee]&&t[Ee][o])return this;var r=function(e){return i.call(n||t,e||window.event)},s=r;Lt&&0===e.indexOf("touch")?jt(t,e,r,o):!wt||"dblclick"!==e||!Yt||Lt&&st?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Fe(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&it&&(r=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Ge&&i-Ge;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?Be(t):(Ge=i,e(t))}(t,s)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):Yt(t,r,o),t[Ee]=t[Ee]||{},t[Ee][o]=r}function Se(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):""),r=t[Ee]&&t[Ee][o];if(!r)return this;Lt&&0===e.indexOf("touch")?function(t,e,i){var n=t["_leaflet_"+e+i];"touchstart"===e?t.removeEventListener(Tt,n,!1):"touchmove"===e?t.removeEventListener(St,n,!1):"touchend"===e&&(t.removeEventListener(zt,n,!1),t.removeEventListener(Dt,n,!1))}(t,e,o):!wt||"dblclick"!==e||!qt||Lt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):qt(t,o),t[Ee][o]=null}function ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,We(t),this}function De(t){return Te(t,"mousewheel",ze),this}function Oe(t){return Ie(t,"mousedown touchstart dblclick",ze),Te(t,"click",Ue),this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return Ne(t),ze(t),this}function Ze(t,e){if(!e)return new S(t.clientX,t.clientY);var i=ke(e),n=i.boundingClientRect;return new S((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var je=pt&&st?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Re(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/je: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}var Ge,He={};function Ue(t){He[t.type]=!0}function We(t){var e=He[t.type];return He[t.type]=!1,e}function Fe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Ve=(Object.freeze||Object)({on:Ie,off:Ae,stopPropagation:ze,disableScrollPropagation:De,disableClickPropagation:Oe,preventDefault:Ne,stop:Be,getMousePosition:Ze,getWheelDelta:Re,fakeStop:Ue,skipped:We,isExternalTarget:Fe,addListener:Ie,removeListener:Ae}),Ye=T.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ve(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ye(this._el,i),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qe=T.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(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(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&mt&&!xt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ie(this._proxy,ie,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n){void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof S?t:this.latLngToContainerPoint(t),a=r.subtract(o).multiplyBy(1-1/n),s=this.containerPointToLatLng(o.add(a));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o),l=this.unproject(a.add(s).divideBy(2).add(r),o);return{center:l,zoom:o}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ye,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!mt)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=R(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),h=o.distanceTo(n)||1,u=1.42,c=u*u;function p(t){var e=t?-1:1,i=t?l:s,n=l*l-s*s+e*c*c*h*h,o=2*i*c*h,r=n/o,a=Math.sqrt(r*r+1)-r,u=a<1e-9?-18:Math.log(a);return u}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var _=p(0);function m(t){return s*(f(_)*(d(e=_+u*t)/f(e))-d(_))/c;var e}var g=Date.now(),y=(p(1)-_)/u,v=i.duration?1e3*i.duration:1e3*y*.8;return this._moveStart(!0,i.noMoveStart),function i(){var r=(Date.now()-g)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*y;r<=1?(this._flyToFrame=k(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(m(l)/h)),a),this.getScaleZoom(s/function(t){return s*(f(_)/f(_+u*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=Z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,Z(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),h=N([s.min.add(i),s.max.subtract(n)]);if(!h.contains(a)){this._enforcingBounds=!0;var u=r.subtract(a),c=D(a.x+u.x,a.y+u.y);(a.x<h.min.x||a.x>h.max.x)&&(c.x=r.x-u.x,u.x>0?c.x+=l.x-i.x:c.x-=l.x-n.x),(a.y<h.min.y||a.y>h.max.y)&&(c.y=r.y-u.y,u.y>0?c.y+=l.y-i.y:c.y-=l.y-n.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize: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 n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new j(e,i),o=n.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(o);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var s={latlng:n,bounds:o,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(s[l]=t.coords[l]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=re("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new B(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=Z(t),i=D(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(s,n),this.project(a,n)).getSize(),u=mt?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 n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new O(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(R(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ze(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ie(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&mt,ce(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new S(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ae:Ie;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),mt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((i=this._targets[a(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(o&&!Fe(r,t))break;if(n.push(i),o)break}if(r===this._container)break;r=r.parentNode}return n.length||s||o||!Fe(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!We(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var r=n[0];"contextmenu"===e&&r.listens(e,!0)&&Ne(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(e,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ve(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),r=new O(n.subtract(o),n.add(o)),a=this._getBoundsOffset(r,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new O(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),r=n.max.subtract(t.max),a=this._rebound(o.x,-r.x),s=this._rebound(o.y,-r.y);return new S(a,s)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=mt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=re("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=te,i=this._proxy.style[e];ge(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",function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}}),Xe=E.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ke=function(t){return new Xe(t)};qe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=re("div",e+"control-container",this._container);function n(n,o){var r=e+n+" "+e+o;t[n+o]=re("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(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?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=re("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Oe(e),De(e);var n=this._section=re("section",t+"-list");i&&(this._map.on("click",this.collapse,this),it||Ie(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=re("a",t+"-toggle",e);o.href="#",o.title="Layers",wt?(Ie(o,"click",Be),Ie(o,"click",this.expand,this)):Ie(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=re("div",t+"-base",n),this._separator=re("div",t+"-separator",n),this._overlaysList=re("div",t+"-overlays",n),e.appendChild(n)},_getLayer: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]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),Ie(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");i.appendChild(r),r.appendChild(e),r.appendChild(o);var s=t.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<n.length;r++)this._map.hasLayer(n[r])||this._map.addLayer(n[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=re("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var r=re("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Oe(r),Ie(r,"click",Be),Ie(r,"click",o,this),Ie(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ce(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ce(this._zoomInButton,e)}});qe.mergeOptions({zoomControl:!0}),qe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var $e=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=re("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=re("div",e,i)),t.imperial&&(this._iScale=re("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ti=Xe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=re("div","leaflet-control-attribution"),Oe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});qe.mergeOptions({attributionControl:!0}),qe.addInitHook(function(){this.options.attributionControl&&(new ti).addTo(this)}),Xe.Layers=Je,Xe.Zoom=Qe,Xe.Scale=$e,Xe.Attribution=ti,Ke.layers=function(t,e,i){return new Je(t,e,i)},Ke.zoom=function(t){return new Qe(t)},Ke.scale=function(t){return new $e(t)},Ke.attribution=function(t){return new ti(t)};var ei=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ei.addTo=function(t,e){return t.addHandler(e,this),this};var ii,ni={Events:A},oi=wt?"touchstart mousedown":"mousedown",ri={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ai={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},si=T.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ie(this._dragStartTarget,oi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(si._dragging===this&&this.finishDrag(),Ae(this._dragStartTarget,oi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(si._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(si._dragging=this,this._preventOutline&&xe(this._element),Le(),Xt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Me(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=ke(i),Ie(document,ai[t.type],this._onMove,this),Ie(document,ri[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&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 S(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,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ve(this._element).subtract(i),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,P(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ai)Ae(document,ai[t],this._onMove,this),Ae(document,ri[t],this._onUp,this);we(),Kt(),this._moved&&this._moving&&(P(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,si._dragging=!1}});function li(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,r){var a,s,l,h=0;for(s=o+1;s<=r-1;s++)(l=di(e[s],e[o],e[r],!0))>h&&(a=s,h=l);h>n&&(i[a]=1,t(e,i,n,o,a),t(e,i,n,a,r))}(t,n,e,0,i-1);var o,r=[];for(o=0;o<i;o++)n[o]&&r.push(t[o]);return r}(t=function(t,e){for(var i=[t[0]],n=1,o=0,r=t.length;n<r;n++)a=t[n],s=t[o],l=void 0,h=void 0,l=s.x-a.x,h=s.y-a.y,l*l+h*h>e&&(i.push(t[n]),o=n);var a,s,l,h;return o<r-1&&i.push(t[r-1]),i}(t,i),i)}function hi(t,e,i){return Math.sqrt(di(t,e,i,!0))}function ui(t,e,i,n,o){var r,a,s,l=n?ii:pi(t,i),h=pi(e,i);for(ii=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=ci(t,e,r=l||h,i,o),s=pi(a,i),r===l?(t=a,l=s):(e=a,h=s)}}function ci(t,e,i,n,o){var r,a,s=e.x-t.x,l=e.y-t.y,h=n.min,u=n.max;return 8&i?(r=t.x+s*(u.y-t.y)/l,a=u.y):4&i?(r=t.x+s*(h.y-t.y)/l,a=h.y):2&i?(r=u.x,a=t.y+l*(u.x-t.x)/s):1&i&&(r=h.x,a=t.y+l*(h.x-t.x)/s),new S(r,a,o)}function pi(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 di(t,e,i,n){var o,r=e.x,a=e.y,s=i.x-r,l=i.y-a,h=s*s+l*l;return h>0&&((o=((t.x-r)*s+(t.y-a)*l)/h)>1?(r=i.x,a=i.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,n?s*s+l*l:new S(r,a)}function fi(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fi(t)}var mi=(Object.freeze||Object)({simplify:li,pointToSegmentDistance:hi,closestPointOnSegment:function(t,e,i){return di(t,e,i)},clipSegment:ui,_getEdgeIntersection:ci,_getBitCode:pi,_sqClosestPointOnSegment:di,isFlat:fi,_flat:_i});function gi(t,e,i){var n,o,r,a,s,l,h,u,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=pi(t[o],e);for(a=0;a<4;a++){for(u=p[a],n=[],o=0,h=t.length,r=h-1;o<h;r=o++)s=t[o],l=t[r],s._code&u?l._code&u||((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)):(l._code&u&&((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)),n.push(s));t=n}return t}var yi=(Object.freeze||Object)({clipPolygon:gi}),vi={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new O([-180,-90],[180,90])},bi={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=r*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),r/2);return n=-i*Math.log(Math.max(s,1e-10)),new S(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),h=Math.PI/2-2*Math.atan(a*e)-s,s+=h;return new j(s*i,t.x*i/n)}},Li=(Object.freeze||Object)({LonLat:vi,Mercator:bi,SphericalMercator:W}),wi=i({},U,{code:"EPSG:3395",projection:bi,transformation:function(){var t=.5/(Math.PI*bi.R);return V(t,.5,-t,.5)}()}),xi=i({},U,{code:"EPSG:4326",projection:vi,transformation:V(1/180,1,-1/180,.5)}),Ci=i({},H,{projection:vi,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});H.Earth=U,H.EPSG3395=wi,H.EPSG3857=Y,H.EPSG900913=q,H.EPSG4326=xi,H.Simple=Ci;var Mi=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});qe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?g(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ki=Mi.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Pi=ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ki.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new B;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ii=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=D(n),r=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ei=Ii.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ei.imagePath||(Ei.imagePath=this._detectIconPath()),(this.options.imagePath||Ei.imagePath)+Ii.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=re("div","leaflet-default-icon-path",document.body),e=oe(t,"background-image")||oe(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ai=ei.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new si(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=ve(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin(),l=N(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var h=D((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ve(e._icon),o=e._map.layerPointToLatLng(n);i&&ye(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ti=Mi.extend({options:{icon:new Ei,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ce(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ce(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ai)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ai(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Si=Mi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),zi=Si.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=R(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Si.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new O(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Di=zi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),d(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Si.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===U.distance){var o=Math.PI/180,r=this._mRadius/U.R/o,a=i.project([e+r,t]),s=i.project([e-r,t]),l=a.add(s).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(u)||0===u)&&(u=r/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-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}}),Oi=Si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,r=di,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],h=1,u=l.length;h<u;h++){e=l[h-1],i=l[h];var c=r(t,e,i,!0);c<n&&(n=c,o=r(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;t<l-1;t++)if(o=s[t],r=s[t+1],i=o.distanceTo(r),(n+=i)>e)return a=(n-e)/i,this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return fi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=fi(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,r=t[0]instanceof j,a=t.length;if(r){for(o=[],n=0;n<a;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,o,r,a,s,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(s=this._rings[e],i=0,r=s.length;i<r-1;i++)(a=ui(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===s[i+1]&&i!==r-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=li(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(s=this._parts[i],n=0,a=s.length,o=a-1;n<a;o=n++)if((e||0!==n)&&hi(t,s[o],s[n])<=l)return!0;return!1}});Oi._flat=_i;var Ni=Oi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s,l,h=this._rings[0],u=h.length;if(!u)return null;for(r=a=s=0,t=0,e=u-1;t<u;e=t++)i=h[t],n=h[e],o=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*o,s+=(i.y+n.y)*o,r+=3*o;return l=0===r?h[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Oi.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Oi.prototype._setLatLngs.call(this,t),fi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new S(e,e);if(t=new O(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 n,o=0,r=this._rings.length;o<r;o++)(n=gi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,r,a,s,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(e=this._parts[o],r=0,l=e.length,a=l-1;r<l;a=r++)i=e[r],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Oi.prototype._containsPoint.call(this,t,!0)}}),Bi=Pi.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=Zi(t,r);return a?(a.feature=Wi(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Zi(t,e){var i,n,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||ji;if(!s&&!a)return null;switch(a.type){case"Point":return i=u(s),h?h(t,i):new Ti(i);case"MultiPoint":for(o=0,r=s.length;o<r;o++)i=u(s[o]),l.push(h?h(t,i):new Ti(i));return new Pi(l);case"LineString":case"MultiLineString":return n=Ri(s,"LineString"===a.type?0:1,u),new Oi(n,e);case"Polygon":case"MultiPolygon":return n=Ri(s,"Polygon"===a.type?1:2,u),new Ni(n,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=Zi({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Pi(l);default:throw new Error("Invalid GeoJSON object.")}}function ji(t){return new j(t[1],t[0],t[2])}function Ri(t,e,i){for(var n,o=[],r=0,a=t.length;r<a;r++)n=e?Ri(t[r],e-1,i):(i||ji)(t[r]),o.push(n);return o}function Gi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Hi(t,e,i,n){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?Hi(t[r],e-1,i,n):Gi(t[r],n));return!e&&i&&o.push(o[0]),o}function Ui(t,e){return t.feature?i({},t.feature,{geometry:e}):Wi(e)}function Wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Fi={toGeoJSON:function(t){return Ui(this,{type:"Point",coordinates:Gi(this.getLatLng(),t)})}};function Vi(t,e){return new Bi(t,e)}Ti.include(Fi),Di.include(Fi),zi.include(Fi),Oi.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=Hi(this._latlngs,e?1:0,!1,t);return Ui(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Ni.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=e&&!fi(this._latlngs[0]),n=Hi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ui(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ui(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var r=Wi(o);"FeatureCollection"===r.type?n.push.apply(n,r.features):n.push(r)}}}),i?Ui(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Yi=Vi,qi=Mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=Z(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&le(this._image),this},bringToBack:function(){return this._map&&he(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:re("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(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)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,i,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ye(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Xi=qi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:re("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],r=0;r<i.length;r++)n.push(i[r].src);this._url=i.length>0?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var s=re("source");s.src=this._url[a],e.appendChild(s)}}}}),Ki=qi.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),t.onselectstart=h,t.onmousemove=h}}),Ji=Mi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(o(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&le(this._container),this},bringToBack:function(){return this._map&&he(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof Mi||(i=e,e=t),e instanceof Pi)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Qi=Ji.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ji.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Si||this._source.on("preclick",ze))},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Si||this._source.off("preclick",ze))},getEvents:function(){var t=Ji.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=re("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=re("div",t+"-content-wrapper",e);if(this._contentNode=re("div",t+"-content",i),Oe(i),De(this._contentNode),Ie(i,"contextmenu",ze),this._tipContainer=re("div",t+"-tip-container",e),this._tip=re("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=re("a",t+"-close-button",e);n.href="#close",n.innerHTML="×",Ie(n,"click",this._onCloseButtonClick,this)}},_updateLayout: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 n=t.offsetHeight,o=this.options.maxHeight;o&&n>o?(e.height=o+"px",ce(t,"leaflet-popup-scrolled")):pe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ye(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(oe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new S(this._containerLeft,-i-this._containerBottom);o._add(ve(this._container));var r=t.layerPointToContainerPoint(o),a=D(this.options.autoPanPadding),s=D(this.options.autoPanPaddingTopLeft||a),l=D(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),u=0,c=0;r.x+n+l.x>h.x&&(u=r.x+n-h.x+l.x),r.x-u-s.x<0&&(u=r.x-s.x),r.y+i+l.y>h.y&&(c=r.y+i-h.y+l.y),r.y-c-s.y<0&&(c=r.y-s.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qe.mergeOptions({closePopupOnClick:!0}),qe.include({openPopup:function(t,e,i){return t instanceof Qi||(t=new Qi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Mi.include({bindPopup:function(t,e){return t instanceof Qi?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Be(t),e instanceof Si?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var $i=Ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ji.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ji.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=re("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=D(this.options.offset),h=this._getAnchor();"top"===r?t=t.add(D(-a/2+l.x,-s+l.y+h.y,!0)):"bottom"===r?t=t.subtract(D(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(D(a/2+l.x,s/2-h.y+l.y,!0)):"right"===r||"auto"===r&&o.x<n.x?(r="right",t=t.add(D(l.x+h.x,h.y-s/2+l.y,!0))):(r="left",t=t.subtract(D(a+h.x-l.x,s/2-h.y-l.y,!0))),pe(i,"leaflet-tooltip-right"),pe(i,"leaflet-tooltip-left"),pe(i,"leaflet-tooltip-top"),pe(i,"leaflet-tooltip-bottom"),ce(i,"leaflet-tooltip-"+r),ye(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qe.include({openTooltip:function(t,e,i){return t instanceof $i||(t=new $i(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Mi.include({bindTooltip:function(t,e){return t instanceof $i?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new $i(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions: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,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),wt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(pe(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var tn=Ii.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(se(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ii.Default=Ei;var en=Mi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(he(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,r=i.length;o<r;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){_e(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);_e(o.el,r),r<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=re("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ae(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=re("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles: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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),r=Math.floor(e/2),a=i-1,s=new S(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),a>n&&this._retainParent(o,r,a,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new S(o,r);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,r,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var r=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();mt?ge(t.el,o,n):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new O(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.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 S(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),r=e.unproject(n,t.z),a=e.unproject(o,t.z);return[r,a]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new B(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new S(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,$&&this.options.opacity<1&&_e(t,this.options.opacity),it&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&k(o(this._tileReady,this,t,null,r)),ye(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(_e(i.el,0),P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new O(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),nn=en.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Mt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ie(i,"load",o(this._tileOnLoad,this,e,i)),Ie(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return rt||e.el.setAttribute("src",v),en.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return en.prototype._tileReady.call(this,t,e,i)}});function on(t,e){return new nn(t,e)}var rn=nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var r=(e=d(this,e)).detectRetina&&Mt?2:1,a=this.getTileSize();n.width=a.x*r,n.height=a.y*r,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,nn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,r=n.max,a=(this._wmsVersion>=1.3&&this._crs===xi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=nn.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});nn.WMS=rn,on.wms=function(t,e){return new rn(t,e)};var an=Mi.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=ve(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e),s=a.subtract(r),l=o.multiplyBy(-i).add(n).add(o).subtract(s);mt?ge(this._container,l,i):ye(this._container,l)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){an.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ie(t,"mousemove",s(this._onMouseMove,32,this),this),Ie(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ie(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ae(this._container),Ae(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Mt?2:1;ye(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){an.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath: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},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),i=0;i<s;i++){for(n=0,o=a[i].length;n<o;n++)r=a[i][n],l[n?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(Ue(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ce(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ln(t){return kt?new sn(t):null}var hn=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">')}}}(),un={_initContainer:function(){this._container=re("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(an.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hn("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=hn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=hn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){he(t._container)}},cn=It?hn:X,pn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=cn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=cn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Ae(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.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)),ye(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=cn("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,K(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){he(t._path)}});function dn(t){return Pt||It?new pn(t):null}It&&pn.include(un),qe.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||dn(t)}});var fn=Ni.extend({initialize:function(t,e){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=cn,pn.pointsToPath=K,Bi.geometryToLayer=Zi,Bi.coordsToLatLng=ji,Bi.coordsToLatLngs=Ri,Bi.latLngToCoords=Gi,Bi.latLngsToCoords=Hi,Bi.getFeature=Ui,Bi.asFeature=Wi,qe.mergeOptions({boxZoom:!0});var _n=ei.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ie(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ie(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=re("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),i=e.getSize();ye(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ae(this._box),pe(this._container,"leaflet-crosshair")),Kt(),we(),Ae(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});qe.addInitHook("addHandler","boxZoom",_n),qe.mergeOptions({doubleClickZoom:!0});var mn=ei.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});qe.addInitHook("addHandler","doubleClickZoom",mn),qe.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=ei.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new si(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))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,r=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=s.multiplyBy(h/l),c=h/(i.inertiaDeceleration*a),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:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});qe.addInitHook("addHandler","dragging",gn),qe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yn=ei.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ie(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ae(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Ie(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Be(t)}}});qe.addInitHook("addHandler","keyboard",yn),qe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vn=ei.extend({addHooks:function(){Ie(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ae(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Re(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),n),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});qe.addInitHook("addHandler","scrollWheelZoom",vn),qe.mergeOptions({tap:!0,tapTolerance:15});var bn=ei.extend({addHooks:function(){Ie(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ne(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ce(i,"leaflet-active"),this._holdTimeout=setTimeout(o(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Ie(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ae(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&pe(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});wt&&!Lt&&qe.addInitHook("addHandler","tap",bn),qe.mergeOptions({touchZoom:wt&&!nt,bounceAtZoomLimits:!0});var Ln=ei.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Ie(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ie(document,"touchmove",this._onTouchMove,this),Ie(document,"touchend",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(s,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Ae(document,"touchmove",this._onTouchMove),Ae(document,"touchend",this._onTouchEnd),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}});qe.addInitHook("addHandler","touchZoom",Ln),qe.BoxZoom=_n,qe.DoubleClickZoom=mn,qe.Drag=gn,qe.Keyboard=yn,qe.ScrollWheelZoom=vn,qe.Tap=bn,qe.TouchZoom=Ln,Object.freeze=e,t.version="1.5.1+build.2e3e0ffb",t.Control=Xe,t.control=Ke,t.Browser=At,t.Evented=T,t.Mixin=ni,t.Util=I,t.Class=E,t.Handler=ei,t.extend=i,t.bind=o,t.stamp=a,t.setOptions=d,t.DomEvent=Ve,t.DomUtil=Pe,t.PosAnimation=Ye,t.Draggable=si,t.LineUtil=mi,t.PolyUtil=yi,t.Point=S,t.point=D,t.Bounds=O,t.bounds=N,t.Transformation=F,t.transformation=V,t.Projection=Li,t.LatLng=j,t.latLng=R,t.LatLngBounds=B,t.latLngBounds=Z,t.CRS=H,t.GeoJSON=Bi,t.geoJSON=Vi,t.geoJson=Yi,t.Layer=Mi,t.LayerGroup=ki,t.layerGroup=function(t,e){return new ki(t,e)},t.FeatureGroup=Pi,t.featureGroup=function(t){return new Pi(t)},t.ImageOverlay=qi,t.imageOverlay=function(t,e,i){return new qi(t,e,i)},t.VideoOverlay=Xi,t.videoOverlay=function(t,e,i){return new Xi(t,e,i)},t.SVGOverlay=Ki,t.svgOverlay=function(t,e,i){return new Ki(t,e,i)},t.DivOverlay=Ji,t.Popup=Qi,t.popup=function(t,e){return new Qi(t,e)},t.Tooltip=$i,t.tooltip=function(t,e){return new $i(t,e)},t.Icon=Ii,t.icon=function(t){return new Ii(t)},t.DivIcon=tn,t.divIcon=function(t){return new tn(t)},t.Marker=Ti,t.marker=function(t,e){return new Ti(t,e)},t.TileLayer=nn,t.tileLayer=on,t.GridLayer=en,t.gridLayer=function(t){return new en(t)},t.SVG=pn,t.svg=dn,t.Renderer=an,t.Canvas=sn,t.canvas=ln,t.Path=Si,t.CircleMarker=zi,t.circleMarker=function(t,e){return new zi(t,e)},t.Circle=Di,t.circle=function(t,e,i){return new Di(t,e,i)},t.Polyline=Oi,t.polyline=function(t,e){return new Oi(t,e)},t.Polygon=Ni,t.polygon=function(t,e){return new Ni(t,e)},t.Rectangle=fn,t.rectangle=function(t,e){return new fn(t,e)},t.Map=qe,t.map=function(t,e){return new qe(t,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}(e)},function(t,e,i){var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a={};function s(t,e,i){for(var n=0;n<e.length;n++){var o={css:e[n][1],media:e[n][2],sourceMap:e[n][3]};a[t][n]?a[t][n](o):a[t].push(f(o,i))}}function l(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])}),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var h,u=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function c(t,e,i,n){var o=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}var p=null,d=0;function f(t,e){var i,n,o;if(e.singleton){var r=d++;i=p||(p=l(e)),n=c.bind(null,i,r,!1),o=c.bind(null,i,r,!0)}else i=l(e),n=function(t,e,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e,i){return(i=i||{}).singleton||"boolean"==typeof i.singleton||(i.singleton=o()),t=i.base?t+i.base:t,e=e||[],a[t]||(a[t]=[]),s(t,e,i),function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){a[t]||(a[t]=[]),s(t,e,i);for(var n=e.length;n<a[t].length;n++)a[t][n]();a[t].length=e.length,0===a[t].length&&delete a[t]}}}},function(t,e,i){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),r=n.sources.map(function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")});return[i].concat(r).concat([o]).join("\n")}var a,s,l;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n=0;n<t.length;n++){var o=[].concat(t[n]);i&&(o[2]?o[2]="".concat(i," and ").concat(o[2]):o[2]=i),e.push(o)}},e}},function(t,e,i){i.d(e,"a",function(){return o});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},function(t,e,i){function n(t){if(!(this instanceof n))return new n(t);this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,this._data=[]}t.exports=n,n.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),n=i.getContext("2d"),o=this._r=t+e;return i.width=i.height=2*o,n.shadowOffsetX=n.shadowOffsetY=2*o,n.shadowBlur=e,n.shadowColor="black",n.beginPath(),n.arc(-o,-o,t,0,2*Math.PI,!0),n.closePath(),n.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function(t){var e=this._createCanvas(),i=e.getContext("2d"),n=i.createLinearGradient(0,0,0,256);for(var o in e.width=1,e.height=256,t)n.addColorStop(+o,t[o]);return i.fillStyle=n,i.fillRect(0,0,1,256),this._grad=i.getImageData(0,0,1,256).data,this},draw: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,n=0,o=this._data.length;n<o;n++)i=this._data[n],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 r=e.getImageData(0,0,this._width,this._height);return this._colorize(r.data,this._grad),e.putImageData(r,0,0),this},_colorize:function(t,e){for(var i,n=0,o=t.length;n<o;n+=4)(i=4*t[n+3])&&(t[n]=e[i],t[n+1]=e[i+1],t[n+2]=e[i+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}},function(t,e,i){t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,e,i){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise(function(t,e){var i=0,n=null;n=setInterval(function(){return i>=10?(clearInterval(n),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(n),t(window.google)):void i++},500)}),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var i=google.maps[t],n=new i(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){var e=new MutationObserver(this._onMutations.bind(this));e.observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.addedNodes.length;++n){var o=i.addedNodes[n];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,i=t.src.match(this._roadRegexp),n=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,n=1)):((i=t.src.match(this._satRegexp))&&(e={x:i[1],y:i[2],z:i[3]}),n=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+n;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===n?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var i=this._tileCoordsToKey(t),n=L.DomUtil.create("div");n.dataset.pending=this._imagesPerTile,e=e.bind(this,null,n);for(var o=0;o<this._imagesPerTile;o++){var r=i+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];n.appendChild(this._clone(a)),n.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(i){t.appendChild(this._clone(i)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(n))}return parseInt(n.dataset.pending)||L.Util.requestAnimFrame(e),n},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var i=this._map.getZoom(),n=i!==Math.round(i),o=this._mutant.getZoom();n||i==o||(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),i=t.split(":")[2],n=this._mutant.getBounds(),o=n.getSouthWest(),r=n.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t),u=this._map&&h.overlaps(a)&&i==e;u||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},function(t,e,i){i.d(e,"a",function(){return a});var n=i(0),o=(i(27),{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]}}),r=n.Icon.extend({options:{icon:"leaf",iconSize:o.iconSize.circle,iconAnchor:o.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:o.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:o.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:n.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=o.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=o.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=o.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=o.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var i=document.createElement("div");return i.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),i.appendChild(t),i}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var i="";return t.spin&&(i=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+i+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=Object(n.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,i=Object(n.point)(e.iconSize),o=Object(n.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){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function a(t){return new r(t)}},function(t,e,i){i.d(e,"b",function(){return l}),i.d(e,"a",function(){return h});var n=i(3),o=i(0),r=i(4),a=i.n(r),s=window.simpleheat||r&&a.a||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(o.Layer),h=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,i)||this;return n._latlngs=e,n}return Object(n.a)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var i=this._map.getSize();t.width=i.x,t.height=i.y;var n=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(n?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){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)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var 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()},e.prototype._redraw=function(){var t,e,i,n,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++){if(i=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(i))r=Math.floor((i.x-b)/g)+2,a=Math.floor((i.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(n=y[a][r])?(n[0]=(n[0]*n[2]+i.x*h)/(n[2]+h),n[1]=(n[1]*n[2]+i.y*h)/(n[2]+h),n[2]+=h):y[a][r]=[i.x,i.y,h]}for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(n=y[t][s])&&u.push([Math.round(n[0]),Math.round(n[1]),Math.min(n[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+")"},e}(l)},function(t,e,i){var n=i(3),o=function(t){return t};function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)r(i[n].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)l(i[n],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)h(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)r(i[n],e)}};function l(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function h(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)l(t[i],e,1);e.polygonEnd()}var u=function(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)},c=function(){return new p};function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),C=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=k,M.lineEnd=E},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(C)),C.reset()},result:function(){var t=x/2;return x.reset(),t}};function k(){M.point=P}function P(t,e){M.point=I,v=L=t,b=w=e}function I(t,e){C.add(w*t-L*e),L=t,w=e}function E(){I(v,b)}var A=M,T=1/0,S=T,z=-T,D=z;var O,N,B,Z,j={point:function(t,e){t<T&&(T=t);t>z&&(z=t);e<S&&(S=e);e>D&&(D=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[T,S],[z,D]];return z=D=-(S=T=1/0),t}},R=0,G=0,H=0,U=0,W=0,F=0,V=0,Y=0,q=0,X={point:K,lineStart:J,lineEnd:tt,polygonStart:function(){X.lineStart=et,X.lineEnd=it},polygonEnd:function(){X.point=K,X.lineStart=J,X.lineEnd=tt},result:function(){var t=q?[V/q,Y/q]:F?[U/F,W/F]:H?[R/H,G/H]:[NaN,NaN];return R=G=H=U=W=F=V=Y=q=0,t}};function K(t,e){R+=t,G+=e,++H}function J(){X.point=Q}function Q(t,e){X.point=$,K(B=t,Z=e)}function $(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,K(B=t,Z=e)}function tt(){X.point=K}function et(){X.point=nt}function it(){ot(O,N)}function nt(t,e){X.point=ot,K(O=B=t,N=Z=e)}function ot(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,V+=(o=Z*t-B*e)*(B+t),Y+=o*(Z+e),q+=3*o,K(B=t,Z=e)}var rt=X;function at(t){this._context=t}at.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point: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,_)}},result:y};var st,lt,ht,ut,ct,pt=c(),dt={point:y,lineStart:function(){dt.point=ft},lineEnd:function(){st&&_t(lt,ht),dt.point=y},polygonStart:function(){st=!0},polygonEnd:function(){st=null},result:function(){var t=+pt;return pt.reset(),t}};function ft(t,e){dt.point=_t,lt=ut=t,ht=ct=e}function _t(t,e){ut-=t,ct-=e,pt.add(g(ut*ut+ct*ct)),ut=t,ct=e}var mt=dt;function gt(){this._string=[]}function yt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}gt.prototype={_radius:4.5,_circle:yt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point: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=yt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function vt(t){return function(e){var i=new bt;for(var n in t)i[n]=t[n];return i.stream=e,i}}function bt(){}function Lt(){}bt.prototype={constructor:bt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var wt=function(t){return null==t?Lt:function(){return this.querySelector(t)}};function xt(){return[]}var Ct=function(t){return new Array(t.length)};function Mt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Mt.prototype={constructor:Mt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Pt(t,e,i,n,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],n[s]=a):i[s]=new Mt(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function It(t,e,i,n,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h=kt+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h=kt+a.call(t,r[s],s,r)])?(n[s]=l,l.__data__=r[s],u[h]=null):i[s]=new Mt(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var At="http://www.w3.org/1999/xhtml",Tt={svg:"http://www.w3.org/2000/svg",xhtml:At,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},St=function(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t};var zt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Dt(t){return t.trim().split(/^|\s+/)}function Ot(t){return t.classList||new Nt(t)}function Nt(t){this._node=t,this._names=Dt(t.getAttribute("class")||"")}function Bt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.add(e[n])}function Zt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.remove(e[n])}Nt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function jt(){this.textContent=""}function Rt(){this.innerHTML=""}function Gt(){this.nextSibling&&this.parentNode.appendChild(this)}function Ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var Ut=function(t){var e=St(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===At&&e.documentElement.namespaceURI===At?e.createElement(t):e.createElementNS(i,t)}})(e)};function Wt(){return null}function Ft(){var t=this.parentNode;t&&t.removeChild(this)}function Vt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Yt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var qt={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(qt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Xt(t,e,i){return t=Kt(t,e,i),function(e){var i=e.relatedTarget;i&&(i===this||8&i.compareDocumentPosition(this))||t.call(this,e)}}function Kt(t,e,i){return function(n){try{t.call(this,this.__data__,e,i)}finally{}}}function Jt(t){return function(){var e=this.__on;if(e){for(var i,n=0,o=-1,r=e.length;n<r;++n)i=e[n],t.type&&i.type!==t.type||i.name!==t.name?e[++o]=i:this.removeEventListener(i.type,i.listener,i.capture);++o?e.length=o:delete this.__on}}}function Qt(t,e,i){var n=qt.hasOwnProperty(t.type)?Xt:Kt;return function(o,r,a){var s,l=this.__on,h=n(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=i),void(s.value=e);this.addEventListener(t.type,h,i),s={type:t.type,name:t.name,value:e,listener:h,capture:i},l?l.push(s):this.__on=[s]}}function $t(t,e,i){var n=zt(t),o=n.CustomEvent;"function"==typeof o?o=new o(e,i):(o=n.document.createEvent("Event"),i?(o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}ee.prototype=function(){return new ee([[document.documentElement]],te)}.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=wt(t));for(var e=this._groups,i=e.length,n=new Array(i),o=0;o<i;++o)for(var r,a,s=e[o],l=s.length,h=n[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new ee(n,this._parents)},selectAll:function(t){var e;"function"!=typeof t&&(t=null==(e=t)?xt:function(){return this.querySelectorAll(e)});for(var i=this._groups,n=i.length,o=[],r=[],a=0;a<n;++a)for(var s,l=i[a],h=l.length,u=0;u<h;++u)(s=l[u])&&(o.push(t.call(s,s.__data__,u,l)),r.push(s));return new ee(o,r)},filter:function(t){var e;"function"!=typeof t&&(e=t,t=function(){return this.matches(e)});for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r)for(var a,s=i[r],l=s.length,h=o[r]=[],u=0;u<l;++u)(a=s[u])&&t.call(a,a.__data__,u,s)&&h.push(a);return new ee(o,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each(function(t){f[++u]=t}),f;var i,n=e?It:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);n(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new ee(s,o))._enter=l,s._exit=h,s},enter:function(){return new ee(this._enter||this._groups.map(Ct),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(Ct),this._parents)},join:function(t,e,i){var n=this.enter(),o=this,r=this.exit();return n="function"==typeof t?t(n):n.append(t+""),null!=e&&(o=e(o)),null==i?r.remove():i(r),n&&o?n.merge(o).order():o},merge:function(t){for(var e=this._groups,i=t._groups,n=e.length,o=i.length,r=Math.min(n,o),a=new Array(n),s=0;s<r;++s)for(var l,h=e[s],u=i[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<n;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var n,o=t[e],r=o.length-1,a=o[r];--r>=0;)(n=o[r])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=Et);for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r){for(var a,s=i[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new ee(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var n=t[e],o=0,r=n.length;o<r;++o){var a=n[o];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var o,r=e[i],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var i=St(t);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((null==e?i.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?i.local?function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}:function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}:i.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,i){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,i)}}:function(t,e,i){return function(){this.style.setProperty(t,e,i)}})(t,e,null==i?"":i)):function(t,e){return t.style.getPropertyValue(e)||zt(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var i=Dt(t+"");if(arguments.length<2){for(var n=Ot(this.node()),o=-1,r=i.length;++o<r;)if(!n.contains(i[o]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Bt:Zt)(this,t)}}:e?function(t){return function(){Bt(this,t)}}:function(t){return function(){Zt(this,t)}})(i,e))},text:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Rt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Gt)},lower:function(){return this.each(Ht)},append:function(t){var e="function"==typeof t?t:Ut(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var i="function"==typeof t?t:Ut(t),n=null==e?Wt:"function"==typeof e?e:wt(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(Ft)},clone:function(t){return this.select(t?Yt:Vt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var n,o,r=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Qt:Jt,null==i&&(i=!1),n=0;n<a;++n)this.each(s(r[n],e,i));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(n=0,l=s[h];n<a;++n)if((o=r[n]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return $t(this,t,e)}})(t,e))}};var ie=i(0);i(29);i.d(e,"b",function(){return ne}),i.d(e,"a",function(){return oe});var ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(ie.Layer),oe=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i._options(e),i}return Object(n.a)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new ie.LatLngBounds([-90,-180],[90,180]);var t,e,i=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new ie.Point(i.x,i.y+i.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new ie.Point(i.x+i.width,i.y))}catch(t){e=[90,180]}return new ie.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(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)},e.prototype.draw=function(){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()))},e.prototype._zoomChange=function(t){var 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));var i=["translate(",this._shift.x,",",this._shift.y,") "],n=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",i.concat(n).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e,i=this;return this._svg=ie.svg(),t.addLayer(this._svg),this._rootGroup=(e=this._svg._rootGroup,"string"==typeof e?new ee([[document.querySelector(e)]],[document.documentElement]):new ee([[e]],te)).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=ie.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=ie.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,e){return e=i._undef(e)?i._zoom:e,i.map.project(ie.latLng(t),e)._subtract(i._pixelOrigin)},layerPointToLatLng:function(t,e){e=i._undef(e)?i._zoom:e;var n=ie.point(t).add(i._pixelOrigin);return i.map.unproject(n,e)},unitsPerMeter:256*Math.pow(2,i._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:i.map,layer:i,scale:1},this.projection._projectPoint=function(t,e){var n=i.projection.latLngToLayerPoint(new ie.LatLng(e,t));this.stream.point(n.x,n.y)},this.projection.pathFromGeojson=function(t,e){var i,n,r=4.5;function a(t){return t&&("function"==typeof r&&n.pointRadius(+r.apply(this,arguments)),u(t,i(n))),n.result()}return a.area=function(t){return u(t,i(A)),A.result()},a.measure=function(t){return u(t,i(mt)),mt.result()},a.bounds=function(t){return u(t,i(j)),j.result()},a.centroid=function(t){return u(t,i(rt)),rt.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new gt):new at(e=t),"function"!=typeof r&&n.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(n.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:vt({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},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(ne)},function(t,e,i){i.r(e),i.d(e,"MarkerClusterGroup",function(){return h}),i.d(e,"Draw",function(){return u});var n=i(0);for(var o in n)["GoogleMutant","MarkerClusterGroup","Draw","default"].indexOf(o)<0&&function(t){i.d(e,t,function(){return n[t]})}(o);i(11),i(16),i(17),i(22),i(23),i(25);var r=i(6);i.d(e,"GoogleMutant",function(){return r.GoogleMutant});var a=i(7);i.d(e,"BeautifyIcon",function(){return a.a});var s=i(9);i.d(e,"LeafletLayer",function(){return s.b}),i.d(e,"D3SvgOverlay",function(){return s.a});var l=i(8);i.d(e,"LeafletLayer2",function(){return l.b}),i.d(e,"HeatLayer",function(){return l.a});var h=n.MarkerClusterGroup,u=n.Draw},function(t,e,i){var n=i(1),o=i(12);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(13),a=i(14),s=i(15);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+l+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+h+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+u+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\tzoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]),t.exports=e},function(t,e,i){i.r(e),e.default="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"},function(t,e,i){i.r(e),e.default="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="},function(t,e,i){i.r(e),e.default="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="},function(t,e){!function(t,e,i){L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(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)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(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)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),n=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(n,!1)}},addVertex: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))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape: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())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove: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)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,n=e.clientY;this._startPoint.call(this,i,n)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,n=e.clientY;this._endPoint.call(this,i,n,t),this._clickHandled=null},_endPoint:function(e,i,n){if(this._mouseDownOrigin){var o=L.point(e,i).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(n.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(n.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(n.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,n=t.originalEvent;!n.touches||!n.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=n.touches[0].clientX,i=n.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},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance: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 n=this._map.latLngToContainerPoint(i.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=n.distanceTo(r)}else e=1/0;return e},_updateFinishHandler: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)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide: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))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,n,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)i=l/r,n={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(o=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(o,n)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText: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},_updateRunningMeasure:function(t,e){var i,n,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=o-(e?2:1),n=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+=n*(e?1:-1))},_getMeasurementString: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)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler: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))},_getTooltipText: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}},_getMeasurementString: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},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged: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)},_cleanUpShape: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))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(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},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown: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)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(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)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape: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))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,n=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:n.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize: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)},addHooks: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))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(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))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(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)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(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)},_drawShape: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))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,n=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var r="";n&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight: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="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,n=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=n+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(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)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers: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))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(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)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks: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))},removeHooks: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)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,n,o,r,a=this._defaultShape();for(t=0,i=a.length;t<i;t++)(n=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),n.on("contextmenu",this._onContextMenu,this),this._markers.push(n);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker: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},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker: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)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly,n=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var o=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,n),e.setLatLng(n);var r=i.options.color;i.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:r}),o&&o.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 a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick: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())},_onContextMenu: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},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),n=t.target;L.extend(n._origLatLng,i),n._middleLeft&&n._middleLeft.setLatLng(this._getMiddleLatLng(n._prev,n)),n._middleRight&&n._middleRight.setLatLng(this._getMiddleLatLng(n,n._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},_createMiddleMarker:function(t,e){var i,n,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,n=function(){a.off("touchmove",n,this);var o=e._index;a._index=o,a.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",n,this),a.off("dragend",o,this),a.off("touchmove",n,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){n.call(this),o.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",n,this).on("dragend",o,this).on("touchmove",n,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,n=i.project(t.getLatLng()),o=i.project(e.getLatLng());return i.unproject(n._add(o)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(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)},addHooks: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)))},removeHooks: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},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker: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},_bindMarker: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)},_unbindMarker: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)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag: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")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,n=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)}this._shape.fire("editstart")},_onTouchMove: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},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker: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},_onMarkerDragStart: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)},_onMarkerDragEnd: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)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),n=this._shape.getBounds().getCenter(),o=[],r=0,a=i.length;r<a;r++)e=[i[r].lat-n.lat,i[r].lng-n.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize: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})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move: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})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint: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])},_resize: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})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(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 n=this._map.mouseEventToContainerPoint(i),o=this._map.mouseEventToLayerPoint(i),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:n,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick: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)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE: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 n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var 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())}},_detectIE: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 n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,n=t.length;i<n;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,n=t.length,o=0,r=Math.PI/180;if(n>2){for(var a=0;a<n;a++)e=t[a],o+=((i=t[(a+1)%n]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(i.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),n=L.drawLocal.format&&L.drawLocal.format.numeric,o=n&&n.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=i.split(".");i=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(i=i+a+s[1])}return i},readableArea:function(e,i,n){var o,r;n=L.Util.extend({},t,n);return i?(r=["ha","m"],type=typeof i,"string"===type?r=[i]:"boolean"!==type&&(r=i),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,n.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,n.ha)+" ha":L.GeometryUtil.formattedNumber(e,n.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,n.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,n.ac)+" acres":L.GeometryUtil.formattedNumber(e,n.yd)+" yd²",o},readableDistance:function(e,i,n,o,r){var a;r=L.Util.extend({},t,r);switch(i?"string"==typeof i?i:"metric":n?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;case"yards":default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,n){return this._checkCounterclockwise(t,i,n)!==this._checkCounterclockwise(e,i,n)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,n)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,n=this._getProjectedPoints(),o=n?n.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=n[t-1],i=n[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),n=i?i.length:0,o=i?i[n-1]:null,r=n-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,n){var o,r,a=this._getProjectedPoints();n=n||0;for(var s=i;s>n;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints: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}}),L.Polygon.include({intersects:function(){var t,e,i,n,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],i=o[t-1],n=t-2,this._lineSegmentsIntersectsRange(i,e,n,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize: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},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),n=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(n||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),n=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(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)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),n=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,n++,o,r[e].title);if(n)return this._lastButtonIndex=--n,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar: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},_initModeHandler:function(t,e,i,n,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:n+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=i,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton: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 n=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,n,t.callback,t.context),e},_disposeButton: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)},_handlerActivated: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")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,n,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(i=0,n=this._actionButtons.length;i<n;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar: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)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(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)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent: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},updatePosition: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},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(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)},getModeHandlers: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}]},getActions: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}]},setOptions: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])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(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},getModeHandlers: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}]},getActions: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},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var 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))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize: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)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save: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})},_backupLayer: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())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(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}))},_enableLayerEdit:function(t){var e,i,n=t.layer||t.target||t;this._backupLayer(n),this.options.poly&&(i=L.Util.extend({},this.options.poly),n.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=n.options.color,e.fillColor=n.options.fillColor),n.options.original=L.extend({},n.options),n.options.editing=e),n instanceof L.Marker?(n.editing&&n.editing.enable(),n.dragging.enable(),n.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):n.editing.enable()},_disableLayerEdit: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()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),n=this._map.layerPointToLatLng(i);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize: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)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){var n=i(1),o=i(18);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(19),a=i(20),s=i(21);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,".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("+l+");background-image:linear-gradient(transparent,transparent),url("+h+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+u+");background-image:linear-gradient(transparent,transparent),url("+h+')}\n.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}\n.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}\n.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}\n.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}\n.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}\n.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}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);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:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.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:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]),t.exports=e},function(t,e,i){i.r(e),e.default="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=="},function(t,e,i){i.r(e),e.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHZpZXdCb3g9IjAgMCA2MDAgNjAiCiAgIGhlaWdodD0iNjAiCiAgIHdpZHRoPSI2MDAiCiAgIGlkPSJzdmc0MjI1IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlua3NjYXBlOnZlcnNpb249IjAuOTEgcjEzNzI1IgogICBzb2RpcG9kaTpkb2NuYW1lPSJzcHJpdGVzaGVldC5zdmciCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT0iL2hvbWUvZnB1Z2EvZGV2ZWxvcG1lbnQvdXBzdHJlYW0vaWNhcnRvLkxlYWZsZXQuZHJhdy9zcmMvaW1hZ2VzL3Nwcml0ZXNoZWV0LTJ4LnBuZyIKICAgaW5rc2NhcGU6ZXhwb3J0LXhkcGk9IjkwIgogICBpbmtzY2FwZTpleHBvcnQteWRwaT0iOTAiPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQyNTgiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0MjU2IiAvPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBvYmplY3R0b2xlcmFuY2U9IjEwIgogICAgIGdyaWR0b2xlcmFuY2U9IjEwIgogICAgIGd1aWRldG9sZXJhbmNlPSIxMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTkyMCIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMDU2IgogICAgIGlkPSJuYW1lZHZpZXc0MjU0IgogICAgIHNob3dncmlkPSJmYWxzZSIKICAgICBpbmtzY2FwZTp6b29tPSIxLjMxMDE4NTIiCiAgICAgaW5rc2NhcGU6Y3g9IjIzNy41NjkyOCIKICAgICBpbmtzY2FwZTpjeT0iNy4yNDE5NjIxIgogICAgIGlua3NjYXBlOndpbmRvdy14PSIxOTIwIgogICAgIGlua3NjYXBlOndpbmRvdy15PSIyNCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9InN2ZzQyMjUiIC8+CiAgPGcKICAgICBpZD0iZW5hYmxlZCIKICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgIDxnCiAgICAgICBpZD0icG9seWxpbmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAxOCwzNiAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIyOSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzNiwxOCAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAyMy4xNDIsMzkuMTQ1IC0yLjI4NSwtMi4yOSAxNiwtMTUuOTk4IDIuMjg1LDIuMjg1IHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMyIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICAgIDxwYXRoCiAgICAgICBpZD0icG9seWdvbiIKICAgICAgIGQ9Ik0gMTAwLDI0LjU2NSA5Ny45MDQsMzkuMzk1IDgzLjA3LDQyIDc2LDI4Ljc3MyA4Ni40NjMsMTggWiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJyZWN0YW5nbGUiCiAgICAgICBkPSJtIDE0MCwyMCAyMCwwIDAsMjAgLTIwLDAgeiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJjaXJjbGUiCiAgICAgICBkPSJtIDIyMSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxwYXRoCiAgICAgICBpZD0ibWFya2VyIgogICAgICAgZD0ibSAyNzAsMTkgYyAtNC45NzEsMCAtOSw0LjAyOSAtOSw5IDAsNC45NzEgNS4wMDEsMTIgOSwxNCA0LjAwMSwtMiA5LC05LjAyOSA5LC0xNCAwLC00Ljk3MSAtNC4wMjksLTkgLTksLTkgeiBtIDAsMTIuNSBjIC0yLjQ4NCwwIC00LjUsLTIuMDE0IC00LjUsLTQuNSAwLC0yLjQ4NCAyLjAxNiwtNC41IDQuNSwtNC41IDIuNDg1LDAgNC41LDIuMDE2IDQuNSw0LjUgMCwyLjQ4NiAtMi4wMTUsNC41IC00LjUsNC41IHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxnCiAgICAgICBpZD0iZWRpdCIKICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiPgogICAgICA8cGF0aAogICAgICAgICBkPSJtIDMzNywzMC4xNTYgMCwwLjQwNyAwLDUuNjA0IGMgMCwxLjY1OCAtMS4zNDQsMyAtMywzIGwgLTEwLDAgYyAtMS42NTUsMCAtMywtMS4zNDIgLTMsLTMgbCAwLC0xMCBjIDAsLTEuNjU3IDEuMzQ1LC0zIDMsLTMgbCA2LjM0NSwwIDMuMTksLTMuMTcgLTkuNTM1LDAgYyAtMy4zMTMsMCAtNiwyLjY4NyAtNiw2IGwgMCwxMCBjIDAsMy4zMTMgMi42ODcsNiA2LDYgbCAxMCwwIGMgMy4zMTQsMCA2LC0yLjY4NyA2LC02IGwgMCwtOC44MDkgLTMsMi45NjgiCiAgICAgICAgIGlkPSJwYXRoNDI0MCIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNzIsMjQuNjM3IC04Ljg5Miw4Ljg5MiAtMi44MjgsMCAwLC0yLjgyOSA4Ljg5LC04Ljg5IHoiCiAgICAgICAgIGlkPSJwYXRoNDI0MiIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNjk3LDE3LjgyNiA0LDAgMCw0IC00LDAgeiIKICAgICAgICAgdHJhbnNmb3JtPSJtYXRyaXgoLTAuNzA2OTgzMzYsLTAuNzA3MjMwMTgsMC43MDcyMzAxOCwtMC43MDY5ODMzNiw1NjcuNTU5MTcsMjc0Ljc4MjczKSIKICAgICAgICAgaWQ9InBhdGg0MjQ0IgogICAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPC9nPgogICAgPGcKICAgICAgIGlkPSJyZW1vdmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzODEsNDIgMTgsMCAwLC0xOCAtMTgsMCAwLDE4IHogbSAxNCwtMTYgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IG0gLTQsMCAyLDAgMCwxNCAtMiwwIDAsLTE0IHogbSAtNCwwIDIsMCAwLDE0IC0yLDAgMCwtMTQgeiBtIC00LDAgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IgogICAgICAgICBpZD0icGF0aDQyNDciCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Im0gMzk1LDIwIDAsLTQgLTEwLDAgMCw0IC02LDAgMCwyIDIyLDAgMCwtMiAtNiwwIHogbSAtMiwwIC02LDAgMCwtMiA2LDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDI0OSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICA8L2c+CiAgPGcKICAgICBpZD0iZGlzYWJsZWQiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIwLDApIgogICAgIHN0eWxlPSJmaWxsOiNiYmJiYmIiPgogICAgPHVzZQogICAgICAgeGxpbms6aHJlZj0iI2VkaXQiCiAgICAgICBpZD0iZWRpdC1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgICA8dXNlCiAgICAgICB4bGluazpocmVmPSIjcmVtb3ZlIgogICAgICAgaWQ9InJlbW92ZS1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgPC9nPgogIDxwYXRoCiAgICAgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJjaXJjbGUtMyIKICAgICBkPSJtIDU4MS42NTcyNSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg=="},function(t,e,i){i.r(e),e.default="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="},function(t,e,i){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):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)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind(function(){for(var d=(new Date).getTime();h<l;h++){if(r&&h%200==0){var f=(new Date).getTime()-d;if(f>a)break}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(),m=_[0]===i?_[1]:_[0];n.removeLayer(m)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var d=this._needsClustering;h<l;h++)(i=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.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 s=t.slice(),l=n;for(e=0;e<l;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;n>=0;n--){for(i=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[n]){i=!1;break}i&&t.call(e,r[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=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<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return 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)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;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(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),o[n].addObject(u,this._map.project(s.getLatLng(),n));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,r,function(r){var a,s=r._latlng,l=r._markers;for(n.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;i>=0;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,r,function(t){o.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)});r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),r=this._zoom+1,a=n.getZoom();i.length>0&&o>r;){r++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,n,o=t._markers;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,o=t._childClusters;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var o=n._markers.length-1;o>=0;o--){var r=n._markers[o];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,r;this._recursively(t,e-1,i-1,function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),o&&l===i&&o(this)),l<e||l<i)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},a=r[i]=r[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,r,a,s,l=this._grid;for(i in l)for(n in a=l[i])for(s=a[n],o=0,r=s.length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,i,n,o,r,a,s,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(o=this._grid[e])for(i=h-1;i<=h+1;i++)if(r=o[i])for(n=0,a=r.length;n<a;n++)s=r[n],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,r=0,a=null,s=[];for(i=e.length-1;i>=0;i--)n=e[i],(o=this.getDistant(n,t))>0&&(s.push(n),o>r&&(r=o,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,r=!1,a=null,s=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)&&(a=p,i=p.lat),(!1===n||p.lat<n)&&(s=p,n=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}n!==i?(c=s,u=a):(c=h,u=l);var d=[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t));return d}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,o=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,o):(o.y+=10,t=this._generatePointsCircle(e.length,o)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=o/this._2PI,a=this._2PI/t,s=[];for(r=Math.max(r,35),s.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*a,s[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return s},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,r=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)r=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=u.layerPointToLatLng(e[i]),o=new L.Polyline([p,s],_),u.addLayer(o),n._spiderLeg=o,f&&(r=o._path,a=r.getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)s=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),f&&(o=n._spiderLeg,(r=o._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,o,r,a,s=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,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(n=e._spiderLeg,o=n._path,r=o.getTotalLength()+.1,o.style.strokeDashoffset=r,n.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:s,markers:p})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i}(e)},function(t,e,i){var n=i(1),o=i(24);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\r\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\r\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\r\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\r\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\r\n}\r\n\r\n.leaflet-cluster-spider-leg {\r\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\r\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\r\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\r\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\r\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\r\n}\r\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(26);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,'.marker-cluster-small {\r\n\tbackground-color: rgba(181, 226, 140, 0.6);\r\n\t}\r\n.marker-cluster-small div {\r\n\tbackground-color: rgba(110, 204, 57, 0.6);\r\n\t}\r\n\r\n.marker-cluster-medium {\r\n\tbackground-color: rgba(241, 211, 87, 0.6);\r\n\t}\r\n.marker-cluster-medium div {\r\n\tbackground-color: rgba(240, 194, 12, 0.6);\r\n\t}\r\n\r\n.marker-cluster-large {\r\n\tbackground-color: rgba(253, 156, 115, 0.6);\r\n\t}\r\n.marker-cluster-large div {\r\n\tbackground-color: rgba(241, 128, 23, 0.6);\r\n\t}\r\n\r\n\t/* IE 6-8 fallback colors */\r\n.leaflet-oldie .marker-cluster-small {\r\n\tbackground-color: rgb(181, 226, 140);\r\n\t}\r\n.leaflet-oldie .marker-cluster-small div {\r\n\tbackground-color: rgb(110, 204, 57);\r\n\t}\r\n\r\n.leaflet-oldie .marker-cluster-medium {\r\n\tbackground-color: rgb(241, 211, 87);\r\n\t}\r\n.leaflet-oldie .marker-cluster-medium div {\r\n\tbackground-color: rgb(240, 194, 12);\r\n\t}\r\n\r\n.leaflet-oldie .marker-cluster-large {\r\n\tbackground-color: rgb(253, 156, 115);\r\n\t}\r\n.leaflet-oldie .marker-cluster-large div {\r\n\tbackground-color: rgb(241, 128, 23);\r\n}\r\n\r\n.marker-cluster {\r\n\tbackground-clip: padding-box;\r\n\tborder-radius: 20px;\r\n\t}\r\n.marker-cluster div {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tmargin-left: 5px;\r\n\tmargin-top: 5px;\r\n\r\n\ttext-align: center;\r\n\tborder-radius: 15px;\r\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\r\n\t}\r\n.marker-cluster span {\r\n\tline-height: 30px;\r\n\t}',""]),t.exports=e},function(t,e,i){var n=i(1),o=i(28);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(30);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]),t.exports=e}])},t.exports=i()}),xr=(Lr=wr)&&Lr.__esModule&&Object.prototype.hasOwnProperty.call(Lr,"default")?Lr.default:Lr,Cr=function(t){function e(e){var i=t.call(this)||this;return i._layer=new xr.FeatureGroup,i._crs=xr.CRS.EPSG3857,i._layer.__hpcc_layer=i,i}return l(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Mr=co("Albers").scale(.5),kr=co("AlbersUsaPr").scale(.5),Pr={project:function(t){var e=kr([t.lng,t.lat]);return e||(e=Mr([t.lng,t.lat])),new xr.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new xr.LatLng(0,0);var e=Mr.invert([t.x,t.y]);return new xr.LatLng(e[1],e[0])}},Ir=xr.Util.extend({},xr.CRS,{projection:Pr,transformation:new xr.Transformation(1,0,1,0),infinite:!0}),Er=function(t){function e(){var e=t.call(this)||this;return e._crs=Ir,e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new xr.LatLngBounds([20,-123],[49,-64])},e}(Cr);Er.prototype._class+=" map_AlbersLayer";var Ar=function(t){function e(){return t.call(this)||this}return l(e,t),e}(Cr);Ar.prototype._class+=" map_BlankLayer";var Tr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=Qo()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Cr);Tr.prototype._class+=" map_GMapLayer",Tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Sr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var i=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new xr.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token="+i,{attribution:'Map data © <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:i}))},e}(Cr);Sr.prototype._class+=" map_MapBoxLayer";var zr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <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"}))},e}(Cr);zr.prototype._class+=" map_MapBoxLayer";po(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Dr=function(t){function i(){var i=t.call(this)||this;return i._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",function(){i.zoomPlus()}),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",function(){i.zoomMinus()}),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",function(){i.zoomToFit()})]),i._blankLayer=new Ar,i._albersLayer=new Er,i._mapBoxLayer=new Sr,i._openStreetLayer=new zr,i._gmapLayer=new Tr,i.baseLayer(),i}return l(i,t),i.prototype.zoom=function(){return this._leafletMap.getZoom()},i.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},i.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},i.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},i.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter(function(t){return t.hasBounds()}).forEach(function(e){t?t.extend(e.getBounds()):t=e.getBounds()}),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},i.prototype.syncLayers=function(t,e,i){var n=this,o=u([],t),r=[],a=[];this._leafletMap.eachLayer(function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)}),o.forEach(function(t){t.layerEnter(n._leafletMap),t.layerUpdate(n._leafletMap)}),r.forEach(function(t){t.layerUpdate(n._leafletMap)}),a.forEach(function(t){t.layerExit(n._leafletMap)})},i.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},i.prototype.baseLayer=function(){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;case"None":default:this.map(this._blankLayer)}return this.map()},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),i.style("position","relative"),this._leafletElement=i.append("div").style("position","absolute").style("width",this.width()+"px").style("height",this.height()+"px"),this._iconBar.target(e)},i.prototype.update=function(e,i){var n=this;t.prototype.update.call(this,e,i),this._leafletElement.style("width",this.width()+"px").style("height",this.height()+"px");var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,i),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new xr.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",function(t){return n.layers().forEach(function(e){return e.zoomEnd(t)})}),this._leafletMap.on("moveend",function(t){return n.layers().forEach(function(e){return e.moveEnd(t)})}),this._leafletMap.on("viewreset",function(t){return n.layers().forEach(function(e){return e.viewReset(t)})}),this._renderCount=0),this.syncLayers(u([o],this.layers()),e,i),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady(function(){this.zoomToFit()},this),this._iconBar.visible(this.showToolbar()).render(function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left",n.width()-e.width-4+"px")})},i.prototype.exit=function(e,i){this._iconBar.target(null),t.prototype.exit.call(this,e,i)},i.prototype.render=function(e){var i=this,n=u([this.baseLayer().init()],this.layers().map(function(t){return t.init()}));return Promise.all(n).then(function(){t.prototype.render.call(i,e)}),this},i}(e.HTMLWidget);Dr.prototype._class+=" map_Leaflet",Dr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Dr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var Or=function(t){function i(i){void 0===i&&(i=!1);var n=t.call(this)||this;return n._layer=i?new xr.MarkerClusterGroup:new xr.FeatureGroup,n._layer.__hpcc_layer=n,e.Utility.SimpleSelectionMixin.call(n),n.layers([n]),n}return l(i,t),i.prototype.owner=function(t){this._owner=t},i.prototype.valid=function(){return!0},i.prototype.clear=function(){this._layer.clearLayers()},i.prototype.add=function(t){this._layer.addLayer(t)},i.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},i.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},i.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},i.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},i.prototype.hasBounds=function(){return!1},i.prototype.getBounds=function(){return this._layer.getBounds()},i.prototype.style=function(t,i){return void 0===i?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,i),this)},i.prototype.propValue=function(t,e,i){return(t<0?i:e[t])||i},i.prototype.layerEnter=function(t){t.addLayer(this._layer);var i=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(i)},i.prototype.layerUpdate=function(t){},i.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},i.prototype.zoomEnd=function(t){},i.prototype.moveEnd=function(t){},i.prototype.viewReset=function(t){},i}(Dr);Or.prototype._class+=" map_FeatureLayer",Or.prototype.mixin(e.Utility.SimpleSelectionMixin),Or.prototype.publishReset(["layers"]);var Nr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return l(e,t),e}(Or);Nr.prototype._class+=" map_ClusterLayer";var Br=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new xr.D3SvgOverlay).drawCallback(function(t,i){return e.layerUpdate(void 0,i)}),e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,i){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(Or),Zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e);var n=this.columns(),o=n.indexOf(this.latitudeColumn()),r=n.indexOf(this.longitudeColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());this.clear(),this.data().filter(function(t){return!i.omitNullLatLong()||!!t[o]&&!!t[r]}).forEach(function(t){i.add(new xr.Circle([t[o],t[r]],{color:i.propValue(a,t,i.strokeColor()),fill:!0,fillColor:i.propValue(s,t,i.fillColor()),fillOpacity:i.fillOpacity(),radius:i.radius(),origRow:t}).on("click",function(e){return i.clickHandler(e,t)}))})},e.prototype.clickHandler=function(t,e){},e}(Nr);Zr.prototype._class+=" map_Circles",Zr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("radius",50,"number","Radius (meters)"),Zr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Zr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Zr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Zr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter(function(t){return!n.omitNullLatLong()||!!t[a]&&!!t[s]}));c.enter().append("circle").merge(c).attr("cx",function(t){return i.latLngToLayerPoint(u(t)).x}).attr("cy",function(t){return i.latLngToLayerPoint(u(t)).y}).attr("r",Math.max(3/i.scale,this.radius()/i.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",function(t){return n.propValue(l,t,n.strokeColor())}).attr("stroke-width",Math.max(1/i.scale,1/i.metresPerPixel)).style("fill",function(t){return n.propValue(h,t,n.fillColor())}),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);jr.prototype._class+=" map_D3Circles",jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("radius",50,"number","Radius (meters)"),jr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),jr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),jr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});po(".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}");var Rr=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.createIcon=function(t,i,n){var o=e.hsl(i);return o.opacity=.5,new xr.DivIcon({className:"cluster-circle",iconSize:new xr.Point(40,40),html:"<div style='opacity:"+this.opacity()+";background-color:"+o.toString()+"'><div style='background-color:"+i+"'><span style='color:"+e.Palette.textColor(i)+"'>"+n(t)+"</span></div></div>"})},i.prototype.layerUpdate=function(i){var n=this;t.prototype.layerUpdate.call(this,i),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach(function(t){var e=new xr.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:n.createIcon(a(t),n._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",function(e){return n.clickHandler(e,t)});e.bindTooltip("Weight: "+a(t)),n.add(e)})},i.prototype.clickHandler=function(t,e){},i}(Or);Rr.prototype._class+=" map_ClusterCircles",Rr.prototype._palette=e.Palette.rainbow("default"),Rr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Rr.prototype._palette.switch()),Rr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Rr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Rr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Gr=function(t){function e(e,i){return t.call(this,e,h(h({},i),{onEachFeature:function(t,e){i.onEachFeature&&i.onEachFeature(t,e),function(t,e){var i=e.getLatLngs();i.forEach(function(t){t.forEach(function(t){if(Array.isArray(t)){var e=0,i=0,n=0,o=0;t.forEach(function(t){t.lat>-62&&(t.lng>165?++o:t.lng<-165&&++n,t.lng>0?++i:t.lng<0&&++e)}),n>0&&o>0&&t.forEach(function(t){t.lng>165&&e>i?t.lng-=360:t.lng<-165&&i>e&&(t.lng+=360)})}})}),e.setLatLngs(i)}(0,e)}}))||this}return l(e,t),e.prototype.addData=function(e){var i,n;if("Topology"===e.type){for(n in e.objects)e.objects.hasOwnProperty(n)&&(i=bo(e,e.objects[n]),t.prototype.addData.call(this,i));return this}return t.prototype.addData.call(this,e),this},e}(xr.GeoJSON),Hr=null,Ur=null,Wr=null,Fr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Hr&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Wr=bo((Hr=e).topology,Hr.topology.objects.states).features,Fr={},Wr)Wr[i].id&&(Fr[Hr.stateNames[Wr[i].id].code]=Wr[i]);t()})})),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Ur&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Wr=bo((Ur=e).topology,Ur.topology.objects.counties).features,Fr={},Wr)Wr[i].id&&(Fr[Wr[i].id]=Wr[i]);t()})})),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var i=new Gr(Wr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(i)}}(Or);po(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Vr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._dataMinWeight=null,i._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.hasBounds=function(){return!0},i.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new xr.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new xr.LatLngBounds([90,-180],[-90,180])},i.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var 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])})},i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),i},i.prototype.styleFeature=function(t){var 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()}},i.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},i.prototype.layerEnter=function(i){if(t.prototype.layerEnter.call(this,i),!this._svgElement){this._svgElement=e.select(i.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var n=this._svgElement.append("defs");new e.SVGGlowFilter(n,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},i.prototype.layerUpdate=function(e){var i=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Gr(this._features,{onEachFeature:function(t,e){e.on("click",function(t){return i.clickHandler(t,e,e.feature.properties.hpccID)})}}).bindTooltip(function(t){return i.tooltipHandler(t,t.feature.properties.hpccID)},{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle(function(t){return i.styleFeature(t)})},i.prototype.clickHandler=function(t,e,i){var n=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[i]),this.columns()[0],n),n},i.prototype.tooltipText=function(t,e){return e},i.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},i.prototype.click=function(t,e,i){},i}(Or);Vr.prototype._class+=" map_World",Vr.prototype._palette=e.Palette.rainbow("default"),Vr.prototype.mixin(e.Utility.SimpleSelectionMixin),Vr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Vr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Vr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Vr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Vr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Vr.prototype.publish("meshColor","black","html-color","Stroke Color"),Vr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Vr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Yr=null,qr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){Yr&&t(Yr),Ao(ko()+"/countries.json",function(e){t(Yr=e)})}).then(function(e){var i;for(var n in t._features=bo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[n].id){var o=t._features[n].id,r=null===(i=e.countryNames[o])||void 0===i?void 0:i.name;t._features[n].properties.hpccID=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},e}(Vr);function Xr(t,e){var i=t.indexOf(e);i>=0&&t.splice(i,1)}var Kr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var 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},e.prototype.save=function(){return{polylines:this._polylines.map(function(t){return t.getLatLngs()}),polygons:this._polygons.map(function(t){return t.getLatLngs()}),rectangles:this._rectangles.map(function(t){return t.getBounds()}),circles:this._circles.map(function(t){return{center:t.getLatLng(),radius:t.getRadius()}})}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map(function(t){return new xr.Polyline(t)}),this._polygons=(t.polygons||[]).map(function(t){return new xr.Polygon(t)}),this._rectangles=(t.rectangles||[]).map(function(t){return new xr.Rectangle(t)}),this._circles=(t.circles||[]).map(function(t){return new xr.Circle(t.center,{radius:t.radius})}),this._polylines.forEach(function(t){return e.add(t)}),this._polygons.forEach(function(t){return e.add(t)}),this._rectangles.forEach(function(t){return e.add(t)}),this._circles.forEach(function(t){return e.add(t)})},e.prototype.layerEnter=function(e){var i=this;t.prototype.layerEnter.call(this,e),e.on(xr.Draw.Event.CREATED,function(t){var e=t.layerType,n=t.layer;switch(e){case"polyline":i._polylines.push(n);break;case"polygon":i._polygons.push(n);break;case"rectangle":i._rectangles.push(n);break;case"circle":i._circles.push(n);break;default:alert(e)}i.add(n),i.changed("ADD",n)}),e.on(xr.Draw.Event.EDITED,function(t){t.layers.eachLayer(function(t){i.changed("UPDATE",t)})}),e.on(xr.Draw.Event.DELETED,function(t){t.layers.eachLayer(function(t){Xr(i._polylines,t),Xr(i._polygons,t),Xr(i._rectangles,t),Xr(i._circles,t),i.changed("DELETE",t)})})},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i=this.drawOptions(),n=o.hashSum(i);this._drawOptionsHash!==n&&(this._drawOptionsHash=n,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new xr.Control.Draw({position:"topleft",draw:i,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(Or);Kr.prototype._class+=" map_DrawLayer",Kr.prototype.publish("opacity",1,"number","Layer Opacity"),Kr.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Kr.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Kr.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Kr.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter(function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]}).map(function(t){return n?n.extend([t[r],t[a]]):n=new xr.LatLngBounds([t[r],t[a]]),[t[r],t[a],i.weightColumn_exists()?t[s]:.5]}),h=new xr.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return n},this.add(h)},e}(Or);Jr.prototype._class+=" map_Heat",Jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Jr.prototype.publish("opacity",.5,"number","Layer Opacity"),Jr.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),Jr.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),Jr.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),Jr.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),Jr.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var Qr=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,i){var n=this;if(t.prototype.layerUpdate.call(this,e),i){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter(function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]}).forEach(function(t){var e=new xr.Marker([t[r],t[a]],i(t)).on("click",function(i){return n.clickHandler(i,e,t)}),o=n.tooltipText(n.rowToObj(t),n.propValue(s,t,""));o&&e.bindTooltip(o,{direction:n.tooltipDirection(),offset:xr.point(n.tooltipOffsetX(),n.tooltipOffsetY())});var h=n.popupText(n.rowToObj(t),n.propValue(l,t,""));h&&e.bindPopup(h,{offset:xr.point(n.popupOffsetX(),n.popupOffsetY())}),n.add(e)}))}},e.prototype.clickHandler=function(t,e,i){var n=this._selection.click(e._icon);this._currSelRow=n?i:void 0,this.click(this.rowToObj(i),"",n)},e.prototype.click=function(t,e,i){},e}(Nr);Qr.prototype._class+=" map_Markers",Qr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Qr.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),Qr.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),Qr.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var $r=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:new xr.Icon({iconUrl:i.propValue(n,t,i.iconUrl()),iconSize:[i.iconWidth(),i.iconHeight()],iconAnchor:[i.iconAnchorX(),i.iconAnchorY()],props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);$r.prototype._class+=" map_Icons",$r.prototype.publish("iconUrl","","string","Icon URL",null),$r.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),$r.prototype.publish("iconWidth",32,"number","Icon width"),$r.prototype.publish("iconHeight",32,"number","Icon height"),$r.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),$r.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ta=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}($r);function ea(t){return[t[1],t[0]]}ta.prototype._class+=" map_ClusterIcons";var ia=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},na=function(t){return t>90?t-360:t},oa=function(t){return t<-90?t+360:t},ra=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.fixDateLine=function(t){var e,i=t.reduce(ia,[0,0]),n=i[0],o=i[1];return n&&o?t.map((e=n>o?na:oa,function(t){return[e(t[0]),t[1]]})):t},i.prototype.hasBounds=function(){return!0},i.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var i=this.cellFunc(this.polygonColumn(),[]),n=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,n);this.clear(),o.forEach(function(e){t.add(new xr.Polygon(t.fixDateLine(i(e)).map(ea),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(n(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",function(i){return t.clickHandler(i,e)}))})},i.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},i.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},i.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},i.prototype.clickHandler=function(t,e){},i}(Or);ra.prototype._class+=" map_Polygons",ra.prototype._palette=e.Palette.rainbow("default"),ra.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ra.prototype._palette.switch(),{tags:["Basic","Shared"]}),ra.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ra.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var aa=2048/Math.PI,sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t,e=this.columns(),i=e.indexOf(this.latitudeColumn()),n=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach(function(e){var r=[e[n],e[i]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r}),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||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);var r=i.latLngToLayerPoint({lat:0,lng:0}),a=co("Mercator").scale(aa).translate([r.x,r.y]),s=un().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter(function(t){return!n.isNull2(t.coordinates)}));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/i.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);sa.prototype._class+=" map_Path",sa.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),sa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var la=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),i=t.indexOf(this.longitudeColumn()),n=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach(function(t){var a=[t[i],t[e]],s=[t[o],t[n]];r.push({type:"LineString",coordinates:[a,s]})}),r},e}(sa);la.prototype._class+=" map_Lines",la.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),la.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});var ha=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns(),o=n.indexOf(this.faCharColumn()),r=n.indexOf(this.faCharColorColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:xr.BeautifyIcon({iconShape:"marker",icon:i.propValue(o,t,i.faChar()),textColor:i.propValue(r,t,i.faCharColor()),borderColor:i.propValue(a,t,i.strokeColor()),backgroundColor:i.propValue(s,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);ha.prototype._class+=" map_Pins",ha.prototype.publish("faChar","fa-circle","string","Default font awesome character"),ha.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),ha.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ha.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ha.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});var ua=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}(ha);ua.prototype._class+=" map_ClusterPins";var ca={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"]},pa={};function da(t){return pa[t]||(pa[t]={topology:void 0,nameIdx:{},codeIdx:{}}),pa[t]}var fa=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.fetchTopo=function(t){return da(t).topology?Promise.resolve(da(t).topology):new Promise(function(e,i){Ao(ko()+"/"+t+".json",function(i){da(t).topology=i,e(i)})})},e.prototype.fetchTopoIdx=function(t){for(var e in da(t).nameIdx)return Promise.resolve(da(t).nameIdx);return new Promise(function(e,i){Ao(ko()+"/"+t+"_idx.json",function(i){var n,o=da(t),r=o.nameIdx,a=o.codeIdx;null===(n=ca[t])||void 0===n||n.forEach(function(t){var e=function(e){var n=i[t][e];Array.isArray(n)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(n),1===n.length&&(r[e].code=r[e].codes[0]),n.forEach(function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),n.length<=a[t].score&&(a[t].name=e,a[t].score=n.length),a[t].names.push(e)}))};for(var n in i[t])e(n)}),e(r)})})},e.prototype.updateDataMap=function(e){var i=[],n=da(this.region()).nameIdx;return e.forEach(function(t){var e,o=null===(e=n[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach(function(e){i.push([e,t[1],t])}):i.push([t[0],t[1],t])}),t.prototype.updateDataMap.call(this,i)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then(function(e){var i=e[0];e[1];for(var n in t._features=bo(i,i.objects.PolbndA).features,t._features){var o=t._features[n].id||n;t._features[n].properties.hpccID=o}t.updateDataMap(t.data())})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i,n=this._dataMap[e],o=da(this.region()).codeIdx,r=n&&n[1]||"",a=null===(i=o[e])||void 0===i?void 0:i.names.map(function(t){var i;return(null===(i=o[e])||void 0===i?void 0:i.name)===t?"<u>"+t+"</u>":t}).join(", ");return this.tooltipText(this.rowToObj(n),"<b>"+(n&&n[2][0]||a||e)+"</b>: "+r)},e}(Vr);fa.prototype._class+=" map_Region",fa.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 _a=function(t){function i(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(i,t),i.prototype.layerUpdate=function(i){var n=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,i,function(t){var i=n.propValue(r,t,n.text()),o=n.textSize(i,n.fontFamily(),n.fontSize());return n.textFormat_exists()&&(i=e.format(n.textFormat())(i)),{icon:xr.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+n.textOffsetX(),o.height/2+n.textOffsetY()],html:'<span style="\n '+(n.fontFamily_exists()?"font-family:"+n.fontFamily()+";":"")+"\n font-size:"+n.fontSize()+'px;\n pointer-events: none;\n white-space:nowrap;\n ">'+i+"</span>",textColor:n.propValue(a,t,n.textColor()),borderColor:n.propValue(s,t,n.strokeColor()),backgroundColor:n.propValue(l,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}})},i}(Qr);_a.prototype._class+=" map_Text",_a.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),_a.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),_a.prototype.publish("text","","string","Default text"),_a.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),_a.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),_a.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),_a.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),_a.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),_a.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var ma=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new xr.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Vr),ga=null,ya={},va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ga&&t(ga),Ao(ko()+"/us-counties.json",function(e){t(ga=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[i].id){var n=t._features[i].id,o=e.countyNames[n];t._features[i].properties.hpccID=n,ya[n]=o}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+ya[e]+"</b>: "+n)},e}(ma);va.prototype._class+=" map_USCounties";var ba=null,La={},wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ba&&t(ba),Ao(ko()+"/us-states.json",function(e){t(ba=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.states).features,t._features)if(t._features[i].id){var n=e.stateNames[t._features[i].id],o=n.code,r=n.name;t._features[i].properties.hpccID=o,La[o]=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+La[e]+"</b>: "+n)},e}(ma);wa.prototype._class+=" map_USStates";var xa=Object.freeze({__proto__:null,Circles:Zr,D3Circles:jr,ClusterCircles:Rr,Countries:qr,DrawLayer:Kr,FeatureLayer:Or,ClusterLayer:Nr,D3SurfaceLayer:Br,HeatLayer:Jr,Icons:$r,ClusterIcons:ta,Leaflet:Dr,Markers:Qr,Polygons:ra,Path:sa,Lines:la,Pins:ha,ClusterPins:ua,Region:fa,Text:_a,TileLayer:Cr,USCounties:va,USStates:wa,World:Vr});t.BUILD_VERSION="2.88.0",t.CanvasPinLayer=yo,t.CanvasPins=b,t.Choropleth=Po,t.ChoroplethContinents=Oo,t.ChoroplethCounties=jo,t.ChoroplethCountries=Do,t.ChoroplethStates=Uo,t.ChoroplethStatesHeat=Wo,t.GMap=tr,t.GMapCounties=nr,t.GMapGraph=or,t.GMapHeat=rr,t.GMapLayered=ir,t.GMapPin=sr,t.GMapPinLine=hr,t.GeoHash=Fo,t.Graph=ur,t.Graticule=cr,t.Heat=pr,t.IChoropleth=dr,t.Layer=go,t.Layered=_o,t.Leaflet=xa,t.Lines=lr,t.OpenStreet=yr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.63.0",t.Pins=ar,t.TestHeatMap=vr,t.TopoJSONChoropleth=br,t.projections=ho,t.requireGoogleMap=Qo,t.requireGoogleMapTimeout=function(t){Jo=t},t.resolve=co,t.topoJsonFolder=ko,t.types=lo,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t=t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,function(t,e,i,n,o,r,a){"use strict";var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(){return(h=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function u(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||e)}function c(t,e,i,n){if(isNaN(e)||isNaN(i))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:n},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&i===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function p(t,e,i,n,o){this.node=t,this.x0=e,this.y0=i,this.x1=n,this.y1=o}function d(t){return t[0]}function f(t){return t[1]}function _(t,e,i){var n=new m(null==e?d:e,null==i?f:i,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function m(t,e,i,n,o,r){this._x=t,this._y=e,this._x0=i,this._y0=n,this._x1=o,this._y1=r,this._root=void 0}function g(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}var y=_.prototype=m.prototype;y.copy=function(){var t,e,i=new m(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return i;if(!n.length)return i._root=g(n),i;for(t=[{source:n,target:i._root=new Array(4)}];n=t.pop();)for(var o=0;o<4;++o)(e=n.source[o])&&(e.length?t.push({source:e,target:n.target[o]=new Array(4)}):n.target[o]=g(e));return i},y.add=function(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return c(this.cover(e,i),e,i,t)},y.addAll=function(t){var e,i,n,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,p=-1/0;for(i=0;i<r;++i)isNaN(n=+this._x.call(null,e=t[i]))||isNaN(o=+this._y.call(null,e))||(a[i]=n,s[i]=o,n<l&&(l=n),n>u&&(u=n),o<h&&(h=o),o>p&&(p=o));if(l>u||h>p)return this;for(this.cover(l,h).cover(u,p),i=0;i<r;++i)c(this,a[i],s[i],t[i]);return this},y.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,o=this._x1,r=this._y1;if(isNaN(i))o=(i=Math.floor(t))+1,r=(n=Math.floor(e))+1;else{for(var a,s,l=o-i,h=this._root;i>t||t>=o||n>e||e>=r;)switch(s=(e<n)<<1|t<i,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=i+l,r=n+l;break;case 1:i=o-l,r=n+l;break;case 2:o=i+l,n=r-l;break;case 3:i=o-l,n=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=o,this._y1=r,this},y.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},y.extent=function(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]]},y.find=function(t,e,i){var n,o,r,a,s,l,h,u=this._x0,c=this._y0,d=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new p(m,u,c,d,f)),null==i?i=1/0:(u=t-i,c=e-i,d=t+i,f=e+i,i*=i);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>d||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new p(m[3],g,y,a,s),new p(m[2],o,y,g,s),new p(m[1],g,r,a,y),new p(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<i){var w=Math.sqrt(i=L);u=t-w,c=e-w,d=t+w,f=e+w,n=m.data}}return n},y.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,i,n,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=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(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):e?(o?e[c]=o: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=o,this)},y.removeAll=function(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this},y.root=function(){return this._root},y.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y.visit=function(t){var e,i,n,o,r,a,s=[],l=this._root;for(l&&s.push(new p(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(n+r)/2,u=(o+a)/2;(i=l[3])&&s.push(new p(i,h,u,r,a)),(i=l[2])&&s.push(new p(i,n,u,h,a)),(i=l[1])&&s.push(new p(i,h,o,r,u)),(i=l[0])&&s.push(new p(i,n,o,h,u))}return this},y.visitAfter=function(t){var e,i=[],n=[];for(this._root&&i.push(new p(this._root,this._x0,this._y0,this._x1,this._y1));e=i.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&i.push(new p(r,a,s,u,c)),(r=o[1])&&i.push(new p(r,u,s,l,c)),(r=o[2])&&i.push(new p(r,a,c,u,h)),(r=o[3])&&i.push(new p(r,u,c,l,h))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},y.x=function(t){return arguments.length?(this._x=t,this):this._x},y.y=function(t){return arguments.length?(this._y=t,this):this._y};var v=function(){function t(t,e,i,n){this._pin_h=0,this._pin_w=0,this._pin_h=i,this._pin_w=n,this._tree=_().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,i,n){var o=[];return this._tree.visit(function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:i,top:e,bottom:n},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=i||s>=n||l<t||h<e}),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit(function(e,i,n,o,r){t.push([i,n,o-i,r-n])}),t},t}(),b=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,i){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var n=(this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this.skewedData():this.data()).map(function(t){return u([],t)}).map(function(t){return 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(n):n,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,i=this;this._overlap_count=0;var n=this.pinHeight(),o=this.pinWidth(),r=o/2,a=n/2,s=new v([[0,0],[this.size().width,this.size().height]],t,n,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map(function(t){if(!t.already_flagged){var i=e.searchRectMult(),n=t[0]-r*i,o=t[1]-a*i-8,l=t[0]+r*i,h=t[1]+a*i-8;t.overlap_arr=s.searchRect(n,o,l,h).filter(function(e){return e!==t}),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t});return l.forEach(function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(u([t],t.overlap_arr)))}),l;case"grid":for(var h=u([],t),c=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/c),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=c*m,y=p*_,b=c*(m+1),L=p*(_+1),w=s.searchRect(g,y,b,L);if(w.length>1){var x=g+c/2,C=y+p/2;h.push(M(w,x,C))}}return h}return t;function M(t,e,n){var o=t.reduce(function(t,e){return e.already_flagged=!0,t+e[2]},0);return{0:void 0!==e?e:i.useAveragePos()?t.reduce(function(t,e){return t+e[0]*e[2]},0)/o:t[0][0],1:void 0!==n?n:i.useAveragePos()?t.reduce(function(t,e){return t+e[1]*e[2]},0)/o:t[0][1],weight:t.reduce(function(t,e){return t+e[2]},0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach(function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])}))},e.prototype.draw=function(t){var e=this,i=this,n=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t){n.font=i.pinFontSize()+"px '"+i.pinFontFamily()+"'";var e=t.left+t.width/2,o=t.top+t.height/2;n.textAlign="center",n.textBaseline="middle",n.fillStyle="#000000";for(var r=0,a=n.measureText(t.icon).width;a>t.width||!i.shrinkFontToPin();)r++,n.font=i.pinFontSize()-r+"px '"+i.pinFontFamily()+"'",a=n.measureText(t.icon).width;n.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter(function(t){return t.is_cluster}).forEach(function(t){h<t.weight&&(h=t.weight)}),t.filter(function(t){return!t.already_flagged}).sort(function(t,e){return t[1]>e[1]?1:-1}).forEach(function(t){if(t.is_cluster||e.allCircles()){var i=s/2;e.useWeightedRadius()&&(i+=s*(l*t.weight/h)),(c={icon:t.weight,left:Math.floor(t[0]-i)+.5,top:Math.floor(t[1]-i-o)+.5,radius:i,arrow_height:o,arrow_width:r}).width=2*c.radius,c.height=c.width,n.fillStyle="#FFFFFF",n.strokeStyle="#000000",n.beginPath(),n.arc(c.left+c.width/2,c.top+c.height/2,c.radius,0,2*Math.PI),n.closePath(),n.fill(),n.stroke(),u(c)}else!function(t){n.fillStyle=t.fillStyle,n.strokeStyle="#000000",n.fillRect(t.left,t.top,t.width,t.height),n.strokeRect(t.left,t.top,t.width,t.height),function t(e,i){var o=e.left+e.width/2-e.arrow_width/2;var r=e.left+e.width/2;var a=e.left+e.width/2+e.arrow_width/2;var s=e.top+e.height;var l=s+e.arrow_height;var h=s;i?(n.fillStyle="#FFFFFF",n.strokeStyle="#FFFFFF",s-=2,l-=2,h-=2):(n.fillStyle="#FFFFFF",n.strokeStyle="#000000");n.beginPath();n.moveTo(o,s);n.lineTo(r,l);n.lineTo(a,h);n.lineTo(o,s);n.closePath();n.stroke();n.fill();i||t(e,!0)}(t),u(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var c})},e.prototype.skewedData=function(){var t=this,e=[],i=this.data(),n=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/n.width,s=r/n.height;return i.forEach(function(i){var n=Math.abs(i[0]-t.topLeftX()),o=Math.abs(i[1]-t.topLeftY()),r=n/a,l=o/s;e.push([r,l,i[2]])}),e},e}(e.CanvasWidget);function w(){return new x}function x(){this.reset()}b.prototype._class+=" map_CanvasPins",b.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),b.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),b.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),b.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),b.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),b.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),x.prototype={constructor:x,reset:function(){this.s=this.t=0},add:function(t){M(C,t,this.t),M(this,C.s,this.s),this.s?this.t+=C.t:this.s=C.t},valueOf:function(){return this.s}};var C=new x;function M(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var k=1e-6,P=1e-12,I=Math.PI,E=I/2,A=I/4,T=2*I,S=180/I,z=I/180,D=Math.abs,O=Math.atan,N=Math.atan2,B=Math.cos,Z=Math.ceil,j=Math.exp,R=Math.log,G=Math.pow,H=Math.sin,U=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,F=Math.tan;function V(t){return t>1?0:t<-1?I:Math.acos(t)}function Y(t){return t>1?E:t<-1?-E:Math.asin(t)}function q(t){return(t=H(t/2))*t}function X(){}function K(t,e){t&&Q.hasOwnProperty(t.type)&&Q[t.type](t,e)}var J={Feature:function(t,e){K(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)K(i[n].geometry,e)}},Q={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){$(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)$(i[n],e,0)},Polygon:function(t,e){tt(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)tt(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)K(i[n],e)}};function $(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function tt(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)$(t[i],e,1);e.polygonEnd()}function et(t,e){t&&J.hasOwnProperty(t.type)?J[t.type](t,e):K(t,e)}var it,nt,ot,rt,at,st=w(),lt=w(),ht={point:X,lineStart:X,lineEnd:X,polygonStart:function(){st.reset(),ht.lineStart=ut,ht.lineEnd=ct},polygonEnd:function(){var t=+st;lt.add(t<0?T+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){lt.add(T)}};function ut(){ht.point=pt}function ct(){dt(it,nt)}function pt(t,e){ht.point=dt,it=t,nt=e,ot=t*=z,rt=B(e=(e*=z)/2+A),at=H(e)}function dt(t,e){var i=(t*=z)-ot,n=i>=0?1:-1,o=n*i,r=B(e=(e*=z)/2+A),a=H(e),s=at*a,l=rt*r+s*B(o),h=s*n*H(o);st.add(N(h,l)),ot=t,rt=r,at=a}function ft(t){return[N(t[1],t[0]),Y(t[2])]}function _t(t){var e=t[0],i=t[1],n=B(i);return[n*B(e),n*H(e),H(i)]}function mt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function gt(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 yt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function bt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Lt,wt,xt,Ct,Mt,kt,Pt,It,Et,At,Tt,St,zt,Dt,Ot,Nt,Bt,Zt,jt,Rt,Gt,Ht,Ut,Wt,Ft,Vt,Yt=w(),qt={point:Xt,lineStart:Jt,lineEnd:Qt,polygonStart:function(){qt.point=$t,qt.lineStart=te,qt.lineEnd=ee,Yt.reset(),ht.polygonStart()},polygonEnd:function(){ht.polygonEnd(),qt.point=Xt,qt.lineStart=Jt,qt.lineEnd=Qt,st<0?(Lt=-(xt=180),wt=-(Ct=90)):Yt>k?Ct=90:Yt<-k&&(wt=-90),At[0]=Lt,At[1]=xt},sphere:function(){Lt=-(xt=180),wt=-(Ct=90)}};function Xt(t,e){Et.push(At=[Lt=t,xt=t]),e<wt&&(wt=e),e>Ct&&(Ct=e)}function Kt(t,e){var i=_t([t*z,e*z]);if(It){var n=gt(It,i),o=gt([n[1],-n[0],0],n);bt(o),o=ft(o);var r,a=t-Mt,s=a>0?1:-1,l=o[0]*S*s,h=D(a)>180;h^(s*Mt<l&&l<s*t)?(r=o[1]*S)>Ct&&(Ct=r):h^(s*Mt<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*S)<wt&&(wt=r):(e<wt&&(wt=e),e>Ct&&(Ct=e)),h?t<Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t):xt>=Lt?(t<Lt&&(Lt=t),t>xt&&(xt=t)):t>Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t)}else Et.push(At=[Lt=t,xt=t]);e<wt&&(wt=e),e>Ct&&(Ct=e),It=i,Mt=t}function Jt(){qt.point=Kt}function Qt(){At[0]=Lt,At[1]=xt,qt.point=Xt,It=null}function $t(t,e){if(It){var i=t-Mt;Yt.add(D(i)>180?i+(i>0?360:-360):i)}else kt=t,Pt=e;ht.point(t,e),Kt(t,e)}function te(){ht.lineStart()}function ee(){$t(kt,Pt),ht.lineEnd(),D(Yt)>k&&(Lt=-(xt=180)),At[0]=Lt,At[1]=xt,It=null}function ie(t,e){return(e-=t)<0?e+360:e}function ne(t,e){return t[0]-e[0]}function oe(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var re={sphere:X,point:ae,lineStart:le,lineEnd:ce,polygonStart:function(){re.lineStart=pe,re.lineEnd=de},polygonEnd:function(){re.lineStart=le,re.lineEnd=ce}};function ae(t,e){t*=z;var i=B(e*=z);se(i*B(t),i*H(t),H(e))}function se(t,e,i){zt+=(t-zt)/++Tt,Dt+=(e-Dt)/Tt,Ot+=(i-Ot)/Tt}function le(){re.point=he}function he(t,e){t*=z;var i=B(e*=z);Wt=i*B(t),Ft=i*H(t),Vt=H(e),re.point=ue,se(Wt,Ft,Vt)}function ue(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=N(W((a=Ft*r-Vt*o)*a+(a=Vt*n-Wt*r)*a+(a=Wt*o-Ft*n)*a),Wt*n+Ft*o+Vt*r);St+=a,Nt+=a*(Wt+(Wt=n)),Bt+=a*(Ft+(Ft=o)),Zt+=a*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function ce(){re.point=ae}function pe(){re.point=fe}function de(){_e(Ht,Ut),re.point=ae}function fe(t,e){Ht=t,Ut=e,t*=z,e*=z,re.point=_e;var i=B(e);Wt=i*B(t),Ft=i*H(t),Vt=H(e),se(Wt,Ft,Vt)}function _e(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=Ft*r-Vt*o,s=Vt*n-Wt*r,l=Wt*o-Ft*n,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Rt+=c*s,Gt+=c*l,St+=u,Nt+=u*(Wt+(Wt=n)),Bt+=u*(Ft+(Ft=o)),Zt+=u*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function me(t){return function(){return t}}function ge(t,e){function i(i,n){return i=t(i,n),e(i[0],i[1])}return t.invert&&e.invert&&(i.invert=function(i,n){return(i=e.invert(i,n))&&t.invert(i[0],i[1])}),i}function ye(t,e){return[D(t)>I?t+Math.round(-t/T)*T:t,e]}function ve(t,e,i){return(t%=T)?e||i?ge(Le(t),we(e,i)):Le(t):e||i?we(e,i):ye}function be(t){return function(e,i){return[(e+=t)>I?e-T:e<-I?e+T:e,i]}}function Le(t){var e=be(t);return e.invert=be(-t),e}function we(t,e){var i=B(t),n=H(t),o=B(e),r=H(e);function a(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*i+s*n;return[N(l*o-u*r,s*i-h*n),Y(u*o+l*r)]}return a.invert=function(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*i+u*n),Y(u*i-s*n)]},a}function xe(t){function e(e){return(e=t(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e}return t=ve(t[0]*z,t[1]*z,t.length>2?t[2]*z:0),e.invert=function(e){return(e=t.invert(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e},e}function Ce(t,e,i,n,o,r){if(i){var a=B(e),s=H(e),l=n*i;null==o?(o=e+n*T,r=e-l/2):(o=Me(a,o),r=Me(a,r),(n>0?o<r:o>r)&&(o+=n*T));for(var h,u=o;n>0?u>r:u<r;u-=l)h=ft([a,-s*B(u),-s*H(u)]),t.point(h[0],h[1])}}function Me(t,e){(e=_t(e))[0]-=t,bt(e);var i=V(-e[1]);return((-e[2]<0?-i:i)+T-k)%T}function ke(){var t,e=[];return{point:function(e,i,n){t.push([e,i,n])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var i=e;return e=[],t=null,i}}}function Pe(t,e){return D(t[0]-e[0])<k&&D(t[1]-e[1])<k}function Ie(t,e,i,n){this.x=t,this.z=e,this.o=i,this.e=n,this.v=!1,this.n=this.p=null}function Ee(t,e,i,n,o){var r,a,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,i,n=t[0],a=t[e];if(Pe(n,a)){if(!n[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((n=t[r])[0],n[1]);return void o.lineEnd()}a[0]+=2*k}s.push(i=new Ie(n,t,null,!0)),l.push(i.o=new Ie(n,null,i,!1)),s.push(i=new Ie(a,t,null,!1)),l.push(i.o=new Ie(a,null,i,!0))}}),s.length){for(l.sort(e),Ae(s),Ae(l),r=0,a=l.length;r<a;++r)l[r].e=i=!i;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else n(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else n(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Ae(t){if(e=t.length){for(var e,i,n=0,o=t[0];++n<e;)o.n=i=t[n],i.p=o,o=i;o.n=i=t[0],i.p=o}}ye.invert=ye;var Te=w();function Se(t){return D(t[0])<=I?t[0]:U(t[0])*((D(t[0])+I)%T-I)}function ze(t,e){var i=Se(e),n=e[1],o=H(n),r=[H(i),-B(i),0],a=0,s=0;Te.reset(),1===o?n=E+k:-1===o&&(n=-E-k);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=Se(p),f=p[1]/2+A,_=H(f),m=B(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=Se(y),b=y[1]/2+A,L=H(b),w=B(b),x=v-d,C=x>=0?1:-1,M=C*x,P=M>I,S=_*L;if(Te.add(N(S*C*H(M),m*w+S*B(M))),a+=P?x+C*T:x,P^d>=i^v>=i){var z=gt(_t(p),_t(y));bt(z);var D=gt(r,z);bt(D);var O=(P^x>=0?-1:1)*Y(D[2]);(n>O||n===O&&(z[0]||z[1]))&&(s+=P^x>=0?1:-1)}}return(a<-k||a<k&&Te<-k)^1&s}function De(t,i,n,o){return function(r){var a,s,l,h=i(r),u=ke(),c=i(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=ze(a,o);s.length?(p||(r.polygonStart(),p=!0),Ee(s,Ne,t,n,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,i){t(e,i)&&r.point(e,i)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,i,n,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(i=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((n=i[t])[0],n[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Oe))}return d}}function Oe(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-E-k:E-t[1])-((e=e.x)[0]<0?e[1]-E-k:E-e[1])}var Be=De(function(){return!0},function(t){var e,i=NaN,n=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?I:-I,l=D(r-i);D(l-I)<k?(t.point(i,n=(n+a)/2>0?E:-E),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(r,n),e=0):o!==s&&l>=I&&(D(i-o)<k&&(i-=o*k),D(r-s)<k&&(r-=s*k),n=function(t,e,i,n){var o,r,a=H(t-i);return D(a)>k?O((H(e)*(r=B(n))*H(i)-H(n)*(o=B(e))*H(t))/(o*r*a)):(e+n)/2}(i,n,r,a),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(i=r,n=a),o=s},lineEnd:function(){t.lineEnd(),i=n=NaN},clean:function(){return 2-e}}},function(t,e,i,n){var o;if(null==t)o=i*E,n.point(-I,o),n.point(0,o),n.point(I,o),n.point(I,0),n.point(I,-o),n.point(0,-o),n.point(-I,-o),n.point(-I,0),n.point(-I,o);else if(D(t[0]-e[0])>k){var r=t[0]<e[0]?I:-I;o=i*r/2,n.point(-r,o),n.point(0,o),n.point(r,o)}else n.point(e[0],e[1])},[-I,-E]);function Ze(t){var e=B(t),i=6*z,n=e>0,o=D(e)>k;function r(t,i){return B(t)*B(i)>e}function a(t,i,n){var o=[1,0,0],r=gt(_t(t),_t(i)),a=mt(r,r),s=r[0],l=a-s*s;if(!l)return!n&&t;var h=e*a/l,u=-e*s/l,c=gt(o,r),p=vt(o,h);yt(p,vt(r,u));var d=c,f=mt(p,d),_=mt(d,d),m=f*f-_*(mt(p,p)-1);if(!(m<0)){var g=W(m),y=vt(d,(-f-g)/_);if(yt(y,p),y=ft(y),!n)return y;var v,b=t[0],L=i[0],w=t[1],x=i[1];L<b&&(v=b,b=L,L=v);var C=L-b,M=D(C-I)<k;if(!M&&x<w&&(v=w,w=x,x=v),M||C<k?M?w+x>0^y[1]<(D(y[0]-b)<k?w:x):w<=y[1]&&y[1]<=x:C>I^(b<=y[0]&&y[0]<=L)){var P=vt(d,(-f+g)/_);return yt(P,p),[y,ft(P)]}}}function s(e,i){var o=n?t:I-t,r=0;return e<-o?r|=1:e>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return De(r,function(t){var e,i,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=n?_?0:s(c,p):_?s(c+(c<0?I:-I),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Pe(e,d)||Pe(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&n^_){var g;m&i||!(g=a(f,e,!0))||(u=0,n?(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)))}!_||e&&Pe(e,f)||t.point(f[0],f[1]),e=f,l=_,i=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}},function(e,n,o,r){Ce(r,t,i,o,e,n)},n?[0,-t]:[-I,t-I])}var je=1e9,Re=-je;function Ge(t,i,n,o){function r(e,r){return t<=e&&e<=n&&i<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:n,u>1?o:i)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return D(e[0]-t)<k?o>0?0:3:D(e[0]-n)<k?o>0?2:1:D(e[1]-i)<k?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var i=s(t,1),n=s(e,1);return i!==n?i-n:0===i?e[1]-t[1]:1===i?t[0]-e[0]:2===i?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=ke(),w={point:x,lineStart:function(){w.point=C,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(C(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var i=function(){for(var e=0,i=0,n=u.length;i<n;++i)for(var r,a,s=u[i],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,c=s[l],p=c[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),n=v&&i,r=(h=e.merge(h)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Ee(h,l,i,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function C(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Re,Math.min(je,_)),m=Math.max(Re,Math.min(je,m))],h=[e=Math.max(Re,Math.min(je,e)),a=Math.max(Re,Math.min(je,a))];!function(t,e,i,n,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=i-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=n-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,i,n,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Ue,We,Fe=w(),Ve={sphere:X,point:X,lineStart:function(){Ve.point=qe,Ve.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){Ve.point=Ve.lineEnd=X}function qe(t,e){He=t*=z,Ue=H(e*=z),We=B(e),Ve.point=Xe}function Xe(t,e){t*=z;var i=H(e*=z),n=B(e),o=D(t-He),r=B(o),a=n*H(o),s=We*i-Ue*n*r,l=Ue*i+We*n*r;Fe.add(N(W(a*a+s*s),l)),He=t,Ue=i,We=n}function Ke(t){return Fe.reset(),et(t,Ve),+Fe}var Je=[null,null],Qe={type:"LineString",coordinates:Je};function $e(t,e){return Je[0]=t,Je[1]=e,Ke(Qe)}var ti={Feature:function(t,e){return ii(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)if(ii(i[n].geometry,e))return!0;return!1}},ei={Sphere:function(){return!0},Point:function(t,e){return ni(t.coordinates,e)},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ni(i[n],e))return!0;return!1},LineString:function(t,e){return oi(t.coordinates,e)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(oi(i[n],e))return!0;return!1},Polygon:function(t,e){return ri(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ri(i[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)if(ii(i[n],e))return!0;return!1}};function ii(t,e){return!(!t||!ei.hasOwnProperty(t.type))&&ei[t.type](t,e)}function ni(t,e){return 0===$e(t,e)}function oi(t,e){for(var i,n,o,r=0,a=t.length;r<a;r++){if(0===(n=$e(t[r],e)))return!0;if(r>0&&(o=$e(t[r],t[r-1]))>0&&i<=o&&n<=o&&(i+n-o)*(1-Math.pow((i-n)/o,2))<P*o)return!0;i=n}return!1}function ri(t,e){return!!ze(t.map(ai),si(e))}function ai(t){return(t=t.map(si)).pop(),t}function si(t){return[t[0]*z,t[1]*z]}function li(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[t,e]})}}function hi(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[e,t]})}}function ui(){var t,i,n,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(Z(o/_)*_,n,_).map(c).concat(e.range(Z(l/m)*m,s,m).map(p)).concat(e.range(Z(i/d)*d,t,d).filter(function(t){return D(t%_)>k}).map(h)).concat(e.range(Z(a/f)*f,r,f).filter(function(t){return D(t%m)>k}).map(u))}return y.lines=function(){return v().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(n).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],o>n&&(t=o,o=n,n=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[n,s]]},y.extentMinor=function(e){return arguments.length?(i=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],i>t&&(e=i,i=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[i,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=li(a,r,90),u=hi(i,t,g),c=li(l,s,90),p=hi(o,n,g),y):g},y.extentMajor([[-180,-90+k],[180,90-k]]).extentMinor([[-180,-80-k],[180,80+k]])}function ci(t){return t}var pi,di,fi,_i,mi=w(),gi=w(),yi={point:X,lineStart:X,lineEnd:X,polygonStart:function(){yi.lineStart=vi,yi.lineEnd=wi},polygonEnd:function(){yi.lineStart=yi.lineEnd=yi.point=X,mi.add(D(gi)),gi.reset()},result:function(){var t=mi/2;return mi.reset(),t}};function vi(){yi.point=bi}function bi(t,e){yi.point=Li,pi=fi=t,di=_i=e}function Li(t,e){gi.add(_i*t-fi*e),fi=t,_i=e}function wi(){Li(pi,di)}var xi=1/0,Ci=xi,Mi=-xi,ki=Mi,Pi={point:function(t,e){t<xi&&(xi=t);t>Mi&&(Mi=t);e<Ci&&(Ci=e);e>ki&&(ki=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[xi,Ci],[Mi,ki]];return Mi=ki=-(Ci=xi=1/0),t}};var Ii,Ei,Ai,Ti,Si=0,zi=0,Di=0,Oi=0,Ni=0,Bi=0,Zi=0,ji=0,Ri=0,Gi={point:Hi,lineStart:Ui,lineEnd:Vi,polygonStart:function(){Gi.lineStart=Yi,Gi.lineEnd=qi},polygonEnd:function(){Gi.point=Hi,Gi.lineStart=Ui,Gi.lineEnd=Vi},result:function(){var t=Ri?[Zi/Ri,ji/Ri]:Bi?[Oi/Bi,Ni/Bi]:Di?[Si/Di,zi/Di]:[NaN,NaN];return Si=zi=Di=Oi=Ni=Bi=Zi=ji=Ri=0,t}};function Hi(t,e){Si+=t,zi+=e,++Di}function Ui(){Gi.point=Wi}function Wi(t,e){Gi.point=Fi,Hi(Ai=t,Ti=e)}function Fi(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Hi(Ai=t,Ti=e)}function Vi(){Gi.point=Hi}function Yi(){Gi.point=Xi}function qi(){Ki(Ii,Ei)}function Xi(t,e){Gi.point=Ki,Hi(Ii=Ai=t,Ei=Ti=e)}function Ki(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Zi+=(o=Ti*t-Ai*e)*(Ai+t),ji+=o*(Ti+e),Ri+=3*o,Hi(Ai=t,Ti=e)}function Ji(t){this._context=t}Ji.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point: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,T)}},result:X};var Qi,$i,tn,en,nn,on=w(),rn={point:X,lineStart:function(){rn.point=an},lineEnd:function(){Qi&&sn($i,tn),rn.point=X},polygonStart:function(){Qi=!0},polygonEnd:function(){Qi=null},result:function(){var t=+on;return on.reset(),t}};function an(t,e){rn.point=sn,$i=en=t,tn=nn=e}function sn(t,e){en-=t,nn-=e,on.add(W(en*en+nn*nn)),en=t,nn=e}function ln(){this._string=[]}function hn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function un(t,e){var i,n,o=4.5;function r(t){return t&&("function"==typeof o&&n.pointRadius(+o.apply(this,arguments)),et(t,i(n))),n.result()}return r.area=function(t){return et(t,i(yi)),yi.result()},r.measure=function(t){return et(t,i(rn)),rn.result()},r.bounds=function(t){return et(t,i(Pi)),Pi.result()},r.centroid=function(t){return et(t,i(Gi)),Gi.result()},r.projection=function(e){return arguments.length?(i=null==e?(t=null,ci):(t=e).stream,r):t},r.context=function(t){return arguments.length?(n=null==t?(e=null,new ln):new Ji(e=t),"function"!=typeof o&&n.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(n.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function cn(t){return function(e){var i=new pn;for(var n in t)i[n]=t[n];return i.stream=e,i}}function pn(){}function dn(t,e,i){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),et(i,t.stream(Pi)),e(Pi.result()),null!=n&&t.clipExtent(n),t}function fn(t,e,i){return dn(t,function(i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+e[0][0]+(n-r*(i[1][0]+i[0][0]))/2,s=+e[0][1]+(o-r*(i[1][1]+i[0][1]))/2;t.scale(150*r).translate([a,s])},i)}function _n(t,e,i){return fn(t,[[0,0],e],i)}function mn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][0]-i[0][0]),r=(n-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];t.scale(150*o).translate([r,a])},i)}function gn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][1]-i[0][1]),r=-o*i[0][0],a=(n-o*(i[1][1]+i[0][1]))/2;t.scale(150*o).translate([r,a])},i)}ln.prototype={_radius:4.5,_circle:hn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point: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=hn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},pn.prototype={constructor:pn,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var yn=16,vn=B(30*z);function bn(t,e){return+e?function(t,e){function i(n,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-n,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),C=Y(w/=x),M=D(D(w)-1)<k||D(r-c)<k?(r+c)/2:N(L,b),P=t(M,C),I=P[0],E=P[1],A=I-n,T=E-o,S=y*A-g*T;(S*S/v>e||D((g*A+y*T)/v-.5)>.3||a*p+s*d+l*f<vn)&&(i(n,o,r,a,s,l,I,E,M,b/=x,L/=x,w,_,m),m.point(I,E),i(I,E,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var n,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(i,n){i=t(i,n),e.point(i[0],i[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(n,o){var r=_t([n,o]),a=t(n,o);i(u,c,h,p,d,f,u=a[0],c=a[1],h=n,p=r[0],d=r[1],f=r[2],yn,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(n=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){i(u,c,h,p,d,f,o,r,n,a,s,l,yn,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return cn({point:function(e,i){e=t(e,i),this.stream.point(e[0],e[1])}})}(t)}var Ln=cn({point:function(t,e){this.stream.point(t*z,e*z)}});function wn(t,e,i,n,o,r){var a=B(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*i-a*e)/t,d=(s*e+a*i)/t;function f(t,r){return[l*(t*=n)-h*(r*=o)+e,i-h*t-l*r]}return f.invert=function(t,e){return[n*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function xn(t){return Cn(function(){return t})()}function Cn(t){var e,i,n,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Be,C=null,M=ci,k=.5;function P(t){return l(t[0]*z,t[1]*z)}function I(t){return(t=l.invert(t[0],t[1]))&&[t[0]*S,t[1]*S]}function E(){var t=wn(c,0,0,b,L,v).apply(null,e(f,_)),n=(v?wn:function(t,e,i,n,o){function r(r,a){return[e+t*(r*=n),i-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*n,(i-a)/t*o]},r})(c,p-t[0],d-t[1],b,L,v);return i=ve(m,g,y),s=ge(e,n),l=ge(i,s),a=bn(s,k),A()}function A(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Ln(function(t){return cn({point:function(e,i){var n=t(e,i);return this.stream.point(n[0],n[1])}})}(i)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,A()):x},P.postclip=function(t){return arguments.length?(M=t,C=n=o=r=null,A()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Ze(w=t*z):(w=null,Be),A()):w*S},P.clipExtent=function(t){return arguments.length?(M=null==t?(C=n=o=r=null,ci):Ge(C=+t[0][0],n=+t[0][1],o=+t[1][0],r=+t[1][1]),A()):null==C?null:[[C,n],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,E()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],E()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*z,_=t[1]%360*z,E()):[f*S,_*S]},P.rotate=function(t){return arguments.length?(m=t[0]%360*z,g=t[1]%360*z,y=t.length>2?t[2]%360*z:0,E()):[m*S,g*S,y*S]},P.angle=function(t){return arguments.length?(v=t%360*z,E()):v*S},P.reflectX=function(t){return arguments.length?(b=t?-1:1,E()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,E()):L<0},P.precision=function(t){return arguments.length?(a=bn(s,k=t*t),A()):W(k)},P.fitExtent=function(t,e){return fn(P,t,e)},P.fitSize=function(t,e){return _n(P,t,e)},P.fitWidth=function(t,e){return mn(P,t,e)},P.fitHeight=function(t,e){return gn(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&I,E()}}function Mn(t){var e=0,i=I/3,n=Cn(t),o=n(e,i);return o.parallels=function(t){return arguments.length?n(e=t[0]*z,i=t[1]*z):[e*S,i*S]},o}function kn(t,e){var i=H(t),n=(i+H(e))/2;if(D(n)<k)return function(t){var e=B(t);function i(t,i){return[t*e,H(i)/e]}return i.invert=function(t,i){return[t/e,Y(i*e)]},i}(t);var o=1+i*(2*n-i),r=W(o)/n;function a(t,e){var i=W(o-2*n*H(e))/n;return[i*H(t*=n),r-i*B(t)]}return a.invert=function(t,e){var i=r-e,a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,Y((o-(t*t+i*i)*n*n)/(2*n))]},a}function Pn(){return Mn(kn).scale(155.424).center([0,33.6442])}function In(){return Pn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function En(t){return function(e,i){var n=B(e),o=B(i),r=t(n*o);return[r*o*H(e),r*H(i)]}}function An(t){return function(e,i){var n=W(e*e+i*i),o=t(n),r=H(o),a=B(o);return[N(e*r,n*a),Y(n&&i*r/n)]}}var Tn=En(function(t){return W(2/(1+t))});Tn.invert=An(function(t){return 2*Y(t/2)});var Sn=En(function(t){return(t=V(t))&&t/H(t)});function zn(t,e){return[t,R(F((E+e)/2))]}function Dn(){return On(zn).scale(961/T)}function On(t){var e,i,n,o=xn(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=I*a(),s=o(xe(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===zn?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,i),n]]:[[h,Math.max(s[1]-r,e)],[i,Math.min(s[1]+r,n)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=i=n=null:(h=+t[0][0],e=+t[0][1],i=+t[1][0],n=+t[1][1]),u()):null==h?null:[[h,e],[i,n]]},u()}function Nn(t){return F((E+t)/2)}function Bn(t,e){var i=B(t),n=t===e?H(t):R(i/B(e))/R(Nn(e)/Nn(t)),o=i*G(Nn(t),n)/n;if(!n)return zn;function r(t,e){o>0?e<-E+k&&(e=-E+k):e>E-k&&(e=E-k);var i=o/G(Nn(e),n);return[i*H(n*t),o-i*B(n*t)]}return r.invert=function(t,e){var i=o-e,r=U(n)*W(t*t+i*i),a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,2*O(G(o/r,1/n))-E]},r}function Zn(t,e){return[t,e]}function jn(t,e){var i=B(t),n=t===e?H(t):(i-B(e))/(e-t),o=i/n+t;if(D(n)<k)return Zn;function r(t,e){var i=o-e,r=n*t;return[i*H(r),o-i*B(r)]}return r.invert=function(t,e){var i=o-e,r=N(t,D(i))*U(i);return i*n<0&&(r-=I*U(t)*U(i)),[r/n,o-U(n)*W(t*t+i*i)]},r}Sn.invert=An(function(t){return t}),zn.invert=function(t,e){return[t,2*O(j(e))-E]},Zn.invert=Zn;var Rn=1.340264,Gn=-.081106,Hn=893e-6,Un=.003796,Wn=W(3)/2;function Fn(t,e){var i=Y(Wn*H(e)),n=i*i,o=n*n*n;return[t*B(i)/(Wn*(Rn+3*Gn*n+o*(7*Hn+9*Un*n))),i*(Rn+Gn*n+o*(Hn+Un*n))]}function Vn(t,e){var i=B(e),n=B(t)*i;return[i*H(t)/n,H(e)/n]}function Yn(t,e){var i=e*e,n=i*i;return[t*(.8707-.131979*i+n*(n*(.003971*i-.001529*n)-.013791)),e*(1.007226+i*(.015085+n*(.028874*i-.044475-.005916*n)))]}function qn(t,e){return[B(e)*H(t),H(e)]}function Xn(t,e){var i=B(e),n=1+B(t)*i;return[i*H(t)/n,H(e)/n]}function Kn(t,e){return[R(F((E+e)/2)),-t]}Fn.invert=function(t,e){for(var i,n=e,o=n*n,r=o*o*o,a=0;a<12&&(r=(o=(n-=i=(n*(Rn+Gn*o+r*(Hn+Un*o))-e)/(Rn+3*Gn*o+r*(7*Hn+9*Un*o)))*n)*o*o,!(D(i)<P));++a);return[Wn*t*(Rn+3*Gn*o+r*(7*Hn+9*Un*o))/B(n),Y(H(n)/Wn)]},Vn.invert=An(O),Yn.invert=function(t,e){var i,n=e,o=25;do{var r=n*n,a=r*r;n-=i=(n*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(D(i)>k&&--o>0);return[t/(.8707+(r=n*n)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),n]},qn.invert=An(Y),Xn.invert=An(function(t){return 2*O(t)}),Kn.invert=function(t,e){return[-e,2*O(j(t))-E]};var Jn=Object.freeze({__proto__:null,geoArea:function(t){return lt.reset(),et(t,ht),2*lt},geoBounds:function(t){var e,i,n,o,r,a,s;if(Ct=xt=-(Lt=wt=1/0),Et=[],et(t,qt),i=Et.length){for(Et.sort(ne),e=1,r=[n=Et[0]];e<i;++e)oe(n,(o=Et[e])[0])||oe(n,o[1])?(ie(n[0],o[1])>ie(n[0],n[1])&&(n[1]=o[1]),ie(o[0],n[1])>ie(n[0],n[1])&&(n[0]=o[0])):r.push(n=o);for(a=-1/0,e=0,n=r[i=r.length-1];e<=i;n=o,++e)o=r[e],(s=ie(n[1],o[0]))>a&&(a=s,Lt=o[0],xt=n[1])}return Et=At=null,Lt===1/0||wt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Lt,wt],[xt,Ct]]},geoCentroid:function(t){Tt=St=zt=Dt=Ot=Nt=Bt=Zt=jt=Rt=Gt=0,et(t,re);var e=jt,i=Rt,n=Gt,o=e*e+i*i+n*n;return o<P&&(e=Nt,i=Bt,n=Zt,St<k&&(e=zt,i=Dt,n=Ot),(o=e*e+i*i+n*n)<P)?[NaN,NaN]:[N(i,e)*S,Y(n/W(o))*S]},geoCircle:function(){var t,e,i=me([0,0]),n=me(90),o=me(6),r={point:function(i,n){t.push(i=e(i,n)),i[0]*=S,i[1]*=S}};function a(){var a=i.apply(this,arguments),s=n.apply(this,arguments)*z,l=o.apply(this,arguments)*z;return t=[],e=ve(-a[0]*z,-a[1]*z,0).invert,Ce(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(i="function"==typeof t?t:me([+t[0],+t[1]]),a):i},a.radius=function(t){return arguments.length?(n="function"==typeof t?t:me(+t),a):n},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:me(+t),a):o},a},geoClipAntimeridian:Be,geoClipCircle:Ze,geoClipExtent:function(){var t,e,i,n=0,o=0,r=960,a=500;return i={stream:function(i){return t&&e===i?t:t=Ge(n,o,r,a)(e=i)},extent:function(s){return arguments.length?(n=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,i):[[n,o],[r,a]]}}},geoClipRectangle:Ge,geoContains:function(t,e){return(t&&ti.hasOwnProperty(t.type)?ti[t.type]:ii)(t,e)},geoDistance:$e,geoGraticule:ui,geoGraticule10:function(){return ui()()},geoInterpolate:function(t,e){var i=t[0]*z,n=t[1]*z,o=e[0]*z,r=e[1]*z,a=B(n),s=H(n),l=B(r),h=H(r),u=a*B(i),c=a*H(i),p=l*B(o),d=l*H(o),f=2*Y(W(q(r-n)+a*l*q(o-i))),_=H(f),m=f?function(t){var e=H(t*=f)/_,i=H(f-t)/_,n=i*u+e*p,o=i*c+e*d,r=i*s+e*h;return[N(o,n)*S,N(r,W(n*n+o*o))*S]}:function(){return[i*S,n*S]};return m.distance=f,m},geoLength:Ke,geoPath:un,geoAlbers:In,geoAlbersUsa:function(){var t,e,i,n,o,r,a=In(),s=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,i.point(e,a),r||(n.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),i=a.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?s:o>=.166&&o<.234&&n>=-.214&&n<-.115?l:a).invert(t)},u.stream=function(i){return t&&e===i?t:(n=[a.stream(e=i),s.stream(i),l.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return i=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),n=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+k,u+.12*e+k],[r-.214*e-k,u+.234*e-k]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+k,u+.166*e+k],[r-.115*e-k,u+.234*e-k]]).stream(h),c()},u.fitExtent=function(t,e){return fn(u,t,e)},u.fitSize=function(t,e){return _n(u,t,e)},u.fitWidth=function(t,e){return mn(u,t,e)},u.fitHeight=function(t,e){return gn(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return xn(Tn).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Tn,geoAzimuthalEquidistant:function(){return xn(Sn).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Sn,geoConicConformal:function(){return Mn(Bn).scale(109.5).parallels([30,30])},geoConicConformalRaw:Bn,geoConicEqualArea:Pn,geoConicEqualAreaRaw:kn,geoConicEquidistant:function(){return Mn(jn).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:jn,geoEqualEarth:function(){return xn(Fn).scale(177.158)},geoEqualEarthRaw:Fn,geoEquirectangular:function(){return xn(Zn).scale(152.63)},geoEquirectangularRaw:Zn,geoGnomonic:function(){return xn(Vn).scale(144.049).clipAngle(60)},geoGnomonicRaw:Vn,geoIdentity:function(){var t,e,i,n,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=cn({point:function(t,e){var i=v([t,e]);this.stream.point(i[0],i[1])}}),g=ci;function y(){return f=s*u,_=s*c,r=a=null,v}function v(i){var n=i[0]*f,o=i[1]*_;if(p){var r=o*t-n*e;n=n*t+o*e,o=r}return[n+l,o+h]}return v.invert=function(i){var n=i[0]-l,o=i[1]-h;if(p){var r=o*t+n*e;n=n*t-o*e,o=r}return[n/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=i=n=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=i=n=o=null,ci):Ge(d=+t[0][0],i=+t[0][1],n=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,i],[n,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(i){return arguments.length?(e=H(p=i%360*z),t=B(p),y()):p*S},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return fn(v,t,e)},v.fitSize=function(t,e){return _n(v,t,e)},v.fitWidth=function(t,e){return mn(v,t,e)},v.fitHeight=function(t,e){return gn(v,t,e)},v},geoProjection:xn,geoProjectionMutator:Cn,geoMercator:Dn,geoMercatorRaw:zn,geoNaturalEarth1:function(){return xn(Yn).scale(175.295)},geoNaturalEarth1Raw:Yn,geoOrthographic:function(){return xn(qn).scale(249.5).clipAngle(90+k)},geoOrthographicRaw:qn,geoStereographic:function(){return xn(Xn).scale(250).clipAngle(142)},geoStereographicRaw:Xn,geoTransverseMercator:function(){var t=On(Kn),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)},geoTransverseMercatorRaw:Kn,geoRotation:xe,geoStream:et,geoTransform:function(t){return{stream:cn(t)}}});function Qn(){}var $n=1/0,to=$n,eo=-$n,io=eo;var no={point:function(t,e){t<$n&&($n=t),t>eo&&(eo=t),e<to&&(to=e),e>io&&(io=e)},lineStart:Qn,lineEnd:Qn,polygonStart:Qn,polygonEnd:Qn,result:function(){var t=[[$n,to],[eo,io]];return eo=io=-(to=$n=1/0),t}};function oo(t,e,i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),et(i,t.stream(no));var a=no.result(),s=Math.min(n/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(n-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var ro,ao=function(){function t(){}return t.prototype.encode=function(e,i,n){if(void 0===n){for(var o=1;o<=12;o++){var r=this.encode(e,i,o),a=this.decode(r);if(a.lat===e&&a.lon===i)return r}n=12}if(e=Number(e),i=Number(i),n=Number(n),isNaN(e)||isNaN(i)||isNaN(n))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<n;){if(h){var _=(d+f)/2;i>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),i=e.sw.lat,n=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(i+o)/2,s=(n+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-i)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-n)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var i=!0,n=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(i){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(n+o)/2;1===c?n=d:o=d}i=!i}}return{sw:{lat:n,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,i){if(e=e.toLowerCase(),i=i.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(i))throw new Error("Invalid direction");var n=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[i][r].indexOf(n)&&""!==o&&(o=this.adjacent(o,i)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[i][r].indexOf(n))},t.prototype.neighbours=function(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")}},t.prototype.contained=function(t,e,i,n,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(i)||i>180)&&(i=180),(isNaN(n)||n<=-90)&&(n=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,i,o),s=this.encode(n,i,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function so(){var t,e,i,n,o,r,a,s=1e-6,l=In(),h=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Pn().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,i.point(e,s),a||(n.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),i=l.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?h:o>=.166&&o<.234&&n>=-.214&&n<-.115?u:o>=.204&&o<.234&&n>=.32&&n<.38?c:l).invert(t)},d.stream=function(i){return t&&e===i?t:(n=[l.stream(e=i),h.stream(i),u.stream(i),c.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return i=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),n=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return oo(d,t,e)},d.fitSize=function(t,e){return function(t,e,i){return oo(t,[[0,0],e],i)}(d,t,e)},d.scale(1070)}!function(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"}(ro||(ro={}));var lo=[],ho={};for(var uo in ro)"string"==typeof uo&&(lo.push(uo),ho[uo]="AlbersUsaPr"===uo?so:Jn["geo"+uo]);function co(t){var e=ho[t];return e?e():(console.log("Unknown projection: "+t),Dn())}function po(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}po(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var fo=2048/Math.PI,_o=function(t){function i(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return l(i,t),i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),i},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},i.prototype.update=function(i,n){t.prototype.update.call(this,i,n);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),r=this;o.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)}).merge(o).each(function(t){t.layerUpdate(r)}),o.exit().each(function(t){t.layerExit(r),t._domElement.remove()}).remove(),o.order(),this.onZoomed()},i.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},i.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),i=this;e.each(function(t){t.layerZoomed(i)})},i.prototype.preRender=function(t){return Promise.all(this.layers().filter(function(t){return t.visible()}).map(function(t){return t.layerPreRender()}))},i.prototype.render=function(t){var i=this;return this.preRender().then(function(){e.SVGZoomWidget.prototype.render.call(i,function(e){i._layersTarget&&(i._renderCount&&i._autoScaleOnNextRender||i._prevAutoScaleMode!==i.autoScaleMode())?(i._prevAutoScaleMode=i.autoScaleMode(),i._autoScaleOnNextRender=!1,i.autoScale(),t&&t(e)):t&&t(e)})}),this},i.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},i.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},i.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},i}(e.SVGZoomWidget);_o.prototype._class+=" map_Layered",_o.prototype.publish("projection",null,"set","Map projection type",lo),_o.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),_o.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),_o.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),_o.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),_o.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var mo=_o.prototype.projection;_o.prototype.projection=function(t){var e=mo.apply(this,arguments);if(arguments.length){switch(this._d3GeoProjection=co(t).scale(fo).translate([0,0]),t){case"orthographic":this._d3GeoProjection.clipAngle(90).rotate([0,0])}this._d3GeoPath=un().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var go=function(t){function e(){var e=t.call(this)||this;return i.ITooltip.call(e),e}return l(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,i){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,i){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,i)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,i=arguments;return this.layerPreRender().then(function(){_o.prototype.render.apply(e,i)}),this},e.prototype.layerZoomed=function(t){},e}(_o);go.prototype._class+=" map_Layer",go.prototype.implements(i.ITooltip.prototype);var yo=function(t){function e(){var e=t.call(this)||this;return e.pins=new b,e}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.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())},e.prototype.layerUpdate=function(t){go.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)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),n=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map(function(o){var r=e?o[e.idx]:o[0],a=i?o[i.idx]:o[1],s=n?o[n.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]}):[]).render()},e}(go);function vo(t){return t}function bo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return Lo(t,e)})}:Lo(t,e)}function Lo(t,e){var i=e.id,n=e.bbox,o=null==e.properties?{}:e.properties,r=wo(t,e);return null==i&&null==n?{type:"Feature",properties:o,geometry:r}:null==n?{type:"Feature",id:i,properties:o,geometry:r}:{type:"Feature",id:i,bbox:n,properties:o,geometry:r}}function wo(t,e){var i=function(t){if(null==t)return vo;var e,i,n=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=i=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*n+r,u[1]=(i+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),n=t.arcs;function o(t,e){e.length&&e.pop();for(var o=n[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(i(o[r],r));t<0&&function(t,e){for(var i,n=t.length,o=n-e;o<--n;)i=t[o],t[o++]=t[n],t[n]=i}(e,a)}function r(t){return i(t)}function a(t){for(var e=[],i=0,n=t.length;i<n;++i)o(t[i],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var i,n=e.type;switch(n){case"GeometryCollection":return{type:n,geometries:e.geometries.map(t)};case"Point":i=r(e.coordinates);break;case"MultiPoint":i=e.coordinates.map(r);break;case"LineString":i=a(e.arcs);break;case"MultiLineString":i=e.arcs.map(a);break;case"Polygon":i=l(e.arcs);break;case"MultiPolygon":i=e.arcs.map(l);break;default:return null}return{type:n,coordinates:i}}(e)}function xo(t,e){var i={},n={},o={},r=[],a=-1;function s(t,e){for(var n in t){var o=t[n];delete e[o.start],delete o.start,delete o.end,o.forEach(function(t){i[t<0?~t:t]=1}),r.push(o)}}return e.forEach(function(i,n){var o,r=t.arcs[i<0?~i:i];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=i,e[n]=o)}),e.forEach(function(e){var i,r,a=function(e){var i,n=t.arcs[e<0?~e:e],o=n[0];t.transform?(i=[0,0],n.forEach(function(t){i[0]+=t[0],i[1]+=t[1]})):i=n[n.length-1];return e<0?[i,o]:[o,i]}(e),s=a[0],l=a[1];if(i=o[s])if(delete o[i.end],i.push(e),i.end=l,r=n[l]){delete n[r.start];var h=r===i?i:i.concat(r);n[h.start=i.start]=o[h.end=r.end]=h}else n[i.start]=o[i.end]=i;else if(i=n[l])if(delete n[i.start],i.unshift(e),i.start=s,r=o[s]){delete o[r.end];var u=r===i?i:r.concat(i);n[u.start=r.start]=o[u.end=i.end]=u}else n[i.start]=o[i.end]=i;else n[(i=[e]).start=s]=o[i.end=l]=i}),s(o,n),s(n,o),e.forEach(function(t){i[t<0?~t:t]||r.push([t])}),r}function Co(t){return wo(t,function(t,e,i){var n,o,r;if(arguments.length>1)n=function(t,e,i){var n,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:n})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==i?function(t){o.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}(0,e,i);else for(o=0,n=new Array(r=t.arcs.length);o<r;++o)n[o]=o;return{type:"MultiLineString",arcs:xo(t,n)}}.apply(this,arguments))}yo.prototype._class+=" map_CanvasPinLayer",yo.prototype.publishProxy("clusterMode","pins","clusterMode"),yo.prototype.publishProxy("allCircles","pins","allCircles"),yo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),yo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),yo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),yo.prototype.publishProxy("enableClustering","pins","enableClustering"),yo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),yo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),yo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),yo.prototype.publishProxy("pinHeight","pins","pinHeight"),yo.prototype.publishProxy("pinWidth","pins","pinWidth"),yo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),yo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),yo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),yo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),yo.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});po(".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}");var Mo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function ko(t){if(!arguments.length)return Mo;var e=Mo;return Mo=t,e}var Po=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.data=function(t){var e=go.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var i=this;this.data().forEach(function(t){i._dataMap[t[0]]=t,(!i._dataMinWeight||t[1]<i._dataMinWeight)&&(i._dataMinWeight=t[1]),(!i._dataMaxWeight||t[1]>i._dataMaxWeight)&&(i._dataMaxWeight=t[1])})}return e},i.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},i.prototype.layerEnter=function(t,e,i){go.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")},i.prototype.layerUpdate=function(t,e){if(go.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(Co(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())},i.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},i.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":.5/e.zoomScale()+"px")},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);Po.prototype._class+=" map_Choropleth",Po.prototype.mixin(e.Utility.SimpleSelectionMixin),Po.prototype._palette=e.Palette.rainbow("default"),Po.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Po.prototype._palette.switch(),{tags:["Basic","Shared"]}),Po.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Po.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Po.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Po.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Po.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Po.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Po.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Eo,Ao=(Io="application/json",Eo=function(t){return JSON.parse(t.responseText)},function(t,i){var n=function(t,i){var n,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,i=h.status;if(!i&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||i>=200&&i<300||304===i){if(r)try{e=r.call(n,h)}catch(t){return void s.call("error",n,t)}else e=h;s.call("load",n,e)}else s.call("error",n,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in h||!/^(http(s)?:)?\/\//.test(t)||(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),n)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",n):o},responseType:function(t){return arguments.length?(a=t,n):a},timeout:function(t){return arguments.length?(p=+t,n):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return r=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,r){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!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof i&&(r=i,i=null),null!=r&&1===r.length&&(r=function(t){return function(e,i){t(null==e?i:null)}}(r)),null!=r&&n.on("error",r).on("load",function(t){r(null,t)}),s.call("beforesend",n,h),h.send(null==i?null:i),n},abort:function(){return h.abort(),n},on:function(){var t=s.on.apply(s,arguments);return t===s?n:t}},null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}(t).mimeType(Io).response(Eo);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}),To=null,So=null,zo=null,Do=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=To.topology,this._choroTopologyObjectsCountries=To.topology.objects.countries,this._choroTopologyObjectsLand=To.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){return o.tooltipFormat({label:t[0],value:t[1]})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(zo[e[0]]);return i||console.log("Unknown Country: "+e),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){To&&t(),Ao(ko()+"/countries.json",function(e){for(var i in So=bo((To=e).topology,To.topology.objects.countries).features,zo={},So)So[i].id&&To.countryNames[So[i].id]&&(zo[To.countryNames[So[i].id].name]=So[i]);t()})})),this._topoJsonPromise},i}(Po);Do.prototype._class+=" map_ChoroplethCountries";var Oo=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){Do.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Do);Oo.prototype._class+=" map_ChoroplethContinents";var No=null,Bo=null,Zo=null,jo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=No.topology,this._choroTopologyObjects=No.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=t[0];return o.tooltipFormat({label:No.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(Zo[e[0]]);return i||console.log("Unknown US County: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){No&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Bo=bo((No=e).topology,No.topology.objects.counties).features,Zo={},Bo)Bo[i].id&&(Zo[Bo[i].id]=Bo[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],i}(Po);jo.prototype._class+=" map_ChoroplethCounties",jo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var Ro=null,Go=null,Ho=null,Uo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ro.topology,this._choroTopologyObjects=Ro.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=Ho[t[0]].id;return o.tooltipFormat({label:Ro.stateNames[e].name,value:t[1]})})},i.prototype.layerUpdate=function(t){Po.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]});var 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){var i=t._d3GeoPath(Ho[e[0]]);return i||console.log("Unknown US State: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){Ro&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Go=bo((Ro=e).topology,Ro.topology.objects.states).features,Ho={},Go)Go[i].id&&(Ho[Ro.stateNames[Go[i].id].code]=Go[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],i}(Po);Uo.prototype._class+=" map_ChoroplethStates";var Wo=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);Wo.prototype._class+=" map_ChoroplethStatesHeat";po(".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}");var Fo=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.data=function(t){var e=go.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},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this.geohash=new ao,this._geoHashTransform=i.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},i.prototype.layerUpdate=function(t){go.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]});var 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){var n=e.geohash.bounds(i[0]),o={type:"LineString",coordinates:[[n.sw.lon,n.ne.lat],[n.ne.lon,n.ne.lat],[n.ne.lon,n.sw.lat],[n.sw.lon,n.sw.lat]]};return t._d3GeoPath(o)}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.geoHashPaths.exit().remove()},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);function Vo(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}Fo.prototype._class+=" map_GeoHash",Fo.prototype._palette=e.Palette.rainbow("default"),Fo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Fo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Fo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Fo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Fo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Fo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Fo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var Yo=Vo(function(t,e){!function(e,i){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t=null,e=null,i=!1,n=[],o=[],r=null,a={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};a.VERSION="3.18",a.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",a._googleMockApiObject={},a.load=function(t){null===e?!0===i?t&&n.push(t):(i=!0,window[a.WINDOW_CALLBACK_NAME]=function(){s(t)},a.createLoader()):t&&t(e)},a.createLoader=function(){(t=document.createElement("script")).type="text/javascript",t.src=a.createUrl(),document.body.appendChild(t)},a.isLoaded=function(){return null!==e},a.createUrl=function(){var t=a.URL;return t+="?callback="+a.WINDOW_CALLBACK_NAME,a.KEY&&(t+="&key="+a.KEY),a.LIBRARIES.length>0&&(t+="&libraries="+a.LIBRARIES.join(",")),a.CLIENT&&(t+="&client="+a.CLIENT+"&v="+a.VERSION),a.CHANNEL&&(t+="&channel="+a.CHANNEL),a.LANGUAGE&&(t+="&language="+a.LANGUAGE),a.REGION&&(t+="®ion="+a.REGION),t},a.release=function(s){var l=function(){a.KEY=null,a.LIBRARIES=[],a.CLIENT=null,a.CHANNEL=null,a.LANGUAGE=null,a.REGION=null,a.VERSION="3.18",e=null,i=!1,n=[],o=[],void 0!==window.google&&delete window.google,void 0!==window[a.WINDOW_CALLBACK_NAME]&&delete window[a.WINDOW_CALLBACK_NAME],null!==r&&(a.createLoader=r,r=null),null!==t&&(t.parentElement.removeChild(t),t=null),s&&s()};i?a.load(function(){l()}):l()},a.onLoad=function(t){o.push(t)},a.makeMock=function(){r=a.createLoader,a.createLoader=function(){window.google=a._googleMockApiObject,window[a.WINDOW_CALLBACK_NAME]()}};var s=function(t){var r;for(i=!1,null===e&&(e=window.google),r=0;r<o.length;r++)o[r](e);for(t&&t(e),r=0;r<n.length;r++)n[r](e);n=[]};return a}()}()}),qo=Object.freeze(Object.assign(Object.create(null),Yo,{default:Yo,__moduleExports:Yo}));po(".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}");var Xo=Yo||qo;t.google=null;var Ko,Jo=15e3;function Qo(e){return Ko||(Ko=o.promiseTimeout(Jo,new Promise(function(i,n){if(t.google)i();else if(e)t.google=e,i();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{Xo.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",Xo.LIBRARIES=["geometry","drawing"],Xo.load(function(e){t.google=e,i()})}catch(t){console.warn("Failed to initialize Google Map API: "+t.message),i()}}})).catch(function(t){console.warn("Timed out initializing Google Map API after "+Jo+"ms.")})),Ko}var $o=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map(function(e){return t._saveShape(e)})},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},i={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var i=t.getPath();e.vertices=[];for(var n=0;n<i.length;n++)e.vertices.push(i.getAt(n))},polyline:function(t){i.polygon(t)}};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},e.prototype._deserializeShapes=function(e){for(var i=JSON.parse(e),n=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,i){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,center:e.pos,radius:e.radius})},rectangle:function(e,i){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,i){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,paths:e.vertices})},polyline:function(e,i){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,path:e.vertices})}},h=0;h<i.length;h++){var u=l[i[h].type](i[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:i[h].type,overlay:u})}},e}(),tr=function(i){function o(){var e=i.call(this)||this;e._tag="div";var o=e;function r(e,i,n){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(i,n)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new $o(e),e._worldSurface=new n.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new n.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return l(o,i),o.prototype.data=function(t){return e.HTMLWidget.prototype.data.apply(this,arguments)},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID;default:return t.google.maps.MapTypeId.ROADMAP}},o.prototype.getMapOptions=function(){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()}},o.prototype.size=function(i){var n=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",i.width+"px").style("height",i.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),n},o.prototype.enter=function(n,o){i.prototype.enter.call(this,n,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,i,n){function o(e,i,n){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=i,this._viewportSurface=n,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",function(){o.draw()}),t.google.maps.event.addListener(e,"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 o.prototype=t.google.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(){var e=this.getProjection();if(e){for(var i=this._map.getBounds(),n=e.fromLatLngToDivPixel(i.getCenter()),o=e.fromLatLngToDivPixel(i.getSouthWest()),r=e.fromLatLngToDivPixel(i.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>n.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>n.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,i,n)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()}),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()}),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,i){var n=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},function(e,i){if(i===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;n._googleMap.fitBounds(o),n.streetView()&&n.useComputedHeading()&&n.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else n.statusError({data:e,status:i})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){o.prototype.onDrawingComplete.apply(n,arguments)})):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,n=arguments;return Qo().then(function(){i.prototype.render.apply(e,n)}),this},o.prototype.streetViewAt=function(e,i){void 0===i&&(i=1e3);var n=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:i,source:o},function(i,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:n._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(i.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));n._googleMapPanorama.setPano(i.location.pano),n._googleMapPanorama.setPov({heading:a,pitch:0}),n.showStreetViewMarker()||r.setVisible(!1),n._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(n._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))})}else n.statusError({data:i,status:o})})},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=e.map(this._circleMap.keys(),function(t){return t});this.data().forEach(function(e){n.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?i.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&n.set(t(e),!0)},this),i.forEach(function(e){var i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);var o=this;n.each(function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)})},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=[],o=e.map(this._pinMap.keys(),function(t){return t});this.data().forEach(function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?i.push(e):e[2]&&this._pinMap.has(t(e))?n.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)},this),i.forEach(function(e){var i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),n.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);var r=this;o.each(function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)})},o.prototype.createIcon=function(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}},o.prototype.createMarker=function(e,i,n){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,i),animation:t.google.maps.Animation.DROP,title:n.title||"",icon:this.createIcon(n),map:this._googleMap})},o.prototype.createCircle=function(e,i,n){return n.radius=n.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,i),radius:16093*n.radius/10,fillColor:n.fillColor||"red",strokeColor:n.strokeColor||n.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,i){if(!this._renderCount)return this;i=i||this.singleZoomToMaxZoom();var n=0,o=new t.google.maps.LatLngBounds;switch(e.forEach(function(e){var i=new t.google.maps.LatLng(e[0],e[1]);o.extend(i),++n}),n){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(i);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var i=e.overlay;i.__hpcc_type=e.type,this._userShapes.add(i);var n=this,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)}),t.google.maps.event.addListener(i,"click",function(t){return n.userShapeSelection(i),t&&!0===o&&(n.deleteUserShape(i),n.drawingState(JSON.stringify(n._userShapes.save()))),!1}),this.userShapeSelection(i),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.log("Data not found for this location.")},o}(e.HTMLWidget);tr.prototype._class+=" map_GMap",tr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),tr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),tr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),tr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),tr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),tr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),tr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),tr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),tr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),tr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),tr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),tr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),tr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),tr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),tr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),tr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),tr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var er=function(t){function e(e,i){var n=t.call(this)||this;return n.gmap=e,n.surface=i,n.autoScaleMode("none"),n.zoomable(!1).zoomDuration(10),n}return l(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){var n=i.getProjection();if(n){var o=new window.google.maps.LatLng(0,0),r=n.fromLatLngToDivPixel(o),a=i.surface.widgetX(),s=i.surface.widgetY(),l=[r.x-a,r.y-s],h=i.gmap._googleMap.getZoom();i.zoomTo(l,1/16*(1<<h),0)}e&&e(t)}),this},e}(_o),ir=function(e){function i(){var t=e.call(this)||this;return t.layered=new er(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return l(i,e),i.prototype.invert=function(t,e){return this.layered.invert(t,e)},i.prototype.rproject=function(e,i){var n=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,i));return{lat:n.lat(),lng:n.lng()}},i.prototype.updateCircles=function(){},i.prototype.updatePins=function(){},i.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},i.prototype.render=function(t){var i=this;return e.prototype.render.call(this,function(e){i.layered.preRender().then(function(){i.layered.render(function(e){t&&t(e)})})})},i}(tr);ir.prototype._class+=" map_GMapLayered";var nr=function(t){function e(){var e=t.call(this)||this,i=e;return e._counties=(new jo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",function(t,e,n){i.click(t,e,n)}).on("dblclick",function(t,e,n){i.dblclick(t,e,n)}),e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._counties])},e.prototype.update=function(e,i){this._counties.data(this.data()),t.prototype.update.call(this,e,i),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){if(console.log("as:"+i.autoScale()),i._renderCount>1&&i.autoScale()){var n=i._counties.getDataBounds();if(n.x&&n.y&&(!i._prevBounds||i._prevBounds.x!==n.x||i._prevBounds.y!==n.y||i._prevBounds.width!==n.width||i._prevBounds.height!==n.height)){i._prevBounds=n;var o=i.invert(n.x,n.y),r=i.invert(n.x+n.width,n.y+n.height);o&&r&&i.zoomTo([[o[1],o[0]],[r[1],r[0]]])}}e&&e(t)})},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);nr.prototype._class+=" map_GMapCounties",nr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var or=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var i=(new r.Graph).layout("None").zoomable(!1),n=i.render,o=this;i.render=function(t){var i=[],a=[],s=null;return o.data().forEach(function(t){var n=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(n);i.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l}),this.data({vertices:i,edges:a}),n.apply(this,arguments)},this._viewportSurface.widget(i)},i}(tr);or.prototype._class+=" map_GMapGraph";var rr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,i=e.render,n=this;e.render=function(t){return this.data(n.data().map(function(t){var e=n._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]})),i.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(tr);rr.prototype._class+=" map_GMapHeat";po(".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}");var ar=function(t){function i(){var i=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(i),i._geohash=new ao,i}return l(i,t),i.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),i=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter(function(t){var e=i?t[i.idx]:t[0],r=n?t[n.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r}).map(function(o,r){var a={idx:r,lat:i?o[i.idx]:o[0],long:n?o[n.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a},this)},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this._pinsTransform=i,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})},i.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],function(t){return t.idx});var i=this,n=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){i.click(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("dblclick",function(t){i.dblclick(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("mouseover",function(t){e.Platform.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.show.apply(this,arguments)}).each(function(t){var i=e.select(this);i.append("path").attr("class","data"),i.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);n.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:""});var o=this.svgPinPath();n.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:i.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:i.fillColor()}),this.pinsPaths.exit().remove()},i.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",function(e){var i=t.project(e.lat,e.long);return i||(i=[0,0]),"translate("+i[0]+", "+i[1]+")scale("+1/t.zoomScale()+")"})},i.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},i.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},i.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*i-o)/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"+-r+"l"+-o/2+","+n+"l"+-o/2+","+-n+"h"+-r+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=-e/2;return"M"+-t/2+","+(n+=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"+(2*i-t)+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),i=e/2,n=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-i+" "+n+", "+(e+i)+" "+n+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},i.prototype.circlePath=function(){var 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"},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);ar.prototype._class+=" map_Pins",ar.prototype.mixin(e.Utility.SimpleSelectionMixin),ar.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),ar.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),ar.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),ar.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),ar.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),ar.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),ar.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),ar.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),ar.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),ar.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),ar.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var sr=function(t){function e(){var e=t.call(this)||this,i=e;return e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n),i.clickStreetView(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.dblclick(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map(function(e){var 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)},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),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]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.clickStreetView=function(t,e,i){this.streetViewOnClick()&&this.streetViewAt({lat:+t[this.latitudeColumn()],lng:+t[this.longitudeColumn()]})},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);sr.prototype._class+=" map_GMapPin",sr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),sr.prototype.publishProxy("pinColor","_pins","fillColor"),sr.prototype.publishProxy("pinType","_pins","pinType"),sr.prototype.publishProxy("pinWidth","_pins","pinWidth"),sr.prototype.publishProxy("pinHeight","_pins","pinHeight"),sr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),sr.prototype.publishProxy("pinRadius","_pins","pinRadius"),sr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),sr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),sr.prototype.publishProxy("textBaseline","_pins","textBaseline"),sr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),sr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),sr.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),sr.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),sr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");po(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var lr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.data=function(t){var e=go.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},e.prototype.layerEnter=function(t,e,i){go.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")},e.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var 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()},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(go);lr.prototype._class+=" map_Lines",lr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var hr=function(t){function e(){var e=t.call(this)||this,i=e;return e._lines=new lr,e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map(function(e){var 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){var 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)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._lines,this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),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]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);hr.prototype._class+=" map_GMapPinLine",hr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),hr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),hr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toPinColor","red","html-color","To Pin Color"),hr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});po(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var ur=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return l(e,t),e.prototype.importJSON=function(t){var e=ar.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i.long,i.lat],[t.long,t.lat]]}),i=t.eol?null:t},this)}return e},e.prototype.data=function(t){var e=ar.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i[1],i[0]],[t[1],t[0]]]}),i=t},this)}return e},e.prototype.layerEnter=function(t,e,i){ar.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")},e.prototype.layerUpdate=function(t){ar.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var 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()},e.prototype.layerZoomed=function(t){ar.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(ar);ur.prototype._class+=" map_Graph";po(".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}");var cr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),i}return l(i,t),i.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._graticule=ui(),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")},i.prototype.layerUpdate=function(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())},i.prototype.layerExit=function(t){delete this._prevProjection},i}(go);cr.prototype._class+=" map_Graticule",cr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),cr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),cr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");po(".map_Heat{//pointer-events:none}.map_Heat canvas{pointer-events:none}");var pr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.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 a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){go.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)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map(function(n){var o=e?n[e.idx]:n[0],r=i?n[i.idx]:n[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],n[4]||.5]}):[]).render()},e}(go);function dr(){}function fr(t){return t.k}function _r(t){return[t.x,t.y]}function mr(t){return function(){return t}}pr.prototype._class+=" map_Heat",pr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype._palette=e.Palette.rainbow("default"),dr.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)};po(".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}");var gr=4096,yr=function(t){function i(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return l(i,t),i.prototype.layerEnter=function(t,e,n){go.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,4*gr]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(i._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},i.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,i=960,n=500,o=!0,r=!0,a=256,s=fr,l=_r,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((i-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((n-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,i=+o[0],n=+o[1],u):[i-t,n-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],i=+o[1][0],n=+o[1][1],u):[[t,e],[i,n]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:mr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:mr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().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(i._copyrightText):this._copyright.text(""),this.layerZoomed(t)},i.prototype.layerZoomed=function(t){var i=t.zoomScale(),n=t.zoomTranslate(),o=this._tile.scale(i*gr).translate(n)(),r=o.scale/i,a=(o.translate[0],o.scale,o.translate[1],o.scale,Math.round(1e3*r));this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],function(t){return t}),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate("+-gr/2+","+-gr/2+") scale("+t/256+")"}(r)).each(function(t){console.log(t)}).merge(s);s.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){e.select(this).selectAll(".image").attr("xlink:href",null)}).remove(),l.selectAll(".image").data(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"}).each(function(t){console.log("http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png")}).transition().duration(500).style("opacity",1)},i._copyrightText="© OpenStreetMap contributors",i}(go);yr.prototype._class+=" map_OpenStreet",yr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var vr=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);function br(){Po.call(this),this.projection("Mercator")}vr.prototype._class+=" map_TestHeatMap",br.prototype=Object.create(Po.prototype),br.prototype.constructor=br,br.prototype._class+=" map_TopoJSONChoropleth",br.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"]),br.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var 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]})})},br.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments);var e=[],i=this;this.data().forEach(function(t){if(isNaN(t[0]))for(var n in i._choroTopologyIndex)for(var o in i._choroTopologyIndex[n])o===t[0]&&i._choroTopologyIndex[n][o].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){var n=t._d3GeoPath(i._choroTopologyFeatures[e[0]]);return n||console.log("Unknown Country: "+e),n}).style("fill",function(t){return i._palette(t[1],i._dataMinWeight,i._dataMaxWeight)}),this.choroPaths.exit().remove()},br.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise(function(e,i){Ao(ko()+"/"+t.region()+".json",function(i){function n(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=bo(t._choroTopology,t._choroTopologyObjects).features,Ao(ko()+"/"+t.region()+"_idx.json",n).on("error",function(t){n({})})})})}return this._topoJsonPromise};var Lr,wr=Vo(function(t,e){var i;window,i=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=10)}([function(t,e,i){!function(t){var e=Object.freeze;function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var r=0;function a(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function s(t,e,i){var n,o,r,a;return a=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function l(t,e,i){var n=e[1],o=e[0],r=n-o;return t===n&&i?t:((t-o)%r+r)%r+o}function h(){return!1}function u(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_-]+) *\}/g;function m(t,e){return t.replace(_,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var C=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,i){if(!i||C!==x)return C.call(window,o(t,e));t.call(e)}function P(t){t&&M.call(window,t)}var I=(Object.freeze||Object)({freeze:e,extend:i,create:n,bind:o,lastId:r,stamp:a,throttle:s,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:p,setOptions:d,getParamString:f,template:m,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:C,cancelFn:M,requestAnimFrame:k,cancelAnimFrame:P});function E(){}E.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=n(o);for(var a in r.constructor=e,e.prototype=r,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(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)}}(t.includes),i.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=i(n(r.options),t.options)),i(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},E.include=function(t){return i(this.prototype,t),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var A={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},r=n,a=0,s=r.length;a<s;a++)if(r[a].fn===e&&r[a].ctx===i)return;r.push(o)},_off:function(t,e,i){var n,o,r;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,r=n.length;o<r;o++){var a=n[o];if(a.ctx===i&&a.fn===e)return a.fn=h,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,r=n.length;o<r;o++)n[o].fn=h;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var r=o(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var T=E.extend(A);function S(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof S?t:g(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,i)}function O(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof O?t:new O(t,e)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return t instanceof B?t:new B(t,e)}function j(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 R(t,e,i){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(t){return t=D(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof S?D(t):N(t))instanceof O?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>e.x&&n.x<i.x,a=o.y>e.y&&n.y<i.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof B))return t?this.extend(R(t)||Z(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new B(new j(e.lat-n,e.lng-o),new j(i.lat+n,i.lng+o))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?R(t):Z(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&n.lat<i.lat,a=o.lng>e.lng&&n.lng<i.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){if(!t)return!1;t=R(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(void 0===e?1e-9:e)},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,R(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var G,H={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new O(n,o)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new j(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast(),s=new j(r.lat-n,r.lng-o),l=new j(a.lat-n,a.lng-o);return new B(s,l)}},U=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=r*r+Math.cos(n)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(G=6378137*Math.PI,new O([-G,-G],[G,G]))};function F(t,e,i,n){if(g(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=n}function V(t,e,i,n){return new F(t,e,i,n)}F.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform: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},untransform:function(t,e){return e=e||1,new S((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y=i({},U,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return V(t,.5,-t,.5)}()}),q=i({},Y,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,e){var i,n,o,r,a,s,l="";for(i=0,o=t.length;i<o;i++){for(a=t[i],n=0,r=a.length;n<r;n++)s=a[n],l+=(n?"L":"M")+s.x+" "+s.y;l+=e?Pt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,$=Q&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),it=Et("android"),nt=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=it&&Et("Google")&&ot<537&&!("AudioNode"in window),at=!!window.opera,st=Et("chrome"),lt=Et("gecko")&&!et&&!at&&!Q,ht=!st&&Et("safari"),ut=Et("phantom"),ct="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in J,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,_t="MozPerspective"in J,mt=!window.L_DISABLE_3D&&(dt||ft||_t)&&!ct&&!ut,gt="undefined"!=typeof orientation||Et("mobile"),yt=gt&&et,vt=gt&&ft,bt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!bt),wt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),xt=gt&&at,Ct=gt&<,Mt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),It=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var At=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:it,android23:nt,androidStock:rt,opera:at,chrome:st,gecko:lt,safari:ht,phantom:ut,opera12:ct,win:pt,ie3d:dt,webkit3d:ft,gecko3d:_t,any3d:mt,mobile:gt,mobileWebkit:yt,mobileWebkit3d:vt,msPointer:bt,pointer:Lt,touch:wt,mobileOpera:xt,mobileGecko:Ct,retina:Mt,canvas:kt,svg:Pt,vml:It}),Tt=bt?"MSPointerDown":"pointerdown",St=bt?"MSPointerMove":"pointermove",zt=bt?"MSPointerUp":"pointerup",Dt=bt?"MSPointerCancel":"pointercancel",Ot=["INPUT","SELECT","OPTION"],Nt={},Bt=!1,Zt=0;function jt(t,e,i,n){return"touchstart"===e?function(t,e,i){var n=o(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Ot.indexOf(t.target.tagName)<0))return;Ne(t)}Ut(t,e)});t["_leaflet_touchstart"+i]=n,t.addEventListener(Tt,n,!1),Bt||(document.documentElement.addEventListener(Tt,Rt,!0),document.documentElement.addEventListener(St,Gt,!0),document.documentElement.addEventListener(zt,Ht,!0),document.documentElement.addEventListener(Dt,Ht,!0),Bt=!0)}(t,i,n):"touchmove"===e?function(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Ut(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(St,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){var n=function(t){Ut(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(zt,n,!1),t.addEventListener(Dt,n,!1)}(t,i,n),this}function Rt(t){Nt[t.pointerId]=t,Zt++}function Gt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ht(t){delete Nt[t.pointerId],Zt--}function Ut(t,e){for(var i in t.touches=[],Nt)t.touches.push(Nt[i]);t.changedTouches=[t],e(t)}var Wt=bt?"MSPointerDown":Lt?"pointerdown":"touchstart",Ft=bt?"MSPointerUp":Lt?"pointerup":"touchend",Vt="_leaflet_";function Yt(t,e,i){var n,o,r=!1,a=250;function s(t){var e;if(Lt){if(!tt||"mouse"===t.pointerType)return;e=Zt}else e=t.touches.length;if(!(e>1)){var i=Date.now(),s=i-(n||i);o=t.touches?t.touches[0]:t,r=s>0&&s<=a,n=i}}function l(t){if(r&&!o.cancelBubble){if(Lt){if(!tt||"mouse"===t.pointerType)return;var i,a,s={};for(a in o)i=o[a],s[a]=i&&i.bind?i.bind(o):i;o=s}o.type="dblclick",o.button=0,e(o),n=null}}return t[Vt+Wt+i]=s,t[Vt+Ft+i]=l,t[Vt+"dblclick"+i]=e,t.addEventListener(Wt,s,!1),t.addEventListener(Ft,l,!1),t.addEventListener("dblclick",e,!1),this}function qt(t,e){var i=t[Vt+Wt+e],n=t[Vt+Ft+e],o=t[Vt+"dblclick"+e];return t.removeEventListener(Wt,i,!1),t.removeEventListener(Ft,n,!1),tt||t.removeEventListener("dblclick",o,!1),this}var Xt,Kt,Jt,Qt,$t,te=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function oe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function re(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function he(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=fe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ue(t,e)){var r=fe(t);de(t,(r?r+" ":"")+e)}}function pe(t,e){void 0!==t.classList?t.classList.remove(e):de(t,c((" "+fe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ge(t,e,i){var n=e||new S(0,0);t.style[te]=(dt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ye(t,e){t._leaflet_pos=e,mt?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ve(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Xt=function(){Ie(window,"selectstart",Ne)},Kt=function(){Ae(window,"selectstart",Ne)};else{var be=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Xt=function(){if(be){var t=document.documentElement.style;Jt=t[be],t[be]="none"}},Kt=function(){be&&(document.documentElement.style[be]=Jt,Jt=void 0)}}function Le(){Ie(window,"dragstart",Ne)}function we(){Ae(window,"dragstart",Ne)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),Qt=t,$t=t.style.outline,t.style.outline="none",Ie(window,"keydown",Ce))}function Ce(){Qt&&(Qt.style.outline=$t,Qt=void 0,$t=void 0,Ae(window,"keydown",Ce))}function Me(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ke(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Pe=(Object.freeze||Object)({TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ie,get:ne,getStyle:oe,create:re,remove:ae,empty:se,toFront:le,toBack:he,hasClass:ue,addClass:ce,removeClass:pe,setClass:de,getClass:fe,setOpacity:_e,testProp:me,setTransform:ge,setPosition:ye,getPosition:ve,disableTextSelection:Xt,enableTextSelection:Kt,disableImageDrag:Le,enableImageDrag:we,preventOutline:xe,restoreOutline:Ce,getSizedParentNode:Me,getScale:ke});function Ie(t,e,i,n){if("object"==typeof e)for(var o in e)Te(t,o,e[o],i);else{e=p(e);for(var r=0,a=e.length;r<a;r++)Te(t,e[r],i,n)}return this}var Ee="_leaflet_events";function Ae(t,e,i,n){if("object"==typeof e)for(var o in e)Se(t,o,e[o],i);else if(e){e=p(e);for(var r=0,a=e.length;r<a;r++)Se(t,e[r],i,n)}else{for(var s in t[Ee])Se(t,s,t[Ee][s]);delete t[Ee]}return this}function Te(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):"");if(t[Ee]&&t[Ee][o])return this;var r=function(e){return i.call(n||t,e||window.event)},s=r;Lt&&0===e.indexOf("touch")?jt(t,e,r,o):!wt||"dblclick"!==e||!Yt||Lt&&st?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Fe(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&it&&(r=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Ge&&i-Ge;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?Be(t):(Ge=i,e(t))}(t,s)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):Yt(t,r,o),t[Ee]=t[Ee]||{},t[Ee][o]=r}function Se(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):""),r=t[Ee]&&t[Ee][o];if(!r)return this;Lt&&0===e.indexOf("touch")?function(t,e,i){var n=t["_leaflet_"+e+i];"touchstart"===e?t.removeEventListener(Tt,n,!1):"touchmove"===e?t.removeEventListener(St,n,!1):"touchend"===e&&(t.removeEventListener(zt,n,!1),t.removeEventListener(Dt,n,!1))}(t,e,o):!wt||"dblclick"!==e||!qt||Lt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):qt(t,o),t[Ee][o]=null}function ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,We(t),this}function De(t){return Te(t,"mousewheel",ze),this}function Oe(t){return Ie(t,"mousedown touchstart dblclick",ze),Te(t,"click",Ue),this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return Ne(t),ze(t),this}function Ze(t,e){if(!e)return new S(t.clientX,t.clientY);var i=ke(e),n=i.boundingClientRect;return new S((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var je=pt&&st?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Re(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/je: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}var Ge,He={};function Ue(t){He[t.type]=!0}function We(t){var e=He[t.type];return He[t.type]=!1,e}function Fe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Ve=(Object.freeze||Object)({on:Ie,off:Ae,stopPropagation:ze,disableScrollPropagation:De,disableClickPropagation:Oe,preventDefault:Ne,stop:Be,getMousePosition:Ze,getWheelDelta:Re,fakeStop:Ue,skipped:We,isExternalTarget:Fe,addListener:Ie,removeListener:Ae}),Ye=T.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ve(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ye(this._el,i),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qe=T.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(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(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&mt&&!xt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ie(this._proxy,ie,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n){void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof S?t:this.latLngToContainerPoint(t),a=r.subtract(o).multiplyBy(1-1/n),s=this.containerPointToLatLng(o.add(a));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o),l=this.unproject(a.add(s).divideBy(2).add(r),o);return{center:l,zoom:o}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ye,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!mt)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=R(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),h=o.distanceTo(n)||1,u=1.42,c=u*u;function p(t){var e=t?-1:1,i=t?l:s,n=l*l-s*s+e*c*c*h*h,o=2*i*c*h,r=n/o,a=Math.sqrt(r*r+1)-r,u=a<1e-9?-18:Math.log(a);return u}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var _=p(0);function m(t){return s*(f(_)*(d(e=_+u*t)/f(e))-d(_))/c;var e}var g=Date.now(),y=(p(1)-_)/u,v=i.duration?1e3*i.duration:1e3*y*.8;return this._moveStart(!0,i.noMoveStart),function i(){var r=(Date.now()-g)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*y;r<=1?(this._flyToFrame=k(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(m(l)/h)),a),this.getScaleZoom(s/function(t){return s*(f(_)/f(_+u*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=Z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,Z(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),h=N([s.min.add(i),s.max.subtract(n)]);if(!h.contains(a)){this._enforcingBounds=!0;var u=r.subtract(a),c=D(a.x+u.x,a.y+u.y);(a.x<h.min.x||a.x>h.max.x)&&(c.x=r.x-u.x,u.x>0?c.x+=l.x-i.x:c.x-=l.x-n.x),(a.y<h.min.y||a.y>h.max.y)&&(c.y=r.y-u.y,u.y>0?c.y+=l.y-i.y:c.y-=l.y-n.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize: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 n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new j(e,i),o=n.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(o);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var s={latlng:n,bounds:o,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(s[l]=t.coords[l]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=re("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new B(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=Z(t),i=D(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(s,n),this.project(a,n)).getSize(),u=mt?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 n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new O(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(R(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ze(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ie(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&mt,ce(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new S(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ae:Ie;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),mt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((i=this._targets[a(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(o&&!Fe(r,t))break;if(n.push(i),o)break}if(r===this._container)break;r=r.parentNode}return n.length||s||o||!Fe(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!We(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var r=n[0];"contextmenu"===e&&r.listens(e,!0)&&Ne(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(e,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ve(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),r=new O(n.subtract(o),n.add(o)),a=this._getBoundsOffset(r,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new O(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),r=n.max.subtract(t.max),a=this._rebound(o.x,-r.x),s=this._rebound(o.y,-r.y);return new S(a,s)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=mt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=re("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=te,i=this._proxy.style[e];ge(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",function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}}),Xe=E.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ke=function(t){return new Xe(t)};qe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=re("div",e+"control-container",this._container);function n(n,o){var r=e+n+" "+e+o;t[n+o]=re("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(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?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=re("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Oe(e),De(e);var n=this._section=re("section",t+"-list");i&&(this._map.on("click",this.collapse,this),it||Ie(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=re("a",t+"-toggle",e);o.href="#",o.title="Layers",wt?(Ie(o,"click",Be),Ie(o,"click",this.expand,this)):Ie(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=re("div",t+"-base",n),this._separator=re("div",t+"-separator",n),this._overlaysList=re("div",t+"-overlays",n),e.appendChild(n)},_getLayer: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]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),Ie(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");i.appendChild(r),r.appendChild(e),r.appendChild(o);var s=t.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<n.length;r++)this._map.hasLayer(n[r])||this._map.addLayer(n[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=re("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var r=re("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Oe(r),Ie(r,"click",Be),Ie(r,"click",o,this),Ie(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ce(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ce(this._zoomInButton,e)}});qe.mergeOptions({zoomControl:!0}),qe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var $e=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=re("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=re("div",e,i)),t.imperial&&(this._iScale=re("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ti=Xe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=re("div","leaflet-control-attribution"),Oe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});qe.mergeOptions({attributionControl:!0}),qe.addInitHook(function(){this.options.attributionControl&&(new ti).addTo(this)}),Xe.Layers=Je,Xe.Zoom=Qe,Xe.Scale=$e,Xe.Attribution=ti,Ke.layers=function(t,e,i){return new Je(t,e,i)},Ke.zoom=function(t){return new Qe(t)},Ke.scale=function(t){return new $e(t)},Ke.attribution=function(t){return new ti(t)};var ei=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ei.addTo=function(t,e){return t.addHandler(e,this),this};var ii,ni={Events:A},oi=wt?"touchstart mousedown":"mousedown",ri={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ai={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},si=T.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ie(this._dragStartTarget,oi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(si._dragging===this&&this.finishDrag(),Ae(this._dragStartTarget,oi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(si._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(si._dragging=this,this._preventOutline&&xe(this._element),Le(),Xt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Me(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=ke(i),Ie(document,ai[t.type],this._onMove,this),Ie(document,ri[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&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 S(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,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ve(this._element).subtract(i),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,P(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ai)Ae(document,ai[t],this._onMove,this),Ae(document,ri[t],this._onUp,this);we(),Kt(),this._moved&&this._moving&&(P(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,si._dragging=!1}});function li(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,r){var a,s,l,h=0;for(s=o+1;s<=r-1;s++)(l=di(e[s],e[o],e[r],!0))>h&&(a=s,h=l);h>n&&(i[a]=1,t(e,i,n,o,a),t(e,i,n,a,r))}(t,n,e,0,i-1);var o,r=[];for(o=0;o<i;o++)n[o]&&r.push(t[o]);return r}(t=function(t,e){for(var i=[t[0]],n=1,o=0,r=t.length;n<r;n++)a=t[n],s=t[o],l=void 0,h=void 0,l=s.x-a.x,h=s.y-a.y,l*l+h*h>e&&(i.push(t[n]),o=n);var a,s,l,h;return o<r-1&&i.push(t[r-1]),i}(t,i),i)}function hi(t,e,i){return Math.sqrt(di(t,e,i,!0))}function ui(t,e,i,n,o){var r,a,s,l=n?ii:pi(t,i),h=pi(e,i);for(ii=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=ci(t,e,r=l||h,i,o),s=pi(a,i),r===l?(t=a,l=s):(e=a,h=s)}}function ci(t,e,i,n,o){var r,a,s=e.x-t.x,l=e.y-t.y,h=n.min,u=n.max;return 8&i?(r=t.x+s*(u.y-t.y)/l,a=u.y):4&i?(r=t.x+s*(h.y-t.y)/l,a=h.y):2&i?(r=u.x,a=t.y+l*(u.x-t.x)/s):1&i&&(r=h.x,a=t.y+l*(h.x-t.x)/s),new S(r,a,o)}function pi(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 di(t,e,i,n){var o,r=e.x,a=e.y,s=i.x-r,l=i.y-a,h=s*s+l*l;return h>0&&((o=((t.x-r)*s+(t.y-a)*l)/h)>1?(r=i.x,a=i.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,n?s*s+l*l:new S(r,a)}function fi(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fi(t)}var mi=(Object.freeze||Object)({simplify:li,pointToSegmentDistance:hi,closestPointOnSegment:function(t,e,i){return di(t,e,i)},clipSegment:ui,_getEdgeIntersection:ci,_getBitCode:pi,_sqClosestPointOnSegment:di,isFlat:fi,_flat:_i});function gi(t,e,i){var n,o,r,a,s,l,h,u,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=pi(t[o],e);for(a=0;a<4;a++){for(u=p[a],n=[],o=0,h=t.length,r=h-1;o<h;r=o++)s=t[o],l=t[r],s._code&u?l._code&u||((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)):(l._code&u&&((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)),n.push(s));t=n}return t}var yi=(Object.freeze||Object)({clipPolygon:gi}),vi={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new O([-180,-90],[180,90])},bi={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=r*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),r/2);return n=-i*Math.log(Math.max(s,1e-10)),new S(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),h=Math.PI/2-2*Math.atan(a*e)-s,s+=h;return new j(s*i,t.x*i/n)}},Li=(Object.freeze||Object)({LonLat:vi,Mercator:bi,SphericalMercator:W}),wi=i({},U,{code:"EPSG:3395",projection:bi,transformation:function(){var t=.5/(Math.PI*bi.R);return V(t,.5,-t,.5)}()}),xi=i({},U,{code:"EPSG:4326",projection:vi,transformation:V(1/180,1,-1/180,.5)}),Ci=i({},H,{projection:vi,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});H.Earth=U,H.EPSG3395=wi,H.EPSG3857=Y,H.EPSG900913=q,H.EPSG4326=xi,H.Simple=Ci;var Mi=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});qe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?g(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ki=Mi.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Pi=ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ki.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new B;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ii=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=D(n),r=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ei=Ii.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ei.imagePath||(Ei.imagePath=this._detectIconPath()),(this.options.imagePath||Ei.imagePath)+Ii.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=re("div","leaflet-default-icon-path",document.body),e=oe(t,"background-image")||oe(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ai=ei.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new si(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=ve(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin(),l=N(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var h=D((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ve(e._icon),o=e._map.layerPointToLatLng(n);i&&ye(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ti=Mi.extend({options:{icon:new Ei,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ce(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ce(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ai)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ai(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Si=Mi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),zi=Si.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=R(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Si.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new O(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Di=zi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),d(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Si.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===U.distance){var o=Math.PI/180,r=this._mRadius/U.R/o,a=i.project([e+r,t]),s=i.project([e-r,t]),l=a.add(s).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(u)||0===u)&&(u=r/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-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}}),Oi=Si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,r=di,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],h=1,u=l.length;h<u;h++){e=l[h-1],i=l[h];var c=r(t,e,i,!0);c<n&&(n=c,o=r(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;t<l-1;t++)if(o=s[t],r=s[t+1],i=o.distanceTo(r),(n+=i)>e)return a=(n-e)/i,this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return fi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=fi(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,r=t[0]instanceof j,a=t.length;if(r){for(o=[],n=0;n<a;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,o,r,a,s,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(s=this._rings[e],i=0,r=s.length;i<r-1;i++)(a=ui(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===s[i+1]&&i!==r-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=li(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(s=this._parts[i],n=0,a=s.length,o=a-1;n<a;o=n++)if((e||0!==n)&&hi(t,s[o],s[n])<=l)return!0;return!1}});Oi._flat=_i;var Ni=Oi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s,l,h=this._rings[0],u=h.length;if(!u)return null;for(r=a=s=0,t=0,e=u-1;t<u;e=t++)i=h[t],n=h[e],o=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*o,s+=(i.y+n.y)*o,r+=3*o;return l=0===r?h[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Oi.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Oi.prototype._setLatLngs.call(this,t),fi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new S(e,e);if(t=new O(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 n,o=0,r=this._rings.length;o<r;o++)(n=gi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,r,a,s,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(e=this._parts[o],r=0,l=e.length,a=l-1;r<l;a=r++)i=e[r],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Oi.prototype._containsPoint.call(this,t,!0)}}),Bi=Pi.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=Zi(t,r);return a?(a.feature=Wi(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Zi(t,e){var i,n,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||ji;if(!s&&!a)return null;switch(a.type){case"Point":return i=u(s),h?h(t,i):new Ti(i);case"MultiPoint":for(o=0,r=s.length;o<r;o++)i=u(s[o]),l.push(h?h(t,i):new Ti(i));return new Pi(l);case"LineString":case"MultiLineString":return n=Ri(s,"LineString"===a.type?0:1,u),new Oi(n,e);case"Polygon":case"MultiPolygon":return n=Ri(s,"Polygon"===a.type?1:2,u),new Ni(n,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=Zi({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Pi(l);default:throw new Error("Invalid GeoJSON object.")}}function ji(t){return new j(t[1],t[0],t[2])}function Ri(t,e,i){for(var n,o=[],r=0,a=t.length;r<a;r++)n=e?Ri(t[r],e-1,i):(i||ji)(t[r]),o.push(n);return o}function Gi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Hi(t,e,i,n){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?Hi(t[r],e-1,i,n):Gi(t[r],n));return!e&&i&&o.push(o[0]),o}function Ui(t,e){return t.feature?i({},t.feature,{geometry:e}):Wi(e)}function Wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Fi={toGeoJSON:function(t){return Ui(this,{type:"Point",coordinates:Gi(this.getLatLng(),t)})}};function Vi(t,e){return new Bi(t,e)}Ti.include(Fi),Di.include(Fi),zi.include(Fi),Oi.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=Hi(this._latlngs,e?1:0,!1,t);return Ui(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Ni.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=e&&!fi(this._latlngs[0]),n=Hi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ui(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ui(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var r=Wi(o);"FeatureCollection"===r.type?n.push.apply(n,r.features):n.push(r)}}}),i?Ui(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Yi=Vi,qi=Mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=Z(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&le(this._image),this},bringToBack:function(){return this._map&&he(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:re("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(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)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,i,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ye(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Xi=qi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:re("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],r=0;r<i.length;r++)n.push(i[r].src);this._url=i.length>0?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var s=re("source");s.src=this._url[a],e.appendChild(s)}}}}),Ki=qi.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),t.onselectstart=h,t.onmousemove=h}}),Ji=Mi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(o(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&le(this._container),this},bringToBack:function(){return this._map&&he(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof Mi||(i=e,e=t),e instanceof Pi)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Qi=Ji.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ji.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Si||this._source.on("preclick",ze))},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Si||this._source.off("preclick",ze))},getEvents:function(){var t=Ji.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=re("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=re("div",t+"-content-wrapper",e);if(this._contentNode=re("div",t+"-content",i),Oe(i),De(this._contentNode),Ie(i,"contextmenu",ze),this._tipContainer=re("div",t+"-tip-container",e),this._tip=re("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=re("a",t+"-close-button",e);n.href="#close",n.innerHTML="×",Ie(n,"click",this._onCloseButtonClick,this)}},_updateLayout: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 n=t.offsetHeight,o=this.options.maxHeight;o&&n>o?(e.height=o+"px",ce(t,"leaflet-popup-scrolled")):pe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ye(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(oe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new S(this._containerLeft,-i-this._containerBottom);o._add(ve(this._container));var r=t.layerPointToContainerPoint(o),a=D(this.options.autoPanPadding),s=D(this.options.autoPanPaddingTopLeft||a),l=D(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),u=0,c=0;r.x+n+l.x>h.x&&(u=r.x+n-h.x+l.x),r.x-u-s.x<0&&(u=r.x-s.x),r.y+i+l.y>h.y&&(c=r.y+i-h.y+l.y),r.y-c-s.y<0&&(c=r.y-s.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qe.mergeOptions({closePopupOnClick:!0}),qe.include({openPopup:function(t,e,i){return t instanceof Qi||(t=new Qi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Mi.include({bindPopup:function(t,e){return t instanceof Qi?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Be(t),e instanceof Si?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var $i=Ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ji.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ji.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=re("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=D(this.options.offset),h=this._getAnchor();"top"===r?t=t.add(D(-a/2+l.x,-s+l.y+h.y,!0)):"bottom"===r?t=t.subtract(D(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(D(a/2+l.x,s/2-h.y+l.y,!0)):"right"===r||"auto"===r&&o.x<n.x?(r="right",t=t.add(D(l.x+h.x,h.y-s/2+l.y,!0))):(r="left",t=t.subtract(D(a+h.x-l.x,s/2-h.y-l.y,!0))),pe(i,"leaflet-tooltip-right"),pe(i,"leaflet-tooltip-left"),pe(i,"leaflet-tooltip-top"),pe(i,"leaflet-tooltip-bottom"),ce(i,"leaflet-tooltip-"+r),ye(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qe.include({openTooltip:function(t,e,i){return t instanceof $i||(t=new $i(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Mi.include({bindTooltip:function(t,e){return t instanceof $i?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new $i(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions: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,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),wt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(pe(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var tn=Ii.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(se(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ii.Default=Ei;var en=Mi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(he(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,r=i.length;o<r;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){_e(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);_e(o.el,r),r<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=re("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ae(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=re("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles: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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),r=Math.floor(e/2),a=i-1,s=new S(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),a>n&&this._retainParent(o,r,a,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new S(o,r);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,r,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var r=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();mt?ge(t.el,o,n):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new O(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.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 S(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),r=e.unproject(n,t.z),a=e.unproject(o,t.z);return[r,a]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new B(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new S(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,$&&this.options.opacity<1&&_e(t,this.options.opacity),it&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&k(o(this._tileReady,this,t,null,r)),ye(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(_e(i.el,0),P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new O(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),nn=en.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Mt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ie(i,"load",o(this._tileOnLoad,this,e,i)),Ie(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return rt||e.el.setAttribute("src",v),en.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return en.prototype._tileReady.call(this,t,e,i)}});function on(t,e){return new nn(t,e)}var rn=nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var r=(e=d(this,e)).detectRetina&&Mt?2:1,a=this.getTileSize();n.width=a.x*r,n.height=a.y*r,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,nn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,r=n.max,a=(this._wmsVersion>=1.3&&this._crs===xi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=nn.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});nn.WMS=rn,on.wms=function(t,e){return new rn(t,e)};var an=Mi.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=ve(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e),s=a.subtract(r),l=o.multiplyBy(-i).add(n).add(o).subtract(s);mt?ge(this._container,l,i):ye(this._container,l)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){an.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ie(t,"mousemove",s(this._onMouseMove,32,this),this),Ie(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ie(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ae(this._container),Ae(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Mt?2:1;ye(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){an.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath: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},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),i=0;i<s;i++){for(n=0,o=a[i].length;n<o;n++)r=a[i][n],l[n?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(Ue(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ce(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ln(t){return kt?new sn(t):null}var hn=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">')}}}(),un={_initContainer:function(){this._container=re("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(an.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hn("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=hn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=hn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){he(t._container)}},cn=It?hn:X,pn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=cn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=cn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Ae(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.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)),ye(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=cn("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,K(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){he(t._path)}});function dn(t){return Pt||It?new pn(t):null}It&&pn.include(un),qe.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||dn(t)}});var fn=Ni.extend({initialize:function(t,e){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=cn,pn.pointsToPath=K,Bi.geometryToLayer=Zi,Bi.coordsToLatLng=ji,Bi.coordsToLatLngs=Ri,Bi.latLngToCoords=Gi,Bi.latLngsToCoords=Hi,Bi.getFeature=Ui,Bi.asFeature=Wi,qe.mergeOptions({boxZoom:!0});var _n=ei.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ie(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ie(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=re("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),i=e.getSize();ye(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ae(this._box),pe(this._container,"leaflet-crosshair")),Kt(),we(),Ae(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});qe.addInitHook("addHandler","boxZoom",_n),qe.mergeOptions({doubleClickZoom:!0});var mn=ei.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});qe.addInitHook("addHandler","doubleClickZoom",mn),qe.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=ei.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new si(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))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,r=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=s.multiplyBy(h/l),c=h/(i.inertiaDeceleration*a),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:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});qe.addInitHook("addHandler","dragging",gn),qe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yn=ei.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ie(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ae(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Ie(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Be(t)}}});qe.addInitHook("addHandler","keyboard",yn),qe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vn=ei.extend({addHooks:function(){Ie(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ae(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Re(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),n),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});qe.addInitHook("addHandler","scrollWheelZoom",vn),qe.mergeOptions({tap:!0,tapTolerance:15});var bn=ei.extend({addHooks:function(){Ie(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ne(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ce(i,"leaflet-active"),this._holdTimeout=setTimeout(o(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Ie(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ae(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&pe(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});wt&&!Lt&&qe.addInitHook("addHandler","tap",bn),qe.mergeOptions({touchZoom:wt&&!nt,bounceAtZoomLimits:!0});var Ln=ei.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Ie(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ie(document,"touchmove",this._onTouchMove,this),Ie(document,"touchend",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(s,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Ae(document,"touchmove",this._onTouchMove),Ae(document,"touchend",this._onTouchEnd),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}});qe.addInitHook("addHandler","touchZoom",Ln),qe.BoxZoom=_n,qe.DoubleClickZoom=mn,qe.Drag=gn,qe.Keyboard=yn,qe.ScrollWheelZoom=vn,qe.Tap=bn,qe.TouchZoom=Ln,Object.freeze=e,t.version="1.5.1+build.2e3e0ffb",t.Control=Xe,t.control=Ke,t.Browser=At,t.Evented=T,t.Mixin=ni,t.Util=I,t.Class=E,t.Handler=ei,t.extend=i,t.bind=o,t.stamp=a,t.setOptions=d,t.DomEvent=Ve,t.DomUtil=Pe,t.PosAnimation=Ye,t.Draggable=si,t.LineUtil=mi,t.PolyUtil=yi,t.Point=S,t.point=D,t.Bounds=O,t.bounds=N,t.Transformation=F,t.transformation=V,t.Projection=Li,t.LatLng=j,t.latLng=R,t.LatLngBounds=B,t.latLngBounds=Z,t.CRS=H,t.GeoJSON=Bi,t.geoJSON=Vi,t.geoJson=Yi,t.Layer=Mi,t.LayerGroup=ki,t.layerGroup=function(t,e){return new ki(t,e)},t.FeatureGroup=Pi,t.featureGroup=function(t){return new Pi(t)},t.ImageOverlay=qi,t.imageOverlay=function(t,e,i){return new qi(t,e,i)},t.VideoOverlay=Xi,t.videoOverlay=function(t,e,i){return new Xi(t,e,i)},t.SVGOverlay=Ki,t.svgOverlay=function(t,e,i){return new Ki(t,e,i)},t.DivOverlay=Ji,t.Popup=Qi,t.popup=function(t,e){return new Qi(t,e)},t.Tooltip=$i,t.tooltip=function(t,e){return new $i(t,e)},t.Icon=Ii,t.icon=function(t){return new Ii(t)},t.DivIcon=tn,t.divIcon=function(t){return new tn(t)},t.Marker=Ti,t.marker=function(t,e){return new Ti(t,e)},t.TileLayer=nn,t.tileLayer=on,t.GridLayer=en,t.gridLayer=function(t){return new en(t)},t.SVG=pn,t.svg=dn,t.Renderer=an,t.Canvas=sn,t.canvas=ln,t.Path=Si,t.CircleMarker=zi,t.circleMarker=function(t,e){return new zi(t,e)},t.Circle=Di,t.circle=function(t,e,i){return new Di(t,e,i)},t.Polyline=Oi,t.polyline=function(t,e){return new Oi(t,e)},t.Polygon=Ni,t.polygon=function(t,e){return new Ni(t,e)},t.Rectangle=fn,t.rectangle=function(t,e){return new fn(t,e)},t.Map=qe,t.map=function(t,e){return new qe(t,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}(e)},function(t,e,i){var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a={};function s(t,e,i){for(var n=0;n<e.length;n++){var o={css:e[n][1],media:e[n][2],sourceMap:e[n][3]};a[t][n]?a[t][n](o):a[t].push(f(o,i))}}function l(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])}),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var h,u=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function c(t,e,i,n){var o=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}var p=null,d=0;function f(t,e){var i,n,o;if(e.singleton){var r=d++;i=p||(p=l(e)),n=c.bind(null,i,r,!1),o=c.bind(null,i,r,!0)}else i=l(e),n=function(t,e,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e,i){return(i=i||{}).singleton||"boolean"==typeof i.singleton||(i.singleton=o()),t=i.base?t+i.base:t,e=e||[],a[t]||(a[t]=[]),s(t,e,i),function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){a[t]||(a[t]=[]),s(t,e,i);for(var n=e.length;n<a[t].length;n++)a[t][n]();a[t].length=e.length,0===a[t].length&&delete a[t]}}}},function(t,e,i){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),r=n.sources.map(function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")});return[i].concat(r).concat([o]).join("\n")}var a,s,l;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n=0;n<t.length;n++){var o=[].concat(t[n]);i&&(o[2]?o[2]="".concat(i," and ").concat(o[2]):o[2]=i),e.push(o)}},e}},function(t,e,i){i.d(e,"a",function(){return o});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},function(t,e,i){function n(t){if(!(this instanceof n))return new n(t);this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,this._data=[]}t.exports=n,n.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),n=i.getContext("2d"),o=this._r=t+e;return i.width=i.height=2*o,n.shadowOffsetX=n.shadowOffsetY=2*o,n.shadowBlur=e,n.shadowColor="black",n.beginPath(),n.arc(-o,-o,t,0,2*Math.PI,!0),n.closePath(),n.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function(t){var e=this._createCanvas(),i=e.getContext("2d"),n=i.createLinearGradient(0,0,0,256);for(var o in e.width=1,e.height=256,t)n.addColorStop(+o,t[o]);return i.fillStyle=n,i.fillRect(0,0,1,256),this._grad=i.getImageData(0,0,1,256).data,this},draw: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,n=0,o=this._data.length;n<o;n++)i=this._data[n],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 r=e.getImageData(0,0,this._width,this._height);return this._colorize(r.data,this._grad),e.putImageData(r,0,0),this},_colorize:function(t,e){for(var i,n=0,o=t.length;n<o;n+=4)(i=4*t[n+3])&&(t[n]=e[i],t[n+1]=e[i+1],t[n+2]=e[i+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}},function(t,e,i){t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,e,i){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise(function(t,e){var i=0,n=null;n=setInterval(function(){return i>=10?(clearInterval(n),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(n),t(window.google)):void i++},500)}),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var i=google.maps[t],n=new i(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){var e=new MutationObserver(this._onMutations.bind(this));e.observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.addedNodes.length;++n){var o=i.addedNodes[n];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,i=t.src.match(this._roadRegexp),n=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,n=1)):((i=t.src.match(this._satRegexp))&&(e={x:i[1],y:i[2],z:i[3]}),n=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+n;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===n?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var i=this._tileCoordsToKey(t),n=L.DomUtil.create("div");n.dataset.pending=this._imagesPerTile,e=e.bind(this,null,n);for(var o=0;o<this._imagesPerTile;o++){var r=i+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];n.appendChild(this._clone(a)),n.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(i){t.appendChild(this._clone(i)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(n))}return parseInt(n.dataset.pending)||L.Util.requestAnimFrame(e),n},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var i=this._map.getZoom(),n=i!==Math.round(i),o=this._mutant.getZoom();n||i==o||(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),i=t.split(":")[2],n=this._mutant.getBounds(),o=n.getSouthWest(),r=n.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t),u=this._map&&h.overlaps(a)&&i==e;u||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},function(t,e,i){i.d(e,"a",function(){return a});var n=i(0),o=(i(27),{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]}}),r=n.Icon.extend({options:{icon:"leaf",iconSize:o.iconSize.circle,iconAnchor:o.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:o.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:o.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:n.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=o.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=o.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=o.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=o.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var i=document.createElement("div");return i.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),i.appendChild(t),i}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var i="";return t.spin&&(i=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+i+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=Object(n.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,i=Object(n.point)(e.iconSize),o=Object(n.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){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function a(t){return new r(t)}},function(t,e,i){i.d(e,"b",function(){return l}),i.d(e,"a",function(){return h});var n=i(3),o=i(0),r=i(4),a=i.n(r),s=window.simpleheat||r&&a.a||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(o.Layer),h=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,i)||this;return n._latlngs=e,n}return Object(n.a)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var i=this._map.getSize();t.width=i.x,t.height=i.y;var n=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(n?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){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)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var 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()},e.prototype._redraw=function(){var t,e,i,n,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++){if(i=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(i))r=Math.floor((i.x-b)/g)+2,a=Math.floor((i.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(n=y[a][r])?(n[0]=(n[0]*n[2]+i.x*h)/(n[2]+h),n[1]=(n[1]*n[2]+i.y*h)/(n[2]+h),n[2]+=h):y[a][r]=[i.x,i.y,h]}for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(n=y[t][s])&&u.push([Math.round(n[0]),Math.round(n[1]),Math.min(n[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+")"},e}(l)},function(t,e,i){var n=i(3),o=function(t){return t};function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)r(i[n].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)l(i[n],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)h(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)r(i[n],e)}};function l(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function h(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)l(t[i],e,1);e.polygonEnd()}var u=function(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)},c=function(){return new p};function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),C=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=k,M.lineEnd=E},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(C)),C.reset()},result:function(){var t=x/2;return x.reset(),t}};function k(){M.point=P}function P(t,e){M.point=I,v=L=t,b=w=e}function I(t,e){C.add(w*t-L*e),L=t,w=e}function E(){I(v,b)}var A=M,T=1/0,S=T,z=-T,D=z;var O,N,B,Z,j={point:function(t,e){t<T&&(T=t);t>z&&(z=t);e<S&&(S=e);e>D&&(D=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[T,S],[z,D]];return z=D=-(S=T=1/0),t}},R=0,G=0,H=0,U=0,W=0,F=0,V=0,Y=0,q=0,X={point:K,lineStart:J,lineEnd:tt,polygonStart:function(){X.lineStart=et,X.lineEnd=it},polygonEnd:function(){X.point=K,X.lineStart=J,X.lineEnd=tt},result:function(){var t=q?[V/q,Y/q]:F?[U/F,W/F]:H?[R/H,G/H]:[NaN,NaN];return R=G=H=U=W=F=V=Y=q=0,t}};function K(t,e){R+=t,G+=e,++H}function J(){X.point=Q}function Q(t,e){X.point=$,K(B=t,Z=e)}function $(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,K(B=t,Z=e)}function tt(){X.point=K}function et(){X.point=nt}function it(){ot(O,N)}function nt(t,e){X.point=ot,K(O=B=t,N=Z=e)}function ot(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,V+=(o=Z*t-B*e)*(B+t),Y+=o*(Z+e),q+=3*o,K(B=t,Z=e)}var rt=X;function at(t){this._context=t}at.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point: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,_)}},result:y};var st,lt,ht,ut,ct,pt=c(),dt={point:y,lineStart:function(){dt.point=ft},lineEnd:function(){st&&_t(lt,ht),dt.point=y},polygonStart:function(){st=!0},polygonEnd:function(){st=null},result:function(){var t=+pt;return pt.reset(),t}};function ft(t,e){dt.point=_t,lt=ut=t,ht=ct=e}function _t(t,e){ut-=t,ct-=e,pt.add(g(ut*ut+ct*ct)),ut=t,ct=e}var mt=dt;function gt(){this._string=[]}function yt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}gt.prototype={_radius:4.5,_circle:yt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point: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=yt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function vt(t){return function(e){var i=new bt;for(var n in t)i[n]=t[n];return i.stream=e,i}}function bt(){}function Lt(){}bt.prototype={constructor:bt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var wt=function(t){return null==t?Lt:function(){return this.querySelector(t)}};function xt(){return[]}var Ct=function(t){return new Array(t.length)};function Mt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Mt.prototype={constructor:Mt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Pt(t,e,i,n,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],n[s]=a):i[s]=new Mt(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function It(t,e,i,n,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h=kt+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h=kt+a.call(t,r[s],s,r)])?(n[s]=l,l.__data__=r[s],u[h]=null):i[s]=new Mt(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var At="http://www.w3.org/1999/xhtml",Tt={svg:"http://www.w3.org/2000/svg",xhtml:At,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},St=function(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t};var zt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Dt(t){return t.trim().split(/^|\s+/)}function Ot(t){return t.classList||new Nt(t)}function Nt(t){this._node=t,this._names=Dt(t.getAttribute("class")||"")}function Bt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.add(e[n])}function Zt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.remove(e[n])}Nt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function jt(){this.textContent=""}function Rt(){this.innerHTML=""}function Gt(){this.nextSibling&&this.parentNode.appendChild(this)}function Ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var Ut=function(t){var e=St(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===At&&e.documentElement.namespaceURI===At?e.createElement(t):e.createElementNS(i,t)}})(e)};function Wt(){return null}function Ft(){var t=this.parentNode;t&&t.removeChild(this)}function Vt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Yt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var qt={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(qt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Xt(t,e,i){return t=Kt(t,e,i),function(e){var i=e.relatedTarget;i&&(i===this||8&i.compareDocumentPosition(this))||t.call(this,e)}}function Kt(t,e,i){return function(n){try{t.call(this,this.__data__,e,i)}finally{}}}function Jt(t){return function(){var e=this.__on;if(e){for(var i,n=0,o=-1,r=e.length;n<r;++n)i=e[n],t.type&&i.type!==t.type||i.name!==t.name?e[++o]=i:this.removeEventListener(i.type,i.listener,i.capture);++o?e.length=o:delete this.__on}}}function Qt(t,e,i){var n=qt.hasOwnProperty(t.type)?Xt:Kt;return function(o,r,a){var s,l=this.__on,h=n(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=i),void(s.value=e);this.addEventListener(t.type,h,i),s={type:t.type,name:t.name,value:e,listener:h,capture:i},l?l.push(s):this.__on=[s]}}function $t(t,e,i){var n=zt(t),o=n.CustomEvent;"function"==typeof o?o=new o(e,i):(o=n.document.createEvent("Event"),i?(o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}ee.prototype=function(){return new ee([[document.documentElement]],te)}.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=wt(t));for(var e=this._groups,i=e.length,n=new Array(i),o=0;o<i;++o)for(var r,a,s=e[o],l=s.length,h=n[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new ee(n,this._parents)},selectAll:function(t){var e;"function"!=typeof t&&(t=null==(e=t)?xt:function(){return this.querySelectorAll(e)});for(var i=this._groups,n=i.length,o=[],r=[],a=0;a<n;++a)for(var s,l=i[a],h=l.length,u=0;u<h;++u)(s=l[u])&&(o.push(t.call(s,s.__data__,u,l)),r.push(s));return new ee(o,r)},filter:function(t){var e;"function"!=typeof t&&(e=t,t=function(){return this.matches(e)});for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r)for(var a,s=i[r],l=s.length,h=o[r]=[],u=0;u<l;++u)(a=s[u])&&t.call(a,a.__data__,u,s)&&h.push(a);return new ee(o,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each(function(t){f[++u]=t}),f;var i,n=e?It:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);n(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new ee(s,o))._enter=l,s._exit=h,s},enter:function(){return new ee(this._enter||this._groups.map(Ct),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(Ct),this._parents)},join:function(t,e,i){var n=this.enter(),o=this,r=this.exit();return n="function"==typeof t?t(n):n.append(t+""),null!=e&&(o=e(o)),null==i?r.remove():i(r),n&&o?n.merge(o).order():o},merge:function(t){for(var e=this._groups,i=t._groups,n=e.length,o=i.length,r=Math.min(n,o),a=new Array(n),s=0;s<r;++s)for(var l,h=e[s],u=i[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<n;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var n,o=t[e],r=o.length-1,a=o[r];--r>=0;)(n=o[r])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=Et);for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r){for(var a,s=i[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new ee(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var n=t[e],o=0,r=n.length;o<r;++o){var a=n[o];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var o,r=e[i],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var i=St(t);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((null==e?i.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?i.local?function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}:function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}:i.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,i){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,i)}}:function(t,e,i){return function(){this.style.setProperty(t,e,i)}})(t,e,null==i?"":i)):function(t,e){return t.style.getPropertyValue(e)||zt(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var i=Dt(t+"");if(arguments.length<2){for(var n=Ot(this.node()),o=-1,r=i.length;++o<r;)if(!n.contains(i[o]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Bt:Zt)(this,t)}}:e?function(t){return function(){Bt(this,t)}}:function(t){return function(){Zt(this,t)}})(i,e))},text:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Rt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Gt)},lower:function(){return this.each(Ht)},append:function(t){var e="function"==typeof t?t:Ut(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var i="function"==typeof t?t:Ut(t),n=null==e?Wt:"function"==typeof e?e:wt(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(Ft)},clone:function(t){return this.select(t?Yt:Vt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var n,o,r=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Qt:Jt,null==i&&(i=!1),n=0;n<a;++n)this.each(s(r[n],e,i));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(n=0,l=s[h];n<a;++n)if((o=r[n]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return $t(this,t,e)}})(t,e))}};var ie=i(0);i(29);i.d(e,"b",function(){return ne}),i.d(e,"a",function(){return oe});var ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(ie.Layer),oe=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i._options(e),i}return Object(n.a)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new ie.LatLngBounds([-90,-180],[90,180]);var t,e,i=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new ie.Point(i.x,i.y+i.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new ie.Point(i.x+i.width,i.y))}catch(t){e=[90,180]}return new ie.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(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)},e.prototype.draw=function(){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()))},e.prototype._zoomChange=function(t){var 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));var i=["translate(",this._shift.x,",",this._shift.y,") "],n=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",i.concat(n).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e,i=this;return this._svg=ie.svg(),t.addLayer(this._svg),this._rootGroup=(e=this._svg._rootGroup,"string"==typeof e?new ee([[document.querySelector(e)]],[document.documentElement]):new ee([[e]],te)).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=ie.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=ie.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,e){return e=i._undef(e)?i._zoom:e,i.map.project(ie.latLng(t),e)._subtract(i._pixelOrigin)},layerPointToLatLng:function(t,e){e=i._undef(e)?i._zoom:e;var n=ie.point(t).add(i._pixelOrigin);return i.map.unproject(n,e)},unitsPerMeter:256*Math.pow(2,i._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:i.map,layer:i,scale:1},this.projection._projectPoint=function(t,e){var n=i.projection.latLngToLayerPoint(new ie.LatLng(e,t));this.stream.point(n.x,n.y)},this.projection.pathFromGeojson=function(t,e){var i,n,r=4.5;function a(t){return t&&("function"==typeof r&&n.pointRadius(+r.apply(this,arguments)),u(t,i(n))),n.result()}return a.area=function(t){return u(t,i(A)),A.result()},a.measure=function(t){return u(t,i(mt)),mt.result()},a.bounds=function(t){return u(t,i(j)),j.result()},a.centroid=function(t){return u(t,i(rt)),rt.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new gt):new at(e=t),"function"!=typeof r&&n.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(n.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:vt({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},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(ne)},function(t,e,i){i.r(e),i.d(e,"MarkerClusterGroup",function(){return h}),i.d(e,"Draw",function(){return u});var n=i(0);for(var o in n)["GoogleMutant","MarkerClusterGroup","Draw","default"].indexOf(o)<0&&function(t){i.d(e,t,function(){return n[t]})}(o);i(11),i(16),i(17),i(22),i(23),i(25);var r=i(6);i.d(e,"GoogleMutant",function(){return r.GoogleMutant});var a=i(7);i.d(e,"BeautifyIcon",function(){return a.a});var s=i(9);i.d(e,"LeafletLayer",function(){return s.b}),i.d(e,"D3SvgOverlay",function(){return s.a});var l=i(8);i.d(e,"LeafletLayer2",function(){return l.b}),i.d(e,"HeatLayer",function(){return l.a});var h=n.MarkerClusterGroup,u=n.Draw},function(t,e,i){var n=i(1),o=i(12);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(13),a=i(14),s=i(15);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+l+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+h+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+u+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\tzoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]),t.exports=e},function(t,e,i){i.r(e),e.default="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"},function(t,e,i){i.r(e),e.default="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="},function(t,e,i){i.r(e),e.default="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="},function(t,e){!function(t,e,i){L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(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)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(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)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),n=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(n,!1)}},addVertex: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))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape: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())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove: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)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,n=e.clientY;this._startPoint.call(this,i,n)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,n=e.clientY;this._endPoint.call(this,i,n,t),this._clickHandled=null},_endPoint:function(e,i,n){if(this._mouseDownOrigin){var o=L.point(e,i).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(n.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(n.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(n.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,n=t.originalEvent;!n.touches||!n.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=n.touches[0].clientX,i=n.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},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance: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 n=this._map.latLngToContainerPoint(i.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=n.distanceTo(r)}else e=1/0;return e},_updateFinishHandler: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)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide: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))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,n,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)i=l/r,n={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(o=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(o,n)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText: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},_updateRunningMeasure:function(t,e){var i,n,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=o-(e?2:1),n=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+=n*(e?1:-1))},_getMeasurementString: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)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler: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))},_getTooltipText: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}},_getMeasurementString: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},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged: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)},_cleanUpShape: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))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(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},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown: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)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(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)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape: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))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,n=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:n.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize: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)},addHooks: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))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(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))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(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)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(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)},_drawShape: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))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,n=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var r="";n&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight: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="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,n=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=n+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(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)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers: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))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(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)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks: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))},removeHooks: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)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,n,o,r,a=this._defaultShape();for(t=0,i=a.length;t<i;t++)(n=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),n.on("contextmenu",this._onContextMenu,this),this._markers.push(n);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker: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},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker: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)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly,n=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var o=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,n),e.setLatLng(n);var r=i.options.color;i.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:r}),o&&o.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 a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick: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())},_onContextMenu: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},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),n=t.target;L.extend(n._origLatLng,i),n._middleLeft&&n._middleLeft.setLatLng(this._getMiddleLatLng(n._prev,n)),n._middleRight&&n._middleRight.setLatLng(this._getMiddleLatLng(n,n._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},_createMiddleMarker:function(t,e){var i,n,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,n=function(){a.off("touchmove",n,this);var o=e._index;a._index=o,a.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",n,this),a.off("dragend",o,this),a.off("touchmove",n,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){n.call(this),o.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",n,this).on("dragend",o,this).on("touchmove",n,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,n=i.project(t.getLatLng()),o=i.project(e.getLatLng());return i.unproject(n._add(o)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(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)},addHooks: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)))},removeHooks: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},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker: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},_bindMarker: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)},_unbindMarker: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)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag: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")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,n=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)}this._shape.fire("editstart")},_onTouchMove: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},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker: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},_onMarkerDragStart: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)},_onMarkerDragEnd: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)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),n=this._shape.getBounds().getCenter(),o=[],r=0,a=i.length;r<a;r++)e=[i[r].lat-n.lat,i[r].lng-n.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize: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})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move: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})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint: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])},_resize: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})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(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 n=this._map.mouseEventToContainerPoint(i),o=this._map.mouseEventToLayerPoint(i),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:n,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick: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)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE: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 n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var 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())}},_detectIE: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 n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,n=t.length;i<n;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,n=t.length,o=0,r=Math.PI/180;if(n>2){for(var a=0;a<n;a++)e=t[a],o+=((i=t[(a+1)%n]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(i.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),n=L.drawLocal.format&&L.drawLocal.format.numeric,o=n&&n.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=i.split(".");i=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(i=i+a+s[1])}return i},readableArea:function(e,i,n){var o,r;n=L.Util.extend({},t,n);return i?(r=["ha","m"],type=typeof i,"string"===type?r=[i]:"boolean"!==type&&(r=i),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,n.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,n.ha)+" ha":L.GeometryUtil.formattedNumber(e,n.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,n.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,n.ac)+" acres":L.GeometryUtil.formattedNumber(e,n.yd)+" yd²",o},readableDistance:function(e,i,n,o,r){var a;r=L.Util.extend({},t,r);switch(i?"string"==typeof i?i:"metric":n?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;case"yards":default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,n){return this._checkCounterclockwise(t,i,n)!==this._checkCounterclockwise(e,i,n)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,n)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,n=this._getProjectedPoints(),o=n?n.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=n[t-1],i=n[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),n=i?i.length:0,o=i?i[n-1]:null,r=n-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,n){var o,r,a=this._getProjectedPoints();n=n||0;for(var s=i;s>n;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints: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}}),L.Polygon.include({intersects:function(){var t,e,i,n,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],i=o[t-1],n=t-2,this._lineSegmentsIntersectsRange(i,e,n,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize: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},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),n=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(n||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),n=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(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)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),n=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,n++,o,r[e].title);if(n)return this._lastButtonIndex=--n,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar: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},_initModeHandler:function(t,e,i,n,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:n+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=i,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton: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 n=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,n,t.callback,t.context),e},_disposeButton: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)},_handlerActivated: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")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,n,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(i=0,n=this._actionButtons.length;i<n;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar: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)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(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)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent: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},updatePosition: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},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(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)},getModeHandlers: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}]},getActions: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}]},setOptions: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])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(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},getModeHandlers: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}]},getActions: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},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var 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))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize: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)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save: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})},_backupLayer: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())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(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}))},_enableLayerEdit:function(t){var e,i,n=t.layer||t.target||t;this._backupLayer(n),this.options.poly&&(i=L.Util.extend({},this.options.poly),n.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=n.options.color,e.fillColor=n.options.fillColor),n.options.original=L.extend({},n.options),n.options.editing=e),n instanceof L.Marker?(n.editing&&n.editing.enable(),n.dragging.enable(),n.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):n.editing.enable()},_disableLayerEdit: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()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),n=this._map.layerPointToLatLng(i);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize: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)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var 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))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){var n=i(1),o=i(18);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(19),a=i(20),s=i(21);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,".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("+l+");background-image:linear-gradient(transparent,transparent),url("+h+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+u+");background-image:linear-gradient(transparent,transparent),url("+h+')}\n.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}\n.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}\n.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}\n.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}\n.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}\n.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}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);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:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.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:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]),t.exports=e},function(t,e,i){i.r(e),e.default="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=="},function(t,e,i){i.r(e),e.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHZpZXdCb3g9IjAgMCA2MDAgNjAiCiAgIGhlaWdodD0iNjAiCiAgIHdpZHRoPSI2MDAiCiAgIGlkPSJzdmc0MjI1IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlua3NjYXBlOnZlcnNpb249IjAuOTEgcjEzNzI1IgogICBzb2RpcG9kaTpkb2NuYW1lPSJzcHJpdGVzaGVldC5zdmciCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT0iL2hvbWUvZnB1Z2EvZGV2ZWxvcG1lbnQvdXBzdHJlYW0vaWNhcnRvLkxlYWZsZXQuZHJhdy9zcmMvaW1hZ2VzL3Nwcml0ZXNoZWV0LTJ4LnBuZyIKICAgaW5rc2NhcGU6ZXhwb3J0LXhkcGk9IjkwIgogICBpbmtzY2FwZTpleHBvcnQteWRwaT0iOTAiPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQyNTgiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0MjU2IiAvPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBvYmplY3R0b2xlcmFuY2U9IjEwIgogICAgIGdyaWR0b2xlcmFuY2U9IjEwIgogICAgIGd1aWRldG9sZXJhbmNlPSIxMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTkyMCIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMDU2IgogICAgIGlkPSJuYW1lZHZpZXc0MjU0IgogICAgIHNob3dncmlkPSJmYWxzZSIKICAgICBpbmtzY2FwZTp6b29tPSIxLjMxMDE4NTIiCiAgICAgaW5rc2NhcGU6Y3g9IjIzNy41NjkyOCIKICAgICBpbmtzY2FwZTpjeT0iNy4yNDE5NjIxIgogICAgIGlua3NjYXBlOndpbmRvdy14PSIxOTIwIgogICAgIGlua3NjYXBlOndpbmRvdy15PSIyNCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9InN2ZzQyMjUiIC8+CiAgPGcKICAgICBpZD0iZW5hYmxlZCIKICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgIDxnCiAgICAgICBpZD0icG9seWxpbmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAxOCwzNiAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIyOSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzNiwxOCAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAyMy4xNDIsMzkuMTQ1IC0yLjI4NSwtMi4yOSAxNiwtMTUuOTk4IDIuMjg1LDIuMjg1IHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMyIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICAgIDxwYXRoCiAgICAgICBpZD0icG9seWdvbiIKICAgICAgIGQ9Ik0gMTAwLDI0LjU2NSA5Ny45MDQsMzkuMzk1IDgzLjA3LDQyIDc2LDI4Ljc3MyA4Ni40NjMsMTggWiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJyZWN0YW5nbGUiCiAgICAgICBkPSJtIDE0MCwyMCAyMCwwIDAsMjAgLTIwLDAgeiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJjaXJjbGUiCiAgICAgICBkPSJtIDIyMSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxwYXRoCiAgICAgICBpZD0ibWFya2VyIgogICAgICAgZD0ibSAyNzAsMTkgYyAtNC45NzEsMCAtOSw0LjAyOSAtOSw5IDAsNC45NzEgNS4wMDEsMTIgOSwxNCA0LjAwMSwtMiA5LC05LjAyOSA5LC0xNCAwLC00Ljk3MSAtNC4wMjksLTkgLTksLTkgeiBtIDAsMTIuNSBjIC0yLjQ4NCwwIC00LjUsLTIuMDE0IC00LjUsLTQuNSAwLC0yLjQ4NCAyLjAxNiwtNC41IDQuNSwtNC41IDIuNDg1LDAgNC41LDIuMDE2IDQuNSw0LjUgMCwyLjQ4NiAtMi4wMTUsNC41IC00LjUsNC41IHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxnCiAgICAgICBpZD0iZWRpdCIKICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiPgogICAgICA8cGF0aAogICAgICAgICBkPSJtIDMzNywzMC4xNTYgMCwwLjQwNyAwLDUuNjA0IGMgMCwxLjY1OCAtMS4zNDQsMyAtMywzIGwgLTEwLDAgYyAtMS42NTUsMCAtMywtMS4zNDIgLTMsLTMgbCAwLC0xMCBjIDAsLTEuNjU3IDEuMzQ1LC0zIDMsLTMgbCA2LjM0NSwwIDMuMTksLTMuMTcgLTkuNTM1LDAgYyAtMy4zMTMsMCAtNiwyLjY4NyAtNiw2IGwgMCwxMCBjIDAsMy4zMTMgMi42ODcsNiA2LDYgbCAxMCwwIGMgMy4zMTQsMCA2LC0yLjY4NyA2LC02IGwgMCwtOC44MDkgLTMsMi45NjgiCiAgICAgICAgIGlkPSJwYXRoNDI0MCIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNzIsMjQuNjM3IC04Ljg5Miw4Ljg5MiAtMi44MjgsMCAwLC0yLjgyOSA4Ljg5LC04Ljg5IHoiCiAgICAgICAgIGlkPSJwYXRoNDI0MiIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNjk3LDE3LjgyNiA0LDAgMCw0IC00LDAgeiIKICAgICAgICAgdHJhbnNmb3JtPSJtYXRyaXgoLTAuNzA2OTgzMzYsLTAuNzA3MjMwMTgsMC43MDcyMzAxOCwtMC43MDY5ODMzNiw1NjcuNTU5MTcsMjc0Ljc4MjczKSIKICAgICAgICAgaWQ9InBhdGg0MjQ0IgogICAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPC9nPgogICAgPGcKICAgICAgIGlkPSJyZW1vdmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzODEsNDIgMTgsMCAwLC0xOCAtMTgsMCAwLDE4IHogbSAxNCwtMTYgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IG0gLTQsMCAyLDAgMCwxNCAtMiwwIDAsLTE0IHogbSAtNCwwIDIsMCAwLDE0IC0yLDAgMCwtMTQgeiBtIC00LDAgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IgogICAgICAgICBpZD0icGF0aDQyNDciCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Im0gMzk1LDIwIDAsLTQgLTEwLDAgMCw0IC02LDAgMCwyIDIyLDAgMCwtMiAtNiwwIHogbSAtMiwwIC02LDAgMCwtMiA2LDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDI0OSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICA8L2c+CiAgPGcKICAgICBpZD0iZGlzYWJsZWQiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIwLDApIgogICAgIHN0eWxlPSJmaWxsOiNiYmJiYmIiPgogICAgPHVzZQogICAgICAgeGxpbms6aHJlZj0iI2VkaXQiCiAgICAgICBpZD0iZWRpdC1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgICA8dXNlCiAgICAgICB4bGluazpocmVmPSIjcmVtb3ZlIgogICAgICAgaWQ9InJlbW92ZS1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgPC9nPgogIDxwYXRoCiAgICAgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJjaXJjbGUtMyIKICAgICBkPSJtIDU4MS42NTcyNSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg=="},function(t,e,i){i.r(e),e.default="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="},function(t,e,i){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):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)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind(function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l;h++){if(r&&h%200==0){var f=(new Date).getTime()-d;if(f>a)break}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(),m=_[0]===i?_[1]:_[0];n.removeLayer(m)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var d=this._needsClustering;h<l;h++)(i=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.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 s=t.slice(),l=n;for(e=0;e<l;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;n>=0;n--){for(i=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[n]){i=!1;break}i&&t.call(e,r[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=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<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return 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)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||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))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&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))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),o[n].addObject(u,this._map.project(s.getLatLng(),n));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,r,function(r){var a,s=r._latlng,l=r._markers;for(n.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;i>=0;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,r,function(t){o.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)});r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),r=this._zoom+1,a=n.getZoom();i.length>0&&o>r;){r++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,n,o=t._markers;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,o=t._childClusters;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var o=n._markers.length-1;o>=0;o--){var r=n._markers[o];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,r;this._recursively(t,e-1,i-1,function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),o&&l===i&&o(this)),l<e||l<i)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},a=r[i]=r[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,r,a,s,l=this._grid;for(i in l)for(n in a=l[i])for(s=a[n],o=0,r=s.length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,i,n,o,r,a,s,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(o=this._grid[e])for(i=h-1;i<=h+1;i++)if(r=o[i])for(n=0,a=r.length;n<a;n++)s=r[n],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,r=0,a=null,s=[];for(i=e.length-1;i>=0;i--)n=e[i],(o=this.getDistant(n,t))>0&&(s.push(n),o>r&&(r=o,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,r=!1,a=null,s=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)&&(a=p,i=p.lat),(!1===n||p.lat<n)&&(s=p,n=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}n!==i?(c=s,u=a):(c=h,u=l);var d=[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t));return d}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,o=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,o):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,o):(o.y+=10,t=this._generatePointsCircle(e.length,o)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=o/this._2PI,a=this._2PI/t,s=[];for(r=Math.max(r,35),s.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*a,s[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return s},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,r=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)r=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=u.layerPointToLatLng(e[i]),o=new L.Polyline([p,s],_),u.addLayer(o),n._spiderLeg=o,f&&(r=o._path,a=r.getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)s=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),f&&(o=n._spiderLeg,(r=o._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,o,r,a,s=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,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(n=e._spiderLeg,o=n._path,r=o.getTotalLength()+.1,o.style.strokeDashoffset=r,n.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:s,markers:p})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,i){var n=i(1),o=i(24);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(26);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,'.marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}',""]),t.exports=e},function(t,e,i){var n=i(1),o=i(28);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(30);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]),t.exports=e}])},t.exports=i()}),xr=(Lr=wr)&&Lr.__esModule&&Object.prototype.hasOwnProperty.call(Lr,"default")?Lr.default:Lr,Cr=function(t){function e(e){var i=t.call(this)||this;return i._layer=new xr.FeatureGroup,i._crs=xr.CRS.EPSG3857,i._layer.__hpcc_layer=i,i}return l(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Mr=co("Albers").scale(.5),kr=co("AlbersUsaPr").scale(.5),Pr={project:function(t){var e=kr([t.lng,t.lat]);return e||(e=Mr([t.lng,t.lat])),new xr.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new xr.LatLng(0,0);var e=Mr.invert([t.x,t.y]);return new xr.LatLng(e[1],e[0])}},Ir=xr.Util.extend({},xr.CRS,{projection:Pr,transformation:new xr.Transformation(1,0,1,0),infinite:!0}),Er=function(t){function e(){var e=t.call(this)||this;return e._crs=Ir,e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new xr.LatLngBounds([20,-123],[49,-64])},e}(Cr);Er.prototype._class+=" map_AlbersLayer";var Ar=function(t){function e(){return t.call(this)||this}return l(e,t),e}(Cr);Ar.prototype._class+=" map_BlankLayer";var Tr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=Qo()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Cr);Tr.prototype._class+=" map_GMapLayer",Tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Sr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var i=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new xr.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token="+i,{attribution:'Map data © <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:i}))},e}(Cr);Sr.prototype._class+=" map_MapBoxLayer";var zr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <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"}))},e}(Cr);zr.prototype._class+=" map_MapBoxLayer";po(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Dr=function(t){function i(){var i=t.call(this)||this;return i._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",function(){i.zoomPlus()}),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",function(){i.zoomMinus()}),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",function(){i.zoomToFit()})]),i._blankLayer=new Ar,i._albersLayer=new Er,i._mapBoxLayer=new Sr,i._openStreetLayer=new zr,i._gmapLayer=new Tr,i.baseLayer(),i}return l(i,t),i.prototype.zoom=function(){return this._leafletMap.getZoom()},i.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},i.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},i.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},i.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter(function(t){return t.hasBounds()}).forEach(function(e){t?t.extend(e.getBounds()):t=e.getBounds()}),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},i.prototype.syncLayers=function(t,e,i){var n=this,o=u([],t),r=[],a=[];this._leafletMap.eachLayer(function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)}),o.forEach(function(t){t.layerEnter(n._leafletMap),t.layerUpdate(n._leafletMap)}),r.forEach(function(t){t.layerUpdate(n._leafletMap)}),a.forEach(function(t){t.layerExit(n._leafletMap)})},i.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},i.prototype.baseLayer=function(){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;case"None":default:this.map(this._blankLayer)}return this.map()},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),i.style("position","relative"),this._leafletElement=i.append("div").style("position","absolute").style("width",this.width()+"px").style("height",this.height()+"px"),this._iconBar.target(e)},i.prototype.update=function(e,i){var n=this;t.prototype.update.call(this,e,i),this._leafletElement.style("width",this.width()+"px").style("height",this.height()+"px");var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,i),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new xr.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",function(t){return n.layers().forEach(function(e){return e.zoomEnd(t)})}),this._leafletMap.on("moveend",function(t){return n.layers().forEach(function(e){return e.moveEnd(t)})}),this._leafletMap.on("viewreset",function(t){return n.layers().forEach(function(e){return e.viewReset(t)})}),this._renderCount=0),this.syncLayers(u([o],this.layers()),e,i),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady(function(){this.zoomToFit()},this),this._iconBar.visible(this.showToolbar()).render(function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left",n.width()-e.width-4+"px")})},i.prototype.exit=function(e,i){this._iconBar.target(null),t.prototype.exit.call(this,e,i)},i.prototype.render=function(e){var i=this,n=u([this.baseLayer().init()],this.layers().map(function(t){return t.init()}));return Promise.all(n).then(function(){t.prototype.render.call(i,e)}),this},i}(e.HTMLWidget);Dr.prototype._class+=" map_Leaflet",Dr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Dr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var Or=function(t){function i(i){void 0===i&&(i=!1);var n=t.call(this)||this;return n._layer=i?new xr.MarkerClusterGroup:new xr.FeatureGroup,n._layer.__hpcc_layer=n,e.Utility.SimpleSelectionMixin.call(n),n.layers([n]),n}return l(i,t),i.prototype.owner=function(t){this._owner=t},i.prototype.valid=function(){return!0},i.prototype.clear=function(){this._layer.clearLayers()},i.prototype.add=function(t){this._layer.addLayer(t)},i.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},i.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},i.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},i.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},i.prototype.hasBounds=function(){return!1},i.prototype.getBounds=function(){return this._layer.getBounds()},i.prototype.style=function(t,i){return void 0===i?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,i),this)},i.prototype.propValue=function(t,e,i){return(t<0?i:e[t])||i},i.prototype.layerEnter=function(t){t.addLayer(this._layer);var i=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(i)},i.prototype.layerUpdate=function(t){},i.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},i.prototype.zoomEnd=function(t){},i.prototype.moveEnd=function(t){},i.prototype.viewReset=function(t){},i}(Dr);Or.prototype._class+=" map_FeatureLayer",Or.prototype.mixin(e.Utility.SimpleSelectionMixin),Or.prototype.publishReset(["layers"]);var Nr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return l(e,t),e}(Or);Nr.prototype._class+=" map_ClusterLayer";var Br=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new xr.D3SvgOverlay).drawCallback(function(t,i){return e.layerUpdate(void 0,i)}),e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,i){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(Or),Zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e);var n=this.columns(),o=n.indexOf(this.latitudeColumn()),r=n.indexOf(this.longitudeColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());this.clear(),this.data().filter(function(t){return!i.omitNullLatLong()||!!t[o]&&!!t[r]}).forEach(function(t){i.add(new xr.Circle([t[o],t[r]],{color:i.propValue(a,t,i.strokeColor()),fill:!0,fillColor:i.propValue(s,t,i.fillColor()),fillOpacity:i.fillOpacity(),radius:i.radius(),origRow:t}).on("click",function(e){return i.clickHandler(e,t)}))})},e.prototype.clickHandler=function(t,e){},e}(Nr);Zr.prototype._class+=" map_Circles",Zr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("radius",50,"number","Radius (meters)"),Zr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Zr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Zr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Zr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter(function(t){return!n.omitNullLatLong()||!!t[a]&&!!t[s]}));c.enter().append("circle").merge(c).attr("cx",function(t){return i.latLngToLayerPoint(u(t)).x}).attr("cy",function(t){return i.latLngToLayerPoint(u(t)).y}).attr("r",Math.max(3/i.scale,this.radius()/i.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",function(t){return n.propValue(l,t,n.strokeColor())}).attr("stroke-width",Math.max(1/i.scale,1/i.metresPerPixel)).style("fill",function(t){return n.propValue(h,t,n.fillColor())}),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);jr.prototype._class+=" map_D3Circles",jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("radius",50,"number","Radius (meters)"),jr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),jr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),jr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});po(".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}");var Rr=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.createIcon=function(t,i,n){var o=e.hsl(i);return o.opacity=.5,new xr.DivIcon({className:"cluster-circle",iconSize:new xr.Point(40,40),html:"<div style='opacity:"+this.opacity()+";background-color:"+o.toString()+"'><div style='background-color:"+i+"'><span style='color:"+e.Palette.textColor(i)+"'>"+n(t)+"</span></div></div>"})},i.prototype.layerUpdate=function(i){var n=this;t.prototype.layerUpdate.call(this,i),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach(function(t){var e=new xr.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:n.createIcon(a(t),n._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",function(e){return n.clickHandler(e,t)});e.bindTooltip("Weight: "+a(t)),n.add(e)})},i.prototype.clickHandler=function(t,e){},i}(Or);Rr.prototype._class+=" map_ClusterCircles",Rr.prototype._palette=e.Palette.rainbow("default"),Rr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Rr.prototype._palette.switch()),Rr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Rr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Rr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Gr=function(t){function e(e,i){return t.call(this,e,h(h({},i),{onEachFeature:function(t,e){i.onEachFeature&&i.onEachFeature(t,e),function(t,e){var i=e.getLatLngs();i.forEach(function(t){t.forEach(function(t){if(Array.isArray(t)){var e=0,i=0,n=0,o=0;t.forEach(function(t){t.lat>-62&&(t.lng>165?++o:t.lng<-165&&++n,t.lng>0?++i:t.lng<0&&++e)}),n>0&&o>0&&t.forEach(function(t){t.lng>165&&e>i?t.lng-=360:t.lng<-165&&i>e&&(t.lng+=360)})}})}),e.setLatLngs(i)}(0,e)}}))||this}return l(e,t),e.prototype.addData=function(e){var i,n;if("Topology"===e.type){for(n in e.objects)e.objects.hasOwnProperty(n)&&(i=bo(e,e.objects[n]),t.prototype.addData.call(this,i));return this}return t.prototype.addData.call(this,e),this},e}(xr.GeoJSON),Hr=null,Ur=null,Wr=null,Fr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Hr&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Wr=bo((Hr=e).topology,Hr.topology.objects.states).features,Fr={},Wr)Wr[i].id&&(Fr[Hr.stateNames[Wr[i].id].code]=Wr[i]);t()})})),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Ur&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Wr=bo((Ur=e).topology,Ur.topology.objects.counties).features,Fr={},Wr)Wr[i].id&&(Fr[Wr[i].id]=Wr[i]);t()})})),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var i=new Gr(Wr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(i)}}(Or);po(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Vr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._dataMinWeight=null,i._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.hasBounds=function(){return!0},i.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new xr.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new xr.LatLngBounds([90,-180],[-90,180])},i.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var 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])})},i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),i},i.prototype.styleFeature=function(t){var 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()}},i.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},i.prototype.layerEnter=function(i){if(t.prototype.layerEnter.call(this,i),!this._svgElement){this._svgElement=e.select(i.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var n=this._svgElement.append("defs");new e.SVGGlowFilter(n,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},i.prototype.layerUpdate=function(e){var i=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Gr(this._features,{onEachFeature:function(t,e){e.on("click",function(t){return i.clickHandler(t,e,e.feature.properties.hpccID)})}}).bindTooltip(function(t){return i.tooltipHandler(t,t.feature.properties.hpccID)},{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle(function(t){return i.styleFeature(t)})},i.prototype.clickHandler=function(t,e,i){var n=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[i]),this.columns()[0],n),n},i.prototype.tooltipText=function(t,e){return e},i.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},i.prototype.click=function(t,e,i){},i}(Or);Vr.prototype._class+=" map_World",Vr.prototype._palette=e.Palette.rainbow("default"),Vr.prototype.mixin(e.Utility.SimpleSelectionMixin),Vr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Vr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Vr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Vr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Vr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Vr.prototype.publish("meshColor","black","html-color","Stroke Color"),Vr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Vr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Yr=null,qr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){Yr&&t(Yr),Ao(ko()+"/countries.json",function(e){t(Yr=e)})}).then(function(e){var i;for(var n in t._features=bo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[n].id){var o=t._features[n].id,r=null===(i=e.countryNames[o])||void 0===i?void 0:i.name;t._features[n].properties.hpccID=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},e}(Vr);function Xr(t,e){var i=t.indexOf(e);i>=0&&t.splice(i,1)}var Kr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var 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},e.prototype.save=function(){return{polylines:this._polylines.map(function(t){return t.getLatLngs()}),polygons:this._polygons.map(function(t){return t.getLatLngs()}),rectangles:this._rectangles.map(function(t){return t.getBounds()}),circles:this._circles.map(function(t){return{center:t.getLatLng(),radius:t.getRadius()}})}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map(function(t){return new xr.Polyline(t)}),this._polygons=(t.polygons||[]).map(function(t){return new xr.Polygon(t)}),this._rectangles=(t.rectangles||[]).map(function(t){return new xr.Rectangle(t)}),this._circles=(t.circles||[]).map(function(t){return new xr.Circle(t.center,{radius:t.radius})}),this._polylines.forEach(function(t){return e.add(t)}),this._polygons.forEach(function(t){return e.add(t)}),this._rectangles.forEach(function(t){return e.add(t)}),this._circles.forEach(function(t){return e.add(t)})},e.prototype.layerEnter=function(e){var i=this;t.prototype.layerEnter.call(this,e),e.on(xr.Draw.Event.CREATED,function(t){var e=t.layerType,n=t.layer;switch(e){case"polyline":i._polylines.push(n);break;case"polygon":i._polygons.push(n);break;case"rectangle":i._rectangles.push(n);break;case"circle":i._circles.push(n);break;default:alert(e)}i.add(n),i.changed("ADD",n)}),e.on(xr.Draw.Event.EDITED,function(t){t.layers.eachLayer(function(t){i.changed("UPDATE",t)})}),e.on(xr.Draw.Event.DELETED,function(t){t.layers.eachLayer(function(t){Xr(i._polylines,t),Xr(i._polygons,t),Xr(i._rectangles,t),Xr(i._circles,t),i.changed("DELETE",t)})})},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i=this.drawOptions(),n=o.hashSum(i);this._drawOptionsHash!==n&&(this._drawOptionsHash=n,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new xr.Control.Draw({position:"topleft",draw:i,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(Or);Kr.prototype._class+=" map_DrawLayer",Kr.prototype.publish("opacity",1,"number","Layer Opacity"),Kr.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Kr.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Kr.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Kr.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter(function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]}).map(function(t){return n?n.extend([t[r],t[a]]):n=new xr.LatLngBounds([t[r],t[a]]),[t[r],t[a],i.weightColumn_exists()?t[s]:.5]}),h=new xr.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return n},this.add(h)},e}(Or);Jr.prototype._class+=" map_Heat",Jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Jr.prototype.publish("opacity",.5,"number","Layer Opacity"),Jr.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),Jr.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),Jr.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),Jr.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),Jr.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var Qr=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,i){var n=this;if(t.prototype.layerUpdate.call(this,e),i){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter(function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]}).forEach(function(t){var e=new xr.Marker([t[r],t[a]],i(t)).on("click",function(i){return n.clickHandler(i,e,t)}),o=n.tooltipText(n.rowToObj(t),n.propValue(s,t,""));o&&e.bindTooltip(o,{direction:n.tooltipDirection(),offset:xr.point(n.tooltipOffsetX(),n.tooltipOffsetY())});var h=n.popupText(n.rowToObj(t),n.propValue(l,t,""));h&&e.bindPopup(h,{offset:xr.point(n.popupOffsetX(),n.popupOffsetY())}),n.add(e)}))}},e.prototype.clickHandler=function(t,e,i){var n=this._selection.click(e._icon);this._currSelRow=n?i:void 0,this.click(this.rowToObj(i),"",n)},e.prototype.click=function(t,e,i){},e}(Nr);Qr.prototype._class+=" map_Markers",Qr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Qr.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),Qr.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),Qr.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var $r=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:new xr.Icon({iconUrl:i.propValue(n,t,i.iconUrl()),iconSize:[i.iconWidth(),i.iconHeight()],iconAnchor:[i.iconAnchorX(),i.iconAnchorY()],props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);$r.prototype._class+=" map_Icons",$r.prototype.publish("iconUrl","","string","Icon URL",null),$r.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),$r.prototype.publish("iconWidth",32,"number","Icon width"),$r.prototype.publish("iconHeight",32,"number","Icon height"),$r.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),$r.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ta=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}($r);function ea(t){return[t[1],t[0]]}ta.prototype._class+=" map_ClusterIcons";var ia=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},na=function(t){return t>90?t-360:t},oa=function(t){return t<-90?t+360:t},ra=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.fixDateLine=function(t){var e,i=t.reduce(ia,[0,0]),n=i[0],o=i[1];return n&&o?t.map((e=n>o?na:oa,function(t){return[e(t[0]),t[1]]})):t},i.prototype.hasBounds=function(){return!0},i.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var i=this.cellFunc(this.polygonColumn(),[]),n=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,n);this.clear(),o.forEach(function(e){t.add(new xr.Polygon(t.fixDateLine(i(e)).map(ea),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(n(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",function(i){return t.clickHandler(i,e)}))})},i.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},i.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},i.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},i.prototype.clickHandler=function(t,e){},i}(Or);ra.prototype._class+=" map_Polygons",ra.prototype._palette=e.Palette.rainbow("default"),ra.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ra.prototype._palette.switch(),{tags:["Basic","Shared"]}),ra.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ra.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var aa=2048/Math.PI,sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t,e=this.columns(),i=e.indexOf(this.latitudeColumn()),n=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach(function(e){var r=[e[n],e[i]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r}),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||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);var r=i.latLngToLayerPoint({lat:0,lng:0}),a=co("Mercator").scale(aa).translate([r.x,r.y]),s=un().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter(function(t){return!n.isNull2(t.coordinates)}));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/i.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);sa.prototype._class+=" map_Path",sa.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),sa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var la=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),i=t.indexOf(this.longitudeColumn()),n=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach(function(t){var a=[t[i],t[e]],s=[t[o],t[n]];r.push({type:"LineString",coordinates:[a,s]})}),r},e}(sa);la.prototype._class+=" map_Lines",la.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),la.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});var ha=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns(),o=n.indexOf(this.faCharColumn()),r=n.indexOf(this.faCharColorColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:xr.BeautifyIcon({iconShape:"marker",icon:i.propValue(o,t,i.faChar()),textColor:i.propValue(r,t,i.faCharColor()),borderColor:i.propValue(a,t,i.strokeColor()),backgroundColor:i.propValue(s,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);ha.prototype._class+=" map_Pins",ha.prototype.publish("faChar","fa-circle","string","Default font awesome character"),ha.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),ha.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ha.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ha.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});var ua=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}(ha);ua.prototype._class+=" map_ClusterPins";var ca={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"]},pa={};function da(t){return pa[t]||(pa[t]={topology:void 0,nameIdx:{},codeIdx:{}}),pa[t]}var fa=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.fetchTopo=function(t){return da(t).topology?Promise.resolve(da(t).topology):new Promise(function(e,i){Ao(ko()+"/"+t+".json",function(i){da(t).topology=i,e(i)})})},e.prototype.fetchTopoIdx=function(t){for(var e in da(t).nameIdx)return Promise.resolve(da(t).nameIdx);return new Promise(function(e,i){Ao(ko()+"/"+t+"_idx.json",function(i){var n,o=da(t),r=o.nameIdx,a=o.codeIdx;null===(n=ca[t])||void 0===n||n.forEach(function(t){var e=function(e){var n=i[t][e];Array.isArray(n)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(n),1===n.length&&(r[e].code=r[e].codes[0]),n.forEach(function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),n.length<=a[t].score&&(a[t].name=e,a[t].score=n.length),a[t].names.push(e)}))};for(var n in i[t])e(n)}),e(r)})})},e.prototype.updateDataMap=function(e){var i=[],n=da(this.region()).nameIdx;return e.forEach(function(t){var e,o=null===(e=n[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach(function(e){i.push([e,t[1],t])}):i.push([t[0],t[1],t])}),t.prototype.updateDataMap.call(this,i)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then(function(e){var i=e[0];e[1];for(var n in t._features=bo(i,i.objects.PolbndA).features,t._features){var o=t._features[n].id||n;t._features[n].properties.hpccID=o}t.updateDataMap(t.data())})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i,n=this._dataMap[e],o=da(this.region()).codeIdx,r=n&&n[1]||"",a=null===(i=o[e])||void 0===i?void 0:i.names.map(function(t){var i;return(null===(i=o[e])||void 0===i?void 0:i.name)===t?"<u>"+t+"</u>":t}).join(", ");return this.tooltipText(this.rowToObj(n),"<b>"+(n&&n[2][0]||a||e)+"</b>: "+r)},e}(Vr);fa.prototype._class+=" map_Region",fa.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 _a=function(t){function i(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(i,t),i.prototype.layerUpdate=function(i){var n=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,i,function(t){var i=n.propValue(r,t,n.text()),o=n.textSize(i,n.fontFamily(),n.fontSize());return n.textFormat_exists()&&(i=e.format(n.textFormat())(i)),{icon:xr.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+n.textOffsetX(),o.height/2+n.textOffsetY()],html:'<span style="\n '+(n.fontFamily_exists()?"font-family:"+n.fontFamily()+";":"")+"\n font-size:"+n.fontSize()+'px;\n pointer-events: none;\n white-space:nowrap;\n ">'+i+"</span>",textColor:n.propValue(a,t,n.textColor()),borderColor:n.propValue(s,t,n.strokeColor()),backgroundColor:n.propValue(l,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}})},i}(Qr);_a.prototype._class+=" map_Text",_a.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),_a.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),_a.prototype.publish("text","","string","Default text"),_a.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),_a.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),_a.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),_a.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),_a.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),_a.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var ma=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new xr.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Vr),ga=null,ya={},va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ga&&t(ga),Ao(ko()+"/us-counties.json",function(e){t(ga=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[i].id){var n=t._features[i].id,o=e.countyNames[n];t._features[i].properties.hpccID=n,ya[n]=o}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+ya[e]+"</b>: "+n)},e}(ma);va.prototype._class+=" map_USCounties";var ba=null,La={},wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ba&&t(ba),Ao(ko()+"/us-states.json",function(e){t(ba=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.states).features,t._features)if(t._features[i].id){var n=e.stateNames[t._features[i].id],o=n.code,r=n.name;t._features[i].properties.hpccID=o,La[o]=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+La[e]+"</b>: "+n)},e}(ma);wa.prototype._class+=" map_USStates";var xa=Object.freeze({__proto__:null,Circles:Zr,D3Circles:jr,ClusterCircles:Rr,Countries:qr,DrawLayer:Kr,FeatureLayer:Or,ClusterLayer:Nr,D3SurfaceLayer:Br,HeatLayer:Jr,Icons:$r,ClusterIcons:ta,Leaflet:Dr,Markers:Qr,Polygons:ra,Path:sa,Lines:la,Pins:ha,ClusterPins:ua,Region:fa,Text:_a,TileLayer:Cr,USCounties:va,USStates:wa,World:Vr});t.BUILD_VERSION="2.94.0",t.CanvasPinLayer=yo,t.CanvasPins=b,t.Choropleth=Po,t.ChoroplethContinents=Oo,t.ChoroplethCounties=jo,t.ChoroplethCountries=Do,t.ChoroplethStates=Uo,t.ChoroplethStatesHeat=Wo,t.GMap=tr,t.GMapCounties=nr,t.GMapGraph=or,t.GMapHeat=rr,t.GMapLayered=ir,t.GMapPin=sr,t.GMapPinLine=hr,t.GeoHash=Fo,t.Graph=ur,t.Graticule=cr,t.Heat=pr,t.IChoropleth=dr,t.Layer=go,t.Layered=_o,t.Leaflet=xa,t.Lines=lr,t.OpenStreet=yr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.68.0",t.Pins=ar,t.TestHeatMap=vr,t.TopoJSONChoropleth=br,t.projections=ho,t.requireGoogleMap=Qo,t.requireGoogleMapTimeout=function(t){Jo=t},t.resolve=co,t.topoJsonFolder=ko,t.types=lo,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|