代码拉取完成,页面将自动刷新
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.L={})}(this,function(t){"use strict";var n=Object.freeze;function u(t){for(var n,e,i=1,r=arguments.length;i<r;i++)for(n in e=arguments[i])t[n]=e[n];return t}Object.freeze=function(t){return t};var o=Object.create||function(t){return e.prototype=t,new e};function e(){}function f(t,n){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var i=e.call(arguments,2);return function(){return t.apply(n,i.length?i.concat(e.call(arguments)):arguments)}}var i=0;function p(t){return t._leaflet_id=t._leaflet_id||++i,t._leaflet_id}function r(t,n,e){var i,r,o,a=function(){i=!1,r&&(o.apply(e,r),r=!1)};return o=function(){i?r=arguments:(t.apply(e,arguments),setTimeout(a,n),i=!0)}}function a(t,n,e){var i=n[1],r=n[0],n=i-r;return t===i&&e?t:((t-r)%n+n)%n+r}function s(){return!1}function l(t,n){return n=void 0===n?6:n,+(Math.round(t+"e+"+n)+"e-"+n)}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return h(t).split(/\s+/)}function d(t,n){for(var e in t.hasOwnProperty("options")||(t.options=t.options?o(t.options):{}),n)t.options[e]=n[e];return t.options}function _(t,n,e){var i,r=[];for(i in t)r.push(encodeURIComponent(e?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(n&&-1!==n.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(m,function(t,n){n=e[n];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,n){for(var e=0;e<t.length;e++)if(t[e]===n)return e;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function M(t){var n=+new Date,e=Math.max(0,16-(n-w));return w=n+e,window.setTimeout(t,e)}var T=window.requestAnimationFrame||x("RequestAnimationFrame")||M,P=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,n,e){if(!e||T!==M)return T.call(window,f(t,n));t.call(n)}function C(t){t&&P.call(window,t)}var S=(Object.freeze||Object)({freeze:n,extend:u,create:o,bind:f,lastId:i,stamp:p,throttle:r,wrapNum:a,falseFn:s,formatNum:l,trim:h,splitWords:c,setOptions:d,getParamString:_,template:g,isArray:v,indexOf:y,emptyImageUrl:b,requestFn:T,cancelFn:P,requestAnimFrame:k,cancelAnimFrame:C});function E(){}E.extend=function(t){function n(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var e,i=n.__super__=this.prototype,r=o(i);for(e in(r.constructor=n).prototype=r,this)this.hasOwnProperty(e)&&"prototype"!==e&&"__super__"!==e&&(n[e]=this[e]);return t.statics&&(u(n,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var n=0;n<t.length;n++)t[n]===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),u.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=u(o(r.options),t.options)),u(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,n=r._initHooks.length;t<n;t++)r._initHooks[t].call(this)}},n},E.include=function(t){return u(this.prototype,t),this},E.mergeOptions=function(t){return u(this.prototype.options,t),this},E.addInitHook=function(t){var n=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var A={on:function(t,n,e){if("object"==typeof t)for(var i in t)this._on(i,t[i],n);else for(var r=0,o=(t=c(t)).length;r<o;r++)this._on(t[r],n,e);return this},off:function(t,n,e){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],n);else for(var r=0,o=(t=c(t)).length;r<o;r++)this._off(t[r],n,e);else delete this._events;return this},_on:function(t,n,e){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),e===this&&(e=void 0);for(var t={fn:n,ctx:e},r=i,o=0,a=r.length;o<a;o++)if(r[o].fn===n&&r[o].ctx===e)return;r.push(t)},_off:function(t,n,e){var i,r,o;if(this._events&&(i=this._events[t]))if(n){if(e===this&&(e=void 0),i)for(r=0,o=i.length;r<o;r++){var a=i[r];if(a.ctx===e&&a.fn===n)return a.fn=s,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(r,1)}}else{for(r=0,o=i.length;r<o;r++)i[r].fn=s;delete this._events[t]}},fire:function(t,n,e){if(!this.listens(t,e))return this;var i=u({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,i)}this._firingCount--}}return e&&this._propagateEvent(i),this},listens:function(t,n){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(n)for(var i in this._eventParents)if(this._eventParents[i].listens(t,n))return!0;return!1},once:function(t,n,e){if("object"==typeof t){for(var i in t)this.once(i,t[i],n);return this}var r=f(function(){this.off(t,n,e).off(t,r,e)},this);return this.on(t,n,e).on(t,r,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,u({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 z=E.extend(A);function N(t,n,e){this.x=e?Math.round(t):t,this.y=e?Math.round(n):n}var I=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function O(t,n,e){return t instanceof N?t:v(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,n,e)}function B(t,n){if(t)for(var e=n?[t,n]:t,i=0,r=e.length;i<r;i++)this.extend(e[i])}function R(t,n){return!t||t instanceof B?t:new B(t,n)}function D(t,n){if(t)for(var e=n?[t,n]:t,i=0,r=e.length;i<r;i++)this.extend(e[i])}function Z(t,n){return t instanceof D?t:new D(t,n)}function F(t,n,e){if(isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n,void 0!==e&&(this.alt=+e)}function j(t,n,e){return t instanceof F?t:v(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===n?null:new F(t,n,e)}N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(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 N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(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=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var n=(t=O(t)).x-this.x,t=t.y-this.y;return Math.sqrt(n*n+t*t)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},B.prototype={extend:function(t){return t=O(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 N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new N(this.min.x,this.max.y)},getTopRight:function(){return new N(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,e;return(t=("number"==typeof t[0]||t instanceof N?O:R)(t))instanceof B?(n=t.min,e=t.max):n=e=t,n.x>=this.min.x&&e.x<=this.max.x&&n.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=R(t);var n=this.min,e=this.max,i=t.min,r=t.max,t=r.x>=n.x&&i.x<=e.x,e=r.y>=n.y&&i.y<=e.y;return t&&e},overlaps:function(t){t=R(t);var n=this.min,e=this.max,i=t.min,r=t.max,t=r.x>n.x&&i.x<e.x,e=r.y>n.y&&i.y<e.y;return t&&e},isValid:function(){return!(!this.min||!this.max)}},D.prototype={extend:function(t){var n,e,i=this._southWest,r=this._northEast;if(t instanceof F)e=n=t;else{if(!(t instanceof D))return t?this.extend(j(t)||Z(t)):this;if(n=t._southWest,e=t._northEast,!n||!e)return this}return i||r?(i.lat=Math.min(n.lat,i.lat),i.lng=Math.min(n.lng,i.lng),r.lat=Math.max(e.lat,r.lat),r.lng=Math.max(e.lng,r.lng)):(this._southWest=new F(n.lat,n.lng),this._northEast=new F(e.lat,e.lng)),this},pad:function(t){var n=this._southWest,e=this._northEast,i=Math.abs(n.lat-e.lat)*t,t=Math.abs(n.lng-e.lng)*t;return new D(new F(n.lat-i,n.lng-t),new F(e.lat+i,e.lng+t))},getCenter:function(){return new F((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 F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(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 F||"lat"in t?j:Z)(t);var n,e,i=this._southWest,r=this._northEast;return t instanceof D?(n=t.getSouthWest(),e=t.getNorthEast()):n=e=t,n.lat>=i.lat&&e.lat<=r.lat&&n.lng>=i.lng&&e.lng<=r.lng},intersects:function(t){t=Z(t);var n=this._southWest,e=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),t=r.lat>=n.lat&&i.lat<=e.lat,e=r.lng>=n.lng&&i.lng<=e.lng;return t&&e},overlaps:function(t){t=Z(t);var n=this._southWest,e=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),t=r.lat>n.lat&&i.lat<e.lat,e=r.lng>n.lng&&i.lng<e.lng;return t&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,n){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n))},isValid:function(){return!(!this._southWest||!this._northEast)}};var U={latLngToPoint:function(t,n){t=this.projection.project(t),n=this.scale(n);return this.transformation._transform(t,n)},pointToLatLng:function(t,n){n=this.scale(n),n=this.transformation.untransform(t,n);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 n=this.projection.bounds,t=this.scale(t);return new B(this.transformation.transform(n.min,t),this.transformation.transform(n.max,t))},infinite:!(F.prototype={equals:function(t,n){return!!t&&(t=j(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===n?1e-9:n))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return q.distance(this,j(t))},wrap:function(){return q.wrapLatLng(this)},toBounds:function(t){var n=180*t/40075017,t=n/Math.cos(Math.PI/180*this.lat);return Z([this.lat-n,this.lng-t],[this.lat+n,this.lng+t])},clone:function(){return new F(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var n=this.wrapLng?a(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?a(t.lat,this.wrapLat,!0):t.lat,n,t.alt)},wrapLatLngBounds:function(t){var n=t.getCenter(),e=this.wrapLatLng(n),i=n.lat-e.lat,n=n.lng-e.lng;if(0==i&&0==n)return t;e=t.getSouthWest(),t=t.getNorthEast();return new D(new F(e.lat-i,e.lng-n),new F(t.lat-i,t.lng-n))}},q=u({},U,{wrapLng:[-180,180],R:6371e3,distance:function(t,n){var e=Math.PI/180,i=t.lat*e,r=n.lat*e,o=Math.sin((n.lat-t.lat)*e/2),e=Math.sin((n.lng-t.lng)*e/2),e=o*o+Math.cos(i)*Math.cos(r)*e*e,e=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e));return this.R*e}}),W=6378137,H={R:W,MAX_LATITUDE:85.0511287798,project:function(t){var n=Math.PI/180,e=this.MAX_LATITUDE,e=Math.max(Math.min(e,t.lat),-e),e=Math.sin(e*n);return new N(this.R*t.lng*n,this.R*Math.log((1+e)/(1-e))/2)},unproject:function(t){var n=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*n,t.x*n/this.R)},bounds:new B([-(vt=W*Math.PI),-vt],[vt,vt])};function V(t,n,e,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=n,this._c=e,this._d=i}function Y(t,n,e,i){return new V(t,n,e,i)}V.prototype={transform:function(t,n){return this._transform(t.clone(),n)},_transform:function(t,n){return n=n||1,t.x=n*(this._a*t.x+this._b),t.y=n*(this._c*t.y+this._d),t},untransform:function(t,n){return n=n||1,new N((t.x/n-this._b)/this._a,(t.y/n-this._d)/this._c)}};var G=u({},q,{code:"EPSG:3857",projection:H,transformation:Y(yt=.5/(Math.PI*H.R),.5,-yt,.5)}),X=u({},G,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t,n){for(var e,i,r,o,a="",s=0,u=t.length;s<u;s++){for(e=0,i=(r=t[s]).length;e<i;e++)a+=(e?"L":"M")+(o=r[e]).x+" "+o.y;a+=n?Tt?"z":"x":""}return a||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,tt=Q&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),et=kt("webkit"),it=kt("android"),rt=kt("android 2")||kt("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=it&&kt("Google")&&ot<537&&!("AudioNode"in window),st=!!window.opera,ut=kt("chrome"),lt=kt("gecko")&&!et&&!st&&!Q,ht=!ut&&kt("safari"),ct=kt("phantom"),ft="OTransition"in J,dt=0===navigator.platform.indexOf("Win"),pt=Q&&"transition"in J,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,mt="MozPerspective"in J,gt=!window.L_DISABLE_3D&&(pt||_t||mt)&&!ft&&!ct,W="undefined"!=typeof orientation||kt("mobile"),vt=W&&et,yt=W&&_t,ot=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!ot),xt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),wt=W&&st,J=W&<,Mt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Lt=!!document.createElement("canvas").getContext,Tt=!(!document.createElementNS||!K("svg").createSVGRect),Pt=!Tt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var st=(Object.freeze||Object)({ie:Q,ielt9:tt,edge:nt,webkit:et,android:it,android23:rt,androidStock:at,opera:st,chrome:ut,gecko:lt,safari:ht,phantom:ct,opera12:ft,win:dt,ie3d:pt,webkit3d:_t,gecko3d:mt,any3d:gt,mobile:W,mobileWebkit:vt,mobileWebkit3d:yt,msPointer:ot,pointer:bt,touch:xt,mobileOpera:wt,mobileGecko:J,retina:Mt,canvas:Lt,svg:Tt,vml:Pt}),Ct=ot?"MSPointerDown":"pointerdown",St=ot?"MSPointerMove":"pointermove",Et=ot?"MSPointerUp":"pointerup",At=ot?"MSPointerCancel":"pointercancel",zt=["INPUT","SELECT","OPTION"],Nt={},It=!1,Ot=0;function Bt(t,n,e,i){return"touchstart"===n?(s=t,u=e,l=i,h=f(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(zt.indexOf(t.target.tagName)<0))return;An(t)}Ft(t,u)}),s["_leaflet_touchstart"+l]=h,s.addEventListener(Ct,h,!1),It||(document.documentElement.addEventListener(Ct,Rt,!0),document.documentElement.addEventListener(St,Dt,!0),document.documentElement.addEventListener(Et,Zt,!0),document.documentElement.addEventListener(At,Zt,!0),It=!0)):"touchmove"===n?(a=e,(h=t)["_leaflet_touchmove"+i]=c,h.addEventListener(St,c,!1)):"touchend"===n&&(o=e,(t=t)["_leaflet_touchend"+i]=r,t.addEventListener(Et,r,!1),t.addEventListener(At,r,!1)),this;function r(t){Ft(t,o)}var o,a,s,u,l,h;function c(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Ft(t,a)}}function Rt(t){Nt[t.pointerId]=t,Ot++}function Dt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Zt(t){delete Nt[t.pointerId],Ot--}function Ft(t,n){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],n(t)}var jt=ot?"MSPointerDown":bt?"pointerdown":"touchstart",Ut=ot?"MSPointerUp":bt?"pointerup":"touchend",qt="_leaflet_";var Wt,Ht,Vt,Yt,Gt,Xt,Kt=dn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),$t=dn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Jt="webkitTransition"===$t||"OTransition"===$t?$t+"End":"transitionend";function Qt(t){return"string"==typeof t?document.getElementById(t):t}function tn(t,n){var e=t.style[n]||t.currentStyle&&t.currentStyle[n];return e&&"auto"!==e||!document.defaultView||(e=(t=document.defaultView.getComputedStyle(t,null))?t[n]:null),"auto"===e?null:e}function nn(t,n,e){t=document.createElement(t);return t.className=n||"",e&&e.appendChild(t),t}function en(t){var n=t.parentNode;n&&n.removeChild(t)}function rn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function on(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function an(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function sn(t,n){if(void 0!==t.classList)return t.classList.contains(n);t=cn(t);return 0<t.length&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(t)}function un(t,n){var e;if(void 0!==t.classList)for(var i=c(n),r=0,o=i.length;r<o;r++)t.classList.add(i[r]);else sn(t,n)||hn(t,((e=cn(t))?e+" ":"")+n)}function ln(t,n){void 0!==t.classList?t.classList.remove(n):hn(t,h((" "+cn(t)+" ").replace(" "+n+" "," ")))}function hn(t,n){void 0===t.className.baseVal?t.className=n:t.className.baseVal=n}function cn(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function fn(t,n){"opacity"in t.style?t.style.opacity=n:"filter"in t.style&&function(t,n){var e=!1,i="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(i)}catch(t){if(1===n)return}n=Math.round(100*n),e?(e.Enabled=100!==n,e.Opacity=n):t.style.filter+=" progid:"+i+"(opacity="+n+")"}(t,n)}function dn(t){for(var n=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in n)return t[e];return!1}function pn(t,n,e){n=n||new N(0,0);t.style[Kt]=(pt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function _n(t,n){t._leaflet_pos=n,gt?pn(t,n):(t.style.left=n.x+"px",t.style.top=n.y+"px")}function mn(t){return t._leaflet_pos||new N(0,0)}function gn(){Mn(window,"dragstart",An)}function vn(){Tn(window,"dragstart",An)}function yn(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(bn(),Vt=(Ht=t).style.outline,t.style.outline="none",Mn(window,"keydown",bn))}function bn(){Ht&&(Ht.style.outline=Vt,Vt=Ht=void 0,Tn(window,"keydown",bn))}function xn(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function wn(t){var n=t.getBoundingClientRect();return{x:n.width/t.offsetWidth||1,y:n.height/t.offsetHeight||1,boundingClientRect:n}}Xt="onselectstart"in document?(Gt=function(){Mn(window,"selectstart",An)},function(){Tn(window,"selectstart",An)}):(Yt=dn(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Gt=function(){var t;Yt&&(t=document.documentElement.style,Wt=t[Yt],t[Yt]="none")},function(){Yt&&(document.documentElement.style[Yt]=Wt,Wt=void 0)});ct=(Object.freeze||Object)({TRANSFORM:Kt,TRANSITION:$t,TRANSITION_END:Jt,get:Qt,getStyle:tn,create:nn,remove:en,empty:rn,toFront:on,toBack:an,hasClass:sn,addClass:un,removeClass:ln,setClass:hn,getClass:cn,setOpacity:fn,testProp:dn,setTransform:pn,setPosition:_n,getPosition:mn,disableTextSelection:Gt,enableTextSelection:Xt,disableImageDrag:gn,enableImageDrag:vn,preventOutline:yn,restoreOutline:bn,getSizedParentNode:xn,getScale:wn});function Mn(t,n,e,i){if("object"==typeof n)for(var r in n)Pn(t,r,n[r],e);else for(var o=0,a=(n=c(n)).length;o<a;o++)Pn(t,n[o],e,i);return this}var Ln="_leaflet_events";function Tn(t,n,e,i){if("object"==typeof n)for(var r in n)kn(t,r,n[r],e);else if(n)for(var o=0,a=(n=c(n)).length;o<a;o++)kn(t,n[o],e,i);else{for(var s in t[Ln])kn(t,s,t[Ln][s]);delete t[Ln]}return this}function Pn(n,t,e,i){var r=t+p(e)+(i?"_"+p(i):"");if(n[Ln]&&n[Ln][r])return this;var o,a,s,u,l,h=function(t){return e.call(i||n,t||window.event)},c=h;function f(t){var n,e;if(bt){if(!nt||"mouse"===t.pointerType)return;e=Ot}else e=t.touches.length;1<e||(e=(n=Date.now())-(s||n),u=t.touches?t.touches[0]:t,l=0<e&&e<=250,s=n)}function d(t){if(l&&!u.cancelBubble){if(bt){if(!nt||"mouse"===t.pointerType)return;var n,e,i={};for(e in u)n=u[e],i[e]=n&&n.bind?n.bind(u):n;u=i}u.type="dblclick",u.button=0,a(u),s=null}}bt&&0===t.indexOf("touch")?Bt(n,t,h,r):!xt||"dblclick"!==t||bt&&ut?"addEventListener"in n?"mousewheel"===t?n.addEventListener("onwheel"in n?"wheel":"mousewheel",h,!1):"mouseenter"===t||"mouseleave"===t?(h=function(t){t=t||window.event,Fn(n,t)&&c(t)},n.addEventListener("mouseenter"===t?"mouseover":"mouseout",h,!1)):("click"===t&&it&&(h=function(t){!function(t,n){var e=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=Bn&&e-Bn;if(i&&100<i&&i<500||t.target._simulatedClick&&!t._simulated)return zn(t);Bn=e,n(t)}(t,c)}),n.addEventListener(t,h,!1)):"attachEvent"in n&&n.attachEvent("on"+t,h):(a=h,l=!1,(o=n)[qt+jt+(t=r)]=f,o[qt+Ut+t]=d,o[qt+"dblclick"+t]=a,o.addEventListener(jt,f,!1),o.addEventListener(Ut,d,!1),o.addEventListener("dblclick",a,!1)),n[Ln]=n[Ln]||{},n[Ln][r]=h}function kn(t,n,e,i){var r,o,a=n+p(e)+(i?"_"+p(i):""),e=t[Ln]&&t[Ln][a];if(!e)return this;bt&&0===n.indexOf("touch")?(o=(r=t)["_leaflet_"+(i=n)+a],"touchstart"===i?r.removeEventListener(Ct,o,!1):"touchmove"===i?r.removeEventListener(St,o,!1):"touchend"===i&&(r.removeEventListener(Et,o,!1),r.removeEventListener(At,o,!1))):!xt||"dblclick"!==n||bt&&ut?"removeEventListener"in t?"mousewheel"===n?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",e,!1):t.removeEventListener("mouseenter"===n?"mouseover":"mouseleave"===n?"mouseout":n,e,!1):"detachEvent"in t&&t.detachEvent("on"+n,e):(n=(r=t)[qt+jt+(o=a)],e=r[qt+Ut+o],o=r[qt+"dblclick"+o],r.removeEventListener(jt,n,!1),r.removeEventListener(Ut,e,!1),nt||r.removeEventListener("dblclick",o,!1)),t[Ln][a]=null}function Cn(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Zn(t),this}function Sn(t){return Pn(t,"mousewheel",Cn),this}function En(t){return Mn(t,"mousedown touchstart dblclick",Cn),Pn(t,"click",Dn),this}function An(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function zn(t){return An(t),Cn(t),this}function Nn(t,n){if(!n)return new N(t.clientX,t.clientY);var e=wn(n),i=e.boundingClientRect;return new N((t.clientX-i.left)/e.x-n.clientLeft,(t.clientY-i.top)/e.y-n.clientTop)}var In=dt&&ut?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function On(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/In: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 Bn,Rn={};function Dn(t){Rn[t.type]=!0}function Zn(t){var n=Rn[t.type];return Rn[t.type]=!1,n}function Fn(t,n){var e=n.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var ft=(Object.freeze||Object)({on:Mn,off:Tn,stopPropagation:Cn,disableScrollPropagation:Sn,disableClickPropagation:En,preventDefault:An,stop:zn,getMousePosition:Nn,getWheelDelta:On,fakeStop:Dn,skipped:Zn,isExternalTarget:Fn,addListener:Mn,removeListener:Tn}),jn=z.extend({run:function(t,n,e,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=mn(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,e=1e3*this._duration;n<e?this._runFrame(this._easeOut(n/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,n){t=this._startPos.add(this._offset.multiplyBy(t));n&&t._round(),_n(this._el,t),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Un=z.extend({options:{crs:G,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,n){n=d(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=f(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),void 0!==n.zoom&&(this._zoom=this._limitZoom(n.zoom)),n.center&&void 0!==n.zoom&&this.setView(j(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=$t&>&&!wt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Mn(this._proxy,Jt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,e){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(j(t),n,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e&&(void 0!==e.animate&&(e.zoom=u({animate:e.animate},e.zoom),e.pan=u({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,e.zoom):this._tryAnimatedPan(t,e.pan))?clearTimeout(this._sizeTimer):this._resetView(t,n),this},setZoom:function(t,n){return this._loaded?this.setView(this.getCenter(),t,{zoom:n}):(this._zoom=t,this)},zoomIn:function(t,n){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,n)},zoomOut:function(t,n){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,n)},setZoomAround:function(t,n,e){var i=this.getZoomScale(n),r=this.getSize().divideBy(2),i=(t instanceof N?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/i),i=this.containerPointToLatLng(r.add(i));return this.setView(i,n,{zoom:e})},_getBoundsCenterZoom:function(t,n){n=n||{},t=t.getBounds?t.getBounds():Z(t);var e=O(n.paddingTopLeft||n.padding||[0,0]),i=O(n.paddingBottomRight||n.padding||[0,0]),r=this.getBoundsZoom(t,!1,e.add(i));if((r="number"==typeof n.maxZoom?Math.min(n.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};i=i.subtract(e).divideBy(2),e=this.project(t.getSouthWest(),r),t=this.project(t.getNorthEast(),r);return{center:this.unproject(e.add(t).divideBy(2).add(i),r),zoom:r}},fitBounds:function(t,n){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");t=this._getBoundsCenterZoom(t,n);return this.setView(t.center,t.zoom,n)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,n){return this.setView(t,this._zoom,{pan:n})},panBy:function(t,n){return n=n||{},(t=O(t).round()).x||t.y?(!0===n.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new jn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),!1!==n.animate?(un(this._mapPane,"leaflet-pan-anim"),e=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,e,n.duration||.25,n.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var e},flyTo:function(i,r,t){if(!1===(t=t||{}).animate||!gt)return this.setView(i,r,t);this._stop();var o=this.project(this.getCenter()),a=this.project(i),n=this.getSize(),s=this._zoom;i=j(i),r=void 0===r?s:r;var u=Math.max(n.x,n.y),e=u*this.getZoomScale(s,r),l=a.distanceTo(o)||1,h=1.42,c=h*h;function f(t){t=(e*e-u*u+(t?-1:1)*c*c*l*l)/(2*(t?e:u)*c*l),t=Math.sqrt(t*t+1)-t;return t<1e-9?-18:Math.log(t)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var _=f(0);var m=Date.now(),g=(f(1)-_)/h,v=t.duration?1e3*t.duration:1e3*g*.8;return this._moveStart(!0,t.noMoveStart),function t(){var n=(Date.now()-m)/v,e=(1-Math.pow(1-n,1.5))*g;n<=1?(this._flyToFrame=k(t,this),this._move(this.unproject(o.add(a.subtract(o).multiplyBy((n=e,u*(p(_)*(d(n=_+h*n)/p(n))-d(_))/c/l))),s),this.getScaleZoom(u/(e=e,u*(p(_)/p(_+h*e))),s),{flyTo:!0})):this._move(i,r)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,n){t=this._getBoundsCenterZoom(t,n);return this.flyTo(t.center,t.zoom,n)},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 n=this.options.minZoom;return this.options.minZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var n=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var e=this.getCenter(),t=this._limitCenter(e,this._zoom,Z(t));return e.equals(t)||this.panTo(t,n),this._enforcingBounds=!1,this},panInside:function(t,n){var e=O((n=n||{}).paddingTopLeft||n.padding||[0,0]),i=O(n.paddingBottomRight||n.padding||[0,0]),r=this.getCenter(),o=this.project(r),a=this.project(t),s=this.getPixelBounds(),u=s.getSize().divideBy(2),r=R([s.min.add(e),s.max.subtract(i)]);return r.contains(a)||(this._enforcingBounds=!0,t=o.subtract(a),s=O(a.x+t.x,a.y+t.y),(a.x<r.min.x||a.x>r.max.x)&&(s.x=o.x-t.x,0<t.x?s.x+=u.x-e.x:s.x-=u.x-i.x),(a.y<r.min.y||a.y>r.max.y)&&(s.y=o.y-t.y,0<t.y?s.y+=u.y-e.y:s.y-=u.y-i.y),this.panTo(this.unproject(s),n),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=u({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var e=this.getSize(),i=n.divideBy(2).round(),r=e.divideBy(2).round(),r=i.subtract(r);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(f(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:e})):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=u({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=f(this._handleGeolocationResponse,this),e=f(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,e,t):navigator.geolocation.getCurrentPosition(n,e,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 n=t.code,t=t.message||(1===n?"permission denied":2===n?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+t+"."})},_handleGeolocationResponse:function(t){var n,e=new F(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),r=this._locateOptions;r.setView&&(n=this.getBoundsZoom(i),this.setView(e,r.maxZoom?Math.min(n,r.maxZoom):n));var o,a={latlng:e,bounds:i,timestamp:t.timestamp};for(o in t.coords)"number"==typeof t.coords[o]&&(a[o]=t.coords[o]);this.fire("locationfound",a)},addHandler:function(t,n){if(!n)return this;n=this[t]=new n(this);return this._handlers.push(n),this.options[t]&&n.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}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),en(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)en(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){n=nn("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n||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();return new D(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},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,n,e){t=Z(t),e=O(e||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),t=this.getSize().subtract(e),e=R(this.project(s,i),this.project(a,i)).getSize(),s=gt?this.options.zoomSnap:1,a=t.x/e.x,e=t.y/e.y,e=n?Math.max(a,e):Math.min(a,e),i=this.getScaleZoom(e,i);return s&&(i=Math.round(i/(s/100))*(s/100),i=n?Math.ceil(i/s)*s:Math.floor(i/s)*s),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){n=this._getTopLeftPoint(t,n);return new B(n,n.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,n){var e=this.options.crs;return n=void 0===n?this._zoom:n,e.scale(t)/e.scale(n)},getScaleZoom:function(t,n){var e=this.options.crs;n=void 0===n?this._zoom:n;n=e.zoom(t*e.scale(n));return isNaN(n)?1/0:n},project:function(t,n){return n=void 0===n?this._zoom:n,this.options.crs.latLngToPoint(j(t),n)},unproject:function(t,n){return n=void 0===n?this._zoom:n,this.options.crs.pointToLatLng(O(t),n)},layerPointToLatLng:function(t){t=O(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,n){return this.options.crs.distance(j(t),j(n))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Nn(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=Qt(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Mn(t,"scroll",this._onScroll,this),this._containerId=p(t)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&>,un(t,"leaflet-container"+(xt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+(tt?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=tn(t,"position");"absolute"!==n&&"relative"!==n&&"fixed"!==n&&(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),_n(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(un(t.markerPane,"leaflet-zoom-hide"),un(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n){_n(this._mapPane,new N(0,0));var e=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var i=this._zoom!==n;this._moveStart(i,!1)._move(t,n)._moveEnd(i),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,e){void 0===n&&(n=this._zoom);var i=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_n(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var n=t?Tn:Mn;n((this._targets[p(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),gt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(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,n){for(var e,i=[],r="mouseout"===n||"mouseover"===n,o=t.target||t.srcElement,a=!1;o;){if((e=this._targets[p(o)])&&("click"===n||"preclick"===n)&&!t._simulated&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(n,!0)){if(r&&!Fn(o,t))break;if(i.push(e),r)break}if(o===this._container)break;o=o.parentNode}return i.length||a||r||!Fn(o,t)||(i=[this]),i},_handleDOMEvent:function(t){var n;this._loaded&&!Zn(t)&&("mousedown"!==(n=t.type)&&"keypress"!==n&&"keyup"!==n&&"keydown"!==n||yn(t.target||t.srcElement),this._fireDOMEvent(t,n))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,e){if("click"===t.type&&((r=u({},t)).type="preclick",this._fireDOMEvent(r,r.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,n))).length){var i=e[0];"contextmenu"===n&&i.listens(n,!0)&&An(t);var r,o={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(r=i.getLatLng&&(!i._radius||i._radius<=10),o.containerPoint=r?this.latLngToContainerPoint(i.getLatLng()):this.mouseEventToContainerPoint(t),o.layerPoint=this.containerPointToLayerPoint(o.containerPoint),o.latlng=r?i.getLatLng():this.layerPointToLatLng(o.layerPoint));for(var a=0;a<e.length;a++)if(e[a].fire(n,o,!0),o.originalEvent._stopped||!1===e[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,n=this._handlers.length;t<n;t++)this._handlers[t].disable()},whenReady:function(t,n){return this._loaded?t.call(n||this,{target:this}):this.on("load",t,n),this},_getMapPanePos:function(){return mn(this._mapPane)||new N(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,n){return(t&&void 0!==n?this._getNewPixelOrigin(t,n):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,n){var e=this.getSize()._divideBy(2);return this.project(t,n)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,n,e){e=this._getNewPixelOrigin(e,n);return this.project(t,n)._subtract(e)},_latLngBoundsToNewLayerBounds:function(t,n,e){e=this._getNewPixelOrigin(e,n);return R([this.project(t.getSouthWest(),n)._subtract(e),this.project(t.getNorthWest(),n)._subtract(e),this.project(t.getSouthEast(),n)._subtract(e),this.project(t.getNorthEast(),n)._subtract(e)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,n,e){if(!e)return t;var i=this.project(t,n),r=this.getSize().divideBy(2),r=new B(i.subtract(r),i.add(r)),e=this._getBoundsOffset(r,e,n);return e.round().equals([0,0])?t:this.unproject(i.add(e),n)},_limitOffset:function(t,n){if(!n)return t;var e=this.getPixelBounds(),e=new B(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(e,n))},_getBoundsOffset:function(t,n,e){n=R(this.project(n.getNorthEast(),e),this.project(n.getSouthWest(),e)),e=n.min.subtract(t.min),t=n.max.subtract(t.max);return new N(this._rebound(e.x,-t.x),this._rebound(e.y,-t.y))},_rebound:function(t,n){return 0<t+n?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),e=this.getMaxZoom(),i=gt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(n,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ln(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){t=this._getCenterOffset(t)._trunc();return!(!0!==(n&&n.animate)&&!this.getSize().contains(t)||(this.panBy(t,n),0))},_createAnimProxy:function(){var t=this._proxy=nn("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var n=Kt,e=this._proxy.style[n];pn(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[n]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),n=this.getZoom();pn(this._proxy,this.project(t,n),this.getZoomScale(n,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){en(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(n),i=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==e.animate&&!this.getSize().contains(i)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,n,!0)},this),0))},_animateZoom:function(t,n,e,i){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,un(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:i}),setTimeout(f(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ln(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}});function qn(t){return new Wn(t)}var Wn=E.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),e=this.getPosition(),t=t._controlCorners[e];return un(n,"leaflet-control"),-1!==e.indexOf("bottom")?t.insertBefore(n,t.firstChild):t.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(en(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Un.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var i=this._controlCorners={},r="leaflet-",o=this._controlContainer=nn("div",r+"control-container",this._container);function t(t,n){var e=r+t+" "+r+n;i[t+n]=nn("div",e,o)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)en(this._controlCorners[t]);en(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Hn=Wn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,e,i){return e<i?-1:i<e?1:0}},initialize:function(t,n,e){for(var i in d(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in n)this._addLayer(n[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Wn.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,n){return this._addLayer(t,n),this._map?this._update():this},addOverlay:function(t,n){return this._addLayer(t,n,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(p(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){un(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?(un(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ln(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ln(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=nn("div",t),e=this.options.collapsed;n.setAttribute("aria-haspopup",!0),En(n),Sn(n);var i=this._section=nn("section",t+"-list");e&&(this._map.on("click",this.collapse,this),it||Mn(n,{mouseenter:this.expand,mouseleave:this.collapse},this));var r=this._layersLink=nn("a",t+"-toggle",n);r.href="#",r.title="Layers",xt?(Mn(r,"click",zn),Mn(r,"click",this.expand,this)):Mn(r,"focus",this.expand,this),e||this.expand(),this._baseLayersList=nn("div",t+"-base",i),this._separator=nn("div",t+"-separator",i),this._overlaysList=nn("div",t+"-overlays",i),n.appendChild(i)},_getLayer:function(t){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&p(this._layers[n].layer)===t)return this._layers[n]},_addLayer:function(t,n,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:n,overlay:e}),this.options.sortLayers&&this._layers.sort(f(function(t,n){return this.options.sortFunction(t.layer,n.layer,t.name,n.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;rn(this._baseLayersList),rn(this._overlaysList),this._layerControlInputs=[];for(var t,n,e,i=0,r=0;r<this._layers.length;r++)e=this._layers[r],this._addItem(e),n=n||e.overlay,t=t||!e.overlay,i+=e.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<i,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(p(t.target)),t=n.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,n)},_createRadioElement:function(t,n){t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(n?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=t,n.firstChild},_addItem:function(t){var n,e=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((n=document.createElement("input")).type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+p(this),i),this._layerControlInputs.push(n),n.layerId=p(t.layer),Mn(n,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;i=document.createElement("div");return e.appendChild(i),i.appendChild(n),i.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,n,e=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=e.length-1;0<=o;o--)t=e[o],n=this._getLayer(t.layerId).layer,t.checked?i.push(n):t.checked||r.push(n);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,n,e=this._layerControlInputs,i=this._map.getZoom(),r=e.length-1;0<=r;r--)t=e[r],n=this._getLayer(t.layerId).layer,t.disabled=void 0!==n.options.minZoom&&i<n.options.minZoom||void 0!==n.options.maxZoom&&i>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Vn=Wn.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",e=nn("div",n+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,n+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,n+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,e,i,r){i=nn("a",e,i);return i.innerHTML=t,i.href="#",i.title=n,i.setAttribute("role","button"),i.setAttribute("aria-label",n),En(i),Mn(i,"click",zn),Mn(i,"click",r,this),Mn(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";ln(this._zoomInButton,n),ln(this._zoomOutButton,n),!this._disabled&&t._zoom!==t.getMinZoom()||un(this._zoomOutButton,n),!this._disabled&&t._zoom!==t.getMaxZoom()||un(this._zoomInButton,n)}});Un.mergeOptions({zoomControl:!0}),Un.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Vn,this.addControl(this.zoomControl))});var Yn=Wn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",e=nn("div",n),i=this.options;return this._addScales(i,n+"-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,n,e){t.metric&&(this._mScale=nn("div",n,e)),t.imperial&&(this._iScale=nn("div",n,e))},_update:function(){var t=this._map,n=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),e=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,e,n/t)},_updateImperial:function(t){var n,e=3.2808399*t;5280<e?(n=e/5280,t=this._getRoundNum(n),this._updateScale(this._iScale,t+" mi",t/n)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/e))},_updateScale:function(t,n,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),t=t/n;return n*(10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}}),Gn=Wn.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 n in(t.attributionControl=this)._container=nn("div","leaflet-control-attribution"),En(this._container),t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,n=[];for(t in this._attributions)this._attributions[t]&&n.push(t);var e=[];this.options.prefix&&e.push(this.options.prefix),n.length&&e.push(n.join(", ")),this._container.innerHTML=e.join(" | ")}}});Un.mergeOptions({attributionControl:!0}),Un.addInitHook(function(){this.options.attributionControl&&(new Gn).addTo(this)}),Wn.Layers=Hn,Wn.Zoom=Vn,Wn.Scale=Yn,Wn.Attribution=Gn,qn.layers=function(t,n,e){return new Hn(t,n,e)},qn.zoom=function(t){return new Vn(t)},qn.scale=function(t){return new Yn(t)},qn.attribution=function(t){return new Gn(t)};_t=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});_t.addTo=function(t,n){return t.addHandler(n,this),this};var Xn,mt={Events:A},Kn=xt?"touchstart mousedown":"mousedown",$n={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Jn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Qn=z.extend({options:{clickTolerance:3},initialize:function(t,n,e,i){d(this,i),this._element=t,this._dragStartTarget=n||t,this._preventOutline=e},enable:function(){this._enabled||(Mn(this._dragStartTarget,Kn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Qn._dragging===this&&this.finishDrag(),Tn(this._dragStartTarget,Kn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var n,e;t._simulated||!this._enabled||(this._moved=!1,sn(this._element,"leaflet-zoom-anim")||Qn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Qn._dragging=this)._preventOutline&&yn(this._element),gn(),Gt(),this._moving))||(this.fire("down"),n=t.touches?t.touches[0]:t,e=xn(this._element),this._startPoint=new N(n.clientX,n.clientY),this._parentScale=wn(e),Mn(document,Jn[t.type],this._onMove,this),Mn(document,$n[t.type],this._onUp,this))},_onMove:function(t){var n;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((n=new N((n=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,n.clientY)._subtract(this._startPoint)).x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,An(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=mn(this._element).subtract(n),un(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),un(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,C(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),_n(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ln(document.body,"leaflet-dragging"),this._lastTarget&&(ln(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Jn)Tn(document,Jn[t],this._onMove,this),Tn(document,$n[t],this._onUp,this);vn(),Xt(),this._moved&&this._moving&&(C(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Qn._dragging=!1}});function te(t,n){if(!n||!t.length)return t.slice();n*=n;return function(t,n){var e=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);i[0]=i[e-1]=1,function t(n,e,i,r,o){for(var a,s,u=0,l=r+1;l<=o-1;l++)u<(s=oe(n[l],n[r],n[o],!0))&&(a=l,u=s);i<u&&(e[a]=1,t(n,e,i,r,a),t(n,e,i,a,o))}(t,i,n,0,e-1);for(var r=[],o=0;o<e;o++)i[o]&&r.push(t[o]);return r}(t=function(t,n){for(var e,i,r,o=[t[0]],a=1,s=0,u=t.length;a<u;a++)r=t[a],n<(i=(e=t[s]).x-r.x)*i+(r=e.y-r.y)*r&&(o.push(t[a]),s=a);return s<u-1&&o.push(t[u-1]),o}(t,n),n)}function ne(t,n,e){return Math.sqrt(oe(t,n,e,!0))}function ee(t,n,e,i,r){var o,a,s,u=i?Xn:re(t,e),l=re(n,e);for(Xn=l;;){if(!(u|l))return[t,n];if(u&l)return!1;s=re(a=ie(t,n,o=u||l,e,r),e),o===u?(t=a,u=s):(n=a,l=s)}}function ie(t,n,e,i,r){var o,a,s=n.x-t.x,u=n.y-t.y,n=i.min,i=i.max;return 8&e?(o=t.x+s*(i.y-t.y)/u,a=i.y):4&e?(o=t.x+s*(n.y-t.y)/u,a=n.y):2&e?(o=i.x,a=t.y+u*(i.x-t.x)/s):1&e&&(o=n.x,a=t.y+u*(n.x-t.x)/s),new N(o,a,r)}function re(t,n){var e=0;return t.x<n.min.x?e|=1:t.x>n.max.x&&(e|=2),t.y<n.min.y?e|=4:t.y>n.max.y&&(e|=8),e}function oe(t,n,e,i){var r=n.x,o=n.y,a=e.x-r,s=e.y-o,n=a*a+s*s;return 0<n&&(1<(n=((t.x-r)*a+(t.y-o)*s)/n)?(r=e.x,o=e.y):0<n&&(r+=a*n,o+=s*n)),a=t.x-r,s=t.y-o,i?a*a+s*s:new N(r,o)}function ae(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function se(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ae(t)}vt=(Object.freeze||Object)({simplify:te,pointToSegmentDistance:ne,closestPointOnSegment:function(t,n,e){return oe(t,n,e)},clipSegment:ee,_getEdgeIntersection:ie,_getBitCode:re,_sqClosestPointOnSegment:oe,isFlat:ae,_flat:se});function ue(t,n,e){for(var i,r,o,a,s,u,l,h=[1,4,2,8],c=0,f=t.length;c<f;c++)t[c]._code=re(t[c],n);for(o=0;o<4;o++){for(u=h[o],i=[],c=0,r=(f=t.length)-1;c<f;r=c++)a=t[c],s=t[r],a._code&u?s._code&u||((l=ie(s,a,u,n,e))._code=re(l,n),i.push(l)):(s._code&u&&((l=ie(s,a,u,n,e))._code=re(l,n),i.push(l)),i.push(a));t=i}return t}var yt=(Object.freeze||Object)({clipPolygon:ue}),J={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new B([-180,-90],[180,90])},ot={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var n=Math.PI/180,e=this.R,i=t.lat*n,r=this.R_MINOR/e,o=Math.sqrt(1-r*r),r=o*Math.sin(i),o=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),o/2),i=-e*Math.log(Math.max(o,1e-10));return new N(t.lng*n*e,i)},unproject:function(t){for(var n,e=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),u=0,l=.1;u<15&&1e-7<Math.abs(l);u++)n=o*Math.sin(s),n=Math.pow((1-n)/(1+n),o/2),s+=l=Math.PI/2-2*Math.atan(a*n)-s;return new F(s*e,t.x*e/i)}},dt=(Object.freeze||Object)({LonLat:J,Mercator:ot,SphericalMercator:H}),A=u({},q,{code:"EPSG:3395",projection:ot,transformation:Y(lt=.5/(Math.PI*ot.R),.5,-lt,.5)}),le=u({},q,{code:"EPSG:4326",projection:J,transformation:Y(1/180,1,-1/180,.5)}),H=u({},U,{projection:J,transformation:Y(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var e=n.lng-t.lng,t=n.lat-t.lat;return Math.sqrt(e*e+t*t)},infinite:!0});U.Earth=q,U.EPSG3395=A,U.EPSG3857=G,U.EPSG900913=X,U.EPSG4326=le,U.Simple=H;var he=z.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[p(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n,e=t.target;e.hasLayer(this)&&(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents&&(n=this.getEvents(),e.on(n,this),this.once("remove",function(){e.off(n,this)},this)),this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this}))}});Un.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=p(t);return this._layers[n]||((this._layers[n]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var n=p(t);return this._layers[n]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&p(t)in this._layers},eachLayer:function(t,n){for(var e in this._layers)t.call(n,this._layers[e]);return this},_addLayers:function(t){for(var n=0,e=(t=t?v(t)?t:[t]:[]).length;n<e;n++)this.addLayer(t[n])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=p(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,n=1/0,e=-1/0,i=this._getZoomSpan();for(t in this._zoomBoundLayers)var r=this._zoomBoundLayers[t].options,n=void 0===r.minZoom?n:Math.min(n,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.maxZoom);this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=n===1/0?void 0:n,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 ce=he.extend({initialize:function(t,n){var e,i;if(d(this,n),this._layers={},t)for(e=0,i=t.length;e<i;e++)this.addLayer(t[e])},addLayer:function(t){var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],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 n,e,i=Array.prototype.slice.call(arguments,1);for(n in this._layers)(e=this._layers[n])[t]&&e[t].apply(e,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,n){for(var e in this._layers)t.call(n,this._layers[e]);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:p}),fe=ce.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ce.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),ce.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,n=new D;for(t in this._layers){var e=this._layers[t];n.extend(e.getBounds?e.getBounds():e.getLatLng())}return n}}),de=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,n){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}n=this._createImg(e,n&&"IMG"===n.tagName?n:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,n){var e=this.options,i=e[n+"Size"];"number"==typeof i&&(i=[i,i]);var r=O(i),i=O("shadow"===n&&e.shadowAnchor||e.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+n+" "+(e.className||""),i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,n){return(n=n||document.createElement("img")).src=t,n},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),pe=de.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 pe.imagePath||(pe.imagePath=this._detectIconPath()),(this.options.imagePath||pe.imagePath)+de.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=nn("div","leaflet-default-icon-path",document.body),n=tn(t,"background-image")||tn(t,"backgroundImage");return document.body.removeChild(t),null===n||0!==n.indexOf("url")?"":n.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),_e=_t.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Qn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),un(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&&ln(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var n=this._marker,e=n._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=mn(n._icon),a=e.getPixelBounds(),s=e.getPixelOrigin(),r=R(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));r.contains(o)||(i=O((Math.max(r.max.x,o.x)-r.max.x)/(a.max.x-r.max.x)-(Math.min(r.min.x,o.x)-r.min.x)/(a.min.x-r.min.x),(Math.max(r.max.y,o.y)-r.max.y)/(a.max.y-r.max.y)-(Math.min(r.min.y,o.y)-r.min.y)/(a.min.y-r.min.y)).multiplyBy(i),e.panBy(i,{animate:!1}),this._draggable._newPos._add(i),this._draggable._startPos._add(i),_n(n._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&&(C(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var n=this._marker,e=n._shadow,i=mn(n._icon),r=n._map.layerPointToLatLng(i);e&&_n(e,i),n._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,n.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),me=he.extend({options:{icon:new pe,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,n){d(this,n),this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var n=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),i=!1;e!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),un(e,n),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var r=t.icon.createShadow(this._shadow),e=!1;r!==this._shadow&&(this._removeShadow(),e=!0),r&&(un(r,n),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&e&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),en(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&en(this._shadow),this._shadow=null},_setPos:function(t){_n(this._icon,t),this._shadow&&_n(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){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(un(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),_e)&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new _e(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&&fn(this._icon,t),this._shadow&&fn(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}}),ge=he.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}}),ve=ge.extend({options:{fill:!0,radius:10},initialize:function(t,n){d(this,n),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=j(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 n=t&&t.radius||this._radius;return ge.prototype.setStyle.call(this,t),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,n=this._radiusY||t,e=this._clickTolerance(),e=[t+e,n+e];this._pxBounds=new B(this._point.subtract(e),this._point.add(e))},_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()}}),ye=ve.extend({initialize:function(t,n,e){if("number"==typeof n&&(n=u({},e,{radius:n})),d(this,n),this._latlng=j(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 D(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ge.prototype.setStyle,_project:function(){var t,n,e,i,r,o=this._latlng.lng,a=this._latlng.lat,s=this._map,u=s.options.crs;u.distance===q.distance?(r=Math.PI/180,t=this._mRadius/q.R/r,n=s.project([a+t,o]),i=s.project([a-t,o]),e=n.add(i).divideBy(2),i=s.unproject(e).lat,r=Math.acos((Math.cos(t*r)-Math.sin(a*r)*Math.sin(i*r))/(Math.cos(a*r)*Math.cos(i*r)))/r,!isNaN(r)&&0!==r||(r=t/Math.cos(Math.PI/180*a)),this._point=e.subtract(s.getPixelOrigin()),this._radius=isNaN(r)?0:e.x-s.project([i,o-r]).x,this._radiusY=e.y-n.y):(u=u.unproject(u.project(this._latlng).subtract([this._mRadius,0])),this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(u).x),this._updateBounds()}}),be=ge.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,n){d(this,n),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var n,e,i=1/0,r=null,o=oe,a=0,s=this._parts.length;a<s;a++)for(var u=this._parts[a],l=1,h=u.length;l<h;l++){var c=o(t,n=u[l-1],e=u[l],!0);c<i&&(i=c,r=o(t,n,e))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,n,e,i,r,o,a=this._rings[0],s=a.length;if(!s)return null;for(n=t=0;t<s-1;t++)n+=a[t].distanceTo(a[t+1])/2;if(0===n)return this._map.layerPointToLatLng(a[0]);for(e=t=0;t<s-1;t++)if(i=a[t],r=a[t+1],n<(e+=o=i.distanceTo(r)))return o=(e-n)/o,this._map.layerPointToLatLng([r.x-o*(r.x-i.x),r.y-o*(r.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,n){return n=n||this._defaultShape(),t=j(t),n.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ae(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var n=[],e=ae(t),i=0,r=t.length;i<r;i++)e?(n[i]=j(t[i]),this._bounds.extend(n[i])):n[i]=this._convertLatLngs(t[i]);return n},_project:function(){var t=new B;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),t=new N(t,t);this._pxBounds=new B([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)])},_projectLatlngs:function(t,n,e){var i,r,o=t[0]instanceof F,a=t.length;if(o){for(r=[],i=0;i<a;i++)r[i]=this._map.latLngToLayerPoint(t[i]),e.extend(r[i]);n.push(r)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],n,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,e,i,r,o,a=this._parts,s=n=0,u=this._rings.length;n<u;n++)for(e=0,i=(o=this._rings[n]).length;e<i-1;e++)(r=ee(o[e],o[e+1],t,e,!0))&&(a[s]=a[s]||[],a[s].push(r[0]),r[1]===o[e+1]&&e!==i-2||(a[s].push(r[1]),s++))},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,e=0,i=t.length;e<i;e++)t[e]=te(t[e],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,n){var e,i,r,o,a,s,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(i=0,r=(a=(s=this._parts[e]).length)-1;i<a;r=i++)if((n||0!==i)&&ne(t,s[r],s[i])<=u)return!0;return!1}});be._flat=se;var xe=be.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,n,e,i,r,o,a,s,u,l=this._rings[0],h=l.length;if(!h)return null;for(t=o=a=s=0,n=h-1;t<h;n=t++)e=l[t],i=l[n],r=e.y*i.x-i.y*e.x,a+=(e.x+i.x)*r,s+=(e.y+i.y)*r,o+=3*r;return u=0===o?l[0]:[a/o,s/o],this._map.layerPointToLatLng(u)},_convertLatLngs:function(t){var n=be.prototype._convertLatLngs.call(this,t),t=n.length;return 2<=t&&n[0]instanceof F&&n[0].equals(n[t-1])&&n.pop(),n},_setLatLngs:function(t){be.prototype._setLatLngs.call(this,t),ae(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(ae(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,n=new N(n,n),t=new B(t.min.subtract(n),t.max.add(n));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i=0,r=this._rings.length;i<r;i++)(e=ue(this._rings[i],t,!0)).length&&this._parts.push(e)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var n,e,i,r,o,a,s,u,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;r<s;r++)for(o=0,a=(u=(n=this._parts[r]).length)-1;o<u;a=o++)e=n[o],i=n[a],e.y>t.y!=i.y>t.y&&t.x<(i.x-e.x)*(t.y-e.y)/(i.y-e.y)+e.x&&(l=!l);return l||be.prototype._containsPoint.call(this,t,!0)}}),we=fe.extend({initialize:function(t,n){d(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n,e,i,r=v(t)?t:t.features;if(r){for(n=0,e=r.length;n<e;n++)((i=r[n]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=Me(t,o);return a?(a.feature=Se(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=u({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(n){return this.eachLayer(function(t){this._setLayerStyle(t,n)},this)},_setLayerStyle:function(t,n){t.setStyle&&("function"==typeof n&&(n=n(t.feature)),t.setStyle(n))}});function Me(t,n){var e,i,r,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,u=[],l=n&&n.pointToLayer,h=n&&n.coordsToLatLng||Le;if(!s&&!a)return null;switch(a.type){case"Point":return e=h(s),l?l(t,e):new me(e);case"MultiPoint":for(r=0,o=s.length;r<o;r++)e=h(s[r]),u.push(l?l(t,e):new me(e));return new fe(u);case"LineString":case"MultiLineString":return i=Te(s,"LineString"===a.type?0:1,h),new be(i,n);case"Polygon":case"MultiPolygon":return i=Te(s,"Polygon"===a.type?1:2,h),new xe(i,n);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var c=Me({geometry:a.geometries[r],type:"Feature",properties:t.properties},n);c&&u.push(c)}return new fe(u);default:throw new Error("Invalid GeoJSON object.")}}function Le(t){return new F(t[1],t[0],t[2])}function Te(t,n,e){for(var i,r=[],o=0,a=t.length;o<a;o++)i=n?Te(t[o],n-1,e):(e||Le)(t[o]),r.push(i);return r}function Pe(t,n){return n="number"==typeof n?n:6,void 0!==t.alt?[l(t.lng,n),l(t.lat,n),l(t.alt,n)]:[l(t.lng,n),l(t.lat,n)]}function ke(t,n,e,i){for(var r=[],o=0,a=t.length;o<a;o++)r.push(n?ke(t[o],n-1,e,i):Pe(t[o],i));return!n&&e&&r.push(r[0]),r}function Ce(t,n){return t.feature?u({},t.feature,{geometry:n}):Se(n)}function Se(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}ot={toGeoJSON:function(t){return Ce(this,{type:"Point",coordinates:Pe(this.getLatLng(),t)})}};function Ee(t,n){return new we(t,n)}me.include(ot),ye.include(ot),ve.include(ot),be.include({toGeoJSON:function(t){var n=!ae(this._latlngs);return Ce(this,{type:(n?"Multi":"")+"LineString",coordinates:ke(this._latlngs,n?1:0,!1,t)})}}),xe.include({toGeoJSON:function(t){var n=!ae(this._latlngs),e=n&&!ae(this._latlngs[0]),t=ke(this._latlngs,e?2:n?1:0,!0,t);return n||(t=[t]),Ce(this,{type:(e?"Multi":"")+"Polygon",coordinates:t})}}),ce.include({toMultiPoint:function(n){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON(n).geometry.coordinates)}),Ce(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(n){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(n);var e="GeometryCollection"===t,i=[];return this.eachLayer(function(t){t.toGeoJSON&&(t=t.toGeoJSON(n),e?i.push(t.geometry):"FeatureCollection"===(t=Se(t)).type?i.push.apply(i,t.features):i.push(t))}),e?Ce(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var lt=Ee,Ae=he.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,e){this._url=t,this._bounds=Z(n),d(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(un(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){en(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&&on(this._image),this},bringToBack:function(){return this._map&&an(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,n=this._image=t?this._url:nn("img");un(n,"leaflet-image-layer"),this._zoomAnimated&&un(n,"leaflet-zoom-animated"),this.options.className&&un(n,this.options.className),n.onselectstart=s,n.onmousemove=s,n.onload=f(this.fire,this,"load"),n.onerror=f(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=n.src:(n.src=this._url,n.alt=this.options.alt)},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;pn(this._image,t,n)},_reset:function(){var t=this._image,n=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=n.getSize();_n(t,n.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){fn(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)}}),ze=Ae.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,n=this._image=t?this._url:nn("video");if(un(n,"leaflet-image-layer"),this._zoomAnimated&&un(n,"leaflet-zoom-animated"),n.onselectstart=s,n.onmousemove=s,n.onloadeddata=f(this.fire,this,"load"),t){for(var e=n.getElementsByTagName("source"),i=[],r=0;r<e.length;r++)i.push(e[r].src);this._url=0<e.length?i:[n.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&n.style.hasOwnProperty("objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop;for(var o=0;o<this._url.length;o++){var a=nn("source");a.src=this._url[o],n.appendChild(a)}}}}),Ne=Ae.extend({_initImage:function(){var t=this._image=this._url;un(t,"leaflet-image-layer"),this._zoomAnimated&&un(t,"leaflet-zoom-animated"),t.onselectstart=s,t.onmousemove=s}}),Ie=he.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,n){d(this,t),this._source=n},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&fn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&fn(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(fn(this._container,0),this._removeTimeout=setTimeout(f(en,void 0,this._container),200)):en(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(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&&on(this._container),this},bringToBack:function(){return this._map&&an(this._container),this},_prepareOpen:function(t,n,e){if(n instanceof he||(e=n,n=t),n instanceof fe)for(var i in t._layers){n=t._layers[i];break}if(!e)if(n.getCenter)e=n.getCenter();else{if(!n.getLatLng)throw new Error("Unable to get source layer LatLng.");e=n.getLatLng()}return this._source=n,this.update(),e},_updateContent:function(){if(this._content){var t=this._contentNode,n="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof n)t.innerHTML=n;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){var t,n,e;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),n=this._getAnchor(),this._zoomAnimated?_n(this._container,t.add(n)):e=e.add(t).add(n),n=this._containerBottom=-e.y,e=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=n+"px",this._container.style.left=e+"px")},_getAnchor:function(){return[0,0]}}),Oe=Ie.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){Ie.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ge||this._source.on("preclick",Cn))},onRemove:function(t){Ie.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ge||this._source.off("preclick",Cn))},getEvents:function(){var t=Ie.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",n=this._container=nn("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=nn("div",t+"-content-wrapper",n);this._contentNode=nn("div",t+"-content",e),En(e),Sn(this._contentNode),Mn(e,"contextmenu",Cn),this._tipContainer=nn("div",t+"-tip-container",n),this._tip=nn("div",t+"-tip",this._tipContainer),this.options.closeButton&&((n=this._closeButton=nn("a",t+"-close-button",n)).href="#close",n.innerHTML="×",Mn(n,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,n=t.style;n.width="",n.whiteSpace="nowrap";var e=t.offsetWidth,e=Math.min(e,this.options.maxWidth);e=Math.max(e,this.options.minWidth),n.width=e+1+"px",n.whiteSpace="",n.height="";var i=t.offsetHeight,r=this.options.maxHeight,e="leaflet-popup-scrolled";r&&r<i?(n.height=r+"px",un(t,e)):ln(t,e),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),t=this._getAnchor();_n(this._container,n.add(t))},_adjustPan:function(){var t,n,e,i,r,o,a,s,u;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,a=parseInt(tn(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+a,e=this._containerWidth,(s=new N(this._containerLeft,-n-this._containerBottom))._add(mn(this._container)),i=t.layerPointToContainerPoint(s),u=O(this.options.autoPanPadding),r=O(this.options.autoPanPaddingTopLeft||u),o=O(this.options.autoPanPaddingBottomRight||u),a=t.getSize(),u=s=0,i.x+e+o.x>a.x&&(s=i.x+e-a.x+o.x),i.x-s-r.x<0&&(s=i.x-r.x),i.y+n+o.y>a.y&&(u=i.y+n-a.y+o.y),i.y-u-r.y<0&&(u=i.y-r.y),(s||u)&&t.fire("autopanstart").panBy([s,u]))},_onCloseButtonClick:function(t){this._close(),zn(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Un.mergeOptions({closePopupOnClick:!0}),Un.include({openPopup:function(t,n,e){return t instanceof Oe||(t=new Oe(e).setContent(t)),n&&t.setLatLng(n),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}}),he.include({bindPopup:function(t,n){return t instanceof Oe?(d(t,n),(this._popup=t)._source=this):(this._popup&&!n||(this._popup=new Oe(n,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,n){return this._popup&&this._map&&(n=this._popup._prepareOpen(this,t,n),this._map.openPopup(this._popup,n)),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 n=t.layer||t.target;this._popup&&this._map&&(zn(t),n instanceof ge?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===n?this.closePopup():this.openPopup(n,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Be=Ie.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ie.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){Ie.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ie.prototype.getEvents.call(this);return xt&&!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=nn("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n=this._map,e=this._container,i=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),o=this.options.direction,a=e.offsetWidth,s=e.offsetHeight,u=O(this.options.offset),n=this._getAnchor();t="top"===o?t.add(O(-a/2+u.x,-s+u.y+n.y,!0)):"bottom"===o?t.subtract(O(a/2-u.x,-u.y,!0)):"center"===o?t.subtract(O(a/2+u.x,s/2-n.y+u.y,!0)):"right"===o||"auto"===o&&r.x<i.x?(o="right",t.add(O(u.x+n.x,n.y-s/2+u.y,!0))):(o="left",t.subtract(O(a+n.x-u.x,s/2-n.y-u.y,!0))),ln(e,"leaflet-tooltip-right"),ln(e,"leaflet-tooltip-left"),ln(e,"leaflet-tooltip-top"),ln(e,"leaflet-tooltip-bottom"),un(e,"leaflet-tooltip-"+o),_n(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&fn(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Un.include({openTooltip:function(t,n,e){return t instanceof Be||(t=new Be(e).setContent(t)),n&&t.setLatLng(n),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),he.include({bindTooltip:function(t,n){return t instanceof Be?(d(t,n),(this._tooltip=t)._source=this):(this._tooltip&&!n||(this._tooltip=new Be(n,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){var n,e;!t&&this._tooltipHandlersAdded||(n=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),xt&&(e.click=this._openTooltip)),this[n](e),this._tooltipHandlersAdded=!t)},openTooltip:function(t,n){return this._tooltip&&this._map&&(n=this._tooltip._prepareOpen(this,t,n),this._map.openTooltip(this._tooltip,n),this._tooltip.options.interactive&&this._tooltip._container&&(un(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&&(ln(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 n=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(n,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),n=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(n)}});var Re=de.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var n=t&&"DIV"===t.tagName?t:document.createElement("div"),t=this.options;return t.html instanceof Element?(rn(n),n.appendChild(t.html)):n.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=O(t.bgPos),n.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});de.Default=pe;var De=he.extend({options:{tileSize:256,opacity:1,updateWhenIdle:W,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(),en(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(on(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(an(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=r(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 N?t:new N(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 n,e=this.getPane().children,i=-t(-1/0,1/0),r=0,o=e.length;r<o;r++)n=e[r].style.zIndex,e[r]!==this._container&&n&&(i=t(i,+n));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!tt){fn(this._container,this.options.opacity);var t,n=+new Date,e=!1,i=!1;for(t in this._tiles){var r,o=this._tiles[t];o.current&&o.loaded&&(r=Math.min(1,(n-o.loaded)/200),fn(o.el,r),r<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0))}i&&!this._noPrune&&this._pruneTiles(),e&&(C(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:s,_initContainer:function(){this._container||(this._container=nn("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,n=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=n-Math.abs(t-e),this._onUpdateLevel(e)):(en(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var i=this._levels[t],r=this._map;return i||((i=this._levels[t]={}).el=nn("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=n,i.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,r.getCenter(),r.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i}},_onUpdateLevel:s,_onRemoveLevel:s,_onCreateLevel:s,_pruneTiles:function(){if(this._map){var t,n,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(n=this._tiles[t]).retain=n.current;for(t in this._tiles)(n=this._tiles[t]).current&&!n.active&&(e=n.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var n in this._tiles)this._tiles[n].coords.z===t&&this._removeTile(n)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)en(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,n,e,i){var r=Math.floor(t/2),t=Math.floor(n/2),n=e-1,e=new N(+r,+t);e.z=+n;e=this._tileCoordsToKey(e),e=this._tiles[e];return e&&e.active?e.retain=!0:(e&&e.loaded&&(e.retain=!0),i<n&&this._retainParent(r,t,n,i))},_retainChildren:function(t,n,e,i){for(var r=2*t;r<2*t+2;r++)for(var o=2*n;o<2*n+2;o++){var a=new N(r,o);a.z=e+1;a=this._tileCoordsToKey(a),a=this._tiles[a];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<i&&this._retainChildren(r,o,e+1,i))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var n=this.options;return void 0!==n.minNativeZoom&&t<n.minNativeZoom?n.minNativeZoom:void 0!==n.maxNativeZoom&&n.maxNativeZoom<t?n.maxNativeZoom:t},_setView:function(t,n,e,i){var r=this._clampZoom(Math.round(n));(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom)&&(r=void 0);var o=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,n)},_setZoomTransforms:function(t,n){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,n)},_setZoomTransform:function(t,n,e){var i=this._map.getZoomScale(e,t.zoom),e=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(n,e)).round();gt?pn(t.el,e,i):_n(t.el,e)},_resetGrid:function(){var t=this._map,n=t.options.crs,e=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],i).x/e.x),Math.ceil(t.project([0,n.wrapLng[1]],i).x/e.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],i).y/e.x),Math.ceil(t.project([n.wrapLat[1],0],i).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var n=this._map,e=n._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),e=n.getZoomScale(e,this._tileZoom),t=n.project(t,this._tileZoom).floor(),e=n.getSize().divideBy(2*e);return new B(t.subtract(e),t.add(e))},_update:function(t){var n=this._map;if(n){var e=this._clampZoom(n.getZoom());if(void 0===t&&(t=n.getCenter()),void 0!==this._tileZoom){var i,n=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(n),o=r.getCenter(),a=[],n=this.options.keepBuffer,s=new B(r.getBottomLeft().subtract([n,-n]),r.getTopRight().add([n,-n]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(i in this._tiles){var u=this._tiles[i].coords;u.z===this._tileZoom&&s.contains(new N(u.x,u.y))||(this._tiles[i].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var l=r.min.y;l<=r.max.y;l++)for(var h=r.min.x;h<=r.max.x;h++){var c,f=new N(h,l);f.z=this._tileZoom,this._isValidTile(f)&&((c=this._tiles[this._tileCoordsToKey(f)])?c.current=!0:a.push(f))}if(a.sort(function(t,n){return t.distanceTo(o)-n.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));for(var d=document.createDocumentFragment(),h=0;h<a.length;h++)this._addTile(a[h],d);this._level.el.appendChild(d)}}}}},_isValidTile:function(t){var n=this._map.options.crs;if(!n.infinite){var e=this._globalTileRange;if(!n.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!n.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;t=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(t)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,e=this.getTileSize(),i=t.scaleBy(e),e=i.add(e);return[n.unproject(i,t.z),n.unproject(e,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new D(t[0],t[1]);return this.options.noWrap||(t=this._map.wrapLatLngBounds(t)),t},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),t=new N(+n[0],+n[1]);return t.z=+n[2],t},_removeTile:function(t){var n=this._tiles[t];n&&(en(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){un(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=s,t.onmousemove=s,tt&&this.options.opacity<1&&fn(t,this.options.opacity),it&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,n){var e=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),f(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&k(f(this._tileReady,this,t,null,r)),_n(r,e),this._tiles[i]={el:r,coords:t,current:!0},n.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,n,e){n&&this.fire("tileerror",{error:n,tile:e,coords:t});var i=this._tileCoordsToKey(t);(e=this._tiles[i])&&(e.loaded=+new Date,this._map._fadeAnimated?(fn(e.el,0),C(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),n||(un(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tt||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(f(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new N(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new B(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ze=De.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,n){this._url=t,(n=d(this,n)).detectRetina&&Mt&&0<n.maxZoom&&(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom++):(n.zoomOffset++,n.maxZoom--),n.minZoom=Math.max(0,n.minZoom)),"string"==typeof n.subdomains&&(n.subdomains=n.subdomains.split("")),it||this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&void 0===n&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var e=document.createElement("img");return Mn(e,"load",f(this._tileOnLoad,this,n,e)),Mn(e,"error",f(this._tileOnError,this,n,e)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var n={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(n.y=t),n["-y"]=t),g(this._url,u(n,this.options))},_tileOnLoad:function(t,n){tt?setTimeout(f(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,e){var i=this.options.errorTileUrl;i&&n.getAttribute("src")!==i&&(n.src=i),t(e,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom;return this.options.zoomReverse&&(t=n-t),t+this.options.zoomOffset},_getSubdomain:function(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,n;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((n=this._tiles[t].el).onload=s,n.onerror=s,n.complete||(n.src=b,en(n),delete this._tiles[t]))},_removeTile:function(t){var n=this._tiles[t];if(n)return at||n.el.setAttribute("src",b),De.prototype._removeTile.call(this,t)},_tileReady:function(t,n,e){if(this._map&&(!e||e.getAttribute("src")!==b))return De.prototype._tileReady.call(this,t,n,e)}});function Fe(t,n){return new Ze(t,n)}var je=Ze.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,n){this._url=t;var e,i=u({},this.defaultWmsParams);for(e in n)e in this.options||(i[e]=n[e]);var r=(n=d(this,n)).detectRetina&&Mt?2:1,t=this.getTileSize();i.width=t.x*r,i.height=t.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[n]=this._crs.code,Ze.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),e=this._crs,e=R(e.project(n[0]),e.project(n[1])),n=e.min,e=e.max,e=(1.3<=this._wmsVersion&&this._crs===le?[n.y,n.x,e.y,e.x]:[n.x,n.y,e.x,e.y]).join(","),t=Ze.prototype.getTileUrl.call(this,t);return t+_(this.wmsParams,t,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(t,n){return u(this.wmsParams,t),n||this.redraw(),this}});Ze.WMS=je,Fe.wms=function(t,n){return new je(t,n)};var Ue=he.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&un(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var e=this._map.getZoomScale(n,this._zoom),i=mn(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,n),o=this._map.project(t,n).subtract(o),o=r.multiplyBy(-e).add(i).add(r).subtract(o);gt?pn(this._container,o,e):_n(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),e=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new B(e,e.add(n.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qe=Ue.extend({getEvents:function(){var t=Ue.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ue.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Mn(t,"mousemove",r(this._onMouseMove,32,this),this),Mn(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Mn(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,en(this._container),Tn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,n,e,i;this._map._animatingZoom&&this._bounds||(Ue.prototype._update.call(this),t=this._bounds,n=this._container,e=t.getSize(),i=Mt?2:1,_n(n,t.min),n.width=i*e.x,n.height=i*e.y,n.style.width=e.x+"px",n.style.height=e.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Ue.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);t=(this._layers[p(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,e=n.next,n=n.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[p(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){for(var n,e=t.options.dashArray.split(/[, ]+/),i=[],r=0;r<e.length;r++){if(n=Number(e[r]),isNaN(n))return;i.push(n)}t.options._dashArray=i}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){var n;t._pxBounds&&(n=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(t._pxBounds.max.add([n,n])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,n=this._redrawBounds;n?(t=n.getSize(),this._ctx.clearRect(n.min.x,n.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,n,e=this._redrawBounds;this._ctx.save(),e&&(n=e.getSize(),this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()),this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,n){if(this._drawing){var e,i,r,o,a=t._parts,s=a.length,u=this._ctx;if(s){for(u.beginPath(),e=0;e<s;e++){for(i=0,r=a[e].length;i<r;i++)o=a[e][i],u[i?"lineTo":"moveTo"](o.x,o.y);n&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){var n,e,i,r;this._drawing&&!t._empty()&&(n=t._point,e=this._ctx,i=Math.max(Math.round(t._radius),1),1!=(r=(Math.max(Math.round(t._radiusY),1)||i)/i)&&(e.save(),e.scale(1,r)),e.beginPath(),e.arc(n.x,n.y/r,i,0,2*Math.PI,!1),1!=r&&e.restore(),this._fillStroke(e,t))},_fillStroke:function(t,n){var e=n.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var n,e,i=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(i)&&!this._map._draggableMoved(n)&&(e=n);e&&(Dn(t),this._fireEvent([e],t))},_onMouseMove:function(t){var n;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(n=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,n))},_handleMouseOut:function(t){var n=this._hoveredLayer;n&&(ln(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,n){for(var e,i,r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(n)&&(i=e);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(un(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,n,e){this._map._fireDOMEvent(n,e||n.type,t)},_bringToFront:function(t){var n,e,i=t._order;i&&(n=i.next,e=i.prev,n&&((n.prev=e)?e.next=n:n&&(this._drawFirst=n),i.prev=this._drawLast,(this._drawLast.next=i).next=null,this._drawLast=i,this._requestRedraw(t)))},_bringToBack:function(t){var n,e,i=t._order;i&&(n=i.next,(e=i.prev)&&((e.next=n)?n.prev=e:e&&(this._drawLast=e),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t)))}});function We(t){return Lt?new qe(t):null}var He=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">')}}}(),J={_initContainer:function(){this._container=nn("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ue.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=He("shape");un(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=He("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;en(n),t.removeInteractiveTarget(n),delete this._layers[p(t)]},_updateStyle:function(t){var n=t._stroke,e=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(n=n||(t._stroke=He("stroke")),r.appendChild(n),n.weight=i.weight+"px",n.color=i.color,n.opacity=i.opacity,i.dashArray?n.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=i.lineCap.replace("butt","flat"),n.joinstyle=i.lineJoin):n&&(r.removeChild(n),t._stroke=null),i.fill?(e=e||(t._fill=He("fill")),r.appendChild(e),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(r.removeChild(e),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),e=Math.round(t._radius),i=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+e+","+i+" 0,23592600")},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){on(t._container)},_bringToBack:function(t){an(t._container)}},Ve=Pt?He:K,Ye=Ue.extend({getEvents:function(){var t=Ue.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Ve("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ve("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){en(this._container),Tn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,n,e;this._map._animatingZoom&&this._bounds||(Ue.prototype._update.call(this),n=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(n)||(this._svgSize=n,e.setAttribute("width",n.x),e.setAttribute("height",n.y)),_n(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update"))},_initPath:function(t){var n=t._path=Ve("path");t.options.className&&un(n,t.options.className),t.options.interactive&&un(n,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){en(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,t=t.options;n&&(t.stroke?(n.setAttribute("stroke",t.color),n.setAttribute("stroke-opacity",t.opacity),n.setAttribute("stroke-width",t.weight),n.setAttribute("stroke-linecap",t.lineCap),n.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?n.setAttribute("stroke-dasharray",t.dashArray):n.removeAttribute("stroke-dasharray"),t.dashOffset?n.setAttribute("stroke-dashoffset",t.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),t.fill?(n.setAttribute("fill",t.fillColor||t.color),n.setAttribute("fill-opacity",t.fillOpacity),n.setAttribute("fill-rule",t.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,$(t._parts,n))},_updateCircle:function(t){var n=t._point,e=Math.max(Math.round(t._radius),1),i="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(n.x-e)+","+n.y+i+2*e+",0 "+i+2*-e+",0 ";this._setPath(t,e)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){on(t._path)},_bringToBack:function(t){an(t._path)}});function Ge(t){return Tt||Pt?new Ye(t):null}Pt&&Ye.include(J),Un.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var n=this._paneRenderers[t];return void 0===n&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&We(t)||Ge(t)}});var Xe=xe.extend({initialize:function(t,n){xe.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Ye.create=Ve,Ye.pointsToPath=$,we.geometryToLayer=Me,we.coordsToLatLng=Le,we.coordsToLatLngs=Te,we.latLngToCoords=Pe,we.latLngsToCoords=ke,we.getFeature=Ce,we.asFeature=Se,Un.mergeOptions({boxZoom:!0});A=_t.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(){Mn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){en(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(),Gt(),gn(),this._startPoint=this._map.mouseEventToContainerPoint(t),Mn(document,{contextmenu:zn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=nn("div","leaflet-zoom-box",this._container),un(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new B(this._point,this._startPoint),t=n.getSize();_n(this._box,n.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(en(this._box),ln(this._container,"leaflet-crosshair")),Xt(),vn(),Tn(document,{contextmenu:zn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),!this._moved)||(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(f(this._resetState,this),0),t=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t}))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Un.addInitHook("addHandler","boxZoom",A),Un.mergeOptions({doubleClickZoom:!0});G=_t.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,e=n.getZoom(),i=n.options.zoomDelta,i=t.originalEvent.shiftKey?e-i:e+i;"center"===n.options.doubleClickZoom?n.setZoom(i):n.setZoomAround(t.containerPoint,i)}});Un.addInitHook("addHandler","doubleClickZoom",G),Un.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});X=_t.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Qn(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))),un(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ln(this._map._container,"leaflet-grab"),ln(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,n=this._map;n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=Z(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var n,e;this._map.options.inertia&&(n=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(n),this._prunePositions(n)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){var t,n;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit,t.x<n.min.x&&(t.x=this._viscousLimit(t.x,n.min.x)),t.y<n.min.y&&(t.y=this._viscousLimit(t.y,n.min.y)),t.x>n.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),e=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-n+e)%t+n-e,n=(i+n+e)%t-n-e,n=Math.abs(r+e)<Math.abs(n+e)?r:n;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=n},_onDragEnd:function(t){var n,e,i,r,o=this._map,a=o.options,s=!a.inertia||this._times.length<2;o.fire("dragend",t),s?o.fire("moveend"):(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),t=(this._lastTime-this._times[0])/1e3,n=a.easeLinearity,e=(s=e.multiplyBy(n/t)).distanceTo([0,0]),t=Math.min(a.inertiaMaxSpeed,e),e=s.multiplyBy(t/e),i=t/(a.inertiaDeceleration*n),(r=e.multiplyBy(-i/2).round()).x||r.y?(r=o._limitOffset(r,o.options.maxBounds),k(function(){o.panBy(r,{duration:i,easeLinearity:n,noMoveStart:!0,animate:!0})})):o.fire("moveend"))}});Un.addInitHook("addHandler","dragging",X),Un.mergeOptions({keyboard:!0,keyboardPanDelta:80});H=_t.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"),Mn(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(),Tn(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,n,e;this._focused||(t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,e=t.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(e,n))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var n=this._panKeys={},e=this.keyCodes,i=0,r=e.left.length;i<r;i++)n[e.left[i]]=[-1*t,0];for(i=0,r=e.right.length;i<r;i++)n[e.right[i]]=[t,0];for(i=0,r=e.down.length;i<r;i++)n[e.down[i]]=[0,t];for(i=0,r=e.up.length;i<r;i++)n[e.up[i]]=[0,-1*t]},_setZoomDelta:function(t){for(var n=this._zoomKeys={},e=this.keyCodes,i=0,r=e.zoomIn.length;i<r;i++)n[e.zoomIn[i]]=t;for(i=0,r=e.zoomOut.length;i<r;i++)n[e.zoomOut[i]]=-t},_addHooks:function(){Mn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Tn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var n,e=t.keyCode,i=this._map;if(e in this._panKeys)i._panAnim&&i._panAnim._inProgress||(n=this._panKeys[e],t.shiftKey&&(n=O(n).multiplyBy(3)),i.panBy(n),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}zn(t)}}});Un.addInitHook("addHandler","keyboard",H),Un.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});ot=_t.extend({addHooks:function(){Mn(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Tn(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var n=On(t),e=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);e=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(f(this._performZoom,this),e),zn(t)},_performZoom:function(){var t=this._map,n=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,i=e?Math.ceil(i/e)*e:i,i=t._limitZoom(n+(0<this._delta?i:-i))-n;this._delta=0,this._startTime=null,i&&("center"===t.options.scrollWheelZoom?t.setZoom(n+i):t.setZoomAround(this._lastMousePos,n+i))}});Un.addInitHook("addHandler","scrollWheelZoom",ot),Un.mergeOptions({tap:!0,tapTolerance:15});W=_t.extend({addHooks:function(){Mn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(An(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var n=t.touches[0],t=n.target;this._startPos=this._newPos=new N(n.clientX,n.clientY),t.tagName&&"a"===t.tagName.toLowerCase()&&un(t,"leaflet-active"),this._holdTimeout=setTimeout(f(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",n))},this),1e3),this._simulateEvent("mousedown",n),Mn(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var n;clearTimeout(this._holdTimeout),Tn(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((t=(n=t.changedTouches[0]).target)&&t.tagName&&"a"===t.tagName.toLowerCase()&&ln(t,"leaflet-active"),this._simulateEvent("mouseup",n),this._isTapValid()&&this._simulateEvent("click",n))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){t=t.touches[0];this._newPos=new N(t.clientX,t.clientY),this._simulateEvent("mousemove",t)},_simulateEvent:function(t,n){var e=document.createEvent("MouseEvents");e._simulated=!0,n.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(e)}});xt&&!bt&&Un.addInitHook("addHandler","tap",W),Un.mergeOptions({touchZoom:xt&&!rt,bounceAtZoomLimits:!0});J=_t.extend({addHooks:function(){un(this._map._container,"leaflet-touch-zoom"),Mn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ln(this._map._container,"leaflet-touch-zoom"),Tn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n,e,i=this._map;!t.touches||2!==t.touches.length||i._animatingZoom||this._zooming||(n=i.mouseEventToContainerPoint(t.touches[0]),e=i.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(n.add(e)._divideBy(2))),this._startDist=n.distanceTo(e),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Mn(document,"touchmove",this._onTouchMove,this),Mn(document,"touchend",this._onTouchEnd,this),An(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var n=this._map,e=n.mouseEventToContainerPoint(t.touches[0]),i=n.mouseEventToContainerPoint(t.touches[1]),r=e.distanceTo(i)/this._startDist;if(this._zoom=n.getScaleZoom(r,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&r<1||this._zoom>n.getMaxZoom()&&1<r)&&(this._zoom=n._limitZoom(this._zoom)),"center"===n.options.touchZoom){if(this._center=this._startLatLng,1==r)return}else{i=e._add(i)._divideBy(2)._subtract(this._centerPoint);if(1==r&&0===i.x&&0===i.y)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(i),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),C(this._animRequest);n=f(n._move,n,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(n,this,!0),An(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),Tn(document,"touchmove",this._onTouchMove),Tn(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}});Un.addInitHook("addHandler","touchZoom",J),Un.BoxZoom=A,Un.DoubleClickZoom=G,Un.Drag=X,Un.Keyboard=H,Un.ScrollWheelZoom=ot,Un.Tap=W,Un.TouchZoom=J,Object.freeze=n,t.version="1.5.1+build.2e3e0ffb",t.Control=Wn,t.control=qn,t.Browser=st,t.Evented=z,t.Mixin=mt,t.Util=S,t.Class=E,t.Handler=_t,t.extend=u,t.bind=f,t.stamp=p,t.setOptions=d,t.DomEvent=ft,t.DomUtil=ct,t.PosAnimation=jn,t.Draggable=Qn,t.LineUtil=vt,t.PolyUtil=yt,t.Point=N,t.point=O,t.Bounds=B,t.bounds=R,t.Transformation=V,t.transformation=Y,t.Projection=dt,t.LatLng=F,t.latLng=j,t.LatLngBounds=D,t.latLngBounds=Z,t.CRS=U,t.GeoJSON=we,t.geoJSON=Ee,t.geoJson=lt,t.Layer=he,t.LayerGroup=ce,t.layerGroup=function(t,n){return new ce(t,n)},t.FeatureGroup=fe,t.featureGroup=function(t){return new fe(t)},t.ImageOverlay=Ae,t.imageOverlay=function(t,n,e){return new Ae(t,n,e)},t.VideoOverlay=ze,t.videoOverlay=function(t,n,e){return new ze(t,n,e)},t.SVGOverlay=Ne,t.svgOverlay=function(t,n,e){return new Ne(t,n,e)},t.DivOverlay=Ie,t.Popup=Oe,t.popup=function(t,n){return new Oe(t,n)},t.Tooltip=Be,t.tooltip=function(t,n){return new Be(t,n)},t.Icon=de,t.icon=function(t){return new de(t)},t.DivIcon=Re,t.divIcon=function(t){return new Re(t)},t.Marker=me,t.marker=function(t,n){return new me(t,n)},t.TileLayer=Ze,t.tileLayer=Fe,t.GridLayer=De,t.gridLayer=function(t){return new De(t)},t.SVG=Ye,t.svg=Ge,t.Renderer=Ue,t.Canvas=qe,t.canvas=We,t.Path=ge,t.CircleMarker=ve,t.circleMarker=function(t,n){return new ve(t,n)},t.Circle=ye,t.circle=function(t,n,e){return new ye(t,n,e)},t.Polyline=be,t.polyline=function(t,n){return new be(t,n)},t.Polygon=xe,t.polygon=function(t,n){return new xe(t,n)},t.Rectangle=Xe,t.rectangle=function(t,n){return new Xe(t,n)},t.Map=Un,t.map=function(t,n){return new Un(t,n)};var Ke=window.L;t.noConflict=function(){return window.L=Ke,this},window.L=t});"use strict";L.DomUtil.setTransform||(L.DomUtil.setTransform=function(t,n,e){n=n||new L.Point(0,0);t.style[L.DomUtil.TRANSFORM]=(L.Browser.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}),L.CanvasLayer=(L.Layer||L.Class).extend({initialize:function(t){this._map=null,this._canvas=null,this._frame=null,this._delegate=null,L.setOptions(this,t)},delegate:function(t){return this._delegate=t,this},needRedraw:function(){return this._frame||(this._frame=L.Util.requestAnimFrame(this.drawLayer,this)),this},_onLayerDidResize:function(t){this._canvas.width=t.newSize.x,this._canvas.height=t.newSize.y},_onLayerDidMove:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t),this.drawLayer()},getEvents:function(){var t={resize:this._onLayerDidResize,moveend:this._onLayerDidMove};return this._map.options.zoomAnimation&&L.Browser.any3d&&(t.zoomanim=this._animateZoom),t},onAdd:function(t){this._map=t,this._canvas=L.DomUtil.create("canvas","leaflet-layer"),this.tiles={};var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y;n=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(n?"animated":"hide")),t._panes.overlayPane.appendChild(this._canvas),t.on(this.getEvents(),this);t=this._delegate||this;t.onLayerDidMount&&t.onLayerDidMount(),this.needRedraw();var e=this;setTimeout(function(){e._onLayerDidMove()},0)},onRemove:function(t){var n=this._delegate||this;n.onLayerWillUnmount&&n.onLayerWillUnmount(),t.getPanes().overlayPane.removeChild(this._canvas),t.off(this.getEvents(),this),this._canvas=null},addTo:function(t){return t.addLayer(this),this},LatLonToMercator:function(t){return{x:6378137*t.lng*Math.PI/180,y:6378137*Math.log(Math.tan((90+t.lat)*Math.PI/360))}},drawLayer:function(){var t=this._map.getSize(),n=this._map.getBounds(),e=this._map.getZoom(),i=this.LatLonToMercator(this._map.getCenter()),r=this.LatLonToMercator(this._map.containerPointToLatLng(this._map.getSize())),o=this._delegate||this;o.onDrawLayer&&o.onDrawLayer({layer:this,canvas:this._canvas,bounds:n,size:t,zoom:e,center:i,corner:r}),this._frame=null},_setTransform:function(t,n,e){n=n||new L.Point(0,0);t.style[L.DomUtil.TRANSFORM]=(L.Browser.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),t=L.Layer?this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),t.zoom,t.center):this._map._getCenterOffset(t.center)._multiplyBy(-n).subtract(this._map._getMapPanePos());L.DomUtil.setTransform(this._canvas,t,n)}}),L.canvasLayer=function(){return new L.CanvasLayer},L.Control.Velocity=L.Control.extend({options:{position:"bottomleft",emptyString:"",angleConvention:"meteoCCW",speedUnit:"m/s"},onAdd:function(t){return this._currentPoint=document.getElementById("currentPoint"),this._mapBox=t._container,this._container=L.DomUtil.create("div","leaflet-control-velocity"),this._div=document.getElementById("wind-value"),L.DomEvent.disableClickPropagation(this._div),this._div.innerHTML=this.options.emptyString,this._div.style.display="block",t.on("mousemove",this._onMouseMove,this),this._container},onRemove:function(t){document.getElementById("wind-value").style.display="none",document.getElementById("wind-value").innerHTML="",document.getElementById("currentPoint").style.display="none",t.off("mousemove",this._onMouseMove,this)},vectorToSpeed:function(t,n,e){n=Math.sqrt(Math.pow(t,2)+Math.pow(n,2));return"km/h"===e?this.meterSec2kilometerHour(n):"kt"===e?this.meterSec2Knots(n):n},rebuildWindDirection:function(t){var n="";return null==t?n="-":t<=22.5||337.5<=t?n="北风":22.5<t&&t<=67.5?n="东北风":67.5<t&&t<=112.5?n="东风":112.5<t&&t<=157.5?n="东南风":157.5<t&&t<=202.5?n="南风":202.5<t&&t<=247.5?n="西南风":247.5<t&&t<=292.5?n="西风":292.5<t&&t<=337.5&&(n="西北风"),n},getWindLevel:function(t){t=Number(t);return t<.2?"0级":t<1.5?"1级":t<3.3?"2级":t<5.4?"3级":t<7.9?"4级":t<10.7?"5级":t<13.8?"6级":t<17.1?"7级":t<20.7?"8级":t<24.4?"9级":t<28.4?"10级":t<32.6?"11级":t<36.9?"12级":t<41.4?"13级":t<46.1?"14级":t<50.9?"15级":t<56?"16级":t<61.2?"17级":61.3<t?"18级":void 0},vectorToDegrees:function(t,n,e){e.endsWith("CCW")&&(n=0<n?n=-n:Math.abs(n)),t=-t;var i=Math.sqrt(Math.pow(t,2)+Math.pow(n,2)),i=180*Math.atan2(t/i,n/i)/Math.PI+180;return"bearingCW"!==e&&"meteoCCW"!==e||360<=(i+=180)&&(i-=360),i},meterSec2Knots:function(t){return t/.514},meterSec2kilometerHour:function(t){return 3.6*t},_onMouseMove:function(t){var n=this,e=this.options.leafletVelocity._map.containerPointToLatLng(L.point(t.containerPoint.x,t.containerPoint.y)),i=this.options.leafletVelocity._windy.interpolatePoint(e.lng,e.lat),e="";e=i&&!isNaN(i[0])&&!isNaN(i[1])&&i[2]?"<div style='display: "+(315===n.vectorToDegrees(i[0],i[1],this.options.angleConvention)?"none":"block")+"'>"+n.rebuildWindDirection(n.vectorToDegrees(i[0],i[1],this.options.angleConvention))+" "+n.getWindLevel(n.vectorToSpeed(i[0],i[1],this.options.speedUnit))+" "+n.vectorToSpeed(i[0],i[1],this.options.speedUnit).toFixed(2)+this.options.speedUnit+"</div>":this.options.emptyString,n._currentPoint&&(t.containerPoint.x>n._mapBox.clientWidth-200?n._currentPoint.style.left=n._mapBox.clientWidth-250+"px":n._currentPoint.style.left=t.containerPoint.x+10+"px",t.containerPoint.y>n._mapBox.clientHeight-30?n._currentPoint.style.top=n._mapBox.clientHeight-30+"px":n._currentPoint.style.top=t.containerPoint.y+"px",n._div.innerHTML=e)}}),L.Map.mergeOptions({positionControl:!1}),L.Map.addInitHook(function(){this.options.positionControl&&(this.positionControl=new L.Control.MousePosition,this.addControl(this.positionControl))}),L.control.velocity=function(t){return new L.Control.Velocity(t)},L.VelocityLayer=(L.Layer||L.Class).extend({options:{windyShow:!1,displayValues:!0,displayOptions:{velocityType:"Velocity",position:"bottomleft",emptyString:""},maxVelocity:10,colorScale:null,data:null},_map:null,_canvasLayer:null,_windy:null,_context:null,_timer:0,_mouseControl:null,_isWebGL:null,initialize:function(t){L.setOptions(this,t)},onAdd:function(t){this._canvasLayer=L.canvasLayer().delegate(this),this._canvasLayer.addTo(t),this._map=t,this.options.windyShow=!0},onRemove:function(t){this._destroyWind(),this.options.windyShow=!1},setData:function(t,n){if(this.options.data=t,this._windy){if(this._isWebGL){for(var e=t[0],i=t[1],r=Math.min.apply(null,e.data),o=Math.max.apply(null,e.data),a=Math.min.apply(null,i.data),s=Math.max.apply(null,i.data),u=e.header.max,l=e.header.min,h=[],c=0;c<e.data.length;c++){var f=Math.floor(255*(e.data[c]-l)/(u-l));h.push(f);f=Math.floor(255*(i.data[c]-l)/(u-l));h.push(f),h.push(0),h.push(255)}s={width:e.header.nx,height:e.header.ny,uMin:r,uMax:o,vMin:a,vMax:s,image:h,full_extent:[e.header.lo1,e.header.lo2,e.header.la1,e.header.la2],dx:e.header.dx,dy:e.header.dy};this._windy.setWind(s)}else this._windy.setData(t);this._clearAndRestart()}this.fire("load")},setColorSM:function(t,n,e){t=[t];this.options.colorScale=t,this.options.velocityScale=n,this.options.particleMultiplier=e,this._windy&&(this._windy.setColorSM(t,n,e),this._clearAndRestart()),this.fire("load")},onDrawLayer:function(t,n){var e=this;this._windy?this.options.data&&(this._windy&&this._windy.stop(),this._context&&!this._isWebGL&&this._context.clearRect(0,0,3e3,3e3),this._timer&&clearTimeout(e._timer),this._timer=setTimeout(function(){e._startWindy()},500)):this._initWindy(this)},_startWindy:function(){var t=this._map.getBounds(),n=this._map.getSize();this._windy.start([[0,0],[n.x,n.y]],n.x,n.y,[[t._southWest.lng,t._southWest.lat],[t._northEast.lng,t._northEast.lat]])},_initWindy:function(t){var n;this._isWebGL=!1,this._isWebGL?(this._context=t._canvasLayer._canvas.getContext("webgl",{antialiasing:!1}),n=Object.assign({canvas:t._canvasLayer._canvas,ctx:this._context},t.options),this._windy=new WindGL(this._context,n)):(this._context=this._canvasLayer._canvas.getContext("2d"),n=Object.assign({canvas:t._canvasLayer._canvas,ctx:this._context},t.options),this._windy=new Windy(n)),this._canvasLayer._canvas.classList.add("velocity-overlay"),this.onDrawLayer(),this._initMouseHandler()},_initMouseHandler:function(){var t;!this._mouseControl&&this.options.displayValues&&(((t=this.options.displayOptions||{}).leafletVelocity=this)._mouseControl=L.control.velocity(t).addTo(this._map))},_clearAndRestart:function(){this._context&&!this._isWebGL&&this._context.clearRect(0,0,3e3,3e3),this._windy&&this._startWindy()},_clearWind:function(){this._windy&&this._windy.stop(),this._context&&!this._isWebGL&&this._context.clearRect(0,0,3e3,3e3)},_destroyWind:function(){this._timer&&clearTimeout(this._timer),this._windy&&this._windy.stop(),this._context&&!this._isWebGL&&this._context.clearRect(0,0,3e3,3e3),this._mouseControl&&this._map.removeControl(this._mouseControl),this._mouseControl=null,this._windy=null,this._canvasLayer&&this._map.removeLayer(this._canvasLayer)}}),L.velocityLayer=function(t){return new L.VelocityLayer(t)};var Windy=function(f){function o(t,n,e,i,r,o){var a=(u=1-t)*(s=1-n),s=t*s,u=u*n,t=t*n,n=e[0]*a+i[0]*s+r[0]*u+o[0]*t,t=e[1]*a+i[1]*s+r[1]*u+o[1]*t;return[n,t,Math.sqrt(n*n+t*t)]}function s(t){var n,e,i=null,r=null,r=t[1],i=t[0];return r=r,n=(i=i).data,e=r.data,{header:i.header,data:function(t){return[n[t],e[t]]},interpolate:o}}function a(e,r,t,n){function o(t,n){t=e[Math.round(t)];return t&&t[Math.round(n)]||i}o.release=function(){e=[]},o.randomize=function(t){for(var n,e,i=0;n=Math.round(Math.floor(Math.random()*r.width)+r.x),e=Math.round(Math.floor(Math.random()*r.height)+r.y),null===o(n,e)[2]&&i++<30;);return t.x=n,t.y=e,t},n(r,o,t)}function u(t){return t/180*Math.PI}function x(t){return t/(Math.PI/180)}function l(t){return Math.log(Math.tan(t/2+Math.PI/4))}function h(p,_,m,e){var g={},t=(m.south-m.north)*(m.west-m.east),v=P*Math.pow(t,.4),y=[],i=_.x,b=6;function r(t){for(var n,e,i,r,o,a,s=[],u=_.y;u<=_.yMax;u+=b){var l=(n=t,e=u,o=o=a=o=r=void 0,r=(i=m).east-i.west,o=i.width/x(r)*360/(2*Math.PI),a=o/2*Math.log((1+Math.sin(i.south))/(1-Math.sin(i.south))),o=(i.height+a-e)/o,o=180/Math.PI*(2*Math.atan(Math.exp(o))-Math.PI/2),[x(i.west)+n/i.width*x(r),o]),h=l[0],c=l[1];if(isFinite(h)){var f=p.interpolate(h,c);if(f){a=g,e=h,n=c,i=t,r=u,o=v,l=m,h=void 0,h=(c=f)[0]*o,o=c[1]*o,l=B(a,e,n,i,r,l),c[0]=l[0]*h+l[2]*o,c[1]=l[1]*h+l[3]*o,f=c;for(var d=1;d<b;d+=1)s[u+d]=s[u]=f}}}for(d=1;d<b;d+=1)y[t+d]=y[t]=s}!function t(){for(var n=Date.now();i<_.width;)if(r(i),i+=b,25<Date.now()-n)return void setTimeout(t,25);a(y,_,m,e)}()}function c(i,o,t){var n,e,a=(n=L,e=T,A.indexFor=function(t){return Math.max(0,Math.min(A.length-1,Math.round((t-n)/(e-n)*(A.length-1))))},A),s=a.map(function(){return[]}),t=(t.south-t.north)*(t.west-t.east),t=Math.pow(t,.2),r=Math.round(i.width*i.height*S*t);/android|blackberry|iemobile|ipad|iphone|ipod|opera mini|webos/i.test(navigator.userAgent)&&(r*=1);for(var u=[],l=0;l<r;l++)u.push(o.randomize({age:Math.floor(Math.random()*k)+0}));var h=f.ctx;h.lineWidth=C,h.fillStyle="rgba(0, 0, 0, 0.9)",h.globalAlpha=.6;var c=Date.now();!function t(){M&&cancelAnimationFrame(M);var n=Date.now(),e=n-c;E<e&&(c=n-e%E,s.forEach(function(t){t.length=0}),u.forEach(function(t){t.age>k&&(o.randomize(t).age=0);var n=t.x,e=t.y,i=o(n,e),r=i[2];null===r?t.age=k:(n=n+i[0],i=e+i[1],null!==o(n,i)[2]?(t.xt=n,t.yt=i,s[a.indexFor(r)].push(t)):(t.x=n,t.y=i)),t.age+=1}),h.globalCompositeOperation="destination-in",h.fillRect(i.x,i.y,i.width,i.height),h.globalCompositeOperation="lighter",h.globalAlpha=.9,s.forEach(function(t,n){0<t.length&&(h.beginPath(),h.strokeStyle=a[n],t.forEach(function(t){h.moveTo(t.x,t.y),h.lineTo(t.xt,t.yt),t.x=t.xt,t.y=t.yt}),h.stroke())})),M=requestAnimationFrame(t)}()}var d,p,_,m,g,v,y,b,w,M,L=f.minVelocity||0,T=f.maxVelocity||10,P=(f.velocityScale||.005)*(Math.pow(window.devicePixelRatio,1/3)||1),k=f.particleAge||50,C=f.lineWidth||1.6,S=f.particleMultiplier||1/300,E=1e3/(f.frameRate||30),A=f.colorScale||["rgb(36,104, 180)","rgb(60,157, 194)","rgb(128,205,193 )","rgb(151,218,168 )","rgb(198,231,181)","rgb(238,247,217)","rgb(255,238,159)","rgb(252,217,125)","rgb(255,182,100)","rgb(252,150,75)","rgb(250,112,52)","rgb(245,64,32)","rgb(237,45,28)","rgb(220,24,32)","rgb(180,0,35)"],i=[NaN,NaN,null],z=f.data,N=function(t,n){if(!p)return null;var e,i=O(t-m,360)/v,r=(g-n)/y,o=Math.floor(i),a=o+1,s=Math.floor(r),u=s+1;if(e=p[s]){t=e[o],n=e[a];if(I(t)&&I(n)&&(e=p[u])){u=e[o],a=e[a];if(I(u)&&I(a))return d.interpolate(i-o,r-s,t,n,u,a)}}return null},I=function(t){return null!=t},O=function(t,n){return t-n*Math.floor(t/n)},B=function(t,n,e,i,r,o){var a=2*Math.PI,s=Math.pow(10,-5.2),u=n<0?s:-s,l=e<0?s:-s,s=R(e,n+u,o),o=R(e+l,n,o),a=Math.cos(e/360*a);return[(s[0]-i)/u/a,(s[1]-r)/u/a,(o[0]-i)/l,(o[1]-r)/l]},R=function(t,n,e){var i=l(e.south),r=l(e.north),o=e.width/(e.east-e.west),i=e.height/(r-i),t=l(u(t));return[(u(n)-e.west)*o,t=(r-t)*i]},D=function(){Z.field&&Z.field.release(),M&&cancelAnimationFrame(M)},Z={params:f,start:function(n,e,i,t){var r={south:u(t[0][1]),north:u(t[1][1]),east:u(t[1][0]),west:u(t[0][0]),width:e,height:i};D(),z&&function(t,n){t=(d=s(t)).header,m=t.lo1,g=t.la1,v=t.dx,y=t.dy,b=t.nx,w=t.ny,(_=new Date(t.refTime)).setHours(_.getHours()+t.forecastTime),p=[];for(var e=0,i=360<=Math.floor(b*v),r=0;r<w;r++){for(var o=[],a=0;a<b;a++,e++)o[a]=d.data(e);i&&o.push(o[0]),p[r]=o}n({date:_,interpolate:N})}(z,function(t){h(t,function(t,n,e){var i=t[0],r=t[1],t=Math.round(i[0]),i=Math.max(Math.floor(i[1],0),0);Math.min(Math.ceil(r[0],n),n-1);return{x:t,y:i,xMax:n,yMax:Math.min(Math.ceil(r[1],e),e-1),width:n,height:e}}(n,e,i),r,function(t,n,e){Z.field=n,c(t,n,e)})})},stop:D,createField:a,interpolatePoint:N,setData:function(t){z=t},setColorSM:function(t,n,e){A=t,P=n,S=e}};return Z};window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),L.WindUtil=L.Class.extend({options:{width:1,height:1,mapColorScale:[{content:"优",background:"#36ea00",color:"#000000"},{content:"良",background:"#feff00",color:"#000000"},{content:"轻度",background:"#fb8000",color:"#000000"},{content:"中度",background:"#f90000",color:"#feffff"},{content:"重度",background:"#98004d",color:"#feffff"},{content:"严重",background:"#7d0021",color:"#feffff"}],products:{wind:{type:"wind",suffix:"jpg",title:"风"},temp:{type:"temp",suffix:"jpg",title:"温度",range:[193,206,219,233.15,255.372,273.15,291,301,311,328],color:[[37,4,42,.6],[41,10,130,.6],[81,40,40,.6],[192,37,149,.6],[70,215,215,.6],[21,84,187,.6],[24,132,14,.6],[247,251,59,.6],[235,167,21,.6],[230,71,39,.6],[88,27,67,.6]],units:[{label:"°C",conversion:function(t){return t-273.15},precision:0},{label:"°F",conversion:function(t){return 9*t/5-459.67},precision:0},{label:"K",conversion:function(t){return t},precision:0}]},humidity:{type:"relative_humidity",suffix:"jpg",title:"相对湿度",range:[0,25,60,75,90,100],color:[[230,165,30,.6],[120,100,95,.6],[40,44,92,.6],[21,13,193,.6],[75,63,235,.6],[25,255,255,.6]],units:[{label:"%",conversion:function(t){return t},precision:0}]},tp:{type:"tp",suffix:"jpg",title:"降水量",range:[.1,.2,.5,1,2,4,6,8,10,15,20,30,40,50],color:[[117,117,117,.6],[91,87,137,.6],[73,102,170,.6],[70,153,171,.6],[83,184,100,.6],[145,206,76,.6],[206,218,62,.6],[220,182,64,.6],[219,158,69,.6],[217,121,77,.6],[210,96,95,.6],[179,56,103,.6],[147,23,78,.6],[84,16,41,.6]],units:[{label:"mm",conversion:function(t){return t}},{label:"kg/m²",conversion:function(t){return t}}]},aqi:{type:"aqi",suffix:"png",title:"空气质量指数",range:[0,50,100,150,200,300,400,500],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"",conversion:function(t){return t},precision:0}]},no2:{type:"no2",suffix:"png",title:"二氧化氮",range:[0,100,200,700,1200,2340,3090,3840],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]},so2:{type:"so2",suffix:"png",title:"二氧化硫",range:[0,150,500,650,800],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]},co:{type:"co",suffix:"png",title:"一氧化碳",range:[0,5,10,35,60,90,120,150],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"mg/m³",conversion:function(t){return t},precision:1}]},pm25:{type:"pm2_5",suffix:"png",title:"细颗粒物(PM2.5)",range:[0,35,75,115,150,250,350,500],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]},pm10:{type:"pm10",suffix:"png",title:"颗粒物(PM10)",range:[0,50,150,250,350,420,500,600],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]},o3:{type:"o3",suffix:"png",title:"臭氧",range:[0,160,200,300,400,800,1e3,1200],color:[[0,288,0,.6],[255,255,0,.6],[255,126,0,.6],[255,0,0,.6],[153,0,76,.6],[126,0,35,.6],[126,0,35,.6],[126,0,35,.6]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]},dswrf:{type:"dswrf",suffix:"jpg",title:"辐射量",range:[100,200,300,400,500,600,700,800,900,1e3,1100,1200],color:[[80,148,181,.9],[59,155,189,.9],[90,216,117,.9],[137,215,79,.9],[186,222,73,.9],[239,247,71,.9],[241,180,52,.9],[248,125,32,.9],[212,77,11,.9],[191,56,8,.9],[184,31,13,.9],[148,7,9,.9]],units:[{label:"W/m²",conversion:function(t){return t},precision:0}]},pslv:{type:"pslv",suffix:"jpg",title:"海平面气压",range:[990,995,1e3,1005,1010,1015,1020,1025,1030,1035,1040,1045,1050],color:[[40,9,119,.9],[61,25,83,.9],[110,39,69,.9],[151,96,171,.9],[63,197,211,.9],[21,88,169,.9],[22,114,77,.9],[79,161,25,.9],[213,233,52,.9],[236,178,26,.9],[230,77,37,.9],[144,44,55,.9]],units:[{label:"hPa",conversion:function(t){return t},precision:0}]},dusmass:{type:"dusmass",suffix:"png",title:"沙尘",range:[0,50,150,250,500,600],color:[[42,102,105,.9],[111,185,55,.9],[196,199,64,.9],[240,214,187,.9],[251,251,251,.9]],units:[{label:"µg/m³",conversion:function(t){return t},precision:0}]}}},initialize:function(t,n){this.name=t,L.setOptions(this,n)},getAllDate:function(t,n){var e=[];e.push(n);for(var i=new Date(t),r=new Date(n);0<new Date(r).getTime()-new Date(i).getTime();)r=new Date(r).getTime()-864e5,e.push(this.rebuildTime(r,1));return e},rebuildTime:function(t,n){var e=new Date(t),i=e.getFullYear(),r=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,o=e.getDate()<10?"0"+e.getDate():e.getDate(),a=e.getHours()<10?"0"+e.getHours():e.getHours(),s=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),u=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds(),e="星期"+"日一二三四五六".charAt(e.getDay());return 1==n?i+"-"+r+"-"+o:2==n?i+"年"+r+"月"+o+"日":3==n?i+"-"+r+"-"+o+" "+a+":"+s:4==n?i+"-"+r+"-"+o+" "+a+":"+s+":"+u:5==n?i+"-01-01 00:00:00":6==n?i+"/"+r+"/"+o:7==n?i+"/"+r+"/"+o+" 00:00:00":8==n?a+":"+s:9==n?40<s?i+"-"+r+"-"+o+" "+a+":00":this.rebuildTime(t-3600,9):10==n?i+"-"+r:11==n?i+""+r+o:13==n?i+"-"+r+"-"+o+" 00:00:00 +0800":14==n?r+"月"+o+"日 "+e:15==n?i+""+r+o+a:17==n?r+"月"+o+"日":18==n?r+"-"+o:19==n?i+"-"+r+"-"+o+" "+a+":00:00":20==n?i+"-"+r+"-"+o+" "+a+":00":21==n?i+"年"+r+"月"+o+"日 "+e+" "+a+":"+s:22==n?i+"-"+r+"-"+o+" 00:00":23==n?i+"/"+r+"/"+o+" 00:00":i+"年"+r+"月"+o+"日"+a+"时"},checkOs:function(){var t=navigator.userAgent,n=/(?:Windows Phone)/.test(t),e=/(?:SymbianOS)/.test(t)||n,i=/(?:Android)/.test(t),n=/(?:Firefox)/.test(t),n=(/(?:Chrome|CriOS)/.test(t),/(?:iPad|PlayBook)/.test(t)||i&&!/(?:Mobile)/.test(t)||n&&/(?:Tablet)/.test(t)),t=/(?:iPhone)/.test(t)&&!n;return{isTablet:n,isPhone:t,isAndroid:i,isPc:!t&&!i&&!e}},getUrlParams:function(t){t=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(t);return null!=t?decodeURI(t[2]):null},checkLevel:function(t,e){var n={aqi:[0,50,100,150,200,300],so2:[0,150,500,650,800,1600],no2:[0,100,200,700,1200,2340],pm10:[0,50,150,250,350,420],co:[0,5,10,35,60,90],o3:[0,160,200,300,400,800],pm25:[0,35,75,115,150,250]},i=1;return n[t]&&n[t].forEach(function(t,n){Number(e)>t&&(i=n+1)}),i},changeColor:function(t){return 301<=t?{background:"#7d0021",color:"#fff"}:201<=t&&t<301?{background:"#98004d",color:"#fff"}:151<=t&&t<201?{background:"#f90000",color:"#fff"}:101<=t&&t<151?{background:"#fb8000",color:"#000"}:51<=t&&t<101?{background:"#feff00",color:"#000"}:0<=t&&t<51?{background:"#36ea00",color:"#000"}:{}},changeTxtColor:function(t){return 301<=t?{color:"#7d0021"}:201<=t&&t<301?{color:"#98004d"}:151<=t&&t<201?{color:"#f90000"}:101<=t&&t<151?{color:"#fb8000"}:51<=t&&t<101?{color:"#feff00"}:0<=t&&t<51?{color:"#36ea00"}:{}},changeGrade:function(t){return 0<=t&&t<51?"优":51<=t&&t<101?"良":101<=t&&t<151?"轻":151<=t&&t<201?"中":201<=t&&t<301?"重":301<=t?"严重":{}},changeTxtGrade:function(t){return 0<=t&&t<51?"优":51<=t&&t<101?"良":101<=t&&t<151?"轻度污染":151<=t&&t<201?"中度污染":201<=t&&t<301?"重度污染":301<=t?"严重污染":{}},changeMainPollutant:function(t,n){return t<=50?"—":0==n?"CO":1==n?"SO2":2==n?"NO2":3==n?"PM2.5":4==n?"PM10":5==n?"O3":""},changeSpeed:function(t){return null==t?null:0<=t&&t<=.2?0:.3<=t&&t<=1.5?1:1.6<=t&&t<=3.3?2:3.4<=t&&t<=5.4?3:5.5<=t&&t<=7.9?4:8<=t&&t<=10.7?5:10.8<=t&&t<=13.8?6:13.9<=t&&t<=17.1?7:17.2<=t&&t<=20.7?8:20.8<=t&&t<=24.4?9:24.5<=t&&t<=28.4?10:28.5<=t&&t<=32.6?11:12},timeRange:function(t,n,e){t=new Date(t),t=new Date(n).getTime()-t.getTime();return"hour"==e?Math.floor(t/1e3/60/60):"day"==e?Math.floor(t/1e3/60/60/24):"month"==e?Math.floor(t/1e3/60/60/24/30):void 0},changeDirection:function(t){return null==t?null:0<=t&&t<=22.5?"北风":22.6<=t&&t<=67.5?"东北风":67.6<=t&&t<=112.5?"东风":112.6<=t&&t<=157.5?"东南风":157.6<=t&&t<=202.5?"南风":202.6<=t&&t<=247.5?"西南风":247.6<=t&&t<=292.5?"西风":292.6<=t&&t<=337.5?"西北风":""},getImgUrl:function(t,n){t=new Date(t.getTime()-288e5);return"https://wind.xqqx123.com/data/weather/"+t.getFullYear()+"/"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"/"+(t.getDate()<10?"0"+t.getDate():t.getDate())+"/"+(t.getHours()<10?"0"+t.getHours():t.getHours())+"00-"+n.type+"-surface-level-gfs-0.25."+n.suffix},loadImage:function(n,e){var i=this;axios.get(n).then(function(t){i.getImgData(n,e)}).catch(function(t){})},getImgData:function(t,n,e){var i,r=this,o=r.getImgUrl(t,n),a=document.createElement("canvas"),s=a.getContext("2d"),u=new Image;u.crossOrigin="Anonymous",u.onload=function(){a.width=u.width,a.height=u.height,s.drawImage(u,0,0);var t=s.getImageData(0,0,u.width,u.height).data;i=r.decodeImage(t,o,u.width),e(i)},u.src=o,u.onerror=function(){console.log({status:-1,message:"Cannot load resource: "+o,resource:o})}},decodeImage:function(t,n,e){var i=/.*(\d{4})\/(\d{1,2})\/(\d{1,2})\/(\d{3,4})/.exec(n),r=i[1]+"-"+i[2]+"-"+i[3]+"T"+i[4].substr(0,2)+":00:00.000Z",o=/wind/.test(n),a=8,i={};/png/.test(n)?(a=1,i=this.decodeHead(t,e)):(i=this.decodeHeadJPG(t,e)).refTime=r,console.log(i);for(var s,u=[],l=[],r=[],h=t.length,c=a*e*4;c<h;c+=4)u.push(t[c]),l.push(t[c+1]);return o?(s=this.decodeBody(i,u),r.push({header:i,data:s}),o=this.decodeBody(i,l),r.push({header:i,data:o})):(s=this.decodeBody(i,u),r.push({header:i,data:s})),r},decodeHeadJPG:function(t,n){for(var e=4*n*4+8,i=4*n*4+704,n=new ArrayBuffer(44),r=new Uint8Array(n),n=new Float32Array(n),o=0,a=e;a<i;a+=16){var s=t[a],u=t[a+1],l=t[a+2],s=Math.round(s/64),u=Math.round(u/16),l=Math.round(l/64);r[o]=(s<<6)+(u<<2)+l,o+=1}e={isForecast:0,nx:0,ny:0,lo1:0,lo2:359.8,la1:90,la2:-90,dx:.25,dy:.25,max:328.15,min:193.15};return e.isForecast=n[0],e.nx=n[1],e.ny=n[2],e.lo1=n[3],e.lo2=n[4],e.la1=n[5],e.la2=n[6],e.dx=n[7],e.dx=n[7],e.dy=n[8],e.max=n[9],e.min=n[10],e},decodeHead:function(t,n){for(var e=[],i=0;i<4*n;i+=4)e.push(t[i]);for(var r=[],o=e.length,i=0;i<o;i++)0!=e[i]&&r.push(String.fromCharCode(e[i]));return JSON.parse("{"+r.join("")+"}")},decodeBody:function(t,n,e){return this.unscaleArr(n,t.min,t.max,e)},unscaleArr:function(t,n,e,i){for(var r=t.length,o=0;o<r;o++)t[o]<5?t[o]=null:(t[o]<10&&(t[o]=10),t[o]=this.unscale(t[o],n,e));return t},unscale:function(t,n,e){var i=[10,255];return(e-n)*(t-i[0])/(i[1]-i[0])+n}}),L.windUtil=function(t){return new L.WindUtil(t)},L.ScaleLayer=L.GridLayer.extend({options:{_color:null,_interpolate:!1,_map:null,_field:null,_canvases:{},_product:null,_old_tiles:[]},setData:function(t,n){this.options._field=t,this.options._product=n;var e,i=document.createDocumentFragment();for(e in this._tiles){var r=this._tiles[e].coords;this._addTile(r,i)}this._level&&this._level.el.appendChild(i)},setColor:function(t){this.options._color=t},prepareImageIn:function(t,n,e){var i=e.x,r=e.y,o=n.scaleBy(e),a=0,s=1;4<n.z&&(s=2),7<n.z&&(s=4),10<n.z&&(s=8),13<n.z&&(s=16);for(var u=0;u<r;u+=s){for(var l=0;l<i;l+=s){var h=this.options._map.unproject(o.add([l,u]),n.z),h=this.options._field.interpolatedValueAt(h.lng,h.lat);if(null!==h)for(var h=this.options._color(h).rgba(),c=h[0],f=h[1],d=h[2],p=(h[3],0);p<s;p++)for(var _=0;_<s;_++)t[a+4*i*p+4*_]=c,t[a+4*i*p+4*_+1]=f,t[a+4*i*p+4*_+2]=d,t[a+4*i*p+4*_+3]=255;a+=4*s}a+=(i-(i%2!=0?1:0))*(s-1)*4}},onAdd:function(t){this._currentPoint=document.getElementById("currentPoint"),this._mapBox=t._container,document.getElementById("scale-value").style.display="block",t.on("mousemove",this._onMouseMove,this),this.options._map=t,null!=this.options._field&&L.GridLayer.prototype.onAdd.call(this,t)},onRemove:function(t){t.off("mousemove",this._onMouseMove,this),document.getElementById("scale-value").style.display="none",document.getElementById("scale-value").innerHTML="",document.getElementById("currentPoint").style.display="none",L.GridLayer.prototype.onRemove.call(this,t)},_onMouseMove:function(t){var n=this,e=this.options._map.containerPointToLatLng(L.point(t.containerPoint.x,t.containerPoint.y)),e=this.options._field.valueAt(e.lng,e.lat);n._currentPoint&&(t.containerPoint.x>n._mapBox.clientWidth-200?n._currentPoint.style.left=n._mapBox.clientWidth-250+"px":n._currentPoint.style.left=t.containerPoint.x+10+"px",t.containerPoint.y>n._mapBox.clientHeight-30?n._currentPoint.style.top=n._mapBox.clientHeight-30+"px":n._currentPoint.style.top=t.containerPoint.y+"px");n=this.options._product,t="";e&&(t=n.title+": "+n.units[0].conversion(e).toFixed(n.units[0].precision)+" "+n.units[0].label),document.getElementById("scale-value").innerHTML=t},createTile:function(t){var n,e,i=null,r=t.z+"-"+t.x+"-"+t.y,o=null;this.options._canvases[r]&&this.options._old_tiles.push(this.options._canvases[r]),i=L.DomUtil.create("canvas","leaflet-tile"),this.options._canvases[r]=i,e=this.getTileSize(),i.width=e.x,i.height=e.y;r=(n=(o=i.getContext("2d")).createImageData(i.width,i.height)).data;return this.prepareImageIn(r,t,e),o.putImageData(n,0,0),i}}),L.scaleLayer=function(t){return new L.ScaleLayer(t)},function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.chroma=n()}(this,function(){for(var e=function(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=1),t<n?n:e<t?e:t},n={},t=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];t<i.length;t+=1){var r=i[t];n["[object "+r+"]"]=r.toLowerCase()}function j(t){return n[Object.prototype.toString.call(t)]||"object"}var o=Math.PI,a={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||255<t[n])&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:j,unpack:function(n,t){return void 0===t&&(t=null),3<=n.length?Array.prototype.slice.call(n):"object"==j(n[0])&&t?t.split("").filter(function(t){return void 0!==n[0][t]}).map(function(t){return n[0][t]}):n[0]},last:function(t){if(t.length<2)return null;var n=t.length-1;return"string"==j(t[n])?t[n].toLowerCase():null},PI:o,TWOPI:2*o,PITHIRD:o/3,DEG2RAD:o/180,RAD2DEG:180/o},c={format:{},autodetect:[]},s=a.last,u=a.clip_rgb,l=a.type,h=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if("object"===l(t[0])&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];var e=s(t),i=!1;if(!e){i=!0,c.sorted||(c.autodetect=c.autodetect.sort(function(t,n){return n.p-t.p}),c.sorted=!0);for(var r=0,o=c.autodetect;r<o.length;r+=1){var a=o[r];if(e=a.test.apply(a,t))break}}if(!c.format[e])throw new Error("unknown format: "+t);i=c.format[e].apply(null,i?t:t.slice(0,-1));this._rgb=u(i),3===this._rgb.length&&this._rgb.push(1)};h.prototype.toString=function(){return"function"==l(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var _=h,f=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(f.Color,[null].concat(t)))};f.Color=_,f.version="2.1.0";var M=f,d=a.unpack,p=Math.max,m=a.unpack,g=a.unpack,v=a.type;_.prototype.cmyk=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=d(t,"rgb"),i=e[0],r=e[1],o=e[2],a=1-p(i/=255,p(r/=255,o/=255)),e=a<1?1/(1-a):0;return[(1-i-a)*e,(1-r-a)*e,(1-o-a)*e,a]}(this._rgb)},M.cmyk=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["cmyk"])))},c.format.cmyk=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(t=m(t,"cmyk"))[0],i=t[1],r=t[2],o=t[3],a=4<t.length?t[4]:1;return 1===o?[0,0,0,a]:[1<=e?0:255*(1-e)*(1-o),1<=i?0:255*(1-i)*(1-o),1<=r?0:255*(1-r)*(1-o),a]},c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=g(t,"cmyk"),"array"===v(t)&&4===t.length)return"cmyk"}});function y(t){return Math.round(100*t)/100}function b(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(t=P(t,"rgba"))[0],i=t[1],r=t[2];e/=255,i/=255,r/=255;var o,a,s=Math.min(e,i,r),u=Math.max(e,i,r),l=(u+s)/2;return u===s?(o=0,a=Number.NaN):o=l<.5?(u-s)/(u+s):(u-s)/(2-u-s),e==u?a=(i-r)/(u-s):i==u?a=2+(r-e)/(u-s):r==u&&(a=4+(e-i)/(u-s)),(a*=60)<0&&(a+=360),3<t.length&&void 0!==t[3]?[a,o,l,t[3]]:[a,o,l]}function x(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=k(t,"rgba"),i=C(t)||"rgb";return"hsl"==i.substr(0,3)?function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=L(t,"hsla"),i=T(t)||"lsa";return e[0]=y(e[0]||0),e[1]=y(100*e[1])+"%",e[2]=y(100*e[2])+"%","hsla"===i||3<e.length&&e[3]<1?(e[3]=3<e.length?e[3]:1,i="hsla"):e.length=3,i+"("+e.join(",")+")"}(b(e),i):(e[0]=S(e[0]),e[1]=S(e[1]),e[2]=S(e[2]),("rgba"===i||3<e.length&&e[3]<1)&&(e[3]=3<e.length?e[3]:1,i="rgba"),i+"("+e.slice(0,"rgb"===i?3:4).join(",")+")")}function w(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e,i,r,o=(t=E(t,"hsl"))[0],a=t[1],s=t[2];if(0===a)e=i=r=255*s;else{var u=[0,0,0],l=[0,0,0],h=s<.5?s*(1+a):s+a-s*a,c=2*s-h,o=o/360;u[0]=o+1/3,u[1]=o,u[2]=o-1/3;for(var f=0;f<3;f++)u[f]<0&&(u[f]+=1),1<u[f]&&--u[f],6*u[f]<1?l[f]=c+6*(h-c)*u[f]:2*u[f]<1?l[f]=h:3*u[f]<2?l[f]=c+(h-c)*(2/3-u[f])*6:l[f]=c;e=(o=[A(255*l[0]),A(255*l[1]),A(255*l[2])])[0],i=o[1],r=o[2]}return 3<t.length?[e,i,r,t[3]]:[e,i,r,1]}var L=a.unpack,T=a.last,P=a.unpack,k=a.unpack,C=a.last,S=Math.round,E=a.unpack,A=Math.round,z=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,N=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,I=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,O=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,B=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,R=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,D=Math.round,Z=function(t){var n;if(t=t.toLowerCase().trim(),c.format.named)try{return c.format.named(t)}catch(t){}if(n=t.match(z)){for(var e=n.slice(1,4),i=0;i<3;i++)e[i]=+e[i];return e[3]=1,e}if(n=t.match(N)){for(var r=n.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(n=t.match(I)){for(var a=n.slice(1,4),s=0;s<3;s++)a[s]=D(2.55*a[s]);return a[3]=1,a}if(n=t.match(O)){for(var u=n.slice(1,5),l=0;l<3;l++)u[l]=D(2.55*u[l]);return u[3]=+u[3],u}if(n=t.match(B)){var h=n.slice(1,4);h[1]*=.01,h[2]*=.01;h=w(h);return h[3]=1,h}if(n=t.match(R)){h=n.slice(1,4);h[1]*=.01,h[2]*=.01;h=w(h);return h[3]=+n[4],h}};Z.test=function(t){return z.test(t)||N.test(t)||I.test(t)||O.test(t)||B.test(t)||R.test(t)};var F=Z,U=a.type;_.prototype.css=function(t){return x(this._rgb,t)},M.css=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["css"])))},c.format.css=F,c.autodetect.push({p:5,test:function(t){for(var n=[],e=arguments.length-1;0<e--;)n[e]=arguments[e+1];if(!n.length&&"string"===U(t)&&F.test(t))return"css"}});var q=a.unpack;c.format.gl=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=q(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e},M.gl=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["gl"])))},_.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var W=a.unpack,H=a.unpack,V=Math.floor,Y=a.unpack,G=a.type;_.prototype.hcg=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e,i=W(t,"rgb"),r=i[0],o=i[1],a=i[2],s=Math.min(r,o,a),u=Math.max(r,o,a),l=u-s,i=100*l/255,s=s/(255-l)*100;return 0==l?e=Number.NaN:(r===u&&(e=(o-a)/l),o===u&&(e=2+(a-r)/l),a===u&&(e=4+(r-o)/l),(e*=60)<0&&(e+=360)),[e,i,s]}(this._rgb)},M.hcg=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hcg"])))},c.format.hcg=function(){for(var t,n,e,i=[],r=arguments.length;r--;)i[r]=arguments[r];var o,a,s,u=(i=H(i,"hcg"))[0],l=i[1],h=i[2];h*=255;var c=255*l;if(0===l)o=a=s=h;else{360===u&&(u=0),360<u&&(u-=360),u<0&&(u+=360);var f=V(u/=60),u=u-f,d=h*(1-l),p=d+c*(1-u),_=d+c*u,m=d+c;switch(f){case 0:o=(t=[m,_,d])[0],a=t[1],s=t[2];break;case 1:o=(t=[p,m,d])[0],a=t[1],s=t[2];break;case 2:o=(n=[d,m,_])[0],a=n[1],s=n[2];break;case 3:o=(n=[d,p,m])[0],a=n[1],s=n[2];break;case 4:o=(e=[_,d,m])[0],a=e[1],s=e[2];break;case 5:o=(e=[m,d,p])[0],a=e[1],s=e[2]}}return[o,a,s,3<i.length?i[3]:1]},c.autodetect.push({p:1,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=Y(t,"hcg"),"array"===G(t)&&3===t.length)return"hcg"}});function X(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(a=$(t,"rgba"))[0],i=a[1],r=a[2],o=a[3],a=J(t)||"auto";void 0===o&&(o=1),"auto"===a&&(a=o<1?"rgba":"rgb");var s=(s="000000"+(Q(e)<<16|Q(i)<<8|Q(r)).toString(16)).substr(s.length-6),u=(u="0"+Q(255*o).toString(16)).substr(u.length-2);switch(a.toLowerCase()){case"rgba":return"#"+s+u;case"argb":return"#"+u+s;default:return"#"+s}}function K(t){if(t.match(tt)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var n=parseInt(t,16);return[n>>16,n>>8&255,255&n,1]}if(t.match(nt)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);n=parseInt(t,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+t)}var $=a.unpack,J=a.last,Q=Math.round,tt=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,nt=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,et=a.type;_.prototype.hex=function(t){return X(this._rgb,t)},M.hex=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hex"])))},c.format.hex=K,c.autodetect.push({p:4,test:function(t){for(var n=[],e=arguments.length-1;0<e--;)n[e]=arguments[e+1];if(!n.length&&"string"===et(t)&&0<=[3,4,5,6,7,8,9].indexOf(t.length))return"hex"}});var it=a.unpack,rt=a.TWOPI,ot=Math.min,at=Math.sqrt,st=Math.acos,ut=a.unpack,lt=a.limit,ht=a.TWOPI,ct=a.PITHIRD,ft=Math.cos,dt=a.unpack,pt=a.type;_.prototype.hsi=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e,i=it(t,"rgb"),r=i[0],o=i[1],a=i[2],s=ot(r/=255,o/=255,a/=255),i=(r+o+a)/3,s=0<i?1-s/i:0;return 0==s?e=NaN:(e=(r-o+(r-a))/2,e/=at((r-o)*(r-o)+(r-a)*(o-a)),e=st(e),o<a&&(e=rt-e),e/=rt),[360*e,s,i]}(this._rgb)},M.hsi=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hsi"])))},c.format.hsi=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e,i,r,o=(t=ut(t,"hsi"))[0],a=t[1],s=t[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),360<o&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?i=1-((r=(1-a)/3)+(e=(1+a*ft(ht*o)/ft(ct-ht*o))/3)):o<2/3?r=1-((e=(1-a)/3)+(i=(1+a*ft(ht*(o-=1/3))/ft(ct-ht*o))/3)):e=1-((i=(1-a)/3)+(r=(1+a*ft(ht*(o-=2/3))/ft(ct-ht*o))/3)),[255*(e=lt(s*e*3)),255*(i=lt(s*i*3)),255*(r=lt(s*r*3)),3<t.length?t[3]:1]},c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=dt(t,"hsi"),"array"===pt(t)&&3===t.length)return"hsi"}});var _t=a.unpack,mt=a.type;_.prototype.hsl=function(){return b(this._rgb)},M.hsl=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hsl"])))},c.format.hsl=w,c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=_t(t,"hsl"),"array"===mt(t)&&3===t.length)return"hsl"}});var gt=a.unpack,vt=Math.min,yt=Math.max,bt=a.unpack,xt=Math.floor,wt=a.unpack,Mt=a.type;_.prototype.hsv=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e,i,r=(t=gt(t,"rgb"))[0],o=t[1],a=t[2],s=vt(r,o,a),u=yt(r,o,a),l=u-s,s=u/255;return 0===u?(e=Number.NaN,i=0):(i=l/u,r===u&&(e=(o-a)/l),o===u&&(e=2+(a-r)/l),a===u&&(e=4+(r-o)/l),(e*=60)<0&&(e+=360)),[e,i,s]}(this._rgb)},M.hsv=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hsv"])))},c.format.hsv=function(){for(var t,n,e,i=[],r=arguments.length;r--;)i[r]=arguments[r];var o,a,s,u=(i=bt(i,"hsv"))[0],l=i[1],h=i[2];if(h*=255,0===l)o=a=s=h;else{360===u&&(u=0),360<u&&(u-=360),u<0&&(u+=360);var c=xt(u/=60),u=u-c,f=h*(1-l),d=h*(1-l*u),p=h*(1-l*(1-u));switch(c){case 0:o=(t=[h,p,f])[0],a=t[1],s=t[2];break;case 1:o=(t=[d,h,f])[0],a=t[1],s=t[2];break;case 2:o=(n=[f,h,p])[0],a=n[1],s=n[2];break;case 3:o=(n=[f,d,h])[0],a=n[1],s=n[2];break;case 4:o=(e=[p,f,h])[0],a=e[1],s=e[2];break;case 5:o=(e=[h,f,d])[0],a=e[1],s=e[2]}}return[o,a,s,3<i.length?i[3]:1]},c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=wt(t,"hsv"),"array"===Mt(t)&&3===t.length)return"hsv"}});function Lt(t){return(t/=255)<=.04045?t/12.92:Nt((t+.055)/1.055,2.4)}function Tt(t){return.008856452<t?Nt(t,1/3):t/At+Et}function Pt(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(r=zt(t,"rgb"))[0],i=r[1],r=r[2];return[(r=116*(i=(e=(i=i,r=r,e=Lt(e=e),i=Lt(i),r=Lt(r),[Tt((.4124564*e+.3575761*i+.1804375*r)/.95047),Tt(.2126729*e+.7151522*i+.072175*r),Tt((.0193339*e+.119192*i+.9503041*r)/1.08883)]))[1])-16)<0?0:r,500*(e[0]-i),200*(i-e[2])]}function kt(t){return 255*(t<=.00304?12.92*t:1.055*Ot(t,1/2.4)-.055)}function Ct(t){return.206896552<t?t*t*t:At*(t-Et)}function St(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(t=It(t,"lab"))[0],i=t[1],r=t[2],e=(e+16)/116,i=isNaN(i)?e:e+i/500,r=isNaN(r)?e:e-r/200;return e=+Ct(e),i=.95047*Ct(i),r=1.08883*Ct(r),[kt(3.2404542*i-1.5371385*e-.4985314*r),kt(-.969266*i+1.8760108*e+.041556*r),kt(.0556434*i-.2040259*e+1.0572252*r),3<t.length?t[3]:1]}var Et=.137931034,At=.12841855,zt=a.unpack,Nt=Math.pow,It=a.unpack,Ot=Math.pow,Bt=a.unpack,Rt=a.type;_.prototype.lab=function(){return Pt(this._rgb)},M.lab=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["lab"])))},c.format.lab=St,c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=Bt(t,"lab"),"array"===Rt(t)&&3===t.length)return"lab"}});function Dt(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(r=Ht(t,"rgb"))[0],i=r[1],r=r[2];return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=Ft(t,"lab"),i=e[0],r=e[1],o=e[2],e=Ut(r*r+o*o),r=(qt(o,r)*jt+360)%360;return 0===Wt(1e4*e)&&(r=Number.NaN),[i,e,r]}((r=Pt(e,i,r))[0],r[1],r[2])}function Zt(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=(r=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=Vt(t,"lch"),i=e[0],r=e[1],e=e[2];return isNaN(e)&&(e=0),[i,Xt(e*=Yt)*r,Gt(e)*r]}((t=Kt(t,"lch"))[0],t[1],t[2]))[0],i=r[1],r=r[2];return[(r=St(e,i,r))[0],r[1],r[2],3<t.length?t[3]:1]}var Ft=a.unpack,jt=a.RAD2DEG,Ut=Math.sqrt,qt=Math.atan2,Wt=Math.round,Ht=a.unpack,Vt=a.unpack,Yt=a.DEG2RAD,Gt=Math.sin,Xt=Math.cos,Kt=a.unpack,$t=a.unpack,Jt=a.unpack,Qt=a.type;_.prototype.lch=function(){return Dt(this._rgb)},_.prototype.hcl=function(){return Dt(this._rgb).reverse()},M.lch=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["lch"])))},M.hcl=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["hcl"])))},c.format.lch=Zt,c.format.hcl=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=$t(t,"hcl").reverse();return Zt.apply(void 0,e)},["lch","hcl"].forEach(function(e){return c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=Jt(t,e),"array"===Qt(t)&&3===t.length)return e}})});var tn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},nn=a.type;_.prototype.name=function(){for(var t=X(this._rgb,"rgb"),n=0,e=Object.keys(tn);n<e.length;n+=1){var i=e[n];if(tn[i]===t)return i.toLowerCase()}return t},c.format.named=function(t){if(t=t.toLowerCase(),tn[t])return K(tn[t]);throw new Error("unknown color name: "+t)},c.autodetect.push({p:5,test:function(t){for(var n=[],e=arguments.length-1;0<e--;)n[e]=arguments[e+1];if(!n.length&&"string"===nn(t)&&tn[t.toLowerCase()])return"named"}});var en=a.unpack,rn=a.type,on=a.type;_.prototype.num=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=en(t,"rgb");return(e[0]<<16)+(e[1]<<8)+e[2]}(this._rgb)},M.num=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["num"])))},c.format.num=function(t){if("number"==rn(t)&&0<=t&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},c.autodetect.push({p:5,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(1===t.length&&"number"===on(t[0])&&0<=t[0]&&t[0]<=16777215)return"num"}});var an=a.unpack,sn=a.type,un=Math.round;_.prototype.rgb=function(t){return void 0===t&&(t=!0),!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(un)},_.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map(function(t,n){return!(n<3)||!1===e?t:un(t)})},M.rgb=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["rgb"])))},c.format.rgb=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=an(t,"rgba");return void 0===e[3]&&(e[3]=1),e},c.autodetect.push({p:3,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=an(t,"rgba"),"array"===sn(t)&&(3===t.length||4===t.length&&"number"==sn(t[3])&&0<=t[3]&&t[3]<=1))return"rgb"}});function ln(t){var n,e,i=(t=t/100)<66?(n=255,e=-155.25485562709179-.44596950469579133*(e=t-2)+104.49216199393888*hn(e),t<20?0:.8274096064007395*(i=t-10)-254.76935184120902+115.67994401066147*hn(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*hn(n),e=325.4494125711974+.07943456536662342*(e=t-50)-28.0852963507957*hn(e),255);return[n,e,i,1]}var hn=Math.log,cn=a.unpack,fn=Math.round;_.prototype.temp=_.prototype.kelvin=_.prototype.temperature=function(){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var e,i=cn(t,"rgb"),r=i[0],o=i[2],a=1e3,s=4e4;.4<s-a;){var u=ln(e=.5*(s+a));u[2]/u[0]>=o/r?s=e:a=e}return fn(e)}(this._rgb)},M.temp=M.kelvin=M.temperature=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return new(Function.prototype.bind.apply(_,[null].concat(t,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=ln;var dn=a.type;_.prototype.alpha=function(t,n){return void 0===n&&(n=!1),void 0!==t&&"number"===dn(t)?n?(this._rgb[3]=t,this):new _([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},_.prototype.clipped=function(){return this._rgb._clipped||!1},_.prototype.darken=function(t){void 0===t&&(t=1);var n=this.lab();return n[0]-=18*t,new _(n,"lab").alpha(this.alpha(),!0)},_.prototype.brighten=function(t){return void 0===t&&(t=1),this.darken(-t)},_.prototype.darker=_.prototype.darken,_.prototype.brighter=_.prototype.brighten,_.prototype.get=function(t){var n=t.split("."),e=n[0],i=n[1],t=this[e]();if(i){n=e.indexOf(i);if(-1<n)return t[n];throw new Error("unknown channel "+i+" in mode "+e)}return t};var pn=a.type,_n=Math.pow;_.prototype.luminance=function(r){if(void 0===r||"number"!==pn(r))return gn.apply(void 0,this._rgb.slice(0,3));if(0===r)return new _([0,0,0,this._rgb[3]],"rgb");if(1===r)return new _([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),o=20,a=function(t,n){var e=t.interpolate(n,.5,"rgb"),i=e.luminance();return Math.abs(r-i)<1e-7||!o--?e:r<i?a(t,e):a(e,n)},t=(r<t?a(new _([0,0,0]),this):a(this,new _([255,255,255]))).rgb();return new _(t.concat([this._rgb[3]]))};function mn(t,n,e){void 0===e&&(e=.5);for(var i=[],r=arguments.length-3;0<r--;)i[r]=arguments[r+3];var o=i[0]||"lrgb";if(yn[o]||i.length||(o=Object.keys(yn)[0]),!yn[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==bn(t)&&(t=new _(t)),"object"!==bn(n)&&(n=new _(n)),yn[o](t,n,e).alpha(t.alpha()+e*(n.alpha()-t.alpha()))}var gn=function(t,n,e){return.2126*(t=vn(t))+.7152*(n=vn(n))+.0722*vn(e)},vn=function(t){return(t/=255)<=.03928?t/12.92:_n((t+.055)/1.055,2.4)},yn={},bn=a.type;_.prototype.mix=_.prototype.interpolate=function(t,n){void 0===n&&(n=.5);for(var e=[],i=arguments.length-2;0<i--;)e[i]=arguments[i+2];return mn.apply(void 0,[this,t,n].concat(e))},_.prototype.premultiply=function(t){void 0===t&&(t=!1);var n=this._rgb,e=n[3];return t?(this._rgb=[n[0]*e,n[1]*e,n[2]*e,e],this):new _([n[0]*e,n[1]*e,n[2]*e,e],"rgb")},_.prototype.saturate=function(t){void 0===t&&(t=1);var n=this.lch();return n[1]+=18*t,n[1]<0&&(n[1]=0),new _(n,"lch").alpha(this.alpha(),!0)},_.prototype.desaturate=function(t){return void 0===t&&(t=1),this.saturate(-t)};var xn=a.type;_.prototype.set=function(t,n,e){void 0===e&&(e=!1);var i=t.split("."),r=i[0],t=i[1],o=this[r]();if(t){var a=r.indexOf(t);if(-1<a){if("string"==xn(n))switch(n.charAt(0)){case"+":case"-":o[a]+=+n;break;case"*":o[a]*=+n.substr(1);break;case"/":o[a]/=+n.substr(1);break;default:o[a]=+n}else{if("number"!==xn(n))throw new Error("unsupported value for Color.set");o[a]=n}i=new _(o,r);return e?(this._rgb=i._rgb,this):i}throw new Error("unknown channel "+t+" in mode "+r)}return o},yn.rgb=function(t,n,e){t=t._rgb,n=n._rgb;return new _(t[0]+e*(n[0]-t[0]),t[1]+e*(n[1]-t[1]),t[2]+e*(n[2]-t[2]),"rgb")};var wn=Math.sqrt,Mn=Math.pow;yn.lrgb=function(t,n,e){var i=t._rgb,r=i[0],o=i[1],a=i[2],t=n._rgb,i=t[0],n=t[1],t=t[2];return new _(wn(Mn(r,2)*(1-e)+Mn(i,2)*e),wn(Mn(o,2)*(1-e)+Mn(n,2)*e),wn(Mn(a,2)*(1-e)+Mn(t,2)*e),"rgb")},yn.lab=function(t,n,e){t=t.lab(),n=n.lab();return new _(t[0]+e*(n[0]-t[0]),t[1]+e*(n[1]-t[1]),t[2]+e*(n[2]-t[2]),"lab")};function Ln(t,n,e,i){var r,o,a,s,u,l,h,c,f,d;return"hsl"===i?(r=t.hsl(),o=n.hsl()):"hsv"===i?(r=t.hsv(),o=n.hsv()):"hcg"===i?(r=t.hcg(),o=n.hcg()):"hsi"===i?(r=t.hsi(),o=n.hsi()):"lch"!==i&&"hcl"!==i||(i="hcl",r=t.hcl(),o=n.hcl()),"h"===i.substr(0,1)&&(a=r[0],u=r[1],h=r[2],s=o[0],l=o[1],c=o[2]),isNaN(a)||isNaN(s)?isNaN(a)?isNaN(s)?d=Number.NaN:(d=s,1!=h&&0!=h||"hsv"==i||(f=l)):(d=a,1!=c&&0!=c||"hsv"==i||(f=u)):d=a+e*(a<s&&180<s-a?s-(a+360):s<a&&180<a-s?s+360-a:s-a),void 0===f&&(f=u+e*(l-u)),new _([d,f,h+e*(c-h)],i)}o=function(t,n,e){return Ln(t,n,e,"lch")};yn.lch=o,yn.hcl=o,yn.num=function(t,n,e){t=t.num(),n=n.num();return new _(t+e*(n-t),"num")},yn.hcg=function(t,n,e){return Ln(t,n,e,"hcg")},yn.hsi=function(t,n,e){return Ln(t,n,e,"hsi")},yn.hsl=function(t,n,e){return Ln(t,n,e,"hsl")},yn.hsv=function(t,n,e){return Ln(t,n,e,"hsv")};function Tn(l){function e(t){if((t=t||["#fff","#000"])&&"string"===Nn(t)&&M.brewer&&M.brewer[t.toLowerCase()]&&(t=M.brewer[t.toLowerCase()]),"array"===Nn(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var n=0;n<t.length;n++)t[n]=M(t[n]);for(var e=u.length=0;e<t.length;e++)u.push(e/(t.length-1))}return o(),p=t}function h(t,n){var e,i;if(null==n&&(n=!1),isNaN(t)||null===t)return s;if(i=n?t:d&&2<d.length?function(t){if(null==d)return 0;for(var n=d.length-1,e=0;e<n&&t>=d[e];)e++;return e-1}(t)/(d.length-2):m!==_?(t-_)/(m-_):1,i=x(i),n||(i=b(i)),1!==y&&(i=In(i,y)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i)),n=Math.floor(1e4*i),v&&g[n])e=g[n];else{if("array"===Nn(p))for(var r=0;r<u.length;r++){var o=u[r];if(i<=o){e=p[r];break}if(o<=i&&r===u.length-1){e=p[r];break}if(o<i&&i<u[r+1]){i=(i-o)/(u[r+1]-o),e=M.interpolate(p[r],p[r+1],i,a);break}}else"function"===Nn(p)&&(e=p(i));v&&(g[n]=e)}return e}var n,a="rgb",s=M("#ccc"),i=0,c=[0,1],u=[],f=[0,0],d=!1,p=[],r=!1,_=0,m=1,g={},v=!0,y=1,b=function(t){return t},x=function(t){return t},o=function(){return g={}};function w(t){return t=M(h(t)),r&&t[r]?t[r]():t}return e(l),w.classes=function(t){return null==t?d:("array"===Nn(t)?c=[(d=t)[0],t[t.length-1]]:(n=M.analyze(c),d=0===t?[n.min,n.max]:M.limits(n,"e",t)),w);var n},w.domain=function(e){if(!arguments.length)return c;_=e[0],m=e[e.length-1],u=[];var t=p.length;if(e.length===t&&_!==m)for(var n=0,i=Array.from(e);n<i.length;n+=1){var r=i[n];u.push((r-_)/(m-_))}else{for(var o,a,s=0;s<t;s++)u.push(s/(t-1));2<e.length&&(o=e.map(function(t,n){return n/(e.length-1)}),(a=e.map(function(t){return(t-_)/(m-_)})).every(function(t,n){return o[n]===t})||(x=function(t){if(t<=0||1<=t)return t;for(var n=0;t>=a[n+1];)n++;var e=(t-a[n])/(a[n+1]-a[n]);return o[n]+e*(o[n+1]-o[n])}))}return c=[_,m],w},w.mode=function(t){return arguments.length?(a=t,o(),w):a},w.range=function(t,n){return e(t),w},w.out=function(t){return r=t,w},w.spread=function(t){return arguments.length?(i=t,w):i},w.correctLightness=function(t){return null==t&&(t=!0),n=t,o(),b=n?function(t){for(var n=h(0,!0).lab()[0],e=h(1,!0).lab()[0],i=e<n,r=h(t,!0).lab()[0],o=n+(e-n)*t,a=r-o,s=0,u=1,l=20;.01<Math.abs(a)&&0<l--;)i&&(a*=-1),t+=a<0?.5*(u-(s=t)):.5*(s-(u=t)),a=h(t,!0).lab()[0]-o;return t}:function(t){return t},w},w.padding=function(t){return null!=t?("number"===Nn(t)&&(t=[t,t]),f=t,w):f},w.colors=function(n,e){arguments.length<2&&(e="hex");var t=[];if(0===arguments.length)t=p.slice(0);else if(1===n)t=[w(.5)];else if(1<n)var i=c[0],r=c[1]-i,t=function(t){for(var n=[],e=0<t,i=t,r=0;e?r<i:i<r;e?r++:r--)n.push(r);return n}(n).map(function(t){return w(i+t/(n-1)*r)});else{l=[];var o=[];if(d&&2<d.length)for(var a=1,s=d.length,u=1<=s;u?a<s:s<a;u?a++:a--)o.push(.5*(d[a-1]+d[a]));else o=c;t=o.map(w)}return M[e]&&(t=t.map(function(t){return t[e]()})),t},w.cache=function(t){return null!=t?(v=t,w):v},w.gamma=function(t){return null!=t?(y=t,w):y},w.nodata=function(t){return null!=t?(s=M(t),w):s},w}var Pn=a.clip_rgb,kn=Math.pow,Cn=Math.sqrt,Sn=Math.PI,En=Math.cos,An=Math.sin,zn=Math.atan2,Nn=a.type,In=Math.pow,On=function(t){var n,e,i,r,o,a,s,u;return 2===(t=t.map(function(t){return new _(t)})).length?(a=t.map(function(t){return t.lab()}),e=a[0],i=a[1],a=function(n){var t=[0,1,2].map(function(t){return e[t]+n*(i[t]-e[t])});return new _(t,"lab")}):3===t.length?(n=t.map(function(t){return t.lab()}),e=n[0],i=n[1],r=n[2],a=function(n){var t=[0,1,2].map(function(t){return(1-n)*(1-n)*e[t]+2*(1-n)*n*i[t]+n*n*r[t]});return new _(t,"lab")}):4===t.length?(e=(n=t.map(function(t){return t.lab()}))[0],i=n[1],r=n[2],o=n[3],a=function(n){var t=[0,1,2].map(function(t){return(1-n)*(1-n)*(1-n)*e[t]+3*(1-n)*(1-n)*n*i[t]+3*(1-n)*n*n*r[t]+n*n*n*o[t]});return new _(t,"lab")}):5===t.length&&(s=On(t.slice(0,3)),u=On(t.slice(2,5)),a=function(t){return t<.5?s(2*t):u(2*(t-.5))}),a},Bn=function(t,n,e){if(!Bn[e])throw new Error("unknown blend mode "+e);return Bn[e](t,n)},h=function(e){return function(t,n){n=M(n).rgb(),t=M(t).rgb();return M.rgb(e(n,t))}},Z=function(i){return function(t,n){var e=[];return e[0]=i(t[0],n[0]),e[1]=i(t[1],n[1]),e[2]=i(t[2],n[2]),e}};Bn.normal=h(Z(function(t){return t})),Bn.multiply=h(Z(function(t,n){return t*n/255})),Bn.screen=h(Z(function(t,n){return 255*(1-(1-t/255)*(1-n/255))})),Bn.overlay=h(Z(function(t,n){return n<128?2*t*n/255:255*(1-2*(1-t/255)*(1-n/255))})),Bn.darken=h(Z(function(t,n){return n<t?n:t})),Bn.lighten=h(Z(function(t,n){return n<t?t:n})),Bn.dodge=h(Z(function(t,n){return 255===t||255<(t=n/255*255/(1-t/255))?255:t})),Bn.burn=h(Z(function(t,n){return 255*(1-(1-n/255)/(t/255))}));for(var o=Bn,Rn=a.type,Dn=a.clip_rgb,Zn=a.TWOPI,Fn=Math.pow,jn=Math.sin,Un=Math.cos,qn=Math.floor,Wn=Math.random,Hn=Math.log,Vn=Math.pow,Yn=Math.floor,Gn=Math.abs,Xn=function(t,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===j(t)&&(t=Object.values(t)),t.forEach(function(t){n&&"object"===j(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,t<e.min&&(e.min=t),t>e.max&&(e.max=t),e.count+=1)}),e.domain=[e.min,e.max],e.limits=function(t,n){return Kn(e,t,n)},e},Kn=function(t,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==j(t)&&(t=Xn(t));var i=t.min,r=t.max,o=t.values.sort(function(t,n){return t-n});if(1===e)return[i,r];var a=[];if("c"===n.substr(0,1)&&(a.push(i),a.push(r)),"e"===n.substr(0,1)){a.push(i);for(var s=1;s<e;s++)a.push(i+s/e*(r-i));a.push(r)}else if("l"===n.substr(0,1)){if(i<=0)throw new Error("Logarithmic scales are only possible for values > 0");var u=Math.LOG10E*Hn(i),l=Math.LOG10E*Hn(r);a.push(i);for(var h=1;h<e;h++)a.push(Vn(10,u+h/e*(l-u)));a.push(r)}else if("q"===n.substr(0,1)){a.push(i);for(var c=1;c<e;c++){var f=(o.length-1)*c/e,d=Yn(f);d===f?a.push(o[d]):(f=f-d,a.push(o[d]*(1-f)+o[d+1]*f))}a.push(r)}else if("k"===n.substr(0,1)){var p,_=o.length,m=new Array(_),g=new Array(e),v=!0,y=0,b=null;(b=[]).push(i);for(var x=1;x<e;x++)b.push(i+x/e*(r-i));for(b.push(r);v;){for(var w=0;w<e;w++)g[w]=0;for(var M=0;M<_;M++)for(var L=o[M],T=Number.MAX_VALUE,P=void 0,k=0;k<e;k++){var C=Gn(b[k]-L);C<T&&(T=C,P=k),g[P]++,m[M]=P}for(var S=new Array(e),E=0;E<e;E++)S[E]=null;for(var A=0;A<_;A++)null===S[p=m[A]]?S[p]=o[A]:S[p]+=o[A];for(var z=0;z<e;z++)S[z]*=1/g[z];v=!1;for(var N=0;N<e;N++)if(S[N]!==b[N]){v=!0;break}b=S,200<++y&&(v=!1)}for(var I={},O=0;O<e;O++)I[O]=[];for(var B=0;B<_;B++)I[p=m[B]].push(o[B]);for(var R=[],D=0;D<e;D++)R.push(I[D][0]),R.push(I[D][I[D].length-1]);R=R.sort(function(t,n){return t-n}),a.push(R[0]);for(var Z=1;Z<R.length;Z+=2){var F=R[Z];isNaN(F)||-1!==a.indexOf(F)||a.push(F)}}return a},h={analyze:Xn,limits:Kn},$n=Math.sqrt,Jn=Math.atan2,Qn=Math.abs,te=Math.cos,ne=Math.PI,Z={cool:function(){return Tn([M.hsl(180,1,.9),M.hsl(250,.7,.4)])},hot:function(){return Tn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ee={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},ie=0,re=Object.keys(ee);ie<re.length;ie+=1){var oe=re[ie];ee[oe.toLowerCase()]=ee[oe]}a=ee;return M.average=function(t,o,a){void 0===o&&(o="lrgb"),void 0===a&&(a=null);var n=t.length,e=n/(a=a||Array.from(new Array(n)).map(function(){return 1})).reduce(function(t,n){return t+n});if(a.forEach(function(t,n){a[n]*=e}),t=t.map(function(t){return new _(t)}),"lrgb"===o)return function(t,n){for(var e=t.length,i=[0,0,0,0],r=0;r<t.length;r++){var o=t[r],a=n[r]/e,o=o._rgb;i[0]+=kn(o[0],2)*a,i[1]+=kn(o[1],2)*a,i[2]+=kn(o[2],2)*a,i[3]+=o[3]*a}return i[0]=Cn(i[0]),i[1]=Cn(i[1]),i[2]=Cn(i[2]),.9999999<i[3]&&(i[3]=1),new _(Pn(i))}(t,a);for(var i,r=t.shift(),s=r.get(o),u=[],l=0,h=0,c=0;c<s.length;c++)s[c]=(s[c]||0)*a[0],u.push(isNaN(s[c])?0:a[0]),"h"!==o.charAt(c)||isNaN(s[c])||(i=s[c]/180*Sn,l+=En(i)*a[0],h+=An(i)*a[0]);var f=r.alpha()*a[0];t.forEach(function(t,n){var e=t.get(o);f+=t.alpha()*a[n+1];for(var i,r=0;r<s.length;r++)isNaN(e[r])||(u[r]+=a[n+1],"h"===o.charAt(r)?(i=e[r]/180*Sn,l+=En(i)*a[n+1],h+=An(i)*a[n+1]):s[r]+=e[r]*a[n+1])});for(var d=0;d<s.length;d++)if("h"===o.charAt(d)){for(var p=zn(h/u[d],l/u[d])/Sn*180;p<0;)p+=360;for(;360<=p;)p-=360;s[d]=p}else s[d]=s[d]/u[d];return f/=n,new _(s,o).alpha(.99999<f?1:f,!0)},M.bezier=function(t){var n=On(t);return n.scale=function(){return Tn(n)},n},M.blend=o,M.cubehelix=function(r,o,a,s,u){void 0===r&&(r=300),void 0===o&&(o=-1.5),void 0===a&&(a=1),void 0===s&&(s=1),void 0===u&&(u=[0,1]);var l,h=0;"array"===Rn(u)?l=u[1]-u[0]:(l=0,u=[u,u]);function n(t){var n=Zn*((r+120)/360+o*t),e=Fn(u[0]+l*t,s),i=(0!==h?a[0]+t*h:a)*e*(1-e)/2,t=Un(n),n=jn(n);return M(Dn([255*(e+i*(-.14861*t+1.78277*n)),255*(e+i*(-.29227*t-.90649*n)),255*(e+1.97294*t*i),1]))}return n.start=function(t){return null==t?r:(r=t,n)},n.rotations=function(t){return null==t?o:(o=t,n)},n.gamma=function(t){return null==t?s:(s=t,n)},n.hue=function(t){return null==t?a:("array"===Rn(a=t)?0==(h=a[1]-a[0])&&(a=a[1]):h=0,n)},n.lightness=function(t){return null==t?u:(l="array"===Rn(t)?(u=t)[1]-t[0]:(u=[t,t],0),n)},n.scale=function(){return M.scale(n)},n.hue(a),n},M.mix=M.interpolate=mn,M.random=function(){for(var t="#",n=0;n<6;n++)t+="0123456789abcdef".charAt(qn(16*Wn()));return new _(t,"hex")},M.scale=Tn,M.analyze=h.analyze,M.contrast=function(t,n){t=new _(t),n=new _(n);t=t.luminance(),n=n.luminance();return n<t?(t+.05)/(n+.05):(n+.05)/(t+.05)},M.deltaE=function(t,n,e,i){void 0===e&&(e=1),void 0===i&&(i=1),t=new _(t),n=new _(n);for(var r=Array.from(t.lab()),o=r[0],a=r[1],s=r[2],u=Array.from(n.lab()),l=u[0],h=u[1],c=u[2],f=$n(a*a+s*s),d=$n(h*h+c*c),t=o<16?.511:.040975*o/(1+.01765*o),r=.0638*f/(1+.0131*f)+.638,p=f<1e-6?0:180*Jn(s,a)/ne;p<0;)p+=360;for(;360<=p;)p-=360;n=164<=p&&p<=345?.56+Qn(.2*te(ne*(p+168)/180)):.36+Qn(.4*te(ne*(p+35)/180)),u=f*f*f*f,u=$n(u/(1900+u)),u=r*(u*n+1-u),d=f-d,h=a-h,c=s-c,t=(o-l)/(e*t),r=d/(i*r);return $n(t*t+r*r+(h*h+c*c-d*d)/(u*u))},M.distance=function(t,n,e){void 0===e&&(e="lab"),t=new _(t),n=new _(n);var i,r=t.get(e),o=n.get(e),a=0;for(i in r){var s=(r[i]||0)-(o[i]||0);a+=s*s}return Math.sqrt(a)},M.limits=h.limits,M.valid=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];try{return new(Function.prototype.bind.apply(_,[null].concat(t))),!0}catch(t){return!1}},M.scales=Z,M.colors=tn,M.brewer=a,M}),function(e){function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}var r={};i.m=e,i.c=r,i.i=function(t){return t},i.d=function(t,n,e){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=13)}([function(t,n,e){var i=(function(t,n,e){return n&&o(t.prototype,n),e&&o(t,e),t}(r,[{key:"equals",value:function(t){return this.center.equals(t.center)&&this._equalValues(this.value,t.value)&&this.xSize===t.xSize&&this.ySize===t.ySize}},{key:"_equalValues",value:function(t,n){var e=t.constructor.name;return{Number:t===n,Vector:t.u===n.u&&t.v===n.v}[e]}},{key:"getBounds",value:function(){var t=this.xSize/2,n=this.ySize/2,e=this.center.lat,i=this.center.lng,r=L.latLng([e+n,i-t]),t=L.latLng([e-n,i+t]);return L.latLngBounds(L.latLng(t.lat,r.lng),L.latLng(r.lat,t.lng))}}]),r);function r(t,n,e){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:e;(function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this),this.center=t,this.value=n,this.xSize=e,this.ySize=i}function o(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.a=i},function(t,n,e){var a=e(0),i=e(11),r=e.n(i),u=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=(function(t,n,e){return n&&s(t.prototype,n),e&&s(t,e),t}(o,[{key:"_buildGrid",value:function(){throw new TypeError("Must be overriden")}},{key:"_updateRange",value:function(){this.range=this._calculateRange()}},{key:"numCells",value:function(){return this.nRows*this.nCols}},{key:"getCells",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,n=[],e=0;e<this.nRows;e+=t)for(var i=0;i<this.nCols;i+=t){var r=this._lonLatAtIndexes(i,e),o=u(r,2),r=o[0],o=o[1],o=L.latLng(o,r),r=this._valueAtIndexes(i,e),r=new a.a(o,r,this.cellXSize,this.cellYSize);n.push(r)}return n}},{key:"setFilter",value:function(t){this._inFilter=t,this._updateRange()}},{key:"setSpatialMask",value:function(t){this._spatialMask=t}},{key:"extent",value:function(){var t=this._getWrappedLongitudes(),n=u(t,2),t=n[0],n=n[1];return[t,this.yllCorner,n,this.yurCorner]}},{key:"_getWrappedLongitudes",value:function(){var t=this.xllCorner,n=this.xurCorner;return this.longitudeNeedsToBeWrapped&&(this.isContinuous?(t=-180,n=180):(n=this.xurCorner-360,t=this.xllCorner-360)),[t,n]}},{key:"contains",value:function(t,n){return this._spatialMask?this._pointInMask(t,n):this._pointInExtent(t,n)}},{key:"_pointInExtent",value:function(t,n){var e=this._getWrappedLongitudes(),i=u(e,2),e=i[0],i=i[1],i=e<=t&&t<=i,n=n>=this.yllCorner&&n<=this.yurCorner;return i&&n}},{key:"_pointInMask",value:function(t,n){t={type:"Feature",geometry:{type:"Point",coordinates:[t,n]},properties:{}},n=this._spatialMask;return r()(t,n)}},{key:"notContains",value:function(t,n){return!this.contains(t,n)}},{key:"interpolatedValueAt",value:function(t,n){if(this.notContains(t,n))return null;t=this._getDecimalIndexes(t,n),n=u(t,2),t=n[0],n=n[1];return this.interpolatedValueAtIndexes(t,n)}},{key:"interpolatedValueAtIndexes",value:function(t,n){var e=this._getFourSurroundingIndexes(t,n),i=u(e,4),r=i[0],o=i[1],a=i[2],s=i[3],e=this._getFourSurroundingValues(r,o,a,s);if(e){i=u(e,4),o=i[0],s=i[1],e=i[2],i=i[3];return this._doInterpolation(t-r,n-a,o,s,e,i)}return null}},{key:"_getDecimalIndexes",value:function(t,n){return this.longitudeNeedsToBeWrapped&&t<this.xllCorner&&(t+=360),[(t-this.xllCorner)/this.cellXSize,(this.yurCorner-n)/this.cellYSize]}},{key:"_getFourSurroundingIndexes",value:function(t,n){var e=Math.floor(t),t=e+1;this.isContinuous&&t>=this.nCols&&(t=0),t=this._clampColumnIndex(t);n=this._clampRowIndex(Math.floor(n));return[e,t,n,this._clampRowIndex(n+1)]}},{key:"_getFourSurroundingValues",value:function(t,n,e,i){var r;if(r=this.grid[e]){var o=r[t],e=r[n];if(this._isValid(o)&&this._isValid(e)&&(r=this.grid[i])){t=r[t],n=r[n];if(this._isValid(t)&&this._isValid(n))return[o,e,t,n]}}return null}},{key:"valueAt",value:function(t,n){if(this.notContains(t,n))return null;t=this._getDecimalIndexes(t,n),n=u(t,2),t=n[0],n=n[1],t=Math.floor(t),n=Math.floor(n),t=this._clampColumnIndex(t),n=this._clampRowIndex(n),n=this._valueAtIndexes(t,n);return this._inFilter&&!this._inFilter(n)?null:n}},{key:"hasValueAt",value:function(t,n){var e=this.valueAt(t,n),t=null!==e,n=!0;return this._inFilter&&(n=this._inFilter(e)),t&&n}},{key:"notHasValueAt",value:function(t,n){return!this.hasValueAt(t,n)}},{key:"randomPosition",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=Math.random()*this.nCols|0,e=Math.random()*this.nRows|0;return t.x=this._longitudeAtX(n),t.y=this._latitudeAtY(e),t}},{key:"_valueAtIndexes",value:function(t,n){return this.grid[n][t]}},{key:"_lonLatAtIndexes",value:function(t,n){return[this._longitudeAtX(t),this._latitudeAtY(n)]}},{key:"_longitudeAtX",value:function(t){var n=this.cellXSize/2,t=this.xllCorner+n+t*this.cellXSize;return this.longitudeNeedsToBeWrapped&&(t=180<t?t-360:t),t}},{key:"_latitudeAtY",value:function(t){var n=this.cellYSize/2;return this.yurCorner-n-t*this.cellYSize}},{key:"_doInterpolation",value:function(t,n,e,i,r,o){throw new TypeError("Must be overriden")}},{key:"_clampColumnIndex",value:function(t){var n=t;t<0&&(n=0);var e=this.nCols-1;return e<t&&(n=e),n}},{key:"_clampRowIndex",value:function(t){var n=t;t<0&&(n=0);var e=this.nRows-1;return e<t&&(n=e),n}},{key:"_isValid",value:function(t){return null!=t}}]),o);function o(t){(function(t){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this),this.params=t,this.nCols=t.nCols,this.nRows=t.nRows,this.width=t.nCols,this.height=t.nRows,this.xllCorner=t.xllCorner,this.yllCorner=t.yllCorner,this.xurCorner=t.xllCorner+t.nCols*t.cellXSize,this.yurCorner=t.yllCorner+t.nRows*t.cellYSize,this.cellXSize=t.cellXSize,this.cellYSize=t.cellYSize,this.grid=null,this.isContinuous=360<=this.xurCorner-this.xllCorner,this.longitudeNeedsToBeWrapped=180<this.xurCorner,this._inFilter=null,this._spatialMask=null}function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.a=i},function(t,n,e){var i=e(1),u=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")},e=function(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),t},e=(function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(l,i.a),e(l,null,[{key:"fromASCIIGrid",value:function(t){for(var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,e=t.split("\n"),i=l._parseASCIIGridHeader(e.slice(0,6)),r=[],o=6;o<e.length;o++){var a=e[o].trim();if(""===a)break;a.split(" ").forEach(function(t){t=parseFloat(t),t=t!==i.noDataValue?t*n:null;r.push(t)})}t=i;return t.zs=r,new l(t)}},{key:"fromPNGGrid",value:function(t){var n={nCols:t.header.nx,nRows:t.header.ny,xllCorner:t.header.lo1,yllCorner:t.header.la2,cellXSize:t.header.dx,cellYSize:t.header.dy,noDataValue:7e37};return n.zs=t.data,new l(n)}},{key:"_parseASCIIGridHeader",value:function(t){try{var n=t.map(function(t){var n,e=t.split(" ").filter(function(t){return""!=t});return n={},t=e[0].trim().toUpperCase(),e=parseFloat(e[1].trim()),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}),e="XLLCORNER"in n[2],i=n[4].CELLSIZE;return{nCols:parseInt(n[0].NCOLS),nRows:parseInt(n[1].NROWS),xllCorner:e?n[2].XLLCORNER:n[2].XLLCENTER-i,yllCorner:e?n[3].YLLCORNER:n[3].YLLCENTER-i,cellXSize:i,cellYSize:i,noDataValue:n[5].NODATA_VALUE}}catch(t){throw new Error("Not a valid ASCIIGrid Header: "+t)}}},{key:"fromGeoTIFF",value:function(t){return l.multipleFromGeoTIFF(t,[1<arguments.length&&void 0!==arguments[1]?arguments[1]:0])[0]}},{key:"multipleFromGeoTIFF",value:function(t,n){var e=GeoTIFF.parse(t).getImage(),i=e.readRasters(),r=e.getTiePoints()[0],o=e.getFileDirectory(),t=u(o.ModelPixelScale,2),a=t[0],s=t[1];return void 0!==n&&0!==n.length||(n=[].concat(function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}(Array(i.length).keys()))),n.map(function(t){var n,t=i[t];return o.GDAL_NODATA&&(n=parseFloat(o.GDAL_NODATA),t=Array.from(t).map(function(t){return t===n?null:t})),new l({nCols:e.getWidth(),nRows:e.getHeight(),xllCorner:r.x,yllCorner:r.y-e.getHeight()*s,cellXSize:a,cellYSize:s,zs:t})})}}]),e(l,[{key:"_buildGrid",value:function(){return this._arrayTo2d(this.zs,this.nRows,this.nCols)}},{key:"_arrayTo2d",value:function(t,n,e){for(var i=[],r=0,o=0;o<n;o++){for(var a=[],s=0;s<e;s++,r++){var u=t[r];a[s]=this._isValid(u)?u:null}i[o]=a}return i}},{key:"_newDataArrays",value:function(t){t.zs=[]}},{key:"_pushValueToArrays",value:function(t,n){t.zs.push(n)}},{key:"_makeNewFrom",value:function(t){return new l(t)}},{key:"_calculateRange",value:function(){var t=this.zs;return this._inFilter&&(t=t.filter(this._inFilter)),[d3.min(t),d3.max(t)]}},{key:"_doInterpolation",value:function(t,n,e,i,r,o){var a=1-t,s=1-n;return e*a*s+i*t*s+r*a*n+o*t*n}}]),l);function l(t){!function(t){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}(this);var n=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,t));return n.zs=t.zs,n.grid=n._buildGrid(),n._updateRange(),n}function r(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.a=e},function(t,n,e){var i=(function(t,n,e){return n&&o(t.prototype,n),e&&o(t,e),t}(r,[{key:"magnitude",value:function(){return Math.sqrt(this.u*this.u+this.v*this.v)}},{key:"directionTo",value:function(){var t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}},{key:"directionFrom",value:function(){return(this.directionTo()+180)%360}}]),r);function r(t,n){(function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this),this.u=t,this.v=n}function o(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.a=i},function(t,n,e){var f=e(3),i=e(1),r=e(2),o=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")},e=function(t,n,e){return n&&s(t.prototype,n),e&&s(t,e),t},e=(function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(a,i.a),e(a,null,[{key:"fromASCIIGrids",value:function(t,n){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,t=r.a.fromASCIIGrid(t,e),e=r.a.fromASCIIGrid(n,e);return new a(a._paramsFromScalarFields(t,e))}},{key:"fromGeoTIFFs",value:function(t,n){t=r.a.fromGeoTIFF(t),n=r.a.fromGeoTIFF(n);return new a(a._paramsFromScalarFields(t,n))}},{key:"fromMultibandGeoTIFF",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0,1],t=r.a.multipleFromGeoTIFF(t,n),n=o(t,2),t=n[0],n=n[1];return new a(a._paramsFromScalarFields(t,n))}},{key:"_paramsFromScalarFields",value:function(t,n){return{nCols:t.nCols,nRows:t.nRows,xllCorner:t.xllCorner,yllCorner:t.yllCorner,cellXSize:t.cellXSize,cellYSize:t.cellYSize,us:t.zs,vs:n.zs}}}]),e(a,[{key:"getScalarField",value:function(t){t=this._getFunctionFor(t),t={nCols:this.params.nCols,nRows:this.params.nRows,xllCorner:this.params.xllCorner,yllCorner:this.params.yllCorner,cellXSize:this.params.cellXSize,cellYSize:this.params.cellYSize,zs:this._applyOnField(t)};return new r.a(t)}},{key:"_getFunctionFor",value:function(e){return function(t,n){return new f.a(t,n)[e]()}}},{key:"_applyOnField",value:function(t){for(var n=[],e=this.numCells(),i=0;i<e;i++){var r=this.us[i],o=this.vs[i];this._isValid(r)&&this._isValid(o)?n.push(t(r,o)):n.push(null)}return n}},{key:"_buildGrid",value:function(){return this._arraysTo2d(this.us,this.vs,this.nRows,this.nCols)}},{key:"_arraysTo2d",value:function(t,n,e,i){for(var r=[],o=0,a=0;a<e;a++){for(var s=[],u=0;u<i;u++,o++){var l=t[o],h=n[o],c=this._isValid(l)&&this._isValid(h);s[u]=c?new f.a(l,h):null}r[a]=s}return r}},{key:"_newDataArrays",value:function(t){t.us=[],t.vs=[]}},{key:"_pushValueToArrays",value:function(t,n){t.us.push(n.u),t.vs.push(n.v)}},{key:"_makeNewFrom",value:function(t){return new a(t)}},{key:"_calculateRange",value:function(){var t=this.getCells().map(function(t){return t.value}).filter(function(t){return null!==t});this._inFilter&&(t=t.filter(this._inFilter));t=t.map(function(t){return t.magnitude()});return[d3.min(t),d3.max(t)]}},{key:"_doInterpolation",value:function(t,n,e,i,r,o){var a=1-t,s=1-n,u=a*s,s=t*s,a=a*n,t=t*n,n=e.u*u+i.u*s+r.u*a+o.u*t,t=e.v*u+i.v*s+r.v*a+o.v*t;return new f.a(n,t)}},{key:"_isValid",value:function(t){return null!=t}}]),a);function a(t){!function(t){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this);var n=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t));return n.us=t.us,n.vs=t.vs,n.grid=n._buildGrid(),n.range=n._calculateRange(),n}function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.a=e},function(t,n){var r=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")};L.Control.ColorBar=L.Control.extend({options:{position:"bottomleft",width:300,height:15,margin:15,background:"#fff",textColor:"black",steps:100,decimals:2,units:"uds",title:"Legend",labels:[],labelFontSize:10,cb:null,index:0,labelTextPosition:"middle"},initialize:function(t,n,e){this.color=t,this.range=n,L.Util.setOptions(this,e),console.log(this.options.index),d3.select(this.colorBar).attr("data-index",this.options.index),this.colorBar&&(this.unit=this._createUnitToggle(this.colorBar))},onAdd:function(t){this._map=t;t=L.DomUtil.create("div","leaflet-control-colorBar leaflet-bar leaflet-control");return(this.colorBar=t).style.padding="10px",L.DomEvent.addListener(t,"click",L.DomEvent.stopPropagation).addListener(t,"click",L.DomEvent.preventDefault),t.style.backgroundColor=this.options.background,t.style.cursor="text",this.unit=this._createUnitToggle(t),t.innerHTML=this.title()+this.palette(),L.DomEvent.addListener(t,"click",this._nextUnit,this),t},title:function(){var t=document.createElement("div"),n="";return""!==this.unit.value().label&&(n="("+this.unit.value().label+")"),d3.select(t).append("span").style("color",this.options.textColor).style("display","block").style("margin-bottom","5px").attr("class","leaflet-control-colorBar-title").text(this.options.title+n),t.innerHTML},palette:function(){var t=document.createElement("div"),n=this._createSvgIn(t),e=this._createUlIn(t);return this._appendColorBarTo(n),this.options.labels&&(this._appendLabelsTo(n),this._appendPhoneColorBarTo(e)),t.innerHTML},_appendPhoneColorBarTo:function(e){var i=this,r=this.options.phoneColoe;this.options.labels.forEach(function(t,n){t=i.unit.value().conversion(t);!i.unit.value().precision&&0!==i.unit.value().precision||(t=t.toFixed(i.unit.value().precision)),e.insert("li",".phone-color-li:nth-child(1)").attr("class","phone-color-li text-center").text(t).style("color","white").style("background-color","rgb("+r[n][0]+","+r[n][1]+","+r[n][2]+")")}),e.style("display","none")},_createUlIn:function(t){return d3.select(t).append("ul").attr("id","phone_ul_color_bar").style("width","50px").attr("class","leaflet-control-colorBar")},_createSvgIn:function(t){var n=this.options.labels?this.options.margin:0;return d3.select(t).append("svg").attr("id","pc_svg_color_bar").attr("width",this.options.width+2*this.options.margin).attr("height",this.options.height+n)},_appendColorBarTo:function(t){var e=this,n=this._getColorPerValue(),i=this.options.width/n.length,n=t.append("g").attr("id","colorBar-buckets").selectAll("rect").data(n).enter().append("rect");n.attr("x",function(t,n){return n*i+e.options.margin}).attr("y",function(){return 0}).attr("height",function(){return e.options.height}).attr("width",function(){return i}).attr("stroke-width",2).attr("stroke-linecap","butt").attr("stroke",function(t){return t.color.hex()}).attr("fill",function(t){return t.color.hex()}),n.append("title").text(function(t){return e.unit.value().conversion(t.value).toFixed(e.unit.value().precision)+" "+e.unit.value().label})},_appendLabelsTo:function(t){var n=this,e=this._getPositionPerLabelValue();t.append("g").attr("id","colorBar-labels").selectAll("text").data(e).enter().append("text").attr("x",function(t){return t.position+n.options.margin}).attr("y",this.options.height+this.options.margin).attr("font-size",this.options.labelFontSize+"px").attr("text-anchor",this.options.labelTextPosition).attr("fill",this.options.textColor).attr("class","leaflet-control-colorBar-label").text(function(t){return""+n.unit.value().conversion(t.value).toFixed(n.unit.value().precision)})},_getColorPerValue:function(){var n=this,t=r(this.range,2),e=t[0],i=t[1],t=(i-e)/this.options.steps;return d3.range(e,i+t,t).map(function(t){return{value:t,color:n.color(t)}})},_getPositionPerLabelValue:function(){var n=d3.scaleLinear().range([0,this.options.width]).domain(this.range);return this.options.labels.map(function(t){return{value:t,position:n(t)}})},_createUnitToggle:function(t){var n=this.options.units,e=n.length,i=+(d3.select(t).attr("data-index")||0)%e;return{value:function(){return n[i]},next:function(){d3.select(t).attr("data-index",i=(i+1)%e)}}},_nextUnit:function(){this.unit.next(),this.colorBar.innerHTML=this.title()+this.palette(),this.options.cb&&this.options.cb()},show:function(){this.colorBar.innerHTML=this.title()+this.palette()}}),L.control.colorBar=function(t,n,e){return new L.Control.ColorBar(t,n,e)}},function(t,n){L.CanvasLayer.Field=L.CanvasLayer.extend({options:{mouseMoveCursor:{value:"pointer",noValue:"default"},opacity:1,onClick:null,onMouseMove:null,inFilter:null},initialize:function(t,n){L.Util.setOptions(this,n),this._visible=!0,t&&this.setData(t)},getEvents:function(){var t=L.CanvasLayer.prototype.getEvents.call(this);return t.zoomstart=this._hideCanvas.bind(this),t.zoomend=this._showCanvas.bind(this),t},onLayerDidMount:function(){this._enableIdentify(),this._ensureCanvasAlignment()},show:function(){this._visible=!0,this._showCanvas(),this._enableIdentify()},hide:function(){this._visible=!1,this._hideCanvas(),this._disableIdentify()},isVisible:function(){return this._visible},_showCanvas:function(){this._canvas&&this._visible&&(this._canvas.style.visibility="visible")},_hideCanvas:function(){this._canvas&&(this._canvas.style.visibility="hidden")},_enableIdentify:function(){this._map.on("click",this._onClick,this),this._map.on("mousemove",this._onMouseMove,this),this.options.onClick&&this.on("click",this.options.onClick,this),this.options.onMouseMove&&this.on("mousemove",this.options.onMouseMove,this)},_disableIdentify:function(){this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this),this.options.onClick&&this.off("click",this.options.onClick,this),this.options.onMouseMove&&this.off("mousemove",this.options.onMouseMove,this)},_ensureCanvasAlignment:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t)},onLayerWillUnmount:function(){this._disableIdentify()},needRedraw:function(){this._map&&this._field&&L.CanvasLayer.prototype.needRedraw.call(this)},onDrawLayer:function(t){throw new TypeError("Must be overriden")},setData:function(t){this.options.inFilter&&t.setFilter(this.options.inFilter),this._field=t,this.needRedraw(),this.fire("load")},setFilter:function(t){this.options.inFilter=t,this._field&&this._field.setFilter(t),this.needRedraw()},setOpacity:function(t){return this.options.opacity=t,this._canvas&&this._updateOpacity(),this},getBounds:function(){var t=this._field.extent(),n=L.latLng(t[1],t[0]),t=L.latLng(t[3],t[2]);return L.latLngBounds(n,t)},_onClick:function(t){t=this._queryValue(t);this.fire("click",t)},_onMouseMove:function(t){t=this._queryValue(t);this._changeCursorOn(t),this.fire("mousemove",t)},_changeCursorOn:function(t){var n,e;this.options.mouseMoveCursor&&(n=(e=this.options.mouseMoveCursor).value,e=e.noValue,this._map.getContainer().style.cursor=null!==t.value?n:e)},_updateOpacity:function(){L.DomUtil.setOpacity(this._canvas,this.options.opacity)},_queryValue:function(t){var n=this._field?this._field.valueAt(t.latlng.lng,t.latlng.lat):null;return{latlng:t.latlng,value:n}},_getDrawingContext:function(){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),t}})},function(t,n,e){Object.defineProperty(n,"__esModule",{value:!0});var l=e(0),c=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")};L.CanvasLayer.ScalarField=L.CanvasLayer.Field.extend({options:{type:"colormap",color:null,interpolate:!1,vectorSize:20,arrowDirection:"from"},initialize:function(t,n){L.CanvasLayer.Field.prototype.initialize.call(this,t,n),L.Util.setOptions(this,n)},_defaultColorScale:function(){return chroma.scale(["white","black"]).domain(this._field.range)},setColor:function(t){this.options.color=t,this.needRedraw()},onDrawLayer:function(t){this.isVisible()&&(this._updateOpacity(),this._getRendererMethod()())},_getRendererMethod:function(){switch(this.options.type){case"colormap":return this._drawImage.bind(this);case"vector":return this._drawArrows.bind(this);default:throw Error("Unkwown renderer type: "+this.options.type)}},_ensureColor:function(){null===this.options.color&&this.setColor(this._defaultColorScale())},_showCanvas:function(){L.CanvasLayer.Field.prototype._showCanvas.call(this),this.needRedraw()},_drawImage:function(){this._ensureColor();var t=this._getDrawingContext(),n=this._canvas.width,e=this._canvas.height,i=t.createImageData(n,e),r=i.data;this._prepareImageIn(r,n,e),t.putImageData(i,0,0)},deg2rad:function(t){return t/180*Math.PI},rad2deg:function(t){return t/(Math.PI/180)},_invert:function(t,n,e){var i=e.east-e.west,r=e.width/this.rad2deg(i)*360/(2*Math.PI),o=r/2*Math.log((1+Math.sin(e.south))/(1-Math.sin(e.south))),r=(e.height+o-n)/r,r=180/Math.PI*(2*Math.atan(Math.exp(r))-Math.PI/2);return{lng:this.rad2deg(e.west)+t/e.width*this.rad2deg(i),lat:r}},_prepareImageIn:function(t,n,e){for(var i=this.options.interpolate?"interpolatedValueAt":"valueAt",r=0,o=0;o<e;o+=2){for(var a=0;a<n;a+=2){var s=this._map.containerPointToLatLng([a,o]),u=s.lng,l=s.lat,h=this._field[i](u,l);null!==h&&(s=this._getColorFor(h).rgba(),l=(u=c(s,4))[0],h=u[1],s=u[2],u=u[3],t[r]=l,t[r+1]=h,t[r+2]=s,t[r+3]=parseInt(255*u),t[r+4]=l,t[r+4+1]=h,t[r+4+2]=s,t[r+4+3]=parseInt(255*u),t[r+4*n]=l,t[r+4*n+1]=h,t[r+4*n+2]=s,t[r+4*n+3]=parseInt(255*u),t[r+4*n+4]=l,t[r+4*n+4+1]=h,t[r+4*n+4+2]=s,t[r+4*n+4+3]=parseInt(255*u)),r+=8}r+=4*(n-(n%2!=0?1:0))}},_drawArrows:function(){var t=this._pixelBounds(),t=(t.max.x-t.min.x)/this._field.nCols,n=Math.max(1,Math.floor(1.2*this.options.vectorSize/t)),e=this._getDrawingContext();e.strokeStyle=this.options.color;for(var i=this._map.getBounds(),r=0;r<this._field.height;r+=n)for(var o=0;o<this._field.width;o+=n){var a=this._field._lonLatAtIndexes(o,r),s=c(a,2),u=s[0],a=s[1],s=this._field.valueAt(u,a),u=L.latLng(a,u);null!==s&&i.contains(u)&&(s=new l.a(u,s,this.cellXSize,this.cellYSize),this._drawArrow(s,e))}},_pixelBounds:function(){var t=this.getBounds(),n=this._map.latLngToContainerPoint(t.getNorthWest()),t=this._map.latLngToContainerPoint(t.getSouthEast());return L.bounds(n,t)},_drawArrow:function(t,n){var e=this._map.latLngToContainerPoint(t.center),i=this.options.color;"function"==typeof i&&(n.strokeStyle=i(t.value));i=this.options.vectorSize;n.save(),n.translate(e.x,e.y);t=(90+t.value)*Math.PI/180;"towards"===this.options.arrowDirection&&(t+=Math.PI),n.rotate(t),n.beginPath(),n.moveTo(-i/2,0),n.lineTo(+i/2,0),n.moveTo(.25*i,.25*-i),n.lineTo(+i/2,0),n.lineTo(.25*i,.25*i),n.stroke(),n.restore()},_getColorFor:function(t){return this.options.color(t)}}),L.canvasLayer.scalarField=function(t,n){return new L.CanvasLayer.ScalarField(t,n)}},function(t,n){function r(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}L.CanvasLayer.SimpleLonLat=L.CanvasLayer.extend({options:{color:"gray"},initialize:function(t,n){this.points=t,L.Util.setOptions(this,n)},onLayerDidMount:function(){},onLayerWillUnmount:function(){},setData:function(t){this.needRedraw()},onDrawLayer:function(t){var n=t.canvas.getContext("2d");n.clearRect(0,0,t.canvas.width,t.canvas.height),n.fillStyle=this.options.color;var e=!0,i=!1,r=void 0;try{for(var o=this.points[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var a=a.value,a=t.layer._map.latLngToContainerPoint(a);n.beginPath(),n.fillRect(a.x,a.y,2,2),n.fill(),n.closePath(),n.stroke()}}catch(t){i=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(i)throw r}}},getBounds:function(){var t=this.points.map(function(t){return t.lng}),n=this.points.map(function(t){return t.lat}),e=Math.min.apply(Math,r(t)),i=Math.min.apply(Math,r(n)),t=Math.max.apply(Math,r(t)),n=Math.max.apply(Math,r(n)),e=L.latLng(i,e),t=L.latLng(n,t);return L.latLngBounds(e,t)}}),L.canvasLayer.simpleLonLat=function(t,n){return new L.CanvasLayer.SimpleLonLat(t,n)}},function(t,n){L.CanvasLayer.VectorFieldAnim=L.CanvasLayer.Field.extend({options:{paths:800,color:"white",width:1,fade:.96,duration:20,maxAge:200,velocityScale:2e-4},initialize:function(t,n){L.CanvasLayer.Field.prototype.initialize.call(this,t,n),L.Util.setOptions(this,n),this.timer=null},onLayerDidMount:function(){L.CanvasLayer.Field.prototype.onLayerDidMount.call(this),this._map.on("move resize",this._stopAnimation,this)},onLayerWillUnmount:function(){L.CanvasLayer.Field.prototype.onLayerWillUnmount.call(this),this._map.off("move resize",this._stopAnimation,this),this._stopAnimation()},_hideCanvas:function(){L.CanvasLayer.Field.prototype._hideCanvas.call(this),this._stopAnimation()},onDrawLayer:function(n){var e,i,r;this._field&&this.isVisible()&&(this._updateOpacity(),e=this._getDrawingContext(),i=this._prepareParticlePaths(),this.timer=d3.timer(function(){var t;i.forEach(function(t){t.age>r.options.maxAge&&(t.age=0,r._field.randomPosition(t));var n,e,i=r._field.valueAt(t.x,t.y);null===i?t.age=r.options.maxAge:(n=t.x+i.u*r.options.velocityScale,e=t.y+i.v*r.options.velocityScale,r._field.hasValueAt(n,e)?(t.xt=n,t.yt=e,t.m=i.magnitude()):t.age=r.options.maxAge),t.age+=1}),t=e.globalCompositeOperation,e.globalCompositeOperation="destination-in",e.fillRect(0,0,e.canvas.width,e.canvas.height),e.globalCompositeOperation=t,e.fillStyle="rgba(0, 0, 0, "+r.options.fade+")",e.lineWidth=r.options.width,e.strokeStyle=r.options.color,i.forEach(function(t){r._drawParticle(n,e,t)})},this.options.duration),r=this)},_drawParticle:function(t,n,e){var i=new L.latLng(e.y,e.x),r=new L.latLng(e.yt,e.xt);t.bounds.contains(i)&&e.age<=this.options.maxAge&&(i=t.layer._map.latLngToContainerPoint(i),r=t.layer._map.latLngToContainerPoint(r),n.beginPath(),n.moveTo(i.x,i.y),n.lineTo(r.x,r.y),e.x=e.xt,e.y=e.yt,"function"==typeof(r=this.options.color)&&(n.strokeStyle=r(e.m)),"function"==typeof(r=this.options.width)&&(n.lineWidth=r(e.m)),n.stroke())},_prepareParticlePaths:function(){for(var t=[],n=0;n<this.options.paths;n++){var e=this._field.randomPosition();e.age=this._randomAge(),t.push(e)}return t},_randomAge:function(){return Math.floor(Math.random()*this.options.maxAge)},_stopAnimation:function(){this.timer&&this.timer.stop()}}),L.canvasLayer.vectorFieldAnim=function(t,n){return new L.CanvasLayer.VectorFieldAnim(t,n)}},function(t,n){L.CanvasLayer=L.Layer.extend({initialize:function(t){this._map=null,this._canvas=null,this._frame=null,this._delegate=null,L.setOptions(this,t)},delegate:function(t){return this._delegate=t,this},needRedraw:function(){return this._frame||(this._frame=L.Util.requestAnimFrame(this.drawLayer,this)),this},_onLayerDidResize:function(t){this._canvas.width=t.newSize.x,this._canvas.height=t.newSize.y},_onLayerDidMove:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t),this.drawLayer()},getEvents:function(){var t={resize:this._onLayerDidResize,moveend:this._onLayerDidMove};return this._map.options.zoomAnimation&&L.Browser.any3d&&(t.zoomanim=this._animateZoom),t},onAdd:function(t){this._map=t,this._canvas=L.DomUtil.create("canvas","leaflet-layer"),this.tiles={};var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y;n=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(n?"animated":"hide")),t._panes.overlayPane.appendChild(this._canvas),t.on(this.getEvents(),this);t=this._delegate||this;t.onLayerDidMount&&t.onLayerDidMount(),this.needRedraw();var e=this;setTimeout(function(){e._onLayerDidMove()},0)},onRemove:function(t){var n=this._delegate||this;n.onLayerWillUnmount&&n.onLayerWillUnmount(),t.getPanes().overlayPane.removeChild(this._canvas),t.off(this.getEvents(),this),this._canvas=null},addTo:function(t){return t.addLayer(this),this},LatLonToMercator:function(t){return{x:6378137*t.lng*Math.PI/180,y:6378137*Math.log(Math.tan((90+t.lat)*Math.PI/360))}},drawLayer:function(){var t=this._map.getSize(),n=this._map.getBounds(),e=this._map.getZoom(),i=this.LatLonToMercator(this._map.getCenter()),r=this.LatLonToMercator(this._map.containerPointToLatLng(this._map.getSize())),o=this._delegate||this;o.onDrawLayer&&o.onDrawLayer({layer:this,canvas:this._canvas,bounds:n,size:t,zoom:e,center:i,corner:r}),this._frame=null},_setTransform:function(t,n,e){n=n||new L.Point(0,0);t.style[L.DomUtil.TRANSFORM]=(L.Browser.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),t=this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),t.zoom,t.center);L.DomUtil.setTransform(this._canvas,t,n)}}),L.canvasLayer=function(){return new L.CanvasLayer}},function(t,n,e){function h(t,n,e){var i=!1;n[0][0]===n[n.length-1][0]&&n[0][1]===n[n.length-1][1]&&(n=n.slice(0,n.length-1));for(var r=0,o=n.length-1;r<n.length;o=r++){var a=n[r][0],s=n[r][1],u=n[o][0],l=n[o][1];if(t[1]*(a-u)+s*(u-t[0])+l*(t[0]-a)==0&&(a-t[0])*(u-t[0])<=0&&(s-t[1])*(l-t[1])<=0)return!e;s>t[1]!=l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(i=!i)}return i}var e=e(12),c=e.getCoord,f=e.getCoords;t.exports=function(t,n,e){if(!t)throw new Error("point is required");if(!n)throw new Error("polygon is required");var i=c(t),r=f(n),o=(n.geometry||n).type,t=n.bbox;if(t&&!1==(n=i,(t=t)[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]))return!1;"Polygon"===o&&(r=[r]);for(var a=0,s=!1;a<r.length&&!s;a++)if(h(i,r[a][0],e)){for(var u=!1,l=1;l<r[a].length&&!u;)h(i,r[a][l],!e)&&(u=!0),l++;u||(s=!0)}return s}},function(t,n){function e(t){if(!t)throw new Error("obj is required");var n;if(t.length?n=t:t.coordinates?n=t.coordinates:t.geometry&&t.geometry.coordinates&&(n=t.geometry.coordinates),n)return i(n),n;throw new Error("No valid coordinates")}function i(t){if(1<t.length&&"number"==typeof t[0]&&"number"==typeof t[1])return!0;if(Array.isArray(t[0])&&t[0].length)return i(t[0]);throw new Error("coordinates must only contain numbers")}function r(t){if(!t)throw new Error("geojson is required");if(void 0!==t.geometry)return t.geometry;if(t.coordinates||t.geometries)return t;throw new Error("geojson must be a valid Feature or Geometry Object")}t.exports={geojsonType:function(t,n,e){if(!n||!e)throw new Error("type and name required");if(!t||t.type!==n)throw new Error("Invalid input to "+e+": must be a "+n+", given "+t.type)},collectionOf:function(t,n,e){if(!t)throw new Error("No featureCollection passed");if(!e)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+e+", FeatureCollection required");for(var i=0;i<t.features.length;i++){var r=t.features[i];if(!r||"Feature"!==r.type||!r.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!r.geometry||r.geometry.type!==n)throw new Error("Invalid input to "+e+": must be a "+n+", given "+r.geometry.type)}},featureOf:function(t,n,e){if(!t)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!t.geometry||t.geometry.type!==n)throw new Error("Invalid input to "+e+": must be a "+n+", given "+t.geometry.type)},getCoord:function(t){if(!t)throw new Error("obj is required");if(1<(t=e(t)).length&&"number"==typeof t[0]&&"number"==typeof t[1])return t;throw new Error("Coordinate is not a valid Point")},getCoords:e,containsNumber:i,getGeom:r,getGeomType:function(t){if(!t)throw new Error("geojson is required");if(t=r(t))return t.type}}},function(t,n,e){Object.defineProperty(n,"__esModule",{value:!0});var i=e(3),r=e(0),o=e(1),a=e(2),n=e(4);window.L.Vector=i.a,window.L.Cell=r.a,window.L.Field=o.a,window.L.ScalarField=a.a,window.L.VectorField=n.a,e(10),e(8),e(6),e(7),e(9),e(5),console.log("leaflet.canvaslayer.field v1.4.1")}]),function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(F){function s(t,n){return t<n?-1:n<t?1:n<=t?0:NaN}function L(o){return 1===o.length&&(e=o,o=function(t,n){return s(e(t),n)}),{left:function(t,n,e,i){for(null==e&&(e=0),null==i&&(i=t.length);e<i;){var r=e+i>>>1;o(t[r],n)<0?e=1+r:i=r}return e},right:function(t,n,e,i){for(null==e&&(e=0),null==i&&(i=t.length);e<i;){var r=e+i>>>1;0<o(t[r],n)?i=r:e=1+r}return e}};var e}function h(t,n){return[t,n]}function l(t){return null===t?NaN:+t}function e(t,n){var e,i,r=t.length,o=0,a=-1,s=0,u=0;if(null==n)for(;++a<r;)isNaN(e=l(t[a]))||(u+=(i=e-s)*(e-(s+=i/++o)));else for(;++a<r;)isNaN(e=l(n(t[a],a,t)))||(u+=(i=e-s)*(e-(s+=i/++o)));if(1<o)return u/(o-1)}function i(t,n){n=e(t,n);return n&&Math.sqrt(n)}function t(t,n){var e,i,r,o=t.length,a=-1;if(null==n){for(;++a<o;)if(null!=(e=t[a])&&e<=e)for(i=r=e;++a<o;)null!=(e=t[a])&&(e<i&&(i=e),r<e&&(r=e))}else for(;++a<o;)if(null!=(e=n(t[a],a,t))&&e<=e)for(i=r=e;++a<o;)null!=(e=n(t[a],a,t))&&(e<i&&(i=e),r<e&&(r=e));return[i,r]}function r(t){return function(){return t}}function o(t){return t}function T(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i<r;)o[i]=t+i*e;return o}function p(t,n,e){var i,r,o,a,s=-1;if(e=+e,(t=+t)===(n=+n)&&0<e)return[t];if((i=n<t)&&(r=t,t=n,n=r),0===(a=c(t,n,e))||!isFinite(a))return[];if(0<a)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(r=Math.ceil(n-t+1));++s<r;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(r=Math.ceil(t-n+1));++s<r;)o[s]=(t-s)/a;return i&&o.reverse(),o}function c(t,n,e){t=(n-t)/Math.max(0,e),e=Math.floor(Math.log(t)/Math.LN10),t/=Math.pow(10,e);return 0<=e?(Ml<=t?10:Ll<=t?5:Tl<=t?2:1)*Math.pow(10,e):-Math.pow(10,-e)/(Ml<=t?10:Ll<=t?5:Tl<=t?2:1)}function P(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),e=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),i=i/e;return Ml<=i?e*=10:Ll<=i?e*=5:Tl<=i&&(e*=2),n<t?-e:e}function a(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function u(t,n,e){if(null==e&&(e=l),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(1<=n)return+e(t[r-1],r-1,t);var i=(r-1)*n,r=Math.floor(i),n=+e(t[r],r,t);return n+(+e(t[r+1],r+1,t)-n)*(i-r)}}function k(t){for(var n,e,i,r=t.length,o=-1,a=0;++o<r;)a+=t[o].length;for(e=new Array(a);0<=--r;)for(n=(i=t[r]).length;0<=--n;)e[--a]=i[n];return e}function f(t,n){var e,i,r=t.length,o=-1;if(null==n){for(;++o<r;)if(null!=(e=t[o])&&e<=e)for(i=e;++o<r;)null!=(e=t[o])&&e<i&&(i=e)}else for(;++o<r;)if(null!=(e=n(t[o],o,t))&&e<=e)for(i=e;++o<r;)null!=(e=n(t[o],o,t))&&e<i&&(i=e);return i}function n(t){if(!(r=t.length))return[];for(var n=-1,e=f(t,d),i=new Array(e);++n<e;)for(var r,o=-1,a=i[n]=new Array(r);++o<r;)a[o]=t[o][n];return i}function d(t){return t.length}function C(t){return t}function S(t){return"translate("+(t+.5)+",0)"}function E(t){return"translate(0,"+(t+.5)+")"}function A(){return!this.__axis}function _(d,p){function n(t){var n=null==m?p.ticks?p.ticks.apply(p,_):p.domain():m,e=null==g?p.tickFormat?p.tickFormat.apply(p,_):C:g,i=Math.max(v,0)+b,r=p.range(),o=+r[0]+.5,a=+r[r.length-1]+.5,s=(p.bandwidth?function(n){var e=Math.max(0,n.bandwidth()-1)/2;return n.round()&&(e=Math.round(e)),function(t){return+n(t)+e}}:function(n){return function(t){return+n(t)}})(p.copy()),u=t.selection?t.selection():t,l=u.selectAll(".domain").data([null]),h=(f=u.selectAll(".tick").data(n,p).order()).exit(),c=f.enter().append("g").attr("class","tick"),r=f.select("line"),n=f.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),f=f.merge(c),r=r.merge(c.append("line").attr("stroke","#000").attr(w+"2",x*v)),n=n.merge(c.append("text").attr("fill","#000").attr(w,x*i).attr("dy",1===d?"0em":3===d?"0.71em":"0.32em"));t!==u&&(l=l.transition(t),f=f.transition(t),r=r.transition(t),n=n.transition(t),h=h.transition(t).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=s(t))?M(t):this.getAttribute("transform")}),c.attr("opacity",1e-6).attr("transform",function(t){var n=this.parentNode.__axis;return M(n&&isFinite(n=n(t))?n:s(t))})),h.remove(),l.attr("d",4===d||2==d?"M"+x*y+","+o+"H0.5V"+a+"H"+x*y:"M"+o+","+x*y+"V0.5H"+a+"V"+x*y),f.attr("opacity",1).attr("transform",function(t){return M(s(t))}),r.attr(w+"2",x*v),n.attr(w,x*i).text(e),u.filter(A).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===d?"start":4===d?"end":"middle"),u.each(function(){this.__axis=s})}var _=[],m=null,g=null,v=6,y=6,b=3,x=1===d||4===d?-1:1,w=4===d||2===d?"x":"y",M=1===d||3===d?S:E;return n.scale=function(t){return arguments.length?(p=t,n):p},n.ticks=function(){return _=Pl.call(arguments),n},n.tickArguments=function(t){return arguments.length?(_=null==t?[]:Pl.call(t),n):_.slice()},n.tickValues=function(t){return arguments.length?(m=null==t?null:Pl.call(t),n):m&&m.slice()},n.tickFormat=function(t){return arguments.length?(g=t,n):g},n.tickSize=function(t){return arguments.length?(v=y=+t,n):v},n.tickSizeInner=function(t){return arguments.length?(v=+t,n):v},n.tickSizeOuter=function(t){return arguments.length?(y=+t,n):y},n.tickPadding=function(t){return arguments.length?(b=+t,n):b},n}function z(){for(var t,n=0,e=arguments.length,i={};n<e;++n){if(!(t=arguments[n]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new m(i)}function m(t){this._=t}function g(t,n,e){for(var i=0,r=t.length;i<r;++i)if(t[i].name===n){t[i]=kl,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}function v(t){var n=t+="",e=n.indexOf(":");return 0<=e&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),El.hasOwnProperty(n)?{space:El[n],local:t}:t}function y(t){t=v(t);return(t.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Sl&&t.documentElement.namespaceURI===Sl?t.createElement(e):t.createElementNS(n,e)}})(t)}function b(){}function x(t){return null==t?b:function(){return this.querySelector(t)}}function w(){return[]}function M(t){return null==t?w:function(){return this.querySelectorAll(t)}}function N(t){return new Array(t.length)}function I(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function O(t,n,e,i,r,o){for(var a,s=0,u=n.length,l=o.length;s<l;++s)(a=n[s])?(a.__data__=o[s],i[s]=a):e[s]=new I(t,o[s]);for(;s<u;++s)(a=n[s])&&(r[s]=a)}function B(t,n,e,i,r,o,a){for(var s,u,l={},h=n.length,c=o.length,f=new Array(h),d=0;d<h;++d)(s=n[d])&&(f[d]=u="$"+a.call(s,s.__data__,d,n),u in l?r[d]=s:l[u]=s);for(d=0;d<c;++d)(s=l[u="$"+a.call(t,o[d],d,o)])?((i[d]=s).__data__=o[d],l[u]=null):e[d]=new I(t,o[d]);for(d=0;d<h;++d)(s=n[d])&&l[f[d]]===s&&(r[d]=s)}function R(t,n){return t<n?-1:n<t?1:n<=t?0:NaN}function D(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Z(t,n){return t.style.getPropertyValue(n)||D(t).getComputedStyle(t,null).getPropertyValue(n)}function j(t){return t.trim().split(/^|\s+/)}function U(t){return t.classList||new q(t)}function q(t){this._node=t,this._names=j(t.getAttribute("class")||"")}function W(t,n){for(var e=U(t),i=-1,r=n.length;++i<r;)e.add(n[i])}function H(t,n){for(var e=U(t),i=-1,r=n.length;++i<r;)e.remove(n[i])}function V(){this.textContent=""}function Y(){this.innerHTML=""}function G(){this.nextSibling&&this.parentNode.appendChild(this)}function X(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function K(){return null}function $(){var t=this.parentNode;t&&t.removeChild(this)}function J(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Q(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function tt(e,t,n){return e=nt(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function nt(e,i,r){return function(t){var n=F.event;F.event=t;try{e.call(this,this.__data__,i,r)}finally{F.event=n}}}function et(o){return function(){var t=this.__on;if(t){for(var n,e=0,i=-1,r=t.length;e<r;++e)n=t[e],o.type&&n.type!==o.type||n.name!==o.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?t.length=i:delete this.__on}}}function it(u,l,h){var c=Nl.hasOwnProperty(u.type)?tt:nt;return function(t,n,e){var i,r=this.__on,o=c(l,n,e);if(r)for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===u.type&&i.name===u.name)return this.removeEventListener(i.type,i.listener,i.capture),this.addEventListener(i.type,i.listener=o,i.capture=h),void(i.value=l);this.addEventListener(u.type,o,h),i={type:u.type,name:u.name,value:l,listener:o,capture:h},r?r.push(i):this.__on=[i]}}function rt(t,n,e,i){var r=F.event;t.sourceEvent=F.event,F.event=t;try{return n.apply(e,i)}finally{F.event=r}}function ot(t,n,e){var i=D(t),r=i.CustomEvent;"function"==typeof r?r=new r(n,e):(r=i.document.createEvent("Event"),e?(r.initEvent(n,e.bubbles,e.cancelable),r.detail=e.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function at(t,n){this._groups=t,this._parents=n}function st(){return new at([[document.documentElement]],Il)}function ut(t){return"string"==typeof t?new at([[document.querySelector(t)]],[document.documentElement]):new at([[t]],Il)}function lt(){return new ht}function ht(){this._="@"+(++Ol).toString(36)}function ct(){for(var t,n=F.event;t=n.sourceEvent;)n=t;return n}function ft(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=n.clientX,i.y=n.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function dt(t){var n=ct();return n.changedTouches&&(n=n.changedTouches[0]),ft(t,n)}function pt(t,n,e){arguments.length<3&&(e=n,n=ct().changedTouches);for(var i,r=0,o=n?n.length:0;r<o;++r)if((i=n[r]).identifier===e)return ft(t,i);return null}function _t(){F.event.stopImmediatePropagation()}function mt(){F.event.preventDefault(),F.event.stopImmediatePropagation()}function gt(t){var n=t.document.documentElement,t=ut(t).on("dragstart.drag",mt,!0);"onselectstart"in n?t.on("selectstart.drag",mt,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function vt(t,n){var e=t.document.documentElement,i=ut(t).on("dragstart.drag",null);n&&(i.on("click.drag",mt,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function yt(t){return function(){return t}}function bt(t,n,e,i,r,o,a,s,u,l){this.target=t,this.type=n,this.subject=e,this.identifier=i,this.active=r,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=l}function xt(){return!F.event.button}function wt(){return this.parentNode}function Mt(t){return null==t?{x:F.event.x,y:F.event.y}:t}function Lt(){return"ontouchstart"in this}function Tt(t,n,e){(t.prototype=n.prototype=e).constructor=t}function Pt(t,n){var e,i=Object.create(t.prototype);for(e in n)i[e]=n[e];return i}function kt(){}function Ct(t){var n;return t=(t+"").trim().toLowerCase(),(n=Zl.exec(t))?new Nt((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Fl.exec(t))?St(parseInt(n[1],16)):(n=jl.exec(t))?new Nt(n[1],n[2],n[3],1):(n=Ul.exec(t))?new Nt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=ql.exec(t))?Et(n[1],n[2],n[3],n[4]):(n=Wl.exec(t))?Et(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Hl.exec(t))?It(n[1],n[2]/100,n[3]/100,1):(n=Vl.exec(t))?It(n[1],n[2]/100,n[3]/100,n[4]):Yl.hasOwnProperty(t)?St(Yl[t]):"transparent"===t?new Nt(NaN,NaN,NaN,0):null}function St(t){return new Nt(t>>16&255,t>>8&255,255&t,1)}function Et(t,n,e,i){return i<=0&&(t=n=e=NaN),new Nt(t,n,e,i)}function At(t){return t instanceof kt||(t=Ct(t)),t?new Nt((t=t.rgb()).r,t.g,t.b,t.opacity):new Nt}function zt(t,n,e,i){return 1===arguments.length?At(t):new Nt(t,n,e,null==i?1:i)}function Nt(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function It(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||1<=e?t=n=NaN:n<=0&&(t=NaN),new Bt(t,n,e,i)}function Ot(t,n,e,i){return 1===arguments.length?function(t){if(t instanceof Bt)return new Bt(t.h,t.s,t.l,t.opacity);if(t instanceof kt||(t=Ct(t)),!t)return new Bt;if(t instanceof Bt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=n===o?(e-i)/s+6*(e<i):e===o?(i-n)/s+2:(n-e)/s+4,s/=u<.5?o+r:2-o-r,a*=60):s=0<u&&u<1?0:a,new Bt(a,s,u,t.opacity)}(t):new Bt(t,n,e,null==i?1:i)}function Bt(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Rt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Dt(t){if(t instanceof Ft)return new Ft(t.l,t.a,t.b,t.opacity);if(t instanceof Vt){var n=t.h*Gl;return new Ft(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Nt||(t=At(t));var e=Wt(t.r),i=Wt(t.g),r=Wt(t.b),o=jt((.4124564*e+.3575761*i+.1804375*r)/Kl),n=jt((.2126729*e+.7151522*i+.072175*r)/$l);return new Ft(116*n-16,500*(o-n),200*(n-jt((.0193339*e+.119192*i+.9503041*r)/Jl)),t.opacity)}function Zt(t,n,e,i){return 1===arguments.length?Dt(t):new Ft(t,n,e,null==i?1:i)}function Ft(t,n,e,i){this.l=+t,this.a=+n,this.b=+e,this.opacity=+i}function jt(t){return nh<t?Math.pow(t,1/3):t/th+Ql}function Ut(t){return 6/29<t?t*t*t:th*(t-Ql)}function qt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Wt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ht(t,n,e,i){return 1===arguments.length?function(t){if(t instanceof Vt)return new Vt(t.h,t.c,t.l,t.opacity);t instanceof Ft||(t=Dt(t));var n=Math.atan2(t.b,t.a)*Xl;return new Vt(n<0?360+n:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Vt(t,n,e,null==i?1:i)}function Vt(t,n,e,i){this.h=+t,this.c=+n,this.l=+e,this.opacity=+i}function Yt(t,n,e,i){return 1===arguments.length?function(t){if(t instanceof Gt)return new Gt(t.h,t.s,t.l,t.opacity);t instanceof Nt||(t=At(t));var n=t.r/255,e=t.g/255,i=t.b/255,r=(sh*i+oh*n-ah*e)/(sh+oh-ah),n=i-r,i=(rh*(e-r)-eh*n)/ih,e=Math.sqrt(i*i+n*n)/(rh*r*(1-r)),n=e?Math.atan2(i,n)*Xl-120:NaN;return new Gt(n<0?n+360:n,e,r,t.opacity)}(t):new Gt(t,n,e,null==i?1:i)}function Gt(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Xt(t,n,e,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*i+a*r)/6}function Kt(a){var s=a.length-1;return function(t){var n=t<=0?t=0:1<=t?s-(t=1):Math.floor(t*s),e=a[n],i=a[n+1],r=0<n?a[n-1]:2*e-i,o=n<s-1?a[n+2]:2*i-e;return Xt((t-n/s)*s,r,e,i,o)}}function $t(a){var s=a.length;return function(t){var n=Math.floor(((t%=1)<0?++t:t)*s),e=a[(n+s-1)%s],i=a[n%s],r=a[(n+1)%s],o=a[(n+2)%s];return Xt((t-n/s)*s,e,i,r,o)}}function Jt(t){return function(){return t}}function Qt(n,e){return function(t){return n+t*e}}function tn(t,n){var e=n-t;return e?Qt(t,180<e||e<-180?e-360*Math.round(e/360):e):Jt(isNaN(t)?n:t)}function nn(o){return 1==(o=+o)?en:function(t,n){return n-t?(e=t,i=n,r=o,e=Math.pow(e,r),i=Math.pow(i,r)-e,r=1/r,function(t){return Math.pow(e+t*i,r)}):Jt(isNaN(t)?n:t);var e,i,r}}function en(t,n){var e=n-t;return e?Qt(t,e):Jt(isNaN(t)?n:t)}function rn(s){return function(t){for(var n,e=t.length,i=new Array(e),r=new Array(e),o=new Array(e),a=0;a<e;++a)n=zt(t[a]),i[a]=n.r||0,r[a]=n.g||0,o[a]=n.b||0;return i=s(i),r=s(r),o=s(o),n.opacity=1,function(t){return n.r=i(t),n.g=r(t),n.b=o(t),n+""}}}function on(t,n){for(var e=n?n.length:0,i=t?Math.min(e,t.length):0,r=new Array(i),o=new Array(e),a=0;a<i;++a)r[a]=hn(t[a],n[a]);for(;a<e;++a)o[a]=n[a];return function(t){for(a=0;a<i;++a)o[a]=r[a](t);return o}}function an(n,e){var i=new Date;return e-=n=+n,function(t){return i.setTime(n+e*t),i}}function sn(n,e){return e-=n=+n,function(t){return n+e*t}}function un(t,n){var e,i={},r={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?i[e]=hn(t[e],n[e]):r[e]=n[e];return function(t){for(e in i)r[e]=i[e](t);return r}}function ln(t,i){var n,e,r,o,a,s=gh.lastIndex=vh.lastIndex=0,u=-1,l=[],h=[];for(t+="",i+="";(n=gh.exec(t))&&(e=vh.exec(i));)(r=e.index)>s&&(r=i.slice(s,r),l[u]?l[u]+=r:l[++u]=r),(n=n[0])===(e=e[0])?l[u]?l[u]+=e:l[++u]=e:(l[++u]=null,h.push({i:u,x:sn(n,e)})),s=vh.lastIndex;return s<i.length&&(r=i.slice(s),l[u]?l[u]+=r:l[++u]=r),l.length<2?h[0]?(a=h[0].x,function(t){return a(t)+""}):(o=i,function(){return o}):(i=h.length,function(t){for(var n,e=0;e<i;++e)l[(n=h[e]).i]=n.x(t);return l.join("")})}function hn(t,n){var e=typeof n;return null==n||"boolean"==e?Jt(n):("number"==e?sn:"string"==e?(e=Ct(n))?(n=e,ph):ln:n instanceof Ct?ph:n instanceof Date?an:Array.isArray(n)?on:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?un:sn)(t,n)}function cn(n,e){return e-=n=+n,function(t){return Math.round(n+e*t)}}function fn(t,n,e,i,r,o){var a,s,u;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(u=t*e+n*i)&&(e-=t*u,i-=n*u),(s=Math.sqrt(e*e+i*i))&&(e/=s,i/=s,u/=s),t*i<n*e&&(t=-t,n=-n,u=-u,a=-a),{translateX:r,translateY:o,rotate:Math.atan2(n,t)*yh,skewX:Math.atan(u)*yh,scaleX:a,scaleY:s}}function dn(c,f,d,p){function _(t){return t.length?t.pop()+" ":""}return function(t,n){var e,i,r,o,a,s,u,l=[],h=[];return t=c(t),n=c(n),e=t.translateX,i=t.translateY,r=n.translateX,o=n.translateY,a=l,s=h,e!==r||i!==o?(u=a.push("translate(",null,f,null,d),s.push({i:u-4,x:sn(e,r)},{i:u-2,x:sn(i,o)})):(r||o)&&a.push("translate("+r+f+o+d),s=t.rotate,e=n.rotate,u=l,s!==e?(180<s-e?e+=360:180<e-s&&(s+=360),h.push({i:u.push(_(u)+"rotate(",null,p)-2,x:sn(s,e)})):e&&u.push(_(u)+"rotate("+e+p),i=t.skewX,a=n.skewX,r=l,i!==a?h.push({i:r.push(_(r)+"skewX(",null,p)-2,x:sn(i,a)}):a&&r.push(_(r)+"skewX("+a+p),o=t.scaleX,s=t.scaleY,u=n.scaleX,e=n.scaleY,i=l,r=h,o!==u||s!==e?(a=i.push(_(i)+"scale(",null,",",null,")"),r.push({i:a-4,x:sn(o,u)},{i:a-2,x:sn(s,e)})):1===u&&1===e||i.push(_(i)+"scale("+u+","+e+")"),t=n=null,function(t){for(var n,e=-1,i=h.length;++e<i;)l[(n=h[e]).i]=n.x(t);return l.join("")}}}function pn(t){return((t=Math.exp(t))+1/t)/2}function _n(t,n){var i,r,o,e,a=t[0],s=t[1],u=t[2],l=n[0],t=n[1],n=n[2],h=l-a,c=t-s,l=h*h+c*c;return(e=l<1e-12?(o=Math.log(n/u)/Mh,function(t){return[a+t*h,s+t*c,u*Math.exp(Mh*t*o)]}):(i=Math.sqrt(l),t=(n*n-u*u+4*l)/(2*u*2*i),e=(n*n-u*u-4*l)/(2*n*2*i),r=Math.log(Math.sqrt(t*t+1)-t),o=(Math.log(Math.sqrt(e*e+1)-e)-r)/Mh,function(t){var n=t*o,e=pn(r),t=u/(2*i)*(e*(t=Mh*n+r,((t=Math.exp(2*t))-1)/(t+1))-(t=r,((t=Math.exp(t))-1/t)/2));return[a+t*h,s+t*c,u*e/pn(Mh*n+r)]})).duration=1e3*o,e}function mn(a){return function(n,t){var e=a((n=Ot(n)).h,(t=Ot(t)).h),i=en(n.s,t.s),r=en(n.l,t.l),o=en(n.opacity,t.opacity);return function(t){return n.h=e(t),n.s=i(t),n.l=r(t),n.opacity=o(t),n+""}}}function gn(a){return function(n,t){var e=a((n=Ht(n)).h,(t=Ht(t)).h),i=en(n.c,t.c),r=en(n.l,t.l),o=en(n.opacity,t.opacity);return function(t){return n.h=e(t),n.c=i(t),n.l=r(t),n.opacity=o(t),n+""}}}function vn(s){return function t(a){function n(n,t){var e=s((n=Yt(n)).h,(t=Yt(t)).h),i=en(n.s,t.s),r=en(n.l,t.l),o=en(n.opacity,t.opacity);return function(t){return n.h=e(t),n.s=i(t),n.l=r(Math.pow(t,a)),n.opacity=o(t),n+""}}return a=+a,n.gamma=t,n}(1)}function yn(){return Oh||(Dh(bn),Oh=Rh.now()+Bh)}function bn(){Oh=0}function xn(){this._call=this._time=this._next=null}function wn(t,n,e){var i=new xn;return i.restart(t,n,e),i}function Mn(){yn(),++Eh;for(var t,n=fh;n;)0<=(t=Oh-n._time)&&n._call.call(null,t),n=n._next;--Eh}function Ln(){Oh=(Ih=Rh.now())+Bh,Eh=Ah=0;try{Mn()}finally{Eh=0,function(){for(var t,n,e=fh,i=1/0;e;)e=e._call?(i>e._time&&(i=e._time),(t=e)._next):(n=e._next,e._next=null,t?t._next=n:fh=n);dh=t,Pn(i)}(),Oh=0}}function Tn(){var t=Rh.now(),n=t-Ih;Nh<n&&(Bh-=n,Ih=t)}function Pn(t){Eh||(Ah=Ah&&clearTimeout(Ah),24<t-Oh?(t<1/0&&(Ah=setTimeout(Ln,t-Rh.now()-Bh)),zh=zh&&clearInterval(zh)):(zh||(Ih=Rh.now(),zh=setInterval(Tn,Nh)),Eh=1,Dh(Ln)))}function kn(n,e,t){var i=new xn;return e=null==e?0:+e,i.restart(function(t){i.stop(),n(t+e)},e,t),i}function Cn(t,n,e,i,r,o){var a,s,u,l,h,c=t.__transition;if(c){if(e in c)return}else t.__transition={};function f(t){var n,e,i,r;if(u.state!==Uh)return p();for(n in h)if((r=h[n]).name===u.name){if(r.state===Wh)return kn(f);r.state===Hh?(r.state=Yh,r.timer.stop(),r.on.call("interrupt",a,a.__data__,r.index,r.group),delete h[n]):+n<s&&(r.state=Yh,r.timer.stop(),delete h[n])}if(kn(function(){u.state===Wh&&(u.state=Hh,u.timer.restart(d,u.delay,u.time),d(t))}),u.state=qh,u.on.call("start",a,a.__data__,u.index,u.group),u.state===qh){for(u.state=Wh,l=new Array(i=u.tween.length),n=0,e=-1;n<i;++n)(r=u.tween[n].value.call(a,a.__data__,u.index,u.group))&&(l[++e]=r);l.length=e+1}}function d(t){for(var n=t<u.duration?u.ease.call(null,t/u.duration):(u.timer.restart(p),u.state=Vh,1),e=-1,i=l.length;++e<i;)l[e].call(null,n);u.state===Vh&&(u.on.call("end",a,a.__data__,u.index,u.group),p())}function p(){for(var t in u.state=Yh,u.timer.stop(),delete h[s],h)return;delete a.__transition}a=t,s=e,u={name:n,index:i,group:r,on:Zh,tween:Fh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jh},((h=a.__transition)[s]=u).timer=wn(function(t){u.state=Uh,u.timer.restart(f,u.delay,u.time),u.delay<=t&&f(t-u.delay)},0,u.time)}function Sn(t,n){n=An(t,n);if(n.state>jh)throw new Error("too late; already scheduled");return n}function En(t,n){n=An(t,n);if(n.state>qh)throw new Error("too late; already started");return n}function An(t,n){t=t.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function zn(t,n){var e,i,r,o=t.__transition,a=!0;if(o){for(r in n=null==n?null:n+"",o)(e=o[r]).name===n?(i=e.state>qh&&e.state<Vh,e.state=Yh,e.timer.stop(),i&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[r]):a=!1;a&&delete t.__transition}}function Nn(t,n,e){var i=t._id;return t.each(function(){var t=En(this,i);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return An(t,i).value[n]}}function In(t,n){var e;return("number"==typeof n?sn:n instanceof Ct?ph:(e=Ct(n))?(n=e,ph):ln)(t,n)}function On(t,n,e,i){this._groups=t,this._parents=n,this._name=e,this._id=i}function Bn(t){return st().transition(t)}function Rn(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Dn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function Zn(t){return(1-Math.cos(tc*t))/2}function Fn(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function jn(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Un(t){return(t=+t)<4/11?ec*t*t:t<8/11?ec*(t-=6/11)*t+.75:t<10/11?ec*(t-=9/11)*t+.9375:ec*(t-=21/22)*t+63/64}function qn(t){return function(){return t}}function Wn(){F.event.stopImmediatePropagation()}function Hn(){F.event.preventDefault(),F.event.stopImmediatePropagation()}function Vn(t){return{type:t}}function Yn(){return!F.event.button}function Gn(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Xn(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Kn(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function $n(O){function n(t){var n=t.property("__brush",r).selectAll(".overlay").data([Vn("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yc.overlay).merge(n).each(function(){var t=Xn(this).extent;ut(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),t.selectAll(".selection").data([Vn("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yc.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");n=t.selectAll(".handle").data(O.handles,function(t){return t.type});n.exit().remove(),n.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return yc[t.type]}),t.each(B).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",i)}function B(){var t=ut(this),n=Xn(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-s/2:n[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-s/2:n[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function R(t,n){return t.__brush.emitter||new e(t,n)}function e(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function i(){function t(){var t=dt(m);!C||p||_||(Math.abs(t[0]-E[0])>Math.abs(t[1]-E[1])?_=!0:p=!0),E=t,d=!0,Hn(),n()}function n(){var t;switch(c=E[0]-S[0],f=E[1]-S[1],v){case dc:case fc:y&&(c=Math.max(L-i,Math.min(P-s,c)),r=i+c,u=s+c),b&&(f=Math.max(T-o,Math.min(k-l,f)),a=o+f,h=l+f);break;case pc:y<0?(c=Math.max(L-i,Math.min(P-i,c)),r=i+c,u=s):0<y&&(c=Math.max(L-s,Math.min(P-s,c)),r=i,u=s+c),b<0?(f=Math.max(T-o,Math.min(k-o,f)),a=o+f,h=l):0<b&&(f=Math.max(T-l,Math.min(k-l,f)),a=o,h=l+f);break;case _c:y&&(r=Math.max(L,Math.min(P,i-c*y)),u=Math.max(L,Math.min(P,s+c*y))),b&&(a=Math.max(T,Math.min(k,o-f*b)),h=Math.max(T,Math.min(k,l+f*b)))}u<r&&(y*=-1,t=i,i=s,s=t,t=r,r=u,u=t,g in bc&&N.attr("cursor",yc[g=bc[g]])),h<a&&(b*=-1,t=o,o=l,l=t,t=a,a=h,h=t,g in xc&&N.attr("cursor",yc[g=xc[g]])),x.selection&&(M=x.selection),p&&(r=M[0][0],u=M[1][0]),_&&(a=M[0][1],h=M[1][1]),M[0][0]===r&&M[0][1]===a&&M[1][0]===u&&M[1][1]===h||(x.selection=[[r,a],[u,h]],B.call(m),A.brush())}function e(){if(Wn(),F.event.touches){if(F.event.touches.length)return;D&&clearTimeout(D),D=setTimeout(function(){D=null},500),z.on("touchmove.brush touchend.brush touchcancel.brush",null)}else vt(F.event.view,d),I.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);z.attr("pointer-events","all"),N.attr("cursor",yc.overlay),x.selection&&(M=x.selection),Kn(M)&&(x.selection=null,B.call(m)),A.end()}if(F.event.touches){if(F.event.changedTouches.length<F.event.touches.length)return Hn()}else if(D)return;var i,r,o,a,s,u,l,h,c,f,d,p,_,m,g,v,y,b,x,w,M,L,T,P,k,C,S,E,A,z,N,I;Z.apply(this,arguments)&&(m=this,g=F.event.target.__data__.type,v="selection"===(F.event.metaKey?g="overlay":g)?fc:F.event.altKey?_c:pc,y=O===gc?null:wc[g],b=O===mc?null:Mc[g],w=(x=Xn(m)).extent,M=x.selection,L=w[0][0],T=w[0][1],P=w[1][0],k=w[1][1],C=y&&b&&F.event.shiftKey,S=dt(m),E=S,A=R(m,arguments).beforestart(),"overlay"===g?x.selection=M=[[i=O===gc?L:S[0],o=O===mc?T:S[1]],[s=O===gc?P:i,l=O===mc?k:o]]:(i=M[0][0],o=M[0][1],s=M[1][0],l=M[1][1]),r=i,a=o,u=s,h=l,z=ut(m).attr("pointer-events","none"),N=z.selectAll(".overlay").attr("cursor",yc[g]),F.event.touches?z.on("touchmove.brush",t,!0).on("touchend.brush touchcancel.brush",e,!0):(I=ut(F.event.view).on("keydown.brush",function(){switch(F.event.keyCode){case 16:C=y&&b;break;case 18:v===pc&&(y&&(s=u-c*y,i=r+c*y),b&&(l=h-f*b,o=a+f*b),v=_c,n());break;case 32:v!==pc&&v!==_c||(y<0?s=u-c:0<y&&(i=r-c),b<0?l=h-f:0<b&&(o=a-f),v=dc,N.attr("cursor",yc.selection),n());break;default:return}Hn()},!0).on("keyup.brush",function(){switch(F.event.keyCode){case 16:C&&(p=_=C=!1,n());break;case 18:v===_c&&(y<0?s=u:0<y&&(i=r),b<0?l=h:0<b&&(o=a),v=pc,n());break;case 32:v===dc&&(v=F.event.altKey?(y&&(s=u-c*y,i=r+c*y),b&&(l=h-f*b,o=a+f*b),_c):(y<0?s=u:0<y&&(i=r),b<0?l=h:0<b&&(o=a),pc),N.attr("cursor",yc[g]),n());break;default:return}Hn()},!0).on("mousemove.brush",t,!0).on("mouseup.brush",e,!0),gt(F.event.view)),Wn(),zn(m),B.call(m),A.start())}function r(){var t=this.__brush||{selection:null};return t.extent=o.apply(this,arguments),t.dim=O,t}var D,o=Gn,Z=Yn,a=z(n,"start","brush","end"),s=6;return n.move=function(t,s){t.selection?t.on("start.brush",function(){R(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){R(this,arguments).end()}).tween("brush",function(){function t(t){e.selection=1===t&&Kn(o)?null:a(t),B.call(n),i.brush()}var n=this,e=n.__brush,i=R(n,arguments),r=e.selection,o=O.input("function"==typeof s?s.apply(this,arguments):s,e.extent),a=hn(r,o);return r&&o?t:t(1)}):t.each(function(){var t=arguments,n=this.__brush,e=O.input("function"==typeof s?s.apply(this,t):s,n.extent),t=R(this,t).beforestart();zn(this),n.selection=null==e||Kn(e)?null:e,B.call(this),t.start().brush().end()})},e.prototype={beforestart:function(){return 1==++this.active&&((this.state.emitter=this).starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){rt(new function(t,n,e){this.target=t,this.type=n,this.selection=e}(n,t,O.output(this.state.selection)),a.apply,a,[t,this.that,this.args])}},n.extent=function(t){return arguments.length?(o="function"==typeof t?t:qn([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),n):o},n.filter=function(t){return arguments.length?(Z="function"==typeof t?t:qn(!!t),n):Z},n.handleSize=function(t){return arguments.length?(s=+t,n):s},n.on=function(){var t=a.on.apply(a,arguments);return t===a?n:t},n}function Jn(t){return function(){return t}}function Qn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function te(){return new Qn}function ne(t){return t.source}function ee(t){return t.target}function ie(t){return t.radius}function re(t){return t.startAngle}function oe(t){return t.endAngle}function ae(){}function se(t,n){var e=new ae;if(t instanceof ae)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var i,r=-1,o=t.length;if(null==n)for(;++r<o;)e.set(r,t[r]);else for(;++r<o;)e.set(n(i=t[r],r,t),i)}else if(t)for(var a in t)e.set(a,t[a]);return e}function ue(){return{}}function le(t,n,e){t[n]=e}function he(){return se()}function ce(t,n,e){t.set(n,e)}function fe(){}function de(t,n){var e=new fe;if(t instanceof fe)t.each(function(t){e.add(t)});else if(t){var i=-1,r=t.length;if(null==n)for(;++i<r;)e.add(t[i]);else for(;++i<r;)e.add(n(t[i],i,t))}return e}function pe(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function _e(o){function n(i,t){function n(){if(u)return Bc;if(l)return l=!1,Oc;var t,n,e=a;if(34===i.charCodeAt(e)){for(;a++<o&&34!==i.charCodeAt(a)||34===i.charCodeAt(++a););return(t=a)>=o?u=!0:10===(n=i.charCodeAt(a++))?l=!0:13===n&&(l=!0,10===i.charCodeAt(a)&&++a),i.slice(e+1,t-1).replace(/""/g,'"')}for(;a<o;){if(10===(n=i.charCodeAt(t=a++)))l=!0;else if(13===n)l=!0,10===i.charCodeAt(a)&&++a;else if(n!==c)continue;return i.slice(e,t)}return u=!0,i.slice(e,o)}var e,r=[],o=i.length,a=0,s=0,u=o<=0,l=!1;for(10===i.charCodeAt(o-1)&&--o,13===i.charCodeAt(o-1)&&--o;(e=n())!==Bc;){for(var h=[];e!==Oc&&e!==Bc;)h.push(e),e=n();t&&null==(h=t(h,s++))||r.push(h)}return r}function e(t){return t.map(a).join(o)}function a(t){return null==t?"":i.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var i=new RegExp('["'+o+"\n\r]"),c=o.charCodeAt(0);return{parse:function(t,o){var a,s,t=n(t,function(t,n){return a?a(t,n-1):(s=t,void(a=o?(i=o,r=pe(e=t),function(t,n){return i(r(t),n,e)}):pe(t)));var e,i,r});return t.columns=s||[],t},parseRows:n,format:function(t,e){return null==e&&(n=t,i=Object.create(null),r=[],n.forEach(function(t){for(var n in t)n in i||r.push(i[n]=n)}),e=r),[e.map(a).join(o)].concat(t.map(function(n){return e.map(function(t){return a(n[t])}).join(o)})).join("\n");var n,i,r},formatRows:function(t){return t.map(e).join("\n")}}}function me(t){return function(){return t}}function ge(){return 1e-6*(Math.random()-.5)}function ve(t,n,e,i){if(isNaN(n)||isNaN(e))return t;var r,o,a,s,u,l,h,c,f,d=t._root,p={data:i},_=t._x0,m=t._y0,g=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=n>=(o=(_+g)/2))?_=o:g=o,(h=e>=(a=(m+v)/2))?m=a:v=a,!(d=(r=d)[c=h<<1|l]))return r[c]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),n===s&&e===u)return p.next=d,r?r[c]=p:t._root=p,t;for(;r=r?r[c]=new Array(4):t._root=new Array(4),(l=n>=(o=(_+g)/2))?_=o:g=o,(h=e>=(a=(m+v)/2))?m=a:v=a,(c=h<<1|l)==(f=(a<=u)<<1|o<=s););return r[f]=d,r[c]=p,t}function ye(t,n,e,i,r){this.node=t,this.x0=n,this.y0=e,this.x1=i,this.y1=r}function be(t){return t[0]}function xe(t){return t[1]}function we(t,n,e){e=new Me(null==n?be:n,null==e?xe:e,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Me(t,n,e,i,r,o){this._x=t,this._y=n,this._x0=e,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function Le(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function Te(t){return t.x+t.vx}function Pe(t){return t.y+t.vy}function ke(t){return t.index}function Ce(t,n){t=t.get(n);if(!t)throw new Error("missing: "+n);return t}function Se(t){return t.x}function Ee(t){return t.y}function Ae(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,n=t.slice(0,e);return[1<n.length?n[0]+n.slice(2):n,+t.slice(e+1)]}function ze(t){return(t=Ae(Math.abs(t)))?t[1]:NaN}function Ne(t,n){n=Ae(t,n);if(!n)return t+"";t=n[0],n=n[1];return n<0?"0."+new Array(-n).join("0")+t:t.length>n+1?t.slice(0,n+1)+"."+t.slice(n+1):t+new Array(n-t.length+2).join("0")}function Ie(t){return new Oe(t)}function Oe(t){if(!(u=$c.exec(t)))throw new Error("invalid format: "+t);var n=u[1]||" ",e=u[2]||">",i=u[3]||"-",r=u[4]||"",o=!!u[5],a=u[6]&&+u[6],s=!!u[7],t=u[8]&&+u[8].slice(1),u=u[9]||"";"n"===u?(s=!0,u="g"):Kc[u]||(u=""),(o||"0"===n&&"="===e)&&(o=!0,n="0",e="="),this.fill=n,this.align=e,this.sign=i,this.symbol=r,this.zero=o,this.width=a,this.comma=s,this.precision=t,this.type=u}function Be(t){return t}function Re(t){function o(t){function n(t){var n,e,i,r=g,o=v;if("c"===m)o=y(t)+o,t="";else{var a=(t=+t)<0;if(t=y(Math.abs(t),_),a&&0==+t&&(a=!1),r=(a?"("===c?c:"-":"-"===c||"("===c?"":c)+r,o=("s"===m?Qc[8+Gc/3]:"")+o+(a&&"("===c?")":""),b)for(n=-1,e=t.length;++n<e;)if((i=t.charCodeAt(n))<48||57<i){o=(46===i?w+t.slice(n+1):t.slice(n))+o,t=t.slice(0,n);break}}p&&!f&&(t=x(t,1/0));var s=r.length+t.length+o.length,u=s<d?new Array(d-s+1).join(l):"";switch(p&&f&&(t=x(u+t,u.length?d-o.length:1/0),u=""),h){case"<":t=r+t+o+u;break;case"=":t=r+u+t+o;break;case"^":t=u.slice(0,s=u.length>>1)+r+t+o+u.slice(s);break;default:t=u+r+t+o}return M(t)}var l=(t=Ie(t)).fill,h=t.align,c=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,_=t.precision,m=t.type,g="$"===e?i[0]:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",v="$"===e?i[1]:/[%p]/.test(m)?r:"",y=Kc[m],b=!m||/[defgprs%]/.test(m),_=null==_?m?6:12:/[gprs]/.test(m)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));return n.toString=function(){return t+""},n}var n,s,u,x=t.grouping&&t.thousands?(s=t.grouping,u=t.thousands,function(t,n){for(var e=t.length,i=[],r=0,o=s[0],a=0;0<e&&0<o&&(n<a+o+1&&(o=Math.max(1,n-a)),i.push(t.substring(e-=o,e+o)),!((a+=o+1)>n));)o=s[r=(r+1)%s.length];return i.reverse().join(u)}):Be,i=t.currency,w=t.decimal,M=t.numerals?(n=t.numerals,function(t){return t.replace(/[0-9]/g,function(t){return n[+t]})}):Be,r=t.percent||"%";return{format:o,formatPrefix:function(t,n){var e=o(((t=Ie(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(ze(n)/3))),i=Math.pow(10,-n),r=Qc[8+n/3];return function(t){return e(i*t)+r}}}}function De(t){return Jc=Re(t),F.format=Jc.format,F.formatPrefix=Jc.formatPrefix,Jc}function Ze(t){return Math.max(0,-ze(Math.abs(t)))}function Fe(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ze(n)/3)))-ze(Math.abs(t)))}function je(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,ze(n)-ze(t))+1}function Ue(){return new qe}function qe(){this.reset()}function We(t,n,e){var i=t.s=n+e,r=i-n,i=i-r;t.t=n-i+(e-r)}function He(t){return 1<t?0:t<-1?If:Math.acos(t)}function Ve(t){return 1<t?Of:t<-1?-Of:Math.asin(t)}function Ye(t){return(t=Gf(t/2))*t}function Ge(){}function Xe(t,n){t&&Qf.hasOwnProperty(t.type)&&Qf[t.type](t,n)}function Ke(t,n,e){var i,r=-1,o=t.length-e;for(n.lineStart();++r<o;)i=t[r],n.point(i[0],i[1],i[2]);n.lineEnd()}function $e(t,n){var e=-1,i=t.length;for(n.polygonStart();++e<i;)Ke(t[e],n,1);n.polygonEnd()}function Je(t,n){t&&Jf.hasOwnProperty(t.type)?Jf[t.type](t,n):Xe(t,n)}function Qe(){ed.point=ni}function ti(){ei(tf,nf)}function ni(t,n){ed.point=ei,tf=t,nf=n,ef=t*=Zf,rf=qf(n=(n*=Zf)/2+Bf),of=Gf(n)}function ei(t,n){n=(n*=Zf)/2+Bf;var e=(t*=Zf)-ef,i=0<=e?1:-1,r=i*e,o=qf(n),a=Gf(n),e=of*a,n=rf*o+e*qf(r),r=e*i*Gf(r);td.add(Uf(r,n)),ef=t,rf=o,of=a}function ii(t){return[Uf(t[1],t[0]),Ve(t[2])]}function ri(t){var n=t[0],e=t[1],t=qf(e);return[t*qf(n),t*Gf(n),Gf(e)]}function oi(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ai(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function si(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ui(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function li(t){var n=Kf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function hi(t,n){pf.push(_f=[af=t,uf=t]),n<sf&&(sf=n),lf<n&&(lf=n)}function ci(t,n){var e,i,r,o,a,s=ri([t*Zf,n*Zf]);df?(o=ai(df,s),li(e=ai([o[1],-o[0],0],o)),e=ii(e),r=0<(a=t-hf)?1:-1,o=e[0]*Df*r,(a=180<Ff(a))^(r*hf<o&&o<r*t)?(i=e[1]*Df)>lf&&(lf=i):a^(r*hf<(o=(o+360)%360-180)&&o<r*t)?(i=-e[1]*Df)<sf&&(sf=i):(n<sf&&(sf=n),lf<n&&(lf=n)),a?t<hf?gi(af,t)>gi(af,uf)&&(uf=t):gi(t,uf)>gi(af,uf)&&(af=t):af<=uf?(t<af&&(af=t),uf<t&&(uf=t)):hf<t?gi(af,t)>gi(af,uf)&&(uf=t):gi(t,uf)>gi(af,uf)&&(af=t)):pf.push(_f=[af=t,uf=t]),n<sf&&(sf=n),lf<n&&(lf=n),df=s,hf=t}function fi(){rd.point=ci}function di(){_f[0]=af,_f[1]=uf,rd.point=hi,df=null}function pi(t,n){var e;df?(e=t-hf,id.add(180<Ff(e)?e+(0<e?360:-360):e)):(cf=t,ff=n),ed.point(t,n),ci(t,n)}function _i(){ed.lineStart()}function mi(){pi(cf,ff),ed.lineEnd(),Ff(id)>Nf&&(af=-(uf=180)),_f[0]=af,_f[1]=uf,df=null}function gi(t,n){return(n-=t)<0?n+360:n}function vi(t,n){return t[0]-n[0]}function yi(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function bi(t,n){t*=Zf;var e=qf(n*=Zf);xi(e*qf(t),e*Gf(t),Gf(n))}function xi(t,n,e){vf+=(t-vf)/++mf,yf+=(n-yf)/mf,bf+=(e-bf)/mf}function wi(){od.point=Mi}function Mi(t,n){t*=Zf;var e=qf(n*=Zf);Sf=e*qf(t),Ef=e*Gf(t),Af=Gf(n),od.point=Li,xi(Sf,Ef,Af)}function Li(t,n){t*=Zf;var e=qf(n*=Zf),i=e*qf(t),e=e*Gf(t),t=Gf(n),n=Uf(Kf((n=Ef*t-Af*e)*n+(n=Af*i-Sf*t)*n+(n=Sf*e-Ef*i)*n),Sf*i+Ef*e+Af*t);gf+=n,xf+=n*(Sf+(Sf=i)),wf+=n*(Ef+(Ef=e)),Mf+=n*(Af+(Af=t)),xi(Sf,Ef,Af)}function Ti(){od.point=bi}function Pi(){od.point=Ci}function ki(){Si(kf,Cf),od.point=bi}function Ci(t,n){kf=t,Cf=n,t*=Zf,n*=Zf,od.point=Si;var e=qf(n);Sf=e*qf(t),Ef=e*Gf(t),Af=Gf(n),xi(Sf,Ef,Af)}function Si(t,n){t*=Zf;var e=qf(n*=Zf),i=e*qf(t),r=e*Gf(t),o=Gf(n),a=Ef*o-Af*r,s=Af*i-Sf*o,e=Sf*r-Ef*i,t=Kf(a*a+s*s+e*e),n=Ve(t),t=t&&-n/t;Lf+=t*a,Tf+=t*s,Pf+=t*e,gf+=n,xf+=n*(Sf+(Sf=i)),wf+=n*(Ef+(Ef=r)),Mf+=n*(Af+(Af=o)),xi(Sf,Ef,Af)}function Ei(t){return function(){return t}}function Ai(e,i){function t(t,n){return t=e(t,n),i(t[0],t[1])}return e.invert&&i.invert&&(t.invert=function(t,n){return(t=i.invert(t,n))&&e.invert(t[0],t[1])}),t}function zi(t,n){return[If<t?t-Rf:t<-If?t+Rf:t,n]}function Ni(t,n,e){return(t%=Rf)?n||e?Ai(Oi(t),Bi(n,e)):Oi(t):n||e?Bi(n,e):zi}function Ii(e){return function(t,n){return[If<(t+=e)?t-Rf:t<-If?t+Rf:t,n]}}function Oi(t){var n=Ii(t);return n.invert=Ii(-t),n}function Bi(t,n){function e(t,n){var e=qf(n),i=qf(t)*e,t=Gf(t)*e,e=Gf(n),n=e*r+i*o;return[Uf(t*a-n*s,i*r-e*o),Ve(n*a+t*s)]}var r=qf(t),o=Gf(t),a=qf(n),s=Gf(n);return e.invert=function(t,n){var e=qf(n),i=qf(t)*e,t=Gf(t)*e,e=Gf(n),n=e*a-t*s;return[Uf(t*a+e*s,i*r+n*o),Ve(n*r-i*o)]},e}function Ri(n){function t(t){return(t=n(t[0]*Zf,t[1]*Zf))[0]*=Df,t[1]*=Df,t}return n=Ni(n[0]*Zf,n[1]*Zf,2<n.length?n[2]*Zf:0),t.invert=function(t){return(t=n.invert(t[0]*Zf,t[1]*Zf))[0]*=Df,t[1]*=Df,t},t}function Di(t,n,e,i,r,o){if(e){var a=qf(n),s=Gf(n),u=i*e;null==r?(r=n+i*Rf,o=n-u/2):(r=Zi(a,r),o=Zi(a,o),(0<i?r<o:o<r)&&(r+=i*Rf));for(var l,h=r;0<i?o<h:h<o;h-=u)l=ii([a,-s*qf(h),-s*Gf(h)]),t.point(l[0],l[1])}}function Zi(t,n){(n=ri(n))[0]-=t,li(n);t=He(-n[1]);return((-n[2]<0?-t:t)+Rf-Nf)%Rf}function Fi(){var e,n=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){n.push(e=[])},lineEnd:Ge,rejoin:function(){1<n.length&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],e=null,t}}}function ji(t,n){return Ff(t[0]-n[0])<Nf&&Ff(t[1]-n[1])<Nf}function Ui(t,n,e,i){this.x=t,this.z=n,this.o=e,this.e=i,this.v=!1,this.n=this.p=null}function qi(t,n,e,i,o){var a,r,s=[],u=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],r=t[n];if(ji(i,r)){for(o.lineStart(),a=0;a<n;++a)o.point((i=t[a])[0],i[1]);o.lineEnd()}else s.push(e=new Ui(i,t,null,!0)),u.push(e.o=new Ui(i,null,e,!1)),s.push(e=new Ui(r,t,null,!1)),u.push(e.o=new Ui(r,null,e,!0))}}),s.length){for(u.sort(n),Wi(s),Wi(u),a=0,r=u.length;a<r;++a)u[a].e=e=!e;for(var l,h,c=s[0];;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,o.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,r=l.length;a<r;++a)o.point((h=l[a])[0],h[1]);else i(f.x,f.n.x,1,o);f=f.n}else{if(d)for(l=f.p.z,a=l.length-1;0<=a;--a)o.point((h=l[a])[0],h[1]);else i(f.x,f.p.x,-1,o);f=f.p}}while(l=(f=f.o).z,d=!d,!f.v);o.lineEnd()}}}function Wi(t){if(n=t.length){for(var n,e,i=0,r=t[0];++i<n;)r.n=e=t[i],e.p=r,r=e;r.n=e=t[0],e.p=r}}function Hi(t,n){var e=n[0],i=n[1],r=[Gf(e),-qf(e),0],o=0,a=0;gd.reset();for(var s=0,u=t.length;s<u;++s)if(h=(l=t[s]).length)for(var l,h,c=l[h-1],f=c[0],d=c[1]/2+Bf,p=Gf(d),_=qf(d),m=0;m<h;++m,f=v,p=b,_=x,c=g){var g=l[m],v=g[0],y=g[1]/2+Bf,b=Gf(y),x=qf(y),w=v-f,M=0<=w?1:-1,L=M*w,T=If<L,y=p*b;gd.add(Uf(y*M*Gf(L),_*x+y*qf(L))),o+=T?w+M*Rf:w,T^e<=f^e<=v&&(li(L=ai(ri(c),ri(g))),li(M=ai(r,L)),((M=(T^0<=w?-1:1)*Ve(M[2]))<i||i===M&&(L[0]||L[1]))&&(a+=T^0<=w?1:-1))}return(o<-Nf||o<Nf&&gd<-Nf)^1&a}function Vi(m,g,v,y){return function(s){function n(t,n){m(t,n)&&s.point(t,n)}function t(t,n){a.point(t,n)}function e(){_.point=t,a.lineStart()}function i(){_.point=n,a.lineEnd()}function u(t,n){c.push([t,n]),d.point(t,n)}function r(){d.lineStart(),c=[]}function o(){u(c[0][0],c[0][1]),d.lineEnd();var t,n,e,i,r=d.clean(),o=f.result(),a=o.length;if(c.pop(),l.push(c),c=null,a)if(1&r){if(0<(n=(e=o[0]).length-1)){for(p||(s.polygonStart(),p=!0),s.lineStart(),t=0;t<n;++t)s.point((i=e[t])[0],i[1]);s.lineEnd()}}else 1<a&&2&r&&o.push(o.pop().concat(o.shift())),h.push(o.filter(Yi))}var l,h,c,a=g(s),f=Fi(),d=g(f),p=!1,_={point:n,lineStart:e,lineEnd:i,polygonStart:function(){_.point=u,_.lineStart=r,_.lineEnd=o,h=[],l=[]},polygonEnd:function(){_.point=n,_.lineStart=e,_.lineEnd=i,h=k(h);var t=Hi(l,y);h.length?(p||(s.polygonStart(),p=!0),qi(h,Gi,t,v,s)):t&&(p||(s.polygonStart(),p=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),p&&(s.polygonEnd(),p=!1),h=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};return _}}function Yi(t){return 1<t.length}function Gi(t,n){return((t=t.x)[0]<0?t[1]-Of-Nf:Of-t[1])-((n=n.x)[0]<0?n[1]-Of-Nf:Of-n[1])}function Xi(r){function f(t,n){return qf(t)*qf(n)>_}function d(t,n,e){var i=[1,0,0],r=ai(ri(t),ri(n)),o=oi(r,r),a=r[0],s=o-a*a;if(!s)return!e&&t;var u=_*o/s,l=-_*a/s,h=ai(i,r),c=ui(i,u);si(c,ui(r,l));o=h,a=oi(c,o),s=oi(o,o),i=a*a-s*(oi(c,c)-1);if(!(i<0)){u=Kf(i),r=ui(o,(-a-u)/s);if(si(r,c),r=ii(r),!e)return r;var f,l=t[0],h=n[0],i=t[1],e=n[1];h<l&&(f=l,l=h,h=f);t=h-l,n=Ff(t-If)<Nf;if(!n&&e<i&&(f=i,i=e,e=f),n||t<Nf?n?0<i+e^r[1]<(Ff(r[0]-l)<Nf?i:e):i<=r[1]&&r[1]<=e:If<t^(l<=r[0]&&r[0]<=h)){s=ui(o,(-a+u)/s);return si(s,c),[r,ii(s)]}}}function p(t,n){var e=m?r:If-r,i=0;return t<-e?i|=1:e<t&&(i|=2),n<-e?i|=4:e<n&&(i|=8),i}var _=qf(r),o=6*Zf,m=0<_,g=Ff(_)>Nf;return Vi(f,function(a){var s,u,l,h,c;return{lineStart:function(){h=l=!1,c=1},point:function(t,n){var e,i,r=[t,n],o=f(t,n),n=m?o?0:p(t,n):o?p(t+(t<0?If:-If),n):0;!s&&(h=l=o)&&a.lineStart(),o===l||(e=d(s,r))&&!ji(s,e)&&!ji(r,e)||(r[0]+=Nf,r[1]+=Nf,o=f(r[0],r[1])),o!==l?(c=0,o?(a.lineStart(),e=d(r,s),a.point(e[0],e[1])):(e=d(s,r),a.point(e[0],e[1]),a.lineEnd()),s=e):g&&s&&m^o&&(n&u||!(i=d(r,s,!0))||(c=0,m?(a.lineStart(),a.point(i[0][0],i[0][1]),a.point(i[1][0],i[1][1]),a.lineEnd()):(a.point(i[1][0],i[1][1]),a.lineEnd(),a.lineStart(),a.point(i[0][0],i[0][1])))),!o||s&&ji(s,r)||a.point(r[0],r[1]),s=r,l=o,u=n},lineEnd:function(){l&&a.lineEnd(),s=null},clean:function(){return c|(h&&l)<<1}}},function(t,n,e,i){Di(i,r,o,e,t,n)},m?[0,-r]:[-If,r-If])}function Ki(g,v,y,b){function x(t,n){return g<=t&&t<=y&&v<=n&&n<=b}function w(t,n,e,i){var r=0,o=0;if(null==t||(r=a(t,e))!==(o=a(n,e))||s(t,n)<0^0<e)for(;i.point(0===r||3===r?g:y,1<r?b:v),(r=(r+e+4)%4)!==o;);else i.point(n[0],n[1])}function a(t,n){return Ff(t[0]-g)<Nf?0<n?0:3:Ff(t[0]-y)<Nf?0<n?2:1:Ff(t[1]-v)<Nf?0<n?1:0:0<n?3:2}function M(t,n){return s(t.x,n.x)}function s(t,n){var e=a(t,1),i=a(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(i){function t(t,n){x(t,n)&&_.point(t,n)}function n(t,n){var e,i,r=x(t,n);c&&o.push([t,n]),d?(a=t,s=n,d=!1,(u=r)&&(_.lineStart(),_.point(t,n))):r&&f?_.point(t,n):!function(t,n){var e=t[0],i=t[1],r=0,o=1,a=n[0]-e,s=n[1]-i,u=g-e;if(a||!(0<u)){if(u/=a,a<0){if(u<r)return;u<o&&(o=u)}else if(0<a){if(o<u)return;r<u&&(r=u)}if(u=y-e,a||!(u<0)){if(u/=a,a<0){if(o<u)return;r<u&&(r=u)}else if(0<a){if(u<r)return;u<o&&(o=u)}if(u=v-i,s||!(0<u)){if(u/=s,s<0){if(u<r)return;u<o&&(o=u)}else if(0<s){if(o<u)return;r<u&&(r=u)}if(u=b-i,s||!(u<0)){if(u/=s,s<0){if(o<u)return;r<u&&(r=u)}else if(0<s){if(u<r)return;u<o&&(o=u)}return 0<r&&(t[0]=e+r*a,t[1]=i+r*s),o<1&&(n[0]=e+o*a,n[1]=i+o*s),1}}}}}(e=[l=Math.max(bd,Math.min(yd,l)),h=Math.max(bd,Math.min(yd,h))],i=[t=Math.max(bd,Math.min(yd,t)),n=Math.max(bd,Math.min(yd,n))])?r&&(_.lineStart(),_.point(t,n),p=!1):(f||(_.lineStart(),_.point(e[0],e[1])),_.point(i[0],i[1]),r||_.lineEnd(),p=!1),l=t,h=n,f=r}var r,c,o,a,s,u,l,h,f,d,p,_=i,e=Fi(),m={point:t,lineStart:function(){m.point=n,c&&c.push(o=[]),f=!(d=!0),l=h=NaN},lineEnd:function(){r&&(n(a,s),u&&f&&e.rejoin(),r.push(e.result())),m.point=t,f&&_.lineEnd()},polygonStart:function(){_=e,r=[],c=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,e=c.length;n<e;++n)for(var i,r,o=c[n],a=1,s=o.length,u=o[0],l=u[0],h=u[1];a<s;++a)i=l,r=h,l=(u=o[a])[0],h=u[1],r<=b?b<h&&(h-r)*(g-i)<(l-i)*(b-r)&&++t:h<=b&&(l-i)*(b-r)<(h-r)*(g-i)&&--t;return t}(),n=p&&t,e=(r=k(r)).length;(n||e)&&(i.polygonStart(),n&&(i.lineStart(),w(null,null,1,i),i.lineEnd()),e&&qi(r,M,t,w,i),i.polygonEnd()),_=i,r=c=o=null}};return m}}function $i(){wd.point=wd.lineEnd=Ge}function Ji(t,n){ad=t*=Zf,sd=Gf(n*=Zf),ud=qf(n),wd.point=Qi}function Qi(t,n){t*=Zf;var e=Gf(n*=Zf),i=qf(n),r=Ff(t-ad),o=qf(r),n=i*Gf(r),r=ud*e-sd*i*o,o=sd*e+ud*i*o;xd.add(Uf(Kf(n*n+r*r),o)),ad=t,sd=e,ud=i}function tr(t){return xd.reset(),Je(t,wd),+xd}function nr(t,n){return Md[0]=t,Md[1]=n,tr(Ld)}function er(t,n){return!(!t||!Pd.hasOwnProperty(t.type))&&Pd[t.type](t,n)}function ir(t,n){return 0===nr(t,n)}function rr(t,n){var e=nr(t[0],t[1]);return nr(t[0],n)+nr(n,t[1])<=e+Nf}function or(t,n){return!!Hi(t.map(ar),sr(n))}function ar(t){return(t=t.map(sr)).pop(),t}function sr(t){return[t[0]*Zf,t[1]*Zf]}function ur(t,n,e){var i=T(t,n-Nf,e).concat(n);return function(n){return i.map(function(t){return[n,t]})}}function lr(t,n,e){var i=T(t,n-Nf,e).concat(n);return function(n){return i.map(function(t){return[t,n]})}}function hr(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return T(Wf(o/m)*m,r,m).map(f).concat(T(Wf(l/g)*g,u,g).map(d)).concat(T(Wf(i/p)*p,e,p).filter(function(t){return Ff(t%m)>Nf}).map(h)).concat(T(Wf(s/_)*_,a,_).filter(function(t){return Ff(t%g)>Nf}).map(c))}var e,i,r,o,a,s,u,l,h,c,f,d,p=10,_=p,m=90,g=360,v=2.5;return n.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},n.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(d(u).slice(1),f(r).reverse().slice(1),d(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.extentMajor(t).extentMinor(t):n.extentMinor()},n.extentMajor=function(t){return arguments.length?(o=+t[0][0],r=+t[1][0],l=+t[0][1],u=+t[1][1],r<o&&(t=o,o=r,r=t),u<l&&(t=l,l=u,u=t),n.precision(v)):[[o,l],[r,u]]},n.extentMinor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],s=+t[0][1],a=+t[1][1],e<i&&(t=i,i=e,e=t),a<s&&(t=s,s=a,a=t),n.precision(v)):[[i,s],[e,a]]},n.step=function(t){return arguments.length?n.stepMajor(t).stepMinor(t):n.stepMinor()},n.stepMajor=function(t){return arguments.length?(m=+t[0],g=+t[1],n):[m,g]},n.stepMinor=function(t){return arguments.length?(p=+t[0],_=+t[1],n):[p,_]},n.precision=function(t){return arguments.length?(v=+t,h=ur(s,a,90),c=lr(i,e,v),f=ur(l,u,90),d=lr(o,r,v),n):v},n.extentMajor([[-180,-90+Nf],[180,90-Nf]]).extentMinor([[-180,-80-Nf],[180,80+Nf]])}function cr(t){return t}function fr(){Sd.point=dr}function dr(t,n){Sd.point=pr,ld=cd=t,hd=fd=n}function pr(t,n){Cd.add(fd*t-cd*n),cd=t,fd=n}function _r(){pr(ld,hd)}function mr(t,n){Od+=t,Bd+=n,++Rd}function gr(){Wd.point=vr}function vr(t,n){Wd.point=yr,mr(_d=t,md=n)}function yr(t,n){var e=t-_d,i=n-md,i=Kf(e*e+i*i);Dd+=i*(_d+t)/2,Zd+=i*(md+n)/2,Fd+=i,mr(_d=t,md=n)}function br(){Wd.point=mr}function xr(){Wd.point=Mr}function wr(){Lr(dd,pd)}function Mr(t,n){Wd.point=Lr,mr(dd=_d=t,pd=md=n)}function Lr(t,n){var e=t-_d,i=n-md,i=Kf(e*e+i*i);Dd+=i*(_d+t)/2,Zd+=i*(md+n)/2,Fd+=i,jd+=(i=md*t-_d*n)*(_d+t),Ud+=i*(md+n),qd+=3*i,mr(_d=t,md=n)}function Tr(t){this._context=t}function Pr(t,n){$d.point=kr,Vd=Gd=t,Yd=Xd=n}function kr(t,n){Gd-=t,Xd-=n,Kd.add(Kf(Gd*Gd+Xd*Xd)),Gd=t,Xd=n}function Cr(){this._string=[]}function Sr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Er(i){return function(t){var n,e=new Ar;for(n in i)e[n]=i[n];return e.stream=t,e}}function Ar(){}function zr(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),Je(e,t.stream(Id)),n(Id.result()),null!=i&&t.clipExtent(i),t}function Nr(r,o,t){return zr(r,function(t){var n=o[1][0]-o[0][0],e=o[1][1]-o[0][1],i=Math.min(n/(t[1][0]-t[0][0]),e/(t[1][1]-t[0][1])),n=+o[0][0]+(n-i*(t[1][0]+t[0][0]))/2,t=+o[0][1]+(e-i*(t[1][1]+t[0][1]))/2;r.scale(150*i).translate([n,t])},t)}function Ir(t,n,e){return Nr(t,[[0,0],n],e)}function Or(i,r,t){return zr(i,function(t){var n=+r,e=n/(t[1][0]-t[0][0]),n=(n-e*(t[1][0]+t[0][0]))/2,t=-e*t[0][1];i.scale(150*e).translate([n,t])},t)}function Br(r,o,t){return zr(r,function(t){var n=+o,e=n/(t[1][1]-t[0][1]),i=-e*t[0][0],t=(n-e*(t[1][1]+t[0][1]))/2;r.scale(150*e).translate([i,t])},t)}function Rr(t,n){return+n?(k=t,C=n,function(i){function t(t,n){t=k(t,n),i.point(t[0],t[1])}function n(){_=NaN,b.point=e,i.lineStart()}function e(t,n){var e=ri([t,n]),n=k(t,n);S(_,m,p,g,v,y,_=n[0],m=n[1],p=t,g=e[0],v=e[1],y=e[2],Jd,i),i.point(_,m)}function r(){b.point=t,i.lineEnd()}function o(){n(),b.point=a,b.lineEnd=s}function a(t,n){e(u=t,n),l=_,h=m,c=g,f=v,d=y,b.point=e}function s(){S(_,m,p,g,v,y,l,h,u,c,f,d,Jd,i),b.lineEnd=r,r()}var u,l,h,c,f,d,p,_,m,g,v,y,b={point:t,lineStart:n,lineEnd:r,polygonStart:function(){i.polygonStart(),b.lineStart=o},polygonEnd:function(){i.polygonEnd(),b.lineStart=n}};return b}):(e=t,Er({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}}));var e,k,C;function S(t,n,e,i,r,o,a,s,u,l,h,c,f,d){var p,_,m,g,v,y,b,x,w,M,L=a-t,T=s-n,P=L*L+T*T;4*C<P&&f--&&(m=o+c,w=Ve(m/=g=Kf((p=i+l)*p+(_=r+h)*_+m*m)),v=Ff(Ff(m)-1)<Nf||Ff(e-u)<Nf?(e+u)/2:Uf(_,p),y=(M=k(v,w))[0],b=M[1],(C<(M=T*(x=y-t)-L*(w=b-n))*M/P||.3<Ff((L*x+T*w)/P-.5)||i*l+r*h+o*c<Qd)&&(S(t,n,e,i,r,o,y,b,v,p/=g,_/=g,m,f,d),d.point(y,b),S(y,b,v,p,_,m,a,s,u,l,h,c,f,d)))}}function Dr(t){return Zr(function(){return t})()}function Zr(t){function e(t){return[(t=l(t[0]*Zf,t[1]*Zf))[0]*_+a,s-t[1]*_]}function n(t,n){return[(t=o(t,n))[0]*_+a,s-t[1]*_]}function i(){l=Ai(u=Ni(b,x,w),o);var t=o(v,y);return a=m-t[0]*_,s=g+t[1]*_,r()}function r(){return d=p=null,e}var o,a,s,u,l,h,c,f,d,p,_=150,m=480,g=250,v=0,y=0,b=0,x=0,w=0,M=null,L=vd,T=null,P=cr,k=.5,C=Rr(n,k);return e.stream=function(t){return d&&p===t?d:d=tp((e=u,Er({point:function(t,n){n=e(t,n);return this.stream.point(n[0],n[1])}})(L(C(P(p=t))))));var e},e.preclip=function(t){return arguments.length?(L=t,M=void 0,r()):L},e.postclip=function(t){return arguments.length?(P=t,T=h=c=f=null,r()):P},e.clipAngle=function(t){return arguments.length?(L=+t?Xi(M=t*Zf):(M=null,vd),r()):M*Df},e.clipExtent=function(t){return arguments.length?(P=null==t?(T=h=c=f=null,cr):Ki(T=+t[0][0],h=+t[0][1],c=+t[1][0],f=+t[1][1]),r()):null==T?null:[[T,h],[c,f]]},e.scale=function(t){return arguments.length?(_=+t,i()):_},e.translate=function(t){return arguments.length?(m=+t[0],g=+t[1],i()):[m,g]},e.center=function(t){return arguments.length?(v=t[0]%360*Zf,y=t[1]%360*Zf,i()):[v*Df,y*Df]},e.rotate=function(t){return arguments.length?(b=t[0]%360*Zf,x=t[1]%360*Zf,w=2<t.length?t[2]%360*Zf:0,i()):[b*Df,x*Df,w*Df]},e.precision=function(t){return arguments.length?(C=Rr(n,k=t*t),r()):Kf(k)},e.fitExtent=function(t,n){return Nr(e,t,n)},e.fitSize=function(t,n){return Ir(e,t,n)},e.fitWidth=function(t,n){return Or(e,t,n)},e.fitHeight=function(t,n){return Br(e,t,n)},function(){return o=t.apply(this,arguments),e.invert=o.invert&&function(t){return(t=l.invert((t[0]-a)/_,(s-t[1])/_))&&[t[0]*Df,t[1]*Df]},i()}}function Fr(t){var n=0,e=If/3,i=Zr(t),t=i(n,e);return t.parallels=function(t){return arguments.length?i(n=t[0]*Zf,e=t[1]*Zf):[n*Df,e*Df]},t}function jr(t,n){function e(t,n){n=Kf(s-2*o*Gf(n))/o;return[n*Gf(t*=o),u-n*qf(t)]}var i,r=Gf(t),o=(r+Gf(n))/2;if(Ff(o)<Nf)return i=qf(t),a.invert=function(t,n){return[t/i,Ve(n*i)]},a;function a(t,n){return[t*i,Gf(n)/i]}var s=1+r*(2*o-r),u=Kf(s)/o;return e.invert=function(t,n){n=u-n;return[Uf(t,Ff(n))/o*Xf(n),Ve((s-(t*t+n*n)*o*o)/(2*o))]},e}function Ur(){return Fr(jr).scale(155.424).center([0,33.6442])}function qr(){return Ur().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Wr(r){return function(t,n){var e=qf(t),i=qf(n),e=r(e*i);return[e*i*Gf(t),e*Gf(n)]}}function Hr(o){return function(t,n){var e=Kf(t*t+n*n),i=o(e),r=Gf(i),i=qf(i);return[Uf(t*r,e*i),Ve(e&&n*r/e)]}}function Vr(t,n){return[t,Vf($f((Of+n)/2))]}function Yr(e){function n(){var t=If*u(),n=a(Ri(a.rotate()).invert([0,0]));return h(null==c?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:e===Vr?[[Math.max(n[0]-t,c),i],[Math.min(n[0]+t,r),o]]:[[c,Math.max(n[1]-t,i)],[r,Math.min(n[1]+t,o)]])}var i,r,o,a=Dr(e),s=a.center,u=a.scale,l=a.translate,h=a.clipExtent,c=null;return a.scale=function(t){return arguments.length?(u(t),n()):u()},a.translate=function(t){return arguments.length?(l(t),n()):l()},a.center=function(t){return arguments.length?(s(t),n()):s()},a.clipExtent=function(t){return arguments.length?(null==t?c=i=r=o=null:(c=+t[0][0],i=+t[0][1],r=+t[1][0],o=+t[1][1]),n()):null==c?null:[[c,i],[r,o]]},n()}function Gr(t){return $f((Of+t)/2)}function Xr(t,n){function e(t,n){0<o?n<-Of+Nf&&(n=-Of+Nf):Of-Nf<n&&(n=Of-Nf);n=o/Yf(Gr(n),r);return[n*Gf(r*t),o-n*qf(r*t)]}var i=qf(t),r=t===n?Gf(t):Vf(i/qf(n))/Vf(Gr(n)/Gr(t)),o=i*Yf(Gr(t),r)/r;return r?(e.invert=function(t,n){var e=o-n,n=Xf(r)*Kf(t*t+e*e);return[Uf(t,Ff(e))/r*Xf(e),2*jf(Yf(o/n,1/r))-Of]},e):Vr}function Kr(t,n){return[t,n]}function $r(t,n){function e(t,n){n=o-n,t*=r;return[n*Gf(t),o-n*qf(t)]}var i=qf(t),r=t===n?Gf(t):(i-qf(n))/(n-t),o=i/r+t;return Ff(r)<Nf?Kr:(e.invert=function(t,n){n=o-n;return[Uf(t,Ff(n))/r*Xf(n),o-Xf(r)*Kf(t*t+n*n)]},e)}function Jr(t,n){var e=qf(n),i=qf(t)*e;return[e*Gf(t)/i,Gf(n)/i]}function Qr(e,i,r,o){return 1===e&&1===i&&0===r&&0===o?cr:Er({point:function(t,n){this.stream.point(t*e+r,n*i+o)}})}function to(t,n){var e=n*n,i=e*e;return[t*(.8707-.131979*e+i*(i*(.003971*e-.001529*i)-.013791)),n*(1.007226+e*(.015085+i*(.028874*e-.044475-.005916*i)))]}function no(t,n){return[qf(n)*Gf(t),Gf(n)]}function eo(t,n){var e=qf(n),i=1+qf(t)*e;return[e*Gf(t)/i,Gf(n)/i]}function io(t,n){return[Vf($f((Of+n)/2)),-t]}function ro(t,n){return t.parent===n.parent?1:2}function oo(t,n){return t+n.x}function ao(t,n){return Math.max(t,n.y)}function so(t){var n=0,e=t.children,i=e&&e.length;if(i)for(;0<=--i;)n+=e[i].value;else n=1;t.value=n}function uo(t,n){var e,i,r,o,a,s=new fo(t),u=+t.value&&(s.value=t.value),l=[s];for(null==n&&(n=lo);e=l.pop();)if(u&&(e.value=+e.data.value),(r=n(e.data))&&(a=r.length))for(e.children=new Array(a),o=a-1;0<=o;--o)l.push(i=e.children[o]=new fo(r[o])),i.parent=e,i.depth=e.depth+1;return s.eachBefore(co)}function lo(t){return t.children}function ho(t){t.data=t.data.data}function co(t){for(var n=0;t.height=n,(t=t.parent)&&t.height<++n;);}function fo(t){this.data=t,this.depth=this.height=0,this.parent=null}function po(t){for(var n,e,i=0,r=(t=function(t){for(var n,e,i=t.length;i;)e=Math.random()*i--|0,n=t[i],t[i]=t[e],t[e]=n;return t}(ip.call(t))).length,o=[];i<r;)n=t[i],e&&mo(e,n)?++i:(e=function(t){switch(t.length){case 1:return{x:(n=t[0]).x,y:n.y,r:n.r};case 2:return vo(t[0],t[1]);case 3:return yo(t[0],t[1],t[2])}var n}(o=function(t,n){var e,i;if(go(n,t))return[n];for(e=0;e<t.length;++e)if(_o(n,t[e])&&go(vo(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(i=e+1;i<t.length;++i)if(_o(vo(t[e],t[i]),n)&&_o(vo(t[e],n),t[i])&&_o(vo(t[i],n),t[e])&&go(yo(t[e],t[i],n),t))return[t[e],t[i],n];throw new Error}(o,n)),i=0);return e}function _o(t,n){var e=t.r-n.r,i=n.x-t.x,t=n.y-t.y;return e<0||e*e<i*i+t*t}function mo(t,n){var e=t.r-n.r+1e-6,i=n.x-t.x,t=n.y-t.y;return 0<e&&i*i+t*t<e*e}function go(t,n){for(var e=0;e<n.length;++e)if(!mo(t,n[e]))return;return 1}function vo(t,n){var e=t.x,i=t.y,r=t.r,o=n.x,a=n.y,s=n.r,u=o-e,l=a-i,t=s-r,n=Math.sqrt(u*u+l*l);return{x:(e+o+u/n*t)/2,y:(i+a+l/n*t)/2,r:(n+r+s)/2}}function yo(t,n,e){var i=t.x,r=t.y,o=t.r,a=n.x,s=n.y,u=n.r,l=e.x,h=e.y,c=e.r,f=i-a,d=i-l,p=r-s,_=r-h,t=u-o,n=c-o,e=i*i+r*r-o*o,u=e-a*a-s*s+u*u,l=e-l*l-h*h+c*c,h=d*p-f*_,c=(p*l-_*u)/(2*h)-i,p=(_*t-p*n)/h,l=(d*u-f*l)/(2*h)-r,d=(f*n-d*t)/h,t=p*p+d*d-1,h=2*(o+c*p+l*d),o=c*c+l*l-o*o,h=-(t?(h+Math.sqrt(h*h-4*t*o))/(2*t):o/h);return{x:i+c+p*h,y:r+l+d*h,r:h}}function bo(t,n,e){var i=t.x,r=t.y,o=n.r+e.r,a=t.r+e.r,s=n.x-i,u=n.y-r,t=s*s+u*u;t?(n=.5+((a*=a)-(o*=o))/(2*t),t=Math.sqrt(Math.max(0,2*o*(a+t)-(a-=t)*a-o*o))/(2*t),e.x=i+n*s+t*u,e.y=r+n*u-t*s):(e.x=i+a,e.y=r)}function xo(t,n){var e=n.x-t.x,i=n.y-t.y,n=t.r+n.r;return e*e+i*i<n*n-1e-6}function wo(t){var n=t._,e=t.next._,i=n.r+e.r,t=(n.x*e.r+e.x*n.r)/i,i=(n.y*e.r+e.y*n.r)/i;return t*t+i*i}function Mo(t){this._=t,this.next=null,this.previous=null}function Lo(t){if(!(i=t.length))return 0;var n,e,i,r,o,a,s,u,l,h,c=t[0];if(c.x=0,c.y=0,!(1<i))return c.r;if(n=t[1],c.x=-n.r,n.x=c.r,n.y=0,!(2<i))return c.r+n.r;bo(n,c,e=t[2]),c=new Mo(c),n=new Mo(n),e=new Mo(e),((c.next=e.previous=n).next=c.previous=e).next=n.previous=c;t:for(a=3;a<i;++a){bo(c._,n._,e=t[a]),e=new Mo(e),s=n.next,u=c.previous,l=n._.r,h=c._.r;do{if(l<=h){if(xo(s._,e._)){n=s,(c.next=n).previous=c,--a;continue t}l+=s._.r,s=s.next}else{if(xo(u._,e._)){((c=u).next=n).previous=c,--a;continue t}h+=u._.r,u=u.previous}}while(s!==u.next);for(e.previous=c,e.next=n,c.next=n.previous=n=e,r=wo(c);(e=e.next)!==n;)(o=wo(e))<r&&(c=e,r=o);n=c.next}for(c=[n._],e=n;(e=e.next)!==n;)c.push(e._);for(e=po(c),a=0;a<i;++a)(c=t[a]).x-=e.x,c.y-=e.y;return e.r}function To(t){if("function"!=typeof t)throw new Error;return t}function Po(){return 0}function ko(t){return function(){return t}}function Co(t){return Math.sqrt(t.value)}function So(n){return function(t){t.children||(t.r=Math.max(0,+n(t)||0))}}function Eo(a,s){return function(t){if(n=t.children){var n,e,i,r=n.length,o=a(t)*s||0;if(o)for(e=0;e<r;++e)n[e].r+=o;if(i=Lo(n),o)for(e=0;e<r;++e)n[e].r-=o;t.r=i+o}}}function Ao(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function zo(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function No(t,n,e,i,r){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).y0=e,o.y1=r,o.x0=n,o.x1=n+=o.value*l}function Io(t){return t.id}function Oo(t){return t.parentId}function Bo(t,n){return t.parent===n.parent?1:2}function Ro(t){var n=t.children;return n?n[0]:t.t}function Do(t){var n=t.children;return n?n[n.length-1]:t.t}function Zo(t,n){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function Fo(t,n,e,i,r){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).x0=n,o.x1=i,o.y0=e,o.y1=e+=o.value*l}function jo(t,n,e,i,r,o){for(var a,s,u,l,h,c,f,d,p,_,m,g=[],v=n.children,y=0,b=0,x=v.length,w=n.value;y<x;){for(u=r-e,l=o-i;h=v[b++].value,!h&&b<x;);for(m=(c=f=h)*h*(_=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/m,m/c);b<x;++b){if(h+=s=v[b].value,s<c&&(c=s),f<s&&(f=s),m=h*h*_,(d=Math.max(f/m,m/c))>p){h-=s;break}p=d}g.push(a={value:h,dice:u<l,children:v.slice(y,b)}),a.dice?No(a,e,i,r,w?i+=l*h/w:o):Fo(a,e,i,w?e+=u*h/w:r,o),w-=h,y=b}return g}function Uo(t,n){return t[0]-n[0]||t[1]-n[1]}function qo(t){for(var n,e,i,r=t.length,o=[0,1],a=2,s=2;s<r;++s){for(;1<a&&(n=t[o[a-2]],e=t[o[a-1]],i=t[s],(e[0]-n[0])*(i[1]-n[1])-(e[1]-n[1])*(i[0]-n[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function Wo(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function Ho(n){if(!n._start)try{!function(t){for(;t._start=t._waiting&&t._active<t._size;){var n=t._ended+t._active,e=t._tasks[n],i=e.length-1,r=e[i];e[i]=function(e,i){return function(t,n){e._tasks[i]&&(--e._active,++e._ended,(e._tasks[i]=null)==e._error&&(null!=t?Vo(e,t):(e._data[i]=n,(e._waiting?Ho:Yo)(e))))}}(t,n),--t._waiting,++t._active,e=r.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||hp)}}(n)}catch(t){if(n._tasks[n._ended+n._active-1])Vo(n,t);else if(!n._data)throw t}}function Vo(t,n){var e,i=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;0<=--i;)if((e=t._tasks[i])&&(t._tasks[i]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,Yo(t)}function Yo(t){var n;!t._active&&t._call&&(n=t._data,t._data=void 0,t._call(t._error,n))}function Go(t){if(null==t)t=1/0;else if(!(1<=(t=+t)))throw new Error("invalid concurrency");return new Wo(t)}function Xo(){return Math.random()}function Ko(r,t){function n(t){var n,e,i=c.status;if(!i&&((e=c.responseType)&&"text"!==e?c.response:c.responseText)||200<=i&&i<300||304===i){if(s)try{n=s.call(o,c)}catch(t){return void l.call("error",o,t)}else n=c;l.call("load",o,n)}else l.call("error",o,t)}var o,a,s,u,l=z("beforesend","progress","load","error"),h=se(),c=new XMLHttpRequest,f=null,d=null,p=0;if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(r)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=n:c.onreadystatechange=function(t){3<c.readyState&&n(t)},c.onprogress=function(t){l.call("progress",o,t)},o={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?h.get(t):(null==n?h.remove(t):h.set(t,n+""),o)},mimeType:function(t){return arguments.length?(a=null==t?null:t+"",o):a},responseType:function(t){return arguments.length?(u=t,o):u},timeout:function(t){return arguments.length?(p=+t,o):p},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",o)},password:function(t){return arguments.length<1?d:(d=null==t?null:t+"",o)},response:function(t){return s=t,o},get:function(t,n){return o.send("GET",t,n)},post:function(t,n){return o.send("POST",t,n)},send:function(t,n,e){return c.open(t,r,!0,f,d),null==a||h.has("accept")||h.set("accept",a+",*/*"),c.setRequestHeader&&h.each(function(t,n){c.setRequestHeader(n,t)}),null!=a&&c.overrideMimeType&&c.overrideMimeType(a),null!=u&&(c.responseType=u),0<p&&(c.timeout=p),null==e&&"function"==typeof n&&(e=n,n=null),null!=e&&1===e.length&&(i=e,e=function(t,n){i(null==t?n:null)}),null!=e&&o.on("error",e).on("load",function(t){e(null,t)}),l.call("beforesend",o,c),c.send(null==n?null:n),o;var i},abort:function(){return c.abort(),o},on:function(){var t=l.on.apply(l,arguments);return t===l?o:t}},null==t)return o;if("function"!=typeof t)throw new Error("invalid callback: "+t);return o.get(t)}function $o(e,i){return function(t,n){t=Ko(t).mimeType(e).response(i);if(null==n)return t;if("function"!=typeof n)throw new Error("invalid callback: "+n);return t.get(n)}}function Jo(e,o){return function(t,i,n){arguments.length<3&&(n=i,i=null);var r=Ko(t).mimeType(e);return r.row=function(t){return arguments.length?r.response((n=o,e=i=t,function(t){return n(t.responseText,e)})):i;var n,e},r.row(i),n?r.get(n):r}}function Qo(i){function o(t){var n=t+"",e=a.get(n);if(!e){if(r!==Pp)return r;a.set(n,e=s.push(t))}return i[(e-1)%i.length]}var a=se(),s=[],r=Pp;return i=null==i?[]:Tp.call(i),o.domain=function(t){if(!arguments.length)return s.slice();s=[],a=se();for(var n,e,i=-1,r=t.length;++i<r;)a.has(e=(n=t[i])+"")||a.set(e,s.push(n));return o},o.range=function(t){return arguments.length?(i=Tp.call(t),o):i.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return Qo().domain(s).range(i).unknown(r)},o}function ta(){function n(){var t=a().length,n=u[1]<u[0],e=u[+n],i=u[1-n];r=(i-e)/Math.max(1,t-h+2*c),l&&(r=Math.floor(r)),e+=(i-e-r*(t-h))*f,o=r*(1-h),l&&(e=Math.round(e),o=Math.round(o));t=T(t).map(function(t){return e+r*t});return s(n?t.reverse():t)}var r,o,t=Qo().unknown(void 0),a=t.domain,s=t.range,u=[0,1],l=!1,h=0,c=0,f=.5;return delete t.unknown,t.domain=function(t){return arguments.length?(a(t),n()):a()},t.range=function(t){return arguments.length?(u=[+t[0],+t[1]],n()):u.slice()},t.rangeRound=function(t){return u=[+t[0],+t[1]],l=!0,n()},t.bandwidth=function(){return o},t.step=function(){return r},t.round=function(t){return arguments.length?(l=!!t,n()):l},t.padding=function(t){return arguments.length?(h=c=Math.max(0,Math.min(1,t)),n()):h},t.paddingInner=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),n()):h},t.paddingOuter=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),n()):c},t.align=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),n()):f},t.copy=function(){return ta().domain(a()).range(u).round(l).paddingInner(h).paddingOuter(c).align(f)},n()}function na(t){return function(){return t}}function ea(t){return+t}function ia(n,e){return(e-=n=+n)?function(t){return(t-n)/e}:na(e)}function ra(t,n,e,i){var r=t[0],t=t[1],o=n[0],n=n[1],o=t<r?(r=e(t,r),i(n,o)):(r=e(r,t),i(o,n));return function(t){return o(r(t))}}function oa(e,t,n,i){var r=Math.min(e.length,t.length)-1,o=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)o[s]=n(e[s],e[s+1]),a[s]=i(t[s],t[s+1]);return function(t){var n=vl(e,t,1,r)-1;return a[n](o[n](t))}}function aa(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function sa(n,e){function i(){return o=2<Math.min(u.length,l.length)?oa:ra,a=s=null,t}function t(t){return(a=a||o(u,l,c?(r=n,function(n,e){var i=r(n=+n,e=+e);return function(t){return t<=n?0:e<=t?1:i(t)}}):n,h))(+t);var r}var o,a,s,u=kp,l=kp,h=hn,c=!1;return t.invert=function(t){return(s=s||o(l,u,ia,c?(r=e,function(n,e){var i=r(n=+n,e=+e);return function(t){return t<=0?n:1<=t?e:i(t)}}):e))(+t);var r},t.domain=function(t){return arguments.length?(u=Lp.call(t,ea),i()):u.slice()},t.range=function(t){return arguments.length?(l=Tp.call(t),i()):l.slice()},t.rangeRound=function(t){return l=Tp.call(t),h=cn,i()},t.clamp=function(t){return arguments.length?(c=!!t,i()):c},t.interpolate=function(t){return arguments.length?(h=t,i()):h},i()}function ua(s){var u=s.domain;return s.ticks=function(t){var n=u();return p(n[0],n[n.length-1],null==t?10:t)},s.tickFormat=function(s,t){return function(t,n){var e,i=t[0],r=t[t.length-1],o=P(i,r,null==s?10:s);switch((n=Ie(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(i),Math.abs(r));return null!=n.precision||isNaN(e=Fe(o,a))||(n.precision=e),F.formatPrefix(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(e=je(o,Math.max(Math.abs(i),Math.abs(r))))||(n.precision=e-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(e=Ze(o))||(n.precision=e-2*("%"===n.type))}return F.format(n)}(u(),t)},s.nice=function(t){null==t&&(t=10);var n,e=u(),i=0,r=e.length-1,o=e[i],a=e[r];return a<o&&(n=o,o=a,a=n,n=i,i=r,r=n),0<(n=c(o,a,t))?n=c(o=Math.floor(o/n)*n,a=Math.ceil(a/n)*n,t):n<0&&(n=c(o=Math.ceil(o*n)/n,a=Math.floor(a*n)/n,t)),0<n?(e[i]=Math.floor(o/n)*n,e[r]=Math.ceil(a/n)*n,u(e)):n<0&&(e[i]=Math.ceil(o*n)/n,e[r]=Math.floor(a*n)/n,u(e)),s},s}function la(t,n){var e,i=0,r=(t=t.slice()).length-1,o=t[i],a=t[r];return a<o&&(e=i,i=r,r=e,e=o,o=a,a=e),t[i]=n.floor(o),t[r]=n.ceil(a),t}function ha(n,e){return(e=Math.log(e/n))?function(t){return Math.log(t/n)/e}:na(e)}function ca(n,e){return n<0?function(t){return-Math.pow(-e,t)*Math.pow(-n,1-t)}:function(t){return Math.pow(e,t)*Math.pow(n,1-t)}}function fa(t){return isFinite(t)?+("1e"+t):t<0?0:t}function da(n){return 10===n?fa:n===Math.E?Math.exp:function(t){return Math.pow(n,t)}}function pa(n){return n===Math.E?Math.log:10===n&&Math.log10||2===n&&Math.log2||(n=Math.log(n),function(t){return Math.log(t)/n})}function _a(n){return function(t){return-n(-t)}}function ma(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function ga(){var i=1,t=sa(function(n,e){return(e=ma(e,i)-(n=ma(n,i)))?function(t){return(ma(t,i)-n)/e}:na(e)},function(n,e){return e=ma(e,i)-(n=ma(n,i)),function(t){return ma(n+e*t,1/i)}}),n=t.domain;return t.exponent=function(t){return arguments.length?(i=+t,n(n())):i},t.copy=function(){return aa(t,ga().exponent(i))},ua(t)}function va(o,a,e,i){function s(t){return o(t=new Date(+t)),t}return(s.floor=s).ceil=function(t){return o(t=new Date(t-1)),a(t,1),o(t),t},s.round=function(t){var n=s(t),e=s.ceil(t);return t-n<e-t?n:e},s.offset=function(t,n){return a(t=new Date(+t),null==n?1:Math.floor(n)),t},s.range=function(t,n,e){var i,r=[];if(t=s.ceil(t),e=null==e?1:Math.floor(e),!(t<n&&0<e))return r;for(;r.push(i=new Date(+t)),a(t,e),o(t),i<t&&t<n;);return r},s.filter=function(e){return va(function(t){if(t<=t)for(;o(t),!e(t);)t.setTime(t-1)},function(t,n){if(t<=t)if(n<0)for(;++n<=0;)for(;a(t,-1),!e(t););else for(;0<=--n;)for(;a(t,1),!e(t););})},e&&(s.count=function(t,n){return Cp.setTime(+t),Sp.setTime(+n),o(Cp),o(Sp),Math.floor(e(Cp,Sp))},s.every=function(n){return n=Math.floor(n),isFinite(n)&&0<n?1<n?s.filter(i?function(t){return i(t)%n==0}:function(t){return s.count(0,t)%n==0}):s:null}),s}function ya(n){return va(function(t){t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5})}function ba(n){return va(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/6048e5})}function xa(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function wa(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ma(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function La(t){function e(u,l){return function(t){var n,e,i,r=[],o=-1,a=0,s=u.length;for(t instanceof Date||(t=new Date(+t));++o<s;)37===u.charCodeAt(o)&&(r.push(u.slice(a,o)),null!=(e=S_[n=u.charAt(++o)])?n=u.charAt(++o):e="e"===n?" ":"0",(i=l[n])&&(n=i(t,e)),r.push(n),a=o+1);return r.push(u.slice(a,o)),r.join("")}}function i(r,o){return function(t){var n,e,i=Ma(1900);if(a(i,r,t+="",0)!=t.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||53<i.V)return null;"w"in i||(i.w=1),"Z"in i?(n=4<(e=(n=wa(Ma(i.y))).getUTCDay())||0===e?c_.ceil(n):c_(n),n=u_.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(n=4<(e=(n=o(Ma(i.y))).getDay())||0===e?jp.ceil(n):jp(n),n=Dp.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),e="Z"in i?wa(Ma(i.y)).getUTCDay():o(Ma(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(e+5)%7:i.w+7*i.U-(e+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,wa(i)):o(i)}}function a(t,n,e,i){for(var r,o,a=0,s=n.length,u=e.length;a<s;){if(u<=i)return-1;if(37===(r=n.charCodeAt(a++))){if(r=n.charAt(a++),!(o=L[r in S_?n.charAt(a++):r])||(i=o(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}var r=t.dateTime,o=t.date,s=t.time,n=t.periods,u=t.days,l=t.shortDays,h=t.months,c=t.shortMonths,f=ka(n),d=Ca(n),p=ka(u),_=Ca(u),m=ka(l),g=Ca(l),v=ka(h),y=Ca(h),b=ka(c),x=Ca(c),w={a:function(t){return l[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return h[t.getMonth()]},c:null,d:Ga,e:Ga,f:Qa,H:Xa,I:Ka,j:$a,L:Ja,m:ts,M:ns,p:function(t){return n[+(12<=t.getHours())]},Q:Ss,s:Es,S:es,u:is,U:rs,V:os,w:as,W:ss,x:null,X:null,y:us,Y:ls,Z:hs,"%":Cs},M={a:function(t){return l[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:cs,e:cs,f:ms,H:fs,I:ds,j:ps,L:_s,m:gs,M:vs,p:function(t){return n[+(12<=t.getUTCHours())]},Q:Ss,s:Es,S:ys,u:bs,U:xs,V:ws,w:Ms,W:Ls,x:null,X:null,y:Ts,Y:Ps,Z:ks,"%":Cs},L={a:function(t,n,e){n=m.exec(n.slice(e));return n?(t.w=g[n[0].toLowerCase()],e+n[0].length):-1},A:function(t,n,e){n=p.exec(n.slice(e));return n?(t.w=_[n[0].toLowerCase()],e+n[0].length):-1},b:function(t,n,e){n=b.exec(n.slice(e));return n?(t.m=x[n[0].toLowerCase()],e+n[0].length):-1},B:function(t,n,e){n=v.exec(n.slice(e));return n?(t.m=y[n[0].toLowerCase()],e+n[0].length):-1},c:function(t,n,e){return a(t,r,n,e)},d:Da,e:Da,f:Wa,H:Fa,I:Fa,j:Za,L:qa,m:Ra,M:ja,p:function(t,n,e){n=f.exec(n.slice(e));return n?(t.p=d[n[0].toLowerCase()],e+n[0].length):-1},Q:Va,s:Ya,S:Ua,u:Ea,U:Aa,V:za,w:Sa,W:Na,x:function(t,n,e){return a(t,o,n,e)},X:function(t,n,e){return a(t,s,n,e)},y:Oa,Y:Ia,Z:Ba,"%":Ha};return w.x=e(o,w),w.X=e(s,w),w.c=e(r,w),M.x=e(o,M),M.X=e(s,M),M.c=e(r,M),{format:function(t){var n=e(t+="",w);return n.toString=function(){return t},n},parse:function(t){var n=i(t+="",xa);return n.toString=function(){return t},n},utcFormat:function(t){var n=e(t+="",M);return n.toString=function(){return t},n},utcParse:function(t){var n=i(t,wa);return n.toString=function(){return t},n}}}function Ta(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",t=r.length;return i+(t<e?new Array(e-t+1).join(n)+r:r)}function Pa(t){return t.replace(z_,"\\$&")}function ka(t){return new RegExp("^(?:"+t.map(Pa).join("|")+")","i")}function Ca(t){for(var n={},e=-1,i=t.length;++e<i;)n[t[e].toLowerCase()]=e;return n}function Sa(t,n,e){n=E_.exec(n.slice(e,e+1));return n?(t.w=+n[0],e+n[0].length):-1}function Ea(t,n,e){n=E_.exec(n.slice(e,e+1));return n?(t.u=+n[0],e+n[0].length):-1}function Aa(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.U=+n[0],e+n[0].length):-1}function za(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.V=+n[0],e+n[0].length):-1}function Na(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.W=+n[0],e+n[0].length):-1}function Ia(t,n,e){n=E_.exec(n.slice(e,e+4));return n?(t.y=+n[0],e+n[0].length):-1}function Oa(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.y=+n[0]+(68<+n[0]?1900:2e3),e+n[0].length):-1}function Ba(t,n,e){n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),e+n[0].length):-1}function Ra(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.m=n[0]-1,e+n[0].length):-1}function Da(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.d=+n[0],e+n[0].length):-1}function Za(t,n,e){n=E_.exec(n.slice(e,e+3));return n?(t.m=0,t.d=+n[0],e+n[0].length):-1}function Fa(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.H=+n[0],e+n[0].length):-1}function ja(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.M=+n[0],e+n[0].length):-1}function Ua(t,n,e){n=E_.exec(n.slice(e,e+2));return n?(t.S=+n[0],e+n[0].length):-1}function qa(t,n,e){n=E_.exec(n.slice(e,e+3));return n?(t.L=+n[0],e+n[0].length):-1}function Wa(t,n,e){n=E_.exec(n.slice(e,e+6));return n?(t.L=Math.floor(n[0]/1e3),e+n[0].length):-1}function Ha(t,n,e){n=A_.exec(n.slice(e,e+1));return n?e+n[0].length:-1}function Va(t,n,e){n=E_.exec(n.slice(e));return n?(t.Q=+n[0],e+n[0].length):-1}function Ya(t,n,e){n=E_.exec(n.slice(e));return n?(t.Q=1e3*+n[0],e+n[0].length):-1}function Ga(t,n){return Ta(t.getDate(),n,2)}function Xa(t,n){return Ta(t.getHours(),n,2)}function Ka(t,n){return Ta(t.getHours()%12||12,n,2)}function $a(t,n){return Ta(1+Dp.count(e_(t),t),n,3)}function Ja(t,n){return Ta(t.getMilliseconds(),n,3)}function Qa(t,n){return Ja(t,n)+"000"}function ts(t,n){return Ta(t.getMonth()+1,n,2)}function ns(t,n){return Ta(t.getMinutes(),n,2)}function es(t,n){return Ta(t.getSeconds(),n,2)}function is(t){t=t.getDay();return 0===t?7:t}function rs(t,n){return Ta(Fp.count(e_(t),t),n,2)}function os(t,n){var e=t.getDay();return t=4<=e||0===e?Wp(t):Wp.ceil(t),Ta(Wp.count(e_(t),t)+(4===e_(t).getDay()),n,2)}function as(t){return t.getDay()}function ss(t,n){return Ta(jp.count(e_(t),t),n,2)}function us(t,n){return Ta(t.getFullYear()%100,n,2)}function ls(t,n){return Ta(t.getFullYear()%1e4,n,4)}function hs(t){t=t.getTimezoneOffset();return(0<t?"-":(t*=-1,"+"))+Ta(t/60|0,"0",2)+Ta(t%60,"0",2)}function cs(t,n){return Ta(t.getUTCDate(),n,2)}function fs(t,n){return Ta(t.getUTCHours(),n,2)}function ds(t,n){return Ta(t.getUTCHours()%12||12,n,2)}function ps(t,n){return Ta(1+u_.count(P_(t),t),n,3)}function _s(t,n){return Ta(t.getUTCMilliseconds(),n,3)}function ms(t,n){return _s(t,n)+"000"}function gs(t,n){return Ta(t.getUTCMonth()+1,n,2)}function vs(t,n){return Ta(t.getUTCMinutes(),n,2)}function ys(t,n){return Ta(t.getUTCSeconds(),n,2)}function bs(t){t=t.getUTCDay();return 0===t?7:t}function xs(t,n){return Ta(h_.count(P_(t),t),n,2)}function ws(t,n){var e=t.getUTCDay();return t=4<=e||0===e?p_(t):p_.ceil(t),Ta(p_.count(P_(t),t)+(4===P_(t).getUTCDay()),n,2)}function Ms(t){return t.getUTCDay()}function Ls(t,n){return Ta(c_.count(P_(t),t),n,2)}function Ts(t,n){return Ta(t.getUTCFullYear()%100,n,2)}function Ps(t,n){return Ta(t.getUTCFullYear()%1e4,n,4)}function ks(){return"+0000"}function Cs(){return"%"}function Ss(t){return+t}function Es(t){return Math.floor(+t/1e3)}function As(t){return k_=La(t),F.timeFormat=k_.format,F.timeParse=k_.parse,F.utcFormat=k_.utcFormat,F.utcParse=k_.utcParse,k_}function zs(t){return new Date(t)}function Ns(t){return t instanceof Date?+t:+new Date(+t)}function Is(a,n,e,i,r,o,s,u,l){function h(t){return(s(t)<t?_:o(t)<t?m:r(t)<t?g:i(t)<t?v:n(t)<t?e(t)<t?y:b:a(t)<t?x:w)(t)}function c(t,n,e,i){var r,o;return null==t&&(t=10),"number"==typeof t&&(r=Math.abs(e-n)/t,t=(o=L(function(t){return t[2]}).right(M,r))===M.length?(i=P(n/U_,e/U_,t),a):o?(i=(o=M[r/M[o-1][2]<M[o][2]/r?o-1:o])[1],o[0]):(i=Math.max(P(n,e,t),1),u)),null==i?t:t.every(i)}var f=sa(ia,sn),d=f.invert,p=f.domain,_=l(".%L"),m=l(":%S"),g=l("%I:%M"),v=l("%I %p"),y=l("%a %d"),b=l("%b %d"),x=l("%B"),w=l("%Y"),M=[[s,1,B_],[s,5,5*B_],[s,15,15*B_],[s,30,30*B_],[o,1,R_],[o,5,5*R_],[o,15,15*R_],[o,30,30*R_],[r,1,D_],[r,3,3*D_],[r,6,6*D_],[r,12,12*D_],[i,1,Z_],[i,2,2*Z_],[e,1,F_],[n,1,j_],[n,3,3*j_],[a,1,U_]];return f.invert=function(t){return new Date(d(t))},f.domain=function(t){return arguments.length?p(Lp.call(t,Ns)):p().map(zs)},f.ticks=function(t,n){var e,i=p(),r=i[0],o=i[i.length-1],i=o<r;return i&&(e=r,r=o,o=e),e=(e=c(t,r,o,n))?e.range(r,o+1):[],i?e.reverse():e},f.tickFormat=function(t,n){return null==n?h:l(n)},f.nice=function(t,n){var e=p();return(t=c(t,e[0],e[e.length-1],n))?p(la(e,t)):f},f.copy=function(){return aa(f,Is(a,n,e,i,r,o,s,u,l))},f}function Os(t){return t.match(/.{6}/g).map(function(t){return"#"+t})}function Bs(n){var e=n.length;return function(t){return n[Math.max(0,Math.min(e-1,Math.floor(t*e)))]}}function Rs(t){return function(){return t}}function Ds(t){return 1<=t?um:t<=-1?-um:Math.asin(t)}function Zs(t){return t.innerRadius}function Fs(t){return t.outerRadius}function js(t){return t.startAngle}function Us(t){return t.endAngle}function qs(t){return t&&t.padAngle}function Ws(t,n,e,i,r,o,a){var s=t-e,u=n-i,l=(a?o:-o)/om(s*s+u*u),h=l*u,c=-l*s,f=t+h,d=n+c,a=e+h,u=i+c,l=(f+a)/2,s=(d+u)/2,t=a-f,n=u-d,e=t*t+n*n,i=r-o,o=f*u-a*d,f=(n<0?-1:1)*om(em(0,i*i*e-o*o)),u=(o*n-t*f)/e,a=(-o*t-n*f)/e,d=(o*n+t*f)/e,n=(-o*t+n*f)/e,f=u-l,e=a-s,l=d-l,s=n-s;return l*l+s*s<f*f+e*e&&(u=d,a=n),{cx:u,cy:a,x01:-h,y01:-c,x11:u*(r/i-1),y11:a*(r/i-1)}}function Hs(t){this._context=t}function Vs(t){return new Hs(t)}function Ys(t){return t[0]}function Gs(t){return t[1]}function Xs(){function n(t){var n,e,i,r=t.length,o=!1;for(null==l&&(c=h(i=te())),n=0;n<=r;++n)!(n<r&&u(e=t[n],n,t))===o&&((o=!o)?c.lineStart():c.lineEnd()),o&&c.point(+a(e,n,t),+s(e,n,t));if(i)return c=null,i+""||null}var a=Ys,s=Gs,u=Rs(!0),l=null,h=Vs,c=null;return n.x=function(t){return arguments.length?(a="function"==typeof t?t:Rs(+t),n):a},n.y=function(t){return arguments.length?(s="function"==typeof t?t:Rs(+t),n):s},n.defined=function(t){return arguments.length?(u="function"==typeof t?t:Rs(!!t),n):u},n.curve=function(t){return arguments.length?(h=t,null!=l&&(c=h(l)),n):h},n.context=function(t){return arguments.length?(null==t?l=c=null:c=h(l=t),n):l},n}function Ks(){function n(t){var n,e,i,r,o,a=t.length,s=!1,u=new Array(a),l=new Array(a);for(null==_&&(g=m(o=te())),n=0;n<=a;++n){if(!(n<a&&p(r=t[n],n,t))===s)if(s=!s)e=n,g.areaStart(),g.lineStart();else{for(g.lineEnd(),g.lineStart(),i=n-1;e<=i;--i)g.point(u[i],l[i]);g.lineEnd(),g.areaEnd()}s&&(u[n]=+h(r,n,t),l[n]=+f(r,n,t),g.point(c?+c(r,n,t):u[n],d?+d(r,n,t):l[n]))}if(o)return g=null,o+""||null}function t(){return Xs().defined(p).curve(m).context(_)}var h=Ys,c=null,f=Rs(0),d=Gs,p=Rs(!0),_=null,m=Vs,g=null;return n.x=function(t){return arguments.length?(h="function"==typeof t?t:Rs(+t),c=null,n):h},n.x0=function(t){return arguments.length?(h="function"==typeof t?t:Rs(+t),n):h},n.x1=function(t){return arguments.length?(c=null==t?null:"function"==typeof t?t:Rs(+t),n):c},n.y=function(t){return arguments.length?(f="function"==typeof t?t:Rs(+t),d=null,n):f},n.y0=function(t){return arguments.length?(f="function"==typeof t?t:Rs(+t),n):f},n.y1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Rs(+t),n):d},n.lineX0=n.lineY0=function(){return t().x(h).y(f)},n.lineY1=function(){return t().x(h).y(d)},n.lineX1=function(){return t().x(c).y(f)},n.defined=function(t){return arguments.length?(p="function"==typeof t?t:Rs(!!t),n):p},n.curve=function(t){return arguments.length?(m=t,null!=_&&(g=m(_)),n):m},n.context=function(t){return arguments.length?(null==t?_=g=null:g=m(_=t),n):_},n}function $s(t,n){return n<t?-1:t<n?1:t<=n?0:NaN}function Js(t){return t}function Qs(t){this._curve=t}function tu(n){function t(t){return new Qs(n(t))}return t._curve=n,t}function nu(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(tu(t)):n()._curve},t}function eu(){return nu(Xs().curve(hm))}function iu(){var t=Ks().curve(hm),n=t.curve,e=t.lineX0,i=t.lineX1,r=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return nu(e())},delete t.lineX0,t.lineEndAngle=function(){return nu(i())},delete t.lineX1,t.lineInnerRadius=function(){return nu(r())},delete t.lineY0,t.lineOuterRadius=function(){return nu(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(tu(t)):n()._curve},t}function ru(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}function ou(t){return t.source}function au(t){return t.target}function su(r){function n(){var t,n=cm.call(arguments),e=o.apply(this,n),i=a.apply(this,n);if(l=l||(t=te()),r(l,+s.apply(this,(n[0]=e,n)),+u.apply(this,n),+s.apply(this,(n[0]=i,n)),+u.apply(this,n)),t)return l=null,t+""||null}var o=ou,a=au,s=Ys,u=Gs,l=null;return n.source=function(t){return arguments.length?(o=t,n):o},n.target=function(t){return arguments.length?(a=t,n):a},n.x=function(t){return arguments.length?(s="function"==typeof t?t:Rs(+t),n):s},n.y=function(t){return arguments.length?(u="function"==typeof t?t:Rs(+t),n):u},n.context=function(t){return arguments.length?(l=null==t?null:t,n):l},n}function uu(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function lu(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+r)/2,i,e,i,r)}function hu(t,n,e,i,r){var o=ru(n,e),n=ru(n,e=(e+r)/2),e=ru(i,e),r=ru(i,r);t.moveTo(o[0],o[1]),t.bezierCurveTo(n[0],n[1],e[0],e[1],r[0],r[1])}function cu(){}function fu(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function du(t){this._context=t}function pu(t){this._context=t}function _u(t){this._context=t}function mu(t,n){this._basis=new du(t),this._beta=n}function gu(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function vu(t,n){this._context=t,this._k=(1-n)/6}function yu(t,n){this._context=t,this._k=(1-n)/6}function bu(t,n){this._context=t,this._k=(1-n)/6}function xu(t,n,e){var i,r,o=t._x1,a=t._y1,s=t._x2,u=t._y2;t._l01_a>am&&(i=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,r=3*t._l01_a*(t._l01_a+t._l12_a),o=(o*i-t._x0*t._l12_2a+t._x2*t._l01_2a)/r,a=(a*i-t._y0*t._l12_2a+t._y2*t._l01_2a)/r),t._l23_a>am&&(i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,r=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*i+t._x1*t._l23_2a-n*t._l12_2a)/r,u=(u*i+t._y1*t._l23_2a-e*t._l12_2a)/r),t._context.bezierCurveTo(o,a,s,u,t._x2,t._y2)}function wu(t,n){this._context=t,this._alpha=n}function Mu(t,n){this._context=t,this._alpha=n}function Lu(t,n){this._context=t,this._alpha=n}function Tu(t){this._context=t}function Pu(t){return t<0?-1:1}function ku(t,n,e){var i=t._x1-t._x0,r=n-t._x1,n=(t._y1-t._y0)/(i||r<0&&-0),t=(e-t._y1)/(r||i<0&&-0),r=(n*r+t*i)/(i+r);return(Pu(n)+Pu(t))*Math.min(Math.abs(n),Math.abs(t),.5*Math.abs(r))||0}function Cu(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Su(t,n,e){var i=t._x0,r=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,r+s*n,o-s,a-s*e,o,a)}function Eu(t){this._context=t}function Au(t){this._context=new zu(t)}function zu(t){this._context=t}function Nu(t){this._context=t}function Iu(t){var n,e,i=t.length-1,r=new Array(i),o=new Array(i),a=new Array(i);for(o[r[0]=0]=2,a[0]=t[0]+2*t[1],n=1;n<i-1;++n)r[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(r[i-1]=2,o[i-1]=7,a[i-1]=8*t[i-1]+t[i],n=1;n<i;++n)e=r[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(r[i-1]=a[i-1]/o[i-1],n=i-2;0<=n;--n)r[n]=(a[n]-r[n+1])/o[n];for(o[i-1]=(t[i]+r[i-1])/2,n=0;n<i-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function Ou(t,n){this._context=t,this._t=n}function Bu(t,n){if(1<(r=t.length))for(var e,i,r,o=1,a=t[n[0]],s=a.length;o<r;++o)for(i=a,a=t[n[o]],e=0;e<s;++e)a[e][1]+=a[e][0]=isNaN(i[e][1])?i[e][0]:i[e][1]}function Ru(t){for(var n=t.length,e=new Array(n);0<=--n;)e[n]=n;return e}function Du(t,n){return t[n]}function Zu(t){var e=t.map(Fu);return Ru(t).sort(function(t,n){return e[t]-e[n]})}function Fu(t){for(var n,e=0,i=-1,r=t.length;++i<r;)(n=+t[i][1])&&(e+=n);return e}function ju(t){return function(){return t}}function Uu(t){return t[0]}function qu(t){return t[1]}function Wu(){this._=null}function Hu(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Vu(t,n){var e=n,i=n.R,n=e.U;n?n.L===e?n.L=i:n.R=i:t._=i,i.U=n,e.U=i,e.R=i.L,e.R&&(e.R.U=e),i.L=e}function Yu(t,n){var e=n,i=n.L,n=e.U;n?n.L===e?n.L=i:n.R=i:t._=i,i.U=n,e.U=i,e.L=i.R,e.L&&(e.L.U=e),i.R=e}function Gu(t){for(;t.L;)t=t.L;return t}function Xu(t,n,e,i){var r=[null,null],o=Pm.push(r)-1;return r.left=t,r.right=n,e&&$u(r,t,n,e),i&&$u(r,n,t,i),Lm[t.index].halfedges.push(o),Lm[n.index].halfedges.push(o),r}function Ku(t,n,e){e=[n,e];return e.left=t,e}function $u(t,n,e,i){t[0]||t[1]?t.left===e?t[1]=i:t[0]=i:(t[0]=i,t.left=n,t.right=e)}function Ju(t,n){return n[+(n.left!==t.site)]}function Qu(t){var n=t.P,e=t.N;if(n&&e){var i=n.site,r=t.site,o=e.site;if(i!==o){var a=r[0],s=r[1],u=i[0]-a,l=i[1]-s,h=o[0]-a,n=o[1]-s,e=2*(u*n-l*h);if(!(-Em<=e)){var i=u*u+l*l,o=h*h+n*n,l=(n*i-l*o)/e,e=(u*o-h*i)/e,c=km.pop()||new function(){Hu(this),this.x=this.y=this.arc=this.site=this.cy=null};c.arc=t,c.site=r,c.x=l+a,c.y=(c.cy=e+s)+Math.sqrt(l*l+e*e),t.circle=c;for(var f=null,d=Tm._;d;)if(c.y<d.y||c.y===d.y&&c.x<=d.x){if(!d.L){f=d.P;break}d=d.L}else{if(!d.R){f=d;break}d=d.R}Tm.insert(f,c),f||(wm=c)}}}}function tl(t){var n=t.circle;n&&(n.P||(wm=n.N),Tm.remove(n),km.push(n),Hu(n),t.circle=null)}function nl(t){var n=Cm.pop()||new function(){Hu(this),this.edge=this.site=this.circle=null};return n.site=t,n}function el(t){tl(t),Mm.remove(t),Cm.push(t),Hu(t)}function il(t,n){var e=t.site,i=e[0],r=e[1],o=r-n;if(!o)return i;var a=t.P;if(!a)return-1/0;var s=(e=a.site)[0],u=e[1],t=u-n;if(!t)return s;a=s-i,e=1/o-1/t,n=a/t;return e?(-n+Math.sqrt(n*n-2*e*(a*a/(-2*t)-u+t/2+r-o/2)))/e+i:(i+s)/2}function rl(t,n){return n[1]-t[1]||n[0]-t[0]}function ol(t,n){var e,i,r,o,a,s,u=t.sort(rl).pop();for(Pm=[],Lm=new Array(t.length),Mm=new Wu,Tm=new Wu;;)if(r=wm,u&&(!r||u[1]<r.y||u[1]===r.y&&u[0]<r.x))u[0]===e&&u[1]===i||(function(t){for(var n,e,i,r,o=t[0],a=t[1],s=Mm._;s;)if((i=il(s,a)-o)>Sm)s=s.L;else{if(!((r=o-function(t,n){var e=t.N;if(e)return il(e,n);t=t.site;return t[1]===n?t[0]:1/0}(s,a))>Sm)){-Sm<i?(n=s.P,e=s):-Sm<r?e=(n=s).N:n=e=s;break}if(!s.R){n=s;break}s=s.R}Lm[t.index]={site:t,halfedges:[]};var u,l,h,c,f,d,p,_,m,g,v=nl(t);if(Mm.insert(n,v),n||e){if(n===e)return tl(n),e=nl(n.site),Mm.insert(v,e),v.edge=e.edge=Xu(n.site,v.site),Qu(n),Qu(e);e?(tl(n),tl(e),l=(u=n.site)[0],g=u[1],h=t[0]-l,p=t[1]-g,f=(c=e.site)[0]-l,g=[((d=c[1]-g)*(_=h*h+p*p)-p*(m=f*f+d*d))/(p=2*(h*d-p*f))+l,(h*m-f*_)/p+g],$u(e.edge,u,c,g),v.edge=Xu(u,t,null,g),e.edge=Xu(t,c,null,g),Qu(n),Qu(e)):v.edge=Xu(n.site,v.site)}}(u),e=u[0],i=u[1]),u=t.pop();else{if(!r)break;!function(t){var n=t.circle,e=n.x,i=n.cy,r=[e,i],o=t.P,a=t.N,s=[t];el(t);for(var u=o;u.circle&&Math.abs(e-u.circle.x)<Sm&&Math.abs(i-u.circle.cy)<Sm;)o=u.P,s.unshift(u),el(u),u=o;s.unshift(u),tl(u);for(var l=a;l.circle&&Math.abs(e-l.circle.x)<Sm&&Math.abs(i-l.circle.cy)<Sm;)a=l.N,s.push(l),el(l),l=a;s.push(l),tl(l);for(var h=s.length,c=1;c<h;++c)l=s[c],u=s[c-1],$u(l.edge,u.site,l.site,r);u=s[0],(l=s[h-1]).edge=Xu(u.site,l.site,null,r),Qu(u),Qu(l)}(r.arc)}(function(){for(var t,n,e,i,r,o,a,s=0,u=Lm.length;s<u;++s)if((t=Lm[s])&&(e=(n=t.halfedges).length)){for(var l=new Array(e),h=new Array(e),c=0;c<e;++c)l[c]=c,h[c]=(i=t,r=Pm[n[c]],a=o=void 0,o=i.site,a=r.left,i=r.right,o===i&&(i=a,a=o),i?Math.atan2(i[1]-a[1],i[0]-a[0]):(i=o===a?(a=r[1],r[0]):(a=r[0],r[1]),Math.atan2(a[0]-i[0],i[1]-a[1])));for(l.sort(function(t,n){return h[n]-h[t]}),c=0;c<e;++c)h[c]=n[l[c]];for(c=0;c<e;++c)n[c]=h[c]}})(),n&&(function(t,n,e,i){for(var r,o=Pm.length;o--;)(function(t,n,e,i,r){var o=t[1];if(o)return 1;var a=t[0],s=t.left,u=t.right,l=s[0],h=s[1],c=u[0],f=u[1],s=(l+c)/2,u=(h+f)/2;if(f===h){if(s<n||i<=s)return;if(c<l){if(a){if(a[1]>=r)return}else a=[s,e];o=[s,r]}else{if(a){if(a[1]<e)return}else a=[s,r];o=[s,e]}}else if(s=u-(u=(l-c)/(f-h))*s,u<-1||1<u)if(c<l){if(a){if(a[1]>=r)return}else a=[(e-s)/u,e];o=[(r-s)/u,r]}else{if(a){if(a[1]<e)return}else a=[(r-s)/u,r];o=[(e-s)/u,e]}else if(h<f){if(a){if(a[0]>=i)return}else a=[n,u*n+s];o=[i,u*i+s]}else{if(a){if(a[0]<n)return}else a=[i,u*i+s];o=[n,u*n+s]}return t[0]=a,t[1]=o,1})(r=Pm[o],t,n,e,i)&&function(t,n,e,i,r){var o=t[0],a=t[1],s=o[0],u=o[1],l=0,h=1,o=a[0]-s,a=a[1]-u,n=n-s;if(o||!(0<n)){if(n/=o,o<0){if(n<l)return;n<h&&(h=n)}else if(0<o){if(h<n)return;l<n&&(l=n)}if(n=i-s,o||!(n<0)){if(n/=o,o<0){if(h<n)return;l<n&&(l=n)}else if(0<o){if(n<l)return;n<h&&(h=n)}if(n=e-u,a||!(0<n)){if(n/=a,a<0){if(n<l)return;n<h&&(h=n)}else if(0<a){if(h<n)return;l<n&&(l=n)}if(n=r-u,a||!(n<0)){if(n/=a,a<0){if(h<n)return;l<n&&(l=n)}else if(0<a){if(n<l)return;n<h&&(h=n)}return!(0<l||h<1)||(0<l&&(t[0]=[s+l*o,u+l*a]),h<1&&(t[1]=[s+h*o,u+h*a]),1)}}}}}(r,t,n,e,i)&&(Math.abs(r[0][0]-r[1][0])>Sm||Math.abs(r[0][1]-r[1][1])>Sm)||delete Pm[o]}(o=+n[0][0],a=+n[0][1],s=+n[1][0],n=+n[1][1]),function(t,n,e,i){var r,o,a,s,u,l,h,c,f,d,p=Lm.length,_=!0;for(w=0;w<p;++w)if(r=Lm[w]){for(o=r.site,a=(s=r.halfedges).length;a--;)Pm[s[a]]||s.splice(a,1);for(a=0,u=s.length;a<u;)f=r,h=(l=(d=Pm[s[a]])[+(d.left===f.site)])[0],c=l[1],f=(d=Ju(r,Pm[s[++a%u]]))[0],d=d[1],(Math.abs(h-f)>Sm||Math.abs(c-d)>Sm)&&(s.splice(a,0,Pm.push(Ku(o,l,Math.abs(h-t)<Sm&&Sm<i-c?[t,Math.abs(f-t)<Sm?d:i]:Math.abs(c-i)<Sm&&Sm<e-h?[Math.abs(d-i)<Sm?f:e,i]:Math.abs(h-e)<Sm&&Sm<c-n?[e,Math.abs(f-e)<Sm?d:n]:Math.abs(c-n)<Sm&&Sm<h-t?[Math.abs(d-n)<Sm?f:t,n]:null))-1),++u);u&&(_=!1)}if(_){for(var m,g,v,y,b,x=1/0,w=0,_=null;w<p;++w)(r=Lm[w])&&(m=(m=(o=r.site)[0]-t)*m+(m=o[1]-n)*m)<x&&(x=m,_=r);_&&(g=[t,n],v=[t,i],y=[e,i],b=[e,n],_.halfedges.push(Pm.push(Ku(o=_.site,g,v))-1,Pm.push(Ku(o,v,y))-1,Pm.push(Ku(o,y,b))-1,Pm.push(Ku(o,b,g))-1))}for(w=0;w<p;++w)(r=Lm[w])&&(r.halfedges.length||delete Lm[w])}(o,a,s,n)),this.edges=Pm,this.cells=Lm,Mm=Tm=Pm=Lm=null}function al(t){return function(){return t}}function sl(t,n,e){this.k=t,this.x=n,this.y=e}function ul(t){return t.__zoom||Am}function ll(){F.event.stopImmediatePropagation()}function hl(){F.event.preventDefault(),F.event.stopImmediatePropagation()}function cl(){return!F.event.button}function fl(){var t,n=this,n=n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,n.height.baseVal.value):(t=n.clientWidth,n.clientHeight);return[[0,0],[t,n]]}function dl(){return this.__zoom||Am}function pl(){return-F.event.deltaY*(F.event.deltaMode?120:1)/500}function _l(){return"ontouchstart"in this}function ml(t,n,e){var i=t.invertX(n[0][0])-e[0][0],r=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],e=t.invertY(n[1][1])-e[1][1];return t.translate(i<r?(i+r)/2:Math.min(0,i)||Math.max(0,r),o<e?(o+e)/2:Math.min(0,o)||Math.max(0,e))}var gl=L(s),vl=gl.right,yl=gl.left,bl=Array.prototype,xl=bl.slice,wl=bl.map,Ml=Math.sqrt(50),Ll=Math.sqrt(10),Tl=Math.sqrt(2),Pl=Array.prototype.slice,kl={value:function(){}};m.prototype=z.prototype={constructor:m,on:function(t,n){var e,i,r=this._,o=(i=r,(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(0<=e&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a<s;)if(e=(t=o[a]).type)r[e]=g(r[e],t.name,n);else if(null==n)for(e in r)r[e]=g(r[e],t.name,null);return this}for(;++a<s;)if((e=(t=o[a]).type)&&(e=function(t,n){for(var e,i=0,r=t.length;i<r;++i)if((e=t[i]).name===n)return e.value}(r[e],t.name)))return e},copy:function(){var t,n={},e=this._;for(t in e)n[t]=e[t].slice();return new m(n)},call:function(t,n){if(0<(e=arguments.length-2))for(var e,i,r=new Array(e),o=0;o<e;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(i=this._[t]).length;o<e;++o)i[o].value.apply(n,r)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(n,e)}};var Cl,Sl="http://www.w3.org/1999/xhtml",El={svg:"http://www.w3.org/2000/svg",xhtml:Sl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Al=function(t){return function(){return this.matches(t)}};"undefined"!=typeof document&&((dm=document.documentElement).matches||(Cl=dm.webkitMatchesSelector||dm.msMatchesSelector||dm.mozMatchesSelector||dm.oMatchesSelector,Al=function(t){return function(){return Cl.call(this,t)}}));var zl=Al;I.prototype={constructor:I,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};q.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){t=this._names.indexOf(t);0<=t&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return 0<=this._names.indexOf(t)}};var Nl={};F.event=null,"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Nl={mouseenter:"mouseover",mouseleave:"mouseout"}));var Il=[null];at.prototype=st.prototype={constructor:at,select:function(t){"function"!=typeof t&&(t=x(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,a,s=n[r],u=s.length,l=i[r]=new Array(u),h=0;h<u;++h)(o=s[h])&&(a=t.call(o,o.__data__,h,s))&&("__data__"in o&&(a.__data__=o.__data__),l[h]=a);return new at(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=M(t));for(var n=this._groups,e=n.length,i=[],r=[],o=0;o<e;++o)for(var a,s=n[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(i.push(t.call(a,a.__data__,l,s)),r.push(a));return new at(i,r)},filter:function(t){"function"!=typeof t&&(t=zl(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,a=n[r],s=a.length,u=i[r]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new at(i,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),h=-1,this.each(function(t){p[++h]=t}),p;var e,i=n?B:O,r=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),h=0;h<a;++h){var c=r[h],f=o[h],d=f.length,p=t.call(c,c&&c.__data__,h,r),_=p.length,m=u[h]=new Array(_),g=s[h]=new Array(_);i(c,f,m,g,l[h]=new Array(d),p,n);for(var v,y,b=0,x=0;b<_;++b)if(v=m[b]){for(x<=b&&(x=b+1);!(y=g[x])&&++x<_;);v._next=y||null}}return(s=new at(s,r))._enter=u,s._exit=l,s},enter:function(){return new at(this._enter||this._groups.map(N),this._parents)},exit:function(){return new at(this._exit||this._groups.map(N),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,i=n.length,t=e.length,r=Math.min(i,t),o=new Array(i),a=0;a<r;++a)for(var s,u=n[a],l=e[a],h=u.length,c=o[a]=new Array(h),f=0;f<h;++f)(s=u[f]||l[f])&&(c[f]=s);for(;a<i;++a)o[a]=n[a];return new at(o,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var i,r=t[n],o=r.length-1,a=r[o];0<=--o;)(i=r[o])&&(a&&a!==i.nextSibling&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e=e||R;for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var a,s=n[o],u=s.length,l=r[o]=new Array(u),h=0;h<u;++h)(a=s[h])&&(l[h]=a);l.sort(t)}return new at(r,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()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var i=t[n],r=0,o=i.length;r<o;++r){var a=i[r];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 n=this._groups,e=0,i=n.length;e<i;++e)for(var r,o=n[e],a=0,s=o.length;a<s;++a)(r=o[a])&&t.call(r,r.__data__,a,o);return this},attr:function(t,n){var e=v(t);if(arguments.length<2){t=this.node();return e.local?t.getAttributeNS(e.space,e.local):t.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(n,e){return function(){var t=e.apply(this,arguments);null==t?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,t)}}:function(n,e){return function(){var t=e.apply(this,arguments);null==t?this.removeAttribute(n):this.setAttribute(n,t)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return 1<arguments.length?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(n,e,i){return function(){var t=e.apply(this,arguments);null==t?this.style.removeProperty(n):this.style.setProperty(n,t,i)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):Z(this.node(),t)},property:function(t,n){return 1<arguments.length?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(n,e){return function(){var t=e.apply(this,arguments);null==t?delete this[n]:this[n]=t}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=j(t+"");if(arguments.length<2){for(var i=U(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?W:H)(this,t)}}:n?function(t){return function(){W(this,t)}}:function(t){return function(){H(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?V:("function"==typeof t?function(n){return function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?function(n){return function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(G)},lower:function(){return this.each(X)},append:function(t){var n="function"==typeof t?t:y(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:y(t),i=null==n?K:"function"==typeof n?n:x(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each($)},clone:function(t){return this.select(t?Q:J)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var i,r,o=(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return 0<=e&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}),a=o.length;if(!(arguments.length<2)){for(s=n?it:et,null==e&&(e=!1),i=0;i<a;++i)this.each(s(o[i],n,e));return this}var s=this.node().__on;if(s)for(var u,l=0,h=s.length;l<h;++l)for(i=0,u=s[l];i<a;++i)if((r=o[i]).type===u.type&&r.name===u.name)return u.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return ot(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return ot(this,t,n)}})(t,n))}};var Ol=0;ht.prototype=lt.prototype={constructor:ht,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},bt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Bl="\\s*([+-]?\\d+)\\s*",Rl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zl=/^#([0-9a-f]{3})$/,Fl=/^#([0-9a-f]{6})$/,jl=new RegExp("^rgb\\("+[Bl,Bl,Bl]+"\\)$"),Ul=new RegExp("^rgb\\("+[Dl,Dl,Dl]+"\\)$"),ql=new RegExp("^rgba\\("+[Bl,Bl,Bl,Rl]+"\\)$"),Wl=new RegExp("^rgba\\("+[Dl,Dl,Dl,Rl]+"\\)$"),Hl=new RegExp("^hsl\\("+[Rl,Dl,Dl]+"\\)$"),Vl=new RegExp("^hsla\\("+[Rl,Dl,Dl,Rl]+"\\)$"),Yl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Tt(kt,Ct,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Tt(Nt,zt,Pt(kt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Tt(Bt,Ot,Pt(kt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*n,e=2*e-n;return new Nt(Rt(240<=t?t-240:120+t,e,n),Rt(t,e,n),Rt(t<120?240+t:t-120,e,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Gl=Math.PI/180,Xl=180/Math.PI,Kl=.95047,$l=1,Jl=1.08883,Ql=4/29,th=6/29*3*(6/29),nh=6/29*(6/29)*(6/29);Tt(Ft,Zt,Pt(kt,{brighter:function(t){return new Ft(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ft(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200,t=$l*Ut(t);return new Nt(qt(3.2404542*(n=Kl*Ut(n))-1.5371385*t-.4985314*(e=Jl*Ut(e))),qt(-.969266*n+1.8760108*t+.041556*e),qt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Tt(Vt,Ht,Pt(kt,{brighter:function(t){return new Vt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Vt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Dt(this).rgb()}}));var eh=-.29227,ih=-.90649,rh=1.97294,oh=rh*ih,ah=1.78277*rh,sh=1.78277*eh- -.14861*ih;Tt(Gt,Yt,Pt(kt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Gt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Gt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Gl,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(t),t=Math.sin(t);return new Nt(255*(n+e*(-.14861*i+1.78277*t)),255*(n+e*(eh*i+ih*t)),255*(n+rh*i*e),this.opacity)}}));var uh,lh,hh,ch,fh,dh,ph=function t(n){function e(n,t){var e=a((n=zt(n)).r,(t=zt(t)).r),i=a(n.g,t.g),r=a(n.b,t.b),o=en(n.opacity,t.opacity);return function(t){return n.r=e(t),n.g=i(t),n.b=r(t),n.opacity=o(t),n+""}}var a=nn(n);return e.gamma=t,e}(1),_h=rn(Kt),mh=rn($t),gh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vh=new RegExp(gh.source,"g"),yh=180/Math.PI,bh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},xh=dn(function(t){return"none"===t?bh:(uh||(uh=document.createElement("DIV"),lh=document.documentElement,hh=document.defaultView),uh.style.transform=t,t=hh.getComputedStyle(lh.appendChild(uh),null).getPropertyValue("transform"),lh.removeChild(uh),fn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),wh=dn(function(t){return null==t?bh:((ch=ch||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),(t=ch.transform.baseVal.consolidate())?fn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):bh)},", ",")",")"),Mh=Math.SQRT2,Lh=mn(tn),Th=mn(en),Ph=gn(tn),kh=gn(en),Ch=vn(tn),Sh=vn(en),Eh=0,Ah=0,zh=0,Nh=1e3,Ih=0,Oh=0,Bh=0,Rh="object"==typeof performance&&performance.now?performance:Date,Dh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};xn.prototype=wn.prototype={constructor:xn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?yn():+e)+(null==n?0:+n),this._next||dh===this||(dh?dh._next=this:fh=this,dh=this),this._call=t,this._time=e,Pn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pn())}};var Zh=z("start","end","interrupt"),Fh=[],jh=0,Uh=1,qh=2,Wh=3,Hh=4,Vh=5,Yh=6,Gh=st.prototype.constructor,Xh=0,Kh=st.prototype;On.prototype=Bn.prototype={constructor:On,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,r=i.length,o=new Array(r),a=0;a<r;++a)for(var s,u,l=i[a],h=l.length,c=o[a]=new Array(h),f=0;f<h;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),c[f]=u,Cn(c[f],n,e,f,c,An(s,e)));return new On(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=M(t));for(var i=this._groups,r=i.length,o=[],a=[],s=0;s<r;++s)for(var u,l=i[s],h=l.length,c=0;c<h;++c)if(u=l[c]){for(var f,d=t.call(u,u.__data__,c,l),p=An(u,e),_=0,m=d.length;_<m;++_)(f=d[_])&&Cn(f,n,e,_,d,p);o.push(d),a.push(u)}return new On(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=zl(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,a=n[r],s=a.length,u=i[r]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new On(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,i=n.length,t=e.length,r=Math.min(i,t),o=new Array(i),a=0;a<r;++a)for(var s,u=n[a],l=e[a],h=u.length,c=o[a]=new Array(h),f=0;f<h;++f)(s=u[f]||l[f])&&(c[f]=s);for(;a<i;++a)o[a]=n[a];return new On(o,this._parents,this._name,this._id)},selection:function(){return new Gh(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=++Xh,i=this._groups,r=i.length,o=0;o<r;++o)for(var a,s=i[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Cn(a,t,e,l,s,{time:(a=An(a,n)).time+a.delay+a.duration,delay:0,duration:a.duration,ease:a.ease});return new On(i,this._parents,t,e)},call:Kh.call,nodes:Kh.nodes,node:Kh.node,size:Kh.size,empty:Kh.empty,each:Kh.each,on:function(t,n){var e,i,r,o,a,s,u=this._id;return arguments.length<2?An(this.node(),u).on.on(t):this.each((e=u,r=n,s=((i=t)+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return 0<=n&&(t=t.slice(0,n)),!t||"start"===t})?Sn:En,function(){var t=s(this,e),n=t.on;n!==o&&(a=(o=n).copy()).on(i,r),t.on=a}))},attr:function(t,n){var e=v(t),i="transform"===e?wh:In;return this.attrTween(t,"function"==typeof n?(e.local?function(e,i,r){var o,a,s;return function(){var t,n=r(this);if(null!=n)return(t=this.getAttributeNS(e.space,e.local))===n?null:t===o&&n===a?s:s=i(o=t,a=n);this.removeAttributeNS(e.space,e.local)}}:function(e,i,r){var o,a,s;return function(){var t,n=r(this);if(null!=n)return(t=this.getAttribute(e))===n?null:t===o&&n===a?s:s=i(o=t,a=n);this.removeAttribute(e)}})(e,i,Nn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(n,e,i){var r,o;return function(){var t=this.getAttributeNS(n.space,n.local);return t===i?null:t===r?o:o=e(r=t,i)}}:function(n,e,i){var r,o;return function(){var t=this.getAttribute(n);return t===i?null:t===r?o:o=e(r=t,i)}})(e,i,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;t=v(t);return this.tween(e,(t.local?function(i,t){function n(){var n=this,e=t.apply(n,arguments);return e&&function(t){n.setAttributeNS(i.space,i.local,e(t))}}return n._value=t,n}:function(i,t){function n(){var n=this,e=t.apply(n,arguments);return e&&function(t){n.setAttribute(i,e(t))}}return n._value=t,n})(t,n))},style:function(t,n,e){var i,r,o,a,s,u,l,h,c,f,d,p,_,m,g,v,y,b="transform"==(t+="")?xh:In;return null==n?this.styleTween(t,(_=t,m=b,function(){var t=Z(this,_),n=(this.style.removeProperty(_),Z(this,_));return t===n?null:t===g&&n===v?y:y=m(g=t,v=n)})).on("end.style."+t,(p=t,function(){this.style.removeProperty(p)})):this.styleTween(t,"function"==typeof n?(l=b,h=Nn(this,"style."+(u=t),n),function(){var t=Z(this,u),n=h(this);return null==n&&(this.style.removeProperty(u),n=Z(this,u)),t===n?null:t===c&&n===f?d:d=l(c=t,f=n)}):(i=t,r=b,o=n+"",function(){var t=Z(this,i);return t===o?null:t===a?s:s=r(a=t,o)}),e)},styleTween:function(t,n,e){var i,r,o,a="style."+(t+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(null==n)return this.tween(a,null);if("function"!=typeof n)throw new Error;return this.tween(a,(i=t,o=null==e?"":e,s._value=r=n,s));function s(){var n=this,e=r.apply(n,arguments);return e&&function(t){n.style.setProperty(i,e(t),o)}}},text:function(t){return this.tween("text","function"==typeof t?(e=Nn(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}));var n,e},remove:function(){return this.on("end.remove",(e=this._id,function(){var t,n=this.parentNode;for(t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}));var e},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=An(this.node(),e).tween,o=0,a=r.length;o<a;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==n?function(r,o){var a,s;return function(){var t=En(this,r),n=t.tween;if(n!==a)for(var e=0,i=(s=a=n).length;e<i;++e)if(s[e].name===o){(s=s.slice()).splice(e,1);break}t.tween=s}}:function(o,a,s){var u,l;if("function"!=typeof s)throw new Error;return function(){var t=En(this,o),n=t.tween;if(n!==u){l=(u=n).slice();for(var e={name:a,value:s},i=0,r=l.length;i<r;++i)if(l[i].name===a){l[i]=e;break}i===r&&l.push(e)}t.tween=l}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){Sn(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){Sn(this,t).delay=n}})(n,t)):An(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){En(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){En(this,t).duration=n}})(n,t)):An(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){En(this,t).ease=n}}(n,t)):An(this.node(),n).ease}};var $h=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Jh=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),Qh=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),tc=Math.PI,nc=tc/2,ec=7.5625,ic=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),rc=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),oc=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),ac=2*Math.PI,sc=function n(e,i){function t(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/i)}var r=Math.asin(1/(e=Math.max(1,e)))*(i/=ac);return t.amplitude=function(t){return n(t,i*ac)},t.period=function(t){return n(e,t)},t}(1,.3),uc=function n(e,i){function t(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/i)}var r=Math.asin(1/(e=Math.max(1,e)))*(i/=ac);return t.amplitude=function(t){return n(t,i*ac)},t.period=function(t){return n(e,t)},t}(1,.3),lc=function n(e,i){function t(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/i):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/i))/2}var r=Math.asin(1/(e=Math.max(1,e)))*(i/=ac);return t.amplitude=function(t){return n(t,i*ac)},t.period=function(t){return n(e,t)},t}(1,.3),hc={time:null,delay:0,duration:250,ease:Dn};st.prototype.interrupt=function(t){return this.each(function(){zn(this,t)})},st.prototype.transition=function(t){var n,e;t=t instanceof On?(n=t._id,t._name):(n=++Xh,(e=hc).time=yn(),null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var a,s=i[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Cn(a,t,n,l,s,e||function(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return hc.time=yn(),hc;return e}(a,n));return new On(i,this._parents,t,n)};var cc=[null],fc={name:"drag"},dc={name:"space"},pc={name:"handle"},_c={name:"center"},mc={name:"x",handles:["e","w"].map(Vn),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},gc={name:"y",handles:["n","s"].map(Vn),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},vc={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Vn),input:function(t){return t},output:function(t){return t}},yc={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},bc={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xc={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},wc={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Mc={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1},Lc=Math.cos,Tc=Math.sin,Pc=Math.PI,kc=Pc/2,Cc=2*Pc,Sc=Math.max,Ec=Array.prototype.slice,Ac=Math.PI,zc=2*Ac,Nc=zc-1e-6;Qn.prototype=te.prototype={constructor:Qn,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var o,a,s=this._x1,u=this._y1,l=e-t,h=i-n,c=s-t,f=u-n,d=c*c+f*f;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):1e-6<d&&(1e-6<Math.abs(f*l-h*c)&&r?(a=l*l+h*h,s=(o=e-s)*o+(e=i-u)*e,i=Math.sqrt(a),u=Math.sqrt(d),u=(s=r*Math.tan((Ac-Math.acos((a+d-s)/(2*i*u)))/2))/u,i=s/i,1e-6<Math.abs(u-1)&&(this._+="L"+(t+u*c)+","+(n+u*f)),this._+="A"+r+","+r+",0,0,"+ +(c*e<f*o)+","+(this._x1=t+i*l)+","+(this._y1=n+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,i,r,o){t=+t,n=+n;var a=(e=+e)*Math.cos(i),s=e*Math.sin(i),u=t+a,l=n+s,h=1^o,i=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+u+","+l:(1e-6<Math.abs(this._x1-u)||1e-6<Math.abs(this._y1-l))&&(this._+="L"+u+","+l),e&&(i<0&&(i=i%zc+zc),Nc<i?this._+="A"+e+","+e+",0,1,"+h+","+(t-a)+","+(n-s)+"A"+e+","+e+",0,1,"+h+","+(this._x1=u)+","+(this._y1=l):1e-6<i&&(this._+="A"+e+","+e+",0,"+ +(Ac<=i)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},ae.prototype=se.prototype={constructor:ae,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){t="$"+t;return t in this&&delete this[t]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t,n=[];for(t in this)"$"===t[0]&&n.push(t.slice(1));return n},values:function(){var t,n=[];for(t in this)"$"===t[0]&&n.push(this[t]);return n},entries:function(){var t,n=[];for(t in this)"$"===t[0]&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var t,n=0;for(t in this)"$"===t[0]&&++n;return n},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var Ic=se.prototype;fe.prototype=de.prototype={constructor:fe,has:Ic.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Ic.remove,clear:Ic.clear,values:Ic.keys,size:Ic.size,empty:Ic.empty,each:Ic.each};var Oc={},Bc={},Rc=_e(","),Dc=Rc.parse,Zc=Rc.parseRows,Fc=Rc.format,jc=Rc.formatRows,Uc=_e("\t"),qc=Uc.parse,Wc=Uc.parseRows,Hc=Uc.format,Vc=Uc.formatRows,Yc=we.prototype=Me.prototype;Yc.copy=function(){var t,n,e=new Me(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return e;if(!i.length)return e._root=Le(i),e;for(t=[{source:i,target:e._root=new Array(4)}];i=t.pop();)for(var r=0;r<4;++r)(n=i.source[r])&&(n.length?t.push({source:n,target:i.target[r]=new Array(4)}):i.target[r]=Le(n));return e},Yc.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return ve(this.cover(n,e),n,e,t)},Yc.addAll=function(t){for(var n,e,i,r=t.length,o=new Array(r),a=new Array(r),s=1/0,u=1/0,l=-1/0,h=-1/0,c=0;c<r;++c)isNaN(e=+this._x.call(null,n=t[c]))||isNaN(i=+this._y.call(null,n))||((o[c]=e)<s&&(s=e),l<e&&(l=e),(a[c]=i)<u&&(u=i),h<i&&(h=i));for(l<s&&(s=this._x0,l=this._x1),h<u&&(u=this._y0,h=this._y1),this.cover(s,u).cover(l,h),c=0;c<r;++c)ve(this,o[c],a[c],t[c]);return this},Yc.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,i=this._y0,r=this._x1,o=this._y1;if(isNaN(e))r=(e=Math.floor(t))+1,o=(i=Math.floor(n))+1;else{if(!(t<e||r<t||n<i||o<n))return this;var a,s,u=r-e,l=this._root;switch(s=(n<(i+o)/2)<<1|t<(e+r)/2){case 0:for(;(a=new Array(4))[s]=l,l=a,u*=2,r=e+u,o=i+u,r<t||o<n;);break;case 1:for(;(a=new Array(4))[s]=l,l=a,u*=2,e=r-u,o=i+u,t<e||o<n;);break;case 2:for(;(a=new Array(4))[s]=l,l=a,u*=2,r=e+u,i=o-u,r<t||n<i;);break;case 3:for(;(a=new Array(4))[s]=l,l=a,u*=2,e=r-u,i=o-u,t<e||n<i;);}this._root&&this._root.length&&(this._root=l)}return this._x0=e,this._y0=i,this._x1=r,this._y1=o,this},Yc.data=function(){var n=[];return this.visit(function(t){if(!t.length)for(;n.push(t.data),t=t.next;);}),n},Yc.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]]},Yc.find=function(t,n,e){var i,r,o,a,s,u,l,h,c=this._x0,f=this._y0,d=this._x1,p=this._y1,_=[],m=this._root;for(m&&_.push(new ye(m,c,f,d,p)),null==e?e=1/0:(c=t-e,f=n-e,d=t+e,p=n+e,e*=e);l=_.pop();)!(m=l.node)||(i=l.x0)>d||(r=l.y0)>p||(o=l.x1)<c||(a=l.y1)<f||(m.length?(s=(i+o)/2,u=(r+a)/2,_.push(new ye(m[3],s,u,o,a),new ye(m[2],i,u,s,a),new ye(m[1],s,r,o,u),new ye(m[0],i,r,s,u)),(s=(u<=n)<<1|s<=t)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-s],_[_.length-1-s]=l)):(l=(l=t-+this._x.call(null,m.data))*l+(l=n-+this._y.call(null,m.data))*l)<e&&(c=t-(l=Math.sqrt(e=l)),f=n-l,d=t+l,p=n+l,h=m.data));return h},Yc.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,i,r,o,a,s,u,l,h,c,f=this._root,d=this._x0,p=this._y0,_=this._x1,m=this._y1;if(!f)return this;if(f.length)for(;;){if((u=o>=(l=(d+_)/2))?d=l:_=l,(l=a>=(s=(p+m)/2))?p=s:m=s,!(f=(n=f)[h=l<<1|u]))return this;if(!f.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,c=h)}for(;f.data!==t;)if(!(f=(i=f).next))return this;return(r=f.next)&&delete f.next,i?r?i.next=r:delete i.next:n?(r?n[h]=r:delete n[h],(f=n[0]||n[1]||n[2]||n[3])&&f===(n[3]||n[2]||n[1]||n[0])&&!f.length&&(e?e[c]=f:this._root=f)):this._root=r,this},Yc.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Yc.root=function(){return this._root},Yc.size=function(){var n=0;return this.visit(function(t){if(!t.length)for(;++n,t=t.next;);}),n},Yc.visit=function(t){var n,e,i,r,o,a,s,u=[],l=this._root;for(l&&u.push(new ye(l,this._x0,this._y0,this._x1,this._y1));n=u.pop();)!t(l=n.node,e=n.x0,i=n.y0,r=n.x1,o=n.y1)&&l.length&&(a=(e+r)/2,s=(i+o)/2,(n=l[3])&&u.push(new ye(n,a,s,r,o)),(n=l[2])&&u.push(new ye(n,e,s,a,o)),(n=l[1])&&u.push(new ye(n,a,i,r,s)),(n=l[0])&&u.push(new ye(n,e,i,a,s)));return this},Yc.visitAfter=function(t){var n,e=[],i=[];for(this._root&&e.push(new ye(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var r,o,a,s,u,l,h,c=n.node;c.length&&(o=n.x0,a=n.y0,l=(o+(s=n.x1))/2,h=(a+(u=n.y1))/2,(r=c[0])&&e.push(new ye(r,o,a,l,h)),(r=c[1])&&e.push(new ye(r,l,a,s,h)),(r=c[2])&&e.push(new ye(r,o,h,l,u)),(r=c[3])&&e.push(new ye(r,l,h,s,u))),i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Yc.x=function(t){return arguments.length?(this._x=t,this):this._x},Yc.y=function(t){return arguments.length?(this._y=t,this):this._y};var Gc,Xc=Math.PI*(3-Math.sqrt(5)),Kc={"":function(t,n){t:for(var e,i=(t=t.toPrecision(n)).length,r=1,o=-1;r<i;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;case"e":break t;default:0<o&&(o=0)}return 0<o?t.slice(0,o)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Ne(100*t,n)},r:Ne,s:function(t,n){var e=Ae(t,n);if(!e)return t+"";var i=e[0],r=e[1],e=r-(Gc=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,r=i.length;return e===r?i:r<e?i+new Array(e-r+1).join("0"):0<e?i.slice(0,e)+"."+i.slice(e):"0."+new Array(1-e).join("0")+Ae(t,Math.max(0,n+e-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},$c=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Ie.prototype=Oe.prototype,Oe.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Jc,Qc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];De({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),qe.prototype={constructor:qe,reset:function(){this.s=this.t=0},add:function(t){We(zf,t,this.t),We(this,zf.s,this.s),this.s?this.t+=zf.t:this.s=zf.t},valueOf:function(){return this.s}};var tf,nf,ef,rf,of,af,sf,uf,lf,hf,cf,ff,df,pf,_f,mf,gf,vf,yf,bf,xf,wf,Mf,Lf,Tf,Pf,kf,Cf,Sf,Ef,Af,zf=new qe,Nf=1e-6,If=Math.PI,Of=If/2,Bf=If/4,Rf=2*If,Df=180/If,Zf=If/180,Ff=Math.abs,jf=Math.atan,Uf=Math.atan2,qf=Math.cos,Wf=Math.ceil,Hf=Math.exp,Vf=Math.log,Yf=Math.pow,Gf=Math.sin,Xf=Math.sign||function(t){return 0<t?1:t<0?-1:0},Kf=Math.sqrt,$f=Math.tan,Jf={Feature:function(t,n){Xe(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i<r;)Xe(e[i].geometry,n)}},Qf={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)t=e[i],n.point(t[0],t[1],t[2])},LineString:function(t,n){Ke(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)Ke(e[i],n,0)},Polygon:function(t,n){$e(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)$e(e[i],n)},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,r=e.length;++i<r;)Xe(e[i],n)}},td=Ue(),nd=Ue(),ed={point:Ge,lineStart:Ge,lineEnd:Ge,polygonStart:function(){td.reset(),ed.lineStart=Qe,ed.lineEnd=ti},polygonEnd:function(){var t=+td;nd.add(t<0?Rf+t:t),this.lineStart=this.lineEnd=this.point=Ge},sphere:function(){nd.add(Rf)}},id=Ue(),rd={point:hi,lineStart:fi,lineEnd:di,polygonStart:function(){rd.point=pi,rd.lineStart=_i,rd.lineEnd=mi,id.reset(),ed.polygonStart()},polygonEnd:function(){ed.polygonEnd(),rd.point=hi,rd.lineStart=fi,rd.lineEnd=di,td<0?(af=-(uf=180),sf=-(lf=90)):Nf<id?lf=90:id<-Nf&&(sf=-90),_f[0]=af,_f[1]=uf}},od={sphere:Ge,point:bi,lineStart:wi,lineEnd:Ti,polygonStart:function(){od.lineStart=Pi,od.lineEnd=ki},polygonEnd:function(){od.lineStart=wi,od.lineEnd=Ti}};zi.invert=zi;var ad,sd,ud,ld,hd,cd,fd,dd,pd,_d,md,gd=Ue(),vd=Vi(function(){return 1},function(l){var h,c=NaN,f=NaN,d=NaN;return{lineStart:function(){l.lineStart(),h=1},point:function(t,n){var e,i,r,o,a,s=0<t?If:-If,u=Ff(t-c);Ff(u-If)<Nf?(l.point(c,f=0<(f+n)/2?Of:-Of),l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),l.point(t,f),h=0):d!==s&&If<=u&&(Ff(c-d)<Nf&&(c-=d*Nf),Ff(t-s)<Nf&&(t-=s*Nf),i=f,o=n,a=Gf((e=c)-(r=t)),f=Ff(a)>Nf?jf((Gf(i)*(u=qf(o))*Gf(r)-Gf(o)*(r=qf(i))*Gf(e))/(r*u*a)):(i+o)/2,l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),h=0),l.point(c=t,f=n),d=s},lineEnd:function(){l.lineEnd(),c=f=NaN},clean:function(){return 2-h}}},function(t,n,e,i){var r;null==t?(r=e*Of,i.point(-If,r),i.point(0,r),i.point(If,r),i.point(If,0),i.point(If,-r),i.point(0,-r),i.point(-If,-r),i.point(-If,0),i.point(-If,r)):Ff(t[0]-n[0])>Nf?(r=e*(t=t[0]<n[0]?If:-If)/2,i.point(-t,r),i.point(0,r),i.point(t,r)):i.point(n[0],n[1])},[-If,-Of]),yd=1e9,bd=-yd,xd=Ue(),wd={sphere:Ge,point:Ge,lineStart:function(){wd.point=Ji,wd.lineEnd=$i},lineEnd:Ge,polygonStart:Ge,polygonEnd:Ge},Md=[null,null],Ld={type:"LineString",coordinates:Md},Td={Feature:function(t,n){return er(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,r=e.length;++i<r;)if(er(e[i].geometry,n))return!0;return!1}},Pd={Sphere:function(){return!0},Point:function(t,n){return ir(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)if(ir(e[i],n))return!0;return!1},LineString:function(t,n){return rr(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)if(rr(e[i],n))return!0;return!1},Polygon:function(t,n){return or(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,r=e.length;++i<r;)if(or(e[i],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,r=e.length;++i<r;)if(er(e[i],n))return!0;return!1}},kd=Ue(),Cd=Ue(),Sd={point:Ge,lineStart:Ge,lineEnd:Ge,polygonStart:function(){Sd.lineStart=fr,Sd.lineEnd=_r},polygonEnd:function(){Sd.lineStart=Sd.lineEnd=Sd.point=Ge,kd.add(Ff(Cd)),Cd.reset()},result:function(){var t=kd/2;return kd.reset(),t}},Ed=1/0,Ad=Ed,zd=-Ed,Nd=zd,Id={point:function(t,n){t<Ed&&(Ed=t),zd<t&&(zd=t),n<Ad&&(Ad=n),Nd<n&&(Nd=n)},lineStart:Ge,lineEnd:Ge,polygonStart:Ge,polygonEnd:Ge,result:function(){var t=[[Ed,Ad],[zd,Nd]];return zd=Nd=-(Ad=Ed=1/0),t}},Od=0,Bd=0,Rd=0,Dd=0,Zd=0,Fd=0,jd=0,Ud=0,qd=0,Wd={point:mr,lineStart:gr,lineEnd:br,polygonStart:function(){Wd.lineStart=xr,Wd.lineEnd=wr},polygonEnd:function(){Wd.point=mr,Wd.lineStart=gr,Wd.lineEnd=br},result:function(){var t=qd?[jd/qd,Ud/qd]:Fd?[Dd/Fd,Zd/Fd]:Rd?[Od/Rd,Bd/Rd]:[NaN,NaN];return Od=Bd=Rd=Dd=Zd=Fd=jd=Ud=qd=0,t}};Tr.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,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,Rf)}},result:Ge};var Hd,Vd,Yd,Gd,Xd,Kd=Ue(),$d={point:Ge,lineStart:function(){$d.point=Pr},lineEnd:function(){Hd&&kr(Vd,Yd),$d.point=Ge},polygonStart:function(){Hd=!0},polygonEnd:function(){Hd=null},result:function(){var t=+Kd;return Kd.reset(),t}};Cr.prototype={_radius:4.5,_circle:Sr(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,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=Sr(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Ar.prototype={constructor:Ar,point:function(t,n){this.stream.point(t,n)},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 Jd=16,Qd=qf(30*Zf),tp=Er({point:function(t,n){this.stream.point(t*Zf,n*Zf)}}),np=Wr(function(t){return Kf(2/(1+t))});np.invert=Hr(function(t){return 2*Ve(t/2)});var ep=Wr(function(t){return(t=He(t))&&t/Gf(t)});ep.invert=Hr(function(t){return t}),Vr.invert=function(t,n){return[t,2*jf(Hf(n))-Of]},Kr.invert=Kr,Jr.invert=Hr(jf),to.invert=function(t,n){var e=n,i=25;do{var r=e*e,o=r*r}while(e-=o=(e*(1.007226+r*(.015085+o*(.028874*r-.044475-.005916*o)))-n)/(1.007226+r*(.045255+o*(.259866*r-.311325-.005916*11*o))),Ff(o)>Nf&&0<--i);return[t/(.8707+(r=e*e)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),e]},no.invert=Hr(Ve),eo.invert=Hr(function(t){return 2*jf(t)}),io.invert=function(t,n){return[-n,2*jf(Hf(t))-Of]},fo.prototype=uo.prototype={constructor:fo,count:function(){return this.eachAfter(so)},each:function(t){var n,e,i,r,o,a=[this];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(i=0,r=e.length;i<r;++i)a.push(e[i])}while(a.length);return this},eachAfter:function(t){for(var n,e,i,r=this,o=[r],a=[];r=o.pop();)if(a.push(r),n=r.children)for(e=0,i=n.length;e<i;++e)o.push(n[e]);for(;r=a.pop();)t(r);return this},eachBefore:function(t){for(var n,e,i,r=[this];i=r.pop();)if(t(i),n=i.children)for(e=n.length-1;0<=e;--e)r.push(n[e]);return this},sum:function(r){return this.eachAfter(function(t){for(var n=+r(t.data)||0,e=t.children,i=e&&e.length;0<=--i;)n+=e[i].value;t.value=n})},sort:function(n){return this.eachBefore(function(t){t.children&&t.children.sort(n)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var n=[];return this.each(function(t){n.push(t)}),n},leaves:function(){var n=[];return this.eachBefore(function(t){t.children||n.push(t)}),n},links:function(){var n=this,e=[];return n.each(function(t){t!==n&&e.push({source:t.parent,target:t})}),e},copy:function(){return uo(this).eachBefore(ho)}};var ip=Array.prototype.slice,rp={depth:-1},op={};Zo.prototype=Object.create(fo.prototype);var ap=(1+Math.sqrt(5))/2,sp=function n(o){function t(t,n,e,i,r){jo(o,t,n,e,i,r)}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(ap),up=function n(d){function t(t,n,e,i,r){if((o=t._squarify)&&o.ratio===d)for(var o,a,s,u,l,h=-1,c=o.length,f=t.value;++h<c;){for(s=(a=o[h]).children,u=a.value=0,l=s.length;u<l;++u)a.value+=s[u].value;a.dice?No(a,n,e,i,e+=(r-e)*a.value/f):Fo(a,n,e,n+=(i-n)*a.value/f,r),f-=a.value}else t._squarify=o=jo(d,t,n,e,i,r),o.ratio=d}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(ap),lp=[].slice,hp={};Wo.prototype=Go.prototype={constructor:Wo,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=lp.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),Ho(this),this},abort:function(){return null==this._error&&Vo(this,new Error("abort")),this},await:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,n){e.apply(null,[t].concat(n))},Yo(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,Yo(this),this}};var cp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Xo),fp=function t(o){function n(n,e){var i,r;return n=null==n?0:+n,e=null==e?1:+e,function(){var t;if(null!=i)t=i,i=null;else for(;i=2*o()-1,t=2*o()-1,r=i*i+t*t,!r||1<r;);return n+e*t*Math.sqrt(-2*Math.log(r)/r)}}return n.source=t,n}(Xo),dp=function t(n){function e(){var t=fp.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Xo),pp=function t(i){function n(e){return function(){for(var t=0,n=0;n<e;++n)t+=i();return t}}return n.source=t,n}(Xo),_p=function t(e){function n(t){var n=pp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Xo),mp=function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(Xo),gp=$o("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),vp=$o("application/json",function(t){return JSON.parse(t.responseText)}),yp=$o("text/plain",function(t){return t.responseText}),bp=$o("application/xml",function(t){t=t.responseXML;if(!t)throw new Error("parse error");return t}),xp=Jo("text/csv",Dc),wp=Jo("text/tab-separated-values",qc),Mp=Array.prototype,Lp=Mp.map,Tp=Mp.slice,Pp={name:"implicit"},kp=[0,1],Cp=new Date,Sp=new Date,Ep=va(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Ep.every=function(e){return e=Math.floor(e),isFinite(e)&&0<e?1<e?va(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Ep:null};var Ap=Ep.range,zp=va(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),Np=zp.range,Ip=va(function(t){t.setTime(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(+t+6e4*n)},function(t,n){return(n-t)/6e4},function(t){return t.getMinutes()}),Op=Ip.range,Bp=va(function(t){var n=6e4*t.getTimezoneOffset()%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Rp=Bp.range,Dp=va(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5},function(t){return t.getDate()-1}),Zp=Dp.range,Fp=ya(0),jp=ya(1),Up=ya(2),qp=ya(3),Wp=ya(4),Hp=ya(5),Vp=ya(6),Yp=Fp.range,Gp=jp.range,Xp=Up.range,Kp=qp.range,$p=Wp.range,Jp=Hp.range,Qp=Vp.range,t_=va(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),n_=t_.range,e_=va(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});e_.every=function(e){return isFinite(e=Math.floor(e))&&0<e?va(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var i_=e_.range,r_=va(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+6e4*n)},function(t,n){return(n-t)/6e4},function(t){return t.getUTCMinutes()}),o_=r_.range,a_=va(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),s_=a_.range,u_=va(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),l_=u_.range,h_=ba(0),c_=ba(1),f_=ba(2),d_=ba(3),p_=ba(4),__=ba(5),m_=ba(6),g_=h_.range,v_=c_.range,y_=f_.range,b_=d_.range,x_=p_.range,w_=__.range,M_=m_.range,L_=va(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),T_=L_.range,P_=va(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});P_.every=function(e){return isFinite(e=Math.floor(e))&&0<e?va(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var k_,C_=P_.range,S_={"-":"",_:" ",0:"0"},E_=/^\s*\d+/,A_=/^%/,z_=/[\\^$*+?|[\]().{}]/g;As({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var N_="%Y-%m-%dT%H:%M:%S.%LZ",I_=Date.prototype.toISOString?function(t){return t.toISOString()}:F.utcFormat(N_),O_=+new Date("2000-01-01T00:00:00.000Z")?function(t){t=new Date(t);return isNaN(t)?null:t}:F.utcParse(N_),B_=1e3,R_=60*B_,D_=60*R_,Z_=24*D_,F_=7*Z_,j_=30*Z_,U_=365*Z_,q_=Os("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),W_=Os("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),H_=Os("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),V_=Os("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Y_=Sh(Yt(300,.5,0),Yt(-240,.5,1)),G_=Sh(Yt(-100,.75,.35),Yt(80,1.5,.8)),X_=Sh(Yt(260,.75,.35),Yt(80,1.5,.8)),K_=Yt(),$_=Bs(Os("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),J_=Bs(Os("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),gl=Bs(Os("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),bl=Bs(Os("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Q_=Math.abs,tm=Math.atan2,nm=Math.cos,em=Math.max,im=Math.min,rm=Math.sin,om=Math.sqrt,am=1e-12,sm=Math.PI,um=sm/2,lm=2*sm;Hs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var hm=tu(Vs);Qs.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var cm=Array.prototype.slice,fm={draw:function(t,n){n=Math.sqrt(n/sm);t.moveTo(n,0),t.arc(0,0,n,0,lm)}},dm={draw:function(t,n){n=Math.sqrt(n/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},pm=Math.sqrt(1/3),_m=2*pm,Al={draw:function(t,n){var e=Math.sqrt(n/_m),n=e*pm;t.moveTo(0,-e),t.lineTo(n,0),t.lineTo(0,e),t.lineTo(-n,0),t.closePath()}},Bl=Math.sin(sm/10)/Math.sin(7*sm/10),mm=Math.sin(lm/10)*Bl,gm=-Math.cos(lm/10)*Bl,Dl={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),i=mm*e,r=gm*e;t.moveTo(0,-e),t.lineTo(i,r);for(var o=1;o<5;++o){var a=lm*o/5,s=Math.cos(a),a=Math.sin(a);t.lineTo(a*e,-s*e),t.lineTo(s*i-a*r,a*i+s*r)}t.closePath()}},Rl={draw:function(t,n){var e=Math.sqrt(n),n=-e/2;t.rect(n,n,e,e)}},vm=Math.sqrt(3),Kh={draw:function(t,n){n=-Math.sqrt(n/(3*vm));t.moveTo(0,2*n),t.lineTo(-vm*n,-n),t.lineTo(vm*n,-n),t.closePath()}},ym=Math.sqrt(3)/2,bm=1/Math.sqrt(12),xm=3*(bm/2+1),Pc={draw:function(t,n){var e=Math.sqrt(n/xm),i=e/2,r=e*bm,o=i,a=e*bm+e,n=-o,e=a;t.moveTo(i,r),t.lineTo(o,a),t.lineTo(n,e),t.lineTo(-.5*i-ym*r,ym*i+-.5*r),t.lineTo(-.5*o-ym*a,ym*o+-.5*a),t.lineTo(-.5*n-ym*e,ym*n+-.5*e),t.lineTo(-.5*i+ym*r,-.5*r-ym*i),t.lineTo(-.5*o+ym*a,-.5*a-ym*o),t.lineTo(-.5*n+ym*e,-.5*e-ym*n),t.closePath()}},Ic=[fm,dm,Al,Rl,Dl,Kh,Pc];du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fu(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},pu.prototype={areaStart:cu,areaEnd:cu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:fu(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:fu(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},mu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(0<e)for(var i,r=t[0],o=n[0],a=t[e]-r,s=n[e]-o,u=-1;++u<=e;)i=u/e,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+i*a),this._beta*n[u]+(1-this._beta)*(o+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};Rc=function n(e){function t(t){return 1===e?new du(t):new mu(t,e)}return t.beta=function(t){return n(+t)},t}(.85);vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gu(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:gu(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};Uc=function n(e){function t(t){return new vu(t,e)}return t.tension=function(t){return n(+t)},t}(0);yu.prototype={areaStart:cu,areaEnd:cu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:gu(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};Yc=function n(e){function t(t){return new yu(t,e)}return t.tension=function(t){return n(+t)},t}(0);bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gu(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};ap=function n(e){function t(t){return new bu(t,e)}return t.tension=function(t){return n(+t)},t}(0);wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e,i;switch(t=+t,n=+n,this._point&&(e=this._x2-t,i=this._y2-n,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:xu(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};Mp=function n(e){function t(t){return e?new wu(t,e):new vu(t,0)}return t.alpha=function(t){return n(+t)},t}(.5);Mu.prototype={areaStart:cu,areaEnd:cu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){var e,i;switch(t=+t,n=+n,this._point&&(e=this._x2-t,i=this._y2-n,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:xu(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};N_=function n(e){function t(t){return e?new Mu(t,e):new yu(t,0)}return t.alpha=function(t){return n(+t)},t}(.5);Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e,i;switch(t=+t,n=+n,this._point&&(e=this._x2-t,i=this._y2-n,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xu(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};Bl=function n(e){function t(t){return e?new Lu(t,e):new bu(t,0)}return t.alpha=function(t){return n(+t)},t}(.5);Tu.prototype={areaStart:cu,areaEnd:cu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Su(this,this._t0,Cu(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Su(this,Cu(this,e=ku(this,t,n)),e);break;default:Su(this,this._t0,e=ku(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Au.prototype=Object.create(Eu.prototype)).point=function(t,n){Eu.prototype.point.call(this,n,t)},zu.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,i,r,o){this._context.bezierCurveTo(n,t,i,e,o,r)}},Nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var i=Iu(t),r=Iu(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:var e;this._t<=0?(this._context.lineTo(this._x,n),this._context.lineTo(t,n)):(e=this._x*(1-this._t)+t*this._t,this._context.lineTo(e,this._y),this._context.lineTo(e,n))}this._x=t,this._y=n}},Wu.prototype={constructor:Wu,insert:function(t,n){var e,i,r;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else e=this._?(t=Gu(this._),n.P=null,(n.N=t).P=t.L=n,t):(n.P=n.N=null,this._=n,null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(i=e.U).L?(r=i.R)&&r.C?(e.C=r.C=!1,i.C=!0,t=i):(t===e.R&&(Vu(this,e),e=(t=e).U),e.C=!1,i.C=!0,Yu(this,i)):(r=i.L)&&r.C?(e.C=r.C=!1,i.C=!0,t=i):(t===e.L&&(Yu(this,e),e=(t=e).U),e.C=!1,i.C=!0,Vu(this,i)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,i=t.U,r=t.L,o=t.R,a=r?o?Gu(o):r:o;if(i?i.L===t?i.L=a:i.R=a:this._=a,r&&o?(e=a.C,a.C=t.C,((a.L=r).U=a)!==o?(i=a.U,a.U=t.U,t=a.R,i.L=t,(a.R=o).U=a):(a.U=i,t=(i=a).R)):(e=t.C,t=a),t&&(t.U=i),!e)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Vu(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Yu(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Vu(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Yu(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Vu(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Yu(this,i),t=this._;break}}while(n.C=!0,i=(t=i).U,!t.C);t&&(t.C=!1)}}};var wm,Mm,Lm,Tm,Pm,km=[],Cm=[],Sm=1e-6,Em=1e-12;ol.prototype={constructor:ol,polygons:function(){var e=this.edges;return this.cells.map(function(n){var t=n.halfedges.map(function(t){return Ju(n,e[t])});return t.data=n.site.data,t})},triangles:function(){var f=[],d=this.edges;return this.cells.forEach(function(t,n){if(i=(e=t.halfedges).length)for(var e,i,r,o=t.site,a=-1,s=d[e[i-1]],u=s.left===o?s.right:s.left;++a<i;)r=u,u=(s=d[e[a]]).left===o?s.right:s.left,r&&u&&n<r.index&&n<u.index&&(h=r,c=u,((l=o)[0]-c[0])*(h[1]-l[1])-(l[0]-h[0])*(c[1]-l[1])<0)&&f.push([o.data,r.data,u.data]);var l,h,c}),f},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(e,i,t){for(var n,r,o=this,a=o._found||0,s=o.cells.length;!(r=o.cells[a]);)if(++a>=s)return null;for(var u=e-r.site[0],l=i-r.site[1],h=u*u+l*l;r=o.cells[n=a],a=null,r.halfedges.forEach(function(t){var n=o.edges[t],t=n.left;!(t!==r.site&&t||(t=n.right))||(n=(n=e-t[0])*n+(n=i-t[1])*n)<h&&(h=n,a=t.index)}),null!==a;);return o._found=n,null==t||h<=t*t?r.site:null}},sl.prototype={constructor:sl,scale:function(t){return 1===t?this:new sl(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new sl(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Am=new sl(1,0,0);ul.prototype=sl.prototype,F.version="4.13.0",F.bisect=vl,F.bisectRight=vl,F.bisectLeft=yl,F.ascending=s,F.bisector=L,F.cross=function(t,n,e){var i,r,o,a,s=t.length,u=n.length,l=new Array(s*u);for(null==e&&(e=h),i=o=0;i<s;++i)for(a=t[i],r=0;r<u;++r,++o)l[o]=e(a,n[r]);return l},F.descending=function(t,n){return n<t?-1:t<n?1:t<=n?0:NaN},F.deviation=i,F.extent=t,F.histogram=function(){function n(t){for(var n,e=t.length,i=new Array(e),r=0;r<e;++r)i[r]=f(t[r],r,t);var o=d(i),a=o[0],s=o[1],u=p(i,a,s);Array.isArray(u)||(u=P(a,s,u),u=T(Math.ceil(a/u)*u,Math.floor(s/u)*u,u));for(var l=u.length;u[0]<=a;)u.shift(),--l;for(;u[l-1]>s;)u.pop(),--l;var h,c=new Array(l+1);for(r=0;r<=l;++r)(h=c[r]=[]).x0=0<r?u[r-1]:a,h.x1=r<l?u[r]:s;for(r=0;r<e;++r)a<=(n=i[r])&&n<=s&&c[vl(u,n,0,l)].push(t[r]);return c}var f=o,d=t,p=a;return n.value=function(t){return arguments.length?(f="function"==typeof t?t:r(t),n):f},n.domain=function(t){return arguments.length?(d="function"==typeof t?t:r([t[0],t[1]]),n):d},n.thresholds=function(t){return arguments.length?(p="function"==typeof t?t:Array.isArray(t)?r(xl.call(t)):r(t),n):p},n},F.thresholdFreedmanDiaconis=function(t,n,e){return t=wl.call(t,l).sort(s),Math.ceil((e-n)/(2*(u(t,.75)-u(t,.25))*Math.pow(t.length,-1/3)))},F.thresholdScott=function(t,n,e){return Math.ceil((e-n)/(3.5*i(t)*Math.pow(t.length,-1/3)))},F.thresholdSturges=a,F.max=function(t,n){var e,i,r=t.length,o=-1;if(null==n){for(;++o<r;)if(null!=(e=t[o])&&e<=e)for(i=e;++o<r;)null!=(e=t[o])&&i<e&&(i=e)}else for(;++o<r;)if(null!=(e=n(t[o],o,t))&&e<=e)for(i=e;++o<r;)null!=(e=n(t[o],o,t))&&i<e&&(i=e);return i},F.mean=function(t,n){var e,i=t.length,r=i,o=-1,a=0;if(null==n)for(;++o<i;)isNaN(e=l(t[o]))?--r:a+=e;else for(;++o<i;)isNaN(e=l(n(t[o],o,t)))?--r:a+=e;if(r)return a/r},F.median=function(t,n){var e,i=t.length,r=-1,o=[];if(null==n)for(;++r<i;)isNaN(e=l(t[r]))||o.push(e);else for(;++r<i;)isNaN(e=l(n(t[r],r,t)))||o.push(e);return u(o.sort(s),.5)},F.merge=k,F.min=f,F.pairs=function(t,n){null==n&&(n=h);for(var e=0,i=t.length-1,r=t[0],o=new Array(i<0?0:i);e<i;)o[e]=n(r,r=t[++e]);return o},F.permute=function(t,n){for(var e=n.length,i=new Array(e);e--;)i[e]=t[n[e]];return i},F.quantile=u,F.range=T,F.scan=function(t,n){if(e=t.length){var e,i,r=0,o=0,a=t[o];for(null==n&&(n=s);++r<e;)(n(i=t[r],a)<0||0!==n(a,a))&&(a=i,o=r);return 0===n(a,a)?o:void 0}},F.shuffle=function(t,n,e){for(var i,r,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)r=Math.random()*o--|0,i=t[o+n],t[o+n]=t[r+n],t[r+n]=i;return t},F.sum=function(t,n){var e,i=t.length,r=-1,o=0;if(null==n)for(;++r<i;)(e=+t[r])&&(o+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(o+=e);return o},F.ticks=p,F.tickIncrement=c,F.tickStep=P,F.transpose=n,F.variance=e,F.zip=function(){return n(arguments)},F.axisTop=function(t){return _(1,t)},F.axisRight=function(t){return _(2,t)},F.axisBottom=function(t){return _(3,t)},F.axisLeft=function(t){return _(4,t)},F.brush=function(){return $n(vc)},F.brushX=function(){return $n(mc)},F.brushY=function(){return $n(gc)},F.brushSelection=function(t){t=t.__brush;return t?t.dim.output(t.selection):null},F.chord=function(){function n(i){for(var t,n,e,r,o=i.length,a=[],s=T(o),u=[],l=[],h=l.groups=new Array(o),c=new Array(o*o),f=0,d=-1;++d<o;){for(t=0,r=-1;++r<o;)t+=i[d][r];a.push(t),u.push(T(o)),f+=t}for(w&&s.sort(function(t,n){return w(a[t],a[n])}),M&&u.forEach(function(t,e){t.sort(function(t,n){return M(i[e][t],i[e][n])})}),e=(f=Sc(0,Cc-x*o)/f)?x:Cc/o,t=0,d=-1;++d<o;){for(n=t,r=-1;++r<o;){var p=s[d],_=u[p][r],m=i[p][_],g=t,v=t+=m*f;c[_*o+p]={index:p,subindex:_,startAngle:g,endAngle:v,value:m}}h[p]={index:p,startAngle:n,endAngle:t,value:a[p]},t+=e}for(d=-1;++d<o;)for(r=d-1;++r<o;){var y=c[r*o+d],b=c[d*o+r];(y.value||b.value)&&l.push(y.value<b.value?{source:b,target:y}:{source:y,target:b})}return L?l.sort(L):l}var x=0,w=null,M=null,L=null;return n.padAngle=function(t){return arguments.length?(x=Sc(0,t),n):x},n.sortGroups=function(t){return arguments.length?(w=t,n):w},n.sortSubgroups=function(t){return arguments.length?(M=t,n):M},n.sortChords=function(t){return arguments.length?(null==t?L=null:(L=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=e=t,n):L&&L._;var e},n},F.ribbon=function(){function n(){var t,n=Ec.call(arguments),e=l.apply(this,n),i=h.apply(this,n),r=+c.apply(this,(n[0]=e,n)),o=f.apply(this,n)-kc,a=d.apply(this,n)-kc,s=r*Lc(o),u=r*Tc(o),e=+c.apply(this,(n[0]=i,n)),i=f.apply(this,n)-kc,n=d.apply(this,n)-kc;if((p=p||(t=te())).moveTo(s,u),p.arc(0,0,r,o,a),o==i&&a==n||(p.quadraticCurveTo(0,0,e*Lc(i),e*Tc(i)),p.arc(0,0,e,i,n)),p.quadraticCurveTo(0,0,s,u),p.closePath(),t)return p=null,t+""||null}var l=ne,h=ee,c=ie,f=re,d=oe,p=null;return n.radius=function(t){return arguments.length?(c="function"==typeof t?t:Jn(+t),n):c},n.startAngle=function(t){return arguments.length?(f="function"==typeof t?t:Jn(+t),n):f},n.endAngle=function(t){return arguments.length?(d="function"==typeof t?t:Jn(+t),n):d},n.source=function(t){return arguments.length?(l=t,n):l},n.target=function(t){return arguments.length?(h=t,n):h},n.context=function(t){return arguments.length?(p=null==t?null:t,n):p},n},F.nest=function(){function f(t,e,i,r){if(e>=_.length)return null!=d&&t.sort(d),null!=p?p(t):t;for(var n,o,a,s=-1,u=t.length,l=_[e++],h=se(),c=i();++s<u;)(a=h.get(n=l(o=t[s])+""))?a.push(o):h.set(n,[o]);return h.each(function(t,n){r(c,n,f(t,e,i,r))}),c}var d,p,n,_=[],a=[];return n={object:function(t){return f(t,0,ue,le)},map:function(t){return f(t,0,he,ce)},entries:function(t){return function e(t,i){if(++i>_.length)return t;var r,o=a[i-1];return null!=p&&i>=_.length?r=t.entries():(r=[],t.each(function(t,n){r.push({key:n,values:e(t,i)})})),null!=o?r.sort(function(t,n){return o(t.key,n.key)}):r}(f(t,0,he,ce),0)},key:function(t){return _.push(t),n},sortKeys:function(t){return a[_.length-1]=t,n},sortValues:function(t){return d=t,n},rollup:function(t){return p=t,n}}},F.set=de,F.map=se,F.keys=function(t){var n,e=[];for(n in t)e.push(n);return e},F.values=function(t){var n,e=[];for(n in t)e.push(t[n]);return e},F.entries=function(t){var n,e=[];for(n in t)e.push({key:n,value:t[n]});return e},F.color=Ct,F.rgb=zt,F.hsl=Ot,F.lab=Zt,F.hcl=Ht,F.cubehelix=Yt,F.dispatch=z,F.drag=function(){function p(t){t.on("mousedown.drag",n).filter(m).on("touchstart.drag",r).on("touchmove.drag",o).on("touchend.drag touchcancel.drag",a).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function n(){var t;c||!f.apply(this,arguments)||(t=s("mouse",d.apply(this,arguments),dt,this,arguments))&&(ut(F.event.view).on("mousemove.drag",e,!0).on("mouseup.drag",i,!0),gt(F.event.view),_t(),h=!1,u=F.event.clientX,l=F.event.clientY,t("start"))}function e(){var t,n;mt(),h||(t=F.event.clientX-u,n=F.event.clientY-l,h=b<t*t+n*n),g.mouse("drag")}function i(){ut(F.event.view).on("mousemove.drag mouseup.drag",null),vt(F.event.view,h),mt(),g.mouse("end")}function r(){if(f.apply(this,arguments))for(var t,n=F.event.changedTouches,e=d.apply(this,arguments),i=n.length,r=0;r<i;++r)(t=s(n[r].identifier,e,pt,this,arguments))&&(_t(),t("start"))}function o(){for(var t,n=F.event.changedTouches,e=n.length,i=0;i<e;++i)(t=g[n[i].identifier])&&(mt(),t("drag"))}function a(){var t,n,e=F.event.changedTouches,i=e.length;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),t=0;t<i;++t)(n=g[e[t].identifier])&&(_t(),n("end"))}function s(r,o,a,s,u){var l,h,c,f=a(o,r),d=v.copy();if(rt(new bt(p,"beforestart",l,r,y,f[0],f[1],0,0,d),function(){return null!=(F.event.subject=l=_.apply(s,u))&&(h=l.x-f[0]||0,c=l.y-f[1]||0,!0)}))return function t(n){var e,i=f;switch(n){case"start":g[r]=t,e=y++;break;case"end":delete g[r],--y;case"drag":f=a(o,r),e=y}rt(new bt(p,n,l,r,e,f[0]+h,f[1]+c,f[0]-i[0],f[1]-i[1],d),d.apply,d,[n,s,u])}}var u,l,h,c,f=xt,d=wt,_=Mt,m=Lt,g={},v=z("start","drag","end"),y=0,b=0;return p.filter=function(t){return arguments.length?(f="function"==typeof t?t:yt(!!t),p):f},p.container=function(t){return arguments.length?(d="function"==typeof t?t:yt(t),p):d},p.subject=function(t){return arguments.length?(_="function"==typeof t?t:yt(t),p):_},p.touchable=function(t){return arguments.length?(m="function"==typeof t?t:yt(!!t),p):m},p.on=function(){var t=v.on.apply(v,arguments);return t===v?p:t},p.clickDistance=function(t){return arguments.length?(b=(t=+t)*t,p):Math.sqrt(b)},p},F.dragDisable=gt,F.dragEnable=vt,F.dsvFormat=_e,F.csvParse=Dc,F.csvParseRows=Zc,F.csvFormat=Fc,F.csvFormatRows=jc,F.tsvParse=qc,F.tsvParseRows=Wc,F.tsvFormat=Hc,F.tsvFormatRows=Vc,F.easeLinear=function(t){return+t},F.easeQuad=Rn,F.easeQuadIn=function(t){return t*t},F.easeQuadOut=function(t){return t*(2-t)},F.easeQuadInOut=Rn,F.easeCubic=Dn,F.easeCubicIn=function(t){return t*t*t},F.easeCubicOut=function(t){return--t*t*t+1},F.easeCubicInOut=Dn,F.easePoly=Qh,F.easePolyIn=$h,F.easePolyOut=Jh,F.easePolyInOut=Qh,F.easeSin=Zn,F.easeSinIn=function(t){return 1-Math.cos(t*nc)},F.easeSinOut=function(t){return Math.sin(t*nc)},F.easeSinInOut=Zn,F.easeExp=Fn,F.easeExpIn=function(t){return Math.pow(2,10*t-10)},F.easeExpOut=function(t){return 1-Math.pow(2,-10*t)},F.easeExpInOut=Fn,F.easeCircle=jn,F.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},F.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},F.easeCircleInOut=jn,F.easeBounce=Un,F.easeBounceIn=function(t){return 1-Un(1-t)},F.easeBounceOut=Un,F.easeBounceInOut=function(t){return((t*=2)<=1?1-Un(1-t):Un(t-1)+1)/2},F.easeBack=oc,F.easeBackIn=ic,F.easeBackOut=rc,F.easeBackInOut=oc,F.easeElastic=uc,F.easeElasticIn=sc,F.easeElasticOut=uc,F.easeElasticInOut=lc,F.forceCenter=function(o,a){function n(){for(var t,n=s.length,e=0,i=0,r=0;r<n;++r)e+=(t=s[r]).x,i+=t.y;for(e=e/n-o,i=i/n-a,r=0;r<n;++r)(t=s[r]).x-=e,t.y-=i}var s;return null==o&&(o=0),null==a&&(a=0),n.initialize=function(t){s=t},n.x=function(t){return arguments.length?(o=+t,n):o},n.y=function(t){return arguments.length?(a=+t,n):a},n},F.forceCollide=function(i){function n(){for(var t,n,s,u,l,h,c,e=o.length,i=0;i<d;++i)for(n=we(o,Te,Pe).visitAfter(r),t=0;t<e;++t)s=o[t],h=a[s.index],c=h*h,u=s.x+s.vx,l=s.y+s.vy,n.visit(function(t,n,e,i,r){var o=t.data,a=t.r,t=h+a;if(!o)return u+t<n||i<u-t||l+t<e||r<l-t;o.index>s.index&&((r=(i=u-o.x-o.vx)*i+(e=l-o.y-o.vy)*e)<t*t&&(0===i&&(r+=(i=ge())*i),0===e&&(r+=(e=ge())*e),r=(t-(r=Math.sqrt(r)))/r*f,s.vx+=(i*=r)*(t=(a*=a)/(c+a)),s.vy+=(e*=r)*t,o.vx-=i*(t=1-t),o.vy-=e*t))})}function r(t){if(t.data)return t.r=a[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function e(){if(o){var t,n,e=o.length;for(a=new Array(e),t=0;t<e;++t)n=o[t],a[n.index]=+i(n,t,o)}}var o,a,f=1,d=1;return"function"!=typeof i&&(i=me(null==i?1:+i)),n.initialize=function(t){o=t,e()},n.iterations=function(t){return arguments.length?(d=+t,n):d},n.strength=function(t){return arguments.length?(f=+t,n):f},n.radius=function(t){return arguments.length?(i="function"==typeof t?t:me(+t),e(),n):i},n},F.forceLink=function(l){function n(t){for(var n=0,e=l.length;n<p;++n)for(var i,r,o,a,s,u=0;u<e;++u)i=(s=l[u]).source,o=(r=s.target).x+r.vx-i.x-i.vx||ge(),a=r.y+r.vy-i.y-i.vy||ge(),o*=s=((s=Math.sqrt(o*o+a*a))-c[u])/s*t*h[u],a*=s,r.vx-=o*(s=f[u]),r.vy-=a*s,i.vx+=o*(s=1-s),i.vy+=a*s}function e(){if(s){var t,n=s.length,e=l.length,i=se(s,d),r=0;for(u=new Array(n);r<e;++r)(t=l[r]).index=r,"object"!=typeof t.source&&(t.source=Ce(i,t.source)),"object"!=typeof t.target&&(t.target=Ce(i,t.target)),u[t.source.index]=(u[t.source.index]||0)+1,u[t.target.index]=(u[t.target.index]||0)+1;for(r=0,f=new Array(e);r<e;++r)t=l[r],f[r]=u[t.source.index]/(u[t.source.index]+u[t.target.index]);h=new Array(e),o(),c=new Array(e),a()}}function o(){if(s)for(var t=0,n=l.length;t<n;++t)h[t]=+i(l[t],t,l)}function a(){if(s)for(var t=0,n=l.length;t<n;++t)c[t]=+r(l[t],t,l)}var h,c,s,u,f,d=ke,i=function(t){return 1/Math.min(u[t.source.index],u[t.target.index])},r=me(30),p=1;return null==l&&(l=[]),n.initialize=function(t){s=t,e()},n.links=function(t){return arguments.length?(l=t,e(),n):l},n.id=function(t){return arguments.length?(d=t,n):d},n.iterations=function(t){return arguments.length?(p=+t,n):p},n.strength=function(t){return arguments.length?(i="function"==typeof t?t:me(+t),o(),n):i},n.distance=function(t){return arguments.length?(r="function"==typeof t?t:me(+t),a(),n):r},n},F.forceManyBody=function(){function n(t){var n,e=a.length,i=we(a,Se,Ee).visitAfter(r);for(l=t,n=0;n<e;++n)u=a[n],i.visit(o)}function e(){if(a){var t,n,e=a.length;for(h=new Array(e),t=0;t<e;++t)n=a[t],h[n.index]=+i(n,t,a)}}function r(t){var n,e,i,r,o,a=0,s=0;if(t.length){for(i=r=o=0;o<4;++o)(n=t[o])&&(e=Math.abs(n.value))&&(a+=n.value,s+=e,i+=e*n.x,r+=e*n.y);t.x=i/s,t.y=r/s}else for((n=t).x=n.data.x,n.y=n.data.y;a+=h[n.data.index],n=n.next;);t.value=a}function o(t,n,e,i){if(!t.value)return!0;var r=t.x-u.x,o=t.y-u.y,a=i-n,s=r*r+o*o;if(a*a/d<s)return s<f&&(0===r&&(s+=(r=ge())*r),0===o&&(s+=(o=ge())*o),s<c&&(s=Math.sqrt(c*s)),u.vx+=r*t.value*l/s,u.vy+=o*t.value*l/s),!0;if(!(t.length||f<=s))for(t.data===u&&!t.next||(0===r&&(r=ge(),s+=r*r),0===o&&(o=ge(),s+=o*o),s<c&&(s=Math.sqrt(c*s)));t.data!==u&&(a=h[t.data.index]*l/s,u.vx+=r*a,u.vy+=o*a),t=t.next;);}var a,u,l,h,i=me(-30),c=1,f=1/0,d=.81;return n.initialize=function(t){a=t,e()},n.strength=function(t){return arguments.length?(i="function"==typeof t?t:me(+t),e(),n):i},n.distanceMin=function(t){return arguments.length?(c=t*t,n):Math.sqrt(c)},n.distanceMax=function(t){return arguments.length?(f=t*t,n):Math.sqrt(f)},n.theta=function(t){return arguments.length?(d=t*t,n):Math.sqrt(d)},n},F.forceRadial=function(e,s,u){function n(t){for(var n=0,e=l.length;n<e;++n){var i=l[n],r=i.x-s||1e-6,o=i.y-u||1e-6,a=Math.sqrt(r*r+o*o),a=(c[n]-a)*h[n]*t/a;i.vx+=r*a,i.vy+=o*a}}function i(){if(l){var t,n=l.length;for(h=new Array(n),c=new Array(n),t=0;t<n;++t)c[t]=+e(l[t],t,l),h[t]=isNaN(c[t])?0:+r(l[t],t,l)}}var l,h,c,r=me(.1);return"function"!=typeof e&&(e=me(+e)),null==s&&(s=0),null==u&&(u=0),n.initialize=function(t){l=t,i()},n.strength=function(t){return arguments.length?(r="function"==typeof t?t:me(+t),i(),n):r},n.radius=function(t){return arguments.length?(e="function"==typeof t?t:me(+t),i(),n):e},n.x=function(t){return arguments.length?(s=+t,n):s},n.y=function(t){return arguments.length?(u=+t,n):u},n},F.forceSimulation=function(u){function t(){n(),d.call("tick",r),o<a&&(f.stop(),d.call("end",r))}function n(){var t,n,e=u.length;for(o+=(l-o)*s,c.each(function(t){t(o)}),t=0;t<e;++t)null==(n=u[t]).fx?n.x+=n.vx*=h:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=h:(n.y=n.fy,n.vy=0)}function e(){for(var t,n,e,i=0,r=u.length;i<r;++i)(e=u[i]).index=i,(isNaN(e.x)||isNaN(e.y))&&(t=10*Math.sqrt(i),n=i*Xc,e.x=t*Math.cos(n),e.y=t*Math.sin(n)),(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}function i(t){return t.initialize&&t.initialize(u),t}var r,o=1,a=.001,s=1-Math.pow(a,1/300),l=0,h=.6,c=se(),f=wn(t),d=z("tick","end");return null==u&&(u=[]),e(),r={tick:n,restart:function(){return f.restart(t),r},stop:function(){return f.stop(),r},nodes:function(t){return arguments.length?(u=t,e(),c.each(i),r):u},alpha:function(t){return arguments.length?(o=+t,r):o},alphaMin:function(t){return arguments.length?(a=+t,r):a},alphaDecay:function(t){return arguments.length?(s=+t,r):+s},alphaTarget:function(t){return arguments.length?(l=+t,r):l},velocityDecay:function(t){return arguments.length?(h=1-t,r):1-h},force:function(t,n){return 1<arguments.length?(null==n?c.remove(t):c.set(t,i(n)),r):c.get(t)},find:function(t,n,e){var i,r,o,a=0,s=u.length;for(null==e?e=1/0:e*=e,a=0;a<s;++a)(i=(i=t-(r=u[a]).x)*i+(i=n-r.y)*i)<e&&(o=r,e=i);return o},on:function(t,n){return 1<arguments.length?(d.on(t,n),r):d.on(t)}}},F.forceX=function(e){function n(t){for(var n,e=0,i=r.length;e<i;++e)(n=r[e]).vx+=(a[e]-n.x)*o[e]*t}function i(){if(r){var t,n=r.length;for(o=new Array(n),a=new Array(n),t=0;t<n;++t)o[t]=isNaN(a[t]=+e(r[t],t,r))?0:+s(r[t],t,r)}}var r,o,a,s=me(.1);return"function"!=typeof e&&(e=me(null==e?0:+e)),n.initialize=function(t){r=t,i()},n.strength=function(t){return arguments.length?(s="function"==typeof t?t:me(+t),i(),n):s},n.x=function(t){return arguments.length?(e="function"==typeof t?t:me(+t),i(),n):e},n},F.forceY=function(e){function n(t){for(var n,e=0,i=r.length;e<i;++e)(n=r[e]).vy+=(a[e]-n.y)*o[e]*t}function i(){if(r){var t,n=r.length;for(o=new Array(n),a=new Array(n),t=0;t<n;++t)o[t]=isNaN(a[t]=+e(r[t],t,r))?0:+s(r[t],t,r)}}var r,o,a,s=me(.1);return"function"!=typeof e&&(e=me(null==e?0:+e)),n.initialize=function(t){r=t,i()},n.strength=function(t){return arguments.length?(s="function"==typeof t?t:me(+t),i(),n):s},n.y=function(t){return arguments.length?(e="function"==typeof t?t:me(+t),i(),n):e},n},F.formatDefaultLocale=De,F.formatLocale=Re,F.formatSpecifier=Ie,F.precisionFixed=Ze,F.precisionPrefix=Fe,F.precisionRound=je,F.geoArea=function(t){return nd.reset(),Je(t,ed),2*nd},F.geoBounds=function(t){var n,e,i,r,o,a,s;if(lf=uf=-(af=sf=1/0),pf=[],Je(t,rd),e=pf.length){for(pf.sort(vi),n=1,o=[i=pf[0]];n<e;++n)yi(i,(r=pf[n])[0])||yi(i,r[1])?(gi(i[0],r[1])>gi(i[0],i[1])&&(i[1]=r[1]),gi(r[0],i[1])>gi(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(a=-1/0,n=0,i=o[e=o.length-1];n<=e;i=r,++n)r=o[n],(s=gi(i[1],r[0]))>a&&(a=s,af=r[0],uf=i[1])}return pf=_f=null,af===1/0||sf===1/0?[[NaN,NaN],[NaN,NaN]]:[[af,sf],[uf,lf]]},F.geoCentroid=function(t){mf=gf=vf=yf=bf=xf=wf=Mf=Lf=Tf=Pf=0,Je(t,od);var n=Lf,e=Tf,i=Pf,t=n*n+e*e+i*i;return t<1e-12&&(n=xf,e=wf,i=Mf,gf<Nf&&(n=vf,e=yf,i=bf),(t=n*n+e*e+i*i)<1e-12)?[NaN,NaN]:[Uf(e,n)*Df,Ve(i/Kf(t))*Df]},F.geoCircle=function(){function n(){var t=o.apply(this,arguments),n=a.apply(this,arguments)*Zf,e=s.apply(this,arguments)*Zf;return i=[],r=Ni(-t[0]*Zf,-t[1]*Zf,0).invert,Di(u,n,e,1),t={type:"Polygon",coordinates:[i]},i=r=null,t}var i,r,o=Ei([0,0]),a=Ei(90),s=Ei(6),u={point:function(t,n){i.push(t=r(t,n)),t[0]*=Df,t[1]*=Df}};return n.center=function(t){return arguments.length?(o="function"==typeof t?t:Ei([+t[0],+t[1]]),n):o},n.radius=function(t){return arguments.length?(a="function"==typeof t?t:Ei(+t),n):a},n.precision=function(t){return arguments.length?(s="function"==typeof t?t:Ei(+t),n):s},n},F.geoClipAntimeridian=vd,F.geoClipCircle=Xi,F.geoClipExtent=function(){var n,e,i,r=0,o=0,a=960,s=500;return i={stream:function(t){return n&&e===t?n:n=Ki(r,o,a,s)(e=t)},extent:function(t){return arguments.length?(r=+t[0][0],o=+t[0][1],a=+t[1][0],s=+t[1][1],n=e=null,i):[[r,o],[a,s]]}}},F.geoClipRectangle=Ki,F.geoContains=function(t,n){return(t&&Td.hasOwnProperty(t.type)?Td[t.type]:er)(t,n)},F.geoDistance=nr,F.geoGraticule=hr,F.geoGraticule10=function(){return hr()()},F.geoInterpolate=function(t,n){var e=t[0]*Zf,i=t[1]*Zf,r=n[0]*Zf,o=n[1]*Zf,t=qf(i),a=Gf(i),n=qf(o),s=Gf(o),u=t*qf(e),l=t*Gf(e),h=n*qf(r),c=n*Gf(r),f=2*Ve(Kf(Ye(o-i)+t*n*Ye(r-e))),d=Gf(f),r=f?function(t){var n=Gf(t*=f)/d,e=Gf(f-t)/d,i=e*u+n*h,t=e*l+n*c,n=e*a+n*s;return[Uf(t,i)*Df,Uf(n,Kf(i*i+t*t))*Df]}:function(){return[e*Df,i*Df]};return r.distance=f,r},F.geoLength=tr,F.geoPath=function(n,e){function i(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),Je(t,r(o))),o.result()}var r,o,a=4.5;return i.area=function(t){return Je(t,r(Sd)),Sd.result()},i.measure=function(t){return Je(t,r($d)),$d.result()},i.bounds=function(t){return Je(t,r(Id)),Id.result()},i.centroid=function(t){return Je(t,r(Wd)),Wd.result()},i.projection=function(t){return arguments.length?(r=null==t?(n=null,cr):(n=t).stream,i):n},i.context=function(t){return arguments.length?(o=null==t?(e=null,new Cr):new Tr(e=t),"function"!=typeof a&&o.pointRadius(a),i):e},i.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(o.pointRadius(+t),+t),i):a},i.projection(n).context(e)},F.geoAlbers=qr,F.geoAlbersUsa=function(){function e(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(s.point(n,t),i)||(u.point(n,t),i)}function r(){return n=o=null,e}var n,o,a,s,u,i,l=qr(),h=Ur().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Ur().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){i=[t,n]}};return e.invert=function(t){var n=l.scale(),e=l.translate(),i=(t[0]-e[0])/n,n=(t[1]-e[1])/n;return(.12<=n&&n<.234&&-.425<=i&&i<-.214?h:.166<=n&&n<.234&&-.214<=i&&i<-.115?c:l).invert(t)},e.stream=function(t){return n&&o===t?n:(i=[l.stream(o=t),h.stream(t),c.stream(t)],r=i.length,n={point:function(t,n){for(var e=-1;++e<r;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<r;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<r;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<r;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<r;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<r;)i[t].polygonEnd()}});var i,r},e.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),c.precision(t),r()):l.precision()},e.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),c.scale(t),e.translate(l.translate())):l.scale()},e.translate=function(t){if(!arguments.length)return l.translate();var n=l.scale(),e=+t[0],i=+t[1];return a=l.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(f),s=h.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+Nf,i+.12*n+Nf],[e-.214*n-Nf,i+.234*n-Nf]]).stream(f),u=c.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+Nf,i+.166*n+Nf],[e-.115*n-Nf,i+.234*n-Nf]]).stream(f),r()},e.fitExtent=function(t,n){return Nr(e,t,n)},e.fitSize=function(t,n){return Ir(e,t,n)},e.fitWidth=function(t,n){return Or(e,t,n)},e.fitHeight=function(t,n){return Br(e,t,n)},e.scale(1070)},F.geoAzimuthalEqualArea=function(){return Dr(np).scale(124.75).clipAngle(179.999)},F.geoAzimuthalEqualAreaRaw=np,F.geoAzimuthalEquidistant=function(){return Dr(ep).scale(79.4188).clipAngle(179.999)},F.geoAzimuthalEquidistantRaw=ep,F.geoConicConformal=function(){return Fr(Xr).scale(109.5).parallels([30,30])},F.geoConicConformalRaw=Xr,F.geoConicEqualArea=Ur,F.geoConicEqualAreaRaw=jr,F.geoConicEquidistant=function(){return Fr($r).scale(131.154).center([0,13.9389])},F.geoConicEquidistantRaw=$r,F.geoEquirectangular=function(){return Dr(Kr).scale(152.63)},F.geoEquirectangularRaw=Kr,F.geoGnomonic=function(){return Dr(Jr).scale(144.049).clipAngle(60)},F.geoGnomonicRaw=Jr,F.geoIdentity=function(){function n(){return o=a=null,s}var e,i,r,o,a,s,u=1,l=0,h=0,c=1,f=1,d=cr,p=null,_=cr;return s={stream:function(t){return o&&a===t?o:o=d(_(a=t))},postclip:function(t){return arguments.length?(_=t,p=e=i=r=null,n()):_},clipExtent:function(t){return arguments.length?(_=null==t?(p=e=i=r=null,cr):Ki(p=+t[0][0],e=+t[0][1],i=+t[1][0],r=+t[1][1]),n()):null==p?null:[[p,e],[i,r]]},scale:function(t){return arguments.length?(d=Qr((u=+t)*c,u*f,l,h),n()):u},translate:function(t){return arguments.length?(d=Qr(u*c,u*f,l=+t[0],h=+t[1]),n()):[l,h]},reflectX:function(t){return arguments.length?(d=Qr(u*(c=t?-1:1),u*f,l,h),n()):c<0},reflectY:function(t){return arguments.length?(d=Qr(u*c,u*(f=t?-1:1),l,h),n()):f<0},fitExtent:function(t,n){return Nr(s,t,n)},fitSize:function(t,n){return Ir(s,t,n)},fitWidth:function(t,n){return Or(s,t,n)},fitHeight:function(t,n){return Br(s,t,n)}}},F.geoProjection=Dr,F.geoProjectionMutator=Zr,F.geoMercator=function(){return Yr(Vr).scale(961/Rf)},F.geoMercatorRaw=Vr,F.geoNaturalEarth1=function(){return Dr(to).scale(175.295)},F.geoNaturalEarth1Raw=to,F.geoOrthographic=function(){return Dr(no).scale(249.5).clipAngle(90+Nf)},F.geoOrthographicRaw=no,F.geoStereographic=function(){return Dr(eo).scale(250).clipAngle(142)},F.geoStereographicRaw=eo,F.geoTransverseMercator=function(){var t=Yr(io),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],2<t.length?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},F.geoTransverseMercatorRaw=io,F.geoRotation=Ri,F.geoStream=Je,F.geoTransform=function(t){return{stream:Er(t)}},F.cluster=function(){function n(n){var i,r=0;n.eachAfter(function(t){var n,e=t.children;e?(t.x=(n=e).reduce(oo,0)/n.length,t.y=1+e.reduce(ao,0)):(t.x=i?r+=s(t,i):0,t.y=0,i=t)});var t=function(t){for(var n;n=t.children;)t=n[0];return t}(n),e=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(n),o=t.x-s(t,e)/2,a=e.x+s(e,t)/2;return n.eachAfter(h?function(t){t.x=(t.x-n.x)*u,t.y=(n.y-t.y)*l}:function(t){t.x=(t.x-o)/(a-o)*u,t.y=(1-(n.y?t.y/n.y:1))*l})}var s=ro,u=1,l=1,h=!1;return n.separation=function(t){return arguments.length?(s=t,n):s},n.size=function(t){return arguments.length?(h=!1,u=+t[0],l=+t[1],n):h?null:[u,l]},n.nodeSize=function(t){return arguments.length?(h=!0,u=+t[0],l=+t[1],n):h?[u,l]:null},n},F.hierarchy=uo,F.pack=function(){function n(t){return t.x=i/2,t.y=r/2,e?t.eachBefore(So(e)).eachAfter(Eo(o,.5)).eachBefore(Ao(1)):t.eachBefore(So(Co)).eachAfter(Eo(Po,1)).eachAfter(Eo(o,t.r/Math.min(i,r))).eachBefore(Ao(Math.min(i,r)/(2*t.r))),t}var e=null,i=1,r=1,o=Po;return n.radius=function(t){return arguments.length?(e=null==t?null:To(t),n):e},n.size=function(t){return arguments.length?(i=+t[0],r=+t[1],n):[i,r]},n.padding=function(t){return arguments.length?(o="function"==typeof t?t:ko(+t),n):o},n},F.packSiblings=function(t){return Lo(t),t},F.packEnclose=po,F.partition=function(){function n(t){var o,a,n=t.height+1;return t.x0=t.y0=s,t.x1=e,t.y1=i/n,t.eachBefore((o=i,a=n,function(t){t.children&&No(t,t.x0,o*(t.depth+1)/a,t.x1,o*(t.depth+2)/a);var n=t.x0,e=t.y0,i=t.x1-s,r=t.y1-s;i<n&&(n=i=(n+i)/2),r<e&&(e=r=(e+r)/2),t.x0=n,t.y0=e,t.x1=i,t.y1=r})),r&&t.eachBefore(zo),t}var e=1,i=1,s=0,r=!1;return n.round=function(t){return arguments.length?(r=!!t,n):r},n.size=function(t){return arguments.length?(e=+t[0],i=+t[1],n):[e,i]},n.padding=function(t){return arguments.length?(s=+t,n):s},n},F.stratify=function(){function n(t){for(var n,e,i,r,o,a=t.length,s=new Array(a),u={},l=0;l<a;++l)o=t[l],i=s[l]=new fo(o),null!=(r=h(o,l,t))&&(r+="")&&(u[o="$"+(i.id=r)]=o in u?op:i);for(l=0;l<a;++l)if(i=s[l],null!=(r=c(t[l],l,t))&&(r+="")){if(!(e=u["$"+r]))throw new Error("missing: "+r);if(e===op)throw new Error("ambiguous: "+r);e.children?e.children.push(i):e.children=[i],i.parent=e}else{if(n)throw new Error("multiple roots");n=i}if(!n)throw new Error("no root");if(n.parent=rp,n.eachBefore(function(t){t.depth=t.parent.depth+1,--a}).eachBefore(co),n.parent=null,0<a)throw new Error("cycle");return n}var h=Io,c=Oo;return n.id=function(t){return arguments.length?(h=To(t),n):h},n.parentId=function(t){return arguments.length?(c=To(t),n):c},n},F.tree=function(){function n(s){var n,e,i,r,o,a,t=function(){for(var t,n,e,i,r,o=new Zo(s,0),a=[o];t=a.pop();)if(e=t._.children)for(t.children=new Array(r=e.length),i=r-1;0<=i;--i)a.push(n=t.children[i]=new Zo(e[i],i)),n.parent=t;return(o.parent=new Zo(null,0)).children=[o],o}();return t.eachAfter(u),t.parent.m=-t.z,t.eachBefore(l),d?s.eachBefore(h):((i=e=n=s).eachBefore(function(t){t.x<n.x&&(n=t),t.x>e.x&&(e=t),t.depth>i.depth&&(i=t)}),t=n===e?1:m(n,e)/2,r=t-n.x,o=c/(e.x+t+r),a=f/(i.depth||1),s.eachBefore(function(t){t.x=(t.x+r)*o,t.y=t.depth*a})),s}function u(o){var t=o.children,n=o.parent.children,_=o.i?n[o.i-1]:null;t?(function(){for(var t,n=0,e=0,i=o.children,r=i.length;0<=--r;)(t=i[r]).z+=n,t.m+=n,n+=t.s+(e+=t.c)}(),t=(t[0].z+t[t.length-1].z)/2,_?(o.z=_.z+m(o._,_._),o.m=o.z-t):o.z=t):_&&(o.z=_.z+m(o._,_._)),o.parent.A=function(t,n){if(_){for(var e,i=t,r=t,o=_,a=i.parent.children[0],s=i.m,u=r.m,l=o.m,h=a.m;o=Do(o),i=Ro(i),o&&i;)a=Ro(a),(r=Do(r)).a=t,0<(e=o.z+l-i.z-s+m(o._,i._))&&(d=t,p=n,c=(f=o).a.parent===d.parent?f.a:p,d=void 0,d=(f=e)/((p=t).i-c.i),p.c-=d,p.s+=f,c.c+=d,p.z+=f,p.m+=f,s+=e,u+=e),l+=o.m,s+=i.m,h+=a.m,u+=r.m;o&&!Do(r)&&(r.t=o,r.m+=l-u),i&&!Ro(a)&&(a.t=i,a.m+=s-h,n=t)}var c,f,d,p;return n}(o,o.parent.A||n[0])}function l(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function h(t){t.x*=c,t.y=t.depth*f}var m=Bo,c=1,f=1,d=null;return n.separation=function(t){return arguments.length?(m=t,n):m},n.size=function(t){return arguments.length?(d=!1,c=+t[0],f=+t[1],n):d?null:[c,f]},n.nodeSize=function(t){return arguments.length?(d=!0,c=+t[0],f=+t[1],n):d?[c,f]:null},n},F.treemap=function(){function n(t){return t.x0=t.y0=0,t.x1=r,t.y1=o,t.eachBefore(e),s=[0],i&&t.eachBefore(zo),t}function e(t){var n=s[t.depth],e=t.x0+n,i=t.y0+n,r=t.x1-n,o=t.y1-n;r<e&&(e=r=(e+r)/2),o<i&&(i=o=(i+o)/2),t.x0=e,t.y0=i,t.x1=r,t.y1=o,t.children&&(n=s[t.depth+1]=u(t)/2,e+=f(t)-n,i+=l(t)-n,(r-=h(t)-n)<e&&(e=r=(e+r)/2),(o-=c(t)-n)<i&&(i=o=(i+o)/2),a(t,e,i,r,o))}var a=sp,i=!1,r=1,o=1,s=[0],u=Po,l=Po,h=Po,c=Po,f=Po;return n.round=function(t){return arguments.length?(i=!!t,n):i},n.size=function(t){return arguments.length?(r=+t[0],o=+t[1],n):[r,o]},n.tile=function(t){return arguments.length?(a=To(t),n):a},n.padding=function(t){return arguments.length?n.paddingInner(t).paddingOuter(t):n.paddingInner()},n.paddingInner=function(t){return arguments.length?(u="function"==typeof t?t:ko(+t),n):u},n.paddingOuter=function(t){return arguments.length?n.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):n.paddingTop()},n.paddingTop=function(t){return arguments.length?(l="function"==typeof t?t:ko(+t),n):l},n.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:ko(+t),n):h},n.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:ko(+t),n):c},n.paddingLeft=function(t){return arguments.length?(f="function"==typeof t?t:ko(+t),n):f},n},F.treemapBinary=function(t,n,e,i,r){var o,a,_=t.children,s=_.length,m=new Array(s+1);for(m[0]=a=o=0;o<s;++o)m[o+1]=a+=_[o].value;!function t(n,e,i,r,o,a,s){if(e-1<=n){var u=_[n];return u.x0=r,u.y0=o,u.x1=a,u.y1=s,0}for(var l=m[n],h=i/2+l,c=n+1,f=e-1;c<f;){var d=c+f>>>1;m[d]<h?c=1+d:f=d}h-m[c-1]<m[c]-h&&n+1<c&&--c;var p=m[c]-l,u=i-p;s-o<a-r?(t(n,c,p,r,o,l=(r*u+a*p)/i,s),t(c,e,u,l,o,a,s)):(t(n,c,p,r,o,a,i=(o*u+s*p)/i),t(c,e,u,r,i,a,s))}(0,s,t.value,n,e,i,r)},F.treemapDice=No,F.treemapSlice=Fo,F.treemapSliceDice=function(t,n,e,i,r){(1&t.depth?Fo:No)(t,n,e,i,r)},F.treemapSquarify=sp,F.treemapResquarify=up,F.interpolate=hn,F.interpolateArray=on,F.interpolateBasis=Kt,F.interpolateBasisClosed=$t,F.interpolateDate=an,F.interpolateNumber=sn,F.interpolateObject=un,F.interpolateRound=cn,F.interpolateString=ln,F.interpolateTransformCss=xh,F.interpolateTransformSvg=wh,F.interpolateZoom=_n,F.interpolateRgb=ph,F.interpolateRgbBasis=_h,F.interpolateRgbBasisClosed=mh,F.interpolateHsl=Lh,F.interpolateHslLong=Th,F.interpolateLab=function(n,t){var e=en((n=Zt(n)).l,(t=Zt(t)).l),i=en(n.a,t.a),r=en(n.b,t.b),o=en(n.opacity,t.opacity);return function(t){return n.l=e(t),n.a=i(t),n.b=r(t),n.opacity=o(t),n+""}},F.interpolateHcl=Ph,F.interpolateHclLong=kh,F.interpolateCubehelix=Ch,F.interpolateCubehelixLong=Sh,F.quantize=function(t,n){for(var e=new Array(n),i=0;i<n;++i)e[i]=t(i/(n-1));return e},F.path=te,F.polygonArea=function(t){for(var n,e=-1,i=t.length,r=t[i-1],o=0;++e<i;)n=r,r=t[e],o+=n[1]*r[0]-n[0]*r[1];return o/2},F.polygonCentroid=function(t){for(var n,e,i=-1,r=t.length,o=0,a=0,s=t[r-1],u=0;++i<r;)n=s,s=t[i],u+=e=n[0]*s[1]-s[0]*n[1],o+=(n[0]+s[0])*e,a+=(n[1]+s[1])*e;return[o/(u*=3),a/u]},F.polygonHull=function(t){if((n=t.length)<3)return null;for(var n,e=new Array(n),i=new Array(n),r=0;r<n;++r)e[r]=[+t[r][0],+t[r][1],r];for(e.sort(Uo),r=0;r<n;++r)i[r]=[e[r][0],-e[r][1]];var o=qo(e),a=qo(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],l=[];for(r=o.length-1;0<=r;--r)l.push(t[e[o[r]][2]]);for(r=+s;r<a.length-u;++r)l.push(t[e[a[r]][2]]);return l},F.polygonContains=function(t,n){for(var e,i,r=t.length,o=t[r-1],a=n[0],s=n[1],u=o[0],l=o[1],h=!1,c=0;c<r;++c)e=(o=t[c])[0],(i=o[1])>s!=s<l&&a<(u-e)*(s-i)/(l-i)+e&&(h=!h),u=e,l=i;return h},F.polygonLength=function(t){for(var n,e,i=-1,r=t.length,o=t[r-1],a=o[0],s=o[1],u=0;++i<r;)n=a,e=s,n-=a=(o=t[i])[0],e-=s=o[1],u+=Math.sqrt(n*n+e*e);return u},F.quadtree=we,F.queue=Go,F.randomUniform=cp,F.randomNormal=fp,F.randomLogNormal=dp,F.randomBates=_p,F.randomIrwinHall=pp,F.randomExponential=mp,F.request=Ko,F.html=gp,F.json=vp,F.text=yp,F.xml=bp,F.csv=xp,F.tsv=wp,F.scaleBand=ta,F.scalePoint=function(){return function t(n){var e=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=function(){return t(e())},n}(ta().paddingInner(1))},F.scaleIdentity=function t(){function n(t){return+t}var e=[0,1];return(n.invert=n).domain=n.range=function(t){return arguments.length?(e=Lp.call(t,ea),n):e.slice()},n.copy=function(){return t().domain(e)},ua(n)},F.scaleLinear=function t(){var n=sa(ia,sn);return n.copy=function(){return aa(n,t())},ua(n)},F.scaleLog=function t(){function n(){return f=pa(c),d=da(c),h()[0]<0&&(f=_a(f),d=_a(d)),r}var r=sa(ha,ca).domain([1,10]),h=r.domain,c=10,f=pa(10),d=da(10);return r.base=function(t){return arguments.length?(c=+t,n()):c},r.domain=function(t){return arguments.length?(h(t),n()):h()},r.ticks=function(t){var n=h(),e=n[0],i=n[n.length-1];(n=i<e)&&(s=e,e=i,i=s);var r,o,a,s=f(e),u=f(i),t=null==t?10:+t,l=[];if(!(c%1)&&u-s<t){if(s=Math.round(s)-1,u=Math.round(u)+1,0<e){for(;s<u;++s)for(o=1,r=d(s);o<c;++o)if(!((a=r*o)<e)){if(i<a)break;l.push(a)}}else for(;s<u;++s)for(o=c-1,r=d(s);1<=o;--o)if(!((a=r*o)<e)){if(i<a)break;l.push(a)}}else l=p(s,u,Math.min(u-s,t)).map(d);return n?l.reverse():l},r.tickFormat=function(t,e){if(null==e&&(e=10===c?".0e":","),"function"!=typeof e&&(e=F.format(e)),t===1/0)return e;null==t&&(t=10);var i=Math.max(1,c*t/r.ticks().length);return function(t){var n=t/d(Math.round(f(t)));return n*c<c-.5&&(n*=c),n<=i?e(t):""}},r.nice=function(){return h(la(h(),{floor:function(t){return d(Math.floor(f(t)))},ceil:function(t){return d(Math.ceil(f(t)))}}))},r.copy=function(){return aa(r,t().base(c))},r},F.scaleOrdinal=Qo,F.scaleImplicit=Pp,F.scalePow=ga,F.scaleSqrt=function(){return ga().exponent(.5)},F.scaleQuantile=function t(){function r(){var t=0,n=Math.max(1,i.length);for(a=new Array(n-1);++t<n;)a[t-1]=u(o,t/n);return e}function e(t){if(!isNaN(t=+t))return i[vl(a,t)]}var o=[],i=[],a=[];return e.invertExtent=function(t){return(t=i.indexOf(t))<0?[NaN,NaN]:[0<t?a[t-1]:o[0],t<a.length?a[t]:o[o.length-1]]},e.domain=function(t){if(!arguments.length)return o.slice();o=[];for(var n,e=0,i=t.length;e<i;++e)null==(n=t[e])||isNaN(n=+n)||o.push(n);return o.sort(s),r()},e.range=function(t){return arguments.length?(i=Tp.call(t),r()):i.slice()},e.quantiles=function(){return a.slice()},e.copy=function(){return t().domain(o).range(i)},e},F.scaleQuantize=function t(){function n(t){if(t<=t)return s[vl(a,t,0,o)]}function e(){var t=-1;for(a=new Array(o);++t<o;)a[t]=((t+1)*r-(t-o)*i)/(o+1);return n}var i=0,r=1,o=1,a=[.5],s=[0,1];return n.domain=function(t){return arguments.length?(i=+t[0],r=+t[1],e()):[i,r]},n.range=function(t){return arguments.length?(o=(s=Tp.call(t)).length-1,e()):s.slice()},n.invertExtent=function(t){return(t=s.indexOf(t))<0?[NaN,NaN]:t<1?[i,a[0]]:o<=t?[a[o-1],r]:[a[t-1],a[t]]},n.copy=function(){return t().domain([i,r]).range(s)},ua(n)},F.scaleThreshold=function t(){function n(t){if(t<=t)return i[vl(e,t,0,r)]}var e=[.5],i=[0,1],r=1;return n.domain=function(t){return arguments.length?(e=Tp.call(t),r=Math.min(e.length,i.length-1),n):e.slice()},n.range=function(t){return arguments.length?(i=Tp.call(t),r=Math.min(e.length,i.length-1),n):i.slice()},n.invertExtent=function(t){return t=i.indexOf(t),[e[t-1],e[t]]},n.copy=function(){return t().domain(e).range(i)},n},F.scaleTime=function(){return Is(e_,t_,Fp,Dp,Bp,Ip,zp,Ep,F.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},F.scaleUtc=function(){return Is(P_,L_,h_,u_,a_,r_,zp,Ep,F.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},F.schemeCategory10=q_,F.schemeCategory20b=W_,F.schemeCategory20c=H_,F.schemeCategory20=V_,F.interpolateCubehelixDefault=Y_,F.interpolateRainbow=function(t){(t<0||1<t)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return K_.h=360*t-100,K_.s=1.5-1.5*n,K_.l=.8-.9*n,K_+""},F.interpolateWarm=G_,F.interpolateCool=X_,F.interpolateViridis=$_,F.interpolateMagma=J_,F.interpolateInferno=gl,F.interpolatePlasma=bl,F.scaleSequential=function t(n){function e(t){return t=(t-i)/(r-i),n(o?Math.max(0,Math.min(1,t)):t)}var i=0,r=1,o=!1;return e.domain=function(t){return arguments.length?(i=+t[0],r=+t[1],e):[i,r]},e.clamp=function(t){return arguments.length?(o=!!t,e):o},e.interpolator=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return t(n).domain([i,r]).clamp(o)},ua(e)},F.create=function(t){return ut(y(t).call(document.documentElement))},F.creator=y,F.local=lt,F.matcher=zl,F.mouse=dt,F.namespace=v,F.namespaces=El,F.clientPoint=ft,F.select=ut,F.selectAll=function(t){return"string"==typeof t?new at([document.querySelectorAll(t)],[document.documentElement]):new at([null==t?[]:t],Il)},F.selection=st,F.selector=x,F.selectorAll=M,F.style=Z,F.touch=pt,F.touches=function(t,n){null==n&&(n=ct().touches);for(var e=0,i=n?n.length:0,r=new Array(i);e<i;++e)r[e]=ft(t,n[e]);return r},F.window=D,F.customEvent=rt,F.arc=function(){function n(){var t,n,e,i,r,o,a,s,u,l,h,c,f,d,p,_,m,g,v,y,b,x,w,M,L=+E.apply(this,arguments),T=+A.apply(this,arguments),P=I.apply(this,arguments)-um,k=O.apply(this,arguments)-um,C=Q_(k-P),S=P<k;if(R=R||(t=te()),T<L&&(y=T,T=L,L=y),am<T?lm-am<C?(R.moveTo(T*nm(P),T*rm(P)),R.arc(0,0,T,P,k,!S),am<L&&(R.moveTo(L*nm(k),L*rm(k)),R.arc(0,0,L,k,P,S))):(o=i=P,a=r=k,u=s=C,l=B.apply(this,arguments)/2,h=am<l&&(N?+N.apply(this,arguments):om(L*L+T*T)),y=v=c=im(Q_(T-L)/2,+z.apply(this,arguments)),am<h&&(f=Ds(h/L*rm(l)),d=Ds(h/T*rm(l)),(s-=2*f)>am?(o+=f*=S?1:-1,a-=f):(s=0,o=a=(P+k)/2),(u-=2*d)>am?(i+=d*=S?1:-1,r-=d):(u=0,i=r=(P+k)/2)),f=T*nm(i),d=T*rm(i),P=L*nm(a),k=L*rm(a),am<c&&(p=T*nm(r),_=T*rm(r),m=L*nm(o),g=L*rm(o),C<sm&&(C=am<s?[f+(w=((w=P-p)*(d-_)-(M=k-_)*(f-p))/(M*(b=m-f)-w*(x=g-d)))*b,d+w*x]:[P,k],x=1/rm((1<(x=((M=f-C[0])*(b=p-C[0])+(w=d-C[1])*(x=_-C[1]))/(om(M*M+w*w)*om(b*b+x*x)))?0:x<-1?sm:Math.acos(x))/2),C=om(C[0]*C[0]+C[1]*C[1]),v=im(c,(L-C)/(x-1)),y=im(c,(T-C)/(1+x)))),am<u?am<y?(n=Ws(m,g,f,d,T,y,S),e=Ws(p,_,P,k,T,y,S),R.moveTo(n.cx+n.x01,n.cy+n.y01),y<c?R.arc(n.cx,n.cy,y,tm(n.y01,n.x01),tm(e.y01,e.x01),!S):(R.arc(n.cx,n.cy,y,tm(n.y01,n.x01),tm(n.y11,n.x11),!S),R.arc(0,0,T,tm(n.cy+n.y11,n.cx+n.x11),tm(e.cy+e.y11,e.cx+e.x11),!S),R.arc(e.cx,e.cy,y,tm(e.y11,e.x11),tm(e.y01,e.x01),!S))):(R.moveTo(f,d),R.arc(0,0,T,i,r,!S)):R.moveTo(f,d),am<L&&am<s?am<v?(n=Ws(P,k,p,_,L,-v,S),e=Ws(f,d,m,g,L,-v,S),R.lineTo(n.cx+n.x01,n.cy+n.y01),v<c?R.arc(n.cx,n.cy,v,tm(n.y01,n.x01),tm(e.y01,e.x01),!S):(R.arc(n.cx,n.cy,v,tm(n.y01,n.x01),tm(n.y11,n.x11),!S),R.arc(0,0,L,tm(n.cy+n.y11,n.cx+n.x11),tm(e.cy+e.y11,e.cx+e.x11),S),R.arc(e.cx,e.cy,v,tm(e.y11,e.x11),tm(e.y01,e.x01),!S))):R.arc(0,0,L,a,o,S):R.lineTo(P,k)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}var E=Zs,A=Fs,z=Rs(0),N=null,I=js,O=Us,B=qs,R=null;return n.centroid=function(){var t=(+E.apply(this,arguments)+ +A.apply(this,arguments))/2,n=(+I.apply(this,arguments)+ +O.apply(this,arguments))/2-sm/2;return[nm(n)*t,rm(n)*t]},n.innerRadius=function(t){return arguments.length?(E="function"==typeof t?t:Rs(+t),n):E},n.outerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Rs(+t),n):A},n.cornerRadius=function(t){return arguments.length?(z="function"==typeof t?t:Rs(+t),n):z},n.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:Rs(+t),n):N},n.startAngle=function(t){return arguments.length?(I="function"==typeof t?t:Rs(+t),n):I},n.endAngle=function(t){return arguments.length?(O="function"==typeof t?t:Rs(+t),n):O},n.padAngle=function(t){return arguments.length?(B="function"==typeof t?t:Rs(+t),n):B},n.context=function(t){return arguments.length?(R=null==t?null:t,n):R},n},F.area=Ks,F.line=Xs,F.pie=function(){function n(e){for(var t,n,i,r,o=e.length,a=0,s=new Array(o),u=new Array(o),l=+g.apply(this,arguments),h=Math.min(lm,Math.max(-lm,v.apply(this,arguments)-l)),c=Math.min(Math.abs(h)/o,y.apply(this,arguments)),f=c*(h<0?-1:1),d=0;d<o;++d)0<(r=u[s[d]=d]=+p(e[d],d,e))&&(a+=r);for(null!=_?s.sort(function(t,n){return _(u[t],u[n])}):null!=m&&s.sort(function(t,n){return m(e[t],e[n])}),d=0,n=a?(h-o*f)/a:0;d<o;++d,l=i)t=s[d],i=l+(0<(r=u[t])?r*n:0)+f,u[t]={data:e[t],index:d,value:r,startAngle:l,endAngle:i,padAngle:c};return u}var p=Js,_=$s,m=null,g=Rs(0),v=Rs(lm),y=Rs(0);return n.value=function(t){return arguments.length?(p="function"==typeof t?t:Rs(+t),n):p},n.sortValues=function(t){return arguments.length?(_=t,m=null,n):_},n.sort=function(t){return arguments.length?(m=t,_=null,n):m},n.startAngle=function(t){return arguments.length?(g="function"==typeof t?t:Rs(+t),n):g},n.endAngle=function(t){return arguments.length?(v="function"==typeof t?t:Rs(+t),n):v},n.padAngle=function(t){return arguments.length?(y="function"==typeof t?t:Rs(+t),n):y},n},F.areaRadial=iu,F.radialArea=iu,F.lineRadial=eu,F.radialLine=eu,F.pointRadial=ru,F.linkHorizontal=function(){return su(uu)},F.linkVertical=function(){return su(lu)},F.linkRadial=function(){var t=su(hu);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},F.symbol=function(){function n(){var t;if(r=r||(t=te()),e.apply(this,arguments).draw(r,+i.apply(this,arguments)),t)return r=null,t+""||null}var e=Rs(fm),i=Rs(64),r=null;return n.type=function(t){return arguments.length?(e="function"==typeof t?t:Rs(t),n):e},n.size=function(t){return arguments.length?(i="function"==typeof t?t:Rs(+t),n):i},n.context=function(t){return arguments.length?(r=null==t?null:t,n):r},n},F.symbols=Ic,F.symbolCircle=fm,F.symbolCross=dm,F.symbolDiamond=Al,F.symbolSquare=Rl,F.symbolStar=Dl,F.symbolTriangle=Kh,F.symbolWye=Pc,F.curveBasisClosed=function(t){return new pu(t)},F.curveBasisOpen=function(t){return new _u(t)},F.curveBasis=function(t){return new du(t)},F.curveBundle=Rc,F.curveCardinalClosed=Yc,F.curveCardinalOpen=ap,F.curveCardinal=Uc,F.curveCatmullRomClosed=N_,F.curveCatmullRomOpen=Bl,F.curveCatmullRom=Mp,F.curveLinearClosed=function(t){return new Tu(t)},F.curveLinear=Vs,F.curveMonotoneX=function(t){return new Eu(t)},F.curveMonotoneY=function(t){return new Au(t)},F.curveNatural=function(t){return new Nu(t)},F.curveStep=function(t){return new Ou(t,.5)},F.curveStepAfter=function(t){return new Ou(t,1)},F.curveStepBefore=function(t){return new Ou(t,0)},F.stack=function(){function n(t){for(var n,e=c.apply(this,arguments),i=t.length,r=e.length,o=new Array(r),a=0;a<r;++a){for(var s,u=e[a],l=o[a]=new Array(i),h=0;h<i;++h)l[h]=s=[0,+p(t[h],u,h,t)],s.data=t[h];l.key=u}for(a=0,n=f(o);a<r;++a)o[n[a]].index=a;return d(o,n),o}var c=Rs([]),f=Ru,d=Bu,p=Du;return n.keys=function(t){return arguments.length?(c="function"==typeof t?t:Rs(cm.call(t)),n):c},n.value=function(t){return arguments.length?(p="function"==typeof t?t:Rs(+t),n):p},n.order=function(t){return arguments.length?(f=null==t?Ru:"function"==typeof t?t:Rs(cm.call(t)),n):f},n.offset=function(t){return arguments.length?(d=null==t?Bu:t,n):d},n},F.stackOffsetExpand=function(t,n){if(0<(i=t.length)){for(var e,i,r,o=0,a=t[0].length;o<a;++o){for(r=e=0;e<i;++e)r+=t[e][o][1]||0;if(r)for(e=0;e<i;++e)t[e][o][1]/=r}Bu(t,n)}},F.stackOffsetDiverging=function(t,n){if(1<(s=t.length))for(var e,i,r,o,a,s,u=0,l=t[n[0]].length;u<l;++u)for(e=o=a=0;e<s;++e)0<=(r=(i=t[n[e]][u])[1]-i[0])?(i[0]=o,i[1]=o+=r):r<0?(i[1]=a,i[0]=a+=r):i[0]=o},F.stackOffsetNone=Bu,F.stackOffsetSilhouette=function(t,n){if(0<(e=t.length)){for(var e,i=0,r=t[n[0]],o=r.length;i<o;++i){for(var a=0,s=0;a<e;++a)s+=t[a][i][1]||0;r[i][1]+=r[i][0]=-s/2}Bu(t,n)}},F.stackOffsetWiggle=function(t,n){if(0<(r=t.length)&&0<(i=(e=t[n[0]]).length)){for(var e,i,r,o=0,a=1;a<i;++a){for(var s=0,u=0,l=0;s<r;++s){for(var h=t[n[s]],c=h[a][1]||0,f=(c-(h[a-1][1]||0))/2,d=0;d<s;++d){var p=t[n[d]];f+=(p[a][1]||0)-(p[a-1][1]||0)}u+=c,l+=f*c}e[a-1][1]+=e[a-1][0]=o,u&&(o-=l/u)}e[a-1][1]+=e[a-1][0]=o,Bu(t,n)}},F.stackOrderAscending=Zu,F.stackOrderDescending=function(t){return Zu(t).reverse()},F.stackOrderInsideOut=function(t){for(var n,e=t.length,i=t.map(Fu),r=Ru(t).sort(function(t,n){return i[n]-i[t]}),o=0,a=0,s=[],u=[],l=0;l<e;++l)n=r[l],o<a?(o+=i[n],s.push(n)):(a+=i[n],u.push(n));return u.reverse().concat(s)},F.stackOrderNone=Ru,F.stackOrderReverse=function(t){return Ru(t).reverse()},F.timeInterval=va,F.timeMillisecond=Ep,F.timeMilliseconds=Ap,F.utcMillisecond=Ep,F.utcMilliseconds=Ap,F.timeSecond=zp,F.timeSeconds=Np,F.utcSecond=zp,F.utcSeconds=Np,F.timeMinute=Ip,F.timeMinutes=Op,F.timeHour=Bp,F.timeHours=Rp,F.timeDay=Dp,F.timeDays=Zp,F.timeWeek=Fp,F.timeWeeks=Yp,F.timeSunday=Fp,F.timeSundays=Yp,F.timeMonday=jp,F.timeMondays=Gp,F.timeTuesday=Up,F.timeTuesdays=Xp,F.timeWednesday=qp,F.timeWednesdays=Kp,F.timeThursday=Wp,F.timeThursdays=$p,F.timeFriday=Hp,F.timeFridays=Jp,F.timeSaturday=Vp,F.timeSaturdays=Qp,F.timeMonth=t_,F.timeMonths=n_,F.timeYear=e_,F.timeYears=i_,F.utcMinute=r_,F.utcMinutes=o_,F.utcHour=a_,F.utcHours=s_,F.utcDay=u_,F.utcDays=l_,F.utcWeek=h_,F.utcWeeks=g_,F.utcSunday=h_,F.utcSundays=g_,F.utcMonday=c_,F.utcMondays=v_,F.utcTuesday=f_,F.utcTuesdays=y_,F.utcWednesday=d_,F.utcWednesdays=b_,F.utcThursday=p_,F.utcThursdays=x_,F.utcFriday=__,F.utcFridays=w_,F.utcSaturday=m_,F.utcSaturdays=M_,F.utcMonth=L_,F.utcMonths=T_,F.utcYear=P_,F.utcYears=C_,F.timeFormatDefaultLocale=As,F.timeFormatLocale=La,F.isoFormat=I_,F.isoParse=O_,F.now=yn,F.timer=wn,F.timerFlush=Mn,F.timeout=kn,F.interval=function(e,i,r){var o=new xn,a=i;return null==i?o.restart(e,i,r):(i=+i,r=null==r?yn():+r,o.restart(function t(n){n+=a,o.restart(t,a+=i,r),e(n)},i,r)),o},F.transition=Bn,F.active=function(t,n){var e,i,r=t.__transition;if(r)for(i in n=null==n?null:n+"",r)if((e=r[i]).state>Uh&&e.name===n)return new On([[t]],cc,n,+i);return null},F.interrupt=zn,F.voronoi=function(){function n(i){return new ol(i.map(function(t,n){var e=[Math.round(r(t,n,i)/Sm)*Sm,Math.round(o(t,n,i)/Sm)*Sm];return e.index=n,e.data=t,e}),e)}var r=Uu,o=qu,e=null;return n.polygons=function(t){return n(t).polygons()},n.links=function(t){return n(t).links()},n.triangles=function(t){return n(t).triangles()},n.x=function(t){return arguments.length?(r="function"==typeof t?t:ju(+t),n):r},n.y=function(t){return arguments.length?(o="function"==typeof t?t:ju(+t),n):o},n.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],n):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},n.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],n):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},n},F.zoom=function(){function a(t){t.property("__zoom",dl).on("wheel.zoom",n).on("mousedown.zoom",e).on("dblclick.zoom",i).filter(b).on("touchstart.zoom",s).on("touchmove.zoom",u).on("touchend.zoom touchcancel.zoom",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(t,n){return(n=Math.max(x[0],Math.min(x[1],n)))===t.k?t:new sl(n,t.x,t.y)}function d(t,n,e){var i=n[0]-e[0]*t.k,e=n[1]-e[1]*t.k;return i===t.x&&e===t.y?t:new sl(t.k,i,e)}function l(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function r(t,e,u){t.on("start.zoom",function(){p(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){p(this,arguments).end()}).tween("zoom",function(){var t=arguments,i=p(this,t),n=g.apply(this,t),r=u||l(n),o=Math.max(n[1][0]-n[0][0],n[1][1]-n[0][1]),n=this.__zoom,a="function"==typeof e?e.apply(this,t):e,s=L(n.invert(r).concat(o/n.k),a.invert(r).concat(o/a.k));return function(t){var n,e;t=1===t?a:(n=s(t),new sl(e=o/n[2],r[0]-n[0]*e,r[1]-n[1]*e)),i.zoom(null,t)}})}function p(t,n){for(var e,i=0,r=T.length;i<r;++i)if((e=T[i]).that===t)return e;return new o(t,n)}function o(t,n){this.that=t,this.args=n,this.index=-1,this.active=0,this.extent=g.apply(t,n)}function n(){if(m.apply(this,arguments)){var t=p(this,arguments),n=this.__zoom,e=Math.max(x[0],Math.min(x[1],n.k*Math.pow(2,y.apply(this,arguments)))),i=dt(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=n.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(n.k===e)return;t.mouse=[i,n.invert(i)],zn(this),t.start()}hl(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},C),t.zoom("mouse",v(d(f(n,e),t.mouse[0],t.mouse[1]),t.extent,w))}}function e(){var e,t,n,i,r;!c&&m.apply(this,arguments)&&(e=p(this,arguments),t=ut(F.event.view).on("mousemove.zoom",function(){var t,n;hl(),e.moved||(t=F.event.clientX-i,n=F.event.clientY-r,e.moved=S<t*t+n*n),e.zoom("mouse",v(d(e.that.__zoom,e.mouse[0]=dt(e.that),e.mouse[1]),e.extent,w))},!0).on("mouseup.zoom",function(){t.on("mousemove.zoom mouseup.zoom",null),vt(F.event.view,e.moved),hl(),e.end()},!0),n=dt(this),i=F.event.clientX,r=F.event.clientY,gt(F.event.view),ll(),e.mouse=[n,this.__zoom.invert(n)],zn(this),e.start())}function i(){var t,n,e,i;m.apply(this,arguments)&&(t=this.__zoom,n=dt(this),i=t.invert(n),e=t.k*(F.event.shiftKey?.5:2),i=v(d(f(t,e),n,i),g.apply(this,arguments),w),hl(),0<M?ut(this).transition().duration(M).call(r,i,n):ut(this).call(a.transform,i))}function s(){if(m.apply(this,arguments)){var t,n,e,i,r=p(this,arguments),o=F.event.changedTouches,a=o.length;for(ll(),n=0;n<a;++n)i=[i=pt(this,o,(e=o[n]).identifier),this.__zoom.invert(i),e.identifier],r.touch0?r.touch1||(r.touch1=i):(r.touch0=i,t=!0);if(_&&(_=clearTimeout(_),!r.touch1))return r.end(),void((i=ut(this).on("dblclick.zoom"))&&i.apply(this,arguments));t&&(_=setTimeout(function(){_=null},k),zn(this),r.start())}}function u(){var t,n=p(this,arguments),e=F.event.changedTouches,i=e.length;for(hl(),_=_&&clearTimeout(_),t=0;t<i;++t)c=pt(this,e,(h=e[t]).identifier),n.touch0&&n.touch0[2]===h.identifier?n.touch0[0]=c:n.touch1&&n.touch1[2]===h.identifier&&(n.touch1[0]=c);if(h=n.that.__zoom,n.touch1)var r=n.touch0[0],o=n.touch0[1],a=n.touch1[0],s=n.touch1[1],u=(u=a[0]-r[0])*u+(u=a[1]-r[1])*u,l=(l=s[0]-o[0])*l+(l=s[1]-o[1])*l,h=f(h,Math.sqrt(u/l)),c=[(r[0]+a[0])/2,(r[1]+a[1])/2],s=[(o[0]+s[0])/2,(o[1]+s[1])/2];else{if(!n.touch0)return;c=n.touch0[0],s=n.touch0[1]}n.zoom("touch",v(d(h,c,s),n.extent,w))}function h(){var t,n,e=p(this,arguments),i=F.event.changedTouches,r=i.length;for(ll(),c&&clearTimeout(c),c=setTimeout(function(){c=null},k),t=0;t<r;++t)n=i[t],e.touch0&&e.touch0[2]===n.identifier?delete e.touch0:e.touch1&&e.touch1[2]===n.identifier&&delete e.touch1;e.touch1&&!e.touch0&&(e.touch0=e.touch1,delete e.touch1),e.touch0?e.touch0[1]=this.__zoom.invert(e.touch0[0]):e.end()}var _,c,m=cl,g=fl,v=ml,y=pl,b=_l,x=[0,1/0],w=[[-1/0,-1/0],[1/0,1/0]],M=250,L=_n,T=[],P=z("start","zoom","end"),k=500,C=150,S=0;return a.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",dl),t!==e?r(t,n):e.interrupt().each(function(){p(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},a.scaleBy=function(t,n){a.scaleTo(t,function(){return this.__zoom.k*("function"==typeof n?n.apply(this,arguments):n)})},a.scaleTo=function(t,o){a.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=l(t),i=n.invert(e),r="function"==typeof o?o.apply(this,arguments):o;return v(d(f(n,r),e,i),t,w)})},a.translateBy=function(t,n,e){a.transform(t,function(){return v(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),g.apply(this,arguments),w)})},a.translateTo=function(t,i,r){a.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=l(t);return v(Am.translate(e[0],e[1]).scale(n.k).translate("function"==typeof i?-i.apply(this,arguments):-i,"function"==typeof r?-r.apply(this,arguments):-r),t,w)})},o.prototype={start:function(){return 1==++this.active&&(this.index=T.push(this)-1,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(T.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){rt(new function(t,n,e){this.target=a,this.type=n,this.transform=e}(0,t,this.that.__zoom),P.apply,P,[t,this.that,this.args])}},a.wheelDelta=function(t){return arguments.length?(y="function"==typeof t?t:al(+t),a):y},a.filter=function(t){return arguments.length?(m="function"==typeof t?t:al(!!t),a):m},a.touchable=function(t){return arguments.length?(b="function"==typeof t?t:al(!!t),a):b},a.extent=function(t){return arguments.length?(g="function"==typeof t?t:al([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),a):g},a.scaleExtent=function(t){return arguments.length?(x[0]=+t[0],x[1]=+t[1],a):[x[0],x[1]]},a.translateExtent=function(t){return arguments.length?(w[0][0]=+t[0][0],w[1][0]=+t[1][0],w[0][1]=+t[0][1],w[1][1]=+t[1][1],a):[[w[0][0],w[0][1]],[w[1][0],w[1][1]]]},a.constrain=function(t){return arguments.length?(v=t,a):v},a.duration=function(t){return arguments.length?(M=+t,a):M},a.interpolate=function(t){return arguments.length?(L=t,a):L},a.on=function(){var t=P.on.apply(P,arguments);return t===P?a:t},a.clickDistance=function(t){return arguments.length?(S=(t=+t)*t,a):Math.sqrt(S)},a},F.zoomTransform=ul,F.zoomIdentity=Am,Object.defineProperty(F,"__esModule",{value:!0})});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。