(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var A=h.length+t.length+k.length,S=A>1)+h+t+k+S.slice(A);break;default:t=S+h+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:l,formatPrefix:function(t,e){var n=l(((t=Hs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ys(e)/3))),i=Math.pow(10,-r),a=eu[8+r/3];return function(t){return n(i*t)+a}}}};function ru(t){return Ws=nu(t),Ks=Ws.format,Xs=Ws.formatPrefix,Ws}ru({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var iu=function(t){return Math.max(0,-Ys(Math.abs(t)))},au=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ys(e)/3)))-Ys(Math.abs(t)))},ou=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ys(e)-Ys(t))+1},su=function(){return new uu};function uu(){this.reset()}uu.prototype={constructor:uu,reset:function(){this.s=this.t=0},add:function(t){fu(cu,t,this.t),fu(this,cu.s,this.s),this.s?this.t+=cu.t:this.s=cu.t},valueOf:function(){return this.s}};var cu=new uu;function fu(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var lu=Math.PI,hu=lu/2,du=lu/4,pu=2*lu,gu=180/lu,yu=lu/180,bu=Math.abs,vu=Math.atan,mu=Math.atan2,_u=Math.cos,wu=Math.ceil,xu=Math.exp,ku=(Math.floor,Math.log),Eu=Math.pow,Au=Math.sin,Su=Math.sign||function(t){return t>0?1:t<0?-1:0},Mu=Math.sqrt,Tu=Math.tan;function Du(t){return t>1?0:t<-1?lu:Math.acos(t)}function Cu(t){return t>1?hu:t<-1?-hu:Math.asin(t)}function Nu(t){return(t=Au(t/2))*t}function Iu(){}function Lu(t,e){t&&Ou.hasOwnProperty(t.type)&&Ou[t.type](t,e)}var Bu={Feature:function(t,e){Lu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=_u(e=(e*=yu)/2+du),o=Au(e),s=zu*o,u=Uu*a+s*_u(i),c=s*r*Au(i);Vu.add(mu(c,u)),ju=t,Uu=a,zu=o}var Zu=function(t){return Hu.reset(),Yu(t,Gu),2*Hu};function Ju(t){return[mu(t[1],t[0]),Cu(t[2])]}function Qu(t){var e=t[0],n=t[1],r=_u(n);return[r*_u(e),r*Au(e),Au(n)]}function tc(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ec(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ic(t){var e=Mu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ac,oc,sc,uc,cc,fc,lc,hc,dc,pc,gc=su(),yc={point:bc,lineStart:mc,lineEnd:_c,polygonStart:function(){yc.point=wc,yc.lineStart=xc,yc.lineEnd=kc,gc.reset(),Gu.polygonStart()},polygonEnd:function(){Gu.polygonEnd(),yc.point=bc,yc.lineStart=mc,yc.lineEnd=_c,Vu<0?(ac=-(sc=180),oc=-(uc=90)):gc>1e-6?uc=90:gc<-1e-6&&(oc=-90),pc[0]=ac,pc[1]=sc},sphere:function(){ac=-(sc=180),oc=-(uc=90)}};function bc(t,e){dc.push(pc=[ac=t,sc=t]),euc&&(uc=e)}function vc(t,e){var n=Qu([t*yu,e*yu]);if(hc){var r=ec(hc,n),i=ec([r[1],-r[0],0],r);ic(i),i=Ju(i);var a,o=t-cc,s=o>0?1:-1,u=i[0]*gu*s,c=bu(o)>180;c^(s*ccuc&&(uc=a):c^(s*cc<(u=(u+360)%360-180)&&uuc&&(uc=e)),c?tEc(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t):sc>=ac?(tsc&&(sc=t)):t>cc?Ec(ac,t)>Ec(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t)}else dc.push(pc=[ac=t,sc=t]);euc&&(uc=e),hc=n,cc=t}function mc(){yc.point=vc}function _c(){pc[0]=ac,pc[1]=sc,yc.point=bc,hc=null}function wc(t,e){if(hc){var n=t-cc;gc.add(bu(n)>180?n+(n>0?360:-360):n)}else fc=t,lc=e;Gu.point(t,e),vc(t,e)}function xc(){Gu.lineStart()}function kc(){wc(fc,lc),Gu.lineEnd(),bu(gc)>1e-6&&(ac=-(sc=180)),pc[0]=ac,pc[1]=sc,hc=null}function Ec(t,e){return(e-=t)<0?e+360:e}function Ac(t,e){return t[0]-e[0]}function Sc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eEc(r[0],r[1])&&(r[1]=i[1]),Ec(i[0],r[1])>Ec(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Ec(r[1],i[0]))>o&&(o=s,ac=i[0],sc=r[1])}return dc=pc=null,ac===1/0||oc===1/0?[[NaN,NaN],[NaN,NaN]]:[[ac,oc],[sc,uc]]},Vc={sphere:Iu,point:Hc,lineStart:$c,lineEnd:Xc,polygonStart:function(){Vc.lineStart=Zc,Vc.lineEnd=Jc},polygonEnd:function(){Vc.lineStart=$c,Vc.lineEnd=Xc}};function Hc(t,e){t*=yu;var n=_u(e*=yu);Gc(n*_u(t),n*Au(t),Au(e))}function Gc(t,e,n){++Mc,Dc+=(t-Dc)/Mc,Cc+=(e-Cc)/Mc,Nc+=(n-Nc)/Mc}function $c(){Vc.point=Wc}function Wc(t,e){t*=yu;var n=_u(e*=yu);jc=n*_u(t),Uc=n*Au(t),zc=Au(e),Vc.point=Kc,Gc(jc,Uc,zc)}function Kc(t,e){t*=yu;var n=_u(e*=yu),r=n*_u(t),i=n*Au(t),a=Au(e),o=mu(Mu((o=Uc*a-zc*i)*o+(o=zc*r-jc*a)*o+(o=jc*i-Uc*r)*o),jc*r+Uc*i+zc*a);Tc+=o,Ic+=o*(jc+(jc=r)),Lc+=o*(Uc+(Uc=i)),Bc+=o*(zc+(zc=a)),Gc(jc,Uc,zc)}function Xc(){Vc.point=Hc}function Zc(){Vc.point=Qc}function Jc(){tf(Fc,qc),Vc.point=Hc}function Qc(t,e){Fc=t,qc=e,t*=yu,e*=yu,Vc.point=tf;var n=_u(e);jc=n*_u(t),Uc=n*Au(t),zc=Au(e),Gc(jc,Uc,zc)}function tf(t,e){t*=yu;var n=_u(e*=yu),r=n*_u(t),i=n*Au(t),a=Au(e),o=Uc*a-zc*i,s=zc*r-jc*a,u=jc*i-Uc*r,c=Mu(o*o+s*s+u*u),f=Cu(c),l=c&&-f/c;Oc+=l*o,Rc+=l*s,Pc+=l*u,Tc+=f,Ic+=f*(jc+(jc=r)),Lc+=f*(Uc+(Uc=i)),Bc+=f*(zc+(zc=a)),Gc(jc,Uc,zc)}var ef=function(t){Mc=Tc=Dc=Cc=Nc=Ic=Lc=Bc=Oc=Rc=Pc=0,Yu(t,Vc);var e=Oc,n=Rc,r=Pc,i=e*e+n*n+r*r;return i<1e-12&&(e=Ic,n=Lc,r=Bc,Tc<1e-6&&(e=Dc,n=Cc,r=Nc),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[mu(n,e)*gu,Cu(r/Mu(i))*gu]},nf=function(t){return function(){return t}},rf=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function af(t,e){return[bu(t)>lu?t+Math.round(-t/pu)*pu:t,e]}function of(t,e,n){return(t%=pu)?e||n?rf(uf(t),cf(e,n)):uf(t):e||n?cf(e,n):af}function sf(t){return function(e,n){return[(e+=t)>lu?e-pu:e<-lu?e+pu:e,n]}}function uf(t){var e=sf(t);return e.invert=sf(-t),e}function cf(t,e){var n=_u(t),r=Au(t),i=_u(e),a=Au(e);function o(t,e){var o=_u(e),s=_u(t)*o,u=Au(t)*o,c=Au(e),f=c*n+s*r;return[mu(u*i-f*a,s*n-c*r),Cu(f*i+u*a)]}return o.invert=function(t,e){var o=_u(e),s=_u(t)*o,u=Au(t)*o,c=Au(e),f=c*i-u*a;return[mu(u*i+c*a,s*n+f*r),Cu(f*n-s*r)]},o}af.invert=af;var ff=function(t){function e(e){return(e=t(e[0]*yu,e[1]*yu))[0]*=gu,e[1]*=gu,e}return t=of(t[0]*yu,t[1]*yu,t.length>2?t[2]*yu:0),e.invert=function(e){return(e=t.invert(e[0]*yu,e[1]*yu))[0]*=gu,e[1]*=gu,e},e};function lf(t,e,n,r,i,a){if(n){var o=_u(e),s=Au(e),u=r*n;null==i?(i=e+r*pu,a=e-u/2):(i=hf(o,i),a=hf(o,a),(r>0?ia)&&(i+=r*pu));for(var c,f=i;r>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},gf=function(t,e){return bu(t[0]-e[0])<1e-6&&bu(t[1]-e[1])<1e-6};function yf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var bf=function(t,e,n,r,i){var a,o,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(gf(r,o)){for(i.lineStart(),a=0;a=0;--a)i.point((f=c[a])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function vf(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,A=E*k,S=A>lu,M=g*w;if(mf.add(mu(M*E*Au(A),y*x+M*_u(A))),o+=S?k+E*pu:k,S^d>=n^m>=n){var T=ec(Qu(h),Qu(v));ic(T);var D=ec(a,T);ic(D);var C=(S^k>=0?-1:1)*Cu(D[2]);(r>C||r===C&&(T[0]||T[1]))&&(s+=S^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&mf<-1e-6)^1&s},xf=function(t,e,n,r){return function(i){var a,o,s,u=e(i),c=pf(),f=e(c),l=!1,h={point:d,lineStart:g,lineEnd:y,polygonStart:function(){h.point=b,h.lineStart=v,h.lineEnd=m,o=[],a=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=y,o=P(o);var t=wf(a,r);o.length?(l||(i.polygonStart(),l=!0),bf(o,Ef,t,n,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){u.point(t,e)}function g(){h.point=p,u.lineStart()}function y(){h.point=d,u.lineEnd()}function b(t,e){s.push([t,e]),f.point(t,e)}function v(){f.lineStart(),s=[]}function m(){b(s[0][0],s[0][1]),f.lineEnd();var t,e,n,r,u=f.clean(),h=c.result(),d=h.length;if(s.pop(),a.push(s),s=null,d)if(1&u){if((e=(n=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(kf))}return h}};function kf(t){return t.length>1}function Ef(t,e){return((t=t.x)[0]<0?t[1]-hu-1e-6:hu-t[1])-((e=e.x)[0]<0?e[1]-hu-1e-6:hu-e[1])}var Af=xf((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?lu:-lu,u=bu(a-n);bu(u-lu)<1e-6?(t.point(n,r=(r+o)/2>0?hu:-hu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&u>=lu&&(bu(n-i)<1e-6&&(n-=1e-6*i),bu(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Au(t-n);return bu(o)>1e-6?vu((Au(e)*(a=_u(r))*Au(n)-Au(r)*(i=_u(e))*Au(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*hu,r.point(-lu,i),r.point(0,i),r.point(lu,i),r.point(lu,0),r.point(lu,-i),r.point(0,-i),r.point(-lu,-i),r.point(-lu,0),r.point(-lu,i);else if(bu(t[0]-e[0])>1e-6){var a=t[0]0,i=bu(e)>1e-6;function a(t,n){return _u(t)*_u(n)>e}function o(t,n,r){var i=[1,0,0],a=ec(Qu(t),Qu(n)),o=tc(a,a),s=a[0],u=o-s*s;if(!u)return!r&&t;var c=e*o/u,f=-e*s/u,l=ec(i,a),h=rc(i,c);nc(h,rc(a,f));var d=l,p=tc(h,d),g=tc(d,d),y=p*p-g*(tc(h,h)-1);if(!(y<0)){var b=Mu(y),v=rc(d,(-p-b)/g);if(nc(v,h),v=Ju(v),!r)return v;var m,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(m=_,_=w,w=m);var E=w-_,A=bu(E-lu)<1e-6;if(!A&&k0^v[1]<(bu(v[0]-_)<1e-6?x:k):x<=v[1]&&v[1]<=k:E>lu^(_<=v[0]&&v[0]<=w)){var S=rc(d,(-p+b)/g);return nc(S,h),[v,Ju(S)]}}}function s(e,n){var i=r?t:lu-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return xf(a,(function(t){var e,n,u,c,f;return{lineStart:function(){c=u=!1,f=1},point:function(l,h){var d,p=[l,h],g=a(l,h),y=r?g?0:s(l,h):g?s(l+(l<0?lu:-lu),h):0;if(!e&&(c=u=g)&&t.lineStart(),g!==u&&(!(d=o(e,p))||gf(e,d)||gf(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,g=a(p[0],p[1])),g!==u)f=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^g){var b;y&n||!(b=o(p,e,!0))||(f=0,r?(t.lineStart(),t.point(b[0][0],b[0][1]),t.point(b[1][0],b[1][1]),t.lineEnd()):(t.point(b[1][0],b[1][1]),t.lineEnd(),t.lineStart(),t.point(b[0][0],b[0][1])))}!g||e&&gf(e,p)||t.point(p[0],p[1]),e=p,u=g,n=y},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return f|(c&&u)<<1}}}),(function(e,r,i,a){lf(a,t,n,i,e,r)}),r?[0,-t]:[-lu,t-lu])};function Mf(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,c){var f=0,l=0;if(null==i||(f=o(i,s))!==(l=o(a,s))||u(i,a)<0^s>0)do{c.point(0===f||3===f?t:n,f>1?r:e)}while((f=(f+s+4)%4)!==l);else c.point(a[0],a[1])}function o(r,i){return bu(r[0]-t)<1e-6?i>0?0:3:bu(r[0]-n)<1e-6?i>0?2:1:bu(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var u,c,f,l,h,d,p,g,y,b,v,m=o,_=pf(),w={point:x,lineStart:function(){w.point=k,c&&c.push(f=[]);b=!0,y=!1,p=g=NaN},lineEnd:function(){u&&(k(l,h),d&&y&&_.rejoin(),u.push(_.result()));w.point=x,y&&m.lineEnd()},polygonStart:function(){m=_,u=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;nr&&(h-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(h-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(u=P(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&bf(u,s,e,a,o),o.polygonEnd());m=o,u=c=f=null}};function x(t,e){i(t,e)&&m.point(t,e)}function k(a,o){var s=i(a,o);if(c&&f.push([a,o]),b)l=a,h=o,d=s,b=!1,s&&(m.lineStart(),m.point(a,o));else if(s&&y)m.point(a,o);else{var u=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],_=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],u=t[1],c=0,f=1,l=e[0]-s,h=e[1]-u;if(o=n-s,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>f)return;o>c&&(c=o)}if(o=i-s,l||!(o<0)){if(o/=l,l<0){if(o>f)return;o>c&&(c=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>f)return;o>c&&(c=o)}if(o=a-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*l,t[1]=u+c*h),f<1&&(e[0]=s+f*l,e[1]=u+f*h),!0}}}}}(u,_,t,e,n,r)?s&&(m.lineStart(),m.point(a,o),v=!1):(y||(m.lineStart(),m.point(u[0],u[1])),m.point(_[0],_[1]),s||m.lineEnd(),v=!1)}p=a,g=o,y=s}return w}}var Tf,Df,Cf,Nf=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Mf(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},If=su(),Lf={sphere:Iu,point:Iu,lineStart:function(){Lf.point=Of,Lf.lineEnd=Bf},lineEnd:Iu,polygonStart:Iu,polygonEnd:Iu};function Bf(){Lf.point=Lf.lineEnd=Iu}function Of(t,e){Tf=t*=yu,Df=Au(e*=yu),Cf=_u(e),Lf.point=Rf}function Rf(t,e){t*=yu;var n=Au(e*=yu),r=_u(e),i=bu(t-Tf),a=_u(i),o=r*Au(i),s=Cf*n-Df*r*a,u=Df*n+Cf*r*a;If.add(mu(Mu(o*o+s*s),u)),Tf=t,Df=n,Cf=r}var Pf=function(t){return If.reset(),Yu(t,Lf),+If},Ff=[null,null],qf={type:"LineString",coordinates:Ff},jf=function(t,e){return Ff[0]=t,Ff[1]=e,Pf(qf)},Uf={Feature:function(t,e){return Yf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=jf(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Gf(t,e){return!!wf(t.map($f),Wf(e))}function $f(t){return(t=t.map(Wf)).pop(),t}function Wf(t){return[t[0]*yu,t[1]*yu]}var Kf=function(t,e){return(t&&Uf.hasOwnProperty(t.type)?Uf[t.type]:Yf)(t,e)};function Xf(t,e,n){var r=x(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zf(t,e,n){var r=x(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Jf(){var t,e,n,r,i,a,o,s,u,c,f,l,h=10,d=h,p=90,g=360,y=2.5;function b(){return{type:"MultiLineString",coordinates:v()}}function v(){return x(wu(r/p)*p,n,p).map(f).concat(x(wu(s/g)*g,o,g).map(l)).concat(x(wu(e/h)*h,t,h).filter((function(t){return bu(t%p)>1e-6})).map(u)).concat(x(wu(a/d)*d,i,d).filter((function(t){return bu(t%g)>1e-6})).map(c))}return b.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(l(o).slice(1),f(n).reverse().slice(1),l(s).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),b.precision(y)):[[r,s],[n,o]]},b.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),b.precision(y)):[[e,a],[t,i]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],b):[p,g]},b.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],b):[h,d]},b.precision=function(h){return arguments.length?(y=+h,u=Xf(a,i,90),c=Zf(e,t,y),f=Xf(s,o,90),l=Zf(r,n,y),b):y},b.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Qf(){return Jf()()}var tl,el,nl,rl,il=function(t,e){var n=t[0]*yu,r=t[1]*yu,i=e[0]*yu,a=e[1]*yu,o=_u(r),s=Au(r),u=_u(a),c=Au(a),f=o*_u(n),l=o*Au(n),h=u*_u(i),d=u*Au(i),p=2*Cu(Mu(Nu(a-r)+o*u*Nu(i-n))),g=Au(p),y=p?function(t){var e=Au(t*=p)/g,n=Au(p-t)/g,r=n*f+e*h,i=n*l+e*d,a=n*s+e*c;return[mu(i,r)*gu,mu(a,Mu(r*r+i*i))*gu]}:function(){return[n*gu,r*gu]};return y.distance=p,y},al=function(t){return t},ol=su(),sl=su(),ul={point:Iu,lineStart:Iu,lineEnd:Iu,polygonStart:function(){ul.lineStart=cl,ul.lineEnd=hl},polygonEnd:function(){ul.lineStart=ul.lineEnd=ul.point=Iu,ol.add(bu(sl)),sl.reset()},result:function(){var t=ol/2;return ol.reset(),t}};function cl(){ul.point=fl}function fl(t,e){ul.point=ll,tl=nl=t,el=rl=e}function ll(t,e){sl.add(rl*t-nl*e),nl=t,rl=e}function hl(){ll(tl,el)}var dl=ul,pl=1/0,gl=pl,yl=-pl,bl=yl;var vl,ml,_l,wl,xl={point:function(t,e){tyl&&(yl=t);ebl&&(bl=e)},lineStart:Iu,lineEnd:Iu,polygonStart:Iu,polygonEnd:Iu,result:function(){var t=[[pl,gl],[yl,bl]];return yl=bl=-(gl=pl=1/0),t}},kl=0,El=0,Al=0,Sl=0,Ml=0,Tl=0,Dl=0,Cl=0,Nl=0,Il={point:Ll,lineStart:Bl,lineEnd:Pl,polygonStart:function(){Il.lineStart=Fl,Il.lineEnd=ql},polygonEnd:function(){Il.point=Ll,Il.lineStart=Bl,Il.lineEnd=Pl},result:function(){var t=Nl?[Dl/Nl,Cl/Nl]:Tl?[Sl/Tl,Ml/Tl]:Al?[kl/Al,El/Al]:[NaN,NaN];return kl=El=Al=Sl=Ml=Tl=Dl=Cl=Nl=0,t}};function Ll(t,e){kl+=t,El+=e,++Al}function Bl(){Il.point=Ol}function Ol(t,e){Il.point=Rl,Ll(_l=t,wl=e)}function Rl(t,e){var n=t-_l,r=e-wl,i=Mu(n*n+r*r);Sl+=i*(_l+t)/2,Ml+=i*(wl+e)/2,Tl+=i,Ll(_l=t,wl=e)}function Pl(){Il.point=Ll}function Fl(){Il.point=jl}function ql(){Ul(vl,ml)}function jl(t,e){Il.point=Ul,Ll(vl=_l=t,ml=wl=e)}function Ul(t,e){var n=t-_l,r=e-wl,i=Mu(n*n+r*r);Sl+=i*(_l+t)/2,Ml+=i*(wl+e)/2,Tl+=i,Dl+=(i=wl*t-_l*e)*(_l+t),Cl+=i*(wl+e),Nl+=3*i,Ll(_l=t,wl=e)}var zl=Il;function Yl(t){this._context=t}Yl.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,pu)}},result:Iu};var Vl,Hl,Gl,$l,Wl,Kl=su(),Xl={point:Iu,lineStart:function(){Xl.point=Zl},lineEnd:function(){Vl&&Jl(Hl,Gl),Xl.point=Iu},polygonStart:function(){Vl=!0},polygonEnd:function(){Vl=null},result:function(){var t=+Kl;return Kl.reset(),t}};function Zl(t,e){Xl.point=Jl,Hl=$l=t,Gl=Wl=e}function Jl(t,e){$l-=t,Wl-=e,Kl.add(Mu($l*$l+Wl*Wl)),$l=t,Wl=e}var Ql=Xl;function th(){this._string=[]}function eh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}th.prototype={_radius:4.5,_circle:eh(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=eh(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var nh=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Yu(t,n(r))),r.result()}return a.area=function(t){return Yu(t,n(dl)),dl.result()},a.measure=function(t){return Yu(t,n(Ql)),Ql.result()},a.bounds=function(t){return Yu(t,n(xl)),xl.result()},a.centroid=function(t){return Yu(t,n(zl)),zl.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,al):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new th):new Yl(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},rh=function(t){return{stream:ih(t)}};function ih(t){return function(e){var n=new ah;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ah(){}function oh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Yu(n,t.stream(xl)),e(xl.result()),null!=r&&t.clipExtent(r),t}function sh(t,e,n){return oh(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function uh(t,e,n){return sh(t,[[0,0],e],n)}function ch(t,e,n){return oh(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function fh(t,e,n){return oh(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}ah.prototype={constructor:ah,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var lh=_u(30*yu),hh=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,u,c,f,l,h,d,p,g,y){var b=c-r,v=f-i,m=b*b+v*v;if(m>4*e&&g--){var _=o+h,w=s+d,x=u+p,k=Mu(_*_+w*w+x*x),E=Cu(x/=k),A=bu(bu(x)-1)<1e-6||bu(a-l)<1e-6?(a+l)/2:mu(w,_),S=t(A,E),M=S[0],T=S[1],D=M-r,C=T-i,N=v*D-b*C;(N*N/m>e||bu((b*D+v*C)/m-.5)>.3||o*h+s*d+u*p2?t[2]%360*yu:0,M()):[y*gu,b*gu,v*gu]},A.angle=function(t){return arguments.length?(m=t%360*yu,M()):m*gu},A.precision=function(t){return arguments.length?(o=hh(s,E=t*t),T()):Mu(E)},A.fitExtent=function(t,e){return sh(A,t,e)},A.fitSize=function(t,e){return uh(A,t,e)},A.fitWidth=function(t,e){return ch(A,t,e)},A.fitHeight=function(t,e){return fh(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&S,M()}}function vh(t){var e=0,n=lu/3,r=bh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*yu,n=t[1]*yu):[e*gu,n*gu]},i}function mh(t,e){var n=Au(t),r=(n+Au(e))/2;if(bu(r)<1e-6)return function(t){var e=_u(t);function n(t,n){return[t*e,Au(n)/e]}return n.invert=function(t,n){return[t/e,Cu(n*e)]},n}(t);var i=1+n*(2*r-n),a=Mu(i)/r;function o(t,e){var n=Mu(i-2*r*Au(e))/r;return[n*Au(t*=r),a-n*_u(t)]}return o.invert=function(t,e){var n=a-e;return[mu(t,bu(n))/r*Su(n),Cu((i-(t*t+n*n)*r*r)/(2*r))]},o}var _h=function(){return vh(mh).scale(155.424).center([0,33.6442])},wh=function(){return _h().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var xh=function(){var t,e,n,r,i,a,o=wh(),s=_h().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=_h().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function l(){return t=e=null,f}return f.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:o).invert(t)},f.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<1e-6-hu&&(e=1e-6-hu):e>hu-1e-6&&(e=hu-1e-6);var n=i/Eu(Ih(e),r);return[n*Au(r*t),i-n*_u(r*t)]}return a.invert=function(t,e){var n=i-e,a=Su(r)*Mu(t*t+n*n);return[mu(t,bu(n))/r*Su(n),2*vu(Eu(i/a,1/r))-hu]},a}var Bh=function(){return vh(Lh).scale(109.5).parallels([30,30])};function Oh(t,e){return[t,e]}Oh.invert=Oh;var Rh=function(){return yh(Oh).scale(152.63)};function Ph(t,e){var n=_u(t),r=t===e?Au(t):(n-_u(e))/(e-t),i=n/r+t;if(bu(r)<1e-6)return Oh;function a(t,e){var n=i-e,a=r*t;return[n*Au(a),i-n*_u(a)]}return a.invert=function(t,e){var n=i-e;return[mu(t,bu(n))/r*Su(n),i-Su(r)*Mu(t*t+n*n)]},a}var Fh=function(){return vh(Ph).scale(131.154).center([0,13.9389])},qh=1.340264,jh=-.081106,Uh=893e-6,zh=.003796,Yh=Mu(3)/2;function Vh(t,e){var n=Cu(Yh*Au(e)),r=n*n,i=r*r*r;return[t*_u(n)/(Yh*(qh+3*jh*r+i*(7*Uh+9*zh*r))),n*(qh+jh*r+i*(Uh+zh*r))]}Vh.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(qh+jh*i+a*(Uh+zh*i))-e)/(qh+3*jh*i+a*(7*Uh+9*zh*i)))*r)*i*i,!(bu(n)<1e-12));++o);return[Yh*t*(qh+3*jh*i+a*(7*Uh+9*zh*i))/_u(r),Cu(Au(r)/Yh)]};var Hh=function(){return yh(Vh).scale(177.158)};function Gh(t,e){var n=_u(e),r=_u(t)*n;return[n*Au(t)/r,Au(e)/r]}Gh.invert=Eh(vu);var $h=function(){return yh(Gh).scale(144.049).clipAngle(60)};function Wh(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?al:ih({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Kh=function(){var t,e,n,r,i,a,o=1,s=0,u=0,c=1,f=1,l=al,h=null,d=al;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=l(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=e=n=null,al):Mf(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(l=Wh((o=+t)*c,o*f,s,u),p()):o},translate:function(t){return arguments.length?(l=Wh(o*c,o*f,s=+t[0],u=+t[1]),p()):[s,u]},reflectX:function(t){return arguments.length?(l=Wh(o*(c=t?-1:1),o*f,s,u),p()):c<0},reflectY:function(t){return arguments.length?(l=Wh(o*c,o*(f=t?-1:1),s,u),p()):f<0},fitExtent:function(t,e){return sh(a,t,e)},fitSize:function(t,e){return uh(a,t,e)},fitWidth:function(t,e){return ch(a,t,e)},fitHeight:function(t,e){return fh(a,t,e)}}};function Xh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Xh.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(bu(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Zh=function(){return yh(Xh).scale(175.295)};function Jh(t,e){return[_u(e)*Au(t),Au(e)]}Jh.invert=Eh(Cu);var Qh=function(){return yh(Jh).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=_u(e),r=1+_u(t)*n;return[n*Au(t)/r,Au(e)/r]}td.invert=Eh((function(t){return 2*vu(t)}));var ed=function(){return yh(td).scale(250).clipAngle(142)};function nd(t,e){return[ku(Tu((hu+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*vu(xu(t))-hu]};var rd=function(){var t=Nh(nd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,f=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(f-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function ud(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function cd(t,e){var n,r,i,a,o,s=new dd(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=fd);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)c.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(hd)}function fd(t){return t.children}function ld(t){t.data=t.data.data}function hd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=cd.prototype={constructor:dd,count:function(){return this.eachAfter(ud)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return cd(this).eachBefore(ld)}};var pd=Array.prototype.slice;var gd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r0&&n*n>r*r+i*i}function md(t,e){for(var n=0;n