d3=function(){function ro(n){return null!=n&&!isNaN(n)}function sk(n){return n.length}function hk(n){for(var t=1;n*t%1;)t*=10;return t}function al(n,t){try{for(var i in t)Object.defineProperty(n.prototype,i,{value:t[i],enumerable:!1})}catch(r){n.prototype=t}}function ut(){}function uo(){}function ck(n,t,i){return function(){var r=i.apply(t,arguments);return r===t?n:r}}function fo(n,t){var i,u,r;if(t in n)return t;for(t=t.charAt(0).toUpperCase()+t.substring(1),i=0,u=gh.length;u>i;++i)if(r=gh[i]+t,r in n)return r}function c(){}function eo(){}function vl(n){function r(){for(var i,r=t,u=-1,f=r.length;++u<f;)(i=r[u].on)&&i.apply(this,arguments);return n}var t=[],i=new ut;return r.on=function(r,u){var e,f=i.get(r);return arguments.length<2?f&&f.on:(f&&(f.on=null,t=t.slice(0,e=t.indexOf(f)).concat(t.slice(e+1)),i.remove(r)),u&&t.push(i.set(r,{on:u})),n)},r}function wt(){n.event.preventDefault()}function yl(){for(var i,t=n.event;i=t.sourceEvent;)t=i;return t}function oo(t){for(var i=new eo,r=0,u=arguments.length;++r<u;)i[arguments[r]]=vl(i);return i.of=function(r,u){return function(f){try{var e=f.sourceEvent=n.event;f.target=t,n.event=f,i[f.type].apply(r,u)}finally{n.event=e}}},i}function bt(n){return kf(n,e),n}function so(n){return"function"==typeof n?n:function(){return nc(n,this)}}function pl(n){return"function"==typeof n?n:function(){return tc(n,this)}}function wl(t,i){function r(){this.removeAttribute(t)}function u(){this.removeAttributeNS(t.space,t.local)}function f(){this.setAttribute(t,i)}function e(){this.setAttributeNS(t.space,t.local,i)}function o(){var n=i.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function s(){var n=i.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=n.ns.qualify(t),null==i?t.local?u:r:"function"==typeof i?t.local?s:o:t.local?e:f}function bl(n){return n.trim().replace(/\s+/g," ")}function kl(t){return new RegExp("(?:^|\\s+)"+n.requote(t)+"(?:\\s+|$)","g")}function dl(n,t){function r(){for(var r=-1;++r<i;)n[r](this,t)}function u(){for(var r=-1,u=t.apply(this,arguments);++r<i;)n[r](this,u)}n=n.trim().split(/\s+/).map(lk);var i=n.length;return"function"==typeof t?u:r}function lk(n){var t=kl(n);return function(i,r){if(u=i.classList)return r?u.add(n):u.remove(n);var u=i.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||i.setAttribute("class",bl(u+" "+n))):i.setAttribute("class",bl(u.replace(t," ")))}}function gl(n,t,i){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,i)}function f(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,i)}return null==t?r:"function"==typeof t?f:u}function na(n,t){function i(){delete this[n]}function r(){this[n]=t}function u(){var i=t.apply(this,arguments);null==i?delete this[n]:this[n]=i}return null==t?i:"function"==typeof t?u:r}function ta(t){return"function"==typeof t?t:(t=n.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,t)}}function ho(n){return{__data__:n}}function ia(n){return function(){return bw(this,n)}}function ak(t){return arguments.length||(t=n.ascending),function(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}}function kt(n,t){for(var i=0,u=n.length;u>i;i++)for(var f,e=n[i],r=0,o=e.length;o>r;r++)(f=e[r])&&t(f,r,i);return n}function ra(n){return kf(n,et),n}function vk(n){var t,i;return function(r,u,f){var e,o=n[f].update,s=o.length;for(f!=i&&(i=f,t=0),u>=t&&(t=u+1);!(e=o[t])&&++t<s;);return e}}function au(){var n=this.__transition__;n&&++n.active}function ua(t,i,r){function o(){var n=this[u];n&&(this.removeEventListener(t,n,n.$),delete this[u])}function h(){var n=s(i,gt(arguments));o.call(this),this.addEventListener(t,this[u]=n,n.$=r),n._=i}function l(){var u,f=new RegExp("^__on([^.]+)"+n.requote(t)+"$"),i,r;for(i in this)(u=i.match(f))&&(r=this[i],this.removeEventListener(u[1],r,r.$),delete this[i])}var u="__on"+t,f=t.indexOf("."),s=fa,e;return f>0&&(t=t.substring(0,f)),e=gf.get(t),e&&(t=e,s=yk),f?i?h:o:i?c:l}function fa(t,i){return function(r){var u=n.event;n.event=r,i[0]=this.__data__;try{t.apply(this,i)}finally{n.event=u}}}function yk(n,t){var i=fa(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||i.call(t,n)}}function vu(){var t=".dragsuppress-"+ ++kw,u="click"+t,r=n.select(v).on("touchmove"+t,wt).on("dragstart"+t,wt).on("selectstart"+t,wt),i,f;return cr&&(i=ni.style,f=i[cr],i[cr]="none"),function(n){function e(){r.on(u,null)}r.on(t,null),cr&&(i[cr]=f),n&&(r.on(u,function(){wt(),e()},!0),setTimeout(e,0))}}function ea(t,i){var u,r,f,e;return(i.changedTouches&&(i=i.changedTouches[0]),u=t.ownerSVGElement||t,u.createSVGPoint)?(r=u.createSVGPoint(),0>ne&&(v.scrollX||v.scrollY)&&(u=n.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"),f=u[0][0].getScreenCTM(),ne=!(f.f||f.e),u.remove()),ne?(r.x=i.pageX,r.y=i.pageY):(r.x=i.clientX,r.y=i.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]):(e=t.getBoundingClientRect(),[i.clientX-e.left-t.clientLeft,i.clientY-e.top-t.clientTop])}function oa(n){return n>0?1:0>n?-1:0}function sa(n){return n>1?0:-1>n?f:Math.acos(n)}function si(n){return n>1?k:-1>n?-k:Math.asin(n)}function ha(n){return((n=Math.exp(n))-1/n)/2}function co(n){return((n=Math.exp(n))+1/n)/2}function pk(n){return((n=Math.exp(2*n))-1)/(n+1)}function ca(n){return(n=Math.sin(n/2))*n}function gi(){}function nr(n,t,i){return new lo(n,t,i)}function lo(n,t,i){this.h=n,this.s=t,this.l=i}function ao(n,t,i){function e(n){return n>360?n-=360:0>n&&(n+=360),60>n?r+(u-r)*n/60:180>n?u:240>n?r+(u-r)*(240-n)/60:r}function f(n){return Math.round(255*e(n))}var r,u;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,i=0>i?0:i>1?1:i,u=.5>=i?i*(1+t):i+t-i*t,r=2*i-u,st(f(n+120),f(n),f(n-120))}function tr(n,t,i){return new yu(n,t,i)}function yu(n,t,i){this.h=n,this.c=t,this.l=i}function vo(n,t,i){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),ir(i,Math.cos(n*=r)*t,Math.sin(n)*t)}function ir(n,t,i){return new pu(n,t,i)}function pu(n,t,i){this.l=n,this.a=t,this.b=i}function la(n,t,i){var r=(n+16)/116,u=r+t/500,f=r-i/200;return u=yo(u)*nb,r=yo(r)*tb,f=yo(f)*ib,st(wo(3.2404542*u-1.5371385*r-.4985314*f),wo(-.969266*u+1.8760108*r+.041556*f),wo(.0556434*u-.2040259*r+1.0572252*f))}function aa(n,t,i){return n>0?tr(Math.atan2(i,t)*s,Math.sqrt(t*t+i*i),n):tr(NaN,NaN,n)}function yo(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function po(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function wo(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function va(n){return st(n>>16,255&n>>8,255&n)}function wu(n){return va(n)+""}function st(n,t,i){return new bo(n,t,i)}function bo(n,t,i){this.r=n,this.g=t,this.b=i}function rr(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function ya(n,t,i){var s,r,o,u=0,f=0,e=0;if(s=/([a-z]+)\((.*)\)/i.exec(n))switch(r=s[2].split(","),s[1]){case"hsl":return i(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return t(go(r[0]),go(r[1]),go(r[2]))}return(o=fu.get(n))?t(o.r,o.g,o.b):(null!=n&&"#"===n.charAt(0)&&(4===n.length?(u=n.charAt(1),u+=u,f=n.charAt(2),f+=f,e=n.charAt(3),e+=e):7===n.length&&(u=n.substring(1,3),f=n.substring(3,5),e=n.substring(5,7)),u=parseInt(u,16),f=parseInt(f,16),e=parseInt(e,16)),t(u,f,e))}function pa(n,t,i){var f,s,e=Math.min(n/=255,t/=255,i/=255),r=Math.max(n,t,i),u=r-e,o=(r+e)/2;return u?(s=.5>o?u/(r+e):u/(2-r-e),f=n==r?(t-i)/u+(i>t?6:0):t==r?(i-n)/u+2:(n-t)/u+4,f*=60):(f=NaN,s=o>0&&1>o?0:f),nr(f,s,o)}function wa(n,t,i){n=ko(n),t=ko(t),i=ko(i);var u=po((.4124564*n+.3575761*t+.1804375*i)/nb),r=po((.2126729*n+.7151522*t+.072175*i)/tb),f=po((.0193339*n+.119192*t+.9503041*i)/ib);return ir(116*r-16,500*(u-r),200*(r-f))}function ko(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function go(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function o(n){return"function"==typeof n?n:function(){return n}}function a(n){return n}function ns(n){return function(t,i,r){return 2===arguments.length&&"function"==typeof i&&(r=i,i=null),ts(t,i,n,r)}}function ts(t,i,r,u){function c(){var t,n=e.status;if(!n&&e.responseText||n>=200&&300>n||304===n){try{t=r.call(f,e)}catch(i){return s.error.call(f,i),void 0}s.load.call(f,t)}else s.error.call(f,e)}var f={},s=n.dispatch("beforesend","progress","load","error"),o={},e=new XMLHttpRequest,h=null;return!v.XDomainRequest||"withCredentials"in e||!/^(http(s)?:)?\/\//.test(t)||(e=new XDomainRequest),"onload"in e?e.onload=e.onerror=c:e.onreadystatechange=function(){e.readyState>3&&c()},e.onprogress=function(t){var i=n.event;n.event=t;try{s.progress.call(f,e)}finally{n.event=i}},f.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",f)},f.mimeType=function(n){return arguments.length?(i=null==n?null:n+"",f):i},f.responseType=function(n){return arguments.length?(h=n,f):h},f.response=function(n){return r=n,f},["get","post"].forEach(function(n){f[n]=function(){return f.send.apply(f,[n].concat(gt(arguments)))}}),f.send=function(n,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),e.open(n,t,!0),null==i||"accept"in o||(o.accept=i+",*/*"),e.setRequestHeader)for(var c in o)e.setRequestHeader(c,o[c]);return null!=i&&e.overrideMimeType&&e.overrideMimeType(i),null!=h&&(e.responseType=h),null!=u&&f.on("error",u).on("load",function(n){u(null,n)}),s.beforesend.call(f,e),e.send(null==r?null:r),f},f.abort=function(){return e.abort(),f},n.rebind(f,s,"on"),null==u?f:f.get(wk(u))}function wk(n){return 1===n.length?function(t,i){n(null==t?i:null)}:n}function is(){var t=ba(),n=ka()-t;n>24?(isFinite(n)&&(clearTimeout(he),he=setTimeout(is,n)),se=0):(se=1,oc(is))}function ba(){var n=Date.now();for(vt=ee;vt;)n>=vt.t&&(vt.f=vt.c(n-vt.t)),vt=vt.n;return n}function ka(){for(var t,n=ee,i=1/0;n;)n.f?n=t?t.n=n.n:ee=n.n:(n.t<i&&(i=n.t),n=(t=n).n);return oe=t,i}function bk(n,t){var i=Math.pow(10,3*u(8-t));return{scale:t>8?function(n){return n/i}:function(n){return n*i},symbol:n}}function rs(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function kk(n){return n+""}function us(){}function da(n,t,i){var r=i.s=n+t,u=r-n,f=r-u;i.t=n-f+(t-u)}function bu(n,t){n&&cc.hasOwnProperty(n.type)&&cc[n.type](n,t)}function fs(n,t,i){var r,u=-1,f=n.length-i;for(t.lineStart();++u<f;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ga(n,t){var i=-1,r=n.length;for(t.polygonStart();++i<r;)fs(n[i],t,1);t.polygonEnd()}function dk(){function u(u,e){u*=r,e=e*r/2+f/4;var o=u-n,s=Math.cos(e),h=Math.sin(e),c=i*h,l=t*s+c*Math.cos(o),a=c*Math.sin(o);ti.add(Math.atan2(a,l)),n=u,t=s,i=h}var e,o,n,t,i;d.point=function(s,h){d.point=u,n=(e=s)*r,t=Math.cos(h=(o=h)*r/2+f/4),i=Math.sin(h)},d.lineEnd=function(){u(e,o)}}function hi(n){var t=n[0],i=n[1],r=Math.cos(i);return[r*Math.cos(t),r*Math.sin(t),Math.sin(i)]}function ku(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function ur(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function es(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function du(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function gu(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function nf(n){return[Math.atan2(n[1],n[0]),si(n[2])]}function tf(n,i){return u(n[0]-i[0])<t&&u(n[1]-i[1])<t}function os(n,t){n*=r;var i=Math.cos(t*=r);pr(i*Math.cos(n),i*Math.sin(n),Math.sin(t))}function pr(n,t,i){++ou,pi+=(n-pi)/ou,wi+=(t-wi)/ou,yt+=(i-yt)/ou}function nv(){function u(u,f){u*=r;var c=Math.cos(f*=r),o=c*Math.cos(u),s=c*Math.sin(u),h=Math.sin(f),e=Math.atan2(Math.sqrt((e=t*h-i*s)*e+(e=i*o-n*h)*e+(e=n*s-t*o)*e),n*o+t*s+i*h);ae+=e,ii+=e*(n+(n=o)),ri+=e*(t+(t=s)),ot+=e*(i+(i=h)),pr(n,t,i)}var n,t,i;it.point=function(f,e){f*=r;var o=Math.cos(e*=r);n=o*Math.cos(f),t=o*Math.sin(f),i=Math.sin(e),it.point=u,pr(n,t,i)}}function tv(){it.point=os}function gk(){function u(u,f){u*=r;var p=Math.cos(f*=r),e=p*Math.cos(u),o=p*Math.sin(u),s=Math.sin(f),c=t*s-i*o,l=i*e-n*s,a=n*o-t*e,v=Math.sqrt(c*c+l*l+a*a),w=n*e+t*o+i*s,y=v&&-sa(w)/v,h=Math.atan2(v,w);lr+=y*c,ar+=y*l,ui+=y*a,ae+=h,ii+=h*(n+(n=e)),ri+=h*(t+(t=o)),ot+=h*(i+(i=s)),pr(n,t,i)}var f,e,n,t,i;it.point=function(o,s){f=o,e=s,it.point=u,o*=r;var h=Math.cos(s*=r);n=h*Math.cos(o),t=h*Math.sin(o),i=Math.sin(s),pr(n,t,i)},it.lineEnd=function(){u(f,e),it.lineEnd=tv,it.point=os}}function fr(){return!0}function iv(n,t,i,r,u){var h=[],s=[],o,l,a,f,c,v,e;if(n.forEach(function(n){var o,i,f,e,t,r;if(!((o=n.length-1)<=0)){if(i=n[0],f=n[o],tf(i,f)){for(u.lineStart(),e=0;o>e;++e)u.point((i=n[e])[0],i[1]);return u.lineEnd(),void 0}t=new rf(i,n,null,!0),r=new rf(i,null,t,!1),t.o=r,h.push(t),s.push(r),t=new rf(f,n,null,!1),r=new rf(f,null,t,!0),t.o=r,h.push(t),s.push(r)}}),s.sort(t),rv(h),rv(s),h.length){for(var e=0,y=i,v=s.length;v>e;++e)s[e].e=y=!y;for(a=h[0];;){for(f=a,c=!0;f.v;)if((f=f.n)===a)return;o=f.z,u.lineStart();do{if(f.v=f.o.v=!0,f.e){if(c)for(e=0,v=o.length;v>e;++e)u.point((l=o[e])[0],l[1]);else r(f.x,f.n.x,1,u);f=f.n}else{if(c)for(o=f.p.z,e=o.length-1;e>=0;--e)u.point((l=o[e])[0],l[1]);else r(f.x,f.p.x,-1,u);f=f.p}f=f.o,o=f.z,c=!c}while(!f.v);u.lineEnd()}}}function rv(n){if(r=n.length){for(var r,t,u=0,i=n[0];++u<r;)i.n=t=n[u],t.p=i,i=t;i.n=t=n[0],t.p=i}}function rf(n,t,i,r){this.x=n,this.z=t,this.o=i,this.e=r,this.v=!1,this.n=this.p=null}function uv(t,i,r,u){return function(f,e){function a(n,i){var r=f(n,i);t(n=r[0],i=r[1])&&e.point(n,i)}function k(n,t){var i=f(n,t);v.point(i[0],i[1])}function y(){o.point=k,v.lineStart()}function p(){o.point=a,v.lineEnd()}function w(n,t){h.push([n,t]);var i=f(n,t);l.point(i[0],i[1])}function d(){l.lineStart(),h=[]}function g(){var f,t,r;w(h[0][0],h[0][1]),l.lineEnd();var i,u=l.clean(),n=b.buffer(),t=n.length;if(h.pop(),c.push(h),h=null,t){if(1&u){for(i=n[0],t=i.length-1,r=-1,e.lineStart();++r<t;)e.point((f=i[r])[0],f[1]);return e.lineEnd(),void 0}t>1&&2&u&&n.push(n.pop().concat(n.shift())),s.push(n.filter(nd))}}var s,c,h,v=i(e),nt=f.invert(u[0],u[1]),o={point:a,lineStart:y,lineEnd:p,polygonStart:function(){o.point=w,o.lineStart=d,o.lineEnd=g,s=[],c=[],e.polygonStart()},polygonEnd:function(){o.point=a,o.lineStart=y,o.lineEnd=p,s=n.merge(s);var t=id(nt,c);s.length?iv(s,td,t,r,e):t&&(e.lineStart(),r(null,null,1,e),e.lineEnd()),e.polygonEnd(),s=c=null},sphere:function(){e.polygonStart(),e.lineStart(),r(null,null,1,e),e.lineEnd(),e.polygonEnd()}},b=fv(),l=i(b);return o}}function nd(n){return n.length>1}function fv(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,i){t.push([n,i])},lineEnd:c,buffer:function(){var i=n;return n=[],t=null,i},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function td(n,i){return((n=n.x)[0]<0?n[1]-k-t:k-n[1])-((i=i.x)[0]<0?i[1]-k-t:k-i[1])}function id(n,i){var o=n[0],g=n[1],ht=[Math.sin(o),-Math.cos(o),0],v=0,nt=0,s,tt,h,y,e,k,d;for(ti.reset(),s=0,tt=i.length;tt>s;++s)if(h=i[s],y=h.length,y)for(var c=h[0],p=c[0],it=c[1]/2+f/4,rt=Math.sin(it),ut=Math.cos(it),l=1;;){l===y&&(l=0),n=h[l];var w=n[0],ft=n[1]/2+f/4,et=Math.sin(ft),ot=Math.cos(ft),r=w-p,a=u(r)>f,st=rt*et;if((ti.add(Math.atan2(st*Math.sin(r),ut*ot+st*Math.cos(r))),v+=a?r+(r>=0?b:-b):r,a^p>=o^w>=o)&&(e=ur(hi(c),hi(n)),gu(e),k=ur(ht,e),gu(k),d=(a^r>=0?-1:1)*si(k[2]),(g>d||g===d&&(e[0]||e[1]))&&(nt+=a^r>=0?1:-1)),!l++)break;p=w,rt=et,ut=ot,c=n}return(-t>v||t>v&&0>ti)^1&nt}function rd(n){var o,r=NaN,i=NaN,e=NaN;return{lineStart:function(){n.lineStart(),o=1},point:function(s,h){var c=s>0?f:-f,l=u(s-r);u(l-f)<t?(n.point(r,i=(i+h)/2>0?k:-k),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),n.point(s,i),o=0):e!==c&&l>=f&&(u(r-e)<t&&(r-=e*t),u(s-c)<t&&(s-=c*t),i=ud(r,i,s,h),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),o=0),n.point(r=s,i=h),e=c},lineEnd:function(){n.lineEnd(),r=i=NaN},clean:function(){return 2-o}}}function ud(n,i,r,f){var e,o,s=Math.sin(n-r);return u(s)>t?Math.atan((Math.sin(i)*(o=Math.cos(f))*Math.sin(r)-Math.sin(f)*(e=Math.cos(i))*Math.sin(n))/(e*o*s)):(i+f)/2}function fd(n,i,r,e){var o,s;null==n?(o=r*k,e.point(-f,o),e.point(0,o),e.point(f,o),e.point(f,0),e.point(f,-o),e.point(0,-o),e.point(-f,-o),e.point(-f,0),e.point(-f,o)):u(n[0]-i[0])>t?(s=n[0]<i[0]?f:-f,o=r*s/2,e.point(-s,o),e.point(0,o),e.point(s,o)):e.point(i[0],i[1])}function ed(n){function s(n,t){return Math.cos(n)*Math.cos(t)>i}function c(n){var i,a,r,c,u;return{lineStart:function(){c=r=!1,u=1},point:function(v,y){var w,p=[v,y],b=s(v,y),d=e?b?0:h(v,y):b?h(v+(0>v?f:-f),y):0,k;(!i&&(c=r=b)&&n.lineStart(),b!==r&&(w=o(i,p),(tf(i,w)||tf(p,w))&&(p[0]+=t,p[1]+=t,b=s(p[0],p[1]))),b!==r)?(u=0,b?(n.lineStart(),w=o(p,i),n.point(w[0],w[1])):(w=o(i,p),n.point(w[0],w[1]),n.lineEnd()),i=w):l&&i&&e^b&&(d&a||!(k=o(p,i,!0))||(u=0,e?(n.lineStart(),n.point(k[0][0],k[0][1]),n.point(k[1][0],k[1][1]),n.lineEnd()):(n.point(k[1][0],k[1][1]),n.lineEnd(),n.lineStart(),n.point(k[0][0],k[0][1])))),!b||i&&tf(i,p)||n.point(p[0],p[1]),i=p,r=b,a=d},lineEnd:function(){r&&n.lineEnd(),i=null},clean:function(){return u|(c&&r)<<1}}}function o(n,r,e){var et=hi(n),ot=hi(r),rt=[1,0,0],a=ur(et,ot),ut=ku(a,a),b=a[0],k=ut-b*b,g,o,it;if(!k)return!e&&n;var st=i*ut/k,ht=-i*b/k,ct=ur(rt,a),s=du(rt,st),lt=du(a,ht);es(s,lt);var v=ct,p=ku(s,v),d=ku(v,v),ft=p*p-d*(ku(s,s)-1);if(!(0>ft)){if(g=Math.sqrt(ft),o=du(v,(-p-g)/d),es(o,s),o=nf(o),!e)return o;var w,h=n[0],y=r[0],c=n[1],l=r[1];h>y&&(w=h,h=y,y=w);var nt=y-h,tt=u(nt-f)<t,at=tt||t>nt;if(!tt&&c>l&&(w=c,c=l,l=w),at?tt?c+l>0^o[1]<(u(o[0]-h)<t?c:l):c<=o[1]&&o[1]<=l:nt>f^(h<=o[0]&&o[0]<=y))return it=du(v,(-p+g)/d),es(it,s),[o,nf(it)]}}function h(t,i){var u=e?n:f-n,r=0;return-u>t?r|=1:t>u&&(r|=2),-u>i?r|=4:i>u&&(r|=8),r}var i=Math.cos(n),e=i>0,l=u(i)>t,a=ls(n,6*r);return uv(s,c,a,e?[0,-n]:[-f,n-f])}function ev(n,t,i,r){return function(u){var f,a=u.a,v=u.b,c=a.x,l=a.y,y=v.x,p=v.y,e=0,o=1,s=y-c,h=p-l;if(f=n-c,s||!(f>0)){if(f/=s,0>s){if(e>f)return;o>f&&(o=f)}else if(s>0){if(f>o)return;f>e&&(e=f)}if(f=i-c,s||!(0>f)){if(f/=s,0>s){if(f>o)return;f>e&&(e=f)}else if(s>0){if(e>f)return;o>f&&(o=f)}if(f=t-l,h||!(f>0)){if(f/=h,0>h){if(e>f)return;o>f&&(o=f)}else if(h>0){if(f>o)return;f>e&&(e=f)}if(f=r-l,h||!(0>f)){if(f/=h,0>h){if(f>o)return;f>e&&(e=f)}else if(h>0){if(e>f)return;o>f&&(o=f)}return e>0&&(u.a={x:c+e*s,y:l+e*h}),1>o&&(u.b={x:c+o*s,y:l+o*h}),u}}}}}}function ov(i,r,f,e){function o(n,e){return u(n[0]-i)<t?e>0?0:3:u(n[0]-f)<t?e>0?2:1:u(n[1]-r)<t?e>0?1:0:e>0?3:2}function h(n,t){return s(n.x,t.x)}function s(n,t){var i=o(n,1),r=o(t,1);return i!==r?i-r:0===i?t[1]-n[1]:1===i?n[0]-t[0]:2===i?n[1]-t[1]:t[0]-n[0]}return function(t){function et(n){for(var r=0,s=c.length,u=n[1],f=0;s>f;++f)for(var t,e=1,o=c[f],h=o.length,i=o[0];h>e;++e)t=o[e],i[1]<=u?t[1]>u&&d(i,t,n)>0&&++r:t[1]<=u&&d(i,t,n)<0&&--r,i=t;return 0!==r}function d(n,t,i){return(t[0]-n[0])*(i[1]-n[1])-(i[0]-n[0])*(t[1]-n[1])}function g(n,t,u,h){var c=0,l=0;if(null==n||(c=o(n,u))!==(l=o(t,u))||s(n,t)<0^u>0){do h.point(0===c||3===c?i:f,c>1?e:r);while((c=(c+u+4)%4)!==l)}else h.point(t[0],t[1])}function nt(n,t){return n>=i&&f>=n&&t>=r&&e>=t}function tt(n,i){nt(n,i)&&t.point(n,i)}function ot(){k.point=it,c&&c.push(v=[]),w=!0,l=!1,y=p=NaN}function st(){u&&(it(rt,ut),ft&&l&&b.rejoin(),u.push(b.buffer())),k.point=tt,l&&t.lineEnd()}function it(n,i){var r,u;n=Math.max(-ve,Math.min(ve,n)),i=Math.max(-ve,Math.min(ve,i)),r=nt(n,i),(c&&v.push([n,i]),w)?(rt=n,ut=i,ft=r,w=!1,r&&(t.lineStart(),t.point(n,i))):r&&l?t.point(n,i):(u={a:{x:y,y:p},b:{x:n,y:i}},ct(u)?(l||(t.lineStart(),t.point(u.a.x,u.a.y)),t.point(u.b.x,u.b.y),r||t.lineEnd(),a=!1):r&&(t.lineStart(),t.point(n,i),a=!1)),y=n,p=i,l=r}var u,c,v,rt,ut,ft,y,p,l,w,a,ht=t,b=fv(),ct=ev(i,r,f,e),k={point:tt,lineStart:ot,lineEnd:st,polygonStart:function(){t=b,u=[],c=[],a=!0},polygonEnd:function(){t=ht,u=n.merge(u);var r=et([i,e]),f=a&&r,o=u.length;(f||o)&&(t.polygonStart(),f&&(t.lineStart(),g(null,null,1,t),t.lineEnd()),o&&iv(u,h,r,g,t),t.polygonEnd()),u=c=v=null}};return k}}function sv(n,t){function i(i,r){return i=n(i,r),t(i[0],i[1])}return n.invert&&t.invert&&(i.invert=function(i,r){return i=t.invert(i,r),i&&n.invert(i[0],i[1])}),i}function ss(n){var t=0,i=f/3,r=hs(n),u=r(t,i);return u.parallels=function(n){return arguments.length?r(t=n[0]*f/180,i=n[1]*f/180):[180*(t/f),180*(i/f)]},u}function hv(n,t){function f(n,t){var r=Math.sqrt(u-2*i*Math.sin(t))/i;return[r*Math.sin(n*=i),e-r*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),e=Math.sqrt(u)/i;return f.invert=function(n,t){var r=e-t;return[Math.atan2(n,r)/i,si((u-(n*n+r*r)*i*i)/(2*i))]},f}function od(){function i(i,r){ac+=t*i-n*r,n=i,t=r}var r,u,n,t;fi.point=function(f,e){fi.point=i,r=n=f,u=t=e},fi.lineEnd=function(){i(r,u)}}function sd(n,t){ye>n&&(ye=n),n>we&&(we=n),pe>t&&(pe=t),t>be&&(be=t)}function hd(){function i(n,i){t.push("M",n,",",i,u)}function f(i,r){t.push("M",i,",",r),n.point=e}function e(n,i){t.push("L",n,",",i)}function r(){n.point=i}function o(){t.push("Z")}var u=cv(4.5),t=[],n={point:i,lineStart:function(){n.point=f},lineEnd:r,polygonStart:function(){n.lineEnd=o},polygonEnd:function(){n.lineEnd=r,n.point=i},pointRadius:function(t){return u=cv(t),n},result:function(){if(t.length){var n=t.join("");return t=[],n}}};return n}function cv(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function ci(n,t){pi+=n,wi+=t,++yt}function lv(){function i(i,r){var f=i-n,e=r-t,u=Math.sqrt(f*f+e*e);ii+=u*(n+i)/2,ri+=u*(t+r)/2,ot+=u,ci(n=i,t=r)}var n,t;rt.point=function(r,u){rt.point=i,ci(n=r,t=u)}}function av(){rt.point=ci}function cd(){function i(i,r){var f=i-n,e=r-t,u=Math.sqrt(f*f+e*e);ii+=u*(n+i)/2,ri+=u*(t+r)/2,ot+=u,u=t*i-n*r,lr+=u*(n+i),ar+=u*(t+r),ui+=3*u,ci(n=i,t=r)}var r,u,n,t;rt.point=function(f,e){rt.point=i,ci(r=n=f,u=t=e)},rt.lineEnd=function(){i(r,u)}}function ld(n){function i(t,i){n.moveTo(t,i),n.arc(t,i,u,0,b)}function f(i,r){n.moveTo(i,r),t.point=e}function e(t,i){n.lineTo(t,i)}function r(){t.point=i}function o(){n.closePath()}var u=4.5,t={point:i,lineStart:function(){t.point=f},lineEnd:r,polygonStart:function(){t.lineEnd=o},polygonEnd:function(){t.lineEnd=r,t.point=i},pointRadius:function(n){return u=n,t},result:c};return t}function vv(n){function o(n){return(e?h:s)(n)}function s(t){return pv(t,function(i,r){i=n(i,r),t.point(i[0],i[1])})}function h(t){function y(i,r){i=n(i,r),t.point(i[0],i[1])}function c(){u=NaN,r.point=l,t.lineStart()}function l(r,c){var l=hi([r,c]),a=n(r,c);i(u,f,v,o,s,h,u=a[0],f=a[1],v=r,o=l[0],s=l[1],h=l[2],e,t),t.point(u,f)}function a(){r.point=y,t.lineEnd()}function nt(){c(),r.point=tt,r.lineEnd=it}function tt(n,t){l(p=n,rt=t),w=u,b=f,k=o,d=s,g=h,r.point=l}function it(){i(u,f,v,o,s,h,w,b,p,k,d,g,e,t),r.lineEnd=a,a()}var p,rt,w,b,k,d,g,v,u,f,o,s,h,r={point:y,lineStart:c,lineEnd:a,polygonStart:function(){t.polygonStart(),r.lineStart=nt},polygonEnd:function(){t.polygonEnd(),r.lineStart=c}};return r}function i(r,e,o,s,h,l,a,v,y,p,w,b,k,d){var it=a-r,rt=v-e,et=it*it+rt*rt;if(et>4*f&&k--){var nt=s+p,tt=h+w,g=l+b,ot=Math.sqrt(nt*nt+tt*tt+g*g),vt=Math.asin(g/=ot),st=u(u(g)-1)<t||u(o-y)<t?(o+y)/2:Math.atan2(tt,nt),ht=n(st,vt),ut=ht[0],ft=ht[1],ct=ut-r,lt=ft-e,at=rt*ct-it*lt;(at*at/et>f||u((it*ct+rt*lt)/et-.5)>.3||c>s*p+h*w+l*b)&&(i(r,e,o,s,h,l,ut,ft,st,nt/=ot,tt/=ot,g,k,d),d.point(ut,ft),i(ut,ft,st,nt,tt,g,a,v,y,p,w,b,k,d))}}var f=.5,c=Math.cos(30*r),e=16;return o.precision=function(n){return arguments.length?(e=(f=n*n)>0&&16,o):Math.sqrt(f)},o}function ad(n){var t=vv(function(t,i){return n([t*s,i*s])});return function(n){return wv(t(n))}}function yv(n){this.stream=n}function pv(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function dt(n){return hs(function(){return n})()}function hs(t){function i(n){return n=v(n[0]*r,n[1]*r),[n[0]*u+h,c-n[1]*u]}function et(n){return n=v.invert((n[0]-h)/u,(c-n[1])/u),n&&[n[0]*s,n[1]*s]}function e(){v=sv(tt=cs(k,d,g),o);var n=o(w,b);return h=y-n[0]*u,c=p+n[1]*u,l()}function l(){return f&&(f.valid=!1,f=null),i}var o,tt,v,h,c,f,it=vv(function(n,t){return n=o(n,t),[n[0]*u+h,c-n[1]*u]}),u=150,y=480,p=250,w=0,b=0,k=0,d=0,g=0,rt=fb,ut=a,nt=null,ft=null;return i.stream=function(n){return f&&(f.valid=!1),f=wv(rt(tt,it(ut(n)))),f.valid=!0,f},i.clipAngle=function(n){return arguments.length?(rt=null==n?(nt=n,fb):ed((nt=+n)*r),l()):nt},i.clipExtent=function(n){return arguments.length?(ft=n,ut=n?ov(n[0][0],n[0][1],n[1][0],n[1][1]):a,l()):ft},i.scale=function(n){return arguments.length?(u=+n,e()):u},i.translate=function(n){return arguments.length?(y=+n[0],p=+n[1],e()):[y,p]},i.center=function(n){return arguments.length?(w=n[0]%360*r,b=n[1]%360*r,e()):[w*s,b*s]},i.rotate=function(n){return arguments.length?(k=n[0]%360*r,d=n[1]%360*r,g=n.length>2?n[2]%360*r:0,e()):[k*s,d*s,g*s]},n.rebind(i,it,"precision"),function(){return o=t.apply(this,arguments),i.invert=o.invert&&et,e()}}function wv(n){return pv(n,function(t,i){n.point(t*r,i*r)})}function wr(n,t){return[n,t]}function bv(n,t){return[n>f?n-b:-f>n?n+b:n,t]}function cs(n,t,i){return n?t||i?sv(dv(n),gv(t,i)):dv(n):t||i?gv(t,i):bv}function kv(n){return function(t,i){return t+=n,[t>f?t-b:-f>t?t+b:t,i]}}function dv(n){var t=kv(n);return t.invert=kv(-n),t}function gv(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,s=Math.sin(n)*e,h=Math.sin(t),c=h*i+o*r;return[Math.atan2(s*u-c*f,o*i-h*r),si(c*u+s*f)]}var i=Math.cos(n),r=Math.sin(n),u=Math.cos(t),f=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,s=Math.sin(n)*e,h=Math.sin(t),c=h*u-s*f;return[Math.atan2(s*u+h*f,o*i+c*r),si(c*i-o*r)]},e}function ls(n,t){var i=Math.cos(n),r=Math.sin(n);return function(u,f,e,o){var h=e*t,c,s;for(null!=u?(u=ny(i,u),f=ny(i,f),(e>0?f>u:u>f)&&(u+=e*b)):(u=n+e*b,f=n-.5*h),s=u;e>0?s>f:f>s;s-=h)o.point((c=nf([i,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function ny(n,i){var r=hi(i),u;return r[0]-=n,gu(r),u=sa(-r[1]),((-r[2]<0?-u:u)+2*Math.PI-t)%(2*Math.PI)}function ty(i,r,u){var f=n.range(i,r-t,u).concat(r);return function(n){return f.map(function(t){return[n,t]})}}function iy(i,r,u){var f=n.range(i,r-t,u).concat(r);return function(n){return f.map(function(t){return[t,n]})}}function as(n){return n.source}function vs(n){return n.target}function vd(n,t,i,r){var f=Math.cos(t),c=Math.sin(t),e=Math.cos(r),l=Math.sin(r),a=f*Math.cos(n),v=f*Math.sin(n),y=e*Math.cos(i),p=e*Math.sin(i),u=2*Math.asin(Math.sqrt(ca(r-t)+f*e*ca(i-n))),o=1/Math.sin(u),h=u?function(n){var t=Math.sin(n*=u)*o,i=Math.sin(u-n)*o,r=i*a+t*y,f=i*v+t*p,e=i*c+t*l;return[Math.atan2(f,r)*s,Math.atan2(e,Math.sqrt(r*r+f*f))*s]}:function(){return[n*s,t*s]};return h.distance=u,h}function yd(){function f(f,e){var h=Math.sin(e*=r),s=Math.cos(e),o=u((f*=r)-i),c=Math.cos(o);vc+=Math.atan2(Math.sqrt((o=s*Math.sin(o))*o+(o=t*h-n*s*c)*o),n*h+t*s*c),i=f,n=h,t=s}var i,n,t;bi.point=function(u,e){i=u*r,n=Math.sin(e*=r),t=Math.cos(e),bi.point=f},bi.lineEnd=function(){bi.point=bi.lineEnd=c}}function br(n,t){function i(t,i){var f=Math.cos(t),r=Math.cos(i),u=n(f*r);return[u*r*Math.sin(t),u*Math.sin(i)]}return i.invert=function(n,i){var r=Math.sqrt(n*n+i*i),u=t(r),f=Math.sin(u),e=Math.cos(u);return[Math.atan2(n*f,r*e),Math.asin(r&&i*f/r)]},i}function ry(n,i){function s(n,i){var f=u(u(i)-k)<t?0:o/Math.pow(e(i),r);return[f*Math.sin(r*n),o-f*Math.cos(r*n)]}var h=Math.cos(n),e=function(n){return Math.tan(f/4+n/2)},r=n===i?Math.sin(n):Math.log(h/Math.cos(i))/Math.log(e(i)/e(n)),o=h*Math.pow(e(n),r)/r;return r?(s.invert=function(n,t){var i=o-t,u=oa(r)*Math.sqrt(n*n+i*i);return[Math.atan2(n,i)/r,2*Math.atan(Math.pow(o/u,1/r))-k]},s):uf}function uy(n,i){function e(n,t){var i=f-t;return[i*Math.sin(r*n),f-i*Math.cos(r*n)]}var o=Math.cos(n),r=n===i?Math.sin(n):(o-Math.cos(i))/(i-n),f=o/r+n;return u(r)<t?wr:(e.invert=function(n,t){var i=f-t;return[Math.atan2(n,i)/r,f-oa(r)*Math.sqrt(n*n+i*i)]},e)}function uf(n,t){return[n,Math.log(Math.tan(f/4+t/2))]}function fy(n){var i,t=dt(n),r=t.scale,u=t.translate,e=t.clipExtent;return t.scale=function(){var n=r.apply(t,arguments);return n===t?i?t.clipExtent(null):t:n},t.translate=function(){var n=u.apply(t,arguments);return n===t?i?t.clipExtent(null):t:n},t.clipExtent=function(n){var h=e.apply(t,arguments),o,s;return h===t?(i=null==n)&&(o=f*r(),s=u(),e([[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]])):i&&(h=null),h},t.clipExtent(null)}function ys(n,t){var i=Math.cos(t)*Math.sin(n);return[Math.log((1+i)/(1-i))/2,Math.atan2(Math.tan(t),Math.cos(n))]}function li(n){return n[0]}function er(n){return n[1]}function pd(n,t,i,r){var u,f,e,o,s,h,c;return u=r[n],f=u[0],e=u[1],u=r[t],o=u[0],s=u[1],u=r[i],h=u[0],c=u[1],(c-e)*(o-f)-(s-e)*(h-f)>0}function ps(n,t,i){return(i[0]-t[0])*(n[1]-t[1])<(i[1]-t[1])*(n[0]-t[0])}function ey(n,t,i,r){var u=n[0],e=i[0],o=t[0]-u,s=r[0]-e,f=n[1],h=i[1],c=t[1]-f,l=r[1]-h,a=(s*(f-h)-l*(u-e))/(l*o-s*c);return[u+a*o,f+a*c]}function oy(n){var t=n[0],i=n[n.length-1];return!(t[0]-i[0]||t[1]-i[1])}function wd(){of(this),this.edge=this.site=this.circle=null}function sy(n){var t=gc.pop()||new wd;return t.site=n,t}function ws(n){sr(n),yr.remove(n),gc.push(n),of(n)}function bd(n){var a=n.circle,o=a.x,s=a.cy,v={x:o,y:s},h=n.P,c=n.N,f=[n],r,i,e,l;for(ws(n),r=h;r.circle&&u(o-r.circle.x)<t&&u(s-r.circle.cy)<t;)h=r.P,f.unshift(r),ws(r),r=h;for(f.unshift(r),sr(r),i=c;i.circle&&u(o-i.circle.x)<t&&u(s-i.circle.cy)<t;)c=i.N,f.push(i),ws(i),i=c;for(f.push(i),sr(i),l=f.length,e=1;l>e;++e)i=f[e],r=f[e-1],ff(i.edge,r.site,i.site,v);r=f[0],i=f[l-1],i.edge=kr(r.site,i.site,null,v),or(r),or(i)}function kd(n){for(var f,i,r,a,v,b=n.x,k=n.y,u=yr._;u;)if(a=hy(u,k)-b,a>t)u=u.L;else{if(v=b-dd(u,k),!(v>t)){a>-t?(i=u.P,r=u):v>-t?(i=u,r=u.N):i=r=u;break}if(!u.R){i=u;break}u=u.R}if(f=sy(n),yr.insert(i,f),i||r){if(i===r)return sr(i),r=sy(i.site),yr.insert(f,r),f.edge=r.edge=kr(i.site,f.site),or(i),or(r),void 0;if(!r)return f.edge=kr(i.site,f.site),void 0;sr(i),sr(r);var e=i.site,y=e.x,p=e.y,o=n.x-y,s=n.y-p,h=r.site,c=h.x-y,l=h.y-p,d=2*(o*l-s*c),g=o*o+s*s,nt=c*c+l*l,w={x:(l*g-s*nt)/d+y,y:(o*nt-c*g)/d+p};ff(r.edge,e,h,w),f.edge=kr(e,n,null,w),r.edge=kr(n,h,null,w),or(i),or(r)}}function hy(n,t){var i=n.site,u=i.x,l=i.y,f=l-t,e;if(!f)return u;if(e=n.P,!e)return-1/0;i=e.site;var o=i.x,a=i.y,r=a-t;if(!r)return o;var s=o-u,h=1/f-1/r,c=s/r;return h?(-c+Math.sqrt(c*c-2*h*(s*s/(-2*r)-a+r/2+l-f/2)))/h+u:(u+o)/2}function dd(n,t){var r=n.N,i;return r?hy(r,t):(i=n.site,i.y===t?i.x:1/0)}function cy(n){this.site=n,this.edges=[]}function gd(n){for(var i,r,f,e,o,s,h,y,w,p,c=n[0][0],l=n[1][0],a=n[0][1],v=n[1][1],b=ki,k=b.length;k--;)if(o=b[k],o&&o.prepare())for(h=o.edges,y=h.length,s=0;y>s;)p=h[s].end(),f=p.x,e=p.y,w=h[++s%y].start(),i=w.x,r=w.y,(u(f-i)>t||u(e-r)>t)&&(h.splice(s,0,new ef(rg(o.site,p,u(f-c)<t&&v-e>t?{x:c,y:u(i-c)<t?r:v}:u(e-v)<t&&l-f>t?{x:u(r-v)<t?i:l,y:v}:u(f-l)<t&&e-a>t?{x:l,y:u(i-l)<t?r:a}:u(e-a)<t&&f-c>t?{x:u(r-a)<t?i:c,y:a}:null),o.site,null)),++y)}function ly(n,t){return t.angle-n.angle}function ng(){of(this),this.x=this.y=this.arc=this.site=this.cy=null}function or(n){var w=n.P,b=n.N,u,t;if(w&&b){var s=w.site,h=n.site,c=b.site;if(s!==c){var l=h.x,a=h.y,f=s.x-l,e=s.y-a,o=c.x-l,r=c.y-a,v=2*(f*r-e*o);if(!(v>=-rc)){var k=f*f+e*e,d=o*o+r*r,y=(r*k-e*d)/v,p=(f*d-o*k)/v,r=p+a,i=nl.pop()||new ng;for(i.arc=n,i.site=h,i.x=y+l,i.y=r+Math.sqrt(y*y+p*p),i.cy=r,n.circle=i,u=null,t=hu._;t;)if(i.y<t.y||i.y===t.y&&i.x<=t.x){if(!t.L){u=t.P;break}t=t.L}else{if(!t.R){u=t;break}t=t.R}hu.insert(u,i),u||(dc=i)}}}}function sr(n){var t=n.circle;t&&(t.P||(dc=t.N),hu.remove(t),nl.push(t),of(t),n.circle=null)}function tg(n){for(var i,r=vr,e=ev(n[0][0],n[0][1],n[1][0],n[1][1]),f=r.length;f--;)i=r[f],(!ig(i,n)||!e(i)||u(i.a.x-i.b.x)<t&&u(i.a.y-i.b.y)<t)&&(i.a=i.b=null,r.splice(f,1))}function ig(n,t){var f=n.b;if(f)return!0;var r,u,i=n.a,h=t[0][0],c=t[1][0],e=t[0][1],o=t[1][1],p=n.l,w=n.r,l=p.x,a=p.y,v=w.x,y=w.y,s=(l+v)/2,b=(a+y)/2;if(y===a){if(h>s||s>=c)return;if(l>v){if(i){if(i.y>=o)return}else i={x:s,y:e};f={x:s,y:o}}else{if(i){if(i.y<e)return}else i={x:s,y:o};f={x:s,y:e}}}else if(r=(l-v)/(y-a),u=b-r*s,-1>r||r>1)if(l>v){if(i){if(i.y>=o)return}else i={x:(e-u)/r,y:e};f={x:(o-u)/r,y:o}}else{if(i){if(i.y<e)return}else i={x:(o-u)/r,y:o};f={x:(e-u)/r,y:e}}else if(y>a){if(i){if(i.x>=c)return}else i={x:h,y:r*h+u};f={x:c,y:r*c+u}}else{if(i){if(i.x<h)return}else i={x:c,y:r*c+u};f={x:h,y:r*h+u}}return n.a=i,n.b=f,!0}function ay(n,t){this.l=n,this.r=t,this.a=this.b=null}function kr(n,t,i,r){var u=new ay(n,t);return vr.push(u),i&&ff(u,n,t,i),r&&ff(u,t,n,r),ki[n.i].edges.push(new ef(u,n,t)),ki[t.i].edges.push(new ef(u,t,n)),u}function rg(n,t,i){var r=new ay(n,null);return r.a=t,r.b=i,vr.push(r),r}function ff(n,t,i,r){n.a||n.b?n.l===i?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=i)}function ef(n,t,i){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=i?Math.atan2(i.y-t.y,i.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function bs(){this._=null}function of(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function dr(n,t){var i=t,r=t.R,u=i.U;u?u.L===i?u.L=r:u.R=r:n._=r,r.U=u,i.U=r,i.R=r.L,i.R&&(i.R.U=i),r.L=i}function gr(n,t){var i=t,r=t.L,u=i.U;u?u.L===i?u.L=r:u.R=r:n._=r,r.U=u,i.U=r,i.L=r.R,i.L&&(i.L.U=i),r.R=i}function vy(n){for(;n.L;)n=n.L;return n}function ks(n,t){var u,f,r,i=n.sort(ug).pop(),e;for(vr=[],ki=new Array(n.length),yr=new bs,hu=new bs;;)if(r=dc,i&&(!r||i.y<r.y||i.y===r.y&&i.x<r.x))(i.x!==u||i.y!==f)&&(ki[i.i]=new cy(i),kd(i),u=i.x,f=i.y),i=n.pop();else{if(!r)break;bd(r.arc)}return t&&(tg(t),gd(t)),e={cells:ki,edges:vr},yr=hu=vr=ki=null,e}function ug(n,t){return t.y-n.y||t.x-n.x}function fg(n,t,i){return(n.x-i.x)*(t.y-n.y)-(n.x-t.x)*(i.y-n.y)}function eg(n){return n.x}function og(n){return n.y}function yy(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function nu(n,t,i,r,u,f){if(!n(t,i,r,u,f)){var o=.5*(i+u),s=.5*(r+f),e=t.nodes;e[0]&&nu(n,e[0],i,r,o,s),e[1]&&nu(n,e[1],o,r,u,s),e[2]&&nu(n,e[2],i,s,o,f),e[3]&&nu(n,e[3],o,s,u,f)}}function ds(t,i){t=n.rgb(t),i=n.rgb(i);var r=t.r,u=t.g,f=t.b,e=i.r-r,o=i.g-u,s=i.b-f;return function(n){return"#"+rr(Math.round(r+e*n))+rr(Math.round(u+o*n))+rr(Math.round(f+s*n))}}function py(n,t){var i,u={},r={};for(i in n)i in t?u[i]=ai(n[i],t[i]):r[i]=n[i];for(i in t)i in n||(r[i]=t[i]);return function(n){for(i in u)r[i]=u[i](n);return r}}function ht(n,t){return t-=n=+n,function(i){return n+t*i}}function wy(n,t){var s,u,f,o,i,h=0,c=0,r=[],e=[];for(n+="",t+="",lu.lastIndex=0,u=0;s=lu.exec(t);++u)s.index&&r.push(t.substring(h,c=s.index)),e.push({i:r.length,x:s[0]}),r.push(null),h=lu.lastIndex;for(h<t.length&&r.push(t.substring(h)),u=0,o=e.length;(s=lu.exec(n))&&o>u;++u)if(i=e[u],i.x==s[0]){if(i.i)if(null==r[i.i+1])for(r[i.i-1]+=i.x,r.splice(i.i,1),f=u+1;o>f;++f)e[f].i--;else for(r[i.i-1]+=i.x+r[i.i+1],r.splice(i.i,2),f=u+1;o>f;++f)e[f].i-=2;else if(null==r[i.i+1])r[i.i]=i.x;else for(r[i.i]=i.x+r[i.i+1],r.splice(i.i+1,1),f=u+1;o>f;++f)e[f].i--;e.splice(u,1),o--,u--}else i.x=ht(parseFloat(s[0]),parseFloat(i.x));for(;o>u;)i=e.pop(),null==r[i.i+1]?r[i.i]=i.x:(r[i.i]=i.x+r[i.i+1],r.splice(i.i+1,1)),o--;return 1===r.length?null==r[0]?(i=e[0].x,function(n){return i(n)+""}):function(){return t}:function(n){for(u=0;o>u;++u)r[(i=e[u]).i]=i.x(n);return r.join("")}}function ai(t,i){for(var r,u=n.interpolators.length;--u>=0&&!(r=n.interpolators[u](t,i)););return r}function sf(n,t){for(var u=[],r=[],e=n.length,o=t.length,f=Math.min(n.length,t.length),i=0;f>i;++i)u.push(ai(n[i],t[i]));for(;e>i;++i)r[i]=n[i];for(;o>i;++i)r[i]=t[i];return function(n){for(i=0;f>i;++i)r[i]=u[i](n);return r}}function sg(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function by(n){return function(t){return 1-n(1-t)}}function ky(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function hg(n){return n*n}function cg(n){return n*n*n}function lg(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,i=t*n;return 4*(.5>n?i:3*(n-t)+i-.75)}function ag(n){return function(t){return Math.pow(t,n)}}function vg(n){return 1-Math.cos(n*k)}function yg(n){return Math.pow(2,10*(n-1))}function pg(n){return 1-Math.sqrt(1-n*n)}function wg(n,t){var i;return arguments.length<2&&(t=.45),arguments.length?i=t/b*Math.asin(1/n):(n=1,i=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-i)*b/t)}}function bg(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function kg(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function dg(t,i){t=n.hcl(t),i=n.hcl(i);var u=t.h,f=t.c,o=t.l,r=i.h-u,e=i.c-f,s=i.l-o;return isNaN(e)&&(e=0,f=isNaN(f)?i.c:f),isNaN(r)?(r=0,u=isNaN(u)?i.h:u):r>180?r-=360:-180>r&&(r+=360),function(n){return vo(u+r*n,f+e*n,o+s*n)+""}}function gg(t,i){t=n.hsl(t),i=n.hsl(i);var u=t.h,f=t.s,o=t.l,r=i.h-u,e=i.s-f,s=i.l-o;return isNaN(e)&&(e=0,f=isNaN(f)?i.s:f),isNaN(r)?(r=0,u=isNaN(u)?i.h:u):r>180?r-=360:-180>r&&(r+=360),function(n){return ao(u+r*n,f+e*n,o+s*n)+""}}function nn(t,i){t=n.lab(t),i=n.lab(i);var r=t.l,u=t.a,f=t.b,e=i.l-r,o=i.a-u,s=i.b-f;return function(n){return la(r+e*n,u+o*n,f+s*n)+""}}function dy(n,t){return t-=n,function(i){return Math.round(n+t*i)}}function gy(n){var t=[n.a,n.b],i=[n.c,n.d],r=tp(t),u=np(t,i),f=tp(tn(i,t,-u))||0;t[0]*i[1]<i[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-i[0],i[1]))*s,this.translate=[n.e,n.f],this.scale=[r,f],this.skew=f?Math.atan2(u,f)*s:0}function np(n,t){return n[0]*t[0]+n[1]*t[1]}function tp(n){var t=Math.sqrt(np(n,n));return t&&(n[0]/=t,n[1]/=t),t}function tn(n,t,i){return n[0]+=i*t[0],n[1]+=i*t[1],n}function ip(t,i){var s,r=[],o=[],c=n.transform(t),l=n.transform(i),a=c.translate,u=l.translate,h=c.rotate,f=l.rotate,p=c.skew,v=l.skew,y=c.scale,e=l.scale;return a[0]!=u[0]||a[1]!=u[1]?(r.push("translate(",null,",",null,")"),o.push({i:1,x:ht(a[0],u[0])},{i:3,x:ht(a[1],u[1])})):u[0]||u[1]?r.push("translate("+u+")"):r.push(""),h!=f?(h-f>180?f+=360:f-h>180&&(h+=360),o.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:ht(h,f)})):f&&r.push(r.pop()+"rotate("+f+")"),p!=v?o.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:ht(p,v)}):v&&r.push(r.pop()+"skewX("+v+")"),y[0]!=e[0]||y[1]!=e[1]?(s=r.push(r.pop()+"scale(",null,",",null,")"),o.push({i:s-4,x:ht(y[0],e[0])},{i:s-2,x:ht(y[1],e[1])})):(1!=e[0]||1!=e[1])&&r.push(r.pop()+"scale("+e+")"),s=o.length,function(n){for(var t,i=-1;++i<s;)r[(t=o[i]).i]=t.x(n);return r.join("")}}function rn(n,t){return t=t-(n=+n)?1/(t-n):0,function(i){return(i-n)*t}}function un(n,t){return t=t-(n=+n)?1/(t-n):0,function(i){return Math.max(0,Math.min(1,(i-n)*t))}}function fn(n){for(var f,t=n.source,i=n.target,u=en(t,i),r=[t];t!==u;)t=t.parent,r.push(t);for(f=r.length;i!==u;)r.splice(f,0,i),i=i.parent;return r}function rp(n){for(var i=[],t=n.parent;null!=t;)i.push(n),n=t,t=t.parent;return i.push(n),i}function en(n,t){if(n===t)return n;for(var r=rp(n),u=rp(t),i=r.pop(),f=u.pop(),e=null;i===f;)e=i,i=r.pop(),f=u.pop();return e}function on(n){n.fixed|=2}function sn(n){n.fixed&=-7}function hn(n){n.fixed|=4,n.px=n.x,n.py=n.y}function cn(n){n.fixed&=-5}function up(n,t,i){var f=0,e=0,u;if(n.charge=0,!n.leaf)for(var r,o=n.nodes,h=o.length,s=-1;++s<h;)r=o[s],null!=r&&(up(r,t,i),n.charge+=r.charge,f+=r.charge*r.cx,e+=r.charge*r.cy);n.point&&(n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5),u=t*i[n.point.index],n.charge+=n.pointCharge=u,f+=u*n.point.x,e+=u*n.point.y),n.cx=f/n.charge,n.cy=e/n.charge}function tu(t,i){return n.rebind(t,i,"sort","children","value"),t.nodes=t,t.links=yn,t}function ln(n){return n.children}function an(n){return n.value}function vn(n,t){return t.value-n.value}function yn(t){return n.merge(t.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function pn(n){return n.x}function wn(n){return n.y}function bn(n,t,i){n.y0=t,n.y=i}function gs(t){return n.range(t.length)}function nh(n){for(var t=-1,r=n[0].length,i=[];++t<r;)i[t]=0;return i}function kn(n){for(var i,t=1,r=0,u=n[0][1],f=n.length;f>t;++t)(i=n[t][1])>u&&(r=t,u=i);return r}function dn(n){return n.reduce(gn,0)}function gn(n,t){return n+t[1]}function ntt(n,t){return fp(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function fp(n,t){for(var i=-1,r=+n[0],f=(n[1]-r)/t,u=[];++i<=t;)u[i]=f*i+r;return u}function ttt(t){return[n.min(t),n.max(t)]}function ep(n,t){return n.parent==t.parent?1:2}function th(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function ih(n){var i,t=n.children;return t&&(i=t.length)?t[i-1]:n._tree.thread}function hf(n,t){var i=n.children,u,f,r;if(i&&(f=i.length))for(r=-1;++r<f;)t(u=hf(i[r],t),n)>0&&(n=u);return n}function itt(n,t){return n.x-t.x}function rtt(n,t){return t.x-n.x}function utt(n,t){return n.depth-t.depth}function ct(n,t){function i(n,r){var u=n.children,f,s,e,o;if(u&&(s=u.length))for(e=null,o=-1;++o<s;)f=u[o],i(f,e),e=f;t(n,r)}i(n,null)}function ftt(n){for(var t,i=0,f=0,r=n.children,u=r.length;--u>=0;)t=r[u]._tree,t.prelim+=i,t.mod+=i,i+=t.shift+(f+=t.change)}function ett(n,t,i){n=n._tree,t=t._tree;var r=i/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=i,t.prelim+=i,t.mod+=i}function ott(n,t,i){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:i}function stt(n,t){return n.value-t.value}function rh(n,t){var i=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=i,i._pack_prev=t}function op(n,t){n._pack_next=t,t._pack_prev=n}function sp(n,t){var i=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>i*i+r*r}function hp(n){function h(n){c=Math.min(n.x-n.r,c),l=Math.max(n.x+n.r,l),a=Math.min(n.y-n.r,a),v=Math.max(n.y+n.r,v)}if((u=n.children)&&(s=u.length)){var u,i,r,t,f,e,o,s,c=1/0,l=-1/0,a=1/0,v=-1/0;if(u.forEach(htt),i=u[0],i.x=-i.r,i.y=0,h(i),s>1&&(r=u[1],r.x=r.r,r.y=0,h(r),s>2))for(t=u[2],lp(i,r,t),h(t),rh(i,t),i._pack_prev=t,rh(t,r),r=i._pack_next,f=3;s>f;f++){lp(i,r,t=u[f]);var y=0,p=1,w=1;for(e=r._pack_next;e!==r;e=e._pack_next,p++)if(sp(e,t)){y=1;break}if(1==y)for(o=i._pack_prev;o!==e._pack_prev&&!sp(o,t);o=o._pack_prev,w++);y?(w>p||p==w&&r.r<i.r?op(i,r=e):op(i=o,r),f--):(rh(i,t),r=t,h(t))}var k=(c+l)/2,d=(a+v)/2,b=0;for(f=0;s>f;f++)t=u[f],t.x-=k,t.y-=d,b=Math.max(b,t.r+Math.sqrt(t.x*t.x+t.y*t.y));n.r=b,u.forEach(ctt)}}function htt(n){n._pack_next=n._pack_prev=n}function ctt(n){delete n._pack_next,delete n._pack_prev}function cp(n,t,i,r){var u=n.children,f,e;if(n.x=t+=r*n.x,n.y=i+=r*n.y,n.r*=r,u)for(f=-1,e=u.length;++f<e;)cp(u[f],t,i,r)}function lp(n,t,i){var r=n.r+i.r,f=t.x-n.x,e=t.y-n.y,u,o,s,h;r&&(f||e)?(u=t.r+i.r,o=f*f+e*e,u*=u,r*=r,s=.5+(r-u)/(2*o),h=Math.sqrt(Math.max(0,2*u*(r+o)-(r-=o)*r-u*u))/(2*o),i.x=n.x+s*f+h*e,i.y=n.y+s*e-h*f):(i.x=n.x+r,i.y=n.y)}function ltt(t){return 1+n.max(t,function(n){return n.y})}function att(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function ap(n){var t=n.children;return t&&t.length?ap(t[0]):n}function vp(n){var i,t=n.children;return t&&(i=t.length)?vp(t[i-1]):n}function uh(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function yp(n,t){var u=n.x+t[3],f=n.y+t[0],i=n.dx-t[1]-t[3],r=n.dy-t[0]-t[2];return 0>i&&(u+=i/2,i=0),0>r&&(f+=r/2,r=0),{x:u,y:f,dx:i,dy:r}}function hr(n){var t=n[0],i=n[n.length-1];return i>t?[t,i]:[i,t]}function cf(n){return n.rangeExtent?n.rangeExtent():hr(n.range())}function vtt(n,t,i,r){var u=i(n[0],n[1]),f=r(t[0],t[1]);return function(n){return f(u(n))}}function fh(n,t){var i,r=0,u=n.length-1,f=n[r],e=n[u];return f>e&&(i=r,r=u,u=i,i=f,f=e,e=i),n[r]=t.floor(f),n[u]=t.ceil(e),n}function ytt(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ab}function ptt(t,i,r,u){var o=[],s=[],f=0,e=Math.min(t.length,i.length)-1;for(t[e]<t[0]&&(t=t.slice().reverse(),i=i.slice().reverse());++f<=e;)o.push(r(t[f-1],t[f])),s.push(u(i[f-1],i[f]));return function(i){var r=n.bisect(t,i,1,e)-1;return s[r](o[r](i))}}function pp(n,t,i,r){function f(){var f=Math.min(n.length,t.length)>2?ptt:vtt,s=r?un:rn;return e=f(n,t,s,i),o=f(t,n,s,ai),u}function u(n){return e(n)}var e,o;return u.invert=function(n){return o(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),f()):n},u.range=function(n){return arguments.length?(t=n,f()):t},u.rangeRound=function(n){return u.range(n).interpolate(dy)},u.clamp=function(n){return arguments.length?(r=n,f()):r},u.interpolate=function(n){return arguments.length?(i=n,f()):i},u.ticks=function(t){return oh(n,t)},u.tickFormat=function(t,i){return sh(n,t,i)},u.nice=function(t){return wp(n,t),f()},u.copy=function(){return pp(n,t,i,r)},f()}function eh(t,i){return n.rebind(t,i,"range","rangeRound","interpolate","clamp")}function wp(n,t){return fh(n,ytt(iu(n,t)[2]))}function iu(n,t){null==t&&(t=10);var r=hr(n),f=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(f/t)/Math.LN10)),u=t/f*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function oh(t,i){return n.range.apply(n,iu(t,i))}function sh(t,i,r){var u=iu(t,i);return n.format(r?r.replace(rb,function(n,t,i,r,f,e,o,s,h,c){return[t,i,r,f,e,o,s,h||"."+wtt(c,u),c].join("")}):",."+hh(u[2])+"f")}function hh(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function wtt(n,t){var i=hh(t[2]);return n in vb?Math.abs(i-hh(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):i-2*("%"===n)}function bp(t,i,r,u){function e(n){return(r?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(i)}function o(n){return r?Math.pow(i,n):-Math.pow(i,-n)}function f(n){return t(e(n))}return f.invert=function(n){return o(t.invert(n))},f.domain=function(n){return arguments.length?(r=n[0]>=0,t.domain((u=n.map(Number)).map(e)),f):u},f.base=function(n){return arguments.length?(i=+n,t.domain(u.map(e)),f):i},f.nice=function(){var n=fh(u.map(e),r?Math:yb);return t.domain(n),u=n.map(o),f},f.ticks=function(){var h=hr(u),t=[],c=h[0],l=h[1],n=Math.floor(e(c)),s=Math.ceil(e(l)),a=i%1?2:i,f;if(isFinite(s-n)){if(r){for(;s>n;n++)for(f=1;a>f;f++)t.push(o(n)*f);t.push(o(n))}else for(t.push(o(n));n++<s;)for(f=a-1;f>0;f--)t.push(o(n)*f);for(n=0;t[n]<c;n++);for(s=t.length;t[s-1]>l;s--);t=t.slice(n,s)}return t},f.tickFormat=function(t,i){if(!arguments.length)return il;arguments.length<2?i=il:"function"!=typeof i&&(i=n.format(i));var u,s=Math.max(.1,t/f.ticks().length),h=r?(u=1e-12,Math.ceil):(u=-1e-12,Math.floor);return function(n){return n/o(h(e(n)+u))<=s?i(n):""}},f.copy=function(){return bp(t.copy(),i,r,u)},eh(f,t)}function kp(n,t,i){function r(t){return n(u(t))}var u=lf(t),f=lf(1/t);return r.invert=function(t){return f(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((i=t.map(Number)).map(u)),r):i},r.ticks=function(n){return oh(i,n)},r.tickFormat=function(n,t){return sh(i,n,t)},r.nice=function(n){return r.domain(wp(i,n))},r.exponent=function(e){return arguments.length?(u=lf(t=e),f=lf(1/t),n.domain(i.map(u)),r):t},r.copy=function(){return kp(n.copy(),t,i)},eh(r,n)}function lf(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function dp(t,i){function r(n){return u[((f.get(n)||"range"===i.t&&f.set(n,t.push(n)))-1)%u.length]}function o(i,r){return n.range(t.length).map(function(n){return i+r*n})}var f,u,e;return r.domain=function(n){if(!arguments.length)return t;t=[],f=new ut;for(var u,e=-1,o=n.length;++e<o;)f.has(u=n[e])||f.set(u,t.push(u));return r[i.t].apply(r,i.a)},r.range=function(n){return arguments.length?(u=n,e=0,i={t:"range",a:arguments},r):u},r.rangePoints=function(n,f){arguments.length<2&&(f=0);var s=n[0],h=n[1],c=(h-s)/(Math.max(1,t.length-1)+f);return u=o(t.length<2?(s+h)/2:s+c*f/2,c),e=0,i={t:"rangePoints",a:arguments},r},r.rangeBands=function(n,f,s){arguments.length<2&&(f=0),arguments.length<3&&(s=f);var h=n[1]<n[0],l=n[+h],a=n[1-h],c=(a-l)/(t.length-f+2*s);return u=o(l+c*s,c),h&&u.reverse(),e=c*(1-f),i={t:"rangeBands",a:arguments},r},r.rangeRoundBands=function(n,f,s){arguments.length<2&&(f=0),arguments.length<3&&(s=f);var h=n[1]<n[0],c=n[+h],a=n[1-h],l=Math.floor((a-c)/(t.length-f+2*s)),v=a-c-(t.length-f)*l;return u=o(c+Math.round(v/2),l),h&&u.reverse(),e=Math.round(l*(1-f)),i={t:"rangeRoundBands",a:arguments},r},r.rangeBand=function(){return e},r.rangeExtent=function(){return hr(i.a[0])},r.copy=function(){return dp(t,i)},r.domain(t)}function gp(t,i){function f(){var f=0,e=i.length;for(r=[];++f<e;)r[f-1]=n.quantile(t,f/e);return u}function u(t){if(!isNaN(t=+t))return i[n.bisect(r,t)]}var r;return u.domain=function(i){return arguments.length?(t=i.filter(function(n){return!isNaN(n)}).sort(n.ascending),f()):t},u.range=function(n){return arguments.length?(i=n,f()):i},u.quantiles=function(){return r},u.invertExtent=function(n){return n=i.indexOf(n),0>n?[NaN,NaN]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},u.copy=function(){return gp(t,i)},f()}function nw(n,t,i){function r(t){return i[Math.max(0,Math.min(e,Math.floor(u*(t-n))))]}function f(){return u=i.length/(t-n),e=i.length-1,r}var u,e;return r.domain=function(i){return arguments.length?(n=+i[0],t=+i[i.length-1],f()):[n,t]},r.range=function(n){return arguments.length?(i=n,f()):i},r.invertExtent=function(t){return t=i.indexOf(t),t=0>t?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return nw(n,t,i)},f()}function tw(t,i){function r(r){if(r>=r)return i[n.bisect(t,r)]}return r.domain=function(n){return arguments.length?(t=n,r):t},r.range=function(n){return arguments.length?(i=n,r):i},r.invertExtent=function(n){return n=i.indexOf(n),[t[n-1],t[n]]},r.copy=function(){return tw(t,i)},r}function iw(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(n=i.map(t),t):n},t.ticks=function(t){return oh(n,t)},t.tickFormat=function(t,i){return sh(n,t,i)},t.copy=function(){return iw(n)},t}function btt(n){return n.innerRadius}function ktt(n){return n.outerRadius}function rw(n){return n.startAngle}function uw(n){return n.endAngle}function fw(n){function t(t){function a(){l.push("M",i(n(s),e))}for(var c,l=[],s=[],h=-1,v=t.length,y=o(r),p=o(u);++h<v;)f.call(this,c=t[h],h)?s.push([+y.call(this,c,h),+p.call(this,c,h)]):s.length&&(a(),s=[]);return s.length&&a(),l.length?l.join(""):null}var r=li,u=er,f=fr,i=g,s=i.key,e=.7;return t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(f=n,t):f},t.interpolate=function(n){return arguments.length?(s="function"==typeof n?i=n:(i=ke.get(n)||g).key,t):s},t.tension=function(n){return arguments.length?(e=n,t):e},t}function g(n){return n.join("L")}function dtt(n){return g(n)+"Z"}function gtt(n){for(var r=0,u=n.length,t=n[0],i=[t[0],",",t[1]];++r<u;)i.push("H",(t[0]+(t=n[r])[0])/2,"V",t[1]);return u>1&&i.push("H",t[0]),i.join("")}function ch(n){for(var i=0,u=n.length,t=n[0],r=[t[0],",",t[1]];++i<u;)r.push("V",(t=n[i])[1],"H",t[0]);return r.join("")}function lh(n){for(var i=0,u=n.length,t=n[0],r=[t[0],",",t[1]];++i<u;)r.push("H",(t=n[i])[0],"V",t[1]);return r.join("")}function nit(n,t){return n.length<4?g(n):n[1]+af(n.slice(1,n.length-1),ah(n,t))}function tit(n,t){return n.length<3?g(n):n[0]+af((n.push(n[0]),n),ah([n[n.length-2]].concat(n,[n[1]]),t))}function iit(n,t){return n.length<3?g(n):n[0]+af(n,ah(n,t))}function af(n,t){var o,h;if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return g(n);var c=n.length!=t.length,f="",s=n[0],i=n[1],e=t[0],r=e,u=1;if(c&&(f+="Q"+(i[0]-2*e[0]/3)+","+(i[1]-2*e[1]/3)+","+i[0]+","+i[1],s=n[1],u=2),t.length>1)for(r=t[1],i=n[u],u++,f+="C"+(s[0]+e[0])+","+(s[1]+e[1])+","+(i[0]-r[0])+","+(i[1]-r[1])+","+i[0]+","+i[1],o=2;o<t.length;o++,u++)i=n[u],r=t[o],f+="S"+(i[0]-r[0])+","+(i[1]-r[1])+","+i[0]+","+i[1];return c&&(h=n[u],f+="Q"+(i[0]+2*r[0]/3)+","+(i[1]+2*r[1]/3)+","+h[0]+","+h[1]),f}function ah(n,t){for(var r,u=[],f=(1-t)/2,e=n[0],i=n[1],o=1,s=n.length;++o<s;)r=e,e=i,i=n[o],u.push([f*(i[0]-r[0]),f*(i[1]-r[1])]);return u}function ew(n){if(n.length<3)return g(n);var o=1,s=n.length,t=n[0],i=t[0],r=t[1],u=[i,i,i,(t=n[1])[0]],f=[r,r,r,t[1]],e=[i,",",r,"L",nt(oi,u),",",nt(oi,f)];for(n.push(n[s-1]);++o<=s;)t=n[o],u.shift(),u.push(t[0]),f.shift(),f.push(t[1]),vh(e,u,f);return n.pop(),e.push("L",t),e.join("")}function rit(n){if(n.length<4)return g(n);for(var t,f=[],i=-1,e=n.length,r=[0],u=[0];++i<3;)t=n[i],r.push(t[0]),u.push(t[1]);for(f.push(nt(oi,r)+","+nt(oi,u)),--i;++i<e;)t=n[i],r.shift(),r.push(t[0]),u.shift(),u.push(t[1]),vh(f,r,u);return f.join("")}function uit(n){for(var f,t,i=-1,e=n.length,o=e+4,r=[],u=[];++i<4;)t=n[i%e],r.push(t[0]),u.push(t[1]);for(f=[nt(oi,r),",",nt(oi,u)],--i;++i<o;)t=n[i%e],r.shift(),r.push(t[0]),u.shift(),u.push(t[1]),vh(f,r,u);return f.join("")}function fit(n,t){var i=n.length-1;if(i)for(var r,u,e=n[0][0],o=n[0][1],s=n[i][0]-e,h=n[i][1]-o,f=-1;++f<=i;)r=n[f],u=f/i,r[0]=t*r[0]+(1-t)*(e+u*s),r[1]=t*r[1]+(1-t)*(o+u*h);return ew(n)}function nt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function vh(n,t,i){n.push("C",nt(wb,t),",",nt(wb,i),",",nt(bb,t),",",nt(bb,i),",",nt(oi,t),",",nt(oi,i))}function yh(n,t){return(t[1]-n[1])/(t[0]-n[0])}function eit(n){for(var t=0,e=n.length-1,i=[],f=n[0],r=n[1],u=i[0]=yh(f,r);++t<e;)i[t]=(u+(u=yh(f=r,r=n[t+1])))/2;return i[t]=u,i}function oit(n){for(var e,o,s,r,c=[],f=eit(n),i=-1,h=n.length-1;++i<h;)e=yh(n[i],n[i+1]),u(e)<t?f[i]=f[i+1]=0:(o=f[i]/e,s=f[i+1]/e,r=o*o+s*s,r>9&&(r=3*e/Math.sqrt(r),f[i]=r*o,f[i+1]=r*s));for(i=-1;++i<=h;)r=(n[Math.min(h,i+1)][0]-n[Math.max(0,i-1)][0])/(6*(1+f[i]*f[i])),c.push([r||0,f[i]*r||0]);return c}function sit(n){return n.length<3?g(n):n[0]+af(n,oit(n))}function ow(n){for(var t,i,r,u=-1,f=n.length;++u<f;)t=n[u],i=t[0],r=t[1]+ei,t[0]=i*Math.cos(r),t[1]=i*Math.sin(r);return n}function sw(n){function t(t){function b(){p.push("M",i(n(w),s),a,l(n(y.reverse()),s),"Z")}for(var v,k,d,p=[],y=[],w=[],c=-1,g=t.length,nt=o(f),tt=o(e),it=f===r?function(){return k}:o(r),rt=e===u?function(){return d}:o(u);++c<g;)h.call(this,v=t[c],c)?(y.push([k=+nt.call(this,v,c),d=+tt.call(this,v,c)]),w.push([+it.call(this,v,c),+rt.call(this,v,c)])):y.length&&(b(),y=[],w=[]);return y.length&&b(),p.length?p.join(""):null}var f=li,r=li,e=0,u=er,h=fr,i=g,c=i.key,l=i,a="L",s=.7;return t.x=function(n){return arguments.length?(f=r=n,t):r},t.x0=function(n){return arguments.length?(f=n,t):f},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(e=u=n,t):u},t.y0=function(n){return arguments.length?(e=n,t):e},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(h=n,t):h},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?i=n:(i=ke.get(n)||g).key,l=i.reverse||i,a=i.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(s=n,t):s},t}function hit(n){return n.radius}function hw(n){return[n.x,n.y]}function cit(n){return function(){var t=n.apply(this,arguments),i=t[0],r=t[1]+ei;return[i*Math.cos(r),i*Math.sin(r)]}}function lit(){return 64}function ait(){return"circle"}function cw(n){var t=Math.sqrt(n/f);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function ru(n,t){return kf(n,l),n.id=t,n}function ph(n,t,i,r){var u=n.id;return kt(n,"function"==typeof i?function(n,f,e){n.__transition__[u].tween.set(t,r(i.call(n,n.__data__,f,e)))}:(i=r(i),function(n){n.__transition__[u].tween.set(t,i)}))}function vit(n){return null==n&&(n=""),function(){this.textContent=n}}function vf(t,i,r,u){var e=t.__transition__||(t.__transition__={active:0,count:0}),f=e[r],o;f||(o=u.time,f=e[r]={tween:new ut,time:o,ease:u.ease,delay:u.delay,duration:u.duration},++e.count,n.timer(function(u){function v(u){return e.active>r?s():(e.active=r,f.event&&f.event.start.call(t,h,i),f.tween.forEach(function(n,r){(r=r.call(t,h,i))&&a.push(r)}),n.timer(function(){return l.c=y(u||1)?fr:y,1},0,o),void 0)}function y(n){if(e.active!==r)return s();for(var u=n/w,c=p(u),o=a.length;o>0;)a[--o].call(t,c);if(u>=1)return f.event&&f.event.end.call(t,h,i),s()}function s(){return--e.count?delete e[r]:delete t.__transition__,1}var h=t.__data__,p=f.ease,c=f.delay,w=f.duration,l=vt,a=[];return l.t=c+o,u>=c?v(u-c):(l.c=v,void 0)},0,o))}function lw(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function aw(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function lt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function vi(n,t,i){function e(t){var i=n(t),r=f(i,1);return r-t>t-i?i:r}function u(i){return t(i=n(new y(i-1)),1),i}function f(n,i){return t(n=new y(+n),i),n}function o(n,r,f){var e=u(n),o=[];if(f>1)for(;r>e;)i(e)%f||o.push(new Date(+e)),t(e,1);else for(;r>e;)o.push(new Date(+e)),t(e,1);return o}function s(n,t,i){try{y=lt;var r=new lt;return r._=n,o(r,t,i)}finally{y=Date}}n.floor=n,n.round=e,n.ceil=u,n.offset=f,n.range=o;var r=n.utc=yf(n);return r.floor=r,r.round=yf(e),r.ceil=yf(u),r.offset=yf(f),r.range=s,n}function yf(n){return function(t,i){try{y=lt;var r=new lt;return r._=t,n(r,i)._}finally{y=Date}}}function p(n){function t(t){for(var u,e,s,f=[],r=-1,o=0;++r<i;)37===n.charCodeAt(r)&&(f.push(n.substring(o,r)),null!=(e=fk[u=n.charAt(++r)])&&(u=n.charAt(++r)),(s=no[u])&&(u=s(t,null==e?"e"===u?" ":"0":e)),f.push(u),o=r+1);return f.push(n.substring(o,r)),f.join("")}var i=n.length;return t.parse=function(t){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},f=pf(i,n,t,0),u,r;return f!=t.length?null:("p"in i&&(i.H=i.H%12+12*i.p),u=null!=i.Z&&y!==lt,r=new(u?lt:y),"j"in i?r.setFullYear(i.y,0,i.j):"w"in i&&("W"in i||"U"in i)?(r.setFullYear(i.y,0,1),r.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(r.getDay()+5)%7:i.w+7*i.U-(r.getDay()+6)%7)):r.setFullYear(i.y,i.m,i.d),r.setHours(i.H+Math.floor(i.Z/100),i.M+i.Z%100,i.S,i.L),u?r._:r)},t.toString=function(){return n},t}function pf(n,t,i,r){for(var f,e,o,u=0,s=t.length,h=i.length;s>u;){if(r>=h)return-1;if(f=t.charCodeAt(u++),37===f){if(o=t.charAt(u++),e=dut[o in fk?t.charAt(u++):o],!e||(r=e(n,i,r))<0)return-1}else if(f!=i.charCodeAt(r++))return-1}return r}function wf(t){return new RegExp("^(?:"+t.map(n.requote).join("|")+")","i")}function bf(n){for(var i=new ut,t=-1,r=n.length;++t<r;)i.set(n[t].toLowerCase(),t);return i}function w(n,t,i){var u=0>n?"-":"",r=(u?-n:n)+"",f=r.length;return u+(i>f?new Array(i-f+1).join(t)+r:r)}function yit(n,t,i){tk.lastIndex=0;var r=tk.exec(t.substring(i));return r?(n.w=wut.get(r[0].toLowerCase()),i+r[0].length):-1}function pit(n,t,i){nk.lastIndex=0;var r=nk.exec(t.substring(i));return r?(n.w=put.get(r[0].toLowerCase()),i+r[0].length):-1}function wit(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+1));return r?(n.w=+r[0],i+r[0].length):-1}function bit(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i));return r?(n.U=+r[0],i+r[0].length):-1}function kit(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i));return r?(n.W=+r[0],i+r[0].length):-1}function dit(n,t,i){rk.lastIndex=0;var r=rk.exec(t.substring(i));return r?(n.m=kut.get(r[0].toLowerCase()),i+r[0].length):-1}function git(n,t,i){ik.lastIndex=0;var r=ik.exec(t.substring(i));return r?(n.m=but.get(r[0].toLowerCase()),i+r[0].length):-1}function nrt(n,t,i){return pf(n,no.c.toString(),t,i)}function trt(n,t,i){return pf(n,no.x.toString(),t,i)}function irt(n,t,i){return pf(n,no.X.toString(),t,i)}function rrt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+4));return r?(n.y=+r[0],i+r[0].length):-1}function urt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.y=ert(+r[0]),i+r[0].length):-1}function frt(n,t,i){return/^[+-]\d{4}$/.test(t=t.substring(i,i+5))?(n.Z=+t,i+5):-1}function ert(n){return n+(n>68?1900:2e3)}function ort(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.m=r[0]-1,i+r[0].length):-1}function vw(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.d=+r[0],i+r[0].length):-1}function srt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+3));return r?(n.j=+r[0],i+r[0].length):-1}function yw(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.H=+r[0],i+r[0].length):-1}function hrt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.M=+r[0],i+r[0].length):-1}function crt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+2));return r?(n.S=+r[0],i+r[0].length):-1}function lrt(n,t,i){h.lastIndex=0;var r=h.exec(t.substring(i,i+3));return r?(n.L=+r[0],i+r[0].length):-1}function art(n,t,i){var r=gut.get(t.substring(i,i+=2).toLowerCase());return null==r?-1:(n.p=r,i)}function vrt(n){var t=n.getTimezoneOffset(),i=t>0?"-":"+",r=~~(u(t)/60),f=u(t)%60;return i+w(r,"0",2)+w(f,"0",2)}function yrt(n,t,i){uk.lastIndex=0;var r=uk.exec(t.substring(i,i+1));return r?i+r[0].length:-1}function ft(n){function t(n){try{y=lt;var t=new y;return t._=n,i(t)}finally{y=Date}}var i=p(n);return t.parse=function(n){try{y=lt;var t=i.parse(n);return t&&t._}finally{y=Date}},t.toString=i.toString,t}function wh(n){return n.toISOString()}function bh(t,i,r){function u(n){return t(n)}function f(t,r){var e=t[1]-t[0],f=e/r,u=n.bisect(to,f);return u==to.length?[i.year,iu(t.map(function(n){return n/31536e6}),r)[2]]:u?i[f/to[u-1]<to[u]/f?u-1:u]:[ift,iu(t,r)[2]]}return u.invert=function(n){return yi(t.invert(n))},u.domain=function(n){return arguments.length?(t.domain(n),u):t.domain().map(yi)},u.nice=function(n,t){function r(i){return!isNaN(i)&&!n.range(i,yi(+i+1),t).length}var e=u.domain(),o=hr(e),i=null==n?f(o,10):"number"==typeof n&&f(o,n);return i&&(n=i[0],t=i[1]),u.domain(fh(e,t>1?{floor:function(t){for(;r(t=n.floor(t));)t=yi(t-1);return t},ceil:function(t){for(;r(t=n.ceil(t));)t=yi(+t+1);return t}}:n))},u.ticks=function(n,t){var i=hr(u.domain()),r=null==n?f(i,10):"number"==typeof n?f(i,n):!n.range&&[{range:n},t];return r&&(n=r[0],t=r[1]),n.range(i[0],yi(+i[1]+1),1>t?1:t)},u.tickFormat=function(){return r},u.copy=function(){return bh(t.copy(),i,r)},eh(u,t)}function yi(n){return new Date(n)}function pw(n){return function(t){for(var r=n.length-1,i=n[r];!i[1](t);)i=n[--r];return i[0](t)}}function prt(n){return JSON.parse(n.responseText)}function wrt(n){var t=tt.createRange();return t.selectNode(tt.body),t.createContextualFragment(n.responseText)}var n={version:"3.3.10"},kh,u,at,dh,gh,e,df,et,ic,gf,cr,kw,ne,ie,fc,gw,re,ue,uu,fu,ee,oe,se,he,vt,oc,ub,eu,hc,cc,le,ti,d,vc,bi,yc,pc,wc,bc,kc,su,vr,ki,yr,dc,hu,gc,nl,cu,lu,ob,sb,hb,tl,cb,lb,ab,vb,il,yb,ei,pb,ke,rl,ul,gb,cl;Date.now||(Date.now=function(){return+new Date});var ww=[].slice,gt=function(n){return ww.call(n)},tt=document,ni=tt.documentElement,v=window;try{gt(ni.childNodes)[0].nodeType}catch(sft){gt=function(n){for(var t=n.length,i=new Array(t);t--;)i[t]=n[t];return i}}try{tt.createElement("div").style.setProperty("opacity",0,"")}catch(hft){var io=v.Element.prototype,fft=io.setAttribute,oft=io.setAttributeNS,ok=v.CSSStyleDeclaration.prototype,eft=ok.setProperty;io.setAttribute=function(n,t){fft.call(this,n,t+"")},io.setAttributeNS=function(n,t,i){oft.call(this,n,t,i+"")},ok.setProperty=function(n,t,i){eft.call(this,n,t+"",i)}}n.ascending=function(n,t){return t>n?-1:n>t?1:n>=t?0:NaN},n.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},n.min=function(n,t){var i,u,r=-1,f=n.length;if(1===arguments.length){for(;++r<f&&!(null!=(i=n[r])&&i>=i);)i=void 0;for(;++r<f;)null!=(u=n[r])&&i>u&&(i=u)}else{for(;++r<f&&!(null!=(i=t.call(n,n[r],r))&&i>=i);)i=void 0;for(;++r<f;)null!=(u=t.call(n,n[r],r))&&i>u&&(i=u)}return i},n.max=function(n,t){var i,u,r=-1,f=n.length;if(1===arguments.length){for(;++r<f&&!(null!=(i=n[r])&&i>=i);)i=void 0;for(;++r<f;)null!=(u=n[r])&&u>i&&(i=u)}else{for(;++r<f&&!(null!=(i=t.call(n,n[r],r))&&i>=i);)i=void 0;for(;++r<f;)null!=(u=t.call(n,n[r],r))&&u>i&&(i=u)}return i},n.extent=function(n,t){var i,r,f,u=-1,e=n.length;if(1===arguments.length){for(;++u<e&&!(null!=(i=f=n[u])&&i>=i);)i=f=void 0;for(;++u<e;)null!=(r=n[u])&&(i>r&&(i=r),r>f&&(f=r))}else{for(;++u<e&&!(null!=(i=f=t.call(n,n[u],u))&&i>=i);)i=void 0;for(;++u<e;)null!=(r=t.call(n,n[u],u))&&(i>r&&(i=r),r>f&&(f=r))}return[i,f]},n.sum=function(n,t){var r,u=0,f=n.length,i=-1;if(1===arguments.length)for(;++i<f;)isNaN(r=+n[i])||(u+=r);else for(;++i<f;)isNaN(r=+t.call(n,n[i],i))||(u+=r);return u},n.mean=function(n,t){var u,e=n.length,i=0,r=-1,f=0;if(1===arguments.length)for(;++r<e;)ro(u=n[r])&&(i+=(u-i)/++f);else for(;++r<e;)ro(u=t.call(n,n[r],r))&&(i+=(u-i)/++f);if(f)return i},n.quantile=function(n,t){var u=(n.length-1)*t+1,i=Math.floor(u),r=+n[i-1],f=u-i;return f?r+f*(n[i]-r):r},n.median=function(t,i){return arguments.length>1&&(t=t.map(i)),t=t.filter(ro),t.length?n.quantile(t.sort(n.ascending),.5):void 0},n.bisector=function(n){return{left:function(t,i,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var f=r+u>>>1;n.call(t,t[f],f)<i?r=f+1:u=f}return r},right:function(t,i,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var f=r+u>>>1;i<n.call(t,t[f],f)?u=f:r=f+1}return r}}},kh=n.bisector(function(n){return n}),n.bisectLeft=kh.left,n.bisect=n.bisectRight=kh.right,n.shuffle=function(n){for(var r,i,t=n.length;t;)i=0|Math.random()*t--,r=n[t],n[t]=n[i],n[i]=r;return n},n.permute=function(n,t){for(var i=t.length,r=new Array(i);i--;)r[i]=n[t[i]];return r},n.pairs=function(n){for(var f,t=0,i=n.length-1,r=n[0],u=new Array(0>i?0:i);i>t;)u[t]=[f=r,r=n[++t]];return u},n.zip=function(){var r,t,e;if(!(r=arguments.length))return[];for(var i=-1,u=n.min(arguments,sk),f=new Array(u);++i<u;)for(t=-1,e=f[i]=new Array(r);++t<r;)e[t]=arguments[t][i];return f},n.transpose=function(t){return n.zip.apply(n,t)},n.keys=function(n){var t=[],i;for(i in n)t.push(i);return t},n.values=function(n){var t=[],i;for(i in n)t.push(n[i]);return t},n.entries=function(n){var i=[],t;for(t in n)i.push({key:t,value:n[t]});return i},n.merge=function(n){for(var t,i,r,u=n.length,e=-1,f=0;++e<u;)f+=n[e].length;for(i=new Array(f);--u>=0;)for(r=n[u],t=r.length;--t>=0;)i[--f]=r[t];return i},u=Math.abs,n.range=function(n,t,i){if(arguments.length<3&&(i=1,arguments.length<2&&(t=n,n=0)),1/0==(t-n)/i)throw new Error("infinite range");var f,e=[],r=hk(u(i)),o=-1;if(n*=r,t*=r,i*=r,0>i)for(;(f=n+i*++o)>t;)e.push(f/r);else for(;(f=n+i*++o)<t;)e.push(f/r);return e},n.map=function(n){var t=new ut,i;if(n instanceof ut)n.forEach(function(n,i){t.set(n,i)});else for(i in n)t.set(i,n[i]);return t},al(ut,{has:function(n){return at+n in this},get:function(n){return this[at+n]},set:function(n,t){return this[at+n]=t},remove:function(n){return n=at+n,n in this&&delete this[n]},keys:function(){var n=[];return this.forEach(function(t){n.push(t)}),n},values:function(){var n=[];return this.forEach(function(t,i){n.push(i)}),n},entries:function(){var n=[];return this.forEach(function(t,i){n.push({key:t,value:i})}),n},forEach:function(n){for(var t in this)t.charCodeAt(0)===dh&&n.call(this,t.substring(1),this[t])}}),at="\x00",dh=at.charCodeAt(0),n.nest=function(){function r(n,e,o){if(o>=i.length)return f?f.call(t,e):u?e.sort(u):e;for(var l,s,h,a,v=-1,y=e.length,p=i[o++],c=new ut;++v<y;)(a=c.get(l=p(s=e[v])))?a.push(s):c.set(l,[s]);return n?(s=n(),h=function(t,i){s.set(t,r(n,i,o))}):(s={},h=function(t,i){s[t]=r(n,i,o)}),c.forEach(h),s}function e(n,t){if(t>=i.length)return n;var r=[],u=o[t++];return n.forEach(function(n,i){r.push({key:n,values:e(i,t)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var u,f,t={},i=[],o=[];return t.map=function(n,t){return r(t,n,0)},t.entries=function(t){return e(r(n.map,t,0),0)},t.key=function(n){return i.push(n),t},t.sortKeys=function(n){return o[i.length-1]=n,t},t.sortValues=function(n){return u=n,t},t.rollup=function(n){return f=n,t},t},n.set=function(n){var i=new uo,t,r;if(n)for(t=0,r=n.length;r>t;++t)i.add(n[t]);return i},al(uo,{has:function(n){return at+n in this},add:function(n){return this[at+n]=!0,n},remove:function(n){return n=at+n,n in this&&delete this[n]},values:function(){var n=[];return this.forEach(function(t){n.push(t)}),n},forEach:function(n){for(var t in this)t.charCodeAt(0)===dh&&n.call(this,t.substring(1))}}),n.behavior={},n.rebind=function(n,t){for(var i,r=1,u=arguments.length;++r<u;)n[i=arguments[r]]=ck(n,t,t[i]);return n},gh=["webkit","ms","moz","Moz","o","O"],n.dispatch=function(){for(var n=new eo,t=-1,i=arguments.length;++t<i;)n[arguments[t]]=vl(n);return n},eo.prototype.on=function(n,t){var r=n.indexOf("."),i="";if(r>=0&&(i=n.substring(r+1),n=n.substring(0,r)),n)return arguments.length<2?this[n].on(i):this[n].on(i,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(i,null);return this}},n.event=null,n.requote=function(n){return n.replace(brt,"\\$&")};var brt=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,kf={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var i in t)n[i]=t[i]},nc=function(n,t){return t.querySelector(n)},tc=function(n,t){return t.querySelectorAll(n)},krt=ni[fo(ni,"matchesSelector")],bw=function(n,t){return krt.call(n,t)};"function"==typeof Sizzle&&(nc=function(n,t){return Sizzle(n,t)[0]||null},tc=function(n,t){return Sizzle.uniqueSort(Sizzle(n,t))},bw=Sizzle.matchesSelector),n.selection=function(){return ic},e=n.selection.prototype=[],e.select=function(n){var i,f,e,t,o=[],r,s,u,h;for(n=so(n),r=-1,s=this.length;++r<s;)for(o.push(i=[]),i.parentNode=(e=this[r]).parentNode,u=-1,h=e.length;++u<h;)(t=e[u])?(i.push(f=n.call(t,t.__data__,u,r)),f&&"__data__"in t&&(f.__data__=t.__data__)):i.push(null);return bt(o)},e.selectAll=function(n){var u,t,f=[],i,e;for(n=pl(n),i=-1,e=this.length;++i<e;)for(var o=this[i],r=-1,s=o.length;++r<s;)(t=o[r])&&(f.push(u=gt(n.call(t,t.__data__,r,i))),u.parentNode=t);return bt(f)},df={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},n.ns={prefix:df,qualify:function(n){var t=n.indexOf(":"),i=n;return t>=0&&(i=n.substring(0,t),n=n.substring(t+1)),df.hasOwnProperty(i)?{space:df[i],local:n}:n}},e.attr=function(t,i){if(arguments.length<2){if("string"==typeof t){var r=this.node();return t=n.ns.qualify(t),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(i in t)this.each(wl(i,t[i]));return this}return this.each(wl(t,i))},e.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var r=this.node(),u=(n=n.trim().split(/^|\s+/g)).length,i=-1;if(t=r.classList){for(;++i<u;)if(!t.contains(n[i]))return!1}else for(t=r.getAttribute("class");++i<u;)if(!kl(n[i]).test(t))return!1;return!0}for(t in n)this.each(dl(t,n[t]));return this}return this.each(dl(n,t))},e.style=function(n,t,i){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(i in n)this.each(gl(i,n[i],t));return this}if(2>r)return v.getComputedStyle(this.node(),null).getPropertyValue(n);i=""}return this.each(gl(n,t,i))},e.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(na(t,n[t]));return this}return this.each(na(n,t))},e.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},e.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},e.append=function(n){return n=ta(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},e.insert=function(n,t){return n=ta(n),t=so(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},e.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},e.data=function(n,t){function e(n,i){var r,u,o,l=n.length,a=i.length,k=Math.min(l,a),v=new Array(a),c=new Array(a),y=new Array(l);if(t){var e,p=new ut,w=new ut,b=[];for(r=-1;++r<l;)e=t.call(u=n[r],u.__data__,r),p.has(e)?y[r]=u:p.set(e,u),b.push(e);for(r=-1;++r<a;)e=t.call(i,o=i[r],r),(u=p.get(e))?(v[r]=u,u.__data__=o):w.has(e)||(c[r]=ho(o)),w.set(e,o),p.remove(e);for(r=-1;++r<l;)p.has(b[r])&&(y[r]=n[r])}else{for(r=-1;++r<k;)u=n[r],o=i[r],u?(u.__data__=o,v[r]=u):c[r]=ho(o);for(;a>r;++r)c[r]=ho(i[r]);for(;l>r;++r)y[r]=n[r]}c.update=v,c.parentNode=v.parentNode=y.parentNode=n.parentNode,s.push(c),f.push(v),h.push(y)}var r,o,i=-1,u=this.length;if(!arguments.length){for(n=new Array(u=(r=this[0]).length);++i<u;)(o=r[i])&&(n[i]=o.__data__);return n}var s=ra([]),f=bt([]),h=bt([]);if("function"==typeof n)for(;++i<u;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<u;)e(r=this[i],n);return f.enter=function(){return s},f.exit=function(){return h},f},e.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},e.filter=function(n){var u,f,r,e=[],t,o,i,s;for("function"!=typeof n&&(n=ia(n)),t=0,o=this.length;o>t;t++)for(e.push(u=[]),u.parentNode=(f=this[t]).parentNode,i=0,s=f.length;s>i;i++)(r=f[i])&&n.call(r,r.__data__,i,t)&&u.push(r);return bt(e)},e.order=function(){for(var i=-1,f=this.length;++i<f;)for(var t,r=this[i],u=r.length-1,n=r[u];--u>=0;)(t=r[u])&&(n&&n!==t.nextSibling&&n.parentNode.insertBefore(t,n),n=t);return this},e.sort=function(n){n=ak.apply(this,arguments);for(var t=-1,i=this.length;++t<i;)this[t].sort(n);return this.order()},e.each=function(n){return kt(this,function(t,i,r){n.call(t,t.__data__,i,r)})},e.call=function(n){var t=gt(arguments);return n.apply(t[0]=this,t),this},e.empty=function(){return!this.node()},e.node=function(){for(var i,n=0,r=this.length;r>n;n++)for(var u=this[n],t=0,f=u.length;f>t;t++)if(i=u[t],i)return i;return null},e.size=function(){var n=0;return this.each(function(){++n}),n},et=[],n.selection.enter=ra,n.selection.enter.prototype=et,et.append=e.append,et.empty=e.empty,et.node=e.node,et.call=e.call,et.size=e.size,et.select=function(n){for(var i,h,r,e,o,t,u,s=[],f=-1,c=this.length;++f<c;)for(o=(t=this[f]).update,s.push(r=[]),r.parentNode=t.parentNode,i=-1,h=t.length;++i<h;)(u=t[i])?(r.push(o[i]=e=n.call(t.parentNode,u.__data__,i,f)),e.__data__=u.__data__):r.push(null);return bt(s)},et.insert=function(n,t){return arguments.length<2&&(t=vk(this)),e.insert.call(this,n,t)},e.transition=function(){for(var i,n,r=di||++db,u=[],o=de||{time:Date.now(),ease:lg,delay:0,duration:250},f=-1,s=this.length;++f<s;){u.push(i=[]);for(var e=this[f],t=-1,h=e.length;++t<h;)(n=e[t])&&vf(n,t,r,o),i.push(n)}return ru(u,r)},e.interrupt=function(){return this.each(au)},n.select=function(n){var t=["string"==typeof n?nc(n,tt):n];return t.parentNode=ni,bt([t])},n.selectAll=function(n){var t=gt("string"==typeof n?tc(n,tt):n);return t.parentNode=ni,bt([t])},ic=n.select(ni),e.on=function(n,t,i){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(i in n)this.each(ua(i,n[i],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;i=!1}return this.each(ua(n,t,i))},gf=n.map({mouseenter:"mouseover",mouseleave:"mouseout"}),gf.forEach(function(n){"on"+n in tt&&gf.remove(n)}),cr="onselectstart"in tt?null:fo(ni.style,"userSelect"),kw=0,n.mouse=function(n){return ea(n,yl())},ne=/WebKit/.test(v.navigator.userAgent)?-1:0,n.touches=function(n,t){return arguments.length<2&&(t=yl().touches),t?gt(t).map(function(t){var i=ea(n,t);return i.identifier=t.identifier,i}):[]},n.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",s)}function f(){return n.event.changedTouches[0].identifier}function e(t,i){return n.touches(t).filter(function(n){return n.identifier===i})[0]}function r(t,r,f,e){return function(){function w(){var n=r(y,h),t=n[0]-s[0],i=n[1]-s[1];p|=t|i,s=n,a({type:"drag",x:n[0]+o[0],y:n[1]+o[1],dx:t,dy:i})}function b(){d.on(f+"."+c,null).on(e+"."+c,null),g(p&&n.event.target===k),a({type:"dragend"})}var o,l=this,y=l.parentNode,a=u.of(l,arguments),k=n.event.target,h=t(),c=null==h?"drag":"drag-"+h,s=r(y,h),p=0,d=n.select(v).on(f+"."+c,w).on(e+"."+c,b),g=vu();i?(o=i.apply(l,arguments),o=[o.x-s[0],o.y-s[1]]):o=[0,0],a({type:"dragstart"})}}var u=oo(t,"drag","dragstart","dragend"),i=null,o=r(c,n.mouse,"mousemove","mouseup"),s=r(f,e,"touchmove","touchend");return t.origin=function(n){return arguments.length?(i=n,t):i},n.rebind(t,u,"on")};var f=Math.PI,b=2*f,k=f/2,t=1e-6,rc=t*t,r=f/180,s=180/f,te=Math.SQRT2,uc=2,dw=4;n.interpolateZoom=function(n,t){function v(n){var t=n*p,r,h;return y?(r=co(u),h=i/(uc*c)*(r*pk(te*t+u)-ha(u)),[o+h*f,s+h*e,i*r/co(te*t+u)]):[o+n*f,s+n*e,i*Math.exp(te*t)]}var o=n[0],s=n[1],i=n[2],w=t[0],b=t[1],r=t[2],f=w-o,e=b-s,h=f*f+e*e,c=Math.sqrt(h),l=(r*r-i*i+dw*h)/(2*i*uc*c),a=(r*r-i*i-dw*h)/(2*r*uc*c),u=Math.log(Math.sqrt(l*l+1)-l),k=Math.log(Math.sqrt(a*a+1)-a),y=k-u,p=(y||Math.log(r/i))/te;return v.duration=1e3*p,v},n.behavior.zoom=function(){function i(n){n.on(tt,ut).on(gw+".zoom",ht).on(it,et).on("dblclick.zoom",ct).on(rt,ft)}function s(n){return[(n[0]-t.x)/t.k,(n[1]-t.y)/t.k]}function st(n){return[n[0]*t.k+t.x,n[1]*t.k+t.y]}function h(n){t.k=Math.max(w[0],Math.min(w[1],n))}function o(n,i){i=st(i),t.x+=n[0]-i[0],t.y+=n[1]-i[1]}function b(){a&&a.domain(g.range().map(function(n){return(n-t.x)/t.k}).map(g.invert)),y&&y.domain(nt.range().map(function(n){return(n-t.y)/t.k}).map(nt.invert))}function u(n){n({type:"zoomstart"})}function r(n){b(),n({type:"zoom",scale:t.k,translate:[t.x,t.y]})}function f(n){n({type:"zoomend"})}function ut(){function c(){h=1,o(n.mouse(t),p),r(i)}function l(){y.on(it,v===t?et:null).on(ot,null),w(h&&n.event.target===a),f(i)}var t=this,i=e.of(t,arguments),a=n.event.target,h=0,y=n.select(v).on(it,c).on(ot,l),p=s(n.mouse(t)),w=vu();au.call(t),u(i)}function ft(){function y(){var r=n.touches(c);return w=t.k,r.forEach(function(n){n.identifier in i&&(i[n.identifier]=s(n))}),r}function p(){for(var u,s,f,v,c=n.event.changedTouches,e=0,k=c.length;k>e;++e)i[c[e].identifier]=null;if(u=y(),s=Date.now(),1===u.length)500>s-d&&(f=u[0],v=i[f.identifier],h(2*t.k),o(f,v),wt(),r(l)),d=s;else if(u.length>1){var f=u[0],p=u[1],w=f[0]-p[0],b=f[1]-p[1];a=w*w+b*b}}function nt(){for(var s,p,t,f,u,e,y=n.touches(c),v=0,b=y.length;b>v;++v,e=null)if(u=y[v],e=i[u.identifier]){if(f)break;t=u,f=e}e&&(s=(s=u[0]-t[0])*s+(s=u[1]-t[1])*s,p=a&&Math.sqrt(s/a),t=[(t[0]+u[0])/2,(t[1]+u[1])/2],f=[(f[0]+e[0])/2,(f[1]+e[1])/2],h(p*w)),d=null,o(t,f),r(l)}function it(){var e;if(n.event.touches.length){for(var r=n.event.changedTouches,t=0,u=r.length;u>t;++t)delete i[r[t].identifier];for(e in i)return void y()}et.on(k,null).on(g,null),ot.on(tt,ut).on(rt,ft),st(),f(l)}var w,c=this,l=e.of(c,arguments),i={},a=0,b=n.event.changedTouches[0].identifier,k="touchmove.zoom-"+b,g="touchend.zoom-"+b,et=n.select(v).on(k,nt).on(g,it),ot=n.select(c).on(tt,null).on(rt,p),st=vu();au.call(c),p(),u(l)}function ht(){var i=e.of(this,arguments),a;l?clearTimeout(l):(au.call(this),u(i)),l=setTimeout(function(){l=null,f(i)},50),wt(),a=k||n.mouse(this),c||(c=s(a)),h(Math.pow(2,.002*ie())*t.k),o(a,c),r(i)}function et(){c=null}function ct(){var i=e.of(this,arguments),c=n.mouse(this),a=s(c),l=Math.log(t.k)/Math.LN2;u(i),h(Math.pow(2,n.event.shiftKey?Math.ceil(l)-1:Math.floor(l)+1)),o(c,a),r(i),f(i)}var c,k,l,d,g,a,nt,y,t={x:0,y:0,k:1},p=[960,500],w=fc,tt="mousedown.zoom",it="mousemove.zoom",ot="mouseup.zoom",rt="touchstart.zoom",e=oo(i,"zoomstart","zoom","zoomend");return i.event=function(i){i.each(function(){var i=e.of(this,arguments),o=t;di?n.select(this).transition().each("start.zoom",function(){t=this.__chart__||{x:0,y:0,k:1},u(i)}).tween("zoom:zoom",function(){var u=p[0],s=p[1],f=u/2,e=s/2,h=n.interpolateZoom([(f-t.x)/t.k,(e-t.y)/t.k,u/t.k],[(f-o.x)/o.k,(e-o.y)/o.k,u/o.k]);return function(n){var o=h(n),s=u/o[2];this.__chart__=t={x:f-o[0]*s,y:e-o[1]*s,k:s},r(i)}}).each("end.zoom",function(){f(i)}):(this.__chart__=t,u(i),r(i),f(i))})},i.translate=function(n){return arguments.length?(t={x:+n[0],y:+n[1],k:t.k},b(),i):[t.x,t.y]},i.scale=function(n){return arguments.length?(t={x:t.x,y:t.y,k:+n},b(),i):t.k},i.scaleExtent=function(n){return arguments.length?(w=null==n?fc:[+n[0],+n[1]],i):w},i.center=function(n){return arguments.length?(k=n&&[+n[0],+n[1]],i):k},i.size=function(n){return arguments.length?(p=n&&[+n[0],+n[1]],i):p},i.x=function(n){return arguments.length?(a=n,g=n.copy(),t={x:0,y:0,k:1},i):a},i.y=function(n){return arguments.length?(y=n,nt=n.copy(),t={x:0,y:0,k:1},i):y},n.rebind(i,e,"on")},fc=[0,1/0],gw="onwheel"in tt?(ie=function(){return-n.event.deltaY*(n.event.deltaMode?120:1)},"wheel"):"onmousewheel"in tt?(ie=function(){return n.event.wheelDelta},"mousewheel"):(ie=function(){return-n.event.detail},"MozMousePixelScroll"),gi.prototype.toString=function(){return this.rgb()+""},n.hsl=function(n,t,i){return 1===arguments.length?n instanceof lo?nr(n.h,n.s,n.l):ya(""+n,pa,nr):nr(+n,+t,+i)},re=lo.prototype=new gi,re.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),nr(this.h,this.s,this.l/n)},re.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),nr(this.h,this.s,n*this.l)},re.rgb=function(){return ao(this.h,this.s,this.l)},n.hcl=function(t,i,r){return 1===arguments.length?t instanceof yu?tr(t.h,t.c,t.l):t instanceof pu?aa(t.l,t.a,t.b):aa((t=wa((t=n.rgb(t)).r,t.g,t.b)).l,t.a,t.b):tr(+t,+i,+r)},ue=yu.prototype=new gi,ue.brighter=function(n){return tr(this.h,this.c,Math.min(100,this.l+fe*(arguments.length?n:1)))},ue.darker=function(n){return tr(this.h,this.c,Math.max(0,this.l-fe*(arguments.length?n:1)))},ue.rgb=function(){return vo(this.h,this.c,this.l).rgb()},n.lab=function(t,i,r){return 1===arguments.length?t instanceof pu?ir(t.l,t.a,t.b):t instanceof yu?vo(t.l,t.c,t.h):wa((t=n.rgb(t)).r,t.g,t.b):ir(+t,+i,+r)};var fe=18,nb=.95047,tb=1,ib=1.08883,ec=pu.prototype=new gi;ec.brighter=function(n){return ir(Math.min(100,this.l+fe*(arguments.length?n:1)),this.a,this.b)},ec.darker=function(n){return ir(Math.max(0,this.l-fe*(arguments.length?n:1)),this.a,this.b)},ec.rgb=function(){return la(this.l,this.a,this.b)},n.rgb=function(n,t,i){return 1===arguments.length?n instanceof bo?st(n.r,n.g,n.b):ya(""+n,st,ao):st(~~n,~~t,~~i)},uu=bo.prototype=new gi,uu.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var i=this.r,r=this.g,u=this.b,t=30;return i||r||u?(i&&t>i&&(i=t),r&&t>r&&(r=t),u&&t>u&&(u=t),st(Math.min(255,~~(i/n)),Math.min(255,~~(r/n)),Math.min(255,~~(u/n)))):st(t,t,t)},uu.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),st(~~(n*this.r),~~(n*this.g),~~(n*this.b))},uu.hsl=function(){return pa(this.r,this.g,this.b)},uu.toString=function(){return"#"+rr(this.r)+rr(this.g)+rr(this.b)},fu=n.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}),fu.forEach(function(n,t){fu.set(n,va(t))}),n.functor=o,n.xhr=ns(a),n.dsv=function(t,i){function r(t,r,u){arguments.length<3&&(u=r,r=null);var o=n.xhr(t,i,u);return o.row=function(n){return arguments.length?o.response(null==(r=n)?f:e(n)):r},o.row(r)}function f(n){return r.parse(n.responseText)}function e(n){return function(t){return r.parse(t.responseText,n)}}function o(n){return n.map(u).join(t)}function u(n){return s.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var s=new RegExp('["'+t+"\n]"),h=t.charCodeAt(0);return r.parse=function(n,t){var i;return r.parseRows(n,function(n,r){if(i)return i(n,r-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");i=t?function(n,i){return t(u(n),i)}:u})},r.parseRows=function(n,t){function s(){var f,t,u,s;if(i>=o)return e;if(r)return r=!1,c;if(f=i,34===n.charCodeAt(f)){for(t=f;t++<o;)if(34===n.charCodeAt(t)){if(34!==n.charCodeAt(t+1))break;++t}return i=t+2,u=n.charCodeAt(t+1),13===u?(r=!0,10===n.charCodeAt(t+2)&&++i):10===u&&(r=!0),n.substring(f+1,t).replace(/""/g,'"')}for(;o>i;){if(u=n.charCodeAt(i++),s=1,10===u)r=!0;else if(13===u)r=!0,10===n.charCodeAt(i)&&(++i,++s);else if(u!==h)continue;return n.substring(f,i-s)}return n.substring(f)}for(var f,u,r,c={},e={},l=[],o=n.length,i=0,a=0;(u=s())!==e;){for(f=[];u!==c&&u!==e;)f.push(u),u=s();(!t||(f=t(f,a++)))&&l.push(f)}return l},r.format=function(n){if(Array.isArray(n[0]))return r.formatRows(n);var f=new uo,i=[];return n.forEach(function(n){for(var t in n)f.has(t)||i.push(f.add(t))}),[i.map(u).join(t)].concat(n.map(function(n){return i.map(function(t){return u(n[t])}).join(t)})).join("\n")},r.formatRows=function(n){return n.map(o).join("\n")},r},n.csv=n.dsv(",","text/csv"),n.tsv=n.dsv("\t","text/tab-separated-values"),oc=v[fo(v,"requestAnimationFrame")]||function(n){setTimeout(n,17)},n.timer=function(n,t,i){var u=arguments.length,f,r;2>u&&(t=0),3>u&&(i=Date.now()),f=i+t,r={c:n,t:f,f:!1,n:null},oe?oe.n=r:ee=r,oe=r,se||(he=clearTimeout(he),se=1,oc(is))},n.timer.flush=function(){ba(),ka()};var drt=".",grt=",",ce=[3,3],nut="$",tut=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(bk);n.formatPrefix=function(t,i){var r=0;return t&&(0>t&&(t*=-1),i&&(t=n.round(t,rs(t,i))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((0>=r?r+1:r-1)/3)))),tut[8+r/3]},n.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)},n.format=function(t){var u=rb.exec(t),v=u[1]||" ",e=u[2]||">",p=u[3]||"",f=u[4]||"",s=u[5],h=+u[6],c=u[7],r=u[8],i=u[9],o=1,l="",y=!1,a;switch(r&&(r=+r.substring(1)),(s||"0"===v&&"="===e)&&(s=v="0",e="=",c&&(h-=Math.floor((h-1)/4))),i){case"n":c=!0,i="g";break;case"%":o=100,l="%",i="f";break;case"p":o=100,l="%",i="r";break;case"b":case"o":case"x":case"X":"#"===f&&(f="0"+i.toLowerCase());case"c":case"d":y=!0,r=0;break;case"s":o=-1,i="r"}return"#"===f?f="":"$"===f&&(f=nut),"r"!=i||r||(i="g"),null!=r&&("g"==i?r=Math.max(1,Math.min(21,r)):("e"==i||"f"==i)&&(r=Math.max(0,Math.min(20,r)))),i=iut.get(i)||kk,a=s&&c,function(t){var u,g,k,w;if(y&&t%1)return"";u=0>t||0===t&&0>1/t?(t=-t,"-"):p,0>o?(g=n.formatPrefix(t,r),t=g.scale(t),l=g.symbol):t*=o,t=i(t,r);var d=t.lastIndexOf("."),b=0>d?t:t.substring(0,d),nt=0>d?"":drt+t.substring(d+1);return!s&&c&&(b=sc(b)),k=f.length+b.length+nt.length+(a?0:u.length),w=h>k?new Array(k=h-k+1).join(v):"",a&&(b=sc(w+b)),u+=f,t=b+nt,("<"===e?u+t+w:">"===e?w+u+t:"^"===e?w.substring(0,k>>=1)+u+t+w.substring(k):u+(a?t:w+t))+l}};var rb=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,iut=n.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(t,i){return(t=n.round(t,rs(t,i))).toFixed(Math.max(0,Math.min(20,rs(t*(1+1e-15),i))))}}),sc=a;ce&&(ub=ce.length,sc=function(n){for(var i=n.length,r=[],u=0,t=ce[0];i>0&&t>0;)r.push(n.substring(i-=t,i+t)),t=ce[u=(u+1)%ub];return r.reverse().join(grt)}),n.geo={},us.prototype={s:0,t:0,add:function(n){da(n,this.t,eu),da(eu.s,this.s,this),this.s?this.t+=eu.t:this.s=eu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}},eu=new us,n.geo.stream=function(n,t){n&&hc.hasOwnProperty(n.type)?hc[n.type](n,t):bu(n,t)},hc={Feature:function(n,t){bu(n.geometry,t)},FeatureCollection:function(n,t){for(var i=n.features,r=-1,u=i.length;++r<u;)bu(i[r].geometry,t)}},cc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var i=n.coordinates,r=-1,u=i.length;++r<u;)n=i[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){fs(n.coordinates,t,0)},MultiLineString:function(n,t){for(var i=n.coordinates,r=-1,u=i.length;++r<u;)fs(i[r],t,0)},Polygon:function(n,t){ga(n.coordinates,t)},MultiPolygon:function(n,t){for(var i=n.coordinates,r=-1,u=i.length;++r<u;)ga(i[r],t)},GeometryCollection:function(n,t){for(var i=n.geometries,r=-1,u=i.length;++r<u;)bu(i[r],t)}},n.geo.area=function(t){return le=0,n.geo.stream(t,d),le},ti=new us,d={sphere:function(){le+=4*f},point:c,lineStart:c,lineEnd:c,polygonStart:function(){ti.reset(),d.lineStart=dk},polygonEnd:function(){var n=2*ti;le+=0>n?4*f+n:n,d.lineStart=d.lineEnd=d.point=c}},n.geo.bounds=function(){function w(n,t){v.push(l=[i=n,f=n]),o>t&&(o=t),t>h&&(h=t)}function b(n,t){var d=hi([n*r,t*r]),v;if(y){var b=ur(y,d),nt=[b[1],-b[0],0],c=ur(nt,b);gu(c),c=nf(c);var g=n-a,p=g>0?1:-1,l=c[0]*s*p,k=u(g)>180;k^(l>p*a&&p*n>l)?(v=c[1]*s,v>h&&(h=v)):(l=(l+360)%360-180,k^(l>p*a&&p*n>l))?(v=-c[1]*s,o>v&&(o=v)):(o>t&&(o=t),t>h&&(h=t)),k?a>n?e(i,n)>e(i,f)&&(f=n):e(n,f)>e(i,f)&&(i=n):f>=i?(i>n&&(i=n),n>f&&(f=n)):n>a?e(i,n)>e(i,f)&&(f=n):e(n,f)>e(i,f)&&(i=n)}else w(n,t);y=d,a=n}function k(){c.point=b}function g(){l[0]=i,l[1]=f,c.point=w,y=null}function nt(n,t){if(y){var i=n-a;p+=u(i)>180?i+(i>0?360:-360):i}else it=n,rt=t;d.point(n,t),b(n,t)}function ut(){d.lineStart()}function ft(){nt(it,rt),d.lineEnd(),u(p)>t&&(i=-(f=180)),l[0]=i,l[1]=f,y=null}function e(n,t){return(t-=n)<0?t+360:t}function et(n,t){return n[0]-t[0]}function tt(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var i,o,f,h,a,it,rt,y,p,v,l,c={point:w,lineStart:k,lineEnd:g,polygonStart:function(){c.point=nt,c.lineStart=ut,c.lineEnd=ft,p=0,d.polygonStart()},polygonEnd:function(){d.polygonEnd(),c.point=w,c.lineStart=k,c.lineEnd=g,0>ti?(i=-(f=180),o=-(h=90)):p>t?h=90:-t>p&&(o=-90),l[0]=i,l[1]=f}};return function(t){var a;if(h=f=-(i=o=1/0),v=[],n.geo.stream(t,c),a=v.length,a){v.sort(et);for(var u,s=1,r=v[0],y=[r];a>s;++s)u=v[s],tt(u[0],r)||tt(u[1],r)?(e(r[0],u[1])>e(r[0],r[1])&&(r[1]=u[1]),e(u[0],r[1])>e(r[0],r[1])&&(r[0]=u[0])):y.push(r=u);for(var p,u,w=-1/0,a=y.length-1,s=0,r=y[a];a>=s;r=u,++s)u=y[s],(p=e(r[1],u[0]))>w&&(w=p,i=u[0],f=r[1])}return v=l=null,1/0===i||1/0===o?[[NaN,NaN],[NaN,NaN]]:[[i,o],[f,h]]}}(),n.geo.centroid=function(i){ou=ae=pi=wi=yt=ii=ri=ot=lr=ar=ui=0,n.geo.stream(i,it);var r=lr,u=ar,f=ui,e=r*r+u*u+f*f;return rc>e&&(r=ii,u=ri,f=ot,t>ae&&(r=pi,u=wi,f=yt),e=r*r+u*u+f*f,rc>e)?[NaN,NaN]:[Math.atan2(u,r)*s,si(f/Math.sqrt(e))*s]};var ou,ae,pi,wi,yt,ii,ri,ot,lr,ar,ui,it={sphere:c,point:os,lineStart:nv,lineEnd:tv,polygonStart:function(){it.lineStart=gk},polygonEnd:function(){it.lineStart=nv}},fb=uv(fr,rd,fd,[-f,-f/2]),ve=1e9;n.geo.clipExtent=function(){var t,i,r,u,n,f,e={stream:function(t){return n&&(n.valid=!1),n=f(t),n.valid=!0,n},extent:function(o){return arguments.length?(f=ov(t=+o[0][0],i=+o[0][1],r=+o[1][0],u=+o[1][1]),n&&(n.valid=!1,n=null),e):[[t,i],[r,u]]}};return e.extent([[0,0],[960,500]])},(n.geo.conicEqualArea=function(){return ss(hv)}).raw=hv,n.geo.albers=function(){return n.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},n.geo.albersUsa=function(){function r(n){var t=n[0],i=n[1];return u=null,s(t,i),u||(h(t,i),u)||c(t,i),u}var u,s,h,c,i=n.geo.albers(),f=n.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),e=n.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),o={point:function(n,t){u=[n,t]}};return r.invert=function(n){var u=i.scale(),o=i.translate(),t=(n[0]-o[0])/u,r=(n[1]-o[1])/u;return(r>=.12&&.234>r&&t>=-.425&&-.214>t?f:r>=.166&&.234>r&&t>=-.214&&-.115>t?e:i).invert(n)},r.stream=function(n){var t=i.stream(n),r=f.stream(n),u=e.stream(n);return{point:function(n,i){t.point(n,i),r.point(n,i),u.point(n,i)},sphere:function(){t.sphere(),r.sphere(),u.sphere()},lineStart:function(){t.lineStart(),r.lineStart(),u.lineStart()},lineEnd:function(){t.lineEnd(),r.lineEnd(),u.lineEnd()},polygonStart:function(){t.polygonStart(),r.polygonStart(),u.polygonStart()},polygonEnd:function(){t.polygonEnd(),r.polygonEnd(),u.polygonEnd()}}},r.precision=function(n){return arguments.length?(i.precision(n),f.precision(n),e.precision(n),r):i.precision()},r.scale=function(n){return arguments.length?(i.scale(n),f.scale(.35*n),e.scale(n),r.translate(i.translate())):i.scale()},r.translate=function(n){if(!arguments.length)return i.translate();var u=i.scale(),l=+n[0],a=+n[1];return s=i.translate(n).clipExtent([[l-.455*u,a-.238*u],[l+.455*u,a+.238*u]]).stream(o).point,h=f.translate([l-.307*u,a+.201*u]).clipExtent([[l-.425*u+t,a+.12*u+t],[l-.214*u-t,a+.234*u-t]]).stream(o).point,c=e.translate([l-.205*u,a+.212*u]).clipExtent([[l-.214*u+t,a+.166*u+t],[l-.115*u-t,a+.234*u-t]]).stream(o).point,r},r.scale(1070)};var lc,ac,ye,pe,we,be,fi={point:c,lineStart:c,lineEnd:c,polygonStart:function(){ac=0,fi.lineStart=od},polygonEnd:function(){fi.lineStart=fi.lineEnd=fi.point=c,lc+=u(ac/2)}},rut={point:sd,lineStart:c,lineEnd:c,polygonStart:c,polygonEnd:c},rt={point:ci,lineStart:lv,lineEnd:av,polygonStart:function(){rt.lineStart=cd},polygonEnd:function(){rt.point=ci,rt.lineStart=lv,rt.lineEnd=av}};n.geo.path=function(){function t(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),f&&f.valid||(f=u(i)),n.geo.stream(t,f)),i.result()}function e(){return f=null,t}var o,s,u,i,f,r=4.5;return t.area=function(t){return lc=0,n.geo.stream(t,u(fi)),lc},t.centroid=function(t){return pi=wi=yt=ii=ri=ot=lr=ar=ui=0,n.geo.stream(t,u(rt)),ui?[lr/ui,ar/ui]:ot?[ii/ot,ri/ot]:yt?[pi/yt,wi/yt]:[NaN,NaN]},t.bounds=function(t){return we=be=-(ye=pe=1/0),n.geo.stream(t,u(rut)),[[ye,pe],[we,be]]},t.projection=function(n){return arguments.length?(u=(o=n)?n.stream||ad(n):a,e()):o},t.context=function(n){return arguments.length?(i=null==(s=n)?new hd:new ld(n),"function"!=typeof r&&i.pointRadius(r),e()):s},t.pointRadius=function(n){return arguments.length?(r="function"==typeof n?n:(i.pointRadius(+n),+n),t):r},t.projection(n.geo.albersUsa()).context(null)},n.geo.transform=function(n){return{stream:function(t){var r=new yv(t),i;for(i in n)r[i]=n[i];return r}}},yv.prototype={point:function(n,t){this.stream.point(n,t)},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()}},n.geo.projection=dt,n.geo.projectionMutator=hs,(n.geo.equirectangular=function(){return dt(wr)}).raw=wr.invert=wr,n.geo.rotation=function(n){function t(t){return t=n(t[0]*r,t[1]*r),t[0]*=s,t[1]*=s,t}return n=cs(n[0]%360*r,n[1]*r,n.length>2?n[2]*r:0),t.invert=function(t){return t=n.invert(t[0]*r,t[1]*r),t[0]*=s,t[1]*=s,t},t},bv.invert=wr,n.geo.circle=function(){function n(){var n="function"==typeof t?t.apply(this,arguments):t,f=cs(-n[0]*r,-n[1]*r,0).invert,i=[];return u(null,null,1,{point:function(n,t){i.push(n=f(n,t)),n[0]*=s,n[1]*=s}}),{type:"Polygon",coordinates:[i]}}var i,u,t=[0,0],f=6;return n.origin=function(i){return arguments.length?(t=i,n):t},n.angle=function(t){return arguments.length?(u=ls((i=+t)*r,f*r),n):i},n.precision=function(t){return arguments.length?(u=ls(i*r,(f=+t)*r),n):f},n.angle(90)},n.geo.distance=function(n,t){var i,f=(t[0]-n[0])*r,e=n[1]*r,o=t[1]*r,a=Math.sin(f),s=Math.cos(f),h=Math.sin(e),c=Math.cos(e),l=Math.sin(o),u=Math.cos(o);return Math.atan2(Math.sqrt((i=u*a)*i+(i=c*l-h*u*s)*i),h*l+c*u*s)},n.geo.graticule=function(){function i(){return{type:"MultiLineString",coordinates:d()}}function d(){return n.range(Math.ceil(f/v)*v,r,v).map(b).concat(n.range(Math.ceil(o/y)*y,e,y).map(k)).concat(n.range(Math.ceil(h/a)*a,s,a).filter(function(n){return u(n%v)>t}).map(g)).concat(n.range(Math.ceil(l/w)*w,c,w).filter(function(n){return u(n%y)>t}).map(nt))}var s,h,r,f,c,l,e,o,g,nt,b,k,a=10,w=a,v=90,y=360,p=2.5;return i.lines=function(){return d().map(function(n){return{type:"LineString",coordinates:n}})},i.outline=function(){return{type:"Polygon",coordinates:[b(f).concat(k(e).slice(1),b(r).reverse().slice(1),k(o).reverse().slice(1))]}},i.extent=function(n){return arguments.length?i.majorExtent(n).minorExtent(n):i.minorExtent()},i.majorExtent=function(n){return arguments.length?(f=+n[0][0],r=+n[1][0],o=+n[0][1],e=+n[1][1],f>r&&(n=f,f=r,r=n),o>e&&(n=o,o=e,e=n),i.precision(p)):[[f,o],[r,e]]},i.minorExtent=function(n){return arguments.length?(h=+n[0][0],s=+n[1][0],l=+n[0][1],c=+n[1][1],h>s&&(n=h,h=s,s=n),l>c&&(n=l,l=c,c=n),i.precision(p)):[[h,l],[s,c]]},i.step=function(n){return arguments.length?i.majorStep(n).minorStep(n):i.minorStep()},i.majorStep=function(n){return arguments.length?(v=+n[0],y=+n[1],i):[v,y]},i.minorStep=function(n){return arguments.length?(a=+n[0],w=+n[1],i):[a,w]},i.precision=function(n){return arguments.length?(p=+n,g=ty(l,c,90),nt=iy(h,s,p),b=ty(o,e,90),k=iy(f,r,p),i):p},i.majorExtent([[-180,-90+t],[180,90-t]]).minorExtent([[-180,-80-t],[180,80+t]])},n.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[u||i.apply(this,arguments),f||r.apply(this,arguments)]}}var u,f,i=as,r=vs;return t.distance=function(){return n.geo.distance(u||i.apply(this,arguments),f||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,u="function"==typeof n?null:n,t):i},t.target=function(n){return arguments.length?(r=n,f="function"==typeof n?null:n,t):r},t.precision=function(){return arguments.length?t:0},t},n.geo.interpolate=function(n,t){return vd(n[0]*r,n[1]*r,t[0]*r,t[1]*r)},n.geo.length=function(t){return vc=0,n.geo.stream(t,bi),vc},bi={sphere:c,point:c,lineStart:yd,lineEnd:c,polygonStart:c,polygonEnd:c},yc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)}),(n.geo.azimuthalEqualArea=function(){return dt(yc)}).raw=yc,pc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},a),(n.geo.azimuthalEquidistant=function(){return dt(pc)}).raw=pc,(n.geo.conicConformal=function(){return ss(ry)}).raw=ry,(n.geo.conicEquidistant=function(){return ss(uy)}).raw=uy,wc=br(function(n){return 1/n},Math.atan),(n.geo.gnomonic=function(){return dt(wc)}).raw=wc,uf.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-k]},(n.geo.mercator=function(){return fy(uf)}).raw=uf,bc=br(function(){return 1},Math.asin),(n.geo.orthographic=function(){return dt(bc)}).raw=bc,kc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)}),(n.geo.stereographic=function(){return dt(kc)}).raw=kc,ys.invert=function(n,t){return[Math.atan2(ha(n),Math.cos(t)),si(Math.sin(t)/co(n))]},(n.geo.transverseMercator=function(){return fy(ys)}).raw=ys,n.geom={},n.geom.hull=function(n){function t(n){var d;if(n.length<3)return[];var u,g,t,e,l,a,p,w,b,v,k,c,nt=o(r),it=o(i),y=n.length,tt=y-1,f=[],h=[],s=0;if(nt===li&&i===er)u=n;else for(t=0,u=[];y>t;++t)u.push([+nt.call(this,g=n[t],t),+it.call(this,g,t)]);for(t=1;y>t;++t)(u[t][1]<u[s][1]||u[t][1]==u[s][1]&&u[t][0]<u[s][0])&&(s=t);for(t=0;y>t;++t)t!==s&&(a=u[t][1]-u[s][1],l=u[t][0]-u[s][0],f.push({angle:Math.atan2(a,l),index:t}));for(f.sort(function(n,t){return n.angle-t.angle}),k=f[0].angle,v=f[0].index,b=0,t=1;tt>t;++t){if(e=f[t].index,k==f[t].angle){if(l=u[v][0]-u[s][0],a=u[v][1]-u[s][1],p=u[e][0]-u[s][0],w=u[e][1]-u[s][1],l*l+a*a>=p*p+w*w){f[t].index=-1;continue}f[b].index=-1}k=f[t].angle,b=t,v=e}for(h.push(s),t=0,e=0;2>t;++e)f[e].index>-1&&(h.push(f[e].index),t++);for(c=h.length;tt>e;++e)if(!(f[e].index<0)){for(;!pd(h[c-2],h[c-1],f[e].index,u);)--c;h[c++]=f[e].index}for(d=[],t=c-1;t>=0;--t)d.push(n[h[t]]);return d}var r=li,i=er;return arguments.length?t(n):(t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=n,t):i},t)},n.geom.polygon=function(n){return kf(n,su),n},su=n.geom.polygon.prototype=[],su.area=function(){for(var t,i=-1,r=this.length,n=this[r-1],u=0;++i<r;)t=n,n=this[i],u+=t[1]*n[0]-t[0]*n[1];return.5*u},su.centroid=function(n){var i,r,u=-1,f=this.length,e=0,o=0,t=this[f-1];for(arguments.length||(n=-1/(6*this.area()));++u<f;)i=t,t=this[u],r=i[0]*t[1]-t[0]*i[1],e+=(i[0]+t[0])*r,o+=(i[1]+t[1])*r;return[e*n,o*n]},su.clip=function(n){for(var f,e,o,t,i,r,s=oy(n),h=-1,c=this.length-oy(this),u=this[c-1];++h<c;){for(f=n.slice(),n.length=0,t=this[h],i=f[(o=f.length-s)-1],e=-1;++e<o;)r=f[e],ps(r,u,t)?(ps(i,u,t)||n.push(ey(i,r,u,t)),n.push(r)):ps(i,u,t)&&n.push(ey(i,r,u,t)),i=r;s&&n.push(n[0]),u=t}return n},gc=[],nl=[],cy.prototype.prepare=function(){for(var t,n=this.edges,i=n.length;i--;)t=n[i].edge,t.b&&t.a||n.splice(i,1);return n.sort(ly),n.length},ef.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},bs.prototype={insert:function(n,t){var i,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;i=n}else this._?(n=vy(this._),t.P=null,t.N=n,n.P=n.L=t,i=n):(t.P=t.N=null,this._=t,i=null);for(t.L=t.R=null,t.U=i,t.C=!0,n=t;i&&i.C;)r=i.U,i===r.L?(u=r.R,u&&u.C?(i.C=u.C=!1,r.C=!0,n=r):(n===i.R&&(dr(this,i),n=i,i=n.U),i.C=!1,r.C=!0,gr(this,r))):(u=r.L,u&&u.C?(i.C=u.C=!1,r.C=!0,n=r):(n===i.L&&(gr(this,i),n=i,i=n.U),i.C=!1,r.C=!0,dr(this,r))),i=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,r,e,i=n.U,f=n.L,u=n.R;if(r=f?u?vy(u):f:u,i?i.L===n?i.L=r:i.R=r:this._=r,f&&u?(e=r.C,r.C=n.C,r.L=f,f.U=r,r!==u?(i=r.U,r.U=n.U,n=r.R,i.L=n,r.R=u,u.U=r):(r.U=i,i=r,n=r.R)):(e=n.C,n=r),n&&(n.U=i),!e){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,dr(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,gr(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,dr(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,gr(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,dr(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,gr(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},n.geom.voronoi=function(n){function i(n){var o=new Array(n.length),t=r[0][0],i=r[0][1],f=r[1][0],e=r[1][1];return ks(u(n),r).cells.forEach(function(r,u){var h=r.edges,s=r.site,c=o[u]=h.length?h.map(function(n){var t=n.start();return[t.x,t.y]}):s.x>=t&&s.x<=f&&s.y>=i&&s.y<=e?[[t,e],[f,e],[f,i],[t,i]]:[];c.point=n[u]}),o}function u(n){return n.map(function(n,i){return{x:Math.round(s(n,i)/t)*t,y:Math.round(h(n,i)/t)*t,i:i}})}var f=li,e=er,s=f,h=e,r=cu;return n?i(n):(i.links=function(n){return ks(u(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},i.triangles=function(n){var t=[];return ks(u(n)).cells.forEach(function(i,r){for(var l,e,o=i.site,s=i.edges.sort(ly),h=-1,c=s.length,u=s[c-1].edge,f=u.l===o?u.r:u.l;++h<c;)l=u,e=f,u=s[h].edge,f=u.l===o?u.r:u.l,r<e.i&&r<f.i&&fg(o,e,f)<0&&t.push([n[r],n[e.i],n[f.i]])}),t},i.x=function(n){return arguments.length?(s=o(f=n),i):f},i.y=function(n){return arguments.length?(h=o(e=n),i):e},i.clipExtent=function(n){return arguments.length?(r=null==n?cu:n,i):r===cu?null:r},i.size=function(n){return arguments.length?i.clipExtent(n&&[[0,0],n]):r===cu?null:r&&r[1]},i)},cu=[[-1e6,-1e6],[1e6,1e6]],n.geom.delaunay=function(t){return n.geom.voronoi().triangles(t)},n.geom.quadtree=function(n,t,i,r,f){function e(n){function it(n,t,i,r,f,e,o,s){var h,c,l;isNaN(i)||isNaN(r)||(n.leaf?(h=n.x,c=n.y,null!=h?u(h-i)+u(c-r)<.01?nt(n,t,i,r,f,e,o,s):(l=n.point,n.x=n.y=n.point=null,nt(n,l,h,c,f,e,o,s),nt(n,t,i,r,f,e,o,s)):(n.x=i,n.y=r,n.point=t)):nt(n,t,i,r,f,e,o,s))}function nt(n,t,i,r,u,f,e,o){var s=.5*(u+e),h=.5*(f+o),c=i>=s,l=r>=h,a=(l<<1)+c;n.leaf=!1,n=n.nodes[a]||(n.nodes[a]=yy()),c?u=s:e=s,l?f=h:o=h,it(n,t,i,r,u,f,e,o)}var l,d,g,e,tt,a,v,y,p,ft=o(s),et=o(h),b,k,rt,ut,w;if(null!=t)a=t,v=i,y=r,p=f;else if(y=p=-(a=v=1/0),d=[],g=[],tt=n.length,c)for(e=0;tt>e;++e)l=n[e],l.x<a&&(a=l.x),l.y<v&&(v=l.y),l.x>y&&(y=l.x),l.y>p&&(p=l.y),d.push(l.x),g.push(l.y);else for(e=0;tt>e;++e)b=+ft(l=n[e],e),k=+et(l,e),a>b&&(a=b),v>k&&(v=k),b>y&&(y=b),k>p&&(p=k),d.push(b),g.push(k);if(rt=y-a,ut=p-v,rt>ut?p=v+rt:y=a+ut,w=yy(),w.add=function(n){it(w,n,+ft(n,++e),+et(n,e),a,v,y,p)},w.visit=function(n){nu(n,w,a,v,y,p)},e=-1,null==t){for(;++e<tt;)it(w,n[e],d[e],g[e],a,v,y,p);--e}else n.forEach(w.add);return d=g=n=l=null,w}var c,s=li,h=er;return(c=arguments.length)?(s=eg,h=og,3===c&&(f=i,r=t,i=t=0),e(n)):(e.x=function(n){return arguments.length?(s=n,e):s},e.y=function(n){return arguments.length?(h=n,e):h},e.extent=function(n){return arguments.length?(null==n?t=i=r=f=null:(t=+n[0][0],i=+n[0][1],r=+n[1][0],f=+n[1][1]),e):null==t?null:[[t,i],[r,f]]},e.size=function(n){return arguments.length?(null==n?t=i=r=f=null:(t=i=0,r=+n[0],f=+n[1]),e):null==t?null:[r-t,f-i]},e)},n.interpolateRgb=ds,n.interpolateObject=py,n.interpolateNumber=ht,n.interpolateString=wy,lu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,n.interpolate=ai,n.interpolators=[function(n,t){var i=typeof t;return("string"===i?fu.has(t)||/^(#|rgb\(|hsl\()/.test(t)?ds:wy:t instanceof gi?ds:"object"===i?Array.isArray(t)?sf:py:ht)(n,t)}],n.interpolateArray=sf;var eb=function(){return a},uut=n.map({linear:eb,poly:ag,quad:function(){return hg},cubic:function(){return cg},sin:function(){return vg},exp:function(){return yg},circle:function(){return pg},elastic:wg,back:bg,bounce:function(){return kg}}),fut=n.map({"in":a,out:by,"in-out":ky,"out-in":function(n){return ky(by(n))}});n.ease=function(n){var t=n.indexOf("-"),i=t>=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return i=uut.get(i)||eb,r=fut.get(r)||a,sg(r(i.apply(null,ww.call(arguments,1))))},n.interpolateHcl=dg,n.interpolateHsl=gg,n.interpolateLab=nn,n.interpolateRound=dy,n.transform=function(t){var i=tt.createElementNS(n.ns.prefix.svg,"g");return(n.transform=function(n){if(null!=n){i.setAttribute("transform",n);var t=i.transform.baseVal.consolidate()}return new gy(t?t.matrix:ob)})(t)},gy.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"},ob={a:1,b:0,c:0,d:1,e:0,f:0},n.interpolateTransform=ip,n.layout={},n.layout.bundle=function(){return function(n){for(var t=[],i=-1,r=n.length;++i<r;)t.push(fn(n[i]));return t}},n.layout.chord=function(){function c(){var v,t,k,c,a,d={},g=[],it=n.range(r),nt=[],p,w;for(i=[],u=[],v=0,c=-1;++c<r;){for(t=0,a=-1;++a<r;)t+=f[c][a];g.push(t),nt.push(n.range(r)),v+=t}for(e&&it.sort(function(n,t){return e(g[n],g[t])}),o&&nt.forEach(function(n,t){n.sort(function(n,i){return o(f[t][n],f[t][i])})}),v=(b-h*r)/v,t=0,c=-1;++c<r;){for(k=t,a=-1;++a<r;){var y=it[c],tt=nt[y][a],rt=f[y][tt],ut=t,ft=t+=rt*v;d[y+"-"+tt]={index:y,subindex:tt,startAngle:ut,endAngle:ft,value:rt}}u[y]={index:y,startAngle:k,endAngle:t,value:(t-k)/v},t+=h}for(c=-1;++c<r;)for(a=c-1;++a<r;)p=d[c+"-"+a],w=d[a+"-"+c],(p.value||w.value)&&i.push(p.value<w.value?{source:w,target:p}:{source:p,target:w});s&&l()}function l(){i.sort(function(n,t){return s((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var i,u,f,r,e,o,s,t={},h=0;return t.matrix=function(n){return arguments.length?(r=(f=n)&&f.length,i=u=null,t):f},t.padding=function(n){return arguments.length?(h=n,i=u=null,t):h},t.sortGroups=function(n){return arguments.length?(e=n,i=u=null,t):e},t.sortSubgroups=function(n){return arguments.length?(o=n,i=null,t):o},t.sortChords=function(n){return arguments.length?(s=n,i&&l(),t):s},t.chords=function(){return i||c(),i},t.groups=function(){return u||c(),u},t},n.layout.force=function(){function k(n){return function(t,i,r,u){var e;if(t.point!==n){var o=t.cx-n.x,s=t.cy-n.y,f=1/Math.sqrt(o*o+s*s);if(b>(u-i)*f)return e=t.charge*f*f,n.px-=o*e,n.py-=s*e,!0;t.point&&isFinite(f)&&(e=t.pointCharge*f*f,n.px-=o*e,n.py-=s*e)}return!t.charge}}function d(i){i.px=n.event.x,i.py=n.event.y,t.resume()}var h,r,c,l,v,t={},y=n.dispatch("start","tick","end"),f=[1,1],p=.9,o=sb,s=hb,e=-30,w=.1,b=.8,i=[],u=[];return t.tick=function(){if((r*=.99)<.005)return y.end({type:"end",alpha:r=0}),!0;for(var tt,t,b,g,d,s,h,a,nt=i.length,it=u.length,o=0;it>o;++o)t=u[o],b=t.source,g=t.target,h=g.x-b.x,a=g.y-b.y,(d=h*h+a*a)&&(d=r*l[o]*((d=Math.sqrt(d))-c[o])/d,h*=d,a*=d,g.x-=h*(s=b.weight/(g.weight+b.weight)),g.y-=a*s,b.x+=h*(s=1-s),b.y+=a*s);if((s=r*w)&&(h=f[0]/2,a=f[1]/2,o=-1,s))for(;++o<nt;)t=i[o],t.x+=(h-t.x)*s,t.y+=(a-t.y)*s;if(e)for(up(tt=n.geom.quadtree(i),r,v),o=-1;++o<nt;)(t=i[o]).fixed||tt.visit(k(t));for(o=-1;++o<nt;)t=i[o],t.fixed?(t.x=t.px,t.y=t.py):(t.x-=(t.px-(t.px=t.x))*p,t.y-=(t.py-(t.py=t.y))*p);y.tick({type:"tick",alpha:r})},t.nodes=function(n){return arguments.length?(i=n,t):i},t.links=function(n){return arguments.length?(u=n,t):u},t.size=function(n){return arguments.length?(f=n,t):f},t.linkDistance=function(n){return arguments.length?(o="function"==typeof n?n:+n,t):o},t.distance=t.linkDistance,t.linkStrength=function(n){return arguments.length?(s="function"==typeof n?n:+n,t):s},t.friction=function(n){return arguments.length?(p=+n,t):p},t.charge=function(n){return arguments.length?(e="function"==typeof n?n:+n,t):e},t.gravity=function(n){return arguments.length?(w=+n,t):w},t.theta=function(n){return arguments.length?(b=+n,t):b},t.alpha=function(i){return arguments.length?(i=+i,r?r=i>0?i:0:i>0&&(y.start({type:"start",alpha:r=i}),n.timer(t.tick)),t):r},t.start=function(){function p(t,i){var f;if(!h){for(h=new Array(a),r=0;a>r;++r)h[r]=[];for(r=0;s>r;++r)f=u[r],h[f.source.index].push(f.target),h[f.target.index].push(f.source)}for(var e,o=h[n],r=-1,s=o.length;++r<s;)if(!isNaN(e=o[r][t]))return e;return Math.random()*i}for(var h,r,a=i.length,y=u.length,w=f[0],b=f[1],n=0;a>n;++n)(r=i[n]).index=n,r.weight=0;for(n=0;y>n;++n)r=u[n],"number"==typeof r.source&&(r.source=i[r.source]),"number"==typeof r.target&&(r.target=i[r.target]),++r.source.weight,++r.target.weight;for(n=0;a>n;++n)r=i[n],isNaN(r.x)&&(r.x=p("x",w)),isNaN(r.y)&&(r.y=p("y",b)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(c=[],"function"==typeof o)for(n=0;y>n;++n)c[n]=+o.call(this,u[n],n);else for(n=0;y>n;++n)c[n]=o;if(l=[],"function"==typeof s)for(n=0;y>n;++n)l[n]=+s.call(this,u[n],n);else for(n=0;y>n;++n)l[n]=s;if(v=[],"function"==typeof e)for(n=0;a>n;++n)v[n]=+e.call(this,i[n],n);else for(n=0;a>n;++n)v[n]=e;return t.resume()},t.resume=function(){return t.alpha(.1)},t.stop=function(){return t.alpha(0)},t.drag=function(){return h||(h=n.behavior.drag().origin(a).on("dragstart.force",on).on("drag.force",d).on("dragend.force",sn)),arguments.length?(this.on("mouseover.force",hn).on("mouseout.force",cn).call(h),void 0):h},n.rebind(t,y,"on")},sb=20,hb=1,n.layout.hierarchy=function(){function u(f,e,o){var s=r.call(n,f,e);if(f.depth=e,o.push(f),s&&(h=s.length)){for(var h,c,l=-1,a=f.children=new Array(h),v=0,y=e+1;++l<h;)c=a[l]=u(s[l],y,o),c.parent=f,v+=c.value;i&&a.sort(i),t&&(f.value=v)}else delete f.children,t&&(f.value=+t.call(n,f,e)||0);return f}function f(i,r){var e=i.children,u=0,s,o,h;if(e&&(s=e.length))for(o=-1,h=r+1;++o<s;)u+=f(e[o],h);else t&&(u=+t.call(n,i,r)||0);return t&&(i.value=u),u}function n(n){var t=[];return u(n,0,t),t}var i=vn,r=ln,t=an;return n.sort=function(t){return arguments.length?(i=t,n):i},n.children=function(t){return arguments.length?(r=t,n):r},n.value=function(i){return arguments.length?(t=i,n):t},n.revalue=function(n){return f(n,0),n},n},n.layout.partition=function(){function r(n,t,i,u){var f=n.children,o,s,h,e;if(n.x=t,n.y=n.depth*u,n.dx=i,n.dy=u,f&&(o=f.length))for(e=-1,i=n.value?i/n.value:0;++e<o;)r(s=f[e],t,h=s.value*i,u),t+=h}function u(n){var t=n.children,i=0,f,r;if(t&&(f=t.length))for(r=-1;++r<f;)i=Math.max(i,u(t[r]));return 1+i}function i(n,i){var e=f.call(this,n,i);return r(e[0],0,t[0],t[1]/u(e[0])),e}var f=n.layout.hierarchy(),t=[1,1];return i.size=function(n){return arguments.length?(t=n,i):t},tu(i,f)},n.layout.pie=function(){function t(e){var o=e.map(function(n,i){return+f.call(t,n,i)}),s=+("function"==typeof r?r.apply(this,arguments):r),l=(("function"==typeof u?u.apply(this,arguments):u)-s)/n.sum(o),c=n.range(e.length),h;return null!=i&&c.sort(i===tl?function(n,t){return o[t]-o[n]}:function(n,t){return i(e[n],e[t])}),h=[],c.forEach(function(n){var t;h[n]={data:e[n],value:t=o[n],startAngle:s,endAngle:s+=t*l}}),h}var f=Number,i=tl,r=0,u=b;return t.value=function(n){return arguments.length?(f=n,t):f},t.sort=function(n){return arguments.length?(i=n,t):i},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(u=n,t):u},t},tl={},n.layout.stack=function(){function t(s,h){var l=s.map(function(n,i){return r.call(t,n,i)}),a=l.map(function(n){return n.map(function(n,i){return[e.call(t,n,i),o.call(t,n,i)]})}),y=u.call(t,a,h);l=n.permute(l,y),a=n.permute(a,y);for(var v,p,w=f.call(t,a,h),b=l.length,k=l[0].length,c=0;k>c;++c)for(i.call(t,l[0][c],p=w[c],a[0][c][1]),v=1;b>v;++v)i.call(t,l[v][c],p+=a[v-1][c][1],a[v][c][1]);return s}var r=a,u=gs,f=nh,i=bn,e=pn,o=wn;return t.values=function(n){return arguments.length?(r=n,t):r},t.order=function(n){return arguments.length?(u="function"==typeof n?n:cb.get(n)||gs,t):u},t.offset=function(n){return arguments.length?(f="function"==typeof n?n:lb.get(n)||nh,t):f},t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(o=n,t):o},t.out=function(n){return arguments.length?(i=n,t):i},t},cb=n.map({"inside-out":function(t){for(var i,u=t.length,f=t.map(kn),e=t.map(dn),l=n.range(u).sort(function(n,t){return f[n]-f[t]}),o=0,s=0,h=[],c=[],r=0;u>r;++r)i=l[r],s>o?(o+=e[i],h.push(i)):(s+=e[i],c.push(i));return c.reverse().concat(h)},reverse:function(t){return n.range(t.length).reverse()},"default":gs}),lb=n.map({silhouette:function(n){for(var r,i,s=n.length,f=n[0].length,e=[],u=0,o=[],t=0;f>t;++t){for(r=0,i=0;s>r;r++)i+=n[r][t][1];i>u&&(u=i),e.push(i)}for(t=0;f>t;++t)o[t]=(u-e[t])/2;return o},wiggle:function(n){var i,t,r,u,h,c,f,e,o,a=n.length,l=n[0],v=l.length,s=[];for(s[0]=e=o=0,t=1;v>t;++t){for(i=0,u=0;a>i;++i)u+=n[i][t][1];for(i=0,h=0,f=l[t][0]-l[t-1][0];a>i;++i){for(r=0,c=(n[i][t][1]-n[i][t-1][1])/(2*f);i>r;++r)c+=(n[r][t][1]-n[r][t-1][1])/f;h+=c*n[i][t][1]}s[t]=e-=u?h/u*f:0,o>e&&(o=e)}for(t=0;v>t;++t)s[t]-=o;return s},expand:function(n){for(var t,r,u=n.length,f=n[0].length,o=1/u,e=[],i=0;f>i;++i){for(t=0,r=0;u>t;t++)r+=n[t][i][1];if(r)for(t=0;u>t;t++)n[t][i][1]/=r;else for(t=0;u>t;t++)n[t][i][1]=o}for(i=0;f>i;++i)e[i]=0;return e},zero:nh}),n.layout.histogram=function(){function t(t,e){for(var o,s,l=[],h=t.map(r,this),a=u.call(this,h,e),c=f.call(this,a,h,e),e=-1,y=h.length,v=c.length-1,p=i?1:1/y;++e<v;)o=l[e]=[],o.dx=c[e+1]-(o.x=c[e]),o.y=0;if(v>0)for(e=-1;++e<y;)s=h[e],s>=a[0]&&s<=a[1]&&(o=l[n.bisect(c,s,1,v)-1],o.y+=p,o.push(t[e]));return l}var i=!0,r=Number,u=ttt,f=ntt;return t.value=function(n){return arguments.length?(r=n,t):r},t.range=function(n){return arguments.length?(u=o(n),t):u},t.bins=function(n){return arguments.length?(f="number"==typeof n?function(t){return fp(t,n)}:o(n),t):f},t.frequency=function(n){return arguments.length?(i=!!n,t):i},t},n.layout.tree=function(){function i(n,i){function h(n,t){var f=n.children,i=n._tree,o;if(f&&(s=f.length)){for(var s,e,u,c=f[0],l=c,a=-1;++a<s;)u=f[a],h(u,e),l=v(u,e,l),e=u;ftt(n),o=.5*(c._tree.prelim+u._tree.prelim),t?(i.prelim=t._tree.prelim+r(n,t),i.mod=i.prelim-o):i.prelim=o}else t&&(i.prelim=t._tree.prelim+r(n,t))}function c(n,t){var i,u,r;if(n.x=n._tree.prelim+t,i=n.children,i&&(u=i.length))for(r=-1,t+=n._tree.mod;++r<u;)c(i[r],t)}function v(n,t,i){if(t){for(var s,f=n,e=n,u=t,o=n.parent.children[0],h=f._tree.mod,c=e._tree.mod,l=u._tree.mod,a=o._tree.mod;u=ih(u),f=th(f),u&&f;)o=th(o),e=ih(e),e._tree.ancestor=n,s=u._tree.prelim+l-f._tree.prelim-h+r(u,f),s>0&&(ett(ott(u,n,i),n,s),h+=s,c+=s),l+=u._tree.mod,h+=f._tree.mod,a+=o._tree.mod,c+=e._tree.mod;u&&!ih(e)&&(e._tree.thread=u,e._tree.mod+=l-c),f&&!th(o)&&(o._tree.thread=f,o._tree.mod+=h-a,i=n)}return i}var l=f.call(this,n,i),e=l[0];ct(e,function(n,t){n._tree={ancestor:n,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),h(e),c(e,-e._tree.prelim);var o=hf(e,rtt),s=hf(e,itt),y=hf(e,utt),a=o.x-r(o,s)/2,p=s.x+r(s,o)/2,w=y.depth||1;return ct(e,u?function(n){n.x*=t[0],n.y=n.depth*t[1],delete n._tree}:function(n){n.x=(n.x-a)/(p-a)*t[0],n.y=n.depth/w*t[1],delete n._tree}),l}var f=n.layout.hierarchy().sort(null).value(null),r=ep,t=[1,1],u=!1;return i.separation=function(n){return arguments.length?(r=n,i):r},i.size=function(n){return arguments.length?(u=null==(t=n),i):u?null:t},i.nodeSize=function(n){return arguments.length?(u=null!=(t=n),i):u?t:null},tu(i,f)},n.layout.pack=function(){function i(n,i){var c=f.call(this,n,i),e=c[0],o=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t},h;return(e.x=e.y=0,ct(e,function(n){n.r=+l(n.value)}),ct(e,hp),r)&&(h=r*(t?1:Math.max(2*e.r/o,2*e.r/s))/2,ct(e,function(n){n.r+=h}),ct(e,hp),ct(e,function(n){n.r-=h})),cp(e,o/2,s/2,t?1:1/Math.max(2*e.r/o,2*e.r/s)),c}var t,f=n.layout.hierarchy().sort(stt),r=0,u=[1,1];return i.size=function(n){return arguments.length?(u=n,i):u},i.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,i):t},i.padding=function(n){return arguments.length?(r=+n,i):r},tu(i,f)},n.layout.cluster=function(){function i(n,i){var o,c=f.call(this,n,i),e=c[0],a=0;ct(e,function(n){var t=n.children;t&&t.length?(n.x=att(t),n.y=ltt(t)):(n.x=o?a+=r(n,o):0,n.y=0,o=n)});var s=ap(e),h=vp(e),l=s.x-r(s,h)/2,v=h.x+r(h,s)/2;return ct(e,u?function(n){n.x=(n.x-e.x)*t[0],n.y=(e.y-n.y)*t[1]}:function(n){n.x=(n.x-l)/(v-l)*t[0],n.y=(1-(e.y?n.y/e.y:1))*t[1]}),c}var f=n.layout.hierarchy().sort(null).value(null),r=ep,t=[1,1],u=!1;return i.separation=function(n){return arguments.length?(r=n,i):r},i.size=function(n){return arguments.length?(u=null==(t=n),i):u?null:t},i.nodeSize=function(n){return arguments.length?(u=null!=(t=n),i):u?t:null},tu(i,f)},n.layout.treemap=function(){function o(n,t){for(var r,i,u=-1,f=n.length;++u<f;)i=(r=n[u]).value*(0>t?0:t),r.area=isNaN(i)||0>=i?0:i}function a(n){var u=n.children;if(u&&u.length){var l,v,y,r=c(n),t=[],f=u.slice(),h=1/0,e="slice"===i?r.dx:"dice"===i?r.dy:"slice-dice"===i?1&n.depth?r.dy:r.dx:Math.min(r.dx,r.dy);for(o(f,r.dx*r.dy/n.value),t.area=0;(y=f.length)>0;)t.push(l=f[y-1]),t.area+=l.area,"squarify"!==i||(v=p(t,e))<=h?(f.pop(),h=v):(t.area-=t.pop().area,s(t,e,r,!1),e=Math.min(r.dx,r.dy),t.length=t.area=0,h=1/0);t.length&&(s(t,e,r,!0),t.length=t.area=0),u.forEach(a)}}function v(n){var u=n.children;if(u&&u.length){var i,r=c(n),f=u.slice(),t=[];for(o(f,r.dx*r.dy/n.value),t.area=0;i=f.pop();)t.push(i),t.area+=i.area,null!=i.z&&(s(t,i.z?r.dx:r.dy,r,!f.length),t.length=t.area=0);u.forEach(v)}}function p(n,t){for(var i,r=n.area,u=0,f=1/0,o=-1,s=n.length;++o<s;)(i=n[o].area)&&(f>i&&(f=i),i>u&&(u=i));return r*=r,t*=t,r?Math.max(t*u*e/r,r/(t*f*e)):1/0}function s(n,t,i,r){var f,h=-1,c=n.length,o=i.x,s=i.y,e=t?u(n.area/t):0;if(t==i.dx){for((r||e>i.dy)&&(e=i.dy);++h<c;)f=n[h],f.x=o,f.y=s,f.dy=e,o+=f.dx=Math.min(i.x+i.dx-o,e?u(f.area/e):0);f.z=!0,f.dx+=i.x+i.dx-o,i.y+=e,i.dy-=e}else{for((r||e>i.dx)&&(e=i.dx);++h<c;)f=n[h],f.x=o,f.y=s,f.dx=e,s+=f.dy=Math.min(i.y+i.dy-s,e?u(f.area/e):0);f.z=!1,f.dy+=i.y+i.dy-s,i.x+=e,i.dx-=e}}function t(n){var i=r||h(n),t=i[0];return t.x=0,t.y=0,t.dx=f[0],t.dy=f[1],r&&h.revalue(t),o([t],t.dx*t.dy/t.value),(r?v:a)(t),l&&(r=i),i}var r,h=n.layout.hierarchy(),u=Math.round,f=[1,1],y=null,c=uh,l=!1,i="squarify",e=.5*(1+Math.sqrt(5));return t.size=function(n){return arguments.length?(f=n,t):f},t.padding=function(n){function u(i){var r=n.call(t,i,i.depth);return null==r?uh(i):yp(i,"number"==typeof r?[r,r,r,r]:r)}function i(t){return yp(t,n)}if(!arguments.length)return y;var r;return c=null==(y=n)?uh:"function"==(r=typeof n)?u:"number"===r?(n=[n,n,n,n],i):i,t},t.round=function(n){return arguments.length?(u=n?Math.round:Number,t):u!=Number},t.sticky=function(n){return arguments.length?(l=n,r=null,t):l},t.ratio=function(n){return arguments.length?(e=n,t):e},t.mode=function(n){return arguments.length?(i=n+"",t):i},tu(t,h)},n.random={normal:function(n,t){var i=arguments.length;return 2>i&&(t=1),1>i&&(n=0),function(){var r,u,i;do r=2*Math.random()-1,u=2*Math.random()-1,i=r*r+u*u;while(!i||i>1);return n+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=n.random.normal.apply(n,arguments);return function(){return Math.exp(t())}},irwinHall:function(n){return function(){for(var t=0,i=0;n>i;i++)t+=Math.random();return t/n}}},n.scale={},ab={floor:a,ceil:a},n.scale.linear=function(){return pp([0,1],[0,1],ai,!1)},vb={s:1,g:1,p:1,r:1,e:1},n.scale.log=function(){return bp(n.scale.linear().domain([0,1]),10,!0,[1,10])},il=n.format(".0e"),yb={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}},n.scale.pow=function(){return kp(n.scale.linear(),1,[0,1])},n.scale.sqrt=function(){return n.scale.pow().exponent(.5)},n.scale.ordinal=function(){return dp([],{t:"range",a:[[]]})},n.scale.category10=function(){return n.scale.ordinal().range(eut)},n.scale.category20=function(){return n.scale.ordinal().range(out)},n.scale.category20b=function(){return n.scale.ordinal().range(sut)},n.scale.category20c=function(){return n.scale.ordinal().range(hut)};var eut=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(wu),out=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(wu),sut=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(wu),hut=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(wu);n.scale.quantile=function(){return gp([],[])},n.scale.quantize=function(){return nw(0,1,[0,1])},n.scale.threshold=function(){return tw([.5],[0,1])},n.scale.identity=function(){return iw([0,1])},n.svg={},n.svg.arc=function(){function n(){var e=t.apply(this,arguments),n=i.apply(this,arguments),o=r.apply(this,arguments)+ei,s=u.apply(this,arguments)+ei,h=(o>s&&(h=o,o=s,s=h),s-o),c=f>h?"0":"1",l=Math.cos(o),a=Math.sin(o),v=Math.cos(s),y=Math.sin(s);return h>=pb?e?"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+-e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z":e?"M"+n*l+","+n*a+"A"+n+","+n+" 0 "+c+",1 "+n*v+","+n*y+"L"+e*v+","+e*y+"A"+e+","+e+" 0 "+c+",0 "+e*l+","+e*a+"Z":"M"+n*l+","+n*a+"A"+n+","+n+" 0 "+c+",1 "+n*v+","+n*y+"L0,0Z"}var t=btt,i=ktt,r=rw,u=uw;return n.innerRadius=function(i){return arguments.length?(t=o(i),n):t},n.outerRadius=function(t){return arguments.length?(i=o(t),n):i},n.startAngle=function(t){return arguments.length?(r=o(t),n):r},n.endAngle=function(t){return arguments.length?(u=o(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+i.apply(this,arguments))/2,f=(r.apply(this,arguments)+u.apply(this,arguments))/2+ei;return[Math.cos(f)*n,Math.sin(f)*n]},n},ei=-k,pb=b-t,n.svg.line=function(){return fw(a)},ke=n.map({linear:g,"linear-closed":dtt,step:gtt,"step-before":ch,"step-after":lh,basis:ew,"basis-open":rit,"basis-closed":uit,bundle:fit,cardinal:iit,"cardinal-open":nit,"cardinal-closed":tit,monotone:sit}),ke.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var wb=[0,2/3,1/3,0],bb=[0,1/3,2/3,0],oi=[0,1/6,2/3,1/6];n.svg.line.radial=function(){var n=fw(ow);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},ch.reverse=lh,lh.reverse=ch,n.svg.area=function(){return sw(a)},n.svg.area.radial=function(){var n=sw(ow);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},n.svg.chord=function(){function n(n,u){var f=h(this,i,n,u),e=h(this,r,n,u);return"M"+f.p0+c(f.r,f.p1,f.a1-f.a0)+(l(f,e)?t(f.r,f.p1,f.r,f.p0):t(f.r,f.p1,e.r,e.p0)+c(e.r,e.p1,e.a1-e.a0)+t(e.r,e.p1,f.r,f.p0))+"Z"}function h(n,t,i,r){var o=t.call(n,i,r),f=u.call(n,o,r),h=e.call(n,o,r)+ei,c=s.call(n,o,r)+ei;return{r:f,a0:h,a1:c,p0:[f*Math.cos(h),f*Math.sin(h)],p1:[f*Math.cos(c),f*Math.sin(c)]}}function l(n,t){return n.a0==t.a0&&n.a1==t.a1}function c(n,t,i){return"A"+n+","+n+" 0 "+ +(i>f)+",1 "+t}function t(n,t,i,r){return"Q 0,0 "+r}var i=as,r=vs,u=hit,e=rw,s=uw;return n.radius=function(t){return arguments.length?(u=o(t),n):u},n.source=function(t){return arguments.length?(i=o(t),n):i},n.target=function(t){return arguments.length?(r=o(t),n):r},n.startAngle=function(t){return arguments.length?(e=o(t),n):e},n.endAngle=function(t){return arguments.length?(s=o(t),n):s},n},n.svg.diagonal=function(){function n(n,u){var e=t.call(this,n,u),o=i.call(this,n,u),s=(e.y+o.y)/2,f=[e,{x:e.x,y:s},{x:o.x,y:s},o];return f=f.map(r),"M"+f[0]+"C"+f[1]+" "+f[2]+" "+f[3]}var t=as,i=vs,r=hw;return n.source=function(i){return arguments.length?(t=o(i),n):t},n.target=function(t){return arguments.length?(i=o(t),n):i},n.projection=function(t){return arguments.length?(r=t,n):r},n},n.svg.diagonal.radial=function(){var t=n.svg.diagonal(),i=hw,r=t.projection;return t.projection=function(n){return arguments.length?r(cit(i=n)):i},t},n.svg.symbol=function(){function n(n,r){return(rl.get(t.call(this,n,r))||cw)(i.call(this,n,r))}var t=ait,i=lit;return n.type=function(i){return arguments.length?(t=o(i),n):t},n.size=function(t){return arguments.length?(i=o(t),n):i},n},rl=n.map({circle:cw,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*kb)),i=t*kb;return"M0,"+-t+"L"+i+",0 0,"+t+" "+-i+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ge),i=t*ge/2;return"M0,"+i+"L"+t+","+-i+" "+-t+","+-i+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ge),i=t*ge/2;return"M0,"+-i+"L"+t+","+i+" "+-t+","+i+"Z"}}),n.svg.symbolTypes=rl.keys();var di,de,ge=Math.sqrt(3),kb=Math.tan(30*r),l=[],db=0;l.call=e.call,l.empty=e.empty,l.node=e.node,l.size=e.size,n.transition=function(n){return arguments.length?di?n.transition():n:ic.transition()},n.transition.prototype=l,l.select=function(n){var f,i,t,e=this.id,o=[],r,s;for(n=so(n),r=-1,s=this.length;++r<s;){o.push(f=[]);for(var h=this[r],u=-1,c=h.length;++u<c;)(t=h[u])&&(i=n.call(t,t.__data__,u,r))?("__data__"in t&&(i.__data__=t.__data__),vf(i,u,e,t.__transition__[e]),f.push(i)):f.push(null)}return ru(o,e)},l.selectAll=function(n){var s,u,t,f,h,e=this.id,c=[],i,l,r,v;for(n=pl(n),i=-1,l=this.length;++i<l;)for(var a=this[i],o=-1,y=a.length;++o<y;)if(t=a[o])for(h=t.__transition__[e],u=n.call(t,t.__data__,o,i),c.push(s=[]),r=-1,v=u.length;++r<v;)(f=u[r])&&vf(f,r,e,h),s.push(f);return ru(c,e)},l.filter=function(n){var u,o,i,f=[],t,e;for("function"!=typeof n&&(n=ia(n)),t=0,e=this.length;e>t;t++){f.push(u=[]);for(var o=this[t],r=0,s=o.length;s>r;r++)(i=o[r])&&n.call(i,i.__data__,r,t)&&u.push(i)}return ru(f,this.id)},l.tween=function(n,t){var i=this.id;return arguments.length<2?this.node().__transition__[i].tween.get(n):kt(this,null==t?function(t){t.__transition__[i].tween.remove(n)}:function(r){r.__transition__[i].tween.set(n,t)})},l.attr=function(t,i){function f(){this.removeAttribute(r)}function e(){this.removeAttributeNS(r.space,r.local)}function o(n){return null==n?f:(n+="",function(){var t,i=this.getAttribute(r);return i!==n&&(t=u(i,n),function(n){this.setAttribute(r,t(n))})})}function s(n){return null==n?e:(n+="",function(){var t,i=this.getAttributeNS(r.space,r.local);return i!==n&&(t=u(i,n),function(n){this.setAttributeNS(r.space,r.local,t(n))})})}if(arguments.length<2){for(i in t)this.attr(i,t[i]);return this}var u="transform"==t?ip:ai,r=n.ns.qualify(t);return ph(this,"attr."+t,i,r.local?s:o)},l.attrTween=function(t,i){function u(n,t){var u=i.call(this,n,t,this.getAttribute(r));return u&&function(n){this.setAttribute(r,u(n))}}function f(n,t){var u=i.call(this,n,t,this.getAttributeNS(r.space,r.local));return u&&function(n){this.setAttributeNS(r.space,r.local,u(n))}}var r=n.ns.qualify(t);return this.tween("attr."+t,r.local?f:u)},l.style=function(n,t,i){function u(){this.style.removeProperty(n)}function f(t){return null==t?u:(t+="",function(){var r,u=v.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=ai(u,t),function(t){this.style.setProperty(n,r(t),i)})})}var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(i in n)this.style(i,n[i],t);return this}i=""}return ph(this,"style."+n,t,f)},l.styleTween=function(n,t,i){function r(r,u){var f=t.call(this,r,u,v.getComputedStyle(this,null).getPropertyValue(n));return f&&function(t){this.style.setProperty(n,f(t),i)}}return arguments.length<3&&(i=""),this.tween("style."+n,r)},l.text=function(n){return ph(this,"text",n,vit)},l.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},l.ease=function(t){var i=this.id;return arguments.length<1?this.node().__transition__[i].ease:("function"!=typeof t&&(t=n.ease.apply(n,arguments)),kt(this,function(n){n.__transition__[i].ease=t}))},l.delay=function(n){var t=this.id;return kt(this,"function"==typeof n?function(i,r,u){i.__transition__[t].delay=+n.call(i,i.__data__,r,u)}:(n=+n,function(i){i.__transition__[t].delay=n}))},l.duration=function(n){var t=this.id;return kt(this,"function"==typeof n?function(i,r,u){i.__transition__[t].duration=Math.max(1,n.call(i,i.__data__,r,u))}:(n=Math.max(1,n),function(i){i.__transition__[t].duration=n}))},l.each=function(t,i){var r=this.id,u,f;return arguments.length<2?(u=de,f=di,di=r,kt(this,function(n,i,u){de=n.__transition__[r],t.call(n,n.__data__,i,u)}),de=u,di=f):kt(this,function(u){var f=u.__transition__[r];(f.event||(f.event=n.dispatch("start","end"))).on(t,i)}),this},l.transition=function(){for(var u,o,n,t,s=this.id,f=++db,e=[],r=0,h=this.length;h>r;r++){e.push(u=[]);for(var o=this[r],i=0,c=o.length;c>i;i++)(n=o[i])&&(t=Object.create(n.__transition__[s]),t.delay+=t.duration,vf(n,i,f,t)),u.push(n)}return ru(e,f)},n.svg.axis=function(){function i(i){i.each(function(){var v,ut=n.select(this),p=this.__chart__||o,i=this.__chart__=o.copy(),ot=null==h?i.ticks?i.ticks.apply(i,s):i.domain():h,st=null==e?i.tickFormat?i.tickFormat.apply(i,s):a:e,w=ut.selectAll(".tick").data(ot,i),y=w.enter().insert("g",".domain").attr("class","tick").style("opacity",t),ht=n.transition(w.exit()).style("opacity",t).remove(),it=n.transition(w).style("opacity",1),l=cf(i),ft=ut.selectAll(".domain").data([0]),b=(ft.enter().append("path").attr("class","domain"),n.transition(ft)),rt,et;y.append("line"),y.append("text");var k=y.select("line"),d=it.select("line"),g=w.select("text").text(st),nt=y.select("text"),tt=it.select("text");switch(c){case"bottom":v=lw,k.attr("y2",r),nt.attr("y",Math.max(r,0)+f),d.attr("x2",0).attr("y2",r),tt.attr("x",0).attr("y",Math.max(r,0)+f),g.attr("dy",".71em").style("text-anchor","middle"),b.attr("d","M"+l[0]+","+u+"V0H"+l[1]+"V"+u);break;case"top":v=lw,k.attr("y2",-r),nt.attr("y",-(Math.max(r,0)+f)),d.attr("x2",0).attr("y2",-r),tt.attr("x",0).attr("y",-(Math.max(r,0)+f)),g.attr("dy","0em").style("text-anchor","middle"),b.attr("d","M"+l[0]+","+-u+"V0H"+l[1]+"V"+-u);break;case"left":v=aw,k.attr("x2",-r),nt.attr("x",-(Math.max(r,0)+f)),d.attr("x2",-r).attr("y2",0),tt.attr("x",-(Math.max(r,0)+f)).attr("y",0),g.attr("dy",".32em").style("text-anchor","end"),b.attr("d","M"+-u+","+l[0]+"H0V"+l[1]+"H"+-u);break;case"right":v=aw,k.attr("x2",r),nt.attr("x",Math.max(r,0)+f),d.attr("x2",r).attr("y2",0),tt.attr("x",Math.max(r,0)+f).attr("y",0),g.attr("dy",".32em").style("text-anchor","start"),b.attr("d","M"+u+","+l[0]+"H0V"+l[1]+"H"+u)}i.rangeBand?(rt=i,et=rt.rangeBand()/2,p=i=function(n){return rt(n)+et}):p.rangeBand?p=i:ht.call(v,i),y.call(v,p),it.call(v,i)})}var e,o=n.scale.linear(),c=ul,r=6,u=6,f=3,s=[10],h=null;return i.scale=function(n){return arguments.length?(o=n,i):o},i.orient=function(n){return arguments.length?(c=n in gb?n+"":ul,i):c},i.ticks=function(){return arguments.length?(s=arguments,i):s},i.tickValues=function(n){return arguments.length?(h=n,i):h},i.tickFormat=function(n){return arguments.length?(e=n,i):e},i.tickSize=function(n){var t=arguments.length;return t?(r=+n,u=+arguments[t-1],i):r},i.innerTickSize=function(n){return arguments.length?(r=+n,i):r},i.outerTickSize=function(n){return arguments.length?(u=+n,i):u},i.tickPadding=function(n){return arguments.length?(f=+n,i):f},i.tickSubdivide=function(){return arguments.length&&i},i},ul="bottom",gb={top:1,right:1,bottom:1,left:1},n.svg.brush=function(){function f(t){t.each(function(){var i=n.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",b).on("touchstart.brush",b),h=i.selectAll(".background").data([0]),e,t,o,s;h.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move"),e=i.selectAll(".resize").data(l,a),e.exit().remove(),e.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return cut[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),e.style("display",f.empty()?"none":null),o=n.transition(i),s=n.transition(h),r&&(t=cf(r),s.attr("x",t[0]).attr("width",t[1]-t[0]),p(o)),u&&(t=cf(u),s.attr("y",t[0]).attr("height",t[1]-t[0]),w(o)),y(o)})}function y(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+t[+/e$/.test(n)]+","+i[+/^s/.test(n)]+")"})}function p(n){n.select(".extent").attr("x",t[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",t[1]-t[0])}function w(n){n.select(".extent").attr("y",i[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",i[1]-i[0])}function b(){function ht(){32==n.event.keyCode&&(b||(a=null,l[0]-=t[1],l[1]-=i[1],b=2),wt())}function ct(){32==n.event.keyCode&&2==b&&(l[0]+=t[1],l[1]+=i[1],b=0,wt())}function g(){var f=n.mouse(tt),e=!1;nt&&(f[0]+=nt[0],f[1]+=nt[1]),b||(n.event.altKey?(a||(a=[(t[0]+t[1])/2,(i[0]+i[1])/2]),l[0]=t[+(f[0]<a[0])],l[1]=i[+(f[1]<a[1])]):a=null),lt&&ot(f,r,0)&&(p(k),e=!0),at&&ot(f,u,1)&&(w(k),e=!0),e&&(y(k),rt({type:"brush",mode:b?"move":"resize"}))}function ot(n,r,u){var f,y,k=cf(r),p=k[0],w=k[1],c=l[u],v=u?i:t,d=v[1]-v[0];return b&&(p-=c,w-=d+c),f=(u?h:s)?Math.max(p,Math.min(w,n[u])):n[u],b?y=(f+=c)+d:(a&&(c=Math.max(p,Math.min(w,2*a[u]-f))),f>c?(y=f,f=c):y=c),v[0]!=f||v[1]!=y?(u?o=null:e=null,v[0]=f,v[1]=y,!0):void 0}function st(){g(),k.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),n.select("body").style("cursor",null),ut.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),vt(),rt({type:"brushend"})}var a,nt,tt=this,it=n.select(n.event.target),rt=c.of(tt,arguments),k=n.select(tt),d=it.datum(),lt=!/^(n|s)$/.test(d)&&r,at=!/^(e|w)$/.test(d)&&u,b=it.classed("extent"),vt=vu(),l=n.mouse(tt),ut=n.select(v).on("keydown.brush",ht).on("keyup.brush",ct),ft,et;(n.event.changedTouches?ut.on("touchmove.brush",g).on("touchend.brush",st):ut.on("mousemove.brush",g).on("mouseup.brush",st),k.interrupt().selectAll("*").interrupt(),b)?(l[0]=t[0]-l[0],l[1]=i[0]-l[1]):d?(ft=+/w$/.test(d),et=+/^n/.test(d),nt=[t[1-ft]-l[0],i[1-et]-l[1]],l[0]=t[ft],l[1]=i[et]):n.event.altKey&&(a=l.slice()),k.style("pointer-events","none").selectAll(".resize").style("display",null),n.select("body").style("cursor",it.style("cursor")),rt({type:"brushstart"}),g()}var e,o,c=oo(f,"brushstart","brush","brushend"),r=null,u=null,t=[0,0],i=[0,0],s=!0,h=!0,l=fl[0];return f.event=function(r){r.each(function(){var u=c.of(this,arguments),r={x:t,y:i,i:e,j:o},f=this.__chart__||r;this.__chart__=r,di?n.select(this).transition().each("start.brush",function(){e=f.i,o=f.j,t=f.x,i=f.y,u({type:"brushstart"})}).tween("brush:brush",function(){var n=sf(t,r.x),f=sf(i,r.y);return e=o=null,function(e){t=r.x=n(e),i=r.y=f(e),u({type:"brush",mode:"resize"})}}).each("end.brush",function(){e=r.i,o=r.j,u({type:"brush",mode:"resize"}),u({type:"brushend"})}):(u({type:"brushstart"}),u({type:"brush",mode:"resize"}),u({type:"brushend"}))})},f.x=function(n){return arguments.length?(r=n,l=fl[!r<<1|!u],f):r},f.y=function(n){return arguments.length?(u=n,l=fl[!r<<1|!u],f):u},f.clamp=function(n){return arguments.length?(r&&u?(s=!!n[0],h=!!n[1]):r?s=!!n:u&&(h=!!n),f):r&&u?[s,h]:r?s:u?h:null},f.extent=function(n){var s,h,c,l,a;return arguments.length?(r&&(s=n[0],h=n[1],u&&(s=s[0],h=h[0]),e=[s,h],r.invert&&(s=r(s),h=r(h)),s>h&&(a=s,s=h,h=a),(s!=t[0]||h!=t[1])&&(t=[s,h])),u&&(c=n[0],l=n[1],r&&(c=c[1],l=l[1]),o=[c,l],u.invert&&(c=u(c),l=u(l)),c>l&&(a=c,c=l,l=a),(c!=i[0]||l!=i[1])&&(i=[c,l])),f):(r&&(e?(s=e[0],h=e[1]):(s=t[0],h=t[1],r.invert&&(s=r.invert(s),h=r.invert(h)),s>h&&(a=s,s=h,h=a))),u&&(o?(c=o[0],l=o[1]):(c=i[0],l=i[1],u.invert&&(c=u.invert(c),l=u.invert(l)),c>l&&(a=c,c=l,l=a))),r&&u?[[s,c],[h,l]]:r?[s,h]:u&&[c,l])},f.clear=function(){return f.empty()||(t=[0,0],i=[0,0],e=o=null),f},f.empty=function(){return!!r&&t[0]==t[1]||!!u&&i[0]==i[1]},n.rebind(f,c,"on")};var cut={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],i=n.time={},y=Date,lut=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];lt.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(){pt.setUTCDate.apply(this._,arguments)},setDay:function(){pt.setUTCDay.apply(this._,arguments)},setFullYear:function(){pt.setUTCFullYear.apply(this._,arguments)},setHours:function(){pt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){pt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){pt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){pt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){pt.setUTCSeconds.apply(this._,arguments)},setTime:function(){pt.setTime.apply(this._,arguments)}};var pt=Date.prototype,aut="%a %b %e %X %Y",vut="%m/%d/%Y",yut="%H:%M:%S",el=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ol=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sl=["January","February","March","April","May","June","July","August","September","October","November","December"],hl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i.year=vi(function(n){return n=i.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),i.years=i.year.range,i.years.utc=i.year.utc.range,i.day=vi(function(n){var t=new y(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),i.days=i.day.range,i.days.utc=i.day.utc.range,i.dayOfYear=function(n){var t=i.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},lut.forEach(function(n,t){n=n.toLowerCase(),t=7-t;var r=i[n]=vi(function(n){return(n=i.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var r=i.year(n).getDay();return Math.floor((i.dayOfYear(n)+(r+t)%7)/7)-(r!==t)});i[n+"s"]=r.range,i[n+"s"].utc=r.utc.range,i[n+"OfYear"]=function(n){var r=i.year(n).getDay();return Math.floor((i.dayOfYear(n)+(r+t)%7)/7)}}),i.week=i.sunday,i.weeks=i.sunday.range,i.weeks.utc=i.sunday.utc.range,i.weekOfYear=i.sundayOfYear,i.format=p;var nk=wf(el),put=bf(el),tk=wf(ol),wut=bf(ol),ik=wf(sl),but=bf(sl),rk=wf(hl),kut=bf(hl),uk=/^%/,fk={"-":"",_:" ",0:"0"},no={a:function(n){return ol[n.getDay()]},A:function(n){return el[n.getDay()]},b:function(n){return hl[n.getMonth()]},B:function(n){return sl[n.getMonth()]},c:p(aut),d:function(n,t){return w(n.getDate(),t,2)},e:function(n,t){return w(n.getDate(),t,2)},H:function(n,t){return w(n.getHours(),t,2)},I:function(n,t){return w(n.getHours()%12||12,t,2)},j:function(n,t){return w(1+i.dayOfYear(n),t,3)},L:function(n,t){return w(n.getMilliseconds(),t,3)},m:function(n,t){return w(n.getMonth()+1,t,2)},M:function(n,t){return w(n.getMinutes(),t,2)},p:function(n){return n.getHours()>=12?"PM":"AM"},S:function(n,t){return w(n.getSeconds(),t,2)},U:function(n,t){return w(i.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return w(i.mondayOfYear(n),t,2)},x:p(vut),X:p(yut),y:function(n,t){return w(n.getFullYear()%100,t,2)},Y:function(n,t){return w(n.getFullYear()%1e4,t,4)},Z:vrt,"%":function(){return"%"}},dut={a:yit,A:pit,b:dit,B:git,c:nrt,d:vw,e:vw,H:yw,I:yw,j:srt,L:lrt,m:ort,M:hrt,p:art,S:crt,U:bit,w:wit,W:kit,x:trt,X:irt,y:urt,Y:rrt,Z:frt,"%":yrt},h=/^\s*\d+/,gut=n.map({am:0,pm:1});p.utc=ft,cl=ft("%Y-%m-%dT%H:%M:%S.%LZ"),p.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?wh:cl,wh.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},wh.toString=cl.toString,i.second=vi(function(n){return new y(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),i.seconds=i.second.range,i.seconds.utc=i.second.utc.range,i.minute=vi(function(n){return new y(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),i.minutes=i.minute.range,i.minutes.utc=i.minute.utc.range,i.hour=vi(function(n){var t=n.getTimezoneOffset()/60;return new y(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),i.hours=i.hour.range,i.hours.utc=i.hour.utc.range,i.month=vi(function(n){return n=i.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),i.months=i.month.range,i.months.utc=i.month.utc.range;var to=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],ll=[[i.second,1],[i.second,5],[i.second,15],[i.second,30],[i.minute,1],[i.minute,5],[i.minute,15],[i.minute,30],[i.hour,1],[i.hour,3],[i.hour,6],[i.hour,12],[i.day,1],[i.day,2],[i.week,1],[i.month,1],[i.month,3],[i.year,1]],nft=[[p("%Y"),fr],[p("%B"),function(n){return n.getMonth()}],[p("%b %d"),function(n){return 1!=n.getDate()}],[p("%a %d"),function(n){return n.getDay()&&1!=n.getDate()}],[p("%I %p"),function(n){return n.getHours()}],[p("%I:%M"),function(n){return n.getMinutes()}],[p(":%S"),function(n){return n.getSeconds()}],[p(".%L"),function(n){return n.getMilliseconds()}]],tft=pw(nft);ll.year=i.year,i.scale=function(){return bh(n.scale.linear(),ll,tft)};var ift={range:function(t,i,r){return n.range(+t,+i,r).map(yi)}},ek=ll.map(function(n){return[n[0].utc,n[1]]}),rft=[[ft("%Y"),fr],[ft("%B"),function(n){return n.getUTCMonth()}],[ft("%b %d"),function(n){return 1!=n.getUTCDate()}],[ft("%a %d"),function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],[ft("%I %p"),function(n){return n.getUTCHours()}],[ft("%I:%M"),function(n){return n.getUTCMinutes()}],[ft(":%S"),function(n){return n.getUTCSeconds()}],[ft(".%L"),function(n){return n.getUTCMilliseconds()}]],uft=pw(rft);return ek.year=i.year.utc,i.scale.utc=function(){return bh(n.scale.linear(),ek,uft)},n.text=ns(function(n){return n.responseText}),n.json=function(n,t){return ts(n,"application/json",prt,t)},n.html=function(n,t){return ts(n,"text/html",wrt,t)},n.xml=ns(function(n){return n.responseXML}),n}()