Files
coriolis/d3.min.js
2017-04-21 16:07:41 +01:00

4 lines
106 KiB
JavaScript

!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(t){"use strict";function n(t){return function(n,e){return so(t(n),e)}}function e(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=po?r*=10:o>=yo?r*=5:o>=vo&&(r*=2),n<t?-r:r}function i(t,n,e){var i=t(e);return"translate("+(isFinite(i)?i:n(e))+",0)"}function r(t,n,e){var i=t(e);return"translate(0,"+(isFinite(i)?i:n(e))+")"}function o(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function u(){return!this.__axis}function a(t,n){function e(e){var _,p=null==s?n.ticks?n.ticks.apply(n,a):n.domain():s,d=null==h?n.tickFormat?n.tickFormat.apply(n,a):wo:h,y=Math.max(c,0)+f,v=t===bo||t===No?i:r,g=n.range(),x=g[0]+.5,m=g[g.length-1]+.5,w=(n.bandwidth?o:wo)(n.copy()),b=e.selection?e.selection():e,M=b.selectAll(".domain").data([null]),N=b.selectAll(".tick").data(p,n).order(),k=N.exit(),T=N.enter().append("g").attr("class","tick"),C=N.select("line"),S=N.select("text"),A=t===bo||t===ko?-1:1,E=t===ko||t===Mo?(_="x","y"):(_="y","x");M=M.merge(M.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),N=N.merge(T),C=C.merge(T.append("line").attr("stroke","#000").attr(_+"2",A*c).attr(E+"1",.5).attr(E+"2",.5)),S=S.merge(T.append("text").attr("fill","#000").attr(_,A*y).attr(E,.5).attr("dy",t===bo?"0em":t===No?"0.71em":"0.32em")),e!==b&&(M=M.transition(e),N=N.transition(e),C=C.transition(e),S=S.transition(e),k=k.transition(e).attr("opacity",To).attr("transform",function(t){return v(w,this.parentNode.__axis||w,t)}),T.attr("opacity",To).attr("transform",function(t){return v(this.parentNode.__axis||w,w,t)})),k.remove(),M.attr("d",t===ko||t==Mo?"M"+A*l+","+x+"H0.5V"+m+"H"+A*l:"M"+x+","+A*l+"V0.5H"+m+"V"+A*l),N.attr("opacity",1).attr("transform",function(t){return v(w,w,t)}),C.attr(_+"2",A*c),S.attr(_,A*y).text(d),b.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Mo?"start":t===ko?"end":"middle"),b.each(function(){this.__axis=w})}var a=[],s=null,h=null,c=6,l=6,f=3;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return a=mo.call(arguments),e},e.tickArguments=function(t){return arguments.length?(a=null==t?[]:mo.call(t),e):a.slice()},e.tickValues=function(t){return arguments.length?(s=null==t?null:mo.call(t),e):s&&s.slice()},e.tickFormat=function(t){return arguments.length?(h=t,e):h},e.tickSize=function(t){return arguments.length?(c=l=+t,e):c},e.tickSizeInner=function(t){return arguments.length?(c=+t,e):c},e.tickSizeOuter=function(t){return arguments.length?(l=+t,e):l},e.tickPadding=function(t){return arguments.length?(f=+t,e):f},e}function s(t){return a(bo,t)}function h(t){return a(No,t)}function c(t){return a(ko,t)}function l(){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 f(i)}function f(t){this._=t}function _(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function p(t,n){for(var e,i=0,r=t.length;i<r;++i)if((e=t[i]).name===n)return e.value}function d(t,n,e){for(var i=0,r=t.length;i<r;++i)if(t[i].name===n){t[i]=Co,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}function y(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===So&&n.documentElement.namespaceURI===So?n.createElement(t):n.createElementNS(e,t)}}function v(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function g(t,n,e){return t=x(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function x(t,n,e){return function(i){var r=Yo;Yo=i;try{t.call(this,this.__data__,n,e)}finally{Yo=r}}}function m(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function w(t){return function(){var n=this.__on;if(n){for(var e,i=0,r=-1,o=n.length;i<o;++i)e=n[i],t.type&&e.type!==t.type||e.name!==t.name?n[++r]=e:this.removeEventListener(e.type,e.listener,e.capture);++r?n.length=r:delete this.__on}}}function b(t,n,e){var i=Fo.hasOwnProperty(t.type)?g:x;return function(r,o,u){var a,s=this.__on,h=i(n,o,u);if(s)for(var c=0,l=s.length;c<l;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=h,a.capture=e),void(a.value=n);this.addEventListener(t.type,h,e),a={type:t.type,name:t.name,value:n,listener:h,capture:e},s?s.push(a):this.__on=[a]}}function M(){}function N(){return[]}function k(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function T(t,n,e,i,r,o){for(var u,a=0,s=n.length,h=o.length;a<h;++a)(u=n[a])?(u.__data__=o[a],i[a]=u):e[a]=new k(t,o[a]);for(;a<s;++a)(u=n[a])&&(r[a]=u)}function C(t,n,e,i,r,o,u){var a,s,h,c={},l=n.length,f=o.length,_=new Array(l);for(a=0;a<l;++a)(s=n[a])&&(_[a]=h=Zo+u.call(s,s.__data__,a,n),h in c?r[a]=s:c[h]=s);for(a=0;a<f;++a)h=Zo+u.call(t,o[a],a,o),(s=c[h])?(i[a]=s,s.__data__=o[a],c[h]=null):e[a]=new k(t,o[a]);for(a=0;a<l;++a)(s=n[a])&&c[_[a]]===s&&(r[a]=s)}function S(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function A(t){return function(){this.removeAttribute(t)}}function E(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U(t,n){return function(){this.setAttribute(t,n)}}function L(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function P(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function D(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function R(t){return function(){this.style.removeProperty(t)}}function F(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Y(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function q(t){return function(){delete this[t]}}function H(t,n){return function(){this[t]=n}}function z(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function O(t){return t.trim().split(/^|\s+/)}function j(t){return t.classList||new X(t)}function X(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function I(t,n){for(var e=j(t),i=-1,r=n.length;++i<r;)e.add(n[i])}function $(t,n){for(var e=j(t),i=-1,r=n.length;++i<r;)e.remove(n[i])}function B(t){return function(){I(this,t)}}function V(t){return function(){$(this,t)}}function Z(t,n){return function(){(n.apply(this,arguments)?I:$)(this,t)}}function W(){this.textContent=""}function J(t){return function(){this.textContent=t}}function G(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Q(){this.innerHTML=""}function K(t){return function(){this.innerHTML=t}}function tt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function nt(){this.nextSibling&&this.parentNode.appendChild(this)}function et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function it(){return null}function rt(){var t=this.parentNode;t&&t.removeChild(this)}function ot(t,n,e){var i=au(t),r=i.CustomEvent;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 ut(t,n){return function(){return ot(this,t,n)}}function at(t,n){return function(){return ot(this,t,n.apply(this,arguments))}}function st(t,n){this._groups=t,this._parents=n}function ht(){return new st([[document.documentElement]],mu)}function ct(t,n,e,i,r,o,u,a,s,h){this.target=t,this.type=n,this.subject=e,this.identifier=i,this.active=r,this.x=o,this.y=u,this.dx=a,this.dy=s,this._=h}function lt(t,n){var e=Object.create(t.prototype);for(var i in n)e[i]=n[i];return e}function ft(){}function _t(t){var n;return t=(t+"").trim().toLowerCase(),(n=Su.exec(t))?(n=parseInt(n[1],16),new gt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=Au.exec(t))?pt(parseInt(n[1],16)):(n=Eu.exec(t))?new gt(n[1],n[2],n[3],1):(n=Uu.exec(t))?new gt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Lu.exec(t))?dt(n[1],n[2],n[3],n[4]):(n=Pu.exec(t))?dt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Du.exec(t))?xt(n[1],n[2]/100,n[3]/100,1):(n=Ru.exec(t))?xt(n[1],n[2]/100,n[3]/100,n[4]):Fu.hasOwnProperty(t)?pt(Fu[t]):"transparent"===t?new gt(NaN,NaN,NaN,0):null}function pt(t){return new gt(t>>16&255,t>>8&255,255&t,1)}function dt(t,n,e,i){return i<=0&&(t=n=e=NaN),new gt(t,n,e,i)}function yt(t){return t instanceof ft||(t=_t(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function vt(t,n,e,i){return 1===arguments.length?yt(t):new gt(t,n,e,null==i?1:i)}function gt(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function xt(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new bt(t,n,e,i)}function mt(t){if(t instanceof bt)return new bt(t.h,t.s,t.l,t.opacity);if(t instanceof ft||(t=_t(t)),!t)return new bt;if(t instanceof bt)return t;t=t.rgb();var n=t.r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),u=NaN,a=o-r,s=(o+r)/2;return a?(u=n===o?(e-i)/a+6*(e<i):e===o?(i-n)/a+2:(n-e)/a+4,a/=s<.5?o+r:2-o-r,u*=60):a=s>0&&s<1?0:u,new bt(u,a,s,t.opacity)}function wt(t,n,e,i){return 1===arguments.length?mt(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 Mt(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 Nt(t){if(t instanceof Tt)return new Tt(t.l,t.a,t.b,t.opacity);if(t instanceof Pt){var n=t.h*Yu;return new Tt(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof gt||(t=yt(t));var e=Et(t.r),i=Et(t.g),r=Et(t.b),o=Ct((.4124564*e+.3575761*i+.1804375*r)/zu),u=Ct((.2126729*e+.7151522*i+.072175*r)/Ou),a=Ct((.0193339*e+.119192*i+.9503041*r)/ju);return new Tt(116*u-16,500*(o-u),200*(u-a),t.opacity)}function kt(t,n,e,i){return 1===arguments.length?Nt(t):new Tt(t,n,e,null==i?1:i)}function Tt(t,n,e,i){this.l=+t,this.a=+n,this.b=+e,this.opacity=+i}function Ct(t){return t>Bu?Math.pow(t,1/3):t/$u+Xu}function St(t){return t>Iu?t*t*t:$u*(t-Xu)}function At(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ut(t){if(t instanceof Pt)return new Pt(t.h,t.c,t.l,t.opacity);t instanceof Tt||(t=Nt(t));var n=Math.atan2(t.b,t.a)*qu;return new Pt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Lt(t,n,e,i){return 1===arguments.length?Ut(t):new Pt(t,n,e,null==i?1:i)}function Pt(t,n,e,i){this.h=+t,this.c=+n,this.l=+e,this.opacity=+i}function Dt(t){if(t instanceof Ft)return new Ft(t.h,t.s,t.l,t.opacity);t instanceof gt||(t=yt(t));var n=t.r/255,e=t.g/255,i=t.b/255,r=(ta*i+Qu*n-Ku*e)/(ta+Qu-Ku),o=i-r,u=(Gu*(e-r)-Wu*o)/Ju,a=Math.sqrt(u*u+o*o)/(Gu*r*(1-r)),s=a?Math.atan2(u,o)*qu-120:NaN;return new Ft(s<0?s+360:s,a,r,t.opacity)}function Rt(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.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Yt(t,n){return function(e){return t+e*n}}function qt(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}function Ht(t,n){var e=n-t;return e?Yt(t,e>180||e<-180?e-360*Math.round(e/360):e):oa(isNaN(t)?n:t)}function zt(t){return 1===(t=+t)?Ot:function(n,e){return e-n?qt(n,e,t):oa(isNaN(n)?e:n)}}function Ot(t,n){var e=n-t;return e?Yt(t,e):oa(isNaN(t)?n:t)}function jt(t){return function(){return t}}function Xt(t){return function(n){return t(n)+""}}function It(t){return"none"===t?va:(na||(na=document.createElement("DIV"),ea=document.documentElement,ia=document.defaultView),na.style.transform=t,t=ia.getComputedStyle(ea.appendChild(na),null).getPropertyValue("transform"),ea.removeChild(na),t=t.slice(7,-1).split(","),ga(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function $t(t){return null==t?va:(ra||(ra=document.createElementNS("http://www.w3.org/2000/svg","g")),ra.setAttribute("transform",t),(t=ra.transform.baseVal.consolidate())?(t=t.matrix,ga(t.a,t.b,t.c,t.d,t.e,t.f)):va)}function Bt(t,n,e,i){function r(t){return t.length?t.pop()+" ":""}function o(t,i,r,o,u,a){if(t!==r||i!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:ha(t,r)},{i:s-2,x:ha(i,o)})}else(r||o)&&u.push("translate("+r+n+o+e)}function u(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(r(e)+"rotate(",null,i)-2,x:ha(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}function a(t,n,e,o){t!==n?o.push({i:e.push(r(e)+"skewX(",null,i)-2,x:ha(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}function s(t,n,e,i,o,u){if(t!==e||n!==i){var a=o.push(r(o)+"scale(",null,",",null,")");u.push({i:a-4,x:ha(t,e)},{i:a-2,x:ha(n,i)})}else 1===e&&1===i||o.push(r(o)+"scale("+e+","+i+")")}return function(n,e){var i=[],r=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,i,r),u(n.rotate,e.rotate,i,r),a(n.skewX,e.skewX,i,r),s(n.scaleX,n.scaleY,e.scaleX,e.scaleY,i,r),n=e=null,function(t){for(var n,e=-1,o=r.length;++e<o;)i[(n=r[e]).i]=n.x(t);return i.join("")}}}function Vt(t){return function n(e){function i(n,i){var r=t((n=Rt(n)).h,(i=Rt(i)).h),o=Ot(n.s,i.s),u=Ot(n.l,i.l),a=Ot(n.opacity,i.opacity);return function(t){return n.h=r(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,i.gamma=n,i}(1)}function Zt(){return Aa||(La(Wt),Aa=Ua.now()+Ea)}function Wt(){Aa=0}function Jt(){this._call=this._time=this._next=null}function Gt(t,n,e){var i=new Jt;return i.restart(t,n,e),i}function Qt(){Zt(),++Na;for(var t,n=wa;n;)(t=Aa-n._time)>=0&&n._call.call(null,t),n=n._next;--Na}function Kt(){Aa=(Sa=Ua.now())+Ea,Na=ka=0;try{Qt()}finally{Na=0,nn(),Aa=0}}function tn(){var t=Ua.now(),n=t-Sa;n>Ca&&(Ea-=n,Sa=t)}function nn(){for(var t,n,e=wa,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:wa=n);ba=t,en(i)}function en(t){if(!Na){ka&&(ka=clearTimeout(ka));var n=t-Aa;n>24?(t<1/0&&(ka=setTimeout(Kt,n)),Ta&&(Ta=clearInterval(Ta))):(Ta||(Sa=Aa,Ta=setInterval(tn,Ca)),Na=1,La(Kt))}}function rn(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Fa)throw new Error("too late");return e}function on(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>qa)throw new Error("too late");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function an(t,n,e){function i(t){e.state=Ya,e.timer.restart(r,e.delay,e.time),e.delay<=t&&r(t-e.delay)}function r(i){var h,c,l,f;if(e.state!==Ya)return u();for(h in s)if(f=s[h],f.name===e.name){if(f.state===Ha)return Pa(r);f.state===za?(f.state=ja,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[h]):+h<n&&(f.state=ja,f.timer.stop(),delete s[h])}if(Pa(function(){e.state===Ha&&(e.state=za,e.timer.restart(o,e.delay,e.time),o(i))}),e.state=qa,e.on.call("start",t,t.__data__,e.index,e.group),e.state===qa){for(e.state=Ha,a=new Array(l=e.tween.length),h=0,c=-1;h<l;++h)(f=e.tween[h].value.call(t,t.__data__,e.index,e.group))&&(a[++c]=f);a.length=c+1}}function o(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=Oa,1),r=-1,o=a.length;++r<o;)a[r].call(null,i);e.state===Oa&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){e.state=ja,e.timer.stop(),delete s[n];for(var i in s)return;delete t.__transition}var a,s=t.__transition;s[n]=e,e.timer=Gt(i,0,e.time)}function sn(t,n){var e,i;return function(){var r=on(this,t),o=r.tween;if(o!==e){i=e=o;for(var u=0,a=i.length;u<a;++u)if(i[u].name===n){i=i.slice(),i.splice(u,1);break}}r.tween=i}}function hn(t,n,e){var i,r;if("function"!=typeof e)throw new Error;return function(){var o=on(this,t),u=o.tween;if(u!==i){r=(i=u).slice();for(var a={name:n,value:e},s=0,h=r.length;s<h;++s)if(r[s].name===n){r[s]=a;break}s===h&&r.push(a)}o.tween=r}}function cn(t,n,e){var i=t._id;return t.each(function(){var t=on(this,i);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return un(t,i).value[n]}}function ln(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _n(t,n,e){var i,r;return function(){var o=this.getAttribute(t);return o===e?null:o===i?r:r=n(i=o,e)}}function pn(t,n,e){var i,r;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===i?r:r=n(i=o,e)}}function dn(t,n,e){var i,r,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===i&&a===r?o:o=n(i=u,r=a))}}function yn(t,n,e){var i,r,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===i&&a===r?o:o=n(i=u,r=a))}}function vn(t,n){function e(){var e=this,i=n.apply(e,arguments);return i&&function(n){e.setAttributeNS(t.space,t.local,i(n))}}return e._value=n,e}function gn(t,n){function e(){var e=this,i=n.apply(e,arguments);return i&&function(n){e.setAttribute(t,i(n))}}return e._value=n,e}function xn(t,n){return function(){rn(this,t).delay=+n.apply(this,arguments)}}function mn(t,n){return n=+n,function(){rn(this,t).delay=n}}function wn(t,n){return function(){on(this,t).duration=+n.apply(this,arguments)}}function bn(t,n){return n=+n,function(){on(this,t).duration=n}}function Mn(t,n){if("function"!=typeof n)throw new Error;return function(){on(this,t).ease=n}}function Nn(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function kn(t,n,e){var i,r,o=Nn(n)?rn:on;return function(){var u=o(this,t),a=u.on;a!==i&&(r=(i=a).copy()).on(n,e),u.on=r}}function Tn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Cn(t,n){var e,i,r;return function(){var o=au(this).getComputedStyle(this,null),u=o.getPropertyValue(t),a=(this.style.removeProperty(t),o.getPropertyValue(t));return u===a?null:u===e&&a===i?r:r=n(e=u,i=a)}}function Sn(t){return function(){this.style.removeProperty(t)}}function An(t,n,e){var i,r;return function(){var o=au(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===i?r:r=n(i=o,e)}}function En(t,n,e){var i,r,o;return function(){var u=au(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=e(this);return null==s&&(this.style.removeProperty(t),s=u.getPropertyValue(t)),a===s?null:a===i&&s===r?o:o=n(i=a,r=s)}}function Un(t,n,e){function i(){var i=this,r=n.apply(i,arguments);return r&&function(n){i.style.setProperty(t,r(n),e)}}return i._value=n,i}function Ln(t){return function(){this.textContent=t}}function Pn(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function Dn(t,n,e,i){this._groups=t,this._parents=n,this._name=e,this._id=i}function Rn(t){return ht().transition(t)}function Fn(){return++ls}function Yn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function qn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return gs.time=Zt(),gs;return e}function Hn(t){return{type:t}}function zn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function On(){return new zn}function jn(){}function Xn(t,n){var e=new jn;if(t instanceof jn)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 u in t)e.set(u,t[u]);return e}function In(){}function $n(t,n){var e=new In;if(t instanceof In)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 Bn(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Vn(t,n){var e=Bn(t);return function(i,r){return n(e(i),r,t)}}function Zn(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var i in t)i in n||e.push(n[i]=i)}),e}function Wn(t,n,e,i){if(isNaN(n)||isNaN(e))return t;var r,o,u,a,s,h,c,l,f,_=t._root,p={data:i},d=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!_)return t._root=p,t;for(;_.length;)if((h=n>=(o=(d+v)/2))?d=o:v=o,(c=e>=(u=(y+g)/2))?y=u:g=u,r=_,!(_=_[l=c<<1|h]))return r[l]=p,t;if(a=+t._x.call(null,_.data),s=+t._y.call(null,_.data),n===a&&e===s)return p.next=_,r?r[l]=p:t._root=p,t;do r=r?r[l]=new Array(4):t._root=new Array(4),(h=n>=(o=(d+v)/2))?d=o:v=o,(c=e>=(u=(y+g)/2))?y=u:g=u;while((l=c<<1|h)===(f=(s>=u)<<1|a>=o));return r[f]=_,r[l]=p,t}function Jn(t){var n,e,i,r,o=t.length,u=new Array(o),a=new Array(o),s=1/0,h=1/0,c=-(1/0),l=-(1/0);for(e=0;e<o;++e)isNaN(i=+this._x.call(null,n=t[e]))||isNaN(r=+this._y.call(null,n))||(u[e]=i,a[e]=r,i<s&&(s=i),i>c&&(c=i),r<h&&(h=r),r>l&&(l=r));for(c<s&&(s=this._x0,c=this._x1),l<h&&(h=this._y0,l=this._y1),this.cover(s,h).cover(c,l),e=0;e<o;++e)Wn(this,u[e],a[e],t[e]);return this}function Gn(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function Qn(t){return t[0]}function Kn(t){return t[1]}function te(t,n,e){var i=new ne(null==n?Qn:n,null==e?Kn:e,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function ne(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 ee(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function ie(t){if(!(n=Ks.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",i=n[2]||">",r=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],s=!!n[7],h=n[8]&&+n[8].slice(1),c=n[9]||"";"n"===c?(s=!0,c="g"):Qs[c]||(c=""),(u||"0"===e&&"="===i)&&(u=!0,e="0",i="="),this.fill=e,this.align=i,this.sign=r,this.symbol=o,this.zero=u,this.width=a,this.comma=s,this.precision=h,this.type=c}function re(t){return t}function oe(t){return nh=oh(t),eh=nh.format,ih=nh.formatPrefix,nh}function ue(){this.reset()}function ae(t,n,e){var i=t.s=n+e,r=i-n,o=i-r;t.t=n-o+(e-r)}function se(t){return t>1?0:t<-1?fh:Math.acos(t)}function he(t){return t>1?_h:t<-1?-_h:Math.asin(t)}function ce(){}function le(t){var n=t[0],e=t[1],i=mh(e);return[i*mh(n),i*Mh(n),Mh(e)]}function fe(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 _e(t){var n=Nh(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function pe(t,n){return[t>fh?t-dh:t<-fh?t+dh:t,n]}function de(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 ye(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 ve(t){this._context=t}function ge(){this._string=[]}function xe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function me(t){return t.length>1}function we(t,n){return((t=t.x)[0]<0?t[1]-_h-lh:_h-t[1])-((n=n.x)[0]<0?n[1]-_h-lh:_h-n[1])}function be(t){var n,e=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?fh:-fh,s=vh(o-e);vh(s-fh)<lh?(t.point(e,i=(i+u)/2>0?_h:-_h),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),n=0):r!==a&&s>=fh&&(vh(e-r)<lh&&(e-=r*lh),vh(o-a)<lh&&(o-=a*lh),i=Me(e,i,o,u),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),n=0),t.point(e=o,i=u),r=a},lineEnd:function(){t.lineEnd(),e=i=NaN},clean:function(){return 2-n}}}function Me(t,n,e,i){var r,o,u=Mh(t-e);return vh(u)>lh?gh((Mh(n)*(o=mh(i))*Mh(e)-Mh(i)*(r=mh(n))*Mh(t))/(r*o*u)):(n+i)/2}function Ne(t,n,e,i){var r;if(null==t)r=e*_h,i.point(-fh,r),i.point(0,r),i.point(fh,r),i.point(fh,0),i.point(fh,-r),i.point(0,-r),i.point(-fh,-r),i.point(-fh,0),i.point(-fh,r);else if(vh(t[0]-n[0])>lh){var o=t[0]<n[0]?fh:-fh;r=e*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(n[0],n[1])}function ke(t){return function(n){var e=new Te;for(var i in t)e[i]=t[i];return e.stream=n,e}}function Te(){}function Ce(t){return function(n,e){var i=mh(n),r=mh(e),o=t(i*r);return[o*r*Mh(n),o*Mh(e)]}}function Se(t){return function(n,e){var i=Nh(n*n+e*e),r=t(i),o=Mh(r),u=mh(r);return[xh(n*o,i*u),he(i&&e*o/i)]}}function Ae(t,n){return[bh(kh((_h+n)/2)),-t]}function Ee(t){var n=0,e=t.children,i=e&&e.length;if(i)for(;--i>=0;)n+=e[i].value;else n=1;t.value=n}function Ue(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}function Le(t,n){var e,i,r,o,u,a=new Ye(t),s=+t.value&&(a.value=t.value),h=[a];for(null==n&&(n=De);e=h.pop();)if(s&&(e.value=+e.data.value),(r=n(e.data))&&(u=r.length))for(e.children=new Array(u),o=u-1;o>=0;--o)h.push(i=e.children[o]=new Ye(r[o])),i.parent=e,i.depth=e.depth+1;return a.eachBefore(Fe)}function Pe(){return Le(this).eachBefore(Re)}function De(t){return t.children}function Re(t){t.data=t.data.data}function Fe(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function Ye(t){this.data=t,this.depth=this.height=0,this.parent=null}function qe(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function He(t,n,e,i,r,o){for(var u,a,s,h,c,l,f,_,p,d,y,v=[],g=n.children,x=0,m=0,w=g.length,b=n.value;x<w;){s=r-e,h=o-i;do c=g[m++].value;while(!c&&m<w);for(l=f=c,d=Math.max(h/s,s/h)/(b*t),y=c*c*d,p=Math.max(f/y,y/l);m<w;++m){if(c+=a=g[m].value,a<l&&(l=a),a>f&&(f=a),y=c*c*d,_=Math.max(f/y,y/l),_>p){c-=a;break}p=_}v.push(u={value:c,dice:s<h,children:g.slice(x,m)}),u.dice?Vh(u,e,i,r,b?i+=h*c/b:o):Zh(u,e,i,b?e+=s*c/b:r,o),b-=c,x=m}return v}function ze(t){if(!t._start)try{Oe(t)}catch(n){if(t._tasks[t._ended+t._active-1])Xe(t,n);else if(!t._data)throw n}}function Oe(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]=je(t,n),--t._waiting,++t._active,e=r.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||Jh)}}function je(t,n){return function(e,i){t._tasks[n]&&(--t._active,++t._ended,t._tasks[n]=null,null==t._error&&(null!=e?Xe(t,e):(t._data[n]=i,t._waiting?ze(t):Ie(t))))}}function Xe(t,n){var e,i=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;--i>=0;)if((e=t._tasks[i])&&(t._tasks[i]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,Ie(t)}function Ie(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function $e(t){return function(n,e){t(null==n?e:null)}}function Be(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ve(t,n){return function(e){return t(e.responseText,n)}}function Ze(t){function n(n){var o=n+"",u=e.get(o);if(!u){if(r!==ic)return r;e.set(o,u=i.push(n))}return t[(u-1)%t.length]}var e=Xn(),i=[],r=ic;return t=null==t?[]:ec.call(t),n.domain=function(t){if(!arguments.length)return i.slice();i=[],e=Xn();for(var r,o,u=-1,a=t.length;++u<a;)e.has(o=(r=t[u])+"")||e.set(o,i.push(r));return n},n.range=function(e){return arguments.length?(t=ec.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(r=t,n):r},n.copy=function(){return Ze().domain(i).range(t).unknown(r)},n}function We(){function t(){var t=r().length,i=u[1]<u[0],l=u[i-0],f=u[1-i];n=(f-l)/Math.max(1,t-s+2*h),a&&(n=Math.floor(n)),l+=(f-l-n*(t-s))*c,e=n*(1-s),a&&(l=Math.round(l),e=Math.round(e));var _=_o(t).map(function(t){return l+n*t});return o(i?_.reverse():_)}var n,e,i=Ze().unknown(void 0),r=i.domain,o=i.range,u=[0,1],a=!1,s=0,h=0,c=.5;return delete i.unknown,i.domain=function(n){return arguments.length?(r(n),t()):r()},i.range=function(n){return arguments.length?(u=[+n[0],+n[1]],t()):u.slice()},i.rangeRound=function(n){return u=[+n[0],+n[1]],a=!0,t()},i.bandwidth=function(){return e},i.step=function(){return n},i.round=function(n){return arguments.length?(a=!!n,t()):a},i.padding=function(n){return arguments.length?(s=h=Math.max(0,Math.min(1,n)),t()):s},i.paddingInner=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),t()):s},i.paddingOuter=function(n){return arguments.length?(h=Math.max(0,Math.min(1,n)),t()):h},i.align=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},i.copy=function(){return We().domain(r()).range(u).round(a).paddingInner(s).paddingOuter(h).align(c)},t()}function Je(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:rc(n)}function Ge(t){return function(n,e){var i=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:i(t)}}}function Qe(t){return function(n,e){var i=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:i(t)}}}function Ke(t,n,e,i){var r=t[0],o=t[1],u=n[0],a=n[1];return o<r?(r=e(o,r),u=i(a,u)):(r=e(r,o),u=i(u,a)),function(t){return u(r(t))}}function ti(t,n,e,i){var r=Math.min(t.length,n.length)-1,o=new Array(r),u=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)o[a]=e(t[a],t[a+1]),u[a]=i(n[a],n[a+1]);return function(n){var e=lo(t,n,1,r)-1;return u[e](o[e](n))}}function ni(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function ei(t,n){function e(){return r=Math.min(a.length,s.length)>2?ti:Ke,o=u=null,i}function i(n){return(o||(o=r(a,s,c?Ge(t):t,h)))(+n)}var r,o,u,a=uc,s=uc,h=pa,c=!1;return i.invert=function(t){return(u||(u=r(s,a,Je,c?Qe(n):n)))(+t)},i.domain=function(t){return arguments.length?(a=nc.call(t,oc),e()):a.slice()},i.range=function(t){return arguments.length?(s=ec.call(t),e()):s.slice()},i.rangeRound=function(t){return s=ec.call(t),h=da,e()},i.clamp=function(t){return arguments.length?(c=!!t,e()):c},i.interpolate=function(t){return arguments.length?(h=t,e()):h},e()}function ii(t){var n=t.domain;return t.ticks=function(t){var e=n();return go(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return ac(n(),t,e)},t.nice=function(i){var r=n(),o=r.length-1,u=null==i?10:i,a=r[0],s=r[o],h=e(a,s,u);return h&&(h=e(Math.floor(a/h)*h,Math.ceil(s/h)*h,u),r[0]=Math.floor(a/h)*h,r[o]=Math.ceil(s/h)*h,n(r)),t},t}function ri(){var t=ei(Je,ha);return t.copy=function(){return ni(t,ri())},ii(t)}function oi(t,n,e,i){function r(n){return t(n=new Date((+n))),n}return r.floor=r,r.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},r.round=function(t){var n=r(t),e=r.ceil(t);return t-n<e-t?n:e},r.offset=function(t,e){return n(t=new Date((+t)),null==e?1:Math.floor(e)),t},r.range=function(e,i,o){var u=[];if(e=r.ceil(e),o=null==o?1:Math.floor(o),!(e<i&&o>0))return u;do u.push(new Date((+e)));while(n(e,o),t(e),e<i);return u},r.filter=function(e){return oi(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,i){if(t>=t)for(;--i>=0;)for(;n(t,1),!e(t););})},e&&(r.count=function(n,i){return sc.setTime(+n),hc.setTime(+i),t(sc),t(hc),Math.floor(e(sc,hc))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(n){return i(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}function ui(t){return oi(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*fc)/dc})}function ai(t){return oi(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/dc})}function si(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 hi(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 ci(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function li(t){function n(t,n){return function(e){var i,r,o,u=[],a=-1,s=0,h=t.length;for(e instanceof Date||(e=new Date((+e)));++a<h;)37===t.charCodeAt(a)&&(u.push(t.slice(s,a)),null!=(r=Ac[i=t.charAt(++a)])?i=t.charAt(++a):r="e"===i?" ":"0",(o=n[i])&&(i=o(e,r)),u.push(i),s=a+1);return u.push(t.slice(s,a)),
u.join("")}}function e(t,n){return function(e){var r=ci(1900),o=i(r,t,e+="",0);if(o!=e.length)return null;if("p"in r&&(r.H=r.H%12+12*r.p),"W"in r||"U"in r){"w"in r||(r.w="W"in r?1:0);var u="Z"in r?hi(ci(r.y)).getUTCDay():n(ci(r.y)).getDay();r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(u+5)%7:r.w+7*r.U-(u+6)%7}return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,hi(r)):n(r)}}function i(t,n,e,i){for(var r,o,u=0,a=n.length,s=e.length;u<a;){if(i>=s)return-1;if(r=n.charCodeAt(u++),37===r){if(r=n.charAt(u++),o=j[r in Ac?n.charAt(u++):r],!o||(i=o(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}function r(t,n,e){var i=E.exec(n.slice(e));return i?(t.p=U[i[0].toLowerCase()],e+i[0].length):-1}function o(t,n,e){var i=D.exec(n.slice(e));return i?(t.w=R[i[0].toLowerCase()],e+i[0].length):-1}function u(t,n,e){var i=L.exec(n.slice(e));return i?(t.w=P[i[0].toLowerCase()],e+i[0].length):-1}function a(t,n,e){var i=q.exec(n.slice(e));return i?(t.m=H[i[0].toLowerCase()],e+i[0].length):-1}function s(t,n,e){var i=F.exec(n.slice(e));return i?(t.m=Y[i[0].toLowerCase()],e+i[0].length):-1}function h(t,n,e){return i(t,b,n,e)}function c(t,n,e){return i(t,M,n,e)}function l(t,n,e){return i(t,N,n,e)}function f(t){return C[t.getDay()]}function _(t){return T[t.getDay()]}function p(t){return A[t.getMonth()]}function d(t){return S[t.getMonth()]}function y(t){return k[+(t.getHours()>=12)]}function v(t){return C[t.getUTCDay()]}function g(t){return T[t.getUTCDay()]}function x(t){return A[t.getUTCMonth()]}function m(t){return S[t.getUTCMonth()]}function w(t){return k[+(t.getUTCHours()>=12)]}var b=t.dateTime,M=t.date,N=t.time,k=t.periods,T=t.days,C=t.shortDays,S=t.months,A=t.shortMonths,E=pi(k),U=di(k),L=pi(T),P=di(T),D=pi(C),R=di(C),F=pi(S),Y=di(S),q=pi(A),H=di(A),z={a:f,A:_,b:p,B:d,c:null,d:Ei,e:Ei,H:Ui,I:Li,j:Pi,L:Di,m:Ri,M:Fi,p:y,S:Yi,U:qi,w:Hi,W:zi,x:null,X:null,y:Oi,Y:ji,Z:Xi,"%":rr},O={a:v,A:g,b:x,B:m,c:null,d:Ii,e:Ii,H:$i,I:Bi,j:Vi,L:Zi,m:Wi,M:Ji,p:w,S:Gi,U:Qi,w:Ki,W:tr,x:null,X:null,y:nr,Y:er,Z:ir,"%":rr},j={a:o,A:u,b:a,B:s,c:h,d:Mi,e:Mi,H:ki,I:ki,j:Ni,L:Si,m:bi,M:Ti,p:r,S:Ci,U:vi,w:yi,W:gi,x:c,X:l,y:mi,Y:xi,Z:wi,"%":Ai};return z.x=n(M,z),z.X=n(N,z),z.c=n(b,z),O.x=n(M,O),O.X=n(N,O),O.c=n(b,O),{format:function(t){var e=n(t+="",z);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",si);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",O);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,hi);return n.toString=function(){return t},n}}}function fi(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<e?new Array(e-o+1).join(n)+r:r)}function _i(t){return t.replace(Lc,"\\$&")}function pi(t){return new RegExp("^(?:"+t.map(_i).join("|")+")","i")}function di(t){for(var n={},e=-1,i=t.length;++e<i;)n[t[e].toLowerCase()]=e;return n}function yi(t,n,e){var i=Ec.exec(n.slice(e,e+1));return i?(t.w=+i[0],e+i[0].length):-1}function vi(t,n,e){var i=Ec.exec(n.slice(e));return i?(t.U=+i[0],e+i[0].length):-1}function gi(t,n,e){var i=Ec.exec(n.slice(e));return i?(t.W=+i[0],e+i[0].length):-1}function xi(t,n,e){var i=Ec.exec(n.slice(e,e+4));return i?(t.y=+i[0],e+i[0].length):-1}function mi(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function wi(t,n,e){var i=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function bi(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function Mi(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function Ni(t,n,e){var i=Ec.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function ki(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function Ti(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function Ci(t,n,e){var i=Ec.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function Si(t,n,e){var i=Ec.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function Ai(t,n,e){var i=Uc.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function Ei(t,n){return fi(t.getDate(),n,2)}function Ui(t,n){return fi(t.getHours(),n,2)}function Li(t,n){return fi(t.getHours()%12||12,n,2)}function Pi(t,n){return fi(1+yc.count(xc(t),t),n,3)}function Di(t,n){return fi(t.getMilliseconds(),n,3)}function Ri(t,n){return fi(t.getMonth()+1,n,2)}function Fi(t,n){return fi(t.getMinutes(),n,2)}function Yi(t,n){return fi(t.getSeconds(),n,2)}function qi(t,n){return fi(vc.count(xc(t),t),n,2)}function Hi(t){return t.getDay()}function zi(t,n){return fi(gc.count(xc(t),t),n,2)}function Oi(t,n){return fi(t.getFullYear()%100,n,2)}function ji(t,n){return fi(t.getFullYear()%1e4,n,4)}function Xi(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+fi(n/60|0,"0",2)+fi(n%60,"0",2)}function Ii(t,n){return fi(t.getUTCDate(),n,2)}function $i(t,n){return fi(t.getUTCHours(),n,2)}function Bi(t,n){return fi(t.getUTCHours()%12||12,n,2)}function Vi(t,n){return fi(1+mc.count(Mc(t),t),n,3)}function Zi(t,n){return fi(t.getUTCMilliseconds(),n,3)}function Wi(t,n){return fi(t.getUTCMonth()+1,n,2)}function Ji(t,n){return fi(t.getUTCMinutes(),n,2)}function Gi(t,n){return fi(t.getUTCSeconds(),n,2)}function Qi(t,n){return fi(wc.count(Mc(t),t),n,2)}function Ki(t){return t.getUTCDay()}function tr(t,n){return fi(bc.count(Mc(t),t),n,2)}function nr(t,n){return fi(t.getUTCFullYear()%100,n,2)}function er(t,n){return fi(t.getUTCFullYear()%1e4,n,4)}function ir(){return"+0000"}function rr(){return"%"}function or(t){return Nc=li(t),kc=Nc.format,Tc=Nc.parse,Cc=Nc.utcFormat,Sc=Nc.utcParse,Nc}function ur(t){return t.toISOString()}function ar(t){var n=new Date(t);return isNaN(n)?null:n}function sr(t){this._context=t}function hr(t){return t[0]}function cr(t){return t[1]}function lr(t){this._curve=t}function fr(t){function n(n){return new lr(t(n))}return n._curve=t,n}function _r(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 pr(t){this._context=t}function dr(t,n){this._basis=new pr(t),this._beta=n}function yr(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 vr(t,n){this._context=t,this._k=(1-n)/6}function gr(t,n){this._context=t,this._k=(1-n)/6}function xr(t,n){this._context=t,this._k=(1-n)/6}function mr(t,n,e){var i=t._x1,r=t._y1,o=t._x2,u=t._y2;if(t._l01_a>Fc){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>Fc){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-n*t._l12_2a)/c,u=(u*h+t._y1*t._l23_2a-e*t._l12_2a)/c}t._context.bezierCurveTo(i,r,o,u,t._x2,t._y2)}function wr(t,n){this._context=t,this._alpha=n}function br(t,n){this._context=t,this._alpha=n}function Mr(t,n){this._context=t,this._alpha=n}function Nr(t){return t<0?-1:1}function kr(t,n,e){var i=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),u=(e-t._y1)/(r||i<0&&-0),a=(o*r+u*i)/(i+r);return(Nr(o)+Nr(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Tr(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Cr(t,n,e){var i=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*n,o-a,u-a*e,o,u)}function Sr(t){this._context=t}function Ar(t){this._context=new Er(t)}function Er(t){this._context=t}function Ur(){this._=null}function Lr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Pr(t,n){var e=n,i=n.R,r=e.U;r?r.L===e?r.L=i:r.R=i:t._=i,i.U=r,e.U=i,e.R=i.L,e.R&&(e.R.U=e),i.L=e}function Dr(t,n){var e=n,i=n.L,r=e.U;r?r.L===e?r.L=i:r.R=i:t._=i,i.U=r,e.U=i,e.L=i.R,e.L&&(e.L.U=e),i.R=e}function Rr(t){for(;t.L;)t=t.L;return t}function Fr(t,n,e,i){var r=[null,null],o=Ic.push(r)-1;return r.left=t,r.right=n,e&&qr(r,t,n,e),i&&qr(r,n,t,i),jc[t.index].halfedges.push(o),jc[n.index].halfedges.push(o),r}function Yr(t,n,e){var i=[n,e];return i.left=t,i}function qr(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 Hr(t,n,e,i,r){var o,u=t[0],a=t[1],s=u[0],h=u[1],c=a[0],l=a[1],f=0,_=1,p=c-s,d=l-h;if(o=n-s,p||!(o>0)){if(o/=p,p<0){if(o<f)return;o<_&&(_=o)}else if(p>0){if(o>_)return;o>f&&(f=o)}if(o=i-s,p||!(o<0)){if(o/=p,p<0){if(o>_)return;o>f&&(f=o)}else if(p>0){if(o<f)return;o<_&&(_=o)}if(o=e-h,d||!(o>0)){if(o/=d,d<0){if(o<f)return;o<_&&(_=o)}else if(d>0){if(o>_)return;o>f&&(f=o)}if(o=r-h,d||!(o<0)){if(o/=d,d<0){if(o>_)return;o>f&&(f=o)}else if(d>0){if(o<f)return;o<_&&(_=o)}return!(f>0||_<1)||(f>0&&(t[0]=[s+f*p,h+f*d]),_<1&&(t[1]=[s+_*p,h+_*d]),!0)}}}}}function zr(t,n,e,i,r){var o=t[1];if(o)return!0;var u,a,s=t[0],h=t.left,c=t.right,l=h[0],f=h[1],_=c[0],p=c[1],d=(l+_)/2,y=(f+p)/2;if(p===f){if(d<n||d>=i)return;if(l>_){if(s){if(s[1]>=r)return}else s=[d,e];o=[d,r]}else{if(s){if(s[1]<e)return}else s=[d,r];o=[d,e]}}else if(u=(l-_)/(p-f),a=y-u*d,u<-1||u>1)if(l>_){if(s){if(s[1]>=r)return}else s=[(e-a)/u,e];o=[(r-a)/u,r]}else{if(s){if(s[1]<e)return}else s=[(r-a)/u,r];o=[(e-a)/u,e]}else if(f<p){if(s){if(s[0]>=i)return}else s=[n,u*n+a];o=[i,u*i+a]}else{if(s){if(s[0]<n)return}else s=[i,u*i+a];o=[n,u*n+a]}return t[0]=s,t[1]=o,!0}function Or(t,n,e,i){for(var r,o=Ic.length;o--;)zr(r=Ic[o],t,n,e,i)&&Hr(r,t,n,e,i)&&(Math.abs(r[0][0]-r[1][0])>Vc||Math.abs(r[0][1]-r[1][1])>Vc)||delete Ic[o]}function jr(t){return jc[t.index]={site:t,halfedges:[]}}function Xr(t,n){var e=t.site,i=n.left,r=n.right;return e===r&&(r=i,i=e),r?Math.atan2(r[1]-i[1],r[0]-i[0]):(e===i?(i=n[1],r=n[0]):(i=n[0],r=n[1]),Math.atan2(i[0]-r[0],r[1]-i[1]))}function Ir(t,n){return n[+(n.left!==t.site)]}function $r(t,n){return n[+(n.left===t.site)]}function Br(){for(var t,n,e,i,r=0,o=jc.length;r<o;++r)if((t=jc[r])&&(i=(n=t.halfedges).length)){var u=new Array(i),a=new Array(i);for(e=0;e<i;++e)u[e]=e,a[e]=Xr(t,Ic[n[e]]);for(u.sort(function(t,n){return a[n]-a[t]}),e=0;e<i;++e)a[e]=n[u[e]];for(e=0;e<i;++e)n[e]=a[e]}}function Vr(t,n,e,i){var r,o,u,a,s,h,c,l,f,_,p,d,y=jc.length,v=!0;for(r=0;r<y;++r)if(o=jc[r]){for(u=o.site,s=o.halfedges,a=s.length;a--;)Ic[s[a]]||s.splice(a,1);for(a=0,h=s.length;a<h;)_=$r(o,Ic[s[a]]),p=_[0],d=_[1],c=Ir(o,Ic[s[++a%h]]),l=c[0],f=c[1],(Math.abs(p-l)>Vc||Math.abs(d-f)>Vc)&&(s.splice(a,0,Ic.push(Yr(u,_,Math.abs(p-t)<Vc&&i-d>Vc?[t,Math.abs(l-t)<Vc?f:i]:Math.abs(d-i)<Vc&&e-p>Vc?[Math.abs(f-i)<Vc?l:e,i]:Math.abs(p-e)<Vc&&d-n>Vc?[e,Math.abs(l-e)<Vc?f:n]:Math.abs(d-n)<Vc&&p-t>Vc?[Math.abs(f-n)<Vc?l:t,n]:null))-1),++h);h&&(v=!1)}if(v){var g,x,m,w=1/0;for(r=0,v=null;r<y;++r)(o=jc[r])&&(u=o.site,g=u[0]-t,x=u[1]-n,m=g*g+x*x,m<w&&(w=m,v=o));if(v){var b=[t,n],M=[t,i],N=[e,i],k=[e,n];v.halfedges.push(Ic.push(Yr(u=v.site,b,M))-1,Ic.push(Yr(u,M,N))-1,Ic.push(Yr(u,N,k))-1,Ic.push(Yr(u,k,b))-1)}}for(r=0;r<y;++r)(o=jc[r])&&(o.halfedges.length||delete jc[r])}function Zr(){Lr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Wr(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 u=r[0],a=r[1],s=i[0]-u,h=i[1]-a,c=o[0]-u,l=o[1]-a,f=2*(s*l-h*c);if(!(f>=-Zc)){var _=s*s+h*h,p=c*c+l*l,d=(l*_-h*p)/f,y=(s*p-c*_)/f,v=$c.pop()||new Zr;v.arc=t,v.site=r,v.x=d+u,v.y=(v.cy=y+a)+Math.sqrt(d*d+y*y),t.circle=v;for(var g=null,x=Xc._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){g=x.P;break}x=x.L}else{if(!x.R){g=x;break}x=x.R}Xc.insert(g,v),g||(zc=v)}}}}function Jr(t){var n=t.circle;n&&(n.P||(zc=n.N),Xc.remove(n),$c.push(n),Lr(n),t.circle=null)}function Gr(){Lr(this),this.edge=this.site=this.circle=null}function Qr(t){var n=Bc.pop()||new Gr;return n.site=t,n}function Kr(t){Jr(t),Oc.remove(t),Bc.push(t),Lr(t)}function to(t){var n=t.circle,e=n.x,i=n.cy,r=[e,i],o=t.P,u=t.N,a=[t];Kr(t);for(var s=o;s.circle&&Math.abs(e-s.circle.x)<Vc&&Math.abs(i-s.circle.cy)<Vc;)o=s.P,a.unshift(s),Kr(s),s=o;a.unshift(s),Jr(s);for(var h=u;h.circle&&Math.abs(e-h.circle.x)<Vc&&Math.abs(i-h.circle.cy)<Vc;)u=h.N,a.push(h),Kr(h),h=u;a.push(h),Jr(h);var c,l=a.length;for(c=1;c<l;++c)h=a[c],s=a[c-1],qr(h.edge,s.site,h.site,r);s=a[0],h=a[l-1],h.edge=Fr(s.site,h.site,null,r),Wr(s),Wr(h)}function no(t){for(var n,e,i,r,o=t[0],u=t[1],a=Oc._;a;)if(i=eo(a,u)-o,i>Vc)a=a.L;else{if(r=o-io(a,u),!(r>Vc)){i>-Vc?(n=a.P,e=a):r>-Vc?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}jr(t);var s=Qr(t);if(Oc.insert(n,s),n||e){if(n===e)return Jr(n),e=Qr(n.site),Oc.insert(s,e),s.edge=e.edge=Fr(n.site,s.site),Wr(n),void Wr(e);if(!e)return void(s.edge=Fr(n.site,s.site));Jr(n),Jr(e);var h=n.site,c=h[0],l=h[1],f=t[0]-c,_=t[1]-l,p=e.site,d=p[0]-c,y=p[1]-l,v=2*(f*y-_*d),g=f*f+_*_,x=d*d+y*y,m=[(y*g-_*x)/v+c,(f*x-d*g)/v+l];qr(e.edge,h,p,m),s.edge=Fr(h,t,null,m),e.edge=Fr(t,p,null,m),Wr(n),Wr(e)}}function eo(t,n){var e=t.site,i=e[0],r=e[1],o=r-n;if(!o)return i;var u=t.P;if(!u)return-(1/0);e=u.site;var a=e[0],s=e[1],h=s-n;if(!h)return a;var c=a-i,l=1/o-1/h,f=c/h;return l?(-f+Math.sqrt(f*f-2*l*(c*c/(-2*h)-s+h/2+r-o/2)))/l+i:(i+a)/2}function io(t,n){var e=t.N;if(e)return eo(e,n);var i=t.site;return i[1]===n?i[0]:1/0}function ro(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function oo(t,n){return n[1]-t[1]||n[0]-t[0]}function uo(t,n){var e,i,r,o=t.sort(oo).pop();for(Ic=[],jc=new Array(t.length),Oc=new Ur,Xc=new Ur;;)if(r=zc,o&&(!r||o[1]<r.y||o[1]===r.y&&o[0]<r.x))o[0]===e&&o[1]===i||(no(o),e=o[0],i=o[1]),o=t.pop();else{if(!r)break;to(r.arc)}if(Br(),n){var u=+n[0][0],a=+n[0][1],s=+n[1][0],h=+n[1][1];Or(u,a,s,h),Vr(u,a,s,h)}this.edges=Ic,this.cells=jc,Oc=Xc=Ic=jc=null}function ao(t,n,e){this.k=t,this.x=n,this.y=e}var so=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},ho=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,i,r){for(null==i&&(i=0),null==r&&(r=n.length);i<r;){var o=i+r>>>1;t(n[o],e)<0?i=o+1:r=o}return i},right:function(n,e,i,r){for(null==i&&(i=0),null==r&&(r=n.length);i<r;){var o=i+r>>>1;t(n[o],e)>0?r=o:i=o+1}return i}}},co=ho(so),lo=co.right,fo=Array.prototype,_o=(fo.slice,fo.map,function(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}),po=Math.sqrt(50),yo=Math.sqrt(10),vo=Math.sqrt(2),go=function(t,n,i){var r=e(t,n,i);return _o(Math.ceil(t/r)*r,Math.floor(n/r)*r+r/2,r)},xo=function(t){for(var n,e,i,r=t.length,o=-1,u=0;++o<r;)u+=t[o].length;for(e=new Array(u);--r>=0;)for(i=t[r],n=i.length;--n>=0;)e[--u]=i[n];return e},mo=Array.prototype.slice,wo=function(t){return t},bo=1,Mo=2,No=3,ko=4,To=1e-6,Co={value:function(){}};f.prototype=l.prototype={constructor:f,on:function(t,n){var e,i=this._,r=_(t+"",i),o=-1,u=r.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=r[o]).type)i[e]=d(i[e],t.name,n);else if(null==n)for(e in i)i[e]=d(i[e],t.name,null);return this}for(;++o<u;)if((e=(t=r[o]).type)&&(e=p(i[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new f(t)},call:function(t,n){if((e=arguments.length-2)>0)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(i=this._[t],o=0,e=i.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 So="http://www.w3.org/1999/xhtml",Ao={svg:"http://www.w3.org/2000/svg",xhtml:So,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Eo=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ao.hasOwnProperty(n)?{space:Ao[n],local:t}:t},Uo=function(t){var n=Eo(t);return(n.local?v:y)(n)},Lo=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Po=document.documentElement;if(!Po.matches){var Do=Po.webkitMatchesSelector||Po.msMatchesSelector||Po.mozMatchesSelector||Po.oMatchesSelector;Lo=function(t){return function(){return Do.call(this,t)}}}}var Ro=Lo,Fo={},Yo=null;if("undefined"!=typeof document){var qo=document.documentElement;"onmouseenter"in qo||(Fo={mouseenter:"mouseover",mouseleave:"mouseout"})}var Ho=function(t,n,e){var i,r,o=m(t+""),u=o.length;{if(!(arguments.length<2)){for(a=n?b:w,null==e&&(e=!1),i=0;i<u;++i)this.each(a(o[i],n,e));return this}var a=this.node().__on;if(a)for(var s,h=0,c=a.length;h<c;++h)for(i=0,s=a[h];i<u;++i)if((r=o[i]).type===s.type&&r.name===s.name)return s.value}},zo=function(t){return null==t?M:function(){return this.querySelector(t)}},Oo=function(t){"function"!=typeof t&&(t=zo(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,u,a=n[r],s=a.length,h=i[r]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),h[c]=u);return new st(i,this._parents)},jo=function(t){return null==t?N:function(){return this.querySelectorAll(t)}},Xo=function(t){"function"!=typeof t&&(t=jo(t));for(var n=this._groups,e=n.length,i=[],r=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,h=0;h<s;++h)(u=a[h])&&(i.push(t.call(u,u.__data__,h,a)),r.push(u));return new st(i,r)},Io=function(t){"function"!=typeof t&&(t=Ro(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,u=n[r],a=u.length,s=i[r]=[],h=0;h<a;++h)(o=u[h])&&t.call(o,o.__data__,h,u)&&s.push(o);return new st(i,this._parents)},$o=function(t){return new Array(t.length)},Bo=function(){return new st(this._enter||this._groups.map($o),this._parents)};k.prototype={constructor:k,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)}};var Vo=function(t){return function(){return t}},Zo="$",Wo=function(t,n){if(!t)return _=new Array(this.size()),h=-1,this.each(function(t){_[++h]=t}),_;var e=n?C:T,i=this._parents,r=this._groups;"function"!=typeof t&&(t=Vo(t));for(var o=r.length,u=new Array(o),a=new Array(o),s=new Array(o),h=0;h<o;++h){var c=i[h],l=r[h],f=l.length,_=t.call(c,c&&c.__data__,h,i),p=_.length,d=a[h]=new Array(p),y=u[h]=new Array(p),v=s[h]=new Array(f);e(c,l,d,y,v,_,n);for(var g,x,m=0,w=0;m<p;++m)if(g=d[m]){for(m>=w&&(w=m+1);!(x=y[w])&&++w<p;);g._next=x||null}}return u=new st(u,i),u._enter=a,u._exit=s,u},Jo=function(){return new st(this._exit||this._groups.map($o),this._parents)},Go=function(t){for(var n=this._groups,e=t._groups,i=n.length,r=e.length,o=Math.min(i,r),u=new Array(i),a=0;a<o;++a)for(var s,h=n[a],c=e[a],l=h.length,f=u[a]=new Array(l),_=0;_<l;++_)(s=h[_]||c[_])&&(f[_]=s);for(;a<i;++a)u[a]=n[a];return new st(u,this._parents)},Qo=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var i,r=t[n],o=r.length-1,u=r[o];--o>=0;)(i=r[o])&&(u&&u!==i.nextSibling&&u.parentNode.insertBefore(i,u),u=i);return this},Ko=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var u,a=e[o],s=a.length,h=r[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(h[c]=u);h.sort(n)}return new st(r,this._parents).order()},tu=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nu=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},eu=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 u=i[r];if(u)return u}return null},iu=function(){var t=0;return this.each(function(){++t}),t},ru=function(){return!this.node()},ou=function(t){for(var n=this._groups,e=0,i=n.length;e<i;++e)for(var r,o=n[e],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},uu=function(t,n){var e=Eo(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?E:A:"function"==typeof n?e.local?D:P:e.local?L:U)(e,n))},au=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},su=function(t,n,e){var i;return arguments.length>1?this.each((null==n?R:"function"==typeof n?Y:F)(t,n,null==e?"":e)):au(i=this.node()).getComputedStyle(i,null).getPropertyValue(t)},hu=function(t,n){return arguments.length>1?this.each((null==n?q:"function"==typeof n?z:H)(t,n)):this.node()[t]};X.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var cu=function(t,n){var e=O(t+"");if(arguments.length<2){for(var i=j(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof n?Z:n?B:V)(e,n))},lu=function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?G:J)(t)):this.node().textContent},fu=function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?tt:K)(t)):this.node().innerHTML},_u=function(){return this.each(nt)},pu=function(){return this.each(et)},du=function(t){var n="function"==typeof t?t:Uo(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},yu=function(t,n){var e="function"==typeof t?t:Uo(t),i=null==n?it:"function"==typeof n?n:zo(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},vu=function(){return this.each(rt)},gu=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},xu=function(t,n){return this.each(("function"==typeof n?at:ut)(t,n))},mu=[null];st.prototype=ht.prototype={constructor:st,select:Oo,selectAll:Xo,filter:Io,data:Wo,enter:Bo,exit:Jo,merge:Go,order:Qo,sort:Ko,call:tu,nodes:nu,node:eu,size:iu,empty:ru,each:ou,attr:uu,style:su,property:hu,classed:cu,text:lu,html:fu,raise:_u,lower:pu,append:du,insert:yu,remove:vu,datum:gu,on:Ho,dispatch:xu};var wu=function(t){return"string"==typeof t?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],mu)};ct.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var bu=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},Mu=.7,Nu=1/Mu,ku="\\s*([+-]?\\d+)\\s*",Tu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Su=/^#([0-9a-f]{3})$/,Au=/^#([0-9a-f]{6})$/,Eu=new RegExp("^rgb\\("+[ku,ku,ku]+"\\)$"),Uu=new RegExp("^rgb\\("+[Cu,Cu,Cu]+"\\)$"),Lu=new RegExp("^rgba\\("+[ku,ku,ku,Tu]+"\\)$"),Pu=new RegExp("^rgba\\("+[Cu,Cu,Cu,Tu]+"\\)$"),Du=new RegExp("^hsl\\("+[Tu,Cu,Cu]+"\\)$"),Ru=new RegExp("^hsla\\("+[Tu,Cu,Cu,Tu]+"\\)$"),Fu={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};bu(ft,_t,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),bu(gt,vt,lt(ft,{brighter:function(t){return t=null==t?Nu:Math.pow(Nu,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Mu:Math.pow(Mu,t),new gt(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 t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(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+")")}})),bu(bt,wt,lt(ft,{brighter:function(t){return t=null==t?Nu:Math.pow(Nu,t),new bt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Mu:Math.pow(Mu,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,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new gt(Mt(t>=240?t-240:t+120,r,i),Mt(t,r,i),Mt(t<120?t+240:t-120,r,i),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 Yu=Math.PI/180,qu=180/Math.PI,Hu=18,zu=.95047,Ou=1,ju=1.08883,Xu=4/29,Iu=6/29,$u=3*Iu*Iu,Bu=Iu*Iu*Iu;bu(Tt,kt,lt(ft,{brighter:function(t){return new Tt(this.l+Hu*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Tt(this.l-Hu*(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;return t=Ou*St(t),n=zu*St(n),e=ju*St(e),new gt(At(3.2404542*n-1.5371385*t-.4985314*e),At(-.969266*n+1.8760108*t+.041556*e),At(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),bu(Pt,Lt,lt(ft,{brighter:function(t){return new Pt(this.h,this.c,this.l+Hu*(null==t?1:t),this.opacity)},darker:function(t){return new Pt(this.h,this.c,this.l-Hu*(null==t?1:t),this.opacity)},rgb:function(){return Nt(this).rgb()}}));var Vu=-.14861,Zu=1.78277,Wu=-.29227,Ju=-.90649,Gu=1.97294,Qu=Gu*Ju,Ku=Gu*Zu,ta=Zu*Wu-Ju*Vu;bu(Ft,Rt,lt(ft,{brighter:function(t){return t=null==t?Nu:Math.pow(Nu,t),new Ft(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Mu:Math.pow(Mu,t),new Ft(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Yu,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(t),r=Math.sin(t);return new gt(255*(n+e*(Vu*i+Zu*r)),255*(n+e*(Wu*i+Ju*r)),255*(n+e*(Gu*i)),this.opacity)}}));var na,ea,ia,ra,oa=function(t){return function(){return t}},ua=function Wc(t){function n(t,n){var i=e((t=vt(t)).r,(n=vt(n)).r),r=e(t.g,n.g),o=e(t.b,n.b),u=Ot(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}var e=zt(t);return n.gamma=Wc,n}(1),aa=function(t,n){var e,i=n?n.length:0,r=t?Math.min(i,t.length):0,o=new Array(i),u=new Array(i);for(e=0;e<r;++e)o[e]=pa(t[e],n[e]);for(;e<i;++e)u[e]=n[e];return function(t){for(e=0;e<r;++e)u[e]=o[e](t);return u}},sa=function(t,n){var e=new Date;return t=+t,n-=t,function(i){return e.setTime(t+n*i),e}},ha=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},ca=function(t,n){var e,i={},r={};null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={});for(e in n)e in t?i[e]=pa(t[e],n[e]):r[e]=n[e];return function(t){for(e in i)r[e]=i[e](t);return r}},la=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fa=new RegExp(la.source,"g"),_a=function(t,n){var e,i,r,o=la.lastIndex=fa.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=la.exec(t))&&(i=fa.exec(n));)(r=i.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(e=e[0])===(i=i[0])?a[u]?a[u]+=i:a[++u]=i:(a[++u]=null,s.push({i:u,x:ha(e,i)})),o=fa.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?s[0]?Xt(s[0].x):jt(n):(n=s.length,function(t){for(var e,i=0;i<n;++i)a[(e=s[i]).i]=e.x(t);return a.join("")})},pa=function(t,n){var e,i=typeof n;return null==n||"boolean"===i?oa(n):("number"===i?ha:"string"===i?(e=_t(n))?(n=e,ua):_a:n instanceof _t?ua:n instanceof Date?sa:Array.isArray(n)?aa:isNaN(n)?ca:ha)(t,n)},da=function(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}},ya=180/Math.PI,va={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ga=function(t,n,e,i,r,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*i)&&(e-=t*s,i-=n*s),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,s/=a),t*i<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:r,translateY:o,rotate:Math.atan2(n,t)*ya,skewX:Math.atan(s)*ya,scaleX:u,scaleY:a}},xa=Bt(It,"px, ","px)","deg)"),ma=Bt($t,", ",")",")");Math.SQRT2;Vt(Ht);var wa,ba,Ma=Vt(Ot),Na=0,ka=0,Ta=0,Ca=1e3,Sa=0,Aa=0,Ea=0,Ua="object"==typeof performance&&performance.now?performance:Date,La="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};Jt.prototype=Gt.prototype={constructor:Jt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Zt():+e)+(null==n?0:+n),this._next||ba===this||(ba?ba._next=this:wa=this,ba=this),this._call=t,this._time=e,en()},stop:function(){this._call&&(this._call=null,this._time=1/0,en())}};var Pa=function(t,n,e){var i=new Jt;return n=null==n?0:+n,i.restart(function(e){i.stop(),t(e+n)},n,e),i},Da=l("start","end","interrupt"),Ra=[],Fa=0,Ya=1,qa=2,Ha=3,za=4,Oa=5,ja=6,Xa=function(t,n,e,i,r,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};an(t,e,{name:n,index:i,group:r,on:Da,tween:Ra,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fa})},Ia=function(t,n){var e,i,r,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(r in o)(e=o[r]).name===n?(i=e.state>qa&&e.state<Oa,e.state=ja,e.timer.stop(),i&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[r]):u=!1;u&&delete t.__transition}},$a=function(t){return this.each(function(){Ia(this,t)})},Ba=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=un(this.node(),e).tween,o=0,u=r.length;o<u;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==n?sn:hn)(e,t,n))},Va=function(t,n){var e;return("number"==typeof n?ha:n instanceof _t?ua:(e=_t(n))?(n=e,ua):_a)(t,n)},Za=function(t,n){var e=Eo(t),i="transform"===e?ma:Va;return this.attrTween(t,"function"==typeof n?(e.local?yn:dn)(e,i,cn(this,"attr."+t,n)):null==n?(e.local?fn:ln)(e):(e.local?pn:_n)(e,i,n));
},Wa=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;var i=Eo(t);return this.tween(e,(i.local?vn:gn)(i,n))},Ja=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?xn:mn)(n,t)):un(this.node(),n).delay},Ga=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?wn:bn)(n,t)):un(this.node(),n).duration},Qa=function(t){var n=this._id;return arguments.length?this.each(Mn(n,t)):un(this.node(),n).ease},Ka=function(t){"function"!=typeof t&&(t=Ro(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,u=n[r],a=u.length,s=i[r]=[],h=0;h<a;++h)(o=u[h])&&t.call(o,o.__data__,h,u)&&s.push(o);return new Dn(i,this._parents,this._name,this._id)},ts=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,i=n.length,r=e.length,o=Math.min(i,r),u=new Array(i),a=0;a<o;++a)for(var s,h=n[a],c=e[a],l=h.length,f=u[a]=new Array(l),_=0;_<l;++_)(s=h[_]||c[_])&&(f[_]=s);for(;a<i;++a)u[a]=n[a];return new Dn(u,this._parents,this._name,this._id)},ns=function(t,n){var e=this._id;return arguments.length<2?un(this.node(),e).on.on(t):this.each(kn(e,t,n))},es=function(){return this.on("end.remove",Tn(this._id))},is=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=zo(t));for(var i=this._groups,r=i.length,o=new Array(r),u=0;u<r;++u)for(var a,s,h=i[u],c=h.length,l=o[u]=new Array(c),f=0;f<c;++f)(a=h[f])&&(s=t.call(a,a.__data__,f,h))&&("__data__"in a&&(s.__data__=a.__data__),l[f]=s,Xa(l[f],n,e,f,l,un(a,e)));return new Dn(o,this._parents,n,e)},rs=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=jo(t));for(var i=this._groups,r=i.length,o=[],u=[],a=0;a<r;++a)for(var s,h=i[a],c=h.length,l=0;l<c;++l)if(s=h[l]){for(var f,_=t.call(s,s.__data__,l,h),p=un(s,e),d=0,y=_.length;d<y;++d)(f=_[d])&&Xa(f,n,e,d,_,p);o.push(_),u.push(s)}return new Dn(o,u,n,e)},os=ht.prototype.constructor,us=function(){return new os(this._groups,this._parents)},as=function(t,n,e){var i="transform"==(t+="")?xa:Va;return null==n?this.styleTween(t,Cn(t,i)).on("end.style."+t,Sn(t)):this.styleTween(t,"function"==typeof n?En(t,i,cn(this,"style."+t,n)):An(t,i,n),e)},ss=function(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,Un(t,n,null==e?"":e))},hs=function(t){return this.tween("text","function"==typeof t?Pn(cn(this,"text",t)):Ln(null==t?"":t+""))},cs=function(){for(var t=this._name,n=this._id,e=Fn(),i=this._groups,r=i.length,o=0;o<r;++o)for(var u,a=i[o],s=a.length,h=0;h<s;++h)if(u=a[h]){var c=un(u,n);Xa(u,t,e,h,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Dn(i,this._parents,t,e)},ls=0,fs=ht.prototype;Dn.prototype=Rn.prototype={constructor:Dn,select:is,selectAll:rs,filter:Ka,merge:ts,selection:us,transition:cs,call:fs.call,nodes:fs.nodes,node:fs.node,size:fs.size,empty:fs.empty,each:fs.each,on:ns,attr:Za,attrTween:Wa,style:as,styleTween:ss,text:hs,remove:es,tween:Ba,delay:Ja,duration:Ga,ease:Qa};var _s=3,ps=(function Jc(t){function n(n){return Math.pow(n,t)}return t=+t,n.exponent=Jc,n}(_s),function Gc(t){function n(n){return 1-Math.pow(1-n,t)}return t=+t,n.exponent=Gc,n}(_s),function Qc(t){function n(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return t=+t,n.exponent=Qc,n}(_s),1.70158),ds=(function Kc(t){function n(n){return n*n*((t+1)*n-t)}return t=+t,n.overshoot=Kc,n}(ps),function tl(t){function n(n){return--n*n*((t+1)*n+t)+1}return t=+t,n.overshoot=tl,n}(ps),function nl(t){function n(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return t=+t,n.overshoot=nl,n}(ps),2*Math.PI),ys=1,vs=.3,gs=(function el(t,n){function e(e){return t*Math.pow(2,10*--e)*Math.sin((i-e)/n)}var i=Math.asin(1/(t=Math.max(1,t)))*(n/=ds);return e.amplitude=function(t){return el(t,n*ds)},e.period=function(n){return el(t,n)},e}(ys,vs),function il(t,n){function e(e){return 1-t*Math.pow(2,-10*(e=+e))*Math.sin((e+i)/n)}var i=Math.asin(1/(t=Math.max(1,t)))*(n/=ds);return e.amplitude=function(t){return il(t,n*ds)},e.period=function(n){return il(t,n)},e}(ys,vs),function rl(t,n){function e(e){return((e=2*e-1)<0?t*Math.pow(2,10*e)*Math.sin((i-e)/n):2-t*Math.pow(2,-10*e)*Math.sin((i+e)/n))/2}var i=Math.asin(1/(t=Math.max(1,t)))*(n/=ds);return e.amplitude=function(t){return rl(t,n*ds)},e.period=function(n){return rl(t,n)},e}(ys,vs),{time:null,delay:0,duration:250,ease:Yn}),xs=function(t){var n,e;t instanceof Dn?(n=t._id,t=t._name):(n=Fn(),(e=gs).time=Zt(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var u,a=i[o],s=a.length,h=0;h<s;++h)(u=a[h])&&Xa(u,t,n,h,a,e||qn(u,n));return new Dn(i,this._parents,t,n)};ht.prototype.interrupt=$a,ht.prototype.transition=xs;var ms=({name:"x",handles:["e","w"].map(Hn),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]]}},{name:"y",handles:["n","s"].map(Hn),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]]}},{name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Hn),input:function(t){return t},output:function(t){return t}},Math.cos,Math.sin,Math.PI,Math.max,Array.prototype.slice,Math.PI),ws=2*ms,bs=1e-6,Ms=ws-bs;zn.prototype=On.prototype={constructor:zn,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=this._x1,u=this._y1,a=e-t,s=i-n,h=o-t,c=u-n,l=h*h+c*c;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>bs)if(Math.abs(c*a-s*h)>bs&&r){var f=e-o,_=i-u,p=a*a+s*s,d=f*f+_*_,y=Math.sqrt(p),v=Math.sqrt(l),g=r*Math.tan((ms-Math.acos((p+l-d)/(2*y*v)))/2),x=g/v,m=g/y;Math.abs(x-1)>bs&&(this._+="L"+(t+x*h)+","+(n+x*c)),this._+="A"+r+","+r+",0,0,"+ +(c*f>h*_)+","+(this._x1=t+m*a)+","+(this._y1=n+m*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,o){t=+t,n=+n,e=+e;var u=e*Math.cos(i),a=e*Math.sin(i),s=t+u,h=n+a,c=1^o,l=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+s+","+h:(Math.abs(this._x1-s)>bs||Math.abs(this._y1-h)>bs)&&(this._+="L"+s+","+h),e&&(l>Ms?this._+="A"+e+","+e+",0,1,"+c+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+c+","+(this._x1=s)+","+(this._y1=h):(l<0&&(l=l%ws+ws),this._+="A"+e+","+e+",0,"+ +(l>=ms)+","+c+","+(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._}};var Ns="$";jn.prototype=Xn.prototype={constructor:jn,has:function(t){return Ns+t in this},get:function(t){return this[Ns+t]},set:function(t,n){return this[Ns+t]=n,this},remove:function(t){var n=Ns+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===Ns&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===Ns&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===Ns&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===Ns&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===Ns&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ns)return!1;return!0},each:function(t){for(var n in this)n[0]===Ns&&t(this[n],n.slice(1),this)}};var ks=Xn.prototype;In.prototype=$n.prototype={constructor:In,has:ks.has,add:function(t){return t+="",this[Ns+t]=t,this},remove:ks.remove,clear:ks.clear,values:ks.keys,size:ks.size,empty:ks.empty,each:ks.each};var Ts=function(t){function n(t,n){var i,r,o=e(t,function(t,e){return i?i(t,e-1):(r=t,void(i=n?Vn(t,n):Bn(t)))});return o.columns=r,o}function e(t,n){function e(){if(c>=h)return u;if(r)return r=!1,o;var n,e=c;if(34===t.charCodeAt(e)){for(var i=e;i++<h;)if(34===t.charCodeAt(i)){if(34!==t.charCodeAt(i+1))break;++i}return c=i+2,n=t.charCodeAt(i+1),13===n?(r=!0,10===t.charCodeAt(i+2)&&++c):10===n&&(r=!0),t.slice(e+1,i).replace(/""/g,'"')}for(;c<h;){var a=1;if(n=t.charCodeAt(c++),10===n)r=!0;else if(13===n)r=!0,10===t.charCodeAt(c)&&(++c,++a);else if(n!==s)continue;return t.slice(e,c-a)}return t.slice(e)}for(var i,r,o={},u={},a=[],h=t.length,c=0,l=0;(i=e())!==u;){for(var f=[];i!==o&&i!==u;)f.push(i),i=e();n&&null==(f=n(f,l++))||a.push(f)}return a}function i(n,e){return null==e&&(e=Zn(n)),[e.map(u).join(t)].concat(n.map(function(n){return e.map(function(t){return u(n[t])}).join(t)})).join("\n")}function r(t){return t.map(o).join("\n")}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":a.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return{parse:n,parseRows:e,format:i,formatRows:r}},Cs=Ts(","),Ss=Cs.parse,As=Ts("\t"),Es=As.parse,Us=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Wn(this.cover(n,e),n,e,t)},Ls=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(!(e>t||t>r||i>n||n>o))return this;var u,a,s=r-e,h=this._root;switch(a=(n<(i+o)/2)<<1|t<(e+r)/2){case 0:do u=new Array(4),u[a]=h,h=u;while(s*=2,r=e+s,o=i+s,t>r||n>o);break;case 1:do u=new Array(4),u[a]=h,h=u;while(s*=2,e=r-s,o=i+s,e>t||n>o);break;case 2:do u=new Array(4),u[a]=h,h=u;while(s*=2,r=e+s,i=o-s,t>r||i>n);break;case 3:do u=new Array(4),u[a]=h,h=u;while(s*=2,e=r-s,i=o-s,e>t||i>n)}this._root&&this._root.length&&(this._root=h)}return this._x0=e,this._y0=i,this._x1=r,this._y1=o,this},Ps=function(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t},Ds=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]]},Rs=function(t,n,e,i,r){this.node=t,this.x0=n,this.y0=e,this.x1=i,this.y1=r},Fs=function(t,n,e){var i,r,o,u,a,s,h,c=this._x0,l=this._y0,f=this._x1,_=this._y1,p=[],d=this._root;for(d&&p.push(new Rs(d,c,l,f,_)),null==e?e=1/0:(c=t-e,l=n-e,f=t+e,_=n+e,e*=e);s=p.pop();)if(!(!(d=s.node)||(r=s.x0)>f||(o=s.y0)>_||(u=s.x1)<c||(a=s.y1)<l))if(d.length){var y=(r+u)/2,v=(o+a)/2;p.push(new Rs(d[3],y,v,u,a),new Rs(d[2],r,v,y,a),new Rs(d[1],y,o,u,v),new Rs(d[0],r,o,y,v)),(h=(n>=v)<<1|t>=y)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-h],p[p.length-1-h]=s)}else{var g=t-+this._x.call(null,d.data),x=n-+this._y.call(null,d.data),m=g*g+x*x;if(m<e){var w=Math.sqrt(e=m);c=t-w,l=n-w,f=t+w,_=n+w,i=d.data}}return i},Ys=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,i,r,o,u,a,s,h,c,l,f,_=this._root,p=this._x0,d=this._y0,y=this._x1,v=this._y1;if(!_)return this;if(_.length)for(;;){if((h=o>=(a=(p+y)/2))?p=a:y=a,(c=u>=(s=(d+v)/2))?d=s:v=s,n=_,!(_=_[l=c<<1|h]))return this;if(!_.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,f=l)}for(;_.data!==t;)if(i=_,!(_=_.next))return this;return(r=_.next)&&delete _.next,i?(r?i.next=r:delete i.next,this):n?(r?n[l]=r:delete n[l],(_=n[0]||n[1]||n[2]||n[3])&&_===(n[3]||n[2]||n[1]||n[0])&&!_.length&&(e?e[f]=_:this._root=_),this):(this._root=r,this)},qs=function(){return this._root},Hs=function(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t},zs=function(t){var n,e,i,r,o,u,a=[],s=this._root;for(s&&a.push(new Rs(s,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(s=n.node,i=n.x0,r=n.y0,o=n.x1,u=n.y1)&&s.length){var h=(i+o)/2,c=(r+u)/2;(e=s[3])&&a.push(new Rs(e,h,c,o,u)),(e=s[2])&&a.push(new Rs(e,i,c,h,u)),(e=s[1])&&a.push(new Rs(e,h,r,o,c)),(e=s[0])&&a.push(new Rs(e,i,r,h,c))}return this},Os=function(t){var n,e=[],i=[];for(this._root&&e.push(new Rs(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var r=n.node;if(r.length){var o,u=n.x0,a=n.y0,s=n.x1,h=n.y1,c=(u+s)/2,l=(a+h)/2;(o=r[0])&&e.push(new Rs(o,u,a,c,l)),(o=r[1])&&e.push(new Rs(o,c,a,s,l)),(o=r[2])&&e.push(new Rs(o,u,l,c,h)),(o=r[3])&&e.push(new Rs(o,c,l,s,h))}i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},js=function(t){return arguments.length?(this._x=t,this):this._x},Xs=function(t){return arguments.length?(this._y=t,this):this._y},Is=te.prototype=ne.prototype;Is.copy=function(){var t,n,e=new ne(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=ee(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]=ee(n));return e},Is.add=Us,Is.addAll=Jn,Is.cover=Ls,Is.data=Ps,Is.extent=Ds,Is.find=Fs,Is.remove=Ys,Is.removeAll=Gn,Is.root=qs,Is.size=Hs,Is.visit=zs,Is.visitAfter=Os,Is.x=js,Is.y=Xs;var $s,Bs=(Math.PI*(3-Math.sqrt(5)),function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}),Vs=function(t){return t=Bs(Math.abs(t)),t?t[1]:NaN},Zs=function(t,n){return function(e,i){for(var r=e.length,o=[],u=0,a=t[0],s=0;r>0&&a>0&&(s+a+1>i&&(a=Math.max(1,i-s)),o.push(e.substring(r-=a,r+a)),!((s+=a+1)>i));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}},Ws=function(t,n){t=t.toPrecision(n);t:for(var e,i=t.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:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},Js=function(t,n){var e=Bs(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-($s=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=i.length;return o===u?i:o>u?i+new Array(o-u+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Bs(t,Math.max(0,n+o-1))[0]},Gs=function(t,n){var e=Bs(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array((-r)).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},Qs={"":Ws,"%":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 Gs(100*t,n)},r:Gs,s:Js,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ks=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i,th=function(t){return new ie(t)};ie.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 nh,eh,ih,rh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],oh=function(t){function n(t){function n(t){var n,r,s,g=p,x=d;if("c"===_)x=y(t)+x,t="";else{t=+t;var m=(t<0||1/t<0)&&(t*=-1,!0);if(t=y(t,f),m)for(n=-1,r=t.length,m=!1;++n<r;)if(s=t.charCodeAt(n),48<s&&s<58||"x"===_&&96<s&&s<103||"X"===_&&64<s&&s<71){m=!0;break}if(g=(m?"("===a?a:"-":"-"===a||"("===a?"":a)+g,x=x+("s"===_?rh[8+$s/3]:"")+(m&&"("===a?")":""),v)for(n=-1,r=t.length;++n<r;)if(s=t.charCodeAt(n),48>s||s>57){x=(46===s?o+t.slice(n+1):t.slice(n))+x,t=t.slice(0,n);break}}l&&!h&&(t=i(t,1/0));var w=g.length+t.length+x.length,b=w<c?new Array(c-w+1).join(e):"";switch(l&&h&&(t=i(b+t,b.length?c-x.length:1/0),b=""),u){case"<":return g+t+x+b;case"=":return g+b+t+x;case"^":return b.slice(0,w=b.length>>1)+g+t+x+b.slice(w)}return b+g+t+x}t=th(t);var e=t.fill,u=t.align,a=t.sign,s=t.symbol,h=t.zero,c=t.width,l=t.comma,f=t.precision,_=t.type,p="$"===s?r[0]:"#"===s&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",d="$"===s?r[1]:/[%p]/.test(_)?"%":"",y=Qs[_],v=!_||/[defgprs%]/.test(_);return f=null==f?_?6:12:/[gprs]/.test(_)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),n.toString=function(){return t+""},n}function e(t,e){var i=n((t=th(t),t.type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Vs(e)/3))),o=Math.pow(10,-r),u=rh[8+r/3];return function(t){return i(o*t)+u}}var i=t.grouping&&t.thousands?Zs(t.grouping,t.thousands):re,r=t.currency,o=t.decimal;return{format:n,formatPrefix:e}};oe({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var uh=function(t){return Math.max(0,-Vs(Math.abs(t)))},ah=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vs(n)/3)))-Vs(Math.abs(t)))},sh=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Vs(n)-Vs(t))+1},hh=function(){return new ue};ue.prototype={constructor:ue,reset:function(){this.s=this.t=0},add:function(t){ae(ch,t,this.t),ae(this,ch.s,this.s),this.s?this.t+=ch.t:this.s=ch.t},valueOf:function(){return this.s}};var ch=new ue,lh=1e-6,fh=Math.PI,_h=fh/2,ph=fh/4,dh=2*fh,yh=fh/180,vh=Math.abs,gh=Math.atan,xh=Math.atan2,mh=Math.cos,wh=(Math.ceil,Math.exp),bh=Math.log,Mh=(Math.pow,Math.sin),Nh=(Math.sign||function(t){return t>0?1:t<0?-1:0},Math.sqrt),kh=Math.tan;hh(),hh(),hh();pe.invert=pe;var Th=function(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:ce,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},Ch=function(t,n){return vh(t[0]-n[0])<lh&&vh(t[1]-n[1])<lh},Sh=function(t,n,e,i,r){var o,u,a=[],s=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],u=t[n];if(Ch(i,u)){for(r.lineStart(),o=0;o<n;++o)r.point((i=t[o])[0],i[1]);return void r.lineEnd()}a.push(e=new de(i,t,null,(!0))),s.push(e.o=new de(i,null,e,(!1))),a.push(e=new de(u,t,null,(!1))),s.push(e.o=new de(u,null,e,(!0)))}}),a.length){for(s.sort(n),ye(a),ye(s),o=0,u=s.length;o<u;++o)s[o].e=e=!e;for(var h,c,l=a[0];;){for(var f=l,_=!0;f.v;)if((f=f.n)===l)return;h=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(_)for(o=0,u=h.length;o<u;++o)r.point((c=h[o])[0],c[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(_)for(h=f.p.z,o=h.length-1;o>=0;--o)r.point((c=h[o])[0],c[1]);else i(f.x,f.p.x,-1,r);f=f.p}f=f.o,h=f.z,_=!_}while(!f.v);r.lineEnd()}}},Ah=(hh(),hh(),hh(),1/0),Eh=-Ah;ve.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,dh)}},result:ce};hh();ge.prototype={_circle:xe(4.5),pointRadius:function(t){return this._circle=xe(t),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:this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}}};var Uh=hh(),Lh=function(t,n){var e=n[0],i=n[1],r=[Mh(e),-mh(e),0],o=0,u=0;Uh.reset();for(var a=0,s=t.length;a<s;++a)if(c=(h=t[a]).length)for(var h,c,l=h[c-1],f=l[0],_=l[1]/2+ph,p=Mh(_),d=mh(_),y=0;y<c;++y,f=g,p=m,d=w,l=v){var v=h[y],g=v[0],x=v[1]/2+ph,m=Mh(x),w=mh(x),b=g-f,M=b>=0?1:-1,N=M*b,k=N>fh,T=p*m;if(Uh.add(xh(T*M*Mh(N),d*w+T*mh(N))),o+=k?b+M*dh:b,k^f>=e^g>=e){var C=fe(le(l),le(v));_e(C);var S=fe(r,C);_e(S);var A=(k^b>=0?-1:1)*he(S[2]);(i>A||i===A&&(C[0]||C[1]))&&(u+=k^b>=0?1:-1)}}return(o<-lh||o<lh&&Uh<-lh)^1&u},Ph=function(t,n,e,i){return function(r,o){function u(n,e){var i=r(n,e);t(n=i[0],e=i[1])&&o.point(n,e)}function a(t,n){var e=r(t,n);y.point(e[0],e[1])}function s(){w.point=a,y.lineStart()}function h(){w.point=u,y.lineEnd()}function c(t,n){d.push([t,n]);var e=r(t,n);x.point(e[0],e[1])}function l(){x.lineStart(),d=[]}function f(){c(d[0][0],d[0][1]),x.lineEnd();var t,n,e,i,r=x.clean(),u=g.result(),a=u.length;if(d.pop(),_.push(d),d=null,a)if(1&r){if(e=u[0],(n=e.length-1)>0){for(m||(o.polygonStart(),m=!0),o.lineStart(),t=0;t<n;++t)o.point((i=e[t])[0],i[1]);o.lineEnd()}}else a>1&&2&r&&u.push(u.pop().concat(u.shift())),p.push(u.filter(me))}var _,p,d,y=n(o),v=r.invert(i[0],i[1]),g=Th(),x=n(g),m=!1,w={point:u,lineStart:s,lineEnd:h,polygonStart:function(){w.point=c,w.lineStart=l,w.lineEnd=f,p=[],_=[]},polygonEnd:function(){w.point=u,w.lineStart=s,w.lineEnd=h,p=xo(p);var t=Lh(_,v);p.length?(m||(o.polygonStart(),m=!0),Sh(p,we,t,e,o)):t&&(m||(o.polygonStart(),m=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),m&&(o.polygonEnd(),m=!1),p=_=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return w}};Ph(function(){return!0},be,Ne,[-fh,-_h]);Te.prototype={constructor:Te,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 Dh=(mh(30*yh),ke({point:function(t,n){this.stream.point(t*yh,n*yh)}}),Ce(function(t){return Nh(2/(1+t))}));Dh.invert=Se(function(t){return 2*he(t/2)});var Rh=Ce(function(t){return(t=se(t))&&t/Mh(t)});Rh.invert=Se(function(t){return t}),Ae.invert=function(t,n){return[-n,2*gh(wh(t))-_h]};var Fh=function(){return this.eachAfter(Ee)},Yh=function(t){var n,e,i,r,o=this,u=[o];do for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(i=0,r=e.length;i<r;++i)u.push(e[i]);while(u.length);return this},qh=function(t){for(var n,e,i=this,r=[i];i=r.pop();)if(t(i),n=i.children)for(e=n.length-1;e>=0;--e)r.push(n[e]);return this},Hh=function(t){for(var n,e,i,r=this,o=[r],u=[];r=o.pop();)if(u.push(r),n=r.children)for(e=0,i=n.length;e<i;++e)o.push(n[e]);for(;r=u.pop();)t(r);return this},zh=function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},Oh=function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},jh=function(t){for(var n=this,e=Ue(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},Xh=function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},Ih=function(){var t=[];return this.each(function(n){t.push(n)}),t},$h=function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},Bh=function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n};Ye.prototype=Le.prototype={constructor:Ye,count:Fh,each:Yh,eachAfter:Hh,eachBefore:qh,sum:zh,sort:Oh,path:jh,ancestors:Xh,descendants:Ih,leaves:$h,links:Bh,copy:Pe};var Vh=function(t,n,e,i,r){for(var o,u=t.children,a=-1,s=u.length,h=t.value&&(i-n)/t.value;++a<s;)o=u[a],o.y0=e,o.y1=r,o.x0=n,o.x1=n+=o.value*h};qe.prototype=Object.create(Ye.prototype);var Zh=function(t,n,e,i,r){for(var o,u=t.children,a=-1,s=u.length,h=t.value&&(r-e)/t.value;++a<s;)o=u[a],o.x0=n,o.x1=i,o.y0=e,o.y1=e+=o.value*h},Wh=(1+Math.sqrt(5))/2;(function ol(t){function n(n,e,i,r,o){He(t,n,e,i,r,o)}return n.ratio=function(t){return ol((t=+t)>1?t:1)},n})(Wh);!function ul(t){function n(n,e,i,r,o){if((u=n._squarify)&&u.ratio===t)for(var u,a,s,h,c,l=-1,f=u.length,_=n.value;++l<f;){for(a=u[l],s=a.children,h=a.value=0,c=s.length;h<c;++h)a.value+=s[h].value;a.dice?Vh(a,e,i,r,i+=(o-i)*a.value/_):Zh(a,e,i,e+=(r-e)*a.value/_,o),_-=a.value}else n._squarify=u=He(t,n,e,i,r,o),u.ratio=t}return n.ratio=function(t){return ul((t=+t)>1?t:1)},n}(Wh);var Jh=([].slice,{}),Gh=function(t,n){function e(t){var n,e=h.status;if(!e&&Be(h)||e>=200&&e<300||304===e){if(o)try{n=o.call(i,h)}catch(r){return void a.call("error",i,r)}else n=h;a.call("load",i,n)}else a.call("error",i,t)}var i,r,o,u,a=l("beforesend","progress","load","error"),s=Xn(),h=new XMLHttpRequest,c=null,f=null,_=0;if("undefined"==typeof XDomainRequest||"withCredentials"in h||!/^(http(s)?:)?\/\//.test(t)||(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=e:h.onreadystatechange=function(t){h.readyState>3&&e(t)},h.onprogress=function(t){a.call("progress",i,t)},i={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==n?s.remove(t):s.set(t,n+""),i)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",i):r},responseType:function(t){return arguments.length?(u=t,i):u},timeout:function(t){return arguments.length?(_=+t,i):_},user:function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},password:function(t){return arguments.length<1?f:(f=null==t?null:t+"",i)},response:function(t){return o=t,i},get:function(t,n){return i.send("GET",t,n)},post:function(t,n){return i.send("POST",t,n)},send:function(n,e,o){return h.open(n,t,!0,c,f),null==r||s.has("accept")||s.set("accept",r+",*/*"),h.setRequestHeader&&s.each(function(t,n){h.setRequestHeader(n,t)}),null!=r&&h.overrideMimeType&&h.overrideMimeType(r),null!=u&&(h.responseType=u),_>0&&(h.timeout=_),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=$e(o)),null!=o&&i.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",i,h),h.send(null==e?null:e),i},abort:function(){return h.abort(),i},on:function(){var t=a.on.apply(a,arguments);return t===a?i:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i},Qh=function(t,n){return function(e,i){var r=Gh(e).mimeType(t).response(n);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return r.get(i)}return r}};Qh("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),Qh("application/json",function(t){return JSON.parse(t.responseText)}),Qh("text/plain",function(t){return t.responseText}),Qh("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});var Kh=function(t,n){return function(e,i,r){arguments.length<3&&(r=i,i=null);var o=Gh(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(Ve(n,i=t)):i},o.row(i),r?o.get(r):o}};Kh("text/csv",Ss),Kh("text/tab-separated-values",Es);var tc=Array.prototype,nc=tc.map,ec=tc.slice,ic={name:"implicit"},rc=function(t){return function(){return t}},oc=function(t){return+t},uc=[0,1],ac=function(t,n,i){var r,o=t[0],u=t[t.length-1],a=e(o,u,null==n?10:n);switch(i=th(null==i?",f":i),i.type){case"s":var s=Math.max(Math.abs(o),Math.abs(u));return null!=i.precision||isNaN(r=ah(a,s))||(i.precision=r),ih(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=sh(a,Math.max(Math.abs(o),Math.abs(u))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=uh(a))||(i.precision=r-2*("%"===i.type))}return eh(i)},sc=new Date,hc=new Date,cc=oi(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});cc.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?oi(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):cc:null};var lc=1e3,fc=6e4,_c=36e5,pc=864e5,dc=6048e5,yc=(oi(function(t){t.setTime(Math.floor(t/lc)*lc)},function(t,n){t.setTime(+t+n*lc)},function(t,n){return(n-t)/lc},function(t){return t.getUTCSeconds()}),oi(function(t){t.setTime(Math.floor(t/fc)*fc)},function(t,n){t.setTime(+t+n*fc)},function(t,n){return(n-t)/fc},function(t){return t.getMinutes()}),oi(function(t){var n=t.getTimezoneOffset()*fc%_c;n<0&&(n+=_c),t.setTime(Math.floor((+t-n)/_c)*_c+n)},function(t,n){t.setTime(+t+n*_c)},function(t,n){return(n-t)/_c},function(t){return t.getHours()}),oi(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*fc)/pc},function(t){return t.getDate()-1})),vc=ui(0),gc=ui(1),xc=(ui(2),ui(3),ui(4),ui(5),ui(6),oi(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()}),oi(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()}));xc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?oi(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var mc=(oi(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*fc)},function(t,n){return(n-t)/fc},function(t){return t.getUTCMinutes()}),oi(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*_c)},function(t,n){return(n-t)/_c},function(t){return t.getUTCHours()}),oi(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/pc},function(t){return t.getUTCDate()-1})),wc=ai(0),bc=ai(1),Mc=(ai(2),ai(3),ai(4),ai(5),ai(6),oi(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()}),oi(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()}));Mc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?oi(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var Nc,kc,Tc,Cc,Sc,Ac={"-":"",_:" ",0:"0"},Ec=/^\s*\d+/,Uc=/^%/,Lc=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;or({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 Pc="%Y-%m-%dT%H:%M:%S.%LZ",Dc=(Date.prototype.toISOString?ur:Cc(Pc),+new Date("2000-01-01T00:00:00.000Z")?ar:Sc(Pc),function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})});Dc("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Dc("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Dc("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Dc("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Ma(Rt(300,.5,0),Rt(-240,.5,1));var Rc=(Ma(Rt(-100,.75,.35),Rt(80,1.5,.8)),Ma(Rt(260,.75,.35),Rt(80,1.5,.8)),Rt(),function(t){return function(){return t}}),Fc=1e-12;Math.PI;sr.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 Yc=function(t){return new sr(t)},qc=function(){function t(t){
var a,s,h,c=t.length,l=!1;for(null==r&&(u=o(h=On())),a=0;a<=c;++a)!(a<c&&i(s=t[a],a,t))===l&&((l=!l)?u.lineStart():u.lineEnd()),l&&u.point(+n(s,a,t),+e(s,a,t));if(h)return u=null,h+""||null}var n=hr,e=cr,i=Rc(!0),r=null,o=Yc,u=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:Rc(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Rc(+n),t):e},t.defined=function(n){return arguments.length?(i="function"==typeof n?n:Rc(!!n),t):i},t.curve=function(n){return arguments.length?(o=n,null!=r&&(u=o(r)),t):o},t.context=function(n){return arguments.length?(null==n?r=u=null:u=o(r=n),t):r},t};fr(Yc);lr.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 Hc=function(){};pr.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:_r(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:_r(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},dr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,r=t[0],o=n[0],u=t[e]-r,a=n[e]-o,s=-1;++s<=e;)i=s/e,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+i*u),this._beta*n[s]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}},function al(t){function n(n){return 1===t?new pr(n):new dr(n,t)}return n.beta=function(t){return al(+t)},n}(.85),vr.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:yr(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:yr(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}},function sl(t){function n(n){return new vr(n,t)}return n.tension=function(t){return sl(+t)},n}(0),gr.prototype={areaStart:Hc,areaEnd:Hc,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:yr(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}},function hl(t){function n(n){return new gr(n,t)}return n.tension=function(t){return hl(+t)},n}(0),xr.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:yr(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}},function cl(t){function n(n){return new xr(n,t)}return n.tension=function(t){return cl(+t)},n}(0),wr.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){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}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;default:mr(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}},function ll(t){function n(n){return t?new wr(n,t):new vr(n,0)}return n.alpha=function(t){return ll(+t)},n}(.5),br.prototype={areaStart:Hc,areaEnd:Hc,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){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(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:mr(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}},function fl(t){function n(n){return t?new br(n,t):new gr(n,0)}return n.alpha=function(t){return fl(+t)},n}(.5),Mr.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){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(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:mr(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}},function _l(t){function n(n){return t?new Mr(n,t):new xr(n,0)}return n.alpha=function(t){return _l(+t)},n}(.5),Sr.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:Cr(this,this._t0,Tr(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(t=+t,n=+n,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,Cr(this,Tr(this,e=kr(this,t,n)),e);break;default:Cr(this,this._t0,e=kr(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Ar.prototype=Object.create(Sr.prototype)).point=function(t,n){Sr.prototype.point.call(this,n,t)},Er.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)}};Array.prototype.slice;Ur.prototype={constructor:Ur,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 this._?(t=Rr(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)i=e.U,e===i.L?(r=i.R,r&&r.C?(e.C=r.C=!1,i.C=!0,t=i):(t===e.R&&(Pr(this,e),t=e,e=t.U),e.C=!1,i.C=!0,Dr(this,i))):(r=i.L,r&&r.C?(e.C=r.C=!1,i.C=!0,t=i):(t===e.L&&(Dr(this,e),t=e,e=t.U),e.C=!1,i.C=!0,Pr(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,r=t.U,o=t.L,u=t.R;if(e=o?u?Rr(u):o:u,r?r.L===t?r.L=e:r.R=e:this._=e,o&&u?(i=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(r=e.U,e.U=t.U,t=e.R,r.L=t,e.R=u,u.U=e):(e.U=r,r=e,t=e.R)):(i=t.C,t=e),t&&(t.U=r),!i){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===r.L){if(n=r.R,n.C&&(n.C=!1,r.C=!0,Pr(this,r),n=r.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Dr(this,n),n=r.R),n.C=r.C,r.C=n.R.C=!1,Pr(this,r),t=this._;break}}else if(n=r.L,n.C&&(n.C=!1,r.C=!0,Dr(this,r),n=r.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Pr(this,n),n=r.L),n.C=r.C,r.C=n.L.C=!1,Dr(this,r),t=this._;break}n.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}};var zc,Oc,jc,Xc,Ic,$c=[],Bc=[],Vc=1e-6,Zc=1e-12;uo.prototype={constructor:uo,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return Ir(n,t[e])});return e.data=n.site.data,e})},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,i){if(o=(r=e.halfedges).length)for(var r,o,u,a=e.site,s=-1,h=n[r[o-1]],c=h.left===a?h.right:h.left;++s<o;)u=c,h=n[r[s]],c=h.left===a?h.right:h.left,u&&c&&i<u.index&&i<c.index&&ro(a,u,c)<0&&t.push([a.data,u.data,c.data])}),t},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(t,n,e){for(var i,r,o=this,u=o._found||0,a=o.cells.length;!(r=o.cells[u]);)if(++u>=a)return null;var s=t-r.site[0],h=n-r.site[1],c=s*s+h*h;do r=o.cells[i=u],u=null,r.halfedges.forEach(function(e){var i=o.edges[e],a=i.left;if(a!==r.site&&a||(a=i.right)){var s=t-a[0],h=n-a[1],l=s*s+h*h;l<c&&(c=l,u=a.index)}});while(null!==u);return o._found=i,null==e||c<=e*e?r.site:null}};ao.prototype={constructor:ao,scale:function(t){return 1===t?this:new ao(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ao(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+")"}};new ao(1,0,0);t.axisBottom=h,t.axisLeft=c,t.axisTop=s,t.formatLocale=oh,t.line=qc,t.scaleBand=We,t.scaleLinear=ri,t.scaleOrdinal=Ze,t.select=wu,Object.defineProperty(t,"__esModule",{value:!0})});