d3=function(){function t(t){return null!=t&&!isNaN(t)}function e(t){return t.length}function n(t){for(var e=1;t*e%1;)e*=10;return e}function i(t,e){try{for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}catch(i){t.prototype=e}}function r(){}function o(){}function s(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function a(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.substring(1);for(var n=0,i=ha.length;i>n;++n){var r=ha[n]+e;if(r in t)return r}}function l(){}function u(){}function c(t){function e(){for(var e,i=n,r=-1,o=i.length;++rn;n++)for(var r,o=t[n],s=0,a=o.length;a>s;s++)(r=o[s])&&e(r,s,n);return t}function L(t){return pa(t,ba),t}function E(t){var e,n;return function(i,r,o){var s,a=t[o].update,l=a.length;for(o!=n&&(n=o,e=0),r>=e&&(e=r+1);!(s=a[e])&&++e0&&(t=t.substring(0,a));var c=ka.get(t);return c&&(t=c,u=R),a?e?r:i:e?l:o}function D(t,e){return function(n){var i=Us.event;Us.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Us.event=i}}}function R(t,e){var n=D(t,e);return function(t){var e=this,i=t.relatedTarget;i&&(i===e||8&i.compareDocumentPosition(e))||n.call(e,t)}}function O(){var t=".dragsuppress-"+ ++Sa,e="click"+t,n=Us.select(Js).on("touchmove"+t,h).on("dragstart"+t,h).on("selectstart"+t,h);if(Ma){var i=Ks.style,r=i[Ma];i[Ma]="none"}return function(o){function s(){n.on(e,null)}n.on(t,null),Ma&&(i[Ma]=r),o&&(n.on(e,function(){h(),s()},!0),setTimeout(s,0))}}function z(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>Ca&&(Js.scrollX||Js.scrollY)){n=Us.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var r=n[0][0].getScreenCTM();Ca=!(r.f||r.e),n.remove()}return Ca?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function H(t){return t>0?1:0>t?-1:0}function j(t){return t>1?0:-1>t?Ta:Math.acos(t)}function I(t){return t>1?_a:-1>t?-_a:Math.asin(t)}function $(t){return((t=Math.exp(t))-1/t)/2}function B(t){return((t=Math.exp(t))+1/t)/2}function F(t){return((t=Math.exp(2*t))-1)/(t+1)}function W(t){return(t=Math.sin(t/2))*t}function q(){}function X(t,e,n){return new Y(t,e,n)}function Y(t,e,n){this.h=t,this.s=e,this.l=n}function G(t,e,n){function i(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(s-o)*t/60:180>t?s:240>t?o+(s-o)*(240-t)/60:o}function r(t){return Math.round(255*i(t))}var o,s;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,s=.5>=n?n*(1+e):n+e-n*e,o=2*n-s,se(r(t+120),r(t),r(t-120))}function U(t,e,n){return new V(t,e,n)}function V(t,e,n){this.h=t,this.c=e,this.l=n}function Z(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),Q(n,Math.cos(t*=Na)*e,Math.sin(t)*e)}function Q(t,e,n){return new K(t,e,n)}function K(t,e,n){this.l=t,this.a=e,this.b=n}function J(t,e,n){var i=(t+16)/116,r=i+e/500,o=i-n/200;return r=ee(r)*Fa,i=ee(i)*Wa,o=ee(o)*qa,se(ie(3.2404542*r-1.5371385*i-.4985314*o),ie(-.969266*r+1.8760108*i+.041556*o),ie(.0556434*r-.2040259*i+1.0572252*o))}function te(t,e,n){return t>0?U(Math.atan2(n,e)*Pa,Math.sqrt(e*e+n*n),t):U(0/0,0/0,t)}function ee(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function re(t){return se(t>>16,255&t>>8,255&t)}function oe(t){return re(t)+""}function se(t,e,n){return new ae(t,e,n)}function ae(t,e,n){this.r=t,this.g=e,this.b=n}function le(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,n){var i,r,o,s=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(t))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(pe(r[0]),pe(r[1]),pe(r[2]))}return(o=Ga.get(t))?e(o.r,o.g,o.b):(null!=t&&"#"===t.charAt(0)&&(4===t.length?(s=t.charAt(1),s+=s,a=t.charAt(2),a+=a,l=t.charAt(3),l+=l):7===t.length&&(s=t.substring(1,3),a=t.substring(3,5),l=t.substring(5,7)),s=parseInt(s,16),a=parseInt(a,16),l=parseInt(l,16)),e(s,a,l))}function ce(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),a=s-o,l=(s+o)/2;return a?(r=.5>l?a/(s+o):a/(2-s-o),i=t==s?(e-n)/a+(n>e?6:0):e==s?(n-t)/a+2:(t-e)/a+4,i*=60):(i=0/0,r=l>0&&1>l?0:i),X(i,r,l)}function he(t,e,n){t=fe(t),e=fe(e),n=fe(n);var i=ne((.4124564*t+.3575761*e+.1804375*n)/Fa),r=ne((.2126729*t+.7151522*e+.072175*n)/Wa),o=ne((.0193339*t+.119192*e+.9503041*n)/qa);return Q(116*r-16,500*(i-r),200*(r-o))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function de(t){return"function"==typeof t?t:function(){return t}}function ge(t){return t}function me(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),ve(e,n,t,i)}}function ve(t,e,n,i){function r(){var t,e=l.status;if(!e&&l.responseText||e>=200&&300>e||304===e){try{t=n.call(o,l)}catch(i){return s.error.call(o,i),void 0}s.load.call(o,t)}else s.error.call(o,l)}var o={},s=Us.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;return!Js.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var e=Us.event;Us.event=t;try{s.progress.call(o,l)}finally{Us.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==e?delete a[t]:a[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(Zs(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,t,!0),null==e||"accept"in a||(a.accept=e+",*/*"),l.setRequestHeader)for(var c in a)l.setRequestHeader(c,a[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),s.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},Us.rebind(o,s,"on"),null==i?o:o.get(ye(i))}function ye(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function xe(){var t=be(),e=we()-t;e>24?(isFinite(e)&&(clearTimeout(Qa),Qa=setTimeout(xe,e)),Za=0):(Za=1,Ja(xe))}function be(){var t=Date.now();for(Ka=Ua;Ka;)t>=Ka.t&&(Ka.f=Ka.c(t-Ka.t)),Ka=Ka.n;return t}function we(){for(var t,e=Ua,n=1/0;e;)e.f?e=t?t.n=e.n:Ua=e.n:(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Me(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Se(t){return t+""}function Ce(){}function Te(t,e,n){var i=n.s=t+e,r=i-t,o=i-r;n.t=t-o+(e-r)}function Ae(t,e){t&&hl.hasOwnProperty(t.type)&&hl[t.type](t,e)}function _e(t,e,n){var i,r=-1,o=t.length-n;for(e.lineStart();++ra;++a)r.point((n=t[a])[0],n[1]);return r.lineEnd(),void 0}var l=new Ge(n,t,null,!0),u=new Ge(n,null,l,!1);l.o=u,o.push(l),s.push(u),l=new Ge(i,t,null,!1),u=new Ge(i,null,l,!0),l.o=u,o.push(l),s.push(u)}}),s.sort(e),Ye(o),Ye(s),o.length){for(var a=0,l=n,u=s.length;u>a;++a)s[a].e=l=!l;for(var c,h,f=o[0];;){for(var p=f,d=!0;p.v;)if((p=p.n)===f)return;c=p.z,r.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var a=0,u=c.length;u>a;++a)r.point((h=c[a])[0],h[1]);else i(p.x,p.n.x,1,r);p=p.n}else{if(d){c=p.p.z;for(var a=c.length-1;a>=0;--a)r.point((h=c[a])[0],h[1])}else i(p.x,p.p.x,-1,r);p=p.p}p=p.o,c=p.z,d=!d}while(!p.v);r.lineEnd()}}}function Ye(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i1&&2&e&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Ve))}}var p,d,g,m=e(o),v=r.invert(i[0],i[1]),y={point:s,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,p=[],d=[],o.polygonStart()},polygonEnd:function(){y.point=s,y.lineStart=l,y.lineEnd=u,p=Us.merge(p);var t=Ke(v,d);p.length?Xe(p,Qe,t,n,o):t&&(o.lineStart(),n(null,null,1,o),o.lineEnd()),o.polygonEnd(),p=d=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ze(),b=e(x);return y}}function Ve(t){return t.length>1}function Ze(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:l,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qe(t,e){return((t=t.x)[0]<0?t[1]-_a-La:_a-t[1])-((e=e.x)[0]<0?e[1]-_a-La:_a-e[1])}function Ke(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],o=0,s=0;pl.reset();for(var a=0,l=e.length;l>a;++a){var u=e[a],c=u.length;if(c)for(var h=u[0],f=h[0],p=h[1]/2+Ta/4,d=Math.sin(p),g=Math.cos(p),m=1;;){m===c&&(m=0),t=u[m];var v=t[0],y=t[1]/2+Ta/4,x=Math.sin(y),b=Math.cos(y),w=v-f,k=la(w)>Ta,M=d*x;if(pl.add(Math.atan2(M*Math.sin(w),g*b+M*Math.cos(w))),o+=k?w+(w>=0?Aa:-Aa):w,k^f>=n^v>=n){var S=De(Ne(h),Ne(t));ze(S);var C=De(r,S);ze(C);var T=(k^w>=0?-1:1)*I(C[2]);(i>T||i===T&&(S[0]||S[1]))&&(s+=k^w>=0?1:-1)}if(!m++)break;f=v,d=x,g=b,h=t}}return(-La>o||La>o&&0>pl)^1&s}function Je(t){var e,n=0/0,i=0/0,r=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Ta:-Ta,l=la(o-n);la(l-Ta)0?_a:-_a),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&l>=Ta&&(la(n-r)La?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*s)):(e+i)/2}function en(t,e,n,i){var r;if(null==t)r=n*_a,i.point(-Ta,r),i.point(0,r),i.point(Ta,r),i.point(Ta,0),i.point(Ta,-r),i.point(0,-r),i.point(-Ta,-r),i.point(-Ta,0),i.point(-Ta,r);else if(la(t[0]-e[0])>La){var o=t[0]o}function n(t){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var p,d=[h,f],g=e(h,f),m=s?g?0:r(h,f):g?r(h+(0>h?Ta:-Ta),f):0;if(!n&&(u=l=g)&&t.lineStart(),g!==l&&(p=i(n,d),(je(n,p)||je(d,p))&&(d[0]+=La,d[1]+=La,g=e(d[0],d[1]))),g!==l)c=0,g?(t.lineStart(),p=i(d,n),t.point(p[0],p[1])):(p=i(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(a&&n&&s^g){var v;m&o||!(v=i(d,n,!0))||(c=0,s?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&je(n,d)||t.point(d[0],d[1]),n=d,l=g,o=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(t,e,n){var i=Ne(t),r=Ne(e),s=[1,0,0],a=De(i,r),l=Pe(a,a),u=a[0],c=l-u*u;if(!c)return!n&&t;var h=o*l/c,f=-o*u/c,p=De(s,a),d=Oe(s,h),g=Oe(a,f);Re(d,g);var m=p,v=Pe(d,m),y=Pe(m,m),x=v*v-y*(Pe(d,d)-1);if(!(0>x)){var b=Math.sqrt(x),w=Oe(m,(-v-b)/y);if(Re(w,d),w=He(w),!n)return w;var k,M=t[0],S=e[0],C=t[1],T=e[1];M>S&&(k=M,M=S,S=k);var A=S-M,_=la(A-Ta)A;if(!_&&C>T&&(k=C,C=T,T=k),L?_?C+T>0^w[1]<(la(w[0]-M)Ta^(M<=w[0]&&w[0]<=S)){var E=Oe(m,(-v+b)/y);return Re(E,d),[w,He(E)]}}}function r(e,n){var i=s?t:Ta-t,r=0;return-i>e?r|=1:e>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(t),s=o>0,a=la(o)>La,l=Nn(t,6*Na);return Ue(e,n,l,s?[0,-t]:[-Ta,t-Ta])}function rn(t,e,n,i){return function(r){var o,s=r.a,a=r.b,l=s.x,u=s.y,c=a.x,h=a.y,f=0,p=1,d=c-l,g=h-u;if(o=t-l,d||!(o>0)){if(o/=d,0>d){if(f>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>f&&(f=o)}if(o=n-l,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>f&&(f=o)}else if(d>0){if(f>o)return;p>o&&(p=o)}if(o=e-u,g||!(o>0)){if(o/=g,0>g){if(f>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>f&&(f=o)}if(o=i-u,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>f&&(f=o)}else if(g>0){if(f>o)return;p>o&&(p=o)}return f>0&&(r.a={x:l+f*d,y:u+f*g}),1>p&&(r.b={x:l+p*d,y:u+p*g}),r}}}}}}function on(t,e,n,i){function r(i,r){return la(i[0]-t)0?0:3:la(i[0]-n)0?2:1:la(i[1]-e)0?1:0:r>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var n=r(t,1),i=r(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){function l(t){for(var e=0,n=v.length,i=t[1],r=0;n>r;++r)for(var o,s=1,a=v[r],l=a.length,c=a[0];l>s;++s)o=a[s],c[1]<=i?o[1]>i&&u(c,o,t)>0&&++e:o[1]<=i&&u(c,o,t)<0&&--e,c=o;return 0!==e}function u(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}function c(o,a,l,u){var c=0,h=0;if(null==o||(c=r(o,l))!==(h=r(a,l))||s(o,a)<0^l>0){do u.point(0===c||3===c?t:n,c>1?i:e);while((c=(c+l+4)%4)!==h)}else u.point(a[0],a[1])}function h(r,o){return r>=t&&n>=r&&o>=e&&i>=o}function f(t,e){h(t,e)&&a.point(t,e)}function p(){E.point=g,v&&v.push(y=[]),C=!0,S=!1,k=M=0/0}function d(){m&&(g(x,b),w&&S&&_.rejoin(),m.push(_.buffer())),E.point=f,S&&a.lineEnd()}function g(t,e){t=Math.max(-_l,Math.min(_l,t)),e=Math.max(-_l,Math.min(_l,e));var n=h(t,e);if(v&&y.push([t,e]),C)x=t,b=e,w=n,C=!1,n&&(a.lineStart(),a.point(t,e));else if(n&&S)a.point(t,e);else{var i={a:{x:k,y:M},b:{x:t,y:e}};L(i)?(S||(a.lineStart(),a.point(i.a.x,i.a.y)),a.point(i.b.x,i.b.y),n||a.lineEnd(),T=!1):n&&(a.lineStart(),a.point(t,e),T=!1)}k=t,M=e,S=n}var m,v,y,x,b,w,k,M,S,C,T,A=a,_=Ze(),L=rn(t,e,n,i),E={point:f,lineStart:p,lineEnd:d,polygonStart:function(){a=_,m=[],v=[],T=!0},polygonEnd:function(){a=A,m=Us.merge(m);var e=l([t,i]),n=T&&e,r=m.length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),r&&Xe(m,o,e,c,a),a.polygonEnd()),m=v=y=null}};return E}}function sn(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),n}function an(t){var e=0,n=Ta/3,i=Mn(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Ta/180,n=t[1]*Ta/180):[180*(e/Ta),180*(n/Ta)]},r}function ln(t,e){function n(t,e){var n=Math.sqrt(o-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),s-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,o=1+i*(2*r-i),s=Math.sqrt(o)/r;return n.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,I((o-(t*t+n*n)*r*r)/(2*r))]},n}function un(){function t(t,e){El+=r*t-i*e,i=t,r=e}var e,n,i,r;Ol.point=function(o,s){Ol.point=t,e=i=o,n=r=s},Ol.lineEnd=function(){t(e,n)}}function cn(t,e){Nl>t&&(Nl=t),t>Dl&&(Dl=t),Pl>e&&(Pl=e),e>Rl&&(Rl=e)}function hn(){function t(t,e){s.push("M",t,",",e,o)}function e(t,e){s.push("M",t,",",e),a.point=n}function n(t,e){s.push("L",t,",",e)}function i(){a.point=t}function r(){s.push("Z")}var o=fn(4.5),s=[],a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=r},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(t){return o=fn(t),a},result:function(){if(s.length){var t=s.join("");return s=[],t}}};return a}function fn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function pn(t,e){vl+=t,yl+=e,++xl}function dn(){function t(t,i){var r=t-e,o=i-n,s=Math.sqrt(r*r+o*o);bl+=s*(e+t)/2,wl+=s*(n+i)/2,kl+=s,pn(e=t,n=i)}var e,n;Hl.point=function(i,r){Hl.point=t,pn(e=i,n=r)}}function gn(){Hl.point=pn}function mn(){function t(t,e){var n=t-i,o=e-r,s=Math.sqrt(n*n+o*o);bl+=s*(i+t)/2,wl+=s*(r+e)/2,kl+=s,s=r*t-i*e,Ml+=s*(i+t),Sl+=s*(r+e),Cl+=3*s,pn(i=t,r=e)}var e,n,i,r;Hl.point=function(o,s){Hl.point=t,pn(e=i=o,n=r=s)},Hl.lineEnd=function(){t(e,n)}}function vn(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,s,0,Aa)}function n(e,n){t.moveTo(e,n),a.point=i}function i(e,n){t.lineTo(e,n)}function r(){a.point=e}function o(){t.closePath()}var s=4.5,a={point:e,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=r,a.point=e},pointRadius:function(t){return s=t,a},result:l};return a}function yn(t){function e(t){return(a?i:n)(t)}function n(e){return wn(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})}function i(e){function n(n,i){n=t(n,i),e.point(n[0],n[1])}function i(){x=0/0,S.point=o,e.lineStart()}function o(n,i){var o=Ne([n,i]),s=t(n,i);r(x,b,y,w,k,M,x=s[0],b=s[1],y=n,w=o[0],k=o[1],M=o[2],a,e),e.point(x,b)}function s(){S.point=n,e.lineEnd()}function l(){i(),S.point=u,S.lineEnd=c}function u(t,e){o(h=t,f=e),p=x,d=b,g=w,m=k,v=M,S.point=o}function c(){r(x,b,y,w,k,M,p,d,h,g,m,v,a,e),S.lineEnd=s,s()}var h,f,p,d,g,m,v,y,x,b,w,k,M,S={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),S.lineStart=l},polygonEnd:function(){e.polygonEnd(),S.lineStart=i}};return S}function r(e,n,i,a,l,u,c,h,f,p,d,g,m,v){var y=c-e,x=h-n,b=y*y+x*x;if(b>4*o&&m--){var w=a+p,k=l+d,M=u+g,S=Math.sqrt(w*w+k*k+M*M),C=Math.asin(M/=S),T=la(la(M)-1)o||la((y*E+x*N)/b-.5)>.3||s>a*p+l*d+u*g)&&(r(e,n,i,a,l,u,_,L,T,w/=S,k/=S,M,m,v),v.point(_,L),r(_,L,T,w,k,M,c,h,f,p,d,g,m,v))}}var o=.5,s=Math.cos(30*Na),a=16;return e.precision=function(t){return arguments.length?(a=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function xn(t){var e=yn(function(e,n){return t([e*Pa,n*Pa])});return function(t){return Sn(e(t))}}function bn(t){this.stream=t}function wn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function kn(t){return Mn(function(){return t})()}function Mn(t){function e(t){return t=a(t[0]*Na,t[1]*Na),[t[0]*f+l,u-t[1]*f]}function n(t){return t=a.invert((t[0]-l)/f,(u-t[1])/f),t&&[t[0]*Pa,t[1]*Pa]}function i(){a=sn(s=An(v,y,x),o);var t=o(g,m);return l=p-t[0]*f,u=d+t[1]*f,r()}function r(){return c&&(c.valid=!1,c=null),e}var o,s,a,l,u,c,h=yn(function(t,e){return t=o(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,p=480,d=250,g=0,m=0,v=0,y=0,x=0,b=Al,w=ge,k=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=Sn(b(s,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(b=null==t?(k=t,Al):nn((k=+t)*Na),r()):k},e.clipExtent=function(t){return arguments.length?(M=t,w=t?on(t[0][0],t[0][1],t[1][0],t[1][1]):ge,r()):M},e.scale=function(t){return arguments.length?(f=+t,i()):f},e.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],i()):[p,d]},e.center=function(t){return arguments.length?(g=t[0]%360*Na,m=t[1]%360*Na,i()):[g*Pa,m*Pa]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Na,y=t[1]%360*Na,x=t.length>2?t[2]%360*Na:0,i()):[v*Pa,y*Pa,x*Pa]},Us.rebind(e,h,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,i()}}function Sn(t){return wn(t,function(e,n){t.point(e*Na,n*Na)})}function Cn(t,e){return[t,e]}function Tn(t,e){return[t>Ta?t-Aa:-Ta>t?t+Aa:t,e]}function An(t,e,n){return t?e||n?sn(Ln(t),En(e,n)):Ln(t):e||n?En(e,n):Tn}function _n(t){return function(e,n){return e+=t,[e>Ta?e-Aa:-Ta>e?e+Aa:e,n]}}function Ln(t){var e=_n(t);return e.invert=_n(-t),e}function En(t,e){function n(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*i+a*r;return[Math.atan2(l*o-c*s,a*i-u*r),I(c*o+l*s)]}var i=Math.cos(t),r=Math.sin(t),o=Math.cos(e),s=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*o-l*s;return[Math.atan2(l*o+u*s,a*i+c*r),I(c*i-a*r)]},n}function Nn(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,o,s,a){var l=s*e;null!=r?(r=Pn(n,r),o=Pn(n,o),(s>0?o>r:r>o)&&(r+=s*Aa)):(r=t+s*Aa,o=t-.5*l);for(var u,c=r;s>0?c>o:o>c;c-=l)a.point((u=He([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function Pn(t,e){var n=Ne(e);n[0]-=t,ze(n);var i=j(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-La)%(2*Math.PI)}function Dn(t,e,n){var i=Us.range(t,e-La,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function Rn(t,e,n){var i=Us.range(t,e-La,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function On(t){return t.source}function zn(t){return t.target}function Hn(t,e,n,i){var r=Math.cos(e),o=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=r*Math.cos(t),u=r*Math.sin(t),c=s*Math.cos(n),h=s*Math.sin(n),f=2*Math.asin(Math.sqrt(W(i-e)+r*s*W(n-t))),p=1/Math.sin(f),d=f?function(t){var e=Math.sin(t*=f)*p,n=Math.sin(f-t)*p,i=n*l+e*c,r=n*u+e*h,s=n*o+e*a;return[Math.atan2(r,i)*Pa,Math.atan2(s,Math.sqrt(i*i+r*r))*Pa]}:function(){return[t*Pa,e*Pa]};return d.distance=f,d}function jn(){function t(t,r){var o=Math.sin(r*=Na),s=Math.cos(r),a=la((t*=Na)-e),l=Math.cos(a);jl+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=i*o-n*s*l)*a),n*o+i*s*l),e=t,n=o,i=s}var e,n,i;Il.point=function(r,o){e=r*Na,n=Math.sin(o*=Na),i=Math.cos(o),Il.point=t},Il.lineEnd=function(){Il.point=Il.lineEnd=l}}function In(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),o=t(i*r);return[o*r*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),o=Math.sin(r),s=Math.cos(r);return[Math.atan2(t*o,i*s),Math.asin(i&&n*o/i)]},n}function $n(t,e){function n(t,e){var n=la(la(e)-_a)0}function Un(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Vn(t,e,n,i){var r=t[0],o=n[0],s=e[0]-r,a=i[0]-o,l=t[1],u=n[1],c=e[1]-l,h=i[1]-u,f=(a*(l-u)-h*(r-o))/(h*s-a*c);return[r+f*s,l+f*c]}function Zn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Qn(){yi(this),this.edge=this.site=this.circle=null}function Kn(t){var e=Ql.pop()||new Qn;return e.site=t,e}function Jn(t){ui(t),Ul.remove(t),Ql.push(t),yi(t)}function ti(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},o=t.P,s=t.N,a=[t];Jn(t);for(var l=o;l.circle&&la(n-l.circle.x)c;++c)u=a[c],l=a[c-1],gi(u.edge,l.site,u.site,r);l=a[0],u=a[h-1],u.edge=pi(l.site,u.site,null,r),li(l),li(u)}function ei(t){for(var e,n,i,r,o=t.x,s=t.y,a=Ul._;a;)if(i=ni(a,s)-o,i>La)a=a.L;else{if(r=o-ii(a,s),!(r>La)){i>-La?(e=a.P,n=a):r>-La?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=Kn(t);if(Ul.insert(e,l),e||n){if(e===n)return ui(e),n=Kn(e.site),Ul.insert(l,n),l.edge=n.edge=pi(e.site,l.site),li(e),li(n),void 0;if(!n)return l.edge=pi(e.site,l.site),void 0;ui(e),ui(n);var u=e.site,c=u.x,h=u.y,f=t.x-c,p=t.y-h,d=n.site,g=d.x-c,m=d.y-h,v=2*(f*m-p*g),y=f*f+p*p,x=g*g+m*m,b={x:(m*y-p*x)/v+c,y:(f*x-g*y)/v+h};gi(n.edge,u,d,b),l.edge=pi(u,t,null,b),n.edge=pi(t,d,null,b),li(e),li(n)}}function ni(t,e){var n=t.site,i=n.x,r=n.y,o=r-e;if(!o)return i;var s=t.P;if(!s)return-1/0;n=s.site;var a=n.x,l=n.y,u=l-e;if(!u)return a;var c=a-i,h=1/o-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+r-o/2)))/h+i:(i+a)/2}function ii(t,e){var n=t.N;if(n)return ni(n,e);var i=t.site;return i.y===e?i.x:1/0}function ri(t){this.site=t,this.edges=[]}function oi(t){for(var e,n,i,r,o,s,a,l,u,c,h=t[0][0],f=t[1][0],p=t[0][1],d=t[1][1],g=Gl,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(a=o.edges,l=a.length,s=0;l>s;)c=a[s].end(),i=c.x,r=c.y,u=a[++s%l].start(),e=u.x,n=u.y,(la(i-e)>La||la(r-n)>La)&&(a.splice(s,0,new mi(di(o.site,c,la(i-h)La?{x:h,y:la(e-h)La?{x:la(n-d)La?{x:f,y:la(e-f)La?{x:la(n-p)=-Ea)){var p=l*l+u*u,d=c*c+h*h,g=(h*p-u*d)/f,m=(l*d-c*p)/f,h=m+a,v=Kl.pop()||new ai;v.arc=t,v.site=r,v.x=g+s,v.y=h+Math.sqrt(g*g+m*m),v.cy=h,t.circle=v;for(var y=null,x=Zl._;x;)if(v.ym||m>=a)return;if(f>d){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.yi||i>1)if(f>d){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.yp){if(o){if(o.x>=a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}else{if(o){if(o.xi;++i)if(s=c[i],s.x==n[0]){if(s.i)if(null==u[s.i+1])for(u[s.i-1]+=s.x,u.splice(s.i,1),r=i+1;o>r;++r)c[r].i--;else for(u[s.i-1]+=s.x+u[s.i+1],u.splice(s.i,2),r=i+1;o>r;++r)c[r].i-=2;else if(null==u[s.i+1])u[s.i]=s.x;else for(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1),r=i+1;o>r;++r)c[r].i--;c.splice(i,1),o--,i--}else s.x=Ni(parseFloat(n[0]),parseFloat(s.x));for(;o>i;)s=c.pop(),null==u[s.i+1]?u[s.i]=s.x:(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1)),o--;return 1===u.length?null==u[0]?(s=c[0].x,function(t){return s(t)+""}):function(){return e}:function(t){for(i=0;o>i;++i)u[(s=c[i]).i]=s.x(t);return u.join("")}}function Di(t,e){for(var n,i=Us.interpolators.length;--i>=0&&!(n=Us.interpolators[i](t,e)););return n}function Ri(t,e){var n,i=[],r=[],o=t.length,s=e.length,a=Math.min(t.length,e.length);for(n=0;a>n;++n)i.push(Di(t[n],e[n]));for(;o>n;++n)r[n]=t[n];for(;s>n;++n)r[n]=e[n];return function(t){for(n=0;a>n;++n)r[n]=i[n](t);return r}}function Oi(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function zi(t){return function(e){return 1-t(1-e)}}function Hi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function ji(t){return t*t}function Ii(t){return t*t*t}function $i(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Bi(t){return function(e){return Math.pow(e,t)}}function Fi(t){return 1-Math.cos(t*_a)}function Wi(t){return Math.pow(2,10*(t-1))}function qi(t){return 1-Math.sqrt(1-t*t)}function Xi(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Aa*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*Aa/e)}}function Yi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Gi(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Ui(t,e){t=Us.hcl(t),e=Us.hcl(e);var n=t.h,i=t.c,r=t.l,o=e.h-n,s=e.c-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return Z(n+o*t,i+s*t,r+a*t)+""}}function Vi(t,e){t=Us.hsl(t),e=Us.hsl(e);var n=t.h,i=t.s,r=t.l,o=e.h-n,s=e.s-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return G(n+o*t,i+s*t,r+a*t)+""}}function Zi(t,e){t=Us.lab(t),e=Us.lab(e);var n=t.l,i=t.a,r=t.b,o=e.l-n,s=e.a-i,a=e.b-r;return function(t){return J(n+o*t,i+s*t,r+a*t)+""}}function Qi(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Ki(t){var e=[t.a,t.b],n=[t.c,t.d],i=tr(e),r=Ji(e,n),o=tr(er(n,e,-r))||0;e[0]*n[1]180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:Ni(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),h!=f?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:Ni(h,f)}):f&&i.push(i.pop()+"skewX("+f+")"),p[0]!=d[0]||p[1]!=d[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:Ni(p[0],d[0])},{i:n-2,x:Ni(p[1],d[1])})):(1!=d[0]||1!=d[1])&&i.push(i.pop()+"scale("+d+")"),n=r.length,function(t){for(var e,o=-1;++on;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function Sr(t){return t.reduce(Cr,0)}function Cr(t,e){return t+e[1]}function Tr(t,e){return Ar(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ar(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function _r(t){return[Us.min(t),Us.max(t)]}function Lr(t,e){return t.parent==e.parent?1:2}function Er(t){var e=t.children;return e&&e.length?e[0]:t._tree.thread}function Nr(t){var e,n=t.children;return n&&(e=n.length)?n[e-1]:t._tree.thread}function Pr(t,e){var n=t.children;if(n&&(r=n.length))for(var i,r,o=-1;++o0&&(t=i);return t}function Dr(t,e){return t.x-e.x}function Rr(t,e){return e.x-t.x}function Or(t,e){return t.depth-e.depth}function zr(t,e){function n(t,i){var r=t.children;if(r&&(s=r.length))for(var o,s,a=null,l=-1;++l=0;)e=r[o]._tree,e.prelim+=n,e.mod+=n,n+=e.shift+(i+=e.change)}function jr(t,e,n){t=t._tree,e=e._tree;var i=n/(e.number-t.number);t.change+=i,e.change-=i,e.shift+=n,e.prelim+=n,e.mod+=n}function Ir(t,e,n){return t._tree.ancestor.parent==e.parent?t._tree.ancestor:n}function $r(t,e){return t.value-e.value}function Br(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Fr(t,e){t._pack_next=e,e._pack_prev=t}function Wr(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return.999*r*r>n*n+i*i}function qr(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),p=Math.max(t.y+t.r,p)}if((n=t.children)&&(u=n.length)){var n,i,r,o,s,a,l,u,c=1/0,h=-1/0,f=1/0,p=-1/0;if(n.forEach(Xr),i=n[0],i.x=-i.r,i.y=0,e(i),u>1&&(r=n[1],r.x=r.r,r.y=0,e(r),u>2))for(o=n[2],Ur(i,r,o),e(o),Br(i,o),i._pack_prev=o,Br(o,r),r=i._pack_next,s=3;u>s;s++){Ur(i,r,o=n[s]);var d=0,g=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,g++)if(Wr(a,o)){d=1;break}if(1==d)for(l=i._pack_prev;l!==a._pack_prev&&!Wr(l,o);l=l._pack_prev,m++);d?(m>g||g==m&&r.rs;s++)o=n[s],o.x-=v,o.y-=y,x=Math.max(x,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=x,n.forEach(Yr)}}function Xr(t){t._pack_next=t._pack_prev=t}function Yr(t){delete t._pack_next,delete t._pack_prev}function Gr(t,e,n,i){var r=t.children;if(t.x=e+=i*t.x,t.y=n+=i*t.y,t.r*=i,r)for(var o=-1,s=r.length;++or&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function eo(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function no(t){return t.rangeExtent?t.rangeExtent():eo(t.range())}function io(t,e,n,i){var r=n(t[0],t[1]),o=i(e[0],e[1]);return function(t){return o(r(t))}}function ro(t,e){var n,i=0,r=t.length-1,o=t[i],s=t[r];return o>s&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}function oo(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:cu}function so(t,e,n,i){var r=[],o=[],s=0,a=Math.min(t.length,e.length)-1;for(t[a]2?so:io,l=i?rr:ir;return s=r(t,e,l,n),a=r(e,t,l,Di),o}function o(t){return s(t)}var s,a;return o.invert=function(t){return a(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.rangeRound=function(t){return o.range(t).interpolate(Qi)},o.clamp=function(t){return arguments.length?(i=t,r()):i},o.interpolate=function(t){return arguments.length?(n=t,r()):n},o.ticks=function(e){return ho(t,e)},o.tickFormat=function(e,n){return fo(t,e,n)},o.nice=function(e){return uo(t,e),r()},o.copy=function(){return ao(t,e,n,i)},r()}function lo(t,e){return Us.rebind(t,e,"range","rangeRound","interpolate","clamp")}function uo(t,e){return ro(t,oo(co(t,e)[2]))}function co(t,e){null==e&&(e=10);var n=eo(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),o=e/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function ho(t,e){return Us.range.apply(Us,co(t,e))}function fo(t,e,n){var i=co(t,e);return Us.format(n?n.replace(ol,function(t,e,n,r,o,s,a,l,u,c){return[e,n,r,o,s,a,l,u||"."+go(c,i),c].join("")}):",."+po(i[2])+"f")}function po(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function go(t,e){var n=po(e[2]);return t in hu?Math.abs(n-po(Math.max(Math.abs(e[0]),Math.abs(e[1]))))+ +("e"!==t):n-2*("%"===t)}function mo(t,e,n,i){function r(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),s):i},s.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),s):e},s.nice=function(){var e=ro(i.map(r),n?Math:pu);return t.domain(e),i=e.map(o),s},s.ticks=function(){var t=eo(i),s=[],a=t[0],l=t[1],u=Math.floor(r(a)),c=Math.ceil(r(l)),h=e%1?2:e;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var f=1;h>f;f++)s.push(o(u)*f);s.push(o(u))}else for(s.push(o(u));u++0;f--)s.push(o(u)*f);for(u=0;s[u]l;c--);s=s.slice(u,c)}return s},s.tickFormat=function(t,e){if(!arguments.length)return fu;arguments.length<2?e=fu:"function"!=typeof e&&(e=Us.format(e));var i,a=Math.max(.1,t/s.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(t){return t/o(l(r(t)+i))<=a?e(t):""}},s.copy=function(){return mo(t.copy(),e,n,i)},lo(s,t)}function vo(t,e,n){function i(e){return t(r(e))}var r=yo(e),o=yo(1/e);return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),i):n},i.ticks=function(t){return ho(n,t)},i.tickFormat=function(t,e){return fo(n,t,e)},i.nice=function(t){return i.domain(uo(n,t))},i.exponent=function(s){return arguments.length?(r=yo(e=s),o=yo(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return vo(t.copy(),e,n)},lo(i,t)}function yo(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function xo(t,e){function n(n){return s[((o.get(n)||"range"===e.t&&o.set(n,t.push(n)))-1)%s.length]}function i(e,n){return Us.range(t.length).map(function(t){return e+n*t})}var o,s,a;return n.domain=function(i){if(!arguments.length)return t;t=[],o=new r;for(var s,a=-1,l=i.length;++an?[0/0,0/0]:[n>0?r[n-1]:t[0],ne?0/0:e/o+t,[e,e+1/o]},i.copy=function(){return wo(t,e,n)},r()}function ko(t,e){function n(n){return n>=n?e[Us.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ko(t,e)},n}function Mo(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return ho(t,e)},e.tickFormat=function(e,n){return fo(t,e,n)},e.copy=function(){return Mo(t)},e}function So(t){return t.innerRadius}function Co(t){return t.outerRadius}function To(t){return t.startAngle}function Ao(t){return t.endAngle}function _o(t){function e(e){function s(){u.push("M",o(t(c),a))}for(var l,u=[],c=[],h=-1,f=e.length,p=de(n),d=de(i);++h1&&r.push("H",i[0]),r.join("")}function Po(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e1){a=e[1],o=t[l],l++,i+="C"+(r[0]+s[0])+","+(r[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var u=2;u9&&(r=3*e/Math.sqrt(r),s[a]=r*n,s[a+1]=r*i));for(a=-1;++a<=l;)r=(t[Math.min(l,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a])),o.push([r||0,s[a]*r||0]);return o}function Uo(t){return t.length<3?Lo(t):t[0]+Ho(t,Go(t))}function Vo(t){for(var e,n,i,r=-1,o=t.length;++rn?u():(o.active=n,s.event&&s.event.start.call(t,c,e),s.tween.forEach(function(n,i){(i=i.call(t,c,e))&&g.push(i)}),Us.timer(function(){return d.c=l(i||1)?qe:l,1},0,a),void 0)}function l(i){if(o.active!==n)return u();for(var r=i/p,a=h(r),l=g.length;l>0;)g[--l].call(t,a);return r>=1?(s.event&&s.event.end.call(t,c,e),u()):void 0}function u(){return--o.count?delete o[n]:delete t.__transition__,1}var c=t.__data__,h=s.ease,f=s.delay,p=s.duration,d=Ka,g=[];return d.t=f+a,i>=f?r(i-f):(d.c=r,void 0)},0,a)}}function as(t,e){t.attr("transform",function(t){return"translate("+e(t)+",0)"})}function ls(t,e){t.attr("transform",function(t){return"translate(0,"+e(t)+")"})}function us(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function cs(t,e,n){function i(e){var n=t(e),i=o(n,1);return i-e>e-n?n:i}function r(n){return e(n=t(new zu(n-1)),1),n}function o(t,n){return e(t=new zu(+t),n),t}function s(t,i,o){var s=r(t),a=[];if(o>1)for(;i>s;)n(s)%o||a.push(new Date(+s)),e(s,1);else for(;i>s;)a.push(new Date(+s)),e(s,1);return a}function a(t,e,n){try{zu=us;var i=new us;return i._=t,s(i,e,n)}finally{zu=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=o,t.range=s;var l=t.utc=hs(t);return l.floor=l,l.round=hs(i),l.ceil=hs(r),l.offset=hs(o),l.range=a,t}function hs(t){return function(e,n){try{zu=us;var i=new us;return i._=e,t(i,n)._}finally{zu=Date}}}function fs(t){function e(e){for(var i,r,o,s=[],a=-1,l=0;++aa;){if(i>=u)return-1;if(r=e.charCodeAt(a++),37===r){if(s=e.charAt(a++),o=ic[s in ec?e.charAt(a++):s],!o||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function ds(t){return new RegExp("^(?:"+t.map(Us.requote).join("|")+")","i")}function gs(t){for(var e=new r,n=-1,i=t.length;++nt?"-":"",r=(i?-t:t)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(e)+r:r)}function vs(t,e,n){Uu.lastIndex=0;var i=Uu.exec(e.substring(n));return i?(t.w=Vu.get(i[0].toLowerCase()),n+i[0].length):-1}function ys(t,e,n){Yu.lastIndex=0;var i=Yu.exec(e.substring(n));return i?(t.w=Gu.get(i[0].toLowerCase()),n+i[0].length):-1}function xs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function bs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n));return i?(t.U=+i[0],n+i[0].length):-1}function ws(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n));return i?(t.W=+i[0],n+i[0].length):-1}function ks(t,e,n){Ku.lastIndex=0;var i=Ku.exec(e.substring(n));return i?(t.m=Ju.get(i[0].toLowerCase()),n+i[0].length):-1}function Ms(t,e,n){Zu.lastIndex=0;var i=Zu.exec(e.substring(n));return i?(t.m=Qu.get(i[0].toLowerCase()),n+i[0].length):-1}function Ss(t,e,n){return ps(t,nc.c.toString(),e,n)}function Cs(t,e,n){return ps(t,nc.x.toString(),e,n)}function Ts(t,e,n){return ps(t,nc.X.toString(),e,n)}function As(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function _s(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.y=Es(+i[0]),n+i[0].length):-1}function Ls(t,e,n){return/^[+-]\d{4}$/.test(e=e.substring(n,n+5))?(t.Z=+e,n+5):-1}function Es(t){return t+(t>68?1900:2e3)}function Ns(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Ps(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ds(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function Rs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Os(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function zs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Hs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function js(t,e,n){var i=oc.get(e.substring(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}function Is(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=~~(la(e)/60),r=la(e)%60;return n+ms(i,"0",2)+ms(r,"0",2)}function $s(t,e,n){tc.lastIndex=0;var i=tc.exec(e.substring(n,n+1));return i?n+i[0].length:-1}function Bs(t){function e(t){try{zu=us;var e=new zu;return e._=t,n(e)}finally{zu=Date}}var n=fs(t);return e.parse=function(t){try{zu=us;var e=n.parse(t);return e&&e._}finally{zu=Date}},e.toString=n.toString,e}function Fs(t){return t.toISOString()}function Ws(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,o=Us.bisect(ac,r);return o==ac.length?[e.year,co(t.map(function(t){return t/31536e6}),n)[2]]:o?e[r/ac[o-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=qs(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=qs(+e+1);return e}}:t))},i.ticks=function(t,e){var n=eo(i.domain()),o=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],qs(+n[1]+1),1>e?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Ws(t.copy(),e,n)},lo(i,t)}function qs(t){return new Date(t)}function Xs(t){return function(e){for(var n=t.length-1,i=t[n];!i[1](e);)i=t[--n];return i[0](e)}}function Ys(t){return JSON.parse(t.responseText)}function Gs(t){var e=Qs.createRange();return e.selectNode(Qs.body),e.createContextualFragment(t.responseText)}var Us={version:"3.3.10"};Date.now||(Date.now=function(){return+new Date});var Vs=[].slice,Zs=function(t){return Vs.call(t)},Qs=document,Ks=Qs.documentElement,Js=window;try{Zs(Ks.childNodes)[0].nodeType}catch(ta){Zs=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qs.createElement("div").style.setProperty("opacity",0,"")}catch(ea){var na=Js.Element.prototype,ia=na.setAttribute,ra=na.setAttributeNS,oa=Js.CSSStyleDeclaration.prototype,sa=oa.setProperty;na.setAttribute=function(t,e){ia.call(this,t,e+"")},na.setAttributeNS=function(t,e,n){ra.call(this,t,e,n+"")},oa.setProperty=function(t,e,n){sa.call(this,t,e+"",n)}}Us.ascending=function(t,e){return e>t?-1:t>e?1:t>=e?0:0/0},Us.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Us.min=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r=n);)n=void 0;for(;++ri&&(n=i)}else{for(;++r=n);)n=void 0;for(;++ri&&(n=i)}return n},Us.max=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r=n);)n=void 0;for(;++rn&&(n=i)}else{for(;++r=n);)n=void 0;for(;++rn&&(n=i)}return n},Us.extent=function(t,e){var n,i,r,o=-1,s=t.length;if(1===arguments.length){for(;++o=n);)n=r=void 0;for(;++oi&&(n=i),i>r&&(r=i))}else{for(;++o=n);)n=void 0;for(;++oi&&(n=i),i>r&&(r=i))}return[n,r]},Us.sum=function(t,e){var n,i=0,r=t.length,o=-1;if(1===arguments.length)for(;++o1&&(e=e.map(n)),e=e.filter(t),e.length?Us.quantile(e.sort(Us.ascending),.5):void 0},Us.bisector=function(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t.call(e,e[o],o)i;){var o=i+r>>>1;ni?0:i);i>n;)o[n]=[e=r,r=t[++n]];return o},Us.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=Us.min(arguments,e),i=new Array(n);++t=0;)for(i=t[r],e=i.length;--e>=0;)n[--s]=i[e];return n};var la=Math.abs;Us.range=function(t,e,i){if(arguments.length<3&&(i=1,arguments.length<2&&(e=t,t=0)),1/0===(e-t)/i)throw new Error("infinite range");var r,o=[],s=n(la(i)),a=-1;if(t*=s,e*=s,i*=s,0>i)for(;(r=t+i*++a)>e;)o.push(r/s);else for(;(r=t+i*++a)=s.length)return i?i.call(o,a):n?a.sort(n):a;for(var u,c,h,f,p=-1,d=a.length,g=s[l++],m=new r;++p=s.length)return t;var i=[],r=a[n++];return t.forEach(function(t,r){i.push({key:t,values:e(r,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var n,i,o={},s=[],a=[];return o.map=function(e,n){return t(n,e,0)},o.entries=function(n){return e(t(Us.map,n,0),0)},o.key=function(t){return s.push(t),o},o.sortKeys=function(t){return a[s.length-1]=t,o},o.sortValues=function(t){return n=t,o},o.rollup=function(t){return i=t,o},o},Us.set=function(t){var e=new o;if(t)for(var n=0,i=t.length;i>n;++n)e.add(t[n]);return e},i(o,{has:function(t){return ua+t in this},add:function(t){return this[ua+t]=!0,t},remove:function(t){return t=ua+t,t in this&&delete this[t]},values:function(){var t=[];return this.forEach(function(e){t.push(e)}),t},forEach:function(t){for(var e in this)e.charCodeAt(0)===ca&&t.call(this,e.substring(1))}}),Us.behavior={},Us.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i=0&&(i=t.substring(n+1),t=t.substring(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},Us.event=null,Us.requote=function(t){return t.replace(fa,"\\$&")};var fa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,pa={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},da=function(t,e){return e.querySelector(t)},ga=function(t,e){return e.querySelectorAll(t)},ma=Ks[a(Ks,"matchesSelector")],va=function(t,e){return ma.call(t,e)};"function"==typeof Sizzle&&(da=function(t,e){return Sizzle(t,e)[0]||null},ga=function(t,e){return Sizzle.uniqueSort(Sizzle(t,e))},va=Sizzle.matchesSelector),Us.selection=function(){return wa};var ya=Us.selection.prototype=[];ya.select=function(t){var e,n,i,r,o=[];t=g(t);for(var s=-1,a=this.length;++s=0&&(n=t.substring(0,e),t=t.substring(e+1)),xa.hasOwnProperty(n)?{space:xa[n],local:t}:t}},ya.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Us.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(v(e,t[e]));return this}return this.each(v(t,e))},ya.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=t.trim().split(/^|\s+/g)).length,r=-1;if(e=n.classList){for(;++ri){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(k(n,t[n],e));return this}if(2>i)return Js.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(k(t,e,n))},ya.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(M(e,t[e]));return this}return this.each(M(t,e))},ya.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},ya.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},ya.append=function(t){return t=S(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},ya.insert=function(t,e){return t=S(t),e=g(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},ya.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},ya.data=function(t,e){function n(t,n){var i,o,s,a=t.length,h=n.length,f=Math.min(a,h),p=new Array(h),d=new Array(h),g=new Array(a);if(e){var m,v=new r,y=new r,x=[];for(i=-1;++ii;++i)d[i]=C(n[i]);for(;a>i;++i)g[i]=t[i]}d.update=p,d.parentNode=p.parentNode=g.parentNode=t.parentNode,l.push(d),u.push(p),c.push(g)}var i,o,s=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(i=this[0]).length);++so;o++){r.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return d(r)},ya.order=function(){for(var t=-1,e=this.length;++t=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},ya.sort=function(t){t=A.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},ya.size=function(){var t=0;return this.each(function(){++t}),t};var ba=[];Us.selection.enter=L,Us.selection.enter.prototype=ba,ba.append=ya.append,ba.empty=ya.empty,ba.node=ya.node,ba.call=ya.call,ba.size=ya.size,ba.select=function(t){for(var e,n,i,r,o,s=[],a=-1,l=this.length;++ai){if("string"!=typeof t){2>i&&(e=!1);for(n in t)this.each(P(n,t[n],e));return this}if(2>i)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(P(t,e,n))};var ka=Us.map({mouseenter:"mouseover",mouseleave:"mouseout"});ka.forEach(function(t){"on"+t in Qs&&ka.remove(t)});var Ma="onselectstart"in Qs?null:a(Ks.style,"userSelect"),Sa=0;Us.mouse=function(t){return z(t,f())};var Ca=/WebKit/.test(Js.navigator.userAgent)?-1:0;Us.touches=function(t,e){return arguments.length<2&&(e=f().touches),e?Zs(e).map(function(e){var n=z(t,e);return n.identifier=e.identifier,n}):[]},Us.behavior.drag=function(){function t(){this.on("mousedown.drag",s).on("touchstart.drag",a)}function e(){return Us.event.changedTouches[0].identifier}function n(t,e){return Us.touches(t).filter(function(t){return t.identifier===e})[0]}function i(t,e,n,i){return function(){function s(){var t=e(c,p),n=t[0]-g[0],i=t[1]-g[1];m|=n|i,g=t,h({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:i})}function a(){v.on(n+"."+d,null).on(i+"."+d,null),y(m&&Us.event.target===f),h({type:"dragend"})}var l,u=this,c=u.parentNode,h=r.of(u,arguments),f=Us.event.target,p=t(),d=null==p?"drag":"drag-"+p,g=e(c,p),m=0,v=Us.select(Js).on(n+"."+d,s).on(i+"."+d,a),y=O();o?(l=o.apply(u,arguments),l=[l.x-g[0],l.y-g[1]]):l=[0,0],h({type:"dragstart"})}}var r=p(t,"drag","dragstart","dragend"),o=null,s=i(l,Us.mouse,"mousemove","mouseup"),a=i(e,n,"touchmove","touchend");return t.origin=function(e){return arguments.length?(o=e,t):o},Us.rebind(t,r,"on")};var Ta=Math.PI,Aa=2*Ta,_a=Ta/2,La=1e-6,Ea=La*La,Na=Ta/180,Pa=180/Ta,Da=Math.SQRT2,Ra=2,Oa=4;Us.interpolateZoom=function(t,e){function n(t){var e=t*y;if(v){var n=B(g),s=o/(Ra*f)*(n*F(Da*e+g)-$(g));return[i+s*u,r+s*c,o*n/B(Da*e+g)]}return[i+t*u,r+t*c,o*Math.exp(Da*e)]}var i=t[0],r=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=s-i,c=a-r,h=u*u+c*c,f=Math.sqrt(h),p=(l*l-o*o+Oa*h)/(2*o*Ra*f),d=(l*l-o*o-Oa*h)/(2*l*Ra*f),g=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(d*d+1)-d),v=m-g,y=(v||Math.log(l/o))/Da;return n.duration=1e3*y,n},Us.behavior.zoom=function(){function t(t){t.on(A,u).on(ja+".zoom",f).on(_,d).on("dblclick.zoom",g).on(E,c)}function e(t){return[(t[0]-S.x)/S.k,(t[1]-S.y)/S.k]}function n(t){return[t[0]*S.k+S.x,t[1]*S.k+S.y]}function i(t){S.k=Math.max(T[0],Math.min(T[1],t))}function r(t,e){e=n(e),S.x+=t[0]-e[0],S.y+=t[1]-e[1]}function o(){w&&w.domain(b.range().map(function(t){return(t-S.x)/S.k}).map(b.invert)),M&&M.domain(k.range().map(function(t){return(t-S.y)/S.k}).map(k.invert))}function s(t){t({type:"zoomstart"})}function a(t){o(),t({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function l(t){t({type:"zoomend"})}function u(){function t(){c=1,r(Us.mouse(i),f),a(o)}function n(){h.on(_,Js===i?d:null).on(L,null),p(c&&Us.event.target===u),l(o)}var i=this,o=P.of(i,arguments),u=Us.event.target,c=0,h=Us.select(Js).on(_,t).on(L,n),f=e(Us.mouse(i)),p=O();N.call(i),s(o)}function c(){function t(){var t=Us.touches(d);return p=S.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function n(){for(var e=Us.event.changedTouches,n=0,o=e.length;o>n;++n)m[e[n].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-x){var u=s[0],c=m[u.identifier];i(2*S.k),r(u,c),h(),a(g)}x=l}else if(s.length>1){var u=s[0],f=s[1],p=u[0]-f[0],d=u[1]-f[1];v=p*p+d*d}}function o(){for(var t,e,n,o,s=Us.touches(d),l=0,u=s.length;u>l;++l,o=null)if(n=s[l],o=m[n.identifier]){if(e)break;t=n,e=o}if(o){var c=(c=n[0]-t[0])*c+(c=n[1]-t[1])*c,h=v&&Math.sqrt(c/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],i(h*p)}x=null,r(t,e),a(g)}function f(){if(Us.event.touches.length){for(var e=Us.event.changedTouches,n=0,i=e.length;i>n;++n)delete m[e[n].identifier];for(var r in m)return void t()}k.on(b,null).on(w,null),M.on(A,u).on(E,c),C(),l(g)}var p,d=this,g=P.of(d,arguments),m={},v=0,y=Us.event.changedTouches[0].identifier,b="touchmove.zoom-"+y,w="touchend.zoom-"+y,k=Us.select(Js).on(b,o).on(w,f),M=Us.select(d).on(A,null).on(E,n),C=O();N.call(d),n(),s(g)}function f(){var t=P.of(this,arguments);y?clearTimeout(y):(N.call(this),s(t)),y=setTimeout(function(){y=null,l(t)},50),h();var n=v||Us.mouse(this);m||(m=e(n)),i(Math.pow(2,.002*za())*S.k),r(n,m),a(t)}function d(){m=null}function g(){var t=P.of(this,arguments),n=Us.mouse(this),o=e(n),u=Math.log(S.k)/Math.LN2;s(t),i(Math.pow(2,Us.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),r(n,o),a(t),l(t)}var m,v,y,x,b,w,k,M,S={x:0,y:0,k:1},C=[960,500],T=Ha,A="mousedown.zoom",_="mousemove.zoom",L="mouseup.zoom",E="touchstart.zoom",P=p(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=P.of(this,arguments),e=S;Cu?Us.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=C[0],i=C[1],r=n/2,o=i/2,s=Us.interpolateZoom([(r-S.x)/S.k,(o-S.y)/S.k,n/S.k],[(r-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var i=s(e),l=n/i[2];this.__chart__=S={x:r-i[0]*l,y:o-i[1]*l,k:l},a(t)}}).each("end.zoom",function(){l(t)}):(this.__chart__=S,s(t),a(t),l(t))})},t.translate=function(e){return arguments.length?(S={x:+e[0],y:+e[1],k:S.k},o(),t):[S.x,S.y]},t.scale=function(e){return arguments.length?(S={x:S.x,y:S.y,k:+e},o(),t):S.k},t.scaleExtent=function(e){return arguments.length?(T=null==e?Ha:[+e[0],+e[1]],t):T},t.center=function(e){return arguments.length?(v=e&&[+e[0],+e[1]],t):v},t.size=function(e){return arguments.length?(C=e&&[+e[0],+e[1]],t):C},t.x=function(e){return arguments.length?(w=e,b=e.copy(),S={x:0,y:0,k:1},t):w},t.y=function(e){return arguments.length?(M=e,k=e.copy(),S={x:0,y:0,k:1},t):M},Us.rebind(t,P,"on")};var za,Ha=[0,1/0],ja="onwheel"in Qs?(za=function(){return-Us.event.deltaY*(Us.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qs?(za=function(){return Us.event.wheelDelta},"mousewheel"):(za=function(){return-Us.event.detail},"MozMousePixelScroll");q.prototype.toString=function(){return this.rgb()+""},Us.hsl=function(t,e,n){return 1===arguments.length?t instanceof Y?X(t.h,t.s,t.l):ue(""+t,ce,X):X(+t,+e,+n)};var Ia=Y.prototype=new q;Ia.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),X(this.h,this.s,this.l/t)},Ia.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),X(this.h,this.s,t*this.l)},Ia.rgb=function(){return G(this.h,this.s,this.l)},Us.hcl=function(t,e,n){return 1===arguments.length?t instanceof V?U(t.h,t.c,t.l):t instanceof K?te(t.l,t.a,t.b):te((t=he((t=Us.rgb(t)).r,t.g,t.b)).l,t.a,t.b):U(+t,+e,+n)};var $a=V.prototype=new q;$a.brighter=function(t){return U(this.h,this.c,Math.min(100,this.l+Ba*(arguments.length?t:1)))},$a.darker=function(t){return U(this.h,this.c,Math.max(0,this.l-Ba*(arguments.length?t:1)))},$a.rgb=function(){return Z(this.h,this.c,this.l).rgb()},Us.lab=function(t,e,n){return 1===arguments.length?t instanceof K?Q(t.l,t.a,t.b):t instanceof V?Z(t.l,t.c,t.h):he((t=Us.rgb(t)).r,t.g,t.b):Q(+t,+e,+n)};var Ba=18,Fa=.95047,Wa=1,qa=1.08883,Xa=K.prototype=new q;Xa.brighter=function(t){return Q(Math.min(100,this.l+Ba*(arguments.length?t:1)),this.a,this.b)},Xa.darker=function(t){return Q(Math.max(0,this.l-Ba*(arguments.length?t:1)),this.a,this.b)},Xa.rgb=function(){return J(this.l,this.a,this.b)},Us.rgb=function(t,e,n){return 1===arguments.length?t instanceof ae?se(t.r,t.g,t.b):ue(""+t,se,G):se(~~t,~~e,~~n)};var Ya=ae.prototype=new q;Ya.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,r=30;return e||n||i?(e&&r>e&&(e=r),n&&r>n&&(n=r),i&&r>i&&(i=r),se(Math.min(255,~~(e/t)),Math.min(255,~~(n/t)),Math.min(255,~~(i/t)))):se(r,r,r)},Ya.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),se(~~(t*this.r),~~(t*this.g),~~(t*this.b))},Ya.hsl=function(){return ce(this.r,this.g,this.b)},Ya.toString=function(){return"#"+le(this.r)+le(this.g)+le(this.b)};var Ga=Us.map({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,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});Ga.forEach(function(t,e){Ga.set(t,re(e))}),Us.functor=de,Us.xhr=me(ge),Us.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var s=Us.xhr(t,e,o);return s.row=function(t){return arguments.length?s.response(null==(n=t)?i:r(t)):n},s.row(n)}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function s(e){return e.map(a).join(t)}function a(t){return l.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var l=new RegExp('["'+t+"\n]"),u=t.charCodeAt(0);return n.parse=function(t,e){var i;return n.parseRows(t,function(t,n){if(i)return i(t,n-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=e?function(t,n){return e(r(t),n)}:r})},n.parseRows=function(t,e){function n(){if(c>=l)return s;if(r)return r=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++c;){var i=t.charCodeAt(c++),a=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(c)&&(++c,++a);else if(i!==u)continue;return t.substring(e,c-a)}return t.substring(e)}for(var i,r,o={},s={},a=[],l=t.length,c=0,h=0;(i=n())!==s;){for(var f=[];i!==o&&i!==s;)f.push(i),i=n();(!e||(f=e(f,h++)))&&a.push(f)}return a},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new o,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(a).join(t)].concat(e.map(function(e){return r.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(s).join("\n")},n},Us.csv=Us.dsv(",","text/csv"),Us.tsv=Us.dsv(" ","text/tab-separated-values");var Ua,Va,Za,Qa,Ka,Ja=Js[a(Js,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Us.timer=function(t,e,n){var i=arguments.length;2>i&&(e=0),3>i&&(n=Date.now());var r=n+e,o={c:t,t:r,f:!1,n:null};Va?Va.n=o:Ua=o,Va=o,Za||(Qa=clearTimeout(Qa),Za=1,Ja(xe))},Us.timer.flush=function(){be(),we()};var tl=".",el=",",nl=[3,3],il="$",rl=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"].map(ke);Us.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Us.round(t,Me(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((0>=n?n+1:n-1)/3)))),rl[8+n/3]},Us.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},Us.format=function(t){var e=ol.exec(t),n=e[1]||" ",i=e[2]||">",r=e[3]||"",o=e[4]||"",s=e[5],a=+e[6],l=e[7],u=e[8],c=e[9],h=1,f="",p=!1;switch(u&&(u=+u.substring(1)),(s||"0"===n&&"="===i)&&(s=n="0",i="=",l&&(a-=Math.floor((a-1)/4))),c){case"n":l=!0,c="g";break;case"%":h=100,f="%",c="f";break;case"p":h=100,f="%",c="r";break;case"b":case"o":case"x":case"X":"#"===o&&(o="0"+c.toLowerCase());case"c":case"d":p=!0,u=0;break;case"s":h=-1,c="r"}"#"===o?o="":"$"===o&&(o=il),"r"!=c||u||(c="g"),null!=u&&("g"==c?u=Math.max(1,Math.min(21,u)):("e"==c||"f"==c)&&(u=Math.max(0,Math.min(20,u)))),c=sl.get(c)||Se;var d=s&&l;return function(t){if(p&&t%1)return"";var e=0>t||0===t&&0>1/t?(t=-t,"-"):r;if(0>h){var g=Us.formatPrefix(t,u);t=g.scale(t),f=g.symbol}else t*=h;t=c(t,u);var m=t.lastIndexOf("."),v=0>m?t:t.substring(0,m),y=0>m?"":tl+t.substring(m+1);!s&&l&&(v=al(v));var x=o.length+v.length+y.length+(d?0:e.length),b=a>x?new Array(x=a-x+1).join(n):"";return d&&(v=al(b+v)),e+=o,t=v+y,("<"===i?e+t+b:">"===i?b+e+t:"^"===i?b.substring(0,x>>=1)+e+t+b.substring(x):e+(d?t:b+t))+f}};var ol=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sl=Us.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Us.round(t,Me(t,e))).toFixed(Math.max(0,Math.min(20,Me(t*(1+1e-15),e))))}}),al=ge;if(nl){var ll=nl.length;al=function(t){for(var e=t.length,n=[],i=0,r=nl[0];e>0&&r>0;)n.push(t.substring(e-=r,e+r)),r=nl[i=(i+1)%ll];return n.reverse().join(el)}}Us.geo={},Ce.prototype={s:0,t:0,add:function(t){Te(t,this.t,ul),Te(ul.s,this.s,this),this.s?this.t+=ul.t:this.s=ul.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ul=new Ce;Us.geo.stream=function(t,e){t&&cl.hasOwnProperty(t.type)?cl[t.type](t,e):Ae(t,e)};var cl={Feature:function(t,e){Ae(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++it?4*Ta+t:t,dl.lineStart=dl.lineEnd=dl.point=l}};Us.geo.bounds=function(){function t(t,e){x.push(b=[c=t,f=t]),h>e&&(h=e),e>p&&(p=e)}function e(e,n){var i=Ne([e*Na,n*Na]);if(v){var r=De(v,i),o=[r[1],-r[0],0],s=De(o,r);ze(s),s=He(s);var l=e-d,u=l>0?1:-1,g=s[0]*Pa*u,m=la(l)>180;if(m^(g>u*d&&u*e>g)){var y=s[1]*Pa;y>p&&(p=y)}else if(g=(g+360)%360-180,m^(g>u*d&&u*e>g)){var y=-s[1]*Pa;h>y&&(h=y)}else h>n&&(h=n),n>p&&(p=n);m?d>e?a(c,e)>a(c,f)&&(f=e):a(e,f)>a(c,f)&&(c=e):f>=c?(c>e&&(c=e),e>f&&(f=e)):e>d?a(c,e)>a(c,f)&&(f=e):a(e,f)>a(c,f)&&(c=e)}else t(e,n);v=i,d=e}function n(){w.point=e}function i(){b[0]=c,b[1]=f,w.point=t,v=null}function r(t,n){if(v){var i=t-d;y+=la(i)>180?i+(i>0?360:-360):i}else g=t,m=n;dl.point(t,n),e(t,n)}function o(){dl.lineStart()}function s(){r(g,m),dl.lineEnd(),la(y)>La&&(c=-(f=180)),b[0]=c,b[1]=f,v=null}function a(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tpl?(c=-(f=180),h=-(p=90)):y>La?p=90:-La>y&&(h=-90),b[0]=c,b[1]=f}};return function(t){p=f=-(c=h=1/0),x=[],Us.geo.stream(t,w);var e=x.length;if(e){x.sort(l);for(var n,i=1,r=x[0],o=[r];e>i;++i)n=x[i],u(n[0],r)||u(n[1],r)?(a(r[0],n[1])>a(r[0],r[1])&&(r[1]=n[1]),a(n[0],r[1])>a(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var s,n,d=-1/0,e=o.length-1,i=0,r=o[e];e>=i;r=n,++i)n=o[i],(s=a(r[1],n[0]))>d&&(d=s,c=n[0],f=r[1])}return x=b=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,p]]}}(),Us.geo.centroid=function(t){gl=ml=vl=yl=xl=bl=wl=kl=Ml=Sl=Cl=0,Us.geo.stream(t,Tl);var e=Ml,n=Sl,i=Cl,r=e*e+n*n+i*i;return Ea>r&&(e=bl,n=wl,i=kl,La>ml&&(e=vl,n=yl,i=xl),r=e*e+n*n+i*i,Ea>r)?[0/0,0/0]:[Math.atan2(n,e)*Pa,I(i/Math.sqrt(r))*Pa]};var gl,ml,vl,yl,xl,bl,wl,kl,Ml,Sl,Cl,Tl={sphere:l,point:Ie,lineStart:Be,lineEnd:Fe,polygonStart:function(){Tl.lineStart=We},polygonEnd:function(){Tl.lineStart=Be}},Al=Ue(qe,Je,en,[-Ta,-Ta/2]),_l=1e9;Us.geo.clipExtent=function(){var t,e,n,i,r,o,s={stream:function(t){return r&&(r.valid=!1),r=o(t),r.valid=!0,r},extent:function(a){return arguments.length?(o=on(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1]),r&&(r.valid=!1,r=null),s):[[t,e],[n,i]]}};return s.extent([[0,0],[960,500]])},(Us.geo.conicEqualArea=function(){return an(ln)}).raw=ln,Us.geo.albers=function(){return Us.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Us.geo.albersUsa=function(){function t(t){var o=t[0],s=t[1];return e=null,n(o,s),e||(i(o,s),e)||r(o,s),e}var e,n,i,r,o=Us.geo.albers(),s=Us.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Us.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?s:r>=.166&&.234>r&&i>=-.214&&-.115>i?a:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=s.stream(t),i=a.stream(t);return{point:function(t,r){e.point(t,r),n.point(t,r),i.point(t,r)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),s.precision(e),a.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),s.scale(.35*e),a.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],h=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,i=s.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+La,h+.12*u+La],[c-.214*u-La,h+.234*u-La]]).stream(l).point,r=a.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+La,h+.166*u+La],[c-.115*u-La,h+.234*u-La]]).stream(l).point,t},t.scale(1070)};var Ll,El,Nl,Pl,Dl,Rl,Ol={point:l,lineStart:l,lineEnd:l,polygonStart:function(){El=0,Ol.lineStart=un},polygonEnd:function(){Ol.lineStart=Ol.lineEnd=Ol.point=l,Ll+=la(El/2)}},zl={point:cn,lineStart:l,lineEnd:l,polygonStart:l,polygonEnd:l},Hl={point:pn,lineStart:dn,lineEnd:gn,polygonStart:function(){Hl.lineStart=mn},polygonEnd:function(){Hl.point=pn,Hl.lineStart=dn,Hl.lineEnd=gn}};Us.geo.path=function(){function t(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),s&&s.valid||(s=r(o)),Us.geo.stream(t,s)),o.result()}function e(){return s=null,t}var n,i,r,o,s,a=4.5;return t.area=function(t){return Ll=0,Us.geo.stream(t,r(Ol)),Ll},t.centroid=function(t){return vl=yl=xl=bl=wl=kl=Ml=Sl=Cl=0,Us.geo.stream(t,r(Hl)),Cl?[Ml/Cl,Sl/Cl]:kl?[bl/kl,wl/kl]:xl?[vl/xl,yl/xl]:[0/0,0/0]},t.bounds=function(t){return Dl=Rl=-(Nl=Pl=1/0),Us.geo.stream(t,r(zl)),[[Nl,Pl],[Dl,Rl]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||xn(t):ge,e()):n},t.context=function(t){return arguments.length?(o=null==(i=t)?new hn:new vn(t),"function"!=typeof a&&o.pointRadius(a),e()):i},t.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(o.pointRadius(+e),+e),t):a},t.projection(Us.geo.albersUsa()).context(null)},Us.geo.transform=function(t){return{stream:function(e){var n=new bn(e);for(var i in t)n[i]=t[i];return n}}},bn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Us.geo.projection=kn,Us.geo.projectionMutator=Mn,(Us.geo.equirectangular=function(){return kn(Cn)}).raw=Cn.invert=Cn,Us.geo.rotation=function(t){function e(e){return e=t(e[0]*Na,e[1]*Na),e[0]*=Pa,e[1]*=Pa,e}return t=An(t[0]%360*Na,t[1]*Na,t.length>2?t[2]*Na:0),e.invert=function(e){return e=t.invert(e[0]*Na,e[1]*Na),e[0]*=Pa,e[1]*=Pa,e},e},Tn.invert=Cn,Us.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=An(-t[0]*Na,-t[1]*Na,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=Pa,t[1]*=Pa}}),{type:"Polygon",coordinates:[r]}}var e,n,i=[0,0],r=6;return t.origin=function(e){return arguments.length?(i=e,t):i},t.angle=function(i){return arguments.length?(n=Nn((e=+i)*Na,r*Na),t):e},t.precision=function(i){return arguments.length?(n=Nn(e*Na,(r=+i)*Na),t):r},t.angle(90)},Us.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Na,r=t[1]*Na,o=e[1]*Na,s=Math.sin(i),a=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*s)*n+(n=u*c-l*h*a)*n),l*c+u*h*a)},Us.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Us.range(Math.ceil(o/m)*m,r,m).map(f).concat(Us.range(Math.ceil(u/v)*v,l,v).map(p)).concat(Us.range(Math.ceil(i/d)*d,n,d).filter(function(t){return la(t%m)>La}).map(c)).concat(Us.range(Math.ceil(a/g)*g,s,g).filter(function(t){return la(t%v)>La}).map(h))}var n,i,r,o,s,a,l,u,c,h,f,p,d=10,g=d,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(p(l).slice(1),f(r).reverse().slice(1),p(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],r=+e[1][0],u=+e[0][1],l=+e[1][1],o>r&&(e=o,o=r,r=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[o,u],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),a>s&&(e=a,a=s,s=e),t.precision(y)):[[i,a],[n,s]] },t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(d=+e[0],g=+e[1],t):[d,g]},t.precision=function(e){return arguments.length?(y=+e,c=Dn(a,s,90),h=Rn(i,n,y),f=Dn(u,l,90),p=Rn(o,r,y),t):y},t.majorExtent([[-180,-90+La],[180,90-La]]).minorExtent([[-180,-80-La],[180,80+La]])},Us.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=On,r=zn;return t.distance=function(){return Us.geo.distance(e||i.apply(this,arguments),n||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.target=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.precision=function(){return arguments.length?t:0},t},Us.geo.interpolate=function(t,e){return Hn(t[0]*Na,t[1]*Na,e[0]*Na,e[1]*Na)},Us.geo.length=function(t){return jl=0,Us.geo.stream(t,Il),jl};var jl,Il={sphere:l,point:l,lineStart:jn,lineEnd:l,polygonStart:l,polygonEnd:l},$l=In(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Us.geo.azimuthalEqualArea=function(){return kn($l)}).raw=$l;var Bl=In(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},ge);(Us.geo.azimuthalEquidistant=function(){return kn(Bl)}).raw=Bl,(Us.geo.conicConformal=function(){return an($n)}).raw=$n,(Us.geo.conicEquidistant=function(){return an(Bn)}).raw=Bn;var Fl=In(function(t){return 1/t},Math.atan);(Us.geo.gnomonic=function(){return kn(Fl)}).raw=Fl,Fn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-_a]},(Us.geo.mercator=function(){return Wn(Fn)}).raw=Fn;var Wl=In(function(){return 1},Math.asin);(Us.geo.orthographic=function(){return kn(Wl)}).raw=Wl;var ql=In(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Us.geo.stereographic=function(){return kn(ql)}).raw=ql,qn.invert=function(t,e){return[Math.atan2($(t),Math.cos(e)),I(Math.sin(e)/B(t))]},(Us.geo.transverseMercator=function(){return Wn(qn)}).raw=qn,Us.geom={},Us.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r,o,s,a,l,u,c,h,f,p,d,g=de(n),m=de(i),v=t.length,y=v-1,x=[],b=[],w=0;if(g===Xn&&i===Yn)e=t;else for(o=0,e=[];v>o;++o)e.push([+g.call(this,r=t[o],o),+m.call(this,r,o)]);for(o=1;v>o;++o)(e[o][1]o;++o)o!==w&&(l=e[o][1]-e[w][1],a=e[o][0]-e[w][0],x.push({angle:Math.atan2(l,a),index:o}));for(x.sort(function(t,e){return t.angle-e.angle}),p=x[0].angle,f=x[0].index,h=0,o=1;y>o;++o){if(s=x[o].index,p==x[o].angle){if(a=e[f][0]-e[w][0],l=e[f][1]-e[w][1],u=e[s][0]-e[w][0],c=e[s][1]-e[w][1],a*a+l*l>=u*u+c*c){x[o].index=-1;continue}x[h].index=-1}p=x[o].angle,h=o,f=s}for(b.push(w),o=0,s=0;2>o;++s)x[s].index>-1&&(b.push(x[s].index),o++);for(d=b.length;y>s;++s)if(!(x[s].index<0)){for(;!Gn(b[d-2],b[d-1],x[s].index,e);)--d;b[d++]=x[s].index}var k=[];for(o=d-1;o>=0;--o)k.push(t[b[o]]);return k}var n=Xn,i=Yn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e)},Us.geom.polygon=function(t){return pa(t,Xl),t};var Xl=Us.geom.polygon.prototype=[];Xl.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],r=0;++e=i&&u.x<=o&&u.y>=r&&u.y<=s?[[i,s],[o,s],[o,r],[i,r]]:[];c.point=t[a]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/La)*La,y:Math.round(s(t,e)/La)*La,i:e}})}var i=Xn,r=Yn,o=i,s=r,a=Jl;return t?e(t):(e.links=function(t){return ki(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ki(n(t)).cells.forEach(function(n,i){for(var r,o,s=n.site,a=n.edges.sort(si),l=-1,u=a.length,c=a[u-1].edge,h=c.l===s?c.r:c.l;++l=u,f=i>=c,p=(f<<1)+h;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=Ai()),h?r=u:a=u,f?s=c:l=c,o(t,e,n,i,r,s,a,l)}var c,h,f,p,d,g,m,v,y,x=de(a),b=de(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),h=[],f=[],d=t.length,s)for(p=0;d>p;++p)c=t[p],c.xv&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(p=0;d>p;++p){var w=+x(c=t[p],p),k=+b(c,p);g>w&&(g=w),m>k&&(m=k),w>v&&(v=w),k>y&&(y=k),h.push(w),f.push(k)}var M=v-g,S=y-m;M>S?y=m+M:v=g+S;var C=Ai();if(C.add=function(t){o(C,t,+x(t,++p),+b(t,p),g,m,v,y)},C.visit=function(t){_i(t,C,g,m,v,y)},p=-1,null==e){for(;++p=0?t.substring(0,e):t,i=e>=0?t.substring(e+1):"in";return n=nu.get(n)||eu,i=iu.get(i)||ge,Oi(i(n.apply(null,Vs.call(arguments,1))))},Us.interpolateHcl=Ui,Us.interpolateHsl=Vi,Us.interpolateLab=Zi,Us.interpolateRound=Qi,Us.transform=function(t){var e=Qs.createElementNS(Us.ns.prefix.svg,"g");return(Us.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Ki(n?n.matrix:ru)})(t)},Ki.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ru={a:1,b:0,c:0,d:1,e:0,f:0};Us.interpolateTransform=nr,Us.layout={},Us.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n(r-n)*a){var l=e.charge*a*a;return t.px-=o*l,t.py-=s*l,!0}if(e.point&&isFinite(a)){var l=e.pointCharge*a*a;t.px-=o*l,t.py-=s*l}}return!e.charge}}function e(t){t.px=Us.event.x,t.py=Us.event.y,a.resume()}var n,i,r,o,s,a={},l=Us.dispatch("start","tick","end"),u=[1,1],c=.9,h=ou,f=su,p=-30,d=.1,g=.8,m=[],v=[];return a.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var e,n,a,h,f,g,y,x,b,w=m.length,k=v.length;for(n=0;k>n;++n)a=v[n],h=a.source,f=a.target,x=f.x-h.x,b=f.y-h.y,(g=x*x+b*b)&&(g=i*o[n]*((g=Math.sqrt(g))-r[n])/g,x*=g,b*=g,f.x-=x*(y=h.weight/(f.weight+h.weight)),f.y-=b*y,h.x+=x*(y=1-y),h.y+=b*y);if((y=i*d)&&(x=u[0]/2,b=u[1]/2,n=-1,y))for(;++n0?t:0:t>0&&(l.start({type:"start",alpha:i=t}),Us.timer(a.tick)),a):i},a.start=function(){function t(t,i){if(!n){for(n=new Array(l),a=0;l>a;++a)n[a]=[];for(a=0;u>a;++a){var r=v[a];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,s=n[e],a=-1,u=s.length;++ae;++e)(i=m[e]).index=e,i.weight=0;for(e=0;c>e;++e)i=v[e],"number"==typeof i.source&&(i.source=m[i.source]),"number"==typeof i.target&&(i.target=m[i.target]),++i.source.weight,++i.target.weight;for(e=0;l>e;++e)i=m[e],isNaN(i.x)&&(i.x=t("x",d)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof h)for(e=0;c>e;++e)r[e]=+h.call(this,v[e],e);else for(e=0;c>e;++e)r[e]=h;if(o=[],"function"==typeof f)for(e=0;c>e;++e)o[e]=+f.call(this,v[e],e);else for(e=0;c>e;++e)o[e]=f;if(s=[],"function"==typeof p)for(e=0;l>e;++e)s[e]=+p.call(this,m[e],e);else for(e=0;l>e;++e)s[e]=p;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return n||(n=Us.behavior.drag().origin(ge).on("dragstart.force",lr).on("drag.force",e).on("dragend.force",ur)),arguments.length?(this.on("mouseover.force",cr).on("mouseout.force",hr).call(n),void 0):n},Us.rebind(a,l,"on")};var ou=20,su=1;Us.layout.hierarchy=function(){function t(e,s,a){var l=r.call(n,e,s);if(e.depth=s,a.push(e),l&&(u=l.length)){for(var u,c,h=-1,f=e.children=new Array(u),p=0,d=s+1;++hp;++p)for(r.call(t,u[0][p],d=g[p],c[0][p][1]),f=1;m>f;++f)r.call(t,u[f][p],d+=c[f-1][p][1],c[f][p][1]);return a}var e=ge,n=wr,i=kr,r=br,o=yr,s=xr;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:lu.get(e)||wr,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:uu.get(e)||kr,t):i},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(s=e,t):s},t.out=function(e){return arguments.length?(r=e,t):r},t};var lu=Us.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(Mr),o=t.map(Sr),s=Us.range(i).sort(function(t,e){return r[t]-r[e]}),a=0,l=0,u=[],c=[];for(e=0;i>e;++e)n=s[e],l>a?(a+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(t){return Us.range(t.length).reverse()},"default":wr}),uu=Us.map({silhouette:function(t){var e,n,i,r=t.length,o=t[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];i>a&&(a=i),s.push(i)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(t){var e,n,i,r,o,s,a,l,u,c=t.length,h=t[0],f=h.length,p=[];for(p[0]=l=u=0,n=1;f>n;++n){for(e=0,r=0;c>e;++e)r+=t[e][n][1];for(e=0,o=0,a=h[n][0]-h[n-1][0];c>e;++e){for(i=0,s=(t[e][n][1]-t[e][n-1][1])/(2*a);e>i;++i)s+=(t[i][n][1]-t[i][n-1][1])/a;o+=s*t[e][n][1]}p[n]=l-=r?o/r*a:0,u>l&&(u=l)}for(n=0;f>n;++n)p[n]-=u;return p},expand:function(t){var e,n,i,r=t.length,o=t[0].length,s=1/r,a=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:kr});Us.layout.histogram=function(){function t(t,o){for(var s,a,l=[],u=t.map(n,this),c=i.call(this,u,o),h=r.call(this,c,u,o),o=-1,f=u.length,p=h.length-1,d=e?1:1/f;++o0)for(o=-1;++o=c[0]&&a<=c[1]&&(s=l[Us.bisect(h,a,1,p)-1],s.y+=d,s.push(t[o]));return l}var e=!0,n=Number,i=_r,r=Tr;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=de(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return Ar(t,e)}:de(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Us.layout.tree=function(){function t(t,o){function s(t,e){var i=t.children,r=t._tree;if(i&&(o=i.length)){for(var o,a,u,c=i[0],h=c,f=-1;++f0&&(jr(Ir(a,t,i),t,r),u+=r,c+=r),h+=a._tree.mod,u+=o._tree.mod,f+=l._tree.mod,c+=s._tree.mod;a&&!Nr(s)&&(s._tree.thread=a,s._tree.mod+=h-c),o&&!Er(l)&&(l._tree.thread=o,l._tree.mod+=u-f,i=t)}return i}var u=e.call(this,t,o),c=u[0];zr(c,function(t,e){t._tree={ancestor:t,prelim:0,mod:0,change:0,shift:0,number:e?e._tree.number+1:0}}),s(c),a(c,-c._tree.prelim);var h=Pr(c,Rr),f=Pr(c,Dr),p=Pr(c,Or),d=h.x-n(h,f)/2,g=f.x+n(f,h)/2,m=p.depth||1;return zr(c,r?function(t){t.x*=i[0],t.y=t.depth*i[1],delete t._tree}:function(t){t.x=(t.x-d)/(g-d)*i[0],t.y=t.depth/m*i[1],delete t._tree}),u}var e=Us.layout.hierarchy().sort(null).value(null),n=Lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},pr(t,e)},Us.layout.pack=function(){function t(t,o){var s=n.call(this,t,o),a=s[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,zr(a,function(t){t.r=+c(t.value)}),zr(a,qr),i){var h=i*(e?1:Math.max(2*a.r/l,2*a.r/u))/2;zr(a,function(t){t.r+=h}),zr(a,qr),zr(a,function(t){t.r-=h})}return Gr(a,l/2,u/2,e?1:1/Math.max(2*a.r/l,2*a.r/u)),s}var e,n=Us.layout.hierarchy().sort($r),i=0,r=[1,1];return t.size=function(e){return arguments.length?(r=e,t):r},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(i=+e,t):i},pr(t,n)},Us.layout.cluster=function(){function t(t,o){var s,a=e.call(this,t,o),l=a[0],u=0;zr(l,function(t){var e=t.children;e&&e.length?(t.x=Zr(e),t.y=Vr(e)):(t.x=s?u+=n(t,s):0,t.y=0,s=t)});var c=Qr(l),h=Kr(l),f=c.x-n(c,h)/2,p=h.x+n(h,c)/2;return zr(l,r?function(t){t.x=(t.x-l.x)*i[0],t.y=(l.y-t.y)*i[1]}:function(t){t.x=(t.x-f)/(p-f)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),a}var e=Us.layout.hierarchy().sort(null).value(null),n=Lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},pr(t,e)},Us.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,o=t.length;++re?0:e),n.area=isNaN(i)||0>=i?0:i}function e(n){var o=n.children;if(o&&o.length){var s,a,l,u=h(n),c=[],f=o.slice(),d=1/0,g="slice"===p?u.dx:"dice"===p?u.dy:"slice-dice"===p?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(t(f,u.dx*u.dy/n.value),c.area=0;(l=f.length)>0;)c.push(s=f[l-1]),c.area+=s.area,"squarify"!==p||(a=i(c,g))<=d?(f.pop(),d=a):(c.area-=c.pop().area,r(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,d=1/0);c.length&&(r(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var o,s=h(e),a=i.slice(),l=[];for(t(a,s.dx*s.dy/e.value),l.area=0;o=a.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?s.dx:s.dy,s,!a.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,o=1/0,s=-1,a=t.length;++sn&&(o=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*d/i,i/(e*o*d)):1/0}function r(t,e,n,i){var r,o=-1,s=t.length,a=n.x,u=n.y,c=e?l(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++on&&(e=1),1>n&&(t=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return t+e*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=Us.random.normal.apply(Us,arguments);return function(){return Math.exp(t())}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e/t}}},Us.scale={};var cu={floor:ge,ceil:ge};Us.scale.linear=function(){return ao([0,1],[0,1],Di,!1)};var hu={s:1,g:1,p:1,r:1,e:1};Us.scale.log=function(){return mo(Us.scale.linear().domain([0,1]),10,!0,[1,10])};var fu=Us.format(".0e"),pu={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Us.scale.pow=function(){return vo(Us.scale.linear(),1,[0,1])},Us.scale.sqrt=function(){return Us.scale.pow().exponent(.5)},Us.scale.ordinal=function(){return xo([],{t:"range",a:[[]]})},Us.scale.category10=function(){return Us.scale.ordinal().range(du)},Us.scale.category20=function(){return Us.scale.ordinal().range(gu)},Us.scale.category20b=function(){return Us.scale.ordinal().range(mu)},Us.scale.category20c=function(){return Us.scale.ordinal().range(vu)};var du=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(oe),gu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(oe),mu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(oe),vu=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(oe);Us.scale.quantile=function(){return bo([],[])},Us.scale.quantize=function(){return wo(0,1,[0,1])},Us.scale.threshold=function(){return ko([.5],[0,1])},Us.scale.identity=function(){return Mo([0,1])},Us.svg={},Us.svg.arc=function(){function t(){var t=e.apply(this,arguments),o=n.apply(this,arguments),s=i.apply(this,arguments)+yu,a=r.apply(this,arguments)+yu,l=(s>a&&(l=s,s=a,a=l),a-s),u=Ta>l?"0":"1",c=Math.cos(s),h=Math.sin(s),f=Math.cos(a),p=Math.sin(a);return l>=xu?t?"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"Z":t?"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*f+","+o*p+"L"+t*f+","+t*p+"A"+t+","+t+" 0 "+u+",0 "+t*c+","+t*h+"Z":"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*f+","+o*p+"L0,0"+"Z"}var e=So,n=Co,i=To,r=Ao;return t.innerRadius=function(n){return arguments.length?(e=de(n),t):e},t.outerRadius=function(e){return arguments.length?(n=de(e),t):n},t.startAngle=function(e){return arguments.length?(i=de(e),t):i},t.endAngle=function(e){return arguments.length?(r=de(e),t):r},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,o=(i.apply(this,arguments)+r.apply(this,arguments))/2+yu;return[Math.cos(o)*t,Math.sin(o)*t]},t};var yu=-_a,xu=Aa-La;Us.svg.line=function(){return _o(ge)};var bu=Us.map({linear:Lo,"linear-closed":Eo,step:No,"step-before":Po,"step-after":Do,basis:Io,"basis-open":$o,"basis-closed":Bo,bundle:Fo,cardinal:zo,"cardinal-open":Ro,"cardinal-closed":Oo,monotone:Uo});bu.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var wu=[0,2/3,1/3,0],ku=[0,1/3,2/3,0],Mu=[0,1/6,2/3,1/6];Us.svg.line.radial=function(){var t=_o(Vo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Po.reverse=Do,Do.reverse=Po,Us.svg.area=function(){return Zo(ge)},Us.svg.area.radial=function(){var t=Zo(Vo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Us.svg.chord=function(){function t(t,a){var l=e(this,o,t,a),u=e(this,s,t,a);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function e(t,e,n,i){var r=e.call(t,n,i),o=a.call(t,r,i),s=l.call(t,r,i)+yu,c=u.call(t,r,i)+yu;return{r:o,a0:s,a1:c,p0:[o*Math.cos(s),o*Math.sin(s)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Ta)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var o=On,s=zn,a=Qo,l=To,u=Ao;return t.radius=function(e){return arguments.length?(a=de(e),t):a},t.source=function(e){return arguments.length?(o=de(e),t):o},t.target=function(e){return arguments.length?(s=de(e),t):s},t.startAngle=function(e){return arguments.length?(l=de(e),t):l},t.endAngle=function(e){return arguments.length?(u=de(e),t):u},t},Us.svg.diagonal=function(){function t(t,r){var o=e.call(this,t,r),s=n.call(this,t,r),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=On,n=zn,i=Ko;return t.source=function(n){return arguments.length?(e=de(n),t):e},t.target=function(e){return arguments.length?(n=de(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},Us.svg.diagonal.radial=function(){var t=Us.svg.diagonal(),e=Ko,n=t.projection;return t.projection=function(t){return arguments.length?n(Jo(e=t)):e},t},Us.svg.symbol=function(){function t(t,i){return(Su.get(e.call(this,t,i))||ns)(n.call(this,t,i))}var e=es,n=ts;return t.type=function(n){return arguments.length?(e=de(n),t):e},t.size=function(e){return arguments.length?(n=de(e),t):n},t};var Su=Us.map({circle:ns,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*_u)),n=e*_u;return"M0,"+-e+"L"+n+",0"+" 0,"+e+" "+-n+",0"+"Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Au),n=e*Au/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Au),n=e*Au/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Us.svg.symbolTypes=Su.keys();var Cu,Tu,Au=Math.sqrt(3),_u=Math.tan(30*Na),Lu=[],Eu=0;Lu.call=ya.call,Lu.empty=ya.empty,Lu.node=ya.node,Lu.size=ya.size,Us.transition=function(t){return arguments.length?Cu?t.transition():t:wa.transition()},Us.transition.prototype=Lu,Lu.select=function(t){var e,n,i,r=this.id,o=[];t=g(t);for(var s=-1,a=this.length;++so;o++){r.push(e=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return is(r,this.id)},Lu.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):_(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(i){i.__transition__[n].tween.set(t,e)})},Lu.attr=function(t,e){function n(){this.removeAttribute(a)}function i(){this.removeAttributeNS(a.space,a.local)}function r(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(a);return n!==t&&(e=s(n,t),function(t){this.setAttribute(a,e(t))})})}function o(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(a.space,a.local);return n!==t&&(e=s(n,t),function(t){this.setAttributeNS(a.space,a.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var s="transform"==t?nr:Di,a=Us.ns.qualify(t);return rs(this,"attr."+t,e,a.local?o:r)},Lu.attrTween=function(t,e){function n(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}}function i(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}var r=Us.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Lu.style=function(t,e,n){function i(){this.style.removeProperty(t)}function r(e){return null==e?i:(e+="",function(){var i,r=Js.getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=Di(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof t){2>o&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return rs(this,"style."+t,e,r)},Lu.styleTween=function(t,e,n){function i(i,r){var o=e.call(this,i,r,Js.getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},Lu.text=function(t){return rs(this,"text",t,os)},Lu.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Lu.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Us.ease.apply(Us,arguments)),_(this,function(n){n.__transition__[e].ease=t }))},Lu.delay=function(t){var e=this.id;return _(this,"function"==typeof t?function(n,i,r){n.__transition__[e].delay=+t.call(n,n.__data__,i,r)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Lu.duration=function(t){var e=this.id;return _(this,"function"==typeof t?function(n,i,r){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,i,r))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Lu.each=function(t,e){var n=this.id;if(arguments.length<2){var i=Tu,r=Cu;Cu=n,_(this,function(e,i,r){Tu=e.__transition__[n],t.call(e,e.__data__,i,r)}),Tu=i,Cu=r}else _(this,function(i){var r=i.__transition__[n];(r.event||(r.event=Us.dispatch("start","end"))).on(t,e)});return this},Lu.transition=function(){for(var t,e,n,i,r=this.id,o=++Eu,s=[],a=0,l=this.length;l>a;a++){s.push(t=[]);for(var e=this[a],u=0,c=e.length;c>u;u++)(n=e[u])&&(i=Object.create(n.__transition__[r]),i.delay+=i.duration,ss(n,u,o,i)),t.push(n)}return is(s,o)},Us.svg.axis=function(){function t(t){t.each(function(){var t,u=Us.select(this),c=this.__chart__||n,h=this.__chart__=n.copy(),f=null==l?h.ticks?h.ticks.apply(h,a):h.domain():l,p=null==e?h.tickFormat?h.tickFormat.apply(h,a):ge:e,d=u.selectAll(".tick").data(f,h),g=d.enter().insert("g",".domain").attr("class","tick").style("opacity",La),m=Us.transition(d.exit()).style("opacity",La).remove(),v=Us.transition(d).style("opacity",1),y=no(h),x=u.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),Us.transition(x));g.append("line"),g.append("text");var w=g.select("line"),k=v.select("line"),M=d.select("text").text(p),S=g.select("text"),C=v.select("text");switch(i){case"bottom":t=as,w.attr("y2",r),S.attr("y",Math.max(r,0)+s),k.attr("x2",0).attr("y2",r),C.attr("x",0).attr("y",Math.max(r,0)+s),M.attr("dy",".71em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+o+"V0H"+y[1]+"V"+o);break;case"top":t=as,w.attr("y2",-r),S.attr("y",-(Math.max(r,0)+s)),k.attr("x2",0).attr("y2",-r),C.attr("x",0).attr("y",-(Math.max(r,0)+s)),M.attr("dy","0em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+-o+"V0H"+y[1]+"V"+-o);break;case"left":t=ls,w.attr("x2",-r),S.attr("x",-(Math.max(r,0)+s)),k.attr("x2",-r).attr("y2",0),C.attr("x",-(Math.max(r,0)+s)).attr("y",0),M.attr("dy",".32em").style("text-anchor","end"),b.attr("d","M"+-o+","+y[0]+"H0V"+y[1]+"H"+-o);break;case"right":t=ls,w.attr("x2",r),S.attr("x",Math.max(r,0)+s),k.attr("x2",r).attr("y2",0),C.attr("x",Math.max(r,0)+s).attr("y",0),M.attr("dy",".32em").style("text-anchor","start"),b.attr("d","M"+o+","+y[0]+"H0V"+y[1]+"H"+o)}if(h.rangeBand){var T=h,A=T.rangeBand()/2;c=h=function(t){return T(t)+A}}else c.rangeBand?c=h:m.call(t,h);g.call(t,c),v.call(t,h)})}var e,n=Us.scale.linear(),i=Nu,r=6,o=6,s=3,a=[10],l=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(i=e in Pu?e+"":Nu,t):i},t.ticks=function(){return arguments.length?(a=arguments,t):a},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(r=+e,o=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(s=+e,t):s},t.tickSubdivide=function(){return arguments.length&&t},t};var Nu="bottom",Pu={top:1,right:1,bottom:1,left:1};Us.svg.brush=function(){function t(o){o.each(function(){var o=Us.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),s=o.selectAll(".background").data([0]);s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=o.selectAll(".resize").data(m,ge);a.exit().remove(),a.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Du[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",t.empty()?"none":null);var c,h=Us.transition(o),f=Us.transition(s);l&&(c=no(l),f.attr("x",c[0]).attr("width",c[1]-c[0]),n(h)),u&&(c=no(u),f.attr("y",c[0]).attr("height",c[1]-c[0]),i(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+c[+/e$/.test(t)]+","+f[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",c[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function r(){function r(){32==Us.event.keyCode&&(_||(x=null,E[0]-=c[1],E[1]-=f[1],_=2),h())}function p(){32==Us.event.keyCode&&2==_&&(E[0]+=c[1],E[1]+=f[1],_=0,h())}function m(){var t=Us.mouse(w),r=!1;b&&(t[0]+=b[0],t[1]+=b[1]),_||(Us.event.altKey?(x||(x=[(c[0]+c[1])/2,(f[0]+f[1])/2]),E[0]=c[+(t[0]h?(r=i,i=h):r=h),p[0]!=i||p[1]!=r?(n?s=null:o=null,p[0]=i,p[1]=r,!0):void 0}function y(){m(),S.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Us.select("body").style("cursor",null),N.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),L(),M({type:"brushend"})}var x,b,w=this,k=Us.select(Us.event.target),M=a.of(w,arguments),S=Us.select(w),C=k.datum(),T=!/^(n|s)$/.test(C)&&l,A=!/^(e|w)$/.test(C)&&u,_=k.classed("extent"),L=O(),E=Us.mouse(w),N=Us.select(Js).on("keydown.brush",r).on("keyup.brush",p);if(Us.event.changedTouches?N.on("touchmove.brush",m).on("touchend.brush",y):N.on("mousemove.brush",m).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),_)E[0]=c[0]-E[0],E[1]=f[0]-E[1];else if(C){var P=+/w$/.test(C),D=+/^n/.test(C);b=[c[1-P]-E[0],f[1-D]-E[1]],E[0]=c[P],E[1]=f[D]}else Us.event.altKey&&(x=E.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Us.select("body").style("cursor",k.style("cursor")),M({type:"brushstart"}),m()}var o,s,a=p(t,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],f=[0,0],d=!0,g=!0,m=Ru[0];return t.event=function(t){t.each(function(){var t=a.of(this,arguments),e={x:c,y:f,i:o,j:s},n=this.__chart__||e;this.__chart__=e,Cu?Us.select(this).transition().each("start.brush",function(){o=n.i,s=n.j,c=n.x,f=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=Ri(c,e.x),i=Ri(f,e.y);return o=s=null,function(r){c=e.x=n(r),f=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=e.i,s=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(l=e,m=Ru[!l<<1|!u],t):l},t.y=function(e){return arguments.length?(u=e,m=Ru[!l<<1|!u],t):u},t.clamp=function(e){return arguments.length?(l&&u?(d=!!e[0],g=!!e[1]):l?d=!!e:u&&(g=!!e),t):l&&u?[d,g]:l?d:u?g:null},t.extent=function(e){var n,i,r,a,h;return arguments.length?(l&&(n=e[0],i=e[1],u&&(n=n[0],i=i[0]),o=[n,i],l.invert&&(n=l(n),i=l(i)),n>i&&(h=n,n=i,i=h),(n!=c[0]||i!=c[1])&&(c=[n,i])),u&&(r=e[0],a=e[1],l&&(r=r[1],a=a[1]),s=[r,a],u.invert&&(r=u(r),a=u(a)),r>a&&(h=r,r=a,a=h),(r!=f[0]||a!=f[1])&&(f=[r,a])),t):(l&&(o?(n=o[0],i=o[1]):(n=c[0],i=c[1],l.invert&&(n=l.invert(n),i=l.invert(i)),n>i&&(h=n,n=i,i=h))),u&&(s?(r=s[0],a=s[1]):(r=f[0],a=f[1],u.invert&&(r=u.invert(r),a=u.invert(a)),r>a&&(h=r,r=a,a=h))),l&&u?[[n,r],[i,a]]:l?[n,i]:u&&[r,a])},t.clear=function(){return t.empty()||(c=[0,0],f=[0,0],o=s=null),t},t.empty=function(){return!!l&&c[0]==c[1]||!!u&&f[0]==f[1]},Us.rebind(t,a,"on")};var Du={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ru=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ou=Us.time={},zu=Date,Hu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];us.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ju.setUTCDate.apply(this._,arguments)},setDay:function(){ju.setUTCDay.apply(this._,arguments)},setFullYear:function(){ju.setUTCFullYear.apply(this._,arguments)},setHours:function(){ju.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ju.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ju.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ju.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ju.setUTCSeconds.apply(this._,arguments)},setTime:function(){ju.setTime.apply(this._,arguments)}};var ju=Date.prototype,Iu="%a %b %e %X %Y",$u="%m/%d/%Y",Bu="%H:%M:%S",Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Wu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Xu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Ou.year=cs(function(t){return t=Ou.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ou.years=Ou.year.range,Ou.years.utc=Ou.year.utc.range,Ou.day=cs(function(t){var e=new zu(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ou.days=Ou.day.range,Ou.days.utc=Ou.day.utc.range,Ou.dayOfYear=function(t){var e=Ou.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},Hu.forEach(function(t,e){t=t.toLowerCase(),e=7-e;var n=Ou[t]=cs(function(t){return(t=Ou.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=Ou.year(t).getDay();return Math.floor((Ou.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});Ou[t+"s"]=n.range,Ou[t+"s"].utc=n.utc.range,Ou[t+"OfYear"]=function(t){var n=Ou.year(t).getDay();return Math.floor((Ou.dayOfYear(t)+(n+e)%7)/7)}}),Ou.week=Ou.sunday,Ou.weeks=Ou.sunday.range,Ou.weeks.utc=Ou.sunday.utc.range,Ou.weekOfYear=Ou.sundayOfYear,Ou.format=fs;var Yu=ds(Fu),Gu=gs(Fu),Uu=ds(Wu),Vu=gs(Wu),Zu=ds(qu),Qu=gs(qu),Ku=ds(Xu),Ju=gs(Xu),tc=/^%/,ec={"-":"",_:" ",0:"0"},nc={a:function(t){return Wu[t.getDay()]},A:function(t){return Fu[t.getDay()]},b:function(t){return Xu[t.getMonth()]},B:function(t){return qu[t.getMonth()]},c:fs(Iu),d:function(t,e){return ms(t.getDate(),e,2)},e:function(t,e){return ms(t.getDate(),e,2)},H:function(t,e){return ms(t.getHours(),e,2)},I:function(t,e){return ms(t.getHours()%12||12,e,2)},j:function(t,e){return ms(1+Ou.dayOfYear(t),e,3)},L:function(t,e){return ms(t.getMilliseconds(),e,3)},m:function(t,e){return ms(t.getMonth()+1,e,2)},M:function(t,e){return ms(t.getMinutes(),e,2)},p:function(t){return t.getHours()>=12?"PM":"AM"},S:function(t,e){return ms(t.getSeconds(),e,2)},U:function(t,e){return ms(Ou.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ms(Ou.mondayOfYear(t),e,2)},x:fs($u),X:fs(Bu),y:function(t,e){return ms(t.getFullYear()%100,e,2)},Y:function(t,e){return ms(t.getFullYear()%1e4,e,4)},Z:Is,"%":function(){return"%"}},ic={a:vs,A:ys,b:ks,B:Ms,c:Ss,d:Ps,e:Ps,H:Rs,I:Rs,j:Ds,L:Hs,m:Ns,M:Os,p:js,S:zs,U:bs,w:xs,W:ws,x:Cs,X:Ts,y:_s,Y:As,Z:Ls,"%":$s},rc=/^\s*\d+/,oc=Us.map({am:0,pm:1});fs.utc=Bs;var sc=Bs("%Y-%m-%dT%H:%M:%S.%LZ");fs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Fs:sc,Fs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Fs.toString=sc.toString,Ou.second=cs(function(t){return new zu(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ou.seconds=Ou.second.range,Ou.seconds.utc=Ou.second.utc.range,Ou.minute=cs(function(t){return new zu(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ou.minutes=Ou.minute.range,Ou.minutes.utc=Ou.minute.utc.range,Ou.hour=cs(function(t){var e=t.getTimezoneOffset()/60;return new zu(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ou.hours=Ou.hour.range,Ou.hours.utc=Ou.hour.utc.range,Ou.month=cs(function(t){return t=Ou.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ou.months=Ou.month.range,Ou.months.utc=Ou.month.utc.range;var ac=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],lc=[[Ou.second,1],[Ou.second,5],[Ou.second,15],[Ou.second,30],[Ou.minute,1],[Ou.minute,5],[Ou.minute,15],[Ou.minute,30],[Ou.hour,1],[Ou.hour,3],[Ou.hour,6],[Ou.hour,12],[Ou.day,1],[Ou.day,2],[Ou.week,1],[Ou.month,1],[Ou.month,3],[Ou.year,1]],uc=[[fs("%Y"),qe],[fs("%B"),function(t){return t.getMonth()}],[fs("%b %d"),function(t){return 1!=t.getDate()}],[fs("%a %d"),function(t){return t.getDay()&&1!=t.getDate()}],[fs("%I %p"),function(t){return t.getHours()}],[fs("%I:%M"),function(t){return t.getMinutes()}],[fs(":%S"),function(t){return t.getSeconds()}],[fs(".%L"),function(t){return t.getMilliseconds()}]],cc=Xs(uc);lc.year=Ou.year,Ou.scale=function(){return Ws(Us.scale.linear(),lc,cc)};var hc={range:function(t,e,n){return Us.range(+t,+e,n).map(qs)}},fc=lc.map(function(t){return[t[0].utc,t[1]]}),pc=[[Bs("%Y"),qe],[Bs("%B"),function(t){return t.getUTCMonth()}],[Bs("%b %d"),function(t){return 1!=t.getUTCDate()}],[Bs("%a %d"),function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[Bs("%I %p"),function(t){return t.getUTCHours()}],[Bs("%I:%M"),function(t){return t.getUTCMinutes()}],[Bs(":%S"),function(t){return t.getUTCSeconds()}],[Bs(".%L"),function(t){return t.getUTCMilliseconds()}]],dc=Xs(pc);return fc.year=Ou.year.utc,Ou.scale.utc=function(){return Ws(Us.scale.linear(),fc,dc)},Us.text=me(function(t){return t.responseText}),Us.json=function(t,e){return ve(t,"application/json",Ys,e)},Us.html=function(t,e){return ve(t,"text/html",Gs,e)},Us.xml=me(function(t){return t.responseXML}),Us}();