(function(t,n){typeof exports==="object"&&typeof module!=="undefined"?n(exports):typeof define==="function"&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";var n="4.0.0";function e(t,n){return tn?1:t>=n?0:NaN}function r(t){if(t.length===1)t=i(t);return{left:function(n,e,r,i){if(r==null)r=0;if(i==null)i=n.length;while(r>>1;if(t(n[a],e)<0)r=a+1;else i=a}return r},right:function(n,e,r,i){if(r==null)r=0;if(i==null)i=n.length;while(r>>1;if(t(n[a],e)>0)i=a;else r=a+1}return r}}}function i(t){return function(n,r){return e(t(n),r)}}var a=r(e);var o=a.right;var u=a.left;function f(t,n){return nt?1:n>=t?0:NaN}function c(t){return t===null?NaN:+t}function s(t,n){var e=t.length,r=0,i,a,o=0,u=-1,f=0;if(n==null){while(++u1)return o/(f-1)}function l(t,n){var e=s(t,n);return e?Math.sqrt(e):e}function h(t,n){var e=-1,r=t.length,i,a,o;if(n==null){while(++e=a){i=o=a;break}while(++ea)i=a;if(o=a){i=o=a;break}while(++ea)i=a;if(o=m)i*=10;else if(a>=x)i*=5;else if(a>=w)i*=2;return n=l)h.pop(),--p;var v=new Array(p+1),d;for(i=0;i<=p;++i){d=v[i]=[];d.x0=i>0?h[i-1]:s;d.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),o=+e(t[a],a,t),u=+e(t[a+1],a+1,t);return o+(u-o)*(i-a)}function S(t,n,r){t=d.call(t,c).sort(e);return Math.ceil((r-n)/(2*(N(t,.75)-N(t,.25))*Math.pow(t.length,-1/3)))}function E(t,n,e){return Math.ceil((e-n)/(3.5*l(t)*Math.pow(t.length,-1/3)))}function A(t,n){var e=-1,r=t.length,i,a;if(n==null){while(++e=a){i=a;break}while(++ei)i=a}else{while(++e=a){i=a;break}while(++ei)i=a}return i}function C(t,n){var e=0,r=t.length,i,a=-1,o=r;if(n==null){while(++a=0){o=t[n];e=o.length;while(--e>=0){a[--i]=o[e]}}return a}function L(t,n){var e=-1,r=t.length,i,a;if(n==null){while(++e=a){i=a;break}while(++ea)i=a}else{while(++e=a){i=a;break}while(++ea)i=a}return i}function q(t){var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);while(n=t.length)return r!=null?r(n):e!=null?n.sort(e):n;var f=-1,c=n.length,s=t[i++],l,h,p=H(),v,d=o();while(++ft.length)return e;var a,u=n[i-1];if(r!=null&&i>=t.length)a=e.entries();else a=[],e.each(function(t,n){a.push({key:n,values:o(t,i)})});return u!=null?a.sort(function(t,n){return u(t.key,n.key)}):a}return i={object:function(t){return a(t,0,V,W)},map:function(t){return a(t,0,$,Z)},entries:function(t){return o(a(t,0,$,Z),0)},key:function(n){t.push(n);return i},sortKeys:function(e){n[t.length-1]=e;return i},sortValues:function(t){e=t;return i},rollup:function(t){r=t;return i}}}function V(){return{}}function W(t,n,e){t[n]=e}function $(){return H()}function Z(t,n,e){t.set(n,e)}function G(){}var J=H.prototype;G.prototype=Q.prototype={constructor:G,has:J.has,add:function(t){t+="";this[B+t]=t;return this},remove:J.remove,clear:J.clear,values:J.keys,size:J.size,empty:J.empty,each:J.each};function Q(t,n){var e=new G;if(t instanceof G)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(n==null)while(++r1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}}function it(){var t=rt.apply(this,arguments);return function(){return Math.exp(t())}}function at(t){return function(){for(var n=0,e=0;e1&&nn(t[e[r-2]],t[e[r-1]],t[i])<=0)--r;e[r++]=i}return e.slice(0,r)}function an(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)c.push(t[r[a[n]][2]]);for(n=+u;na!==u>a&&i<(o-f)*(a-c)/(u-c)+f)s=!s;o=f,u=c}return s}function un(t){var n=-1,e=t.length,r=t[e-1],i,a,o=r[0],u=r[1],f=0;while(++nsn));else if(!(Math.abs(s*u-f*c)>sn)||!i){this._.push("L",this._x1=t,",",this._y1=n)}else{var h=e-a,p=r-o,v=u*u+f*f,d=h*h+p*p,_=Math.sqrt(v),y=Math.sqrt(l),g=i*Math.tan((fn-Math.acos((v+l-d)/(2*_*y)))/2),m=g/y,x=g/_;if(Math.abs(m-1)>sn){this._.push("L",t+m*c,",",n+m*s)}this._.push("A",i,",",i,",0,0,",+(s*h>c*p),",",this._x1=t+x*u,",",this._y1=n+x*f)}},arc:function(t,n,e,r,i,a){t=+t,n=+n,e=+e;var o=e*Math.cos(r),u=e*Math.sin(r),f=t+o,c=n+u,s=1^a,l=a?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);if(this._x1===null){this._.push("M",f,",",c)}else if(Math.abs(this._x1-f)>sn||Math.abs(this._y1-c)>sn){this._.push("L",f,",",c)}if(!e)return;if(l>ln){this._.push("A",e,",",e,",0,1,",s,",",t-o,",",n-u,"A",e,",",e,",0,1,",s,",",this._x1=f,",",this._y1=c)}else{if(l<0)l=l%cn+cn;this._.push("A",e,",",e,",0,",+(l>=fn),",",s,",",this._x1=t+e*Math.cos(i),",",this._y1=n+e*Math.sin(i))}},rect:function(t,n,e,r){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n,"h",+e,"v",+r,"h",-e,"Z")},toString:function(){return this._.join("")}};function vn(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return dn(this.cover(n,e),n,e,t)}function dn(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,a=t._root,o={data:r},u=t._x0,f=t._y0,c=t._x1,s=t._y1,l,h,p,v,d,_,y,g;if(!a)return t._root=o,t;while(a.length){if(d=n>=(l=(u+c)/2))u=l;else c=l;if(_=e>=(h=(f+s)/2))f=h;else s=h;if(i=a,!(a=a[y=_<<1|d]))return i[y]=o,t}p=+t._x.call(null,a.data);v=+t._y.call(null,a.data);if(n===p&&e===v)return o.next=a,i?i[y]=o:t._root=o,t;do{i=i?i[y]=new Array(4):t._root=new Array(4);if(d=n>=(l=(u+c)/2))u=l;else c=l;if(_=e>=(h=(f+s)/2))f=h;else s=h}while((y=_<<1|d)===(g=(v>=h)<<1|p>=l));return i[g]=a,i[y]=o,t}function _n(t){var n,e,r=t.length,i,a,o=new Array(r),u=new Array(r),f=Infinity,c=Infinity,s=-Infinity,l=-Infinity;for(e=0;es)s=i;if(al)l=a}if(st||t>i||r>n||n>a){var o=i-e,u=this._root,f,c;switch(c=(n<(r+a)/2)<<1|t<(e+i)/2){case 0:{do f=new Array(4),f[c]=u,u=f;while(o*=2,i=e+o,a=r+o,t>i||n>a);break}case 1:{do f=new Array(4),f[c]=u,u=f;while(o*=2,e=i-o,a=r+o,e>t||n>a);break}case 2:{do f=new Array(4),f[c]=u,u=f;while(o*=2,i=e+o,r=a-o,t>i||r>n);break}case 3:{do f=new Array(4),f[c]=u,u=f;while(o*=2,e=i-o,r=a-o,e>t||r>n);break}}if(this._root&&this._root.length)this._root=u}else return this;this._x0=e;this._y0=r;this._x1=i;this._y1=a;return this}function gn(){var t=[];this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)});return t}function mn(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?undefined:[[this._x0,this._y0],[this._x1,this._y1]]}function xn(t,n,e,r,i){this.node=t;this.x0=n;this.y0=e;this.x1=r;this.y1=i}function wn(t,n,e){var r,i=this._x0,a=this._y0,o,u,f,c,s=this._x1,l=this._y1,h=[],p=this._root,v,d;if(p)h.push(new xn(p,i,a,s,l));if(e==null)e=Infinity;else{i=t-e,a=n-e;s=t+e,l=n+e;e*=e}while(v=h.pop()){if(!(p=v.node)||(o=v.x0)>s||(u=v.y0)>l||(f=v.x1)=y)<<1|t>=_){v=h[h.length-1];h[h.length-1]=h[h.length-1-d];h[h.length-1-d]=v}}else{var g=t-+this._x.call(null,p.data),m=n-+this._y.call(null,p.data),x=g*g+m*m;if(x=(h=(o+f)/2))o=h;else f=h;if(d=l>=(p=(u+c)/2))u=p;else c=p;if(!(n=e,e=e[_=d<<1|v]))return this;if(!e.length)break;if(n[_+1&3]||n[_+2&3]||n[_+3&3])r=n,y=_}while(e.data!==t)if(!(i=e,e=e.next))return this;if(a=e.next)delete e.next;if(i)return a?i.next=a:delete i.next,this;if(!n)return this._root=a,this;a?n[_]=a:delete n[_];if((e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length){if(r)r[y]=e;else this._root=e}return this}function Mn(t){for(var n=0,e=t.length;n=1))throw new Error;this._size=t;this._call=this._error=null;this._tasks=[];this._data=[];this._waiting=this._active=this._ended=this._start=0}Dn.prototype=Hn.prototype={constructor:Dn,defer:function(t){if(typeof t!=="function"||this._call)throw new Error;if(this._error!=null)return this;var n=In.call(arguments,1);n.push(t);++this._waiting,this._tasks.push(n);On(this);return this},abort:function(){if(this._error==null)Bn(this,new Error("abort"));return this},await:function(t){if(typeof t!=="function"||this._call)throw new Error;this._call=function(n,e){t.apply(null,[n].concat(e))};jn(this);return this},awaitAll:function(t){if(typeof t!=="function"||this._call)throw new Error;this._call=t;jn(this);return this}};function On(t){if(!t._start)try{Fn(t)}catch(n){if(t._tasks[t._ended+t._active-1])Bn(t,n)}}function Fn(t){while(t._start=t._waiting&&t._active=0){if(r=t._tasks[e]){t._tasks[e]=null;if(r.abort)try{r.abort()}catch(t){}}}t._active=NaN;jn(t)}function jn(t){if(!t._active&&t._call)t._call(t._error,t._data)}function Hn(t){return new Dn(arguments.length?+t:Infinity)}function Xn(t){return function n(){return t}}var Vn=1e-12;var Wn=Math.PI;var $n=Wn/2;var Zn=2*Wn;function Gn(t){return t.innerRadius}function Jn(t){return t.outerRadius}function Qn(t){return t.startAngle}function Kn(t){return t.endAngle}function te(t){return t&&t.padAngle}function ne(t){return t>=1?$n:t<=-1?-$n:Math.asin(t)}function ee(t,n,e,r,i,a,o,u){var f=e-t,c=r-n,s=o-i,l=u-a,h=(s*(n-a)-l*(t-i))/(l*f-s*c);return[t+h*f,n+h*c]}function re(t,n,e,r,i,a,o){var u=t-e,f=n-r,c=(o?a:-a)/Math.sqrt(u*u+f*f),s=c*f,l=-c*u,h=t+s,p=n+l,v=e+s,d=r+l,_=(h+v)/2,y=(p+d)/2,g=v-h,m=d-p,x=g*g+m*m,w=i-a,b=h*d-v*p,M=(m<0?-1:1)*Math.sqrt(Math.max(0,w*w*x-b*b)),k=(b*m-g*M)/x,T=(-b*g-m*M)/x,N=(b*m+g*M)/x,S=(-b*g+m*M)/x,E=k-_,A=T-y,C=N-_,z=S-y;if(E*E+A*A>C*C+z*z)k=N,T=S;return{cx:k,cy:T,x01:-s,y01:-l,x11:k*(i/w-1),y11:T*(i/w-1)}}function ie(){var t=Gn,n=Jn,e=Xn(0),r=null,i=Qn,a=Kn,o=te,u=null;function f(){var f,c,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-$n,p=a.apply(this,arguments)-$n,v=Math.abs(p-h),d=p>h;if(!u)u=f=pn();if(lVn))u.moveTo(0,0);else if(v>Zn-Vn){u.moveTo(l*Math.cos(h),l*Math.sin(h));u.arc(0,0,l,h,p,!d);if(s>Vn){u.moveTo(s*Math.cos(p),s*Math.sin(p));u.arc(0,0,s,p,h,d)}}else{var _=h,y=p,g=h,m=p,x=v,w=v,b=o.apply(this,arguments)/2,M=b>Vn&&(r?+r.apply(this,arguments):Math.sqrt(s*s+l*l)),k=Math.min(Math.abs(l-s)/2,+e.apply(this,arguments)),T=k,N=k,S,E;if(M>Vn){var A=ne(M/s*Math.sin(b)),C=ne(M/l*Math.sin(b));if((x-=A*2)>Vn)A*=d?1:-1,g+=A,m-=A;else x=0,g=m=(h+p)/2;if((w-=C*2)>Vn)C*=d?1:-1,_+=C,y-=C;else w=0,_=y=(h+p)/2}var z=l*Math.cos(_),P=l*Math.sin(_),L=s*Math.cos(m),q=s*Math.sin(m);if(k>Vn){var U=l*Math.cos(y),I=l*Math.sin(y),R=s*Math.cos(g),D=s*Math.sin(g);if(vVn?ee(z,P,R,D,U,I,L,q):[L,q],F=z-O[0],Y=P-O[1],B=U-O[0],j=I-O[1],H=1/Math.sin(Math.acos((F*B+Y*j)/(Math.sqrt(F*F+Y*Y)*Math.sqrt(B*B+j*j)))/2),X=Math.sqrt(O[0]*O[0]+O[1]*O[1]);T=Math.min(k,(s-X)/(H-1));N=Math.min(k,(l-X)/(H+1))}}if(!(w>Vn))u.moveTo(z,P);else if(N>Vn){S=re(R,D,z,P,l,N,d);E=re(U,I,L,q,l,N,d);u.moveTo(S.cx+S.x01,S.cy+S.y01);if(NVn)||!(x>Vn))u.lineTo(L,q);else if(T>Vn){S=re(L,q,U,I,s,-T,d);E=re(z,P,R,D,s,-T,d);u.lineTo(S.cx+S.x01,S.cy+S.y01);if(T=s;--l){u.point(_[l],y[l])}u.lineEnd();u.areaEnd()}}if(v){_[c]=+t(p,c,f),y[c]=+e(p,c,f);u.point(n?+n(p,c,f):_[c],r?+r(p,c,f):y[c])}}if(d)return u=null,d+""||null}function c(){return ce().defined(i).curve(o).context(a)}f.x=function(e){return arguments.length?(t=typeof e==="function"?e:Xn(+e),n=null,f):t};f.x0=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),f):t};f.x1=function(t){return arguments.length?(n=t==null?null:typeof t==="function"?t:Xn(+t),f):n};f.y=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(+t),r=null,f):e};f.y0=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(+t),f):e};f.y1=function(t){return arguments.length?(r=t==null?null:typeof t==="function"?t:Xn(+t),f):r};f.lineX0=f.lineY0=function(){return c().x(t).y(e)};f.lineY1=function(){return c().x(t).y(r)};f.lineX1=function(){return c().x(n).y(e)};f.defined=function(t){return arguments.length?(i=typeof t==="function"?t:Xn(!!t),f):i};f.curve=function(t){return arguments.length?(o=t,a!=null&&(u=o(a)),f):o};f.context=function(t){return arguments.length?(t==null?a=u=null:u=o(a=t),f):a};return f}function le(t,n){return nt?1:n>=t?0:NaN}function he(t){return t}function pe(){var t=he,n=le,e=null,r=Xn(0),i=Xn(Zn),a=Xn(0);function o(o){var u,f=o.length,c,s,l=0,h=new Array(f),p=new Array(f),v=+r.apply(this,arguments),d=Math.min(Zn,Math.max(-Zn,i.apply(this,arguments)-v)),_,y=Math.min(Math.abs(d)/f,a.apply(this,arguments)),g=y*(d<0?-1:1),m;for(u=0;u0){l+=m}}if(n!=null)h.sort(function(t,e){return n(p[t],p[e])});else if(e!=null)h.sort(function(t,n){return e(o[t],o[n])});for(u=0,s=l?(d-f*g)/l:0;u0?m*s:0)+g,p[c]={data:o[c],index:u,value:m,startAngle:v,endAngle:_,padAngle:y}}return p}o.value=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),o):t};o.sortValues=function(t){return arguments.length?(n=t,e=null,o):n};o.sort=function(t){return arguments.length?(e=t,n=null,o):e};o.startAngle=function(t){return arguments.length?(r=typeof t==="function"?t:Xn(+t),o):r};o.endAngle=function(t){return arguments.length?(i=typeof t==="function"?t:Xn(+t),o):i};o.padAngle=function(t){return arguments.length?(a=typeof t==="function"?t:Xn(+t),o):a};return o}var ve=_e(oe);function de(t){this._curve=t}de.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function _e(t){function n(n){return new de(t(n))}n._curve=t;return n}function ye(t){var n=t.curve;t.angle=t.x,delete t.x;t.radius=t.y,delete t.y;t.curve=function(t){return arguments.length?n(_e(t)):n()._curve};return t}function ge(){return ye(ce().curve(ve))}function me(){var t=se().curve(ve),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;t.angle=t.x,delete t.x;t.startAngle=t.x0,delete t.x0;t.endAngle=t.x1,delete t.x1;t.radius=t.y,delete t.y;t.innerRadius=t.y0,delete t.y0;t.outerRadius=t.y1,delete t.y1;t.lineStartAngle=function(){return ye(e())},delete t.lineX0;t.lineEndAngle=function(){return ye(r())},delete t.lineX1;t.lineInnerRadius=function(){return ye(i())},delete t.lineY0;t.lineOuterRadius=function(){return ye(a())},delete t.lineY1;t.curve=function(t){return arguments.length?n(_e(t)):n()._curve};return t}var xe={draw:function(t,n){var e=Math.sqrt(n/Wn);t.moveTo(e,0);t.arc(0,0,e,0,Zn)}};var we={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e);t.lineTo(-e,-e);t.lineTo(-e,-3*e);t.lineTo(e,-3*e);t.lineTo(e,-e);t.lineTo(3*e,-e);t.lineTo(3*e,e);t.lineTo(e,e);t.lineTo(e,3*e);t.lineTo(-e,3*e);t.lineTo(-e,e);t.lineTo(-3*e,e);t.closePath()}};var be=Math.sqrt(1/3);var Me=be*2;var ke={draw:function(t,n){var e=Math.sqrt(n/Me),r=e*be;t.moveTo(0,-e);t.lineTo(r,0);t.lineTo(0,e);t.lineTo(-r,0);t.closePath()}};var Te=.8908130915292852;var Ne=Math.sin(Wn/10)/Math.sin(7*Wn/10);var Se=Math.sin(Zn/10)*Ne;var Ee=-Math.cos(Zn/10)*Ne;var Ae={draw:function(t,n){var e=Math.sqrt(n*Te),r=Se*e,i=Ee*e;t.moveTo(0,-e);t.lineTo(r,i);for(var a=1;a<5;++a){var o=Zn*a/5,u=Math.cos(o),f=Math.sin(o);t.lineTo(f*e,-u*e);t.lineTo(u*r-f*i,f*r+u*i)}t.closePath()}};var Ce={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}};var ze=Math.sqrt(3);var Pe={draw:function(t,n){var e=-Math.sqrt(n/(ze*3));t.moveTo(0,e*2);t.lineTo(-ze*e,-e);t.lineTo(ze*e,-e);t.closePath()}};var Le=-.5;var qe=Math.sqrt(3)/2;var Ue=1/Math.sqrt(12);var Ie=(Ue/2+1)*3;var Re={draw:function(t,n){var e=Math.sqrt(n/Ie),r=e/2,i=e*Ue,a=r,o=e*Ue+e,u=-a,f=o;t.moveTo(r,i);t.lineTo(a,o);t.lineTo(u,f);t.lineTo(Le*r-qe*i,qe*r+Le*i);t.lineTo(Le*a-qe*o,qe*a+Le*o);t.lineTo(Le*u-qe*f,qe*u+Le*f);t.lineTo(Le*r+qe*i,Le*i-qe*r);t.lineTo(Le*a+qe*o,Le*o-qe*a);t.lineTo(Le*u+qe*f,Le*f-qe*u);t.closePath()}};var De=[xe,we,ke,Ce,Ae,Pe,Re];function Oe(){var t=Xn(xe),n=Xn(64),e=null;function r(){var r;if(!e)e=r=pn();t.apply(this,arguments).draw(e,+n.apply(this,arguments));if(r)return e=null,r+""||null}r.type=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(n),r):t};r.size=function(t){return arguments.length?(n=typeof t==="function"?t:Xn(+t),r):n};r.context=function(t){return arguments.length?(e=t==null?null:t,r):e};return r}function Fe(){}function Ye(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Be(t){this._context=t}Be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){switch(this._point){case 3:Ye(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2: this._point=3;this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function je(t){return new Be(t)}function He(t){this._context=t}He.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2);this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break}case 3:{this.point(this._x2,this._y2);this.point(this._x3,this._y3);this.point(this._x4,this._y4);break}}},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._x2=t,this._y2=n;break;case 1:this._point=2;this._x3=t,this._y3=n;break;case 2:this._point=3;this._x4=t,this._y4=n;this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function Xe(t){return new He(t)}function Ve(t){this._context=t}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function We(t){return new Ve(t)}function $e(t,n){this._basis=new Be(t);this._beta=n}$e.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0){var r=t[0],i=n[0],a=t[e]-r,o=n[e]-i,u=-1,f;while(++u<=e){f=u/e;this._basis.point(this._beta*t[u]+(1-this._beta)*(r+f*a),this._beta*n[u]+(1-this._beta)*(i+f*o))}}this._x=this._y=null;this._basis.lineEnd()},point:function(t,n){this._x.push(+t);this._y.push(+n)}};var Ze=function t(n){function e(t){return n===1?new Be(t):new $e(t,n)}e.beta=function(n){return t(+n)};return e}(.85);function Ge(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Je(t,n){this._context=t;this._k=(1-n)/6}Je.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ge(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qe=function t(n){function e(t){return new Je(t,n)}e.tension=function(n){return t(+n)};return e}(0);function Ke(t,n){this._context=t;this._k=(1-n)/6}Ke.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._x3=t,this._y3=n;break;case 1:this._point=2;this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3;this._x5=t,this._y5=n;break;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var tr=function t(n){function e(t){return new Ke(t,n)}e.tension=function(n){return t(+n)};return e}(0);function nr(t,n){this._context=t;this._k=(1-n)/6}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var er=function t(n){function e(t){return new nr(t,n)}e.tension=function(n){return t(+n)};return e}(0);function rr(t,n,e){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vn){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,f=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/f;i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/f}if(t._l23_a>Vn){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-n*t._l12_2a)/s;o=(o*c+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ir(t,n){this._context=t;this._alpha=n}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this,this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ar=function t(n){function e(t){return n?new ir(t,n):new Je(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function or(t,n){this._context=t;this._alpha=n}or.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;this._x3=t,this._y3=n;break;case 1:this._point=2;this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3;this._x5=t,this._y5=n;break;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ur=function t(n){function e(t){return n?new or(t,n):new Ke(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function fr(t,n){this._context=t;this._alpha=n}fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var cr=function t(n){function e(t){return n?new fr(t,n):new nr(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function sr(t){this._context=t}sr.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(t,n){t=+t,n=+n;if(this._point)this._context.lineTo(t,n);else this._point=1,this._context.moveTo(t,n)}};function lr(t){return new sr(t)}function hr(t){return t<0?-1:1}function pr(t,n,e){var r=t._x1-t._x0,i=n-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),u=(a*i+o*r)/(r+i);return(hr(a)+hr(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function vr(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function dr(t,n,e){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,u=(a-r)/3;t._context.bezierCurveTo(r+u,i+u*n,a-u,o-u*e,a,o)}function _r(t){this._context=t}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:dr(this,this._t0,vr(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){var e=NaN;t=+t,n=+n;if(t===this._x1&&n===this._y1)return;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;dr(this,vr(this,e=pr(this,t,n)),e);break;default:dr(this,this._t0,e=pr(this,t,n));break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n;this._t0=e}};function yr(t){this._context=new gr(t)}(yr.prototype=Object.create(_r.prototype)).point=function(t,n){_r.prototype.point.call(this,n,t)};function gr(t){this._context=t}gr.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,a){this._context.bezierCurveTo(n,t,r,e,a,i)}};function mr(t){return new _r(t)}function xr(t){return new yr(t)}function wr(t){this._context=t}wr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[];this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e){this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]);if(e===2){this._context.lineTo(t[1],n[1])}else{var r=br(t),i=br(n);for(var a=0,o=1;o=0;--n)i[n]=(o[n]-i[n+1])/a[n];a[e-1]=(t[e]+i[e-1])/2;for(n=0;n=0)this._t=1-this._t,this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0){this._context.lineTo(this._x,n);this._context.lineTo(t,n)}else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y);this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function Tr(t){return new kr(t,.5)}function Nr(t){return new kr(t,0)}function Sr(t){return new kr(t,1)}var Er=Array.prototype.slice;function Ar(t,n){if(!((a=t.length)>1))return;for(var e=1,r,i=t[n[0]],a,o=i.length;e=0)e[n]=n;return e}function zr(t,n){return t[n]}function Pr(){var t=Xn([]),n=Cr,e=Ar,r=zr;function i(i){var a=t.apply(this,arguments),o,u=i.length,f=a.length,c=new Array(f),s;for(o=0;o0))return;for(var e,r,i=0,a=t[0].length,o;i0))return;for(var e=0,r=t[n[0]],i,a=r.length;e0)||!((a=(i=t[n[0]]).length)>0))return;for(var e=0,r=1,i,a,o;r>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1)):(n=Wr.exec(t))?ei(parseInt(n[1],16)):(n=$r.exec(t))?new oi(n[1],n[2],n[3],1):(n=Zr.exec(t))?new oi(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Gr.exec(t))?ri(n[1],n[2],n[3],n[4]):(n=Jr.exec(t))?ri(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Qr.exec(t))?ui(n[1],n[2]/100,n[3]/100,1):(n=Kr.exec(t))?ui(n[1],n[2]/100,n[3]/100,n[4]):ti.hasOwnProperty(t)?ei(ti[t]):t==="transparent"?new oi(NaN,NaN,NaN,0):null}function ei(t){return new oi(t>>16&255,t>>8&255,t&255,1)}function ri(t,n,e,r){if(r<=0)t=n=e=NaN;return new oi(t,n,e,r)}function ii(t){if(!(t instanceof jr))t=ni(t);if(!t)return new oi;t=t.rgb();return new oi(t.r,t.g,t.b,t.opacity)}function ai(t,n,e,r){return arguments.length===1?ii(t):new oi(t,n,e,r==null?1:r)}function oi(t,n,e,r){this.r=+t;this.g=+n;this.b=+e;this.opacity=+r}Yr(oi,ai,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new oi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new oi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&(0<=this.g&&this.g<=255)&&(0<=this.b&&this.b<=255)&&(0<=this.opacity&&this.opacity<=1)},toString:function(){var t=this.opacity;t=isNaN(t)?1:Math.max(0,Math.min(1,t));return(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}}));function ui(t,n,e,r){if(r<=0)t=n=e=NaN;else if(e<=0||e>=1)t=n=NaN;else if(n<=0)t=NaN;return new si(t,n,e,r)}function fi(t){if(t instanceof si)return new si(t.h,t.s,t.l,t.opacity);if(!(t instanceof jr))t=ni(t);if(!t)return new si;if(t instanceof si)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,u=a-i,f=(a+i)/2;if(u){if(n===a)o=(e-r)/u+(e0&&f<1?0:o}return new si(o,u,f,t.opacity)}function ci(t,n,e,r){return arguments.length===1?fi(t):new si(t,n,e,r==null?1:r)}function si(t,n,e,r){this.h=+t;this.s=+n;this.l=+e;this.opacity=+r}Yr(si,ci,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new si(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new si(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new oi(li(t>=240?t-240:t+120,i,r),li(t,i,r),li(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)}}));function li(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}var hi=Math.PI/180;var pi=180/Math.PI;var vi=18;var di=.95047;var _i=1;var yi=1.08883;var gi=4/29;var mi=6/29;var xi=3*mi*mi;var wi=mi*mi*mi;function bi(t){if(t instanceof ki)return new ki(t.l,t.a,t.b,t.opacity);if(t instanceof zi){var n=t.h*hi;return new ki(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}if(!(t instanceof oi))t=ii(t);var e=Ei(t.r),r=Ei(t.g),i=Ei(t.b),a=Ti((.4124564*e+.3575761*r+.1804375*i)/di),o=Ti((.2126729*e+.7151522*r+.072175*i)/_i),u=Ti((.0193339*e+.119192*r+.9503041*i)/yi);return new ki(116*o-16,500*(a-o),200*(o-u),t.opacity)}function Mi(t,n,e,r){return arguments.length===1?bi(t):new ki(t,n,e,r==null?1:r)}function ki(t,n,e,r){this.l=+t;this.a=+n;this.b=+e;this.opacity=+r}Yr(ki,Mi,Br(jr,{brighter:function(t){return new ki(this.l+vi*(t==null?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ki(this.l-vi*(t==null?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;t=_i*Ni(t);n=di*Ni(n);e=yi*Ni(e);return new oi(Si(3.2404542*n-1.5371385*t-.4985314*e),Si(-.969266*n+1.8760108*t+.041556*e),Si(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}}));function Ti(t){return t>wi?Math.pow(t,1/3):t/xi+gi}function Ni(t){return t>mi?t*t*t:xi*(t-gi)}function Si(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ei(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ai(t){if(t instanceof zi)return new zi(t.h,t.c,t.l,t.opacity);if(!(t instanceof ki))t=bi(t);var n=Math.atan2(t.b,t.a)*pi;return new zi(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ci(t,n,e,r){return arguments.length===1?Ai(t):new zi(t,n,e,r==null?1:r)}function zi(t,n,e,r){this.h=+t;this.c=+n;this.l=+e;this.opacity=+r}Yr(zi,Ci,Br(jr,{brighter:function(t){return new zi(this.h,this.c,this.l+vi*(t==null?1:t),this.opacity)},darker:function(t){return new zi(this.h,this.c,this.l-vi*(t==null?1:t),this.opacity)},rgb:function(){return bi(this).rgb()}}));var Pi=-.14861;var Li=+1.78277;var qi=-.29227;var Ui=-.90649;var Ii=+1.97294;var Ri=Ii*Ui;var Di=Ii*Li;var Oi=Li*qi-Ui*Pi;function Fi(t){if(t instanceof Bi)return new Bi(t.h,t.s,t.l,t.opacity);if(!(t instanceof oi))t=ii(t);var n=t.r/255,e=t.g/255,r=t.b/255,i=(Oi*r+Ri*n-Di*e)/(Oi+Ri-Di),a=r-i,o=(Ii*(e-i)-qi*a)/Ui,u=Math.sqrt(o*o+a*a)/(Ii*i*(1-i)),f=u?Math.atan2(o,a)*pi-120:NaN;return new Bi(f<0?f+360:f,u,i,t.opacity)}function Yi(t,n,e,r){return arguments.length===1?Fi(t):new Bi(t,n,e,r==null?1:r)}function Bi(t,n,e,r){this.h=+t;this.s=+n;this.l=+e;this.opacity=+r}Yr(Bi,Yi,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new Bi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new Bi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*hi,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new oi(255*(n+e*(Pi*r+Li*i)),255*(n+e*(qi*r+Ui*i)),255*(n+e*(Ii*r)),this.opacity)}}));function ji(t,n,e,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*n+(4-6*a+3*o)*e+(1+3*t+3*a-3*o)*r+o*i)/6}function Hi(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=r180||e<-180?e-360*Math.round(e/360):e):Vi(isNaN(t)?n:t)}function Gi(t){return(t=+t)===1?Ji:function(n,e){return e-n?$i(n,e,t):Vi(isNaN(n)?e:n)}}function Ji(t,n){var e=n-t;return e?Wi(t,e):Vi(isNaN(t)?n:t)}var Qi=function t(n){var e=Gi(n);function r(t,n){var r=e((t=ai(t)).r,(n=ai(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=e(t.opacity,n.opacity);return function(n){t.r=r(n);t.g=i(n);t.b=a(n);t.opacity=o(n);return t+""}}r.gamma=t;return r}(1);function Ki(t){return function(n){var e=n.length,r=new Array(e),i=new Array(e),a=new Array(e),o,u;for(o=0;oe){a=n.slice(e,a);if(u[o])u[o]+=a;else u[++o]=a}if((r=r[0])===(i=i[0])){if(u[o])u[o]+=i;else u[++o]=i}else{u[++o]=null;f.push({i:o,x:ra(r,i)})}e=oa.lastIndex}if(e180)n+=360;else if(n-t>180)t+=360;a.push({i:e.push(i(e)+"rotate(",null,r)-2,x:ra(t,n)})}else if(n){e.push(i(e)+"rotate("+n+r)}}function u(t,n,e,a){if(t!==n){a.push({i:e.push(i(e)+"skewX(",null,r)-2,x:ra(t,n)})}else if(n){e.push(i(e)+"skewX("+n+r)}}function f(t,n,e,r,a,o){if(t!==e||n!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:ra(t,e)},{i:u-2,x:ra(n,r)})}else if(e!==1||r!==1){a.push(i(a)+"scale("+e+","+r+")")}}return function(n,e){var r=[],i=[];n=t(n),e=t(e);a(n.translateX,n.translateY,e.translateX,e.translateY,r,i);o(n.rotate,e.rotate,r,i);u(n.skewX,e.skewX,r,i);f(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i);n=e=null;return function(t){var n=-1,e=i.length,a;while(++n=0)e=t.slice(r+1),t=t.slice(0,r);if(t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}Xa.prototype=Ha.prototype={constructor:Xa,on:function(t,n){var e=this._,r=Va(t+"",e),i,a=-1,o=r.length;if(arguments.length<2){while(++a0)for(var e=new Array(i),r=0,i,a;r=o)return i;if(s)return s=false,r;var n=u,a;if(t.charCodeAt(n)===34){var f=n;while(f++3&&h(t)};function h(t){var n=o.status,i;if(!n&&lo(o)||n>=200&&n<300||n===304){if(c){try{i=c.call(e,o)}catch(t){r.call("error",e,t);return}}else{i=o}r.call("load",e,i)}else{r.call("error",e,t)}}o.onprogress=function(t){r.call("progress",e,t)};e={header:function(t,n){t=(t+"").toLowerCase();if(arguments.length<2)return a.get(t);if(n==null)a.remove(t);else a.set(t,n+"");return e},mimeType:function(t){if(!arguments.length)return i;i=t==null?null:t+"";return e},responseType:function(t){if(!arguments.length)return s;s=t;return e},timeout:function(t){if(!arguments.length)return l;l=+t;return e},user:function(t){return arguments.length<1?u:(u=t==null?null:t+"",e)},password:function(t){return arguments.length<1?f:(f=t==null?null:t+"",e)},response:function(t){c=t;return e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,c,h){if(!h&&typeof c==="function")h=c,c=null;if(h&&h.length===1)h=so(h);o.open(n,t,true,u,f);if(i!=null&&!a.has("accept"))a.set("accept",i+",*/*");if(o.setRequestHeader)a.each(function(t,n){o.setRequestHeader(n,t)});if(i!=null&&o.overrideMimeType)o.overrideMimeType(i);if(s!=null)o.responseType=s;if(l>0)o.timeout=l;if(h)e.on("error",h).on("load",function(t){h(null,t)});r.call("beforesend",e,o);o.send(c==null?null:c);return e},abort:function(){o.abort();return e},on:function(){var t=r.on.apply(r,arguments);return t===r?e:t}};return n?e.get(n):e}function so(t){return function(n,e){t(n==null?e:null)}}function lo(t){var n=t.responseType;return n&&n!=="text"?t.response:t.responseText}function ho(t,n){return function(e,r){var i=co(e).mimeType(t).response(n);return r?i.get(r):i}}var po=ho("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)});var vo=ho("application/json",function(t){return JSON.parse(t.responseText)});var _o=ho("text/plain",function(t){return t.responseText});var yo=ho("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});function go(t,n){return function(e,r,i){if(arguments.length<3)i=r,r=null;var a=co(e).mimeType(t);a.row=function(t){return arguments.length?a.response(mo(n,r=t)):r};a.row(r);return i?a.get(i):a}}function mo(t,n){return function(e){return t(e.responseText,n)}}var xo=go("text/csv",to);var wo=go("text/tab-separated-values",ao);var bo=0;var Mo=0;var ko=0;var To=1e3;var No;var So;var Eo=0;var Ao=0;var Co=0;var zo=typeof performance==="object"?performance:Date;var Po=typeof requestAnimationFrame==="function"?zo===Date?function(t){requestAnimationFrame(function(){t(zo.now())})}:requestAnimationFrame:function(t){setTimeout(t,17)};function Lo(){return Ao||(Po(qo),Ao=zo.now()+Co)}function qo(){Ao=0}function Uo(){this._call=this._time=this._next=null}Uo.prototype=Io.prototype={constructor:Uo,restart:function(t,n,e){if(typeof t!=="function")throw new TypeError("callback is not a function");e=(e==null?Lo():+e)+(n==null?0:+n);if(!this._next&&So!==this){if(So)So._next=this;else No=this;So=this}this._call=t;this._time=e;Yo()},stop:function(){if(this._call){this._call=null;this._time=Infinity;Yo()}}};function Io(t,n,e){var r=new Uo;r.restart(t,n,e);return r}function Ro(){Lo();++bo;var t=No,n;while(t){if((n=Ao-t._time)>=0)t._call.call(null,n);t=t._next}--bo}function Do(t){Ao=(Eo=t||zo.now())+Co;bo=Mo=0;try{Ro()}finally{bo=0;Fo();Ao=0}}function Oo(){var t=zo.now(),n=t-Eo;if(n>To)Co-=n,Eo=t}function Fo(){var t,n=No,e,r=Infinity;while(n){if(n._call){if(r>n._time)r=n._time;t=n,n=n._next}else{e=n._next,n._next=null;n=t?t._next=e:No=e}}So=t;Yo(r)}function Yo(t){if(bo)return;if(Mo)Mo=clearTimeout(Mo);var n=t-Ao;if(n>24){if(t0))return o;do o.push(new Date(+e));while(n(e,a),t(e),e=0)while(n(t,1),!e(t));})};if(e){i.count=function(n,r){Ho.setTime(+n),Xo.setTime(+r);t(Ho),t(Xo);return Math.floor(e(Ho,Xo))};i.every=function(t){t=Math.floor(t);return!isFinite(t)||!(t>0)?null:!(t>1)?i:i.filter(r?function(n){return r(n)%t===0}:function(n){return i.count(0,n)%t===0})}}return i}var Wo=Vo(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Wo.every=function(t){t=Math.floor(t);if(!isFinite(t)||!(t>0))return null;if(!(t>1))return Wo;return Vo(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t})};var $o=Wo.range;var Zo=1e3;var Go=6e4;var Jo=36e5;var Qo=864e5;var Ko=6048e5;var tu=Vo(function(t){t.setTime(Math.floor(t/Zo)*Zo)},function(t,n){t.setTime(+t+n*Zo)},function(t,n){return(n-t)/Zo},function(t){return t.getUTCSeconds()});var nu=tu.range;var eu=Vo(function(t){t.setTime(Math.floor(t/Go)*Go)},function(t,n){t.setTime(+t+n*Go)},function(t,n){return(n-t)/Go},function(t){return t.getMinutes()});var ru=eu.range;var iu=Vo(function(t){var n=t.getTimezoneOffset()*Go%Jo;if(n<0)n+=Jo;t.setTime(Math.floor((+t-n)/Jo)*Jo+n)},function(t,n){t.setTime(+t+n*Jo)},function(t,n){return(n-t)/Jo},function(t){return t.getHours()});var au=iu.range;var ou=Vo(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Go)/Qo},function(t){return t.getDate()-1});var uu=ou.range;function fu(t){return Vo(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7);n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Go)/Ko})}var cu=fu(0);var su=fu(1);var lu=fu(2);var hu=fu(3);var pu=fu(4);var vu=fu(5);var du=fu(6);var _u=cu.range;var yu=su.range;var gu=lu.range;var mu=hu.range;var xu=pu.range;var wu=vu.range;var bu=du.range;var Mu=Vo(function(t){t.setDate(1);t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+(n.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});var ku=Mu.range;var Tu=Vo(function(t){t.setMonth(0,1);t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Tu.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Vo(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t);n.setMonth(0,1);n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)})};var Nu=Tu.range;var Su=Vo(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Go)},function(t,n){return(n-t)/Go},function(t){return t.getUTCMinutes()});var Eu=Su.range;var Au=Vo(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Jo)},function(t,n){return(n-t)/Jo},function(t){return t.getUTCHours()});var Cu=Au.range;var zu=Vo(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Qo},function(t){return t.getUTCDate()-1});var Pu=zu.range;function Lu(t){return Vo(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7);n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/Ko})}var qu=Lu(0);var Uu=Lu(1);var Iu=Lu(2);var Ru=Lu(3);var Du=Lu(4);var Ou=Lu(5);var Fu=Lu(6);var Yu=qu.range;var Bu=Uu.range;var ju=Iu.range;var Hu=Ru.range;var Xu=Du.range;var Vu=Ou.range;var Wu=Fu.range;var $u=Vo(function(t){t.setUTCDate(1);t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+(n.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});var Zu=$u.range;var Gu=Vo(function(t){t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Gu.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Vo(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t);n.setUTCMonth(0,1);n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})};var Ju=Gu.range;function Qu(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Ku(t){return t=Qu(Math.abs(t)),t?t[1]:NaN}function tf(t,n){return function(e,r){var i=e.length,a=[],o=0,u=t[0],f=0;while(i>0&&u>0){if(f+u+1>r)u=Math.max(1,r-f);a.push(e.substring(i-=u,i+u));if((f+=u+1)>r)break;u=t[o=(o+1)%t.length]}return a.reverse().join(n)}}function nf(t,n){t=t.toPrecision(n);t:for(var e=t.length,r=1,i=-1,a;r0)i=0;break}}return i>0?t.slice(0,i)+t.slice(a+1):t}var ef;function rf(t,n){var e=Qu(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(ef=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Qu(t,Math.max(0,n+a-1))[0]}function af(t,n){var e=Qu(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var of={"":nf,"%":function(t,n){return(t*100).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return af(t*100,n)},r:af,s:rf,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};var uf=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function ff(t){return new cf(t)}function cf(t){if(!(n=uf.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",a=n[4]||"",o=!!n[5],u=n[6]&&+n[6],f=!!n[7],c=n[8]&&+n[8].slice(1),s=n[9]||"";if(s==="n")f=true,s="g";else if(!of[s])s="";if(o||e==="0"&&r==="=")o=true,e="0",r="=";this.fill=e;this.align=r;this.sign=i;this.symbol=a;this.zero=o;this.width=u;this.comma=f;this.precision=c;this.type=s}cf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type};var sf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lf(t){return t}function hf(t){var n=t.grouping&&t.thousands?tf(t.grouping,t.thousands):lf,e=t.currency,r=t.decimal;function i(t){t=ff(t);var i=t.fill,a=t.align,o=t.sign,u=t.symbol,f=t.zero,c=t.width,s=t.comma,l=t.precision,h=t.type;var p=u==="$"?e[0]:u==="#"&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v=u==="$"?e[1]:/[%p]/.test(h)?"%":"";var d=of[h],_=!h||/[defgprs%]/.test(h);l=l==null?h?6:12:/[gprs]/.test(h)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l));function y(t){var e=p,u=v,y,g,m;if(h==="c"){u=d(t)+u;t=""}else{t=+t;var x=(t<0||1/t<0)&&(t*=-1,true);t=d(t,l);if(x){y=-1,g=t.length;x=false;while(++ym||m>57){u=(m===46?r+t.slice(y+1):t.slice(y))+u;t=t.slice(0,y);break}}}}if(s&&!f)t=n(t,Infinity);var w=e.length+t.length+u.length,b=w>1)+e+t+u+b.slice(w)}return b+e+t+u}y.toString=function(){return t+""};return y}function a(t,n){var e=i((t=ff(t),t.type="f",t)),r=Math.max(-8,Math.min(8,Math.floor(Ku(n)/3)))*3,a=Math.pow(10,-r),o=sf[8+r/3];return function(t){return e(a*t)+o}}return{format:i,formatPrefix:a}}var pf;t.format;t.formatPrefix;vf({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function vf(n){pf=hf(n);t.format=pf.format;t.formatPrefix=pf.formatPrefix;return pf}function df(t){return Math.max(0,-Ku(Math.abs(t)))}function _f(t,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ku(n)/3)))*3-Ku(Math.abs(t)))}function yf(t,n){t=Math.abs(t),n=Math.abs(n)-t;return Math.max(0,Ku(n)-Ku(t))+1}function gf(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);n.setFullYear(t.y);return n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function mf(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));n.setUTCFullYear(t.y);return n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xf(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function wf(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,u=t.months,f=t.shortMonths;var c=Ef(i),s=Af(i),l=Ef(a),h=Af(a),p=Ef(o),v=Af(o),d=Ef(u),_=Af(u),y=Ef(f),g=Af(f);var m={a:L,A:q,b:U,B:I,c:null,d:Hf,e:Hf,H:Xf,I:Vf,j:Wf,L:$f,m:Zf,M:Gf,p:R,S:Jf,U:Qf,w:Kf,W:tc,x:null,X:null,y:nc,Y:ec,Z:rc,"%":gc};var x={a:D,A:O,b:F,B:Y,c:null,d:ic,e:ic,H:ac,I:oc,j:uc,L:fc,m:cc,M:sc,p:B,S:lc,U:hc,w:pc,W:vc,x:null,X:null,y:dc,Y:_c,Z:yc,"%":gc};var w={a:N,A:S,b:E,B:A,c:C,d:Rf,e:Rf,H:Of,I:Of,j:Df,L:Bf,m:If,M:Ff,p:T,S:Yf,U:zf,w:Cf,W:Pf,x:z,X:P,y:qf,Y:Lf,Z:Uf,"%":jf};m.x=b(e,m);m.X=b(r,m);m.c=b(n,m);x.x=b(e,x);x.X=b(r,x);x.c=b(n,x);function b(t,n){return function(e){var r=[],i=-1,a=0,o=t.length,u,f,c;if(!(e instanceof Date))e=new Date(+e);while(++i=o)return-1;u=n.charCodeAt(i++);if(u===37){u=n.charAt(i++);f=w[u in bf?n.charAt(i++):u];if(!f||(r=f(t,e,r))<0)return-1}else if(u!=e.charCodeAt(r++)){return-1}}return r}function T(t,n,e){var r=c.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1}function N(t,n,e){var r=p.exec(n.slice(e));return r?(t.w=v[r[0].toLowerCase()],e+r[0].length):-1}function S(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1}function E(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1}function A(t,n,e){var r=d.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1}function C(t,e,r){return k(t,n,e,r)}function z(t,n,r){return k(t,e,n,r)}function P(t,n,e){return k(t,r,n,e)}function L(t){return o[t.getDay()]}function q(t){return a[t.getDay()]}function U(t){return f[t.getMonth()]}function I(t){return u[t.getMonth()]}function R(t){return i[+(t.getHours()>=12)]}function D(t){return o[t.getUTCDay()]}function O(t){return a[t.getUTCDay()]}function F(t){return f[t.getUTCMonth()]}function Y(t){return u[t.getUTCMonth()]}function B(t){return i[+(t.getUTCHours()>=12)]}return{format:function(t){var n=b(t+="",m);n.toString=function(){return t};return n},parse:function(t){var n=M(t+="",gf);n.toString=function(){return t};return n},utcFormat:function(t){var n=b(t+="",x);n.toString=function(){return t};return n},utcParse:function(t){var n=M(t,mf);n.toString=function(){return t};return n}}}var bf={"-":"",_:" ",0:"0"};var Mf=/^\s*\d+/;var kf=/^%/;var Tf=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function Nf(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),e+r[0].length):-1}function Uf(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function If(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Rf(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Df(t,n,e){var r=Mf.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Of(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ff(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Yf(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Bf(t,n,e){var r=Mf.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function jf(t,n,e){var r=kf.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Hf(t,n){return Nf(t.getDate(),n,2)}function Xf(t,n){return Nf(t.getHours(),n,2)}function Vf(t,n){return Nf(t.getHours()%12||12,n,2)}function Wf(t,n){return Nf(1+ou.count(Tu(t),t),n,3)}function $f(t,n){return Nf(t.getMilliseconds(),n,3)}function Zf(t,n){return Nf(t.getMonth()+1,n,2)}function Gf(t,n){return Nf(t.getMinutes(),n,2)}function Jf(t,n){return Nf(t.getSeconds(),n,2)}function Qf(t,n){return Nf(cu.count(Tu(t),t),n,2)}function Kf(t){return t.getDay()}function tc(t,n){return Nf(su.count(Tu(t),t),n,2)}function nc(t,n){return Nf(t.getFullYear()%100,n,2)}function ec(t,n){return Nf(t.getFullYear()%1e4,n,4)}function rc(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Nf(n/60|0,"0",2)+Nf(n%60,"0",2)}function ic(t,n){return Nf(t.getUTCDate(),n,2)}function ac(t,n){return Nf(t.getUTCHours(),n,2)}function oc(t,n){return Nf(t.getUTCHours()%12||12,n,2)}function uc(t,n){return Nf(1+zu.count(Gu(t),t),n,3)}function fc(t,n){return Nf(t.getUTCMilliseconds(),n,3)}function cc(t,n){return Nf(t.getUTCMonth()+1,n,2)}function sc(t,n){return Nf(t.getUTCMinutes(),n,2)}function lc(t,n){return Nf(t.getUTCSeconds(),n,2)}function hc(t,n){return Nf(qu.count(Gu(t),t),n,2)}function pc(t){return t.getUTCDay()}function vc(t,n){return Nf(Uu.count(Gu(t),t),n,2)}function dc(t,n){return Nf(t.getUTCFullYear()%100,n,2)}function _c(t,n){return Nf(t.getUTCFullYear()%1e4,n,4)}function yc(){return"+0000"}function gc(){return"%"}var mc;t.timeFormat;t.timeParse;t.utcFormat;t.utcParse;xc({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function xc(n){mc=wf(n);t.timeFormat=mc.format;t.timeParse=mc.parse;t.utcFormat=mc.utcFormat;t.utcParse=mc.utcParse;return mc}var wc="%Y-%m-%dT%H:%M:%S.%LZ";function bc(t){return t.toISOString()}var Mc=Date.prototype.toISOString?bc:t.utcFormat(wc);function kc(t){var n=new Date(t);return isNaN(n)?null:n}var Tc=+new Date("2000-01-01T00:00:00.000Z")?kc:t.utcParse(wc);var Nc=Array.prototype;var Sc=Nc.map;var Ec=Nc.slice;var Ac={name:"implicit"};function Cc(t){var n=H(),e=[],r=Ac;t=t==null?[]:Ec.call(t);function i(i){var a=i+"",o=n.get(a);if(!o){if(r!==Ac)return r;n.set(a,o=e.push(i))}return t[(o-1)%t.length]}i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=H();var r=-1,a=t.length,o,u;while(++r=e?1:r(t)}}}function Oc(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function Fc(t,n,e,r){var i=t[0],a=t[1],o=n[0],u=n[1];if(a2?Yc:Fc;u=f=null;return s}function s(n){return(u||(u=o(e,r,a?Dc(t):t,i)))(+n)}s.invert=function(t){return(f||(f=o(r,e,Rc,a?Oc(n):n)))(+t)};s.domain=function(t){return arguments.length?(e=Sc.call(t,Uc),c()):e.slice()};s.range=function(t){return arguments.length?(r=Ec.call(t),c()):r.slice()};s.rangeRound=function(t){return r=Ec.call(t),i=la,c()};s.clamp=function(t){return arguments.length?(a=!!t,c()):a};s.interpolate=function(t){return arguments.length?(i=t,c()):i};return c()}function Hc(n,e,r){var i=n[0],a=n[n.length-1],o=M(i,a,e==null?10:e),u;r=ff(r==null?",f":r);switch(r.type){case"s":{var f=Math.max(Math.abs(i),Math.abs(a));if(r.precision==null&&!isNaN(u=_f(o,f)))r.precision=u;return t.formatPrefix(r,f)}case"":case"e":case"g":case"p":case"r":{if(r.precision==null&&!isNaN(u=yf(o,Math.max(Math.abs(i),Math.abs(a)))))r.precision=u-(r.type==="e");break}case"f":case"%":{if(r.precision==null&&!isNaN(u=df(o)))r.precision=u-(r.type==="%")*2;break}}return t.format(r)}function Xc(t){var n=t.domain;t.ticks=function(t){var e=n();return b(e[0],e[e.length-1],t==null?10:t)};t.tickFormat=function(t,e){return Hc(n(),t,e)};t.nice=function(e){var r=n(),i=r.length-1,a=e==null?10:e,o=r[0],u=r[i],f=M(o,u,a);if(f){f=M(Math.floor(o/f)*f,Math.ceil(u/f)*f,a);r[0]=Math.floor(o/f)*f;r[i]=Math.ceil(u/f)*f;n(r)}return t};return t}function Vc(){var t=jc(Rc,ra);t.copy=function(){return Bc(t,Vc())};return Xc(t)}function Wc(){var t=[0,1];function n(t){return+t}n.invert=n;n.domain=n.range=function(e){return arguments.length?(t=Sc.call(e,Uc),n):t.slice()};n.copy=function(){return Wc().domain(t)};return Xc(n)}function $c(t,n){t=t.slice();var e=0,r=t.length-1,i=t[e],a=t[r],o;if(a0)for(;cu)break;d.push(p)}}else for(;c=1;--h){p=l*h;if(pu)break;d.push(p)}}}else{d=b(c,s,Math.min(s-c,v)).map(a)}return f?d.reverse():d};n.tickFormat=function(e,o){if(o==null)o=r===10?".0e":",";if(typeof o!=="function")o=t.format(o);if(e===Infinity)return o;if(e==null)e=10;var u=Math.max(1,r*e/n.ticks().length);return function(t){var n=t/a(Math.round(i(t)));if(n*r0?r[i-1]:t[0],i=e?[r[e-1],n]:[r[o-1],r[o]]};a.copy=function(){return os().domain([t,n]).range(i)};return Xc(a)}function us(){var t=[.5],n=[0,1],e=1;function r(r){if(r<=r)return n[o(t,r,0,e)]}r.domain=function(i){return arguments.length?(t=Ec.call(i),e=Math.min(t.length,n.length-1),r):t.slice()};r.range=function(i){return arguments.length?(n=Ec.call(i),e=Math.min(t.length,n.length-1),r):n.slice()};r.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]};r.copy=function(){return us().domain(t).range(n)};return r}var fs=1e3;var cs=fs*60;var ss=cs*60;var ls=ss*24;var hs=ls*7;var ps=ls*30;var vs=ls*365;function ds(t){return new Date(t)}function _s(t){return t instanceof Date?+t:+new Date(+t)}function ys(t,n,e,i,a,o,u,f,c){var s=jc(Rc,ra),l=s.invert,h=s.domain;var p=c(".%L"),v=c(":%S"),d=c("%I:%M"),_=c("%I %p"),y=c("%a %d"),g=c("%b %d"),m=c("%B"),x=c("%Y");var w=[[u,1,fs],[u,5,5*fs],[u,15,15*fs],[u,30,30*fs],[o,1,cs],[o,5,5*cs],[o,15,15*cs],[o,30,30*cs],[a,1,ss],[a,3,3*ss],[a,6,6*ss],[a,12,12*ss],[i,1,ls],[i,2,2*ls],[e,1,hs],[n,1,ps],[n,3,3*ps],[t,1,vs]];function b(r){return(u(r)1)t-=Math.floor(t);var n=Math.abs(t-.5);Es.h=360*t-100;Es.s=1.5-1.5*n;Es.l=.8-.9*n;return Es+""}function Cs(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var zs=Cs(xs("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Ps=Cs(xs("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));var Ls=Cs(xs("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));var qs=Cs(xs("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Us(t){var n=0,e=1,r=false;function i(i){var a=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,a)):a)}i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]};i.clamp=function(t){return arguments.length?(r=!!t,i):r};i.interpolator=function(n){return arguments.length?(t=n,i):t};i.copy=function(){return Us(t).domain([n,e]).clamp(r)};return Xc(i)}var Is="http://www.w3.org/1999/xhtml";var Rs={svg:"http://www.w3.org/2000/svg",xhtml:Is,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ds(t){var n=t+="",e=n.indexOf(":");if(e>=0&&(n=t.slice(0,e))!=="xmlns")t=t.slice(e+1);return Rs.hasOwnProperty(n)?{space:Rs[n],local:t}:t}function Os(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Is&&n.documentElement.namespaceURI===Is?n.createElement(t):n.createElementNS(e,t)}}function Fs(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ys(t){var n=Ds(t);return(n.local?Fs:Os)(n)}var Bs=0;function js(){return new Hs}function Hs(){this._="@"+(++Bs).toString(36)}Hs.prototype=js.prototype={constructor:Hs,get:function(t){var n=this._;while(!(n in t))if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Xs=function(t){return function(){return this.matches(t)}};if(typeof document!=="undefined"){var Vs=document.documentElement;if(!Vs.matches){var Ws=Vs.webkitMatchesSelector||Vs.msMatchesSelector||Vs.mozMatchesSelector||Vs.oMatchesSelector;Xs=function(t){return function(){return Ws.call(this,t)}}}}var $s=Xs;var Zs={};t.event=null;if(typeof document!=="undefined"){var Gs=document.documentElement;if(!("onmouseenter"in Gs)){Zs={mouseenter:"mouseover",mouseleave:"mouseout"}}}function Js(t,n,e){t=Qs(t,n,e);return function(n){var e=n.relatedTarget;if(!e||e!==this&&!(e.compareDocumentPosition(this)&8)){t.call(this,n)}}}function Qs(n,e,r){return function(i){var a=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=a}}}function Ks(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0)n=t.slice(e+1),t=t.slice(0,e);return{type:t,name:n}})}function tl(t){return function(){var n=this.__on;if(!n)return;for(var e=0,r=-1,i=n.length,a;e=m)m=g+1;while(!(w=_[m])&&++m=0;){if(o=r[i]){if(a&&a!==o.nextSibling)a.parentNode.insertBefore(o,a);a=o}}}return this}function Tl(t){if(!t)t=Nl;function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}for(var e=this._groups,r=e.length,i=new Array(r),a=0;an?1:t>=n?0:NaN}function Sl(){var t=arguments[0];arguments[0]=this;t.apply(null,arguments);return this}function El(){var t=new Array(this.size()),n=-1;this.each(function(){t[++n]=this});return t}function Al(){for(var t=this._groups,n=0,e=t.length;n1?this.each((n==null?Yl:typeof n==="function"?jl:Bl)(t,n,e==null?"":e)):Fl(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function Xl(t){return function(){delete this[t]}}function Vl(t,n){return function(){this[t]=n}}function Wl(t,n){return function(){var e=n.apply(this,arguments);if(e==null)delete this[t];else this[t]=e}}function $l(t,n){return arguments.length>1?this.each((n==null?Xl:typeof n==="function"?Wl:Vl)(t,n)):this.node()[t]}function Zl(t){return t.trim().split(/^|\s+/)}function Gl(t){return t.classList||new Jl(t)}function Jl(t){this._node=t;this._names=Zl(t.getAttribute("class")||"")}Jl.prototype={add:function(t){var n=this._names.indexOf(t);if(n<0){this._names.push(t);this._node.setAttribute("class",this._names.join(" "))}},remove:function(t){var n=this._names.indexOf(t);if(n>=0){this._names.splice(n,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(t){return this._names.indexOf(t)>=0}};function Ql(t,n){var e=Gl(t),r=-1,i=n.length;while(++rUh)throw new Error("too late");return e}function jh(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Rh)throw new Error("too late");return e}function Hh(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Xh(t,n,e){var r=t.__transition,i;r[n]=e;e.timer=Io(a,0,e.time);function a(t){e.state=Ih;if(e.delay<=t)o(t-e.delay);else e.timer.restart(o,e.delay,e.time)}function o(a){var o,f,c,s;for(o in r){s=r[o];if(s.name!==e.name)continue;if(s.state===Dh){s.state=Fh;s.timer.stop();s.on.call("interrupt",t,t.__data__,s.index,s.group);delete r[o]}else if(+o=0)t=t.slice(0,n);return!t||t==="start"})}function xp(t,n,e){var r,i,a=mp(n)?Bh:jh;return function(){var o=a(this,t),u=o.on;if(u!==r)(i=(r=u).copy()).on(n,e);o.on=i}}function wp(t,n){var e=this._id;return arguments.length<2?Hh(this.node(),e).on.on(t):this.each(xp(e,t,n))}function bp(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;if(n)n.removeChild(this)}}function Mp(){return this.on("end.remove",bp(this._id))}function kp(t){var n=this._name,e=this._id;if(typeof t!=="function")t=fl(t);for(var r=this._groups,i=r.length,a=new Array(i),o=0;oIh&&r.name===n){return new Fp([[t]],Wp,n,+i)}}}return null}var Zp=Array.prototype.slice;function Gp(t){return t}var Jp=1;var Qp=2;var Kp=3;var tv=4;var nv=1e-6;function ev(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function rv(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function iv(t){var n=t.bandwidth()/2;return function(e){return t(e)+n}}function av(){return!this.__axis}function ov(t,n){var e=[],r=null,i=null,a=6,o=6,u=3;function f(f){var c=r==null?n.ticks?n.ticks.apply(n,e):n.domain():r,s=i==null?n.tickFormat?n.tickFormat.apply(n,e):Gp:i,l=Math.max(a,0)+u,h=t===Jp||t===Kp?ev:rv,p=n.range(),v=p[0]+.5,d=p[p.length-1]+.5,_=(n.bandwidth?iv:Gp)(n.copy()),y=f.selection?f.selection():f,g=y.selectAll(".domain").data([null]),m=y.selectAll(".tick").data(c,n).order(),x=m.exit(),w=m.enter().append("g").attr("class","tick"),b=m.select("line"),M=m.select("text"),k=t===Jp||t===tv?-1:1,T,N=t===tv||t===Qp?(T="x", "y"):(T="y","x");g=g.merge(g.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000"));m=m.merge(w);b=b.merge(w.append("line").attr("stroke","#000").attr(T+"2",k*a).attr(N+"1",.5).attr(N+"2",.5));M=M.merge(w.append("text").attr("fill","#000").attr(T,k*l).attr(N,.5).attr("dy",t===Jp?"0em":t===Kp?".71em":".32em"));if(f!==y){g=g.transition(f);m=m.transition(f);b=b.transition(f);M=M.transition(f);x=x.transition(f).attr("opacity",nv).attr("transform",function(t){return h(_,this.parentNode.__axis||_,t)});w.attr("opacity",nv).attr("transform",function(t){return h(this.parentNode.__axis||_,_,t)})}x.remove();g.attr("d",t===tv||t==Qp?"M"+k*o+","+v+"H0.5V"+d+"H"+k*o:"M"+v+","+k*o+"V0.5H"+d+"V"+k*o);m.attr("opacity",1).attr("transform",function(t){return h(_,_,t)});b.attr(T+"2",k*a);M.attr(T,k*l).text(s);y.filter(av).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Qp?"start":t===tv?"end":"middle");y.each(function(){this.__axis=_})}f.scale=function(t){return arguments.length?(n=t,f):n};f.ticks=function(){return e=Zp.call(arguments),f};f.tickArguments=function(t){return arguments.length?(e=t==null?[]:Zp.call(t),f):e.slice()};f.tickValues=function(t){return arguments.length?(r=t==null?null:Zp.call(t),f):r&&r.slice()};f.tickFormat=function(t){return arguments.length?(i=t,f):i};f.tickSize=function(t){return arguments.length?(a=o=+t,f):a};f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a};f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o};f.tickPadding=function(t){return arguments.length?(u=+t,f):u};return f}function uv(t){return ov(Jp,t)}function fv(t){return ov(Qp,t)}function cv(t){return ov(Kp,t)}function sv(t){return ov(tv,t)}function lv(t,n){return t.parent===n.parent?1:2}function hv(t){return t.reduce(pv,0)/t.length}function pv(t,n){return t+n.x}function vv(t){return 1+t.reduce(dv,0)}function dv(t,n){return Math.max(t,n.y)}function _v(t){var n;while(n=t.children)t=n[0];return t}function yv(t){var n;while(n=t.children)t=n[n.length-1];return t}function gv(){var t=lv,n=1,e=1,r=false;function i(i){var a,o=0;i.eachAfter(function(n){var e=n.children;if(e){n.x=hv(e);n.y=vv(e)}else{n.x=a?o+=t(n,a):0;n.y=0;a=n}});var u=_v(i),f=yv(i),c=u.x-t(u,f)/2,s=f.x+t(f,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n;t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-c)/(s-c)*n;t.y=(1-(i.y?t.y/i.y:1))*e})}i.separation=function(n){return arguments.length?(t=n,i):t};i.size=function(t){return arguments.length?(r=false,n=+t[0],e=+t[1],i):r?null:[n,e]};i.nodeSize=function(t){return arguments.length?(r=true,n=+t[0],e=+t[1],i):r?[n,e]:null};return i}function mv(t){var n=this,e,r=[n],i,a,o;do{e=r.reverse(),r=[];while(n=e.pop()){t(n),i=n.children;if(i)for(a=0,o=i.length;a=0;--i){e.push(r[i])}}return this}function wv(t){var n=this,e=[n],r=[],i,a,o;while(n=e.pop()){r.push(n),i=n.children;if(i)for(a=0,o=i.length;a=0)e+=r[i].value;n.value=e})}function Mv(t){return this.eachBefore(function(n){if(n.children){n.children.sort(t)}})}function kv(t){var n=this,e=Tv(n,t),r=[n];while(n!==e){n=n.parent;r.push(n)}var i=r.length;while(t!==e){r.splice(i,0,t);t=t.parent}return r}function Tv(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop();n=r.pop();while(t===n){i=t;t=e.pop();n=r.pop()}return i}function Nv(){var t=this,n=[t];while(t=t.parent){n.push(t)}return n}function Sv(){var t=[];this.each(function(n){t.push(n)});return t}function Ev(){var t=[];this.eachBefore(function(n){if(!n.children){t.push(n)}});return t}function Av(){var t=this,n=[];t.each(function(e){if(e!==t){n.push({source:e.parent,target:e})}});return n}function Cv(t,n){var e=new Uv(t),r=+t.value&&(e.value=t.value),i,a=[e],o,u,f,c;if(n==null)n=Pv;while(i=a.pop()){if(r)i.value=+i.data.value;if((u=n(i.data))&&(c=u.length)){i.children=new Array(c);for(f=c-1;f>=0;--f){a.push(o=i.children[f]=new Uv(u[f]));o.parent=i;o.depth=i.depth+1}}}return e.eachBefore(qv)}function zv(){return Cv(this).eachBefore(Lv)}function Pv(t){return t.children}function Lv(t){t.data=t.data.data}function qv(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function Uv(t){this.data=t;this.depth=this.height=0;this.parent=null}Uv.prototype=Cv.prototype={constructor:Uv,each:mv,eachAfter:wv,eachBefore:xv,sum:bv,sort:Mv,path:kv,ancestors:Nv,descendants:Sv,leaves:Ev,links:Av,copy:zv};function Iv(t){this._=t;this.next=null}function Rv(t){var n,e=(t=t.slice()).length,r=null,i=r;while(e){var a=new Iv(t[e-1]);if(i)i=i.next=a;else i=r=a;t[n]=t[--e]}return{head:r,tail:i}}function Dv(t){return Fv(Rv(t),[])}function Ov(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function Fv(t,n){var e,r=null,i=t.head,a,o;switch(n.length){case 1:e=Yv(n[0]);break;case 2:e=Bv(n[0],n[1]);break;case 3:e=jv(n[0],n[1],n[2]);break}while(i){o=i._,a=i.next;if(!e||!Ov(e,o)){if(r)t.tail=r,r.next=null;else t.head=t.tail=null;n.push(o);e=Fv(t,n);n.pop();if(t.head)i.next=t.head,t.head=i;else i.next=null,t.head=t.tail=i;r=t.tail,r.next=a}else{r=i}i=a}t.tail=r;return e}function Yv(t){return{x:t.x,y:t.y,r:t.r}}function Bv(t,n){var e=t.x,r=t.y,i=t.r,a=n.x,o=n.y,u=n.r,f=a-e,c=o-r,s=u-i,l=Math.sqrt(f*f+c*c);return{x:(e+a+f/l*s)/2,y:(r+o+c/l*s)/2,r:(l+i+u)/2}}function jv(t,n,e){var r=t.x,i=t.y,a=t.r,o=n.x,u=n.y,f=n.r,c=e.x,s=e.y,l=e.r,h=2*(r-o),p=2*(i-u),v=2*(f-a),d=r*r+i*i-a*a-o*o-u*u+f*f,_=2*(r-c),y=2*(i-s),g=2*(l-a),m=r*r+i*i-a*a-c*c-s*s+l*l,x=_*p-h*y,w=(p*m-y*d)/x-r,b=(y*v-p*g)/x,M=(_*d-h*m)/x-i,k=(h*g-_*v)/x,T=b*b+k*k-1,N=2*(w*b+M*k+a),S=w*w+M*M-a*a,E=(-N-Math.sqrt(N*N-4*T*S))/(2*T);return{x:w+b*E+r,y:M+k*E+i,r:E}}function Hv(t,n,e){var r=t.x,i=t.y,a=n.r+e.r,o=t.r+e.r,u=n.x-r,f=n.y-i,c=u*u+f*f;if(c){var s=.5+((o*=o)-(a*=a))/(2*c),l=Math.sqrt(Math.max(0,2*a*(o+c)-(o-=c)*o-a*a))/(2*c);e.x=r+s*u+l*f;e.y=i+s*f-l*u}else{e.x=r+o;e.y=i}}function Xv(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i>e*e+r*r}function Vv(t,n,e){var r=t.x-n,i=t.y-e;return r*r+i*i}function Wv(t){this._=t;this.next=null;this.previous=null}function $v(t){if(!(i=t.length))return 0;var n,e,r,i;n=t[0],n.x=0,n.y=0;if(!(i>1))return n.r;e=t[1],n.x=-e.r,e.x=n.r,e.y=0;if(!(i>2))return n.r+e.r;Hv(e,n,r=t[2]);var a=n.r*n.r,o=e.r*e.r,u=r.r*r.r,f=a+o+u,c=a*n.x+o*e.x+u*r.x,s=a*n.y+o*e.y+u*r.y,l,h,p,v,d,_,y;n=new Wv(n),e=new Wv(e),r=new Wv(r);n.next=r.previous=e;e.next=n.previous=r;r.next=e.previous=n;t:for(p=3;p0)throw new Error("cycle");return o}e.id=function(n){return arguments.length?(t=Jv(n),e):t};e.parentId=function(t){return arguments.length?(n=Jv(t),e):n};return e}function vd(t,n){return t.parent===n.parent?1:2}function dd(t){var n=t.children;return n?n[0]:t.t}function _d(t){var n=t.children;return n?n[n.length-1]:t.t}function yd(t,n,e){var r=e/(n.i-t.i);n.c-=r;n.s+=e;t.c+=r;n.z+=e;n.m+=e}function gd(t){var n=0,e=0,r=t.children,i=r.length,a;while(--i>=0){a=r[i];a.z+=n;a.m+=n;n+=a.s+(e+=a.c)}}function md(t,n,e){return t.a.parent===n.parent?t.a:e}function xd(t,n){this._=t;this.parent=null;this.children=null;this.A=null;this.a=this;this.z=0;this.m=0;this.c=0;this.s=0;this.t=null;this.i=n}xd.prototype=Object.create(Uv.prototype);function wd(t){var n=new xd(t,0),e,r=[n],i,a,o,u;while(e=r.pop()){if(a=e._.children){e.children=new Array(u=a.length);for(o=u-1;o>=0;--o){r.push(i=e.children[o]=new xd(a[o],o));i.parent=e}}}(n.parent=new xd(null,0)).children=[n];return n}function bd(){var t=vd,n=1,e=1,r=null;function i(i){var u=wd(i);u.eachAfter(a),u.parent.m=-u.z;u.eachBefore(o);if(r)i.eachBefore(f);else{var c=i,s=i,l=i;i.eachBefore(function(t){if(t.xs.x)s=t;if(t.depth>l.depth)l=t});var h=c===s?1:t(c,s)/2,p=h-c.x,v=n/(s.x+h+p),d=e/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*v;t.y=t.depth*d})}return i}function a(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){gd(n);var a=(e[0].z+e[e.length-1].z)/2;if(i){n.z=i.z+t(n._,i._);n.m=n.z-a}else{n.z=a}}else if(i){n.z=i.z+t(n._,i._)}n.parent.A=u(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m;t.m+=t.parent.m}function u(n,e,r){if(e){var i=n,a=n,o=e,u=i.parent.children[0],f=i.m,c=a.m,s=o.m,l=u.m,h;while(o=_d(o),i=dd(i),o&&i){u=dd(u);a=_d(a);a.a=n;h=o.z+s-i.z-f+t(o._,i._);if(h>0){yd(md(o,n,r),n,h);f+=h;c+=h}s+=o.m;f+=i.m;l+=u.m;c+=a.m}if(o&&!_d(a)){a.t=o;a.m+=s-c}if(i&&!dd(u)){u.t=i;u.m+=f-l;r=n}}return r}function f(t){t.x*=n;t.y=t.depth*e}i.separation=function(n){return arguments.length?(t=n,i):t};i.size=function(t){return arguments.length?(r=false,n=+t[0],e=+t[1],i):r?null:[n,e]};i.nodeSize=function(t){return arguments.length?(r=true,n=+t[0],e=+t[1],i):r?[n,e]:null};return i}function Md(t,n,e,r,i){var a=t.children,o,u=-1,f=a.length,c=t.value&&(i-e)/t.value;while(++ug)g=c;b=_*_*w;m=Math.max(g/b,b/y);if(m>x){_-=c;break}x=m}o.push(f={value:_,dice:p1?n:1)};return e}(kd);function Sd(){var t=Nd,n=false,e=1,r=1,i=[0],a=Qv,o=Qv,u=Qv,f=Qv,c=Qv;function s(t){t.x0=t.y0=0;t.x1=e;t.y1=r;t.eachBefore(l);i=[0];if(n)t.eachBefore(ad);return t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;if(l=n-1){var f=a[t];f.x0=r,f.y0=i;f.x1=o,f.y1=u;return}var l=c[t],h=e/2+l,p=t+1,v=n-1;while(p>>1;if(c[d]o-r){var g=(i*y+u*_)/e;s(t,p,_,r,i,o,g);s(p,n,y,r,g,o,u)}else{var m=(r*y+o*_)/e;s(t,p,_,r,i,m,u);s(p,n,y,m,i,o,u)}}}function Ad(t,n,e,r,i){(t.depth&1?Md:od)(t,n,e,r,i)}var Cd=function t(n){function e(t,e,r,i,a){if((o=t._squarify)&&o.ratio===n){var o,u,f,c,s=-1,l,h=o.length,p=t.value;while(++s1?n:1)};return e}(kd);function zd(t,n){var e;if(t==null)t=0;if(n==null)n=0;function r(){var r,i=e.length,a,o=0,u=0;for(r=0;rt){var d=c-u.x-u.vx,_=s-u.y-u.vy,y=d*d+_*_;if(yc+v||as+v||ot.r){t.r=t[n].r}}}a.initialize=function(r){var i,a=(n=r).length;e=new Array(a);for(i=0;i1?(e==null?u.remove(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i=0,a=t.length,o,u,f,c,s;if(r==null)r=Infinity;else r*=r;for(i=0;i1?(c.on(t,e),n):c.on(t)}}}function Hd(){var t,n,e,r=Pd(-30),i,a=1,o=Infinity,u=.81;function f(r){var i,a=t.length,o=Pn(t,Od,Fd).visitAfter(s);for(e=r,i=0;i=o)return;if(t.data!==n||t.next){if(s===0)s=Ld(),p+=s*s;if(l===0)l=Ld(),p+=l*l;if(p0)return;d/=p;if(p<0){if(d0){if(d>h)return;if(d>l)l=d}d=r-u;if(!p&&d<0)return;d/=p;if(p<0){if(d>h)return;if(d>l)l=d}else if(p>0){if(d0)return;d/=v;if(v<0){if(d0){if(d>h)return;if(d>l)l=d}d=i-f;if(!v&&d<0)return;d/=v;if(v<0){if(d>h)return;if(d>l)l=d}else if(v>0){if(d0)&&!(h<1))return true;if(l>0)t[0]=[u+l*p,f+l*v];if(h<1)t[1]=[u+h*p,f+h*v];return true}function d_(t,n,e,r,i){var a=t[1];if(a)return true;var o=t[0],u=t.left,f=t.right,c=u[0],s=u[1],l=f[0],h=f[1],p=(c+l)/2,v=(s+h)/2,d,_;if(h===s){if(p=r)return;if(c>l){if(!o)o=[p,e];else if(o[1]>=i)return;a=[p,i]}else{if(!o)o=[p,i];else if(o[1]1){if(c>l){if(!o)o=[(e-_)/d,e];else if(o[1]>=i)return;a=[(i-_)/d,i]}else{if(!o)o=[(i-_)/d,i];else if(o[1]=r)return;a=[r,d*r+_]}else{if(!o)o=[r,d*r+_];else if(o[0]I_||Math.abs(a[0][1]-a[1][1])>I_)){delete Y_[i]}}}function y_(t){return O_[t.index]={site:t,halfedges:[]}}function g_(t,n){var e=t.site,r=n.left,i=n.right;if(e===i)i=r,r=e;if(i)return Math.atan2(i[1]-r[1],i[0]-r[0]);if(e===r)r=n[1],i=n[0];else r=n[0],i=n[1];return Math.atan2(r[0]-i[0],i[1]-r[1])}function m_(t,n){return n[+(n.left!==t.site)]}function x_(t,n){return n[+(n.left===t.site)]}function w_(){for(var t=0,n=O_.length,e,r,i,a;tI_||Math.abs(_-p)>I_){c.splice(f,0,Y_.push(h_(u,v,Math.abs(d-t)I_?[t,Math.abs(h-t)I_?[Math.abs(p-r)I_?[e,Math.abs(h-e)I_?[Math.abs(p-n)=-R_)return;var p=f*f+c*c,v=s*s+l*l,d=(l*p-c*v)/h,_=(f*v-s*p)/h;var y=M_.pop()||new T_;y.arc=t;y.site=i;y.x=d+o;y.y=(y.cy=_+u)+Math.sqrt(d*d+_*_);t.circle=y;var g=null,m=F_._;while(m){if(y.yI_)u=u.L;else{o=n-U_(u,e);if(o>I_){if(!u.R){r=u;break}u=u.R}else{if(a>-I_){r=u.P;i=u}else if(o>-I_){r=u;i=u.N}else{r=i=u}break}}}y_(t);var f=C_(t);D_.insert(r,f);if(!r&&!i)return;if(r===i){S_(r);i=C_(r.site);D_.insert(f,i);f.edge=i.edge=l_(r.site,f.site);N_(r);N_(i);return}if(!i){f.edge=l_(r.site,f.site);return}S_(r);S_(i);var c=r.site,s=c[0],l=c[1],h=t[0]-s,p=t[1]-l,v=i.site,d=v[0]-s,_=v[1]-l,y=2*(h*_-p*d),g=h*h+p*p,m=d*d+_*_,x=[(_*g-p*m)/y+s,(h*m-d*g)/y+l];p_(i.edge,c,v,x);f.edge=l_(c,t,null,x);i.edge=l_(t,v,null,x);N_(r);N_(i)}function q_(t,n){var e=t.site,r=e[0],i=e[1],a=i-n;if(!a)return r;var o=t.P;if(!o)return-Infinity;e=o.site;var u=e[0],f=e[1],c=f-n;if(!c)return u;var s=u-r,l=1/a-1/c,h=s/c;if(l)return(-h+Math.sqrt(h*h-2*l*(s*s/(-2*c)-f+c/2+i-a/2)))/l+r;return(r+u)/2}function U_(t,n){var e=t.N;if(e)return q_(e,n);var r=t.site;return r[1]===n?r[0]:Infinity}var I_=1e-6;var R_=1e-12;var D_;var O_;var F_;var Y_;function B_(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function j_(t,n){return n[1]-t[1]||n[0]-t[0]}function H_(t,n){var e=t.sort(j_).pop(),r,i,a;Y_=[];O_=new Array(t.length);D_=new o_;F_=new o_;while(true){a=k_;if(e&&(!a||e[1]0)Ah(this).transition().duration(c).call(T,u,i);else Ah(this).call(x.transform,u)}function z(){if(!n.apply(this,arguments))return;var r=N(this,arguments),i=t.event.changedTouches,a=i.length,o,u,f;J_();for(o=0;oMath.abs(t[1]-L[1]))z=true;else C=true}L=t;E=true;oy();O()}function O(){var t;N=L[0]-P[0];S=L[1]-P[1];switch(a){case fy:case uy:{if(u)N=Math.max(v-d,Math.min(x-w,N)),_=d+N,b=w+N;if(s)S=Math.max(y-g,Math.min(M-k,S)),m=g+S,T=k+S;break}case cy:{if(u<0)N=Math.max(v-d,Math.min(x-d,N)),_=d+N,b=w;else if(u>0)N=Math.max(v-w,Math.min(x-w,N)),_=d,b=w+N;if(s<0)S=Math.max(y-g,Math.min(M-g,S)),m=g+S,T=k;else if(s>0)S=Math.max(y-k,Math.min(M-k,S)),m=g,T=k+S;break}case sy:{if(u)_=Math.max(v,Math.min(x,d-N*u)),b=Math.max(v,Math.min(x,w+N*u));if(s)m=Math.max(y,Math.min(M,g-S*s)),T=Math.max(y,Math.min(M,k+S*s));break}}if(b<_){u*=-1;t=d,d=w,w=t;t=_,_=b,b=t;if(i in dy)I.attr("cursor",vy[i=dy[i]])}if(T0)d=_-N;if(s<0)k=T-S;else if(s>0)g=m-S;a=fy;I.attr("cursor",vy.selection);O()}break}default:return}oy()}function B(){switch(t.event.keyCode){case 16:{if(A){C=z=A=false;O()}break}case 18:{if(a===sy){if(u<0)w=b;else if(u>0)d=_;if(s<0)k=T;else if(s>0)g=m;a=cy;O()}break}case 32:{if(a===fy){if(t.event.altKey){if(u)w=b-N*u,d=_+N*u;if(s)k=T-S*s,g=m+S*s;a=sy}else{if(u<0)w=b;else if(u>0)d=_;if(s<0)k=T;else if(s>0)g=m;a=cy}I.attr("cursor",vy[i]);O()}break}default:return}oy()}}function h(){var t=this.__brush||{selection:null};t.extent=e.apply(this,arguments);t.dim=n;return t}u.extent=function(t){return arguments.length?(e=typeof t==="function"?t:ry([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),u):e};u.filter=function(t){return arguments.length?(r=typeof t==="function"?t:ry(!!t),u):r};u.handleSize=function(t){return arguments.length?(a=+t,u):a};u.on=function(){var t=i.on.apply(i,arguments);return t===i?u:t};return u}function Ay(){return new Cy}function Cy(){this.reset()}Cy.prototype={constructor:Cy,reset:function(){this.s=this.t=0},add:function(t){Py(zy,t,this.t);Py(this,zy.s,this.s);if(this.s)this.t+=zy.t;else this.s=zy.t},valueOf:function(){return this.s}};var zy=new Cy;function Py(t,n,e){var r=t.s=n+e,i=r-n,a=r-i;t.t=n-a+(e-i)}var Ly=1e-6;var qy=1e-12;var Uy=Math.PI;var Iy=Uy/2;var Ry=Uy/4;var Dy=Uy*2;var Oy=180/Uy;var Fy=Uy/180;var Yy=Math.abs;var By=Math.atan;var jy=Math.atan2;var Hy=Math.cos;var Xy=Math.ceil;var Vy=Math.exp;var Wy=Math.log;var $y=Math.pow;var Zy=Math.sin;var Gy=Math.sign||function(t){return t>0?1:t<0?-1:0};var Jy=Math.sqrt;var Qy=Math.tan;function Ky(t){return t>1?0:t<-1?Uy:Math.acos(t)}function tg(t){return t>1?Iy:t<-1?-Iy:Math.asin(t)}function ng(t){return(t=Zy(t/2))*t}function eg(){}function rg(t,n){if(t&&ag.hasOwnProperty(t.type)){ag[t.type](t,n)}}var ig={Feature:function(t,n){rg(t.geometry,n)},FeatureCollection:function(t,n){var e=t.features,r=-1,i=e.length;while(++r=0?1:-1,i=r*e,a=Hy(n),o=Zy(n),u=dg*o,f=vg*a+u*Hy(i),c=u*r*Zy(i);cg.add(jy(c,f));pg=t,vg=a,dg=o}function wg(t){if(sg)sg.reset();else sg=Ay(),cg=Ay();fg(t,_g);return sg*2}function bg(t){return[jy(t[1],t[0]),tg(t[2])]}function Mg(t){var n=t[0],e=t[1],r=Hy(e);return[r*Hy(n),r*Zy(n),Zy(e)]}function kg(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Tg(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ng(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Sg(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Eg(t){var n=Jy(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Ag;var Cg;var zg;var Pg;var Lg;var qg;var Ug;var Ig;var Rg;var Dg;var Og;var Fg={point:Yg,lineStart:jg,lineEnd:Hg,polygonStart:function(){Fg.point=Xg;Fg.lineStart=Vg;Fg.lineEnd=Wg;Rg.reset();_g.polygonStart()},polygonEnd:function(){_g.polygonEnd();Fg.point=Yg;Fg.lineStart=jg;Fg.lineEnd=Hg;if(cg<0)Ag=-(zg=180),Cg=-(Pg=90);else if(Rg>Ly)Pg=90;else if(Rg<-Ly)Cg=-90;Og[0]=Ag,Og[1]=zg}};function Yg(t,n){Dg.push(Og=[Ag=t,zg=t]);if(nPg)Pg=n}function Bg(t,n){var e=Mg([t*Fy,n*Fy]);if(Ig){var r=Tg(Ig,e),i=[r[1],-r[0],0],a=Tg(i,r);Eg(a);a=bg(a);var o=t-Lg,u=o>0?1:-1,f=a[0]*Oy*u,c,s=Yy(o)>180;if(s^(u*LgPg)Pg=c}else if(f=(f+360)%360-180,s^(u*LgPg)Pg=n}if(s){if(t$g(Ag,zg))zg=t}else{if($g(t,zg)>$g(Ag,zg))Ag=t}}else{if(zg>=Ag){if(tzg)zg=t}else{if(t>Lg){if($g(Ag,t)>$g(Ag,zg))zg=t}else{if($g(t,zg)>$g(Ag,zg))Ag=t}}}}else{Yg(t,n)}Ig=e,Lg=t}function jg(){Fg.point=Bg}function Hg(){Og[0]=Ag,Og[1]=zg;Fg.point=Yg;Ig=null}function Xg(t,n){if(Ig){var e=t-Lg;Rg.add(Yy(e)>180?e+(e>0?360:-360):e)}else{qg=t,Ug=n}_g.point(t,n);Bg(t,n)}function Vg(){_g.lineStart()}function Wg(){Xg(qg,Ug);_g.lineEnd();if(Yy(Rg)>Ly)Ag=-(zg=180);Og[0]=Ag,Og[1]=zg;Ig=null}function $g(t,n){return(n-=t)<0?n+360:n}function Zg(t,n){return t[0]-n[0]}function Gg(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n$g(r[0],r[1]))r[1]=i[1];if($g(i[0],r[1])>$g(r[0],r[1]))r[0]=i[0]}else{a.push(r=i)}}for(o=-Infinity,e=a.length-1,n=0,r=a[e];n<=e;r=i,++n){i=a[n];if((u=$g(r[1],i[0]))>o)o=u,Ag=i[0],zg=r[1]}}Dg=Og=null;return Ag===Infinity||Cg===Infinity?[[NaN,NaN],[NaN,NaN]]:[[Ag,Cg],[zg,Pg]]}var Qg;var Kg;var tm;var nm;var em;var rm;var im;var am;var om;var um;var fm;var cm;var sm;var lm;var hm;var pm;var vm={sphere:eg,point:dm,lineStart:ym,lineEnd:xm,polygonStart:function(){vm.lineStart=wm;vm.lineEnd=bm},polygonEnd:function(){vm.lineStart=ym;vm.lineEnd=xm}};function dm(t,n){t*=Fy,n*=Fy;var e=Hy(n);_m(e*Hy(t),e*Zy(t),Zy(n))}function _m(t,n,e){++Qg;tm+=(t-tm)/Qg;nm+=(n-nm)/Qg;em+=(e-em)/Qg}function ym(){vm.point=gm}function gm(t,n){t*=Fy,n*=Fy;var e=Hy(n);lm=e*Hy(t);hm=e*Zy(t);pm=Zy(n);vm.point=mm;_m(lm,hm,pm)}function mm(t,n){t*=Fy,n*=Fy;var e=Hy(n),r=e*Hy(t),i=e*Zy(t),a=Zy(n),o=jy(Jy((o=hm*a-pm*i)*o+(o=pm*r-lm*a)*o+(o=lm*i-hm*r)*o),lm*r+hm*i+pm*a);Kg+=o;rm+=o*(lm+(lm=r));im+=o*(hm+(hm=i));am+=o*(pm+(pm=a));_m(lm,hm,pm)}function xm(){vm.point=dm}function wm(){vm.point=Mm}function bm(){km(cm,sm);vm.point=dm}function Mm(t,n){cm=t,sm=n;t*=Fy,n*=Fy;vm.point=km;var e=Hy(n);lm=e*Hy(t);hm=e*Zy(t);pm=Zy(n);_m(lm,hm,pm)}function km(t,n){t*=Fy,n*=Fy;var e=Hy(n),r=e*Hy(t),i=e*Zy(t),a=Zy(n),o=hm*a-pm*i,u=pm*r-lm*a,f=lm*i-hm*r,c=Jy(o*o+u*u+f*f),s=lm*r+hm*i+pm*a,l=c&&-Ky(s)/c,h=jy(c,s);om+=l*o;um+=l*u;fm+=l*f;Kg+=h;rm+=h*(lm+(lm=r));im+=h*(hm+(hm=i));am+=h*(pm+(pm=a));_m(lm,hm,pm)}function Tm(t){Qg=Kg=tm=nm=em=rm=im=am=om=um=fm=0;fg(t,vm);var n=om,e=um,r=fm,i=n*n+e*e+r*r;if(iUy?t-Dy:t<-Uy?t+Dy:t,n]}Em.invert=Em;function Am(t,n,e){return(t%=Dy)?n||e?Sm(zm(t),Pm(n,e)):zm(t):n||e?Pm(n,e):Em}function Cm(t){return function(n,e){return n+=t,[n>Uy?n-Dy:n<-Uy?n+Dy:n,e]}}function zm(t){var n=Cm(t);n.invert=Cm(-t);return n}function Pm(t,n){var e=Hy(t),r=Zy(t),i=Hy(n),a=Zy(n);function o(t,n){var o=Hy(n),u=Hy(t)*o,f=Zy(t)*o,c=Zy(n),s=c*e+u*r;return[jy(f*i-s*a,u*e-c*r),tg(s*i+f*a)]}o.invert=function(t,n){var o=Hy(n),u=Hy(t)*o,f=Zy(t)*o,c=Zy(n),s=c*i-f*a;return[jy(f*i+c*a,u*e+s*r),tg(s*e-u*r)]};return o}function Lm(t){t=Am(t[0]*Fy,t[1]*Fy,t.length>2?t[2]*Fy:0);function n(n){n=t(n[0]*Fy,n[1]*Fy);return n[0]*=Oy,n[1]*=Oy,n}n.invert=function(n){n=t.invert(n[0]*Fy,n[1]*Fy);return n[0]*=Oy,n[1]*=Oy,n};return n}function qm(t,n,e,r,i,a){if(!e)return;var o=Hy(n),u=Zy(n),f=r*e;if(i==null){i=n+r*Dy;a=n-f/2}else{i=Um(o,i);a=Um(o,a);if(r>0?ia)i+=r*Dy}for(var c,s=i;r>0?s>a:s1)t.push(t.pop().concat(t.shift()))},result:function(){var e=t;t=[];n=null;return e}}}function Dm(t,n,e,r,i,a){var o=t[0],u=t[1],f=n[0],c=n[1],s=0,l=1,h=f-o,p=c-u,v;v=e-o;if(!h&&v>0)return;v/=h;if(h<0){if(v0){if(v>l)return;if(v>s)s=v}v=i-o;if(!h&&v<0)return;v/=h;if(h<0){if(v>l)return;if(v>s)s=v}else if(h>0){if(v0)return;v/=p;if(p<0){if(v0){if(v>l)return;if(v>s)s=v}v=a-u;if(!p&&v<0)return;v/=p;if(p<0){if(v>l)return;if(v>s)s=v}else if(p>0){if(v0)t[0]=o+s*h,t[1]=u+s*p;if(l<1)n[0]=o+l*h,n[1]=u+l*p;return true}function Om(t,n){return Yy(t[0]-n[0])=0;--u)i.point((l=s[u])[0],l[1])}else{r(h.x,h.p.x,-1,i)}h=h.p}h=h.o;s=h.z;p=!p}while(!h.v);i.lineEnd()}}function Bm(t){if(!(n=t.length))return;var n,e=0,r=t[0],i;while(++e0){do c.point(s===0||s===3?t:e,s>1?r:n);while((s=(s+u+4)%4)!==l)}else{c.point(a[0],a[1])}}function o(r,i){return Yy(r[0]-t)0?0:3:Yy(r[0]-e)0?2:1:Yy(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return f(t.x,n.x)}function f(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:e===0?n[1]-t[1]:e===1?t[0]-n[0]:e===2?t[1]-n[1]:n[0]-t[0]}return function(o){var f=o,c=Rm(),s,l,h,p,v,d,_,y,g,m,x;var w={point:b,lineStart:N,lineEnd:S,polygonStart:k,polygonEnd:T};function b(t,n){if(i(t,n))f.point(t,n)}function M(){var n=0;for(var e=0,i=l.length;er&&(h-c)*(r-s)>(p-s)*(t-c))++n}else{if(p<=r&&(h-c)*(r-s)<(p-s)*(t-c))--n}}}return n}function k(){f=c,s=[],l=[],x=true}function T(){var t=M(),n=x&&t,e=(s=P(s)).length;if(n||e){o.polygonStart();if(n){o.lineStart();a(null,null,1,o);o.lineEnd()}if(e){Ym(s,u,t,a,o)}o.polygonEnd()}f=o,s=l=h=null}function N(){w.point=E;if(l)l.push(h=[]);m=true;g=false;_=y=NaN}function S(){if(s){E(p,v);if(d&&g)c.rejoin();s.push(c.result())}w.point=b;if(g)f.lineEnd()}function E(a,o){var u=i(a,o);if(l)h.push([a,o]);if(m){p=a,v=o,d=u;m=false;if(u){f.lineStart();f.point(a,o)}}else{if(u&&g)f.point(a,o);else{var c=[_=Math.max(Hm,Math.min(jm,_)),y=Math.max(Hm,Math.min(jm,y))],s=[a=Math.max(Hm,Math.min(jm,a)),o=Math.max(Hm,Math.min(jm,o))];if(Dm(c,s,t,n,e,r)){if(!g){f.lineStart();f.point(c[0],c[1])}f.point(s[0],s[1]);if(!u)f.lineEnd();x=false}else if(u){f.lineStart();f.point(a,o);x=false}}}_=a,y=o,g=u}return w}}function Vm(){var t=0,n=0,e=960,r=500,i,a,o;return o={stream:function(o){return i&&a===o?i:i=Xm(t,n,e,r)(a=o)},extent:function(u){return arguments.length?(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1],i=a=null,o):[[t,n],[e,r]]}}}var Wm;var $m;var Zm;var Gm;var Jm={sphere:eg,point:eg,lineStart:Qm,lineEnd:eg,polygonStart:eg,polygonEnd:eg};function Qm(){Jm.point=tx;Jm.lineEnd=Km}function Km(){Jm.point=Jm.lineEnd=eg}function tx(t,n){t*=Fy,n*=Fy;$m=t,Zm=Zy(n),Gm=Hy(n);Jm.point=nx}function nx(t,n){t*=Fy,n*=Fy;var e=Zy(n),r=Hy(n),i=Yy(t-$m),a=Hy(i),o=Zy(i),u=r*o,f=Gm*e-Zm*r*a,c=Zm*e+Gm*r*a;Wm.add(jy(Jy(u*u+f*f),c));$m=t,Zm=e,Gm=r}function ex(t){if(Wm)Wm.reset();else Wm=Ay();fg(t,Jm);return+Wm}var rx=[null,null];var ix={type:"LineString",coordinates:rx};function ax(t,n){rx[0]=t;rx[1]=n;return ex(ix)}function ox(t,n,e){var r=g(t,n-Ly,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ux(t,n,e){var r=g(t,n-Ly,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function fx(){var t,n,e,r,i,a,o,u,f=10,c=f,s=90,l=360,h,p,v,d,_=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return g(Xy(r/s)*s,e,s).map(v).concat(g(Xy(u/l)*l,o,l).map(d)).concat(g(Xy(n/f)*f,t,f).filter(function(t){return Yy(t%s)>Ly}).map(h)).concat(g(Xy(a/c)*c,i,c).filter(function(t){return Yy(t%l)>Ly}).map(p))}y.lines=function(){return m().map(function(t){return{type:"LineString",coordinates:t}})};y.outline=function(){return{type:"Polygon",coordinates:[v(r).concat(d(o).slice(1),v(e).reverse().slice(1),d(u).reverse().slice(1))]}};y.extent=function(t){if(!arguments.length)return y.extentMinor();return y.extentMajor(t).extentMinor(t)};y.extentMajor=function(t){if(!arguments.length)return[[r,u],[e,o]];r=+t[0][0],e=+t[1][0];u=+t[0][1],o=+t[1][1];if(r>e)t=r,r=e,e=t;if(u>o)t=u,u=o,o=t;return y.precision(_)};y.extentMinor=function(e){if(!arguments.length)return[[n,a],[t,i]];n=+e[0][0],t=+e[1][0];a=+e[0][1],i=+e[1][1];if(n>t)e=n,n=t,t=e;if(a>i)e=a,a=i,i=e;return y.precision(_)};y.step=function(t){if(!arguments.length)return y.stepMinor();return y.stepMajor(t).stepMinor(t)};y.stepMajor=function(t){if(!arguments.length)return[s,l];s=+t[0],l=+t[1];return y};y.stepMinor=function(t){if(!arguments.length)return[f,c];f=+t[0],c=+t[1];return y};y.precision=function(f){if(!arguments.length)return _;_=+f;h=ox(a,i,90);p=ux(n,t,_);v=ox(u,o,90);d=ux(r,e,_);return y};return y.extentMajor([[-180,-90+Ly],[180,90-Ly]]).extentMinor([[-180,-80-Ly],[180,80+Ly]])}function cx(t,n){var e=t[0]*Fy,r=t[1]*Fy,i=n[0]*Fy,a=n[1]*Fy,o=Hy(r),u=Zy(r),f=Hy(a),c=Zy(a),s=o*Hy(e),l=o*Zy(e),h=f*Hy(i),p=f*Zy(i),v=2*tg(Jy(ng(a-r)+o*f*ng(i-e))),d=Zy(v);var _=v?function(t){var n=Zy(t*=v)/d,e=Zy(v-t)/d,r=e*s+n*h,i=e*l+n*p,a=e*u+n*c;return[jy(i,r)*Oy,jy(a,Jy(r*r+i*i))*Oy]}:function(){return[e*Oy,r*Oy]};_.distance=v;return _}function sx(t){return t}var lx=Ay();var hx=Ay();var px;var vx;var dx;var _x;var yx={point:eg,lineStart:eg,lineEnd:eg,polygonStart:function(){yx.lineStart=gx;yx.lineEnd=wx},polygonEnd:function(){yx.lineStart=yx.lineEnd=yx.point=eg;lx.add(Yy(hx));hx.reset()},result:function(){var t=lx/2;lx.reset();return t}};function gx(){yx.point=mx}function mx(t,n){yx.point=xx;px=dx=t,vx=_x=n}function xx(t,n){hx.add(_x*t-dx*n);dx=t,_x=n}function wx(){xx(px,vx)}var bx=Infinity;var Mx=bx;var kx=-bx;var Tx=kx;var Nx={point:Sx,lineStart:eg,lineEnd:eg,polygonStart:eg,polygonEnd:eg,result:function(){var t=[[bx,Mx],[kx,Tx]];kx=Tx=-(Mx=bx=Infinity);return t}};function Sx(t,n){ if(tkx)kx=t;if(nTx)Tx=n}var Ex=0;var Ax=0;var Cx=0;var zx=0;var Px=0;var Lx=0;var qx=0;var Ux=0;var Ix=0;var Rx;var Dx;var Ox;var Fx;var Yx={point:Bx,lineStart:jx,lineEnd:Vx,polygonStart:function(){Yx.lineStart=Wx;Yx.lineEnd=$x},polygonEnd:function(){Yx.point=Bx;Yx.lineStart=jx;Yx.lineEnd=Vx},result:function(){var t=Ix?[qx/Ix,Ux/Ix]:Lx?[zx/Lx,Px/Lx]:Cx?[Ex/Cx,Ax/Cx]:[NaN,NaN];Ex=Ax=Cx=zx=Px=Lx=qx=Ux=Ix=0;return t}};function Bx(t,n){Ex+=t;Ax+=n;++Cx}function jx(){Yx.point=Hx}function Hx(t,n){Yx.point=Xx;Bx(Ox=t,Fx=n)}function Xx(t,n){var e=t-Ox,r=n-Fx,i=Jy(e*e+r*r);zx+=i*(Ox+t)/2;Px+=i*(Fx+n)/2;Lx+=i;Bx(Ox=t,Fx=n)}function Vx(){Yx.point=Bx}function Wx(){Yx.point=Zx}function $x(){Gx(Rx,Dx)}function Zx(t,n){Yx.point=Gx;Bx(Rx=Ox=t,Dx=Fx=n)}function Gx(t,n){var e=t-Ox,r=n-Fx,i=Jy(e*e+r*r);zx+=i*(Ox+t)/2;Px+=i*(Fx+n)/2;Lx+=i;i=Fx*t-Ox*n;qx+=i*(Ox+t);Ux+=i*(Fx+n);Ix+=i*3;Bx(Ox=t,Fx=n)}function Jx(t){var n=4.5;var e={point:r,lineStart:function(){e.point=i},lineEnd:o,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=o;e.point=r},pointRadius:function(t){n=t;return e},result:eg};function r(e,r){t.moveTo(e+n,r);t.arc(e,r,n,0,Dy)}function i(n,r){t.moveTo(n,r);e.point=a}function a(n,e){t.lineTo(n,e)}function o(){e.point=r}function u(){t.closePath()}return e}function Qx(){var t=Kx(4.5),n=[];var e={point:r,lineStart:o,lineEnd:u,polygonStart:function(){e.lineEnd=f},polygonEnd:function(){e.lineEnd=u;e.point=r},pointRadius:function(n){t=Kx(n);return e},result:function(){if(n.length){var t=n.join("");n=[];return t}}};function r(e,r){n.push("M",e,",",r,t)}function i(t,r){n.push("M",t,",",r);e.point=a}function a(t,e){n.push("L",t,",",e)}function o(){e.point=i}function u(){e.point=r}function f(){n.push("Z")}return e}function Kx(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function tw(){var t=4.5,n,e,r,i;function a(n){if(n){if(typeof t==="function")i.pointRadius(+t.apply(this,arguments));fg(n,e(i))}return i.result()}a.area=function(t){fg(t,e(yx));return yx.result()};a.bounds=function(t){fg(t,e(Nx));return Nx.result()};a.centroid=function(t){fg(t,e(Yx));return Yx.result()};a.projection=function(t){return arguments.length?(e=(n=t)==null?sx:t.stream,a):n};a.context=function(n){if(!arguments.length)return r;i=(r=n)==null?new Qx:new Jx(n);if(typeof t!=="function")i.pointRadius(t);return a};a.pointRadius=function(n){if(!arguments.length)return t;t=typeof n==="function"?n:(i.pointRadius(+n),+n);return a};return a.projection(null).context(null)}var nw=Ay();function ew(t,n){var e=n[0],r=n[1],i=[Zy(e),-Hy(e),0],a=0,o=0;for(var u=0,f=t.length;u=0?1:-1,k=M*b,T=k>Uy,N=v*x;nw.add(jy(N*M*Zy(k),d*w+N*Hy(k)));a+=T?b+M*Dy:b;if(T^h>=e^g>=e){var S=Tg(Mg(l),Mg(y));Eg(S);var E=Tg(i,S);Eg(E);var A=(T^b>=0?-1:1)*tg(E[2]);if(r>A||r===A&&(S[0]||S[1])){o+=T^b>=0?1:-1}}}}var C=(a<-Ly||a0){if(!s)a.polygonStart(),s=true;a.lineStart();for(e=0;e1&&t&2)n.push(n.pop().concat(n.shift()));h.push(n.filter(iw))}return v}}function iw(t){return t.length>1}function aw(t,n){return((t=t.x)[0]<0?t[1]-Iy-Ly:Iy-t[1])-((n=n.x)[0]<0?n[1]-Iy-Ly:Iy-n[1])}var ow=rw(function(){return true},uw,cw,[-Uy,-Iy]);function uw(t){var n=NaN,e=NaN,r=NaN,i;return{lineStart:function(){t.lineStart();i=1},point:function(a,o){var u=a>0?Uy:-Uy,f=Yy(a-n);if(Yy(f-Uy)0?Iy:-Iy);t.point(r,e);t.lineEnd();t.lineStart();t.point(u,e);t.point(a,e);i=0}else if(r!==u&&f>=Uy){if(Yy(n-r)Ly?By((Zy(n)*(a=Hy(r))*Zy(e)-Zy(r)*(i=Hy(n))*Zy(t))/(i*a*o)):(n+r)/2}function cw(t,n,e,r){var i;if(t==null){i=e*Iy;r.point(-Uy,i);r.point(0,i);r.point(Uy,i);r.point(Uy,0);r.point(Uy,-i);r.point(0,-i);r.point(-Uy,-i);r.point(-Uy,0);r.point(-Uy,i)}else if(Yy(t[0]-n[0])>Ly){var a=t[0]0,i=Yy(e)>Ly;function a(e,r,i,a){qm(a,t,n,i,e,r)}function o(t,n){return Hy(t)*Hy(n)>e}function u(t){var n,e,a,u,s;return{lineStart:function(){u=a=false;s=1},point:function(l,h){var p=[l,h],v,d=o(l,h),_=r?d?0:c(l,h):d?c(l+(l<0?Uy:-Uy),h):0;if(!n&&(u=a=d))t.lineStart();if(d!==a){v=f(n,p);if(Om(n,v)||Om(p,v)){p[0]+=Ly;p[1]+=Ly;d=o(p[0],p[1])}}if(d!==a){s=0;if(d){t.lineStart();v=f(p,n);t.point(v[0],v[1])}else{v=f(n,p);t.point(v[0],v[1]);t.lineEnd()}n=v}else if(i&&n&&r^d){var y;if(!(_&e)&&(y=f(p,n,true))){s=0;if(r){t.lineStart();t.point(y[0][0],y[0][1]);t.point(y[1][0],y[1][1]);t.lineEnd()}else{t.point(y[1][0],y[1][1]);t.lineEnd();t.lineStart();t.point(y[0][0],y[0][1])}}}if(d&&(!n||!Om(n,p))){t.point(p[0],p[1])}n=p,a=d,e=_},lineEnd:function(){if(a)t.lineEnd();n=null},clean:function(){return s|(u&&a)<<1}}}function f(t,n,r){var i=Mg(t),a=Mg(n);var o=[1,0,0],u=Tg(i,a),f=kg(u,u),c=u[0],s=f-c*c;if(!s)return!r&&t;var l=e*f/s,h=-e*c/s,p=Tg(o,u),v=Sg(o,l),d=Sg(u,h);Ng(v,d);var _=p,y=kg(v,_),g=kg(_,_),m=y*y-g*(kg(v,v)-1);if(m<0)return;var x=Jy(m),w=Sg(_,(-y-x)/g);Ng(w,v);w=bg(w);if(!r)return w;var b=t[0],M=n[0],k=t[1],T=n[1],N;if(M0^w[1]<(Yy(w[0]-b)Uy^(b<=w[0]&&w[0]<=M)){var C=Sg(_,(-y+x)/g);Ng(C,v);return[w,bg(C)]}}function c(n,e){var i=r?t:Uy-t,a=0;if(n<-i)a|=1;else if(n>i)a|=2;if(e<-i)a|=4;else if(e>i)a|=8;return a}return rw(o,u,a,r?[0,-t]:[-Uy,t-Uy])}function lw(t){return{stream:hw(t)}}function hw(t){function n(){}var e=n.prototype=Object.create(pw.prototype);for(var r in t)e[r]=t[r];return function(t){var e=new n;e.stream=t;return e}}function pw(){}pw.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var vw=16;var dw=Hy(30*Fy);function _w(t,n){return+n?gw(t,n):yw(t)}function yw(t){return hw({point:function(n,e){n=t(n,e);this.stream.point(n[0],n[1])}})}function gw(t,n){function e(r,i,a,o,u,f,c,s,l,h,p,v,d,_){var y=c-r,g=s-i,m=y*y+g*g;if(m>4*n&&d--){var x=o+h,w=u+p,b=f+v,M=Jy(x*x+w*w+b*b),k=tg(b/=M),T=Yy(Yy(b)-1)n||Yy((y*A+g*C)/m-.5)>.3||o*h+u*p+f*v2?t[2]%360*Fy:0,E()):[c*Oy,s*Oy,l*Oy]};T.precision=function(t){return arguments.length?(b=_w(S,w=t*t),A()):Jy(w)};function E(){p=Sm(h=Am(c,s,l),n);var t=n(u,f);a=r-t[0]*e;o=i+t[1]*e;return A()}function A(){M=k=null;return T}return function(){n=t.apply(this,arguments);T.invert=n.invert&&N;return E()}}function bw(t){var n=0,e=Uy/3,r=ww(t),i=r(n,e);i.parallels=function(t){return arguments.length?r(n=t[0]*Fy,e=t[1]*Fy):[n*Oy,e*Oy]};return i}function Mw(t,n){var e=Zy(t),r=(e+Zy(n))/2,i=1+e*(2*r-e),a=Jy(i)/r;function o(t,n){var e=Jy(i-2*r*Zy(n))/r;return[e*Zy(t*=r),a-e*Hy(t)]}o.invert=function(t,n){var e=a-n;return[jy(t,e)/r,tg((i-(t*t+e*e)*r*r)/(2*r))]};return o}function kw(){return bw(Mw).scale(151).translate([480,347])}function Tw(){return kw().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Nw(t){var n=t.length;return{point:function(e,r){var i=-1;while(++i=.12&&u<.234&&a>=-.425&&a<-.214?i:u>=.166&&u<.234&&a>=-.214&&a<-.115?o:e).invert(t)};s.stream=function(r){return t&&n===r?t:t=Nw([e.stream(n=r),i.stream(r),o.stream(r)])};s.precision=function(t){if(!arguments.length)return e.precision();e.precision(t),i.precision(t),o.precision(t);return s};s.scale=function(t){if(!arguments.length)return e.scale();e.scale(t),i.scale(t*.35),o.scale(t);return s.translate(e.translate())};s.translate=function(t){if(!arguments.length)return e.translate();var n=e.scale(),f=+t[0],l=+t[1];r=e.translate(t).clipExtent([[f-.455*n,l-.238*n],[f+.455*n,l+.238*n]]).stream(c);a=i.translate([f-.307*n,l+.201*n]).clipExtent([[f-.425*n+Ly,l+.12*n+Ly],[f-.214*n-Ly,l+.234*n-Ly]]).stream(c);u=o.translate([f-.205*n,l+.212*n]).clipExtent([[f-.214*n+Ly,l+.166*n+Ly],[f-.115*n-Ly,l+.234*n-Ly]]).stream(c);return s};return s.scale(1070)}function Ew(t){return function(n,e){var r=Hy(n),i=Hy(e),a=t(r*i);return[a*i*Zy(n),a*Zy(e)]}}function Aw(t){return function(n,e){var r=Jy(n*n+e*e),i=t(r),a=Zy(i),o=Hy(i);return[jy(n*a,r*o),tg(r&&e*a/r)]}}var Cw=Ew(function(t){return Jy(2/(1+t))});Cw.invert=Aw(function(t){return 2*tg(t/2)});function zw(){return xw(Cw).scale(120).clipAngle(180-.001)}var Pw=Ew(function(t){return(t=Ky(t))&&t/Zy(t)});Pw.invert=Aw(function(t){return t});function Lw(){return xw(Pw).scale(480/Dy).clipAngle(180-.001)}function qw(t,n){return[t,Wy(Qy((Iy+n)/2))]}qw.invert=function(t,n){return[t,2*By(Vy(n))-Iy]};function Uw(){return Iw(qw)}function Iw(t){var n=xw(t),e=n.scale,r=n.translate,i=n.clipExtent,a;n.scale=function(t){return arguments.length?(e(t),a&&n.clipExtent(null),n):e()};n.translate=function(t){return arguments.length?(r(t),a&&n.clipExtent(null),n):r()};n.clipExtent=function(t){if(!arguments.length)return a?null:i();if(a=t==null){var o=Uy*e(),u=r();t=[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]}i(t);return n};return n.clipExtent(null).scale(961/Dy)}function Rw(t){return Qy((Iy+t)/2)}function Dw(t,n){var e=Hy(t),r=t===n?Zy(t):Wy(e/Hy(n))/Wy(Rw(n)/Rw(t)),i=e*$y(Rw(t),r)/r;if(!r)return qw;function a(t,n){if(i>0){if(n<-Iy+Ly)n=-Iy+Ly}else{if(n>Iy-Ly)n=Iy-Ly}var e=i/$y(Rw(n),r);return[e*Zy(r*t),i-e*Hy(r*t)]}a.invert=function(t,n){var e=i-n,a=Gy(r)*Jy(t*t+e*e);return[jy(t,e)/r,2*By($y(i/a,1/r))-Iy]};return a}function Ow(){return bw(Dw)}function Fw(t,n){return[t,n]}Fw.invert=Fw;function Yw(){return xw(Fw).scale(480/Uy)}function Bw(t,n){var e=Hy(t),r=t===n?Zy(t):(e-Hy(n))/(n-t),i=e/r+t;if(Yy(r)2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])};return e([0,0,90])}t.version=n;t.bisect=o;t.bisectRight=o;t.bisectLeft=u;t.ascending=e;t.bisector=r;t.descending=f;t.deviation=l;t.extent=h;t.histogram=T;t.thresholdFreedmanDiaconis=S;t.thresholdScott=E;t.thresholdSturges=k;t.max=A;t.mean=C;t.median=z;t.merge=P;t.min=L;t.pairs=q;t.permute=U;t.quantile=N;t.range=g;t.scan=I;t.shuffle=R;t.sum=D;t.ticks=b;t.tickStep=M;t.transpose=O;t.variance=s;t.zip=Y;t.entries=nt;t.keys=K;t.values=tt;t.map=H;t.set=Q;t.nest=X;t.randomUniform=et;t.randomNormal=rt;t.randomLogNormal=it;t.randomBates=ot;t.randomIrwinHall=at;t.randomExponential=ut;t.easeLinear=ft;t.easeQuad=lt;t.easeQuadIn=ct;t.easeQuadOut=st;t.easeQuadInOut=lt;t.easeCubic=vt;t.easeCubicIn=ht;t.easeCubicOut=pt;t.easeCubicInOut=vt;t.easePoly=gt;t.easePolyIn=_t;t.easePolyOut=yt;t.easePolyInOut=gt;t.easeSin=Mt;t.easeSinIn=wt;t.easeSinOut=bt;t.easeSinInOut=Mt;t.easeExp=Nt;t.easeExpIn=kt;t.easeExpOut=Tt;t.easeExpInOut=Nt;t.easeCircle=At;t.easeCircleIn=St;t.easeCircleOut=Et;t.easeCircleInOut=At;t.easeBounce=Yt;t.easeBounceIn=Ft;t.easeBounceOut=Yt;t.easeBounceInOut=Bt;t.easeBack=Vt;t.easeBackIn=Ht;t.easeBackOut=Xt;t.easeBackInOut=Vt;t.easeElastic=Jt;t.easeElasticIn=Gt;t.easeElasticOut=Jt;t.easeElasticInOut=Qt;t.polygonArea=Kt;t.polygonCentroid=tn;t.polygonHull=an;t.polygonContains=on;t.polygonLength=un;t.path=pn;t.quadtree=Pn;t.queue=Hn;t.arc=ie;t.area=se;t.line=ce;t.pie=pe;t.radialArea=me;t.radialLine=ge;t.symbol=Oe;t.symbols=De;t.symbolCircle=xe;t.symbolCross=we;t.symbolDiamond=ke;t.symbolSquare=Ce;t.symbolStar=Ae;t.symbolTriangle=Pe;t.symbolWye=Re;t.curveBasisClosed=Xe;t.curveBasisOpen=We;t.curveBasis=je;t.curveBundle=Ze;t.curveCardinalClosed=tr;t.curveCardinalOpen=er;t.curveCardinal=Qe;t.curveCatmullRomClosed=ur;t.curveCatmullRomOpen=cr;t.curveCatmullRom=ar;t.curveLinearClosed=lr;t.curveLinear=oe;t.curveMonotoneX=mr;t.curveMonotoneY=xr;t.curveNatural=Mr;t.curveStep=Tr;t.curveStepAfter=Sr;t.curveStepBefore=Nr;t.stack=Pr;t.stackOffsetExpand=Lr;t.stackOffsetNone=Ar;t.stackOffsetSilhouette=qr;t.stackOffsetWiggle=Ur;t.stackOrderAscending=Ir;t.stackOrderDescending=Dr;t.stackOrderInsideOut=Or;t.stackOrderNone=Cr;t.stackOrderReverse=Fr;t.color=ni;t.rgb=ai;t.hsl=ci;t.lab=Mi;t.hcl=Ci;t.cubehelix=Yi;t.interpolate=sa;t.interpolateArray=ea;t.interpolateNumber=ra;t.interpolateObject=ia;t.interpolateRound=la;t.interpolateString=ca;t.interpolateTransformCss=ba;t.interpolateTransformSvg=Ma;t.interpolateZoom=za;t.interpolateRgb=Qi;t.interpolateRgbBasis=ta;t.interpolateRgbBasisClosed=na;t.interpolateHsl=La;t.interpolateHslLong=qa;t.interpolateLab=Ua;t.interpolateHcl=Ra;t.interpolateHclLong=Da;t.interpolateCubehelix=Fa;t.interpolateCubehelixLong=Ya;t.interpolateBasis=Hi;t.interpolateBasisClosed=Xi;t.quantize=Ba;t.dispatch=Ha;t.dsvFormat=Qa;t.csvParse=to;t.csvParseRows=no;t.csvFormat=eo;t.csvFormatRows=ro;t.tsvParse=ao;t.tsvParseRows=oo;t.tsvFormat=uo;t.tsvFormatRows=fo;t.request=co;t.html=po;t.json=vo;t.text=_o;t.xml=yo;t.csv=xo;t.tsv=wo;t.now=Lo;t.timer=Io;t.timerFlush=Ro;t.timeout=Bo;t.interval=jo;t.timeInterval=Vo;t.timeMillisecond=Wo;t.timeMilliseconds=$o;t.timeSecond=tu;t.timeSeconds=nu;t.timeMinute=eu;t.timeMinutes=ru;t.timeHour=iu;t.timeHours=au;t.timeDay=ou;t.timeDays=uu;t.timeWeek=cu;t.timeWeeks=_u;t.timeSunday=cu;t.timeSundays=_u;t.timeMonday=su;t.timeMondays=yu;t.timeTuesday=lu;t.timeTuesdays=gu;t.timeWednesday=hu;t.timeWednesdays=mu;t.timeThursday=pu;t.timeThursdays=xu;t.timeFriday=vu;t.timeFridays=wu;t.timeSaturday=du;t.timeSaturdays=bu;t.timeMonth=Mu;t.timeMonths=ku;t.timeYear=Tu;t.timeYears=Nu;t.utcMillisecond=Wo;t.utcMilliseconds=$o;t.utcSecond=tu;t.utcSeconds=nu;t.utcMinute=Su;t.utcMinutes=Eu;t.utcHour=Au;t.utcHours=Cu;t.utcDay=zu;t.utcDays=Pu;t.utcWeek=qu;t.utcWeeks=Yu;t.utcSunday=qu;t.utcSundays=Yu;t.utcMonday=Uu;t.utcMondays=Bu;t.utcTuesday=Iu;t.utcTuesdays=ju;t.utcWednesday=Ru;t.utcWednesdays=Hu;t.utcThursday=Du;t.utcThursdays=Xu;t.utcFriday=Ou;t.utcFridays=Vu;t.utcSaturday=Fu;t.utcSaturdays=Wu;t.utcMonth=$u;t.utcMonths=Zu;t.utcYear=Gu;t.utcYears=Ju;t.formatLocale=hf;t.formatDefaultLocale=vf;t.formatSpecifier=ff;t.precisionFixed=df;t.precisionPrefix=_f;t.precisionRound=yf;t.isoFormat=Mc;t.isoParse=Tc;t.timeFormatLocale=wf;t.timeFormatDefaultLocale=xc;t.scaleBand=zc;t.scalePoint=Lc;t.scaleIdentity=Wc;t.scaleLinear=Vc;t.scaleLog=ns;t.scaleOrdinal=Cc;t.scaleImplicit=Ac;t.scalePow=rs;t.scaleSqrt=is;t.scaleQuantile=as;t.scaleQuantize=os;t.scaleThreshold=us;t.scaleTime=gs;t.scaleUtc=ms;t.schemeCategory10=ws;t.schemeCategory20b=bs;t.schemeCategory20c=Ms;t.schemeCategory20=ks;t.scaleSequential=Us;t.interpolateCubehelixDefault=Ts;t.interpolateRainbow=As;t.interpolateWarm=Ns;t.interpolateCool=Ss;t.interpolateViridis=zs;t.interpolateMagma=Ps;t.interpolateInferno=Ls;t.interpolatePlasma=qs;t.creator=Ys;t.customEvent=rl;t.local=js;t.matcher=$s;t.mouse=ol;t.namespace=Ds;t.namespaces=Rs;t.select=Ah;t.selectAll=Ch;t.selection=Eh;t.selector=fl;t.selectorAll=ll;t.touch=zh;t.touches=Ph;t.window=Fl;t.active=$p;t.interrupt=Vh;t.transition=Yp;t.axisTop=uv;t.axisRight=fv;t.axisBottom=cv;t.axisLeft=sv;t.cluster=gv;t.hierarchy=Cv;t.pack=nd;t.packSiblings=Zv;t.packEnclose=Dv;t.partition=ud;t.stratify=pd;t.tree=bd;t.treemap=Sd;t.treemapBinary=Ed;t.treemapDice=od;t.treemapSlice=Md;t.treemapSliceDice=Ad;t.treemapSquarify=Nd;t.treemapResquarify=Cd;t.forceCenter=zd;t.forceCollide=Id;t.forceLink=Dd;t.forceManyBody=Hd;t.forceSimulation=jd;t.forceX=Xd;t.forceY=Vd;t.drag=e_;t.dragDisable=Zd;t.dragEnable=Gd;t.voronoi=X_;t.zoom=ey;t.zoomIdentity=Z_;t.zoomTransform=G_;t.brush=Sy;t.brushX=Ty;t.brushY=Ny;t.brushSelection=ky;t.geoArea=wg;t.geoBounds=Jg;t.geoCentroid=Tm;t.geoCircle=Im;t.geoClipExtent=Vm;t.geoDistance=ax;t.geoGraticule=fx;t.geoInterpolate=cx;t.geoLength=ex;t.geoPath=tw;t.geoAlbers=Tw;t.geoAlbersUsa=Sw;t.geoAzimuthalEqualArea=zw;t.geoAzimuthalEquidistant=Lw;t.geoConicConformal=Ow;t.geoConicEqualArea=kw;t.geoConicEquidistant=jw;t.geoEquirectangular=Yw;t.geoGnomonic=Xw;t.geoProjection=xw;t.geoProjectionMutator=ww;t.geoMercator=Uw;t.geoOrthographic=Ww;t.geoStereographic=Zw;t.geoTransverseMercator=Jw;t.geoRotation=Lm;t.geoStream=fg;t.geoTransform=lw;Object.defineProperty(t,"__esModule",{value:true})});