d3-geo-projection
Advanced tools
Comparing version 2.8.1 to 2.9.0
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-geo-projection/ v2.8.1 Copyright 2020 Mike Bostock | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("d3-geo"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-array"],r):r(n.d3=n.d3||{},n.d3,n.d3)}(this,function(n,r,e){"use strict";var t=Math.abs,o=Math.atan,i=Math.atan2,u=Math.cos,a=Math.exp,c=Math.floor,f=Math.log,l=Math.max,g=Math.min,v=Math.pow,s=Math.round,p=Math.sign||function(n){return n>0?1:n<0?-1:0},h=Math.sin,d=Math.tan,w=1e-6,y=1e-12,m=Math.PI,P=m/2,R=m/4,b=Math.SQRT1_2,j=G(2),M=G(m),E=2*m,S=180/m,k=m/180;function A(n){return n>1?P:n<-1?-P:Math.asin(n)}function x(n){return n>1?0:n<-1?m:Math.acos(n)}function G(n){return n>0?Math.sqrt(n):0}function C(n){return(a(n)-a(-n))/2}function N(n){return(a(n)+a(-n))/2}function F(n){var r=d(n/2),e=2*f(u(n/2))/(r*r);function o(n,r){var t=u(n),o=u(r),i=h(r),a=o*t,c=-((1-a?f((1+a)/2)/(1-a):-.5)+e/(1+a));return[c*o*h(n),c*i]}return o.invert=function(r,o){var a,c=G(r*r+o*o),l=-n/2,g=50;if(!c)return[0,0];do{var v=l/2,s=u(v),p=h(v),y=d(v),m=f(1/s);l-=a=(2/y*m-e*y-c)/(-m/(p*p)+1-e/(2*s*s))}while(t(a)>w&&--g>0);var P=h(l);return[i(r*P,c*u(l)),A(o*P/c)]},o}function z(n,r){var e=u(r),t=function(n){return n?n/Math.sin(n):1}(x(e*u(n/=2)));return[2*e*h(n)*t,h(r)*t]}function L(n){var r=h(n),e=u(n),o=n>=0?1:-1,a=d(o*n),c=(1+r-e)/2;function f(n,t){var f=u(t),l=u(n/=2);return[(1+f)*h(n),(o*t>-i(l,a)-.001?0:10*-o)+c+h(t)*e-(1+f)*r*l]}return f.invert=function(n,f){var l=0,g=0,v=50;do{var s=u(l),p=h(l),d=u(g),y=h(g),m=1+d,P=m*p-n,R=c+y*e-m*r*s-f,b=m*s/2,j=-p*y,M=r*m*p/2,E=e*d+r*s*y,S=j*M-E*b,k=(R*j-P*E)/S/2,A=(P*M-R*b)/S;l-=k,g-=A}while((t(k)>w||t(A)>w)&&--v>0);return o*g>-i(u(l),a)-.001?[2*l,g]:null},f}function H(n,r){var e=d(r/2),t=G(1-e*e),o=1+t*u(n/=2),i=h(n)*t/o,a=e/o,c=i*i,f=a*a;return[4/3*i*(3+c-3*f),4/3*a*(3+3*c-f)]}z.invert=function(n,r){if(!(n*n+4*r*r>m*m+w)){var e=n,o=r,i=25;do{var a,c=h(e),f=h(e/2),l=u(e/2),g=h(o),v=u(o),s=h(2*o),p=g*g,d=v*v,y=f*f,P=1-d*l*l,R=P?x(v*l)*G(a=1/P):a=0,b=2*R*v*f-n,j=R*g-r,M=a*(d*y+R*v*l*p),E=a*(.5*c*s-2*R*g*f),S=.25*a*(s*f-R*g*d*c),k=a*(p*l+R*y*v),A=E*S-k*M;if(!A)break;var C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]}},H.invert=function(n,r){if(r*=3/8,!(n*=3/8)&&t(r)>1)return null;var e=1+n*n+r*r,o=G((e-G(e*e-4*r*r))/2),a=A(o)/3,c=o?function(n){return f(n+G(n*n-1))}(t(r/o))/3:function(n){return f(n+G(n*n+1))}(t(n))/3,l=u(a),g=N(c),v=g*g-l*l;return[2*p(n)*i(C(c)*l,.25-v),2*p(r)*i(g*h(a),.25+v)]};var q=G(8),B=f(1+j);function W(n,r){var e=t(r);return e<R?[n,f(d(R+r/2))]:[n*u(e)*(2*j-1/h(e)),p(r)*(2*j*(e-R)-f(d(e/2)))]}function I(n){var e=2*m/n;function a(n,o){var a=r.geoAzimuthalEquidistantRaw(n,o);if(t(n)>P){var c=i(a[1],a[0]),f=G(a[0]*a[0]+a[1]*a[1]),l=e*s((c-P)/e)+P,g=i(h(c-=l),2-u(c));c=l+A(m/f*h(g))-g,a[0]=f*u(c),a[1]=f*h(c)}return a}return a.invert=function(n,t){var a=G(n*n+t*t);if(a>P){var c=i(t,n),f=e*s((c-P)/e)+P,l=c>f?-1:1,g=a*u(f-c),v=1/d(l*x((g-m)/G(m*(m-2*g)+a*a)));c=f+2*o((v+l*G(v*v-3))/3),n=a*u(c),t=a*h(c)}return r.geoAzimuthalEquidistantRaw.invert(n,t)},a}function D(n,e){if(arguments.length<2&&(e=n),1===e)return r.geoAzimuthalEqualAreaRaw;if(e===1/0)return Q;function t(t,o){var i=r.geoAzimuthalEqualAreaRaw(t/e,o);return i[0]*=n,i}return t.invert=function(t,o){var i=r.geoAzimuthalEqualAreaRaw.invert(t/n,o);return i[0]*=e,i},t}function Q(n,r){return[n*u(r)/u(r/=2),2*h(r)]}function T(n,r,e){var o,i,u,a=100;e=void 0===e?0:+e,r=+r;do{(i=n(e))===(u=n(e+w))&&(u=i+w),e-=o=-1*w*(i-r)/(i-u)}while(a-- >0&&t(o)>w);return a<0?NaN:e}function V(n,r,e){return void 0===r&&(r=40),void 0===e&&(e=y),function(o,i,u,a){var c,f,l;u=void 0===u?0:+u,a=void 0===a?0:+a;for(var g=0;g<r;g++){var v=n(u,a),s=v[0]-o,p=v[1]-i;if(t(s)<e&&t(p)<e)break;var h=s*s+p*p;if(h>c)u-=f/=2,a-=l/=2;else{c=h;var d=(u>0?-1:1)*e,w=(a>0?-1:1)*e,y=n(u+d,a),m=n(u,a+w),P=(y[0]-v[0])/d,R=(y[1]-v[1])/d,b=(m[0]-v[0])/w,j=(m[1]-v[1])/w,M=j*P-R*b,E=(t(M)<.5?.5:1)/M;if(u+=f=(p*b-s*j)*E,a+=l=(s*R-p*P)*E,t(f)<e&&t(l)<e)break}}return[u,a]}}function _(){var n=D(1.68,2),r=1.4,e=12;function t(t,o){if(t+o<-r){var i=(t-o+1.6)*(t+o+r)/8;t+=i,o-=.8*i*h(o+m/2)}var a=n(t,o),c=(1-u(t*o))/e;return a[1]<0&&(a[0]*=1+c),a[1]>0&&(a[1]*=1+c/1.5*a[0]*a[0]),a}return t.invert=V(t),t}function K(n,r){var e,o=n*h(r),i=30;do{r-=e=(r+h(r)-o)/(1+u(r))}while(t(e)>w&&--i>0);return r/2}function O(n,r,e){function t(t,o){return[n*t*u(o=K(e,o)),r*h(o)]}return t.invert=function(t,o){return o=A(o/r),[t/(n*u(o)),A((2*o+h(2*o))/e)]},t}W.invert=function(n,r){if((i=t(r))<B)return[n,2*o(a(r))-P];var e,i,c=R,l=25;do{var g=u(c/2),v=d(c/2);c-=e=(q*(c-R)-f(v)-i)/(q-g*g/(2*v))}while(t(e)>y&&--l>0);return[n/(u(c)*(q-1/h(c))),p(r)*c]},Q.invert=function(n,r){var e=2*A(r/2);return[n*u(e/2)/u(e),e]};var U=O(j/P,j,m);var J=2.00276,X=1.11072;function Y(n,r){var e=K(m,r);return[J*n/(1/u(r)+X/u(e)),(r+j*h(e))/J]}function Z(n){var e=0,t=r.geoProjectionMutator(n),o=t(e);return o.parallel=function(n){return arguments.length?t(e=n*k):e*S},o}function $(n,r){return[n*u(r),r]}function nn(n){if(!n)return $;var r=1/d(n);function e(e,t){var o=r+n-t,i=o?e*u(t)/o:o;return[o*h(i),r-o*u(i)]}return e.invert=function(e,t){var o=G(e*e+(t=r-t)*t),a=r+n-o;return[o/u(a)*i(e,t),a]},e}function rn(n){function r(r,e){var t=P-e,o=t?r*n*h(t)/t:t;return[t*h(o)/n,P-t*u(o)]}return r.invert=function(r,e){var t=r*n,o=P-e,u=G(t*t+o*o),a=i(t,o);return[(u?u/h(u):1)*a/n,P-u]},r}Y.invert=function(n,r){var e,o,i=J*r,a=r<0?-R:R,c=25;do{o=i-j*h(a),a-=e=(h(2*a)+2*a-m*h(o))/(2*u(2*a)+2+m*u(o)*j*u(a))}while(t(e)>w&&--c>0);return o=i-j*h(a),[n*(1/u(o)+X/u(a))/J,o]},$.invert=function(n,r){return[n/u(r),r]};var en=O(1,4/m,m);function tn(n,r,e,o,a,c){var f,l=u(c);if(t(n)>1||t(c)>1)f=x(e*a+r*o*l);else{var g=h(n/2),v=h(c/2);f=2*A(G(g*g+r*o*v*v))}return t(f)>w?[f,i(o*h(c),r*a-e*o*l)]:[0,0]}function on(n,r,e){return x((n*n+r*r-e*e)/(2*n*r))}function un(n){return n-2*m*c((n+m)/(2*m))}function an(n,r,e){for(var t,o=[[n[0],n[1],h(n[1]),u(n[1])],[r[0],r[1],h(r[1]),u(r[1])],[e[0],e[1],h(e[1]),u(e[1])]],i=o[2],a=0;a<3;++a,i=t)t=o[a],i.v=tn(t[1]-i[1],i[3],i[2],t[3],t[2],t[0]-i[0]),i.point=[0,0];var c=on(o[0].v[0],o[2].v[0],o[1].v[0]),f=on(o[0].v[0],o[1].v[0],o[2].v[0]),l=m-c;o[2].point[1]=0,o[0].point[0]=-(o[1].point[0]=o[0].v[0]/2);var g=[o[2].point[0]=o[0].point[0]+o[2].v[0]*u(c),2*(o[0].point[1]=o[1].point[1]=o[2].v[0]*h(c))];return function(n,r){var e,t=h(r),i=u(r),a=new Array(3);for(e=0;e<3;++e){var c=o[e];if(a[e]=tn(r-c[1],c[3],c[2],i,t,n-c[0]),!a[e][0])return c.point;a[e][1]=un(a[e][1]-c.v[1])}var v=g.slice();for(e=0;e<3;++e){var s=2==e?0:e+1,p=on(o[e].v[0],a[e][0],a[s][0]);a[e][1]<0&&(p=-p),e?1==e?(p=f-p,v[0]-=a[e][0]*u(p),v[1]-=a[e][0]*h(p)):(p=l-p,v[0]+=a[e][0]*u(p),v[1]+=a[e][0]*h(p)):(v[0]+=a[e][0]*u(p),v[1]-=a[e][0]*h(p))}return v[0]/=3,v[1]/=3,v}}function cn(n){return n[0]*=k,n[1]*=k,n}function fn(n,e,t){var o=r.geoCentroid({type:"MultiPoint",coordinates:[n,e,t]}),i=[-o[0],-o[1]],u=r.geoRotation(i),a=an(cn(u(n)),cn(u(e)),cn(u(t)));a.invert=V(a);var c=r.geoProjection(a).rotate(i),f=c.center;return delete c.rotate,c.center=function(n){return arguments.length?f(u(n)):u.invert(f())},c.clipAngle(90)}function ln(n,r){var e=G(1-h(r));return[2/M*n*e,M*(1-e)]}function gn(n){var r=d(n);function e(n,e){return[n,(n?n/h(n):1)*(h(e)*u(n)-r*u(e))]}return e.invert=r?function(n,e){n&&(e*=h(n)/n);var t=u(n);return[n,2*i(G(t*t+r*r-e*e)-t,r-e)]}:function(n,r){return[n,A(n?r*d(n)/n:r)]},e}ln.invert=function(n,r){var e=(e=r/M-1)*e;return[e>0?n*G(m/e)/2:0,A(1-e)]};var vn=G(3);function sn(n,r){return[vn*n*(2*u(2*r/3)-1)/M,vn*M*h(r/3)]}function pn(n){var r=u(n);function e(n,e){return[n*r,h(e)/r]}return e.invert=function(n,e){return[n/r,A(e*r)]},e}function hn(n){var r=u(n);function e(n,e){return[n*r,(1+r)*d(e/2)]}return e.invert=function(n,e){return[n/r,2*o(e/(1+r))]},e}function dn(n,r){var e=G(8/(3*m));return[e*n*(1-t(r)/m),e*r]}function wn(n,r){var e=G(4-3*h(t(r)));return[2/G(6*m)*n*e,p(r)*G(2*m/3)*(2-e)]}function yn(n,r){var e=G(m*(4+m));return[2/e*n*(1+G(1-4*r*r/(m*m))),4/e*r]}function mn(n,r){var e=(2+P)*h(r);r/=2;for(var o=0,i=1/0;o<10&&t(i)>w;o++){var a=u(r);r-=i=(r+h(r)*(a+2)-e)/(2*a*(1+a))}return[2/G(m*(4+m))*n*(1+u(r)),2*G(m/(4+m))*h(r)]}function Pn(n,r){return[n*(1+u(r))/G(2+m),2*r/G(2+m)]}function Rn(n,r){for(var e=(1+P)*h(r),o=0,i=1/0;o<10&&t(i)>w;o++)r-=i=(r+h(r)-e)/(1+u(r));return e=G(2+m),[n*(1+u(r))/e,2*r/e]}sn.invert=function(n,r){var e=3*A(r/(vn*M));return[M*n/(vn*(2*u(2*e/3)-1)),e]},dn.invert=function(n,r){var e=G(8/(3*m)),o=r/e;return[n/(e*(1-t(o)/m)),o]},wn.invert=function(n,r){var e=2-t(r)/G(2*m/3);return[n*G(6*m)/(2*e),p(r)*A((4-e*e)/3)]},yn.invert=function(n,r){var e=G(m*(4+m))/2;return[n*e/(1+G(1-r*r*(4+m)/(4*m))),r*e/2]},mn.invert=function(n,r){var e=r*G((4+m)/m)/2,t=A(e),o=u(t);return[n/(2/G(m*(4+m))*(1+o)),A((t+e*(o+2))/(2+P))]},Pn.invert=function(n,r){var e=G(2+m),t=r*e/2;return[e*n/(1+u(t)),t]},Rn.invert=function(n,r){var e=1+P,t=G(e/2);return[2*n*t/(1+u(r*=t)),A((r+h(r))/e)]};var bn=3+2*j;function jn(n,r){var e=h(n/=2),t=u(n),i=G(u(r)),a=u(r/=2),c=h(r)/(a+j*t*i),l=G(2/(1+c*c)),g=G((j*a+(t+e)*i)/(j*a+(t-e)*i));return[bn*(l*(g-1/g)-2*f(g)),bn*(l*c*(g+1/g)-2*o(c))]}jn.invert=function(n,r){if(!(e=H.invert(n/1.2,1.065*r)))return null;var e,i=e[0],a=e[1],c=20;n/=bn,r/=bn;do{var v=i/2,s=a/2,p=h(v),d=u(v),y=h(s),m=u(s),R=u(a),M=G(R),E=y/(m+j*d*M),S=E*E,k=G(2/(1+S)),A=(j*m+(d+p)*M)/(j*m+(d-p)*M),x=G(A),C=x-1/x,N=x+1/x,F=k*C-2*f(x)-n,z=k*E*N-2*o(E)-r,L=y&&b*M*p*S/y,q=(j*d*m+M)/(2*(m+j*d*M)*(m+j*d*M)*M),B=-.5*E*k*k*k,W=B*L,I=B*q,D=(D=2*m+j*M*(d-p))*D*x,Q=(j*d*m*M+R)/D,T=-j*p*y/(M*D),V=C*W-2*Q/x+k*(Q+Q/A),_=C*I-2*T/x+k*(T+T/A),K=E*N*W-2*L/(1+S)+k*N*L+k*E*(Q-Q/A),O=E*N*I-2*q/(1+S)+k*N*q+k*E*(T-T/A),U=_*K-O*V;if(!U)break;var J=(z*_-F*O)/U,X=(F*K-z*V)/U;i-=J,a=l(-P,g(P,a-X))}while((t(J)>w||t(X)>w)&&--c>0);return t(t(a)-P)<w?[0,a]:c&&[i,a]};var Mn=u(35*k);function En(n,r){var e=d(r/2);return[n*Mn*G(1-e*e),(1+Mn)*e]}function Sn(n,r){var e=r/2,t=u(e);return[2*n/M*u(r)*t*t,M*d(e)]}function kn(n){var r=1-n,e=o(m,0)[0]-o(-m,0)[0],t=G(2*(o(0,P)[1]-o(0,-P)[1])/e);function o(e,t){var o=u(t),i=h(t);return[o/(r+n*o)*e,r*t+n*i]}function i(n,r){var e=o(n,r);return[e[0]*t,e[1]/t]}function a(n){return i(0,n)[1]}return i.invert=function(e,o){var i=T(a,o);return[e/t*(n+r/u(i)),i]},i}function An(n){return[n[0]/2,A(d(n[1]/2*k))*S]}function xn(n){return[2*n[0],2*o(h(n[1]*k))*S]}function Gn(n,e){var o=2*m/e,a=n*n;function c(e,c){var f=r.geoAzimuthalEquidistantRaw(e,c),l=f[0],g=f[1],v=l*l+g*g;if(v>a){var p=G(v),d=i(g,l),y=o*s(d/o),R=d-y,b=n*u(R),j=(n*h(R)-R*h(b))/(P-b),M=Cn(R,j),E=(m-n)/Nn(M,b,m);l=p;var S,k=50;do{l-=S=(n+Nn(M,b,l)*E-p)/(M(l)*E)}while(t(S)>w&&--k>0);g=R*h(l),l<P&&(g-=j*(l-P));var A=h(y),x=u(y);f[0]=l*x-g*A,f[1]=l*A+g*x}return f}return c.invert=function(e,c){var f=e*e+c*c;if(f>a){var l=G(f),g=i(c,e),v=o*s(g/o),p=g-v;e=l*u(p),c=l*h(p);for(var d=e-P,w=h(e),R=c/w,b=e<P?1/0:0,j=10;;){var M=n*h(R),E=n*u(R),S=h(E),k=P-E,A=(M-R*S)/k,x=Cn(R,A);if(t(b)<y||!--j)break;R-=b=(R*w-A*d-c)/(w-2*d*(k*(E+R*M*u(E)-S)-M*(M-R*S))/(k*k))}e=(l=n+Nn(x,E,e)*(m-n)/Nn(x,E,m))*u(g=v+R),c=l*h(g)}return r.geoAzimuthalEquidistantRaw.invert(e,c)},c}function Cn(n,r){return function(e){var t=n*u(e);return e<P&&(t-=r),G(1+t*t)}}function Nn(n,r,e){for(var t=(e-r)/50,o=n(r)+n(e),i=1,u=r;i<50;++i)o+=2*n(u+=t);return.5*o*t}function Fn(n,r,e,o,i,a,c,f){function l(t,l){if(!l)return[n*t/m,0];var g=l*l,v=n+g*(r+g*(e+g*o)),s=l*(i-1+g*(a-f+g*c)),p=(v*v+s*s)/(2*s),d=t*A(v/p)/m;return[p*h(d),l*(1+g*f)+p*(1-u(d))]}return arguments.length<8&&(f=0),l.invert=function(l,g){var v,s,p=m*l/n,d=g,y=50;do{var P=d*d,R=n+P*(r+P*(e+P*o)),b=d*(i-1+P*(a-f+P*c)),j=R*R+b*b,M=2*b,E=j/M,S=E*E,k=A(R/E)/m,x=p*k,C=R*R,N=(2*r+P*(4*e+6*P*o))*d,F=i+P*(3*a+5*P*c),z=(2*(R*N+b*(F-1))*M-j*(2*(F-1)))/(M*M),L=u(x),H=h(x),q=E*L,B=E*H,W=p/m*(1/G(1-C/S))*(N*E-R*z)/S,I=B-l,D=d*(1+P*f)+E-q-g,Q=z*H+q*W,T=q*k,V=1+z-(z*L-B*W),_=B*k,K=Q*_-V*T;if(!K)break;p-=v=(D*Q-I*V)/K,d-=s=(I*_-D*T)/K}while((t(v)>w||t(s)>w)&&--y>0);return[p,d]},l}En.invert=function(n,r){var e=r/(1+Mn);return[n&&n/(Mn*G(1-e*e)),2*o(e)]},Sn.invert=function(n,r){var e=o(r/M),t=u(e),i=2*e;return[n*M/2/(u(i)*t*t),i]};var zn=Fn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ln=Fn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var Hn=Fn(5/6*m,-.62636,-.0344,0,1.3493,-.05524,0,.045);function qn(n,r){var e=n*n,t=r*r;return[n*(1-.162388*t)*(.87-952426e-9*e*e),r*(1+t/12)]}qn.invert=function(n,r){var e,o=n,i=r,u=50;do{var a=i*i;i-=e=(i*(1+a/12)-r)/(1+a/4)}while(t(e)>w&&--u>0);u=50,n/=1-.162388*a;do{var c=(c=o*o)*c;o-=e=(o*(.87-952426e-9*c)-n)/(.87-.00476213*c)}while(t(e)>w&&--u>0);return[o,i]};var Bn=Fn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Wn(n){var r=n(P,0)[0]-n(-P,0)[0];function e(e,t){var o=e>0?-.5:.5,i=n(e+o*m,t);return i[0]-=o*r,i}return n.invert&&(e.invert=function(e,t){var o=e>0?-.5:.5,i=n.invert(e+o*r,t),u=i[0]-o*m;return u<-m?u+=2*m:u>m&&(u-=2*m),i[0]=u,i}),e}function In(n,r){var e=p(n),o=p(r),a=u(r),c=u(n)*a,f=h(n)*a,l=h(o*r);n=t(i(f,l)),r=A(c),t(n-P)>w&&(n%=P);var g=function(n,r){if(r===P)return[0,0];var e,o,i=h(r),a=i*i,c=a*a,f=1+c,l=1+3*c,g=1-c,v=A(1/G(f)),s=g+a*f*v,p=(1-i)/s,d=G(p),y=p*f,R=G(y),b=d*g;if(0===n)return[0,-(b+a*R)];var j,M=u(r),E=1/M,S=2*i*M,k=(-s*M-(-3*a+v*l)*S*(1-i))/(s*s),x=-E*S,C=-E*(a*f*k+p*l*S),N=-2*E*(g*(.5*k/d)-2*a*d*S),F=4*n/m;if(n>.222*m||r<m/4&&n>.175*m){if(e=(b+a*G(y*(1+c)-b*b))/(1+c),n>m/4)return[e,e];var z=e,L=.5*e;e=.5*(L+z),o=50;do{var H=G(y-e*e),q=e*(N+x*H)+C*A(e/R)-F;if(!q)break;q<0?L=e:z=e,e=.5*(L+z)}while(t(z-L)>w&&--o>0)}else{e=w,o=25;do{var B=e*e,W=G(y-B),I=N+x*W,D=e*I+C*A(e/R)-F,Q=I+(C-x*B)/W;e-=j=W?D/Q:0}while(t(j)>w&&--o>0)}return[e,-b-a*G(y-e*e)]}(n>m/4?P-n:n,r);return n>m/4&&(l=g[0],g[0]=-g[1],g[1]=-l),g[0]*=e,g[1]*=-o,g}function Dn(n,r){var e,i,c,f,l,g;if(r<w)return[(f=h(n))-(e=r*(n-f*(i=u(n)))/4)*i,i+e*f,1-r*f*f/2,n-e];if(r>=1-w)return e=(1-r)/4,c=1/(i=N(n)),[(f=((g=a(2*(g=n)))-1)/(g+1))+e*((l=i*C(n))-n)/(i*i),c-e*f*c*(l-n),c+e*f*c*(l+n),2*o(a(n))-P+e*(l-n)/i];var v=[1,0,0,0,0,0,0,0,0],s=[G(r),0,0,0,0,0,0,0,0],p=0;for(i=G(1-r),l=1;t(s[p]/v[p])>w&&p<8;)e=v[p++],s[p]=(e-i)/2,v[p]=(e+i)/2,i=G(e*i),l*=2;c=l*v[p]*n;do{c=(A(f=s[p]*h(i=c)/v[p])+c)/2}while(--p);return[h(c),f=u(c),f/u(c-i),c]}function Qn(n,r){if(!r)return n;if(1===r)return f(d(n/2+R));for(var e=1,i=G(1-r),u=G(r),a=0;t(u)>w;a++){if(n%m){var c=o(i*d(n)/e);c<0&&(c+=m),n+=c+~~(n/m)*m}else n+=n;u=(e+i)/2,i=G(e*i),u=((e=u)-i)/2}return n/(v(2,a)*e)}function Tn(n,r){var e=(j-1)/(j+1),c=G(1-e*e),l=Qn(P,c*c),g=f(d(m/4+t(r)/2)),v=a(-1*g)/G(e),s=function(n,r){var e=n*n,t=r+1,o=1-e-r*r;return[.5*((n>=0?P:-P)-i(o,2*n)),-.25*f(o*o+4*e)+.5*f(t*t+e)]}(v*u(-1*n),v*h(-1*n)),w=function(n,r,e){var i=t(n),u=C(t(r));if(i){var a=1/h(i),c=1/(d(i)*d(i)),f=-(c+e*(u*u*a*a)-1+e),l=(-f+G(f*f-(e-1)*c*4))/2;return[Qn(o(1/G(l)),e)*p(n),Qn(o(G((l/c-1)/e)),1-e)*p(r)]}return[0,Qn(o(u),1-e)*p(r)]}(s[0],s[1],c*c);return[-w[1],(r>=0?1:-1)*(.5*l-w[0])]}function Vn(n){var r=h(n),e=u(n),o=_n(n);function a(n,i){var a=o(n,i);n=a[0],i=a[1];var c=h(i),f=u(i),l=u(n),g=x(r*c+e*f*l),v=h(g),s=t(v)>w?g/v:1;return[s*e*h(n),(t(n)>P?s:-s)*(r*f-e*c*l)]}return o.invert=_n(-n),a.invert=function(n,e){var t=G(n*n+e*e),a=-h(t),c=u(t),f=t*c,l=-e*a,g=t*r,v=G(f*f+l*l-g*g),s=i(f*g+l*v,l*g-f*v),p=(t>P?-1:1)*i(n*a,t*u(s)*c+e*h(s)*a);return o.invert(p,s)},a}function _n(n){var r=h(n),e=u(n);return function(n,t){var o=u(t),a=u(n)*o,c=h(n)*o,f=h(t);return[i(c,a*e-f*r),A(f*e+a*r)]}}In.invert=function(n,r){t(n)>1&&(n=2*p(n)-n),t(r)>1&&(r=2*p(r)-r);var e=p(n),o=p(r),a=-e*n,c=-o*r,f=c/a<1,l=function(n,r){var e=0,o=1,i=.5,a=50;for(;;){var c=i*i,f=G(i),l=A(1/G(1+c)),g=1-c+i*(1+c)*l,v=(1-f)/g,s=G(v),p=v*(1+c),h=s*(1-c),d=p-n*n,w=G(d),P=r+h+i*w;if(t(o-e)<y||0==--a||0===P)break;P>0?e=i:o=i,i=.5*(e+o)}if(!a)return null;var R=A(f),b=u(R),j=1/b,M=2*f*b,E=(-g*b-(-3*i+l*(1+3*c))*M*(1-f))/(g*g);return[m/4*(n*(-2*j*(.5*E/s*(1-c)-2*i*s*M)+-j*M*w)+-j*(i*(1+c)*E+v*(1+3*c)*M)*A(n/G(p))),R]}(f?c:a,f?a:c),g=l[0],v=l[1],s=u(v);return f&&(g=-P-g),[e*(i(h(g)*s,-h(v))+m),o*A(u(g)*s)]},Tn.invert=function(n,r){var e,t,u,c,l,g,v=(j-1)/(j+1),s=G(1-v*v),p=Qn(P,s*s),h=(t=-n,u=s*s,(e=.5*p-r)?(c=Dn(e,u),t?(g=(l=Dn(t,1-u))[1]*l[1]+u*c[0]*c[0]*l[0]*l[0],[[c[0]*l[2]/g,c[1]*c[2]*l[0]*l[1]/g],[c[1]*l[1]/g,-c[0]*c[2]*l[0]*l[2]/g],[c[2]*l[1]*l[2]/g,-u*c[0]*c[1]*l[0]/g]]):[[c[0],0],[c[1],0],[c[2],0]]):[[0,(l=Dn(t,1-u))[0]/l[1]],[1/l[1],0],[l[2]/l[1],0]]),d=function(n,r){var e=r[0]*r[0]+r[1]*r[1];return[(n[0]*r[0]+n[1]*r[1])/e,(n[1]*r[0]-n[0]*r[1])/e]}(h[0],h[1]);return[i(d[1],d[0])/-1,2*o(a(-.5*f(v*d[0]*d[0]+v*d[1]*d[1])))-P]};var Kn=A(1-1/3)*S,On=pn(0);function Un(n){var r=Kn*k,e=ln(m,r)[0]-ln(-m,r)[0],o=On(0,r)[1],i=ln(0,r)[1],u=M-i,a=E/n,f=4/E,v=o+u*u*4/E;function s(s,p){var h,d=t(p);if(d>r){var w=g(n-1,l(0,c((s+m)/a)));(h=ln(s+=m*(n-1)/n-w*a,d))[0]=h[0]*E/e-E*(n-1)/(2*n)+w*E/n,h[1]=o+4*(h[1]-i)*u/E,p<0&&(h[1]=-h[1])}else h=On(s,p);return h[0]*=f,h[1]/=v,h}return s.invert=function(r,s){r/=f;var p=t(s*=v);if(p>o){var h=g(n-1,l(0,c((r+m)/a)));r=(r+m*(n-1)/n-h*a)*e/E;var d=ln.invert(r,.25*(p-o)*E/u+i);return d[0]-=m*(n-1)/n-h*a,s<0&&(d[1]=-d[1]),d}return On.invert(r,s)},s}function Jn(n,r){return[n,1&r?90-w:Kn]}function Xn(n,r){return[n,1&r?-90+w:-Kn]}function Yn(n){return[n[0]*(1-w),n[1]]}function Zn(n){var r,e=1+n,o=A(h(1/e)),a=2*G(m/(r=m+4*o*e)),c=.5*a*(e+G(n*(2+n))),f=n*n,l=e*e;function g(g,v){var s,p,d=1-h(v);if(d&&d<2){var w,R=P-v,b=25;do{var j=h(R),M=u(R),E=o+i(j,e-M),S=1+l-2*e*M;R-=w=(R-f*o-e*j+S*E-.5*d*r)/(2*e*j*E)}while(t(w)>y&&--b>0);s=a*G(S),p=g*E/m}else s=a*(n+d),p=g*o/m;return[s*h(p),c-s*u(p)]}return g.invert=function(n,t){var u=n*n+(t-=c)*t,g=(1+l-u/(a*a))/(2*e),v=x(g),s=h(v),p=o+i(s,e-g);return[A(n/G(u))*m/p,A(1-2*(v-f*o-e*s+(1+l-2*e*g)*p)/r)]},g}var $n=.7109889596207567,nr=.0528035274542;function rr(n,r){return r>-$n?((n=U(n,r))[1]+=nr,n):$(n,r)}function er(n,r){return t(r)>$n?((n=U(n,r))[1]-=r>0?nr:-nr,n):$(n,r)}function tr(n,r,e,t){var o=G(4*m/(2*e+(1+n-r/2)*h(2*e)+(n+r)/2*h(4*e)+r/2*h(6*e))),i=G(t*h(e)*G((1+n*u(2*e)+r*u(4*e))/(1+n+r))),a=e*f(1);function c(e){return G(1+n*u(2*e)+r*u(4*e))}function f(t){var o=t*e;return(2*o+(1+n-r/2)*h(2*o)+(n+r)/2*h(4*o)+r/2*h(6*o))/e}function l(n){return c(n)*h(n)}var g=function(n,r){var t=e*T(f,a*h(r)/e,r/m);isNaN(t)&&(t=e*p(r));var l=o*c(t);return[l*i*n/m*u(t),l/i*h(t)]};return g.invert=function(n,r){var t=T(l,r*i/o);return[n*m/(u(t)*o*i*c(t)),A(e*f(t/e)/a)]},0===e&&(o=G(t/m),(g=function(n,r){return[n*o,h(r)/o]}).invert=function(n,r){return[n/o,A(r*o)]}),g}function or(n,r,e,t,o){void 0===t&&(t=1e-8),void 0===o&&(o=20);var i=n(r),u=n(.5*(r+e)),a=n(e);return function n(r,e,t,o,i,u,a,c,f,l,g){if(g.nanEncountered)return NaN;var v,s,p,h,d,w,y,m,P,R;if(s=r(e+.25*(v=t-e)),p=r(t-.25*v),isNaN(s))g.nanEncountered=!0;else{if(!isNaN(p))return R=((w=(h=v*(o+4*s+i)/12)+(d=v*(i+4*p+u)/12))-a)/15,l>f?(g.maxDepthCount++,w+R):Math.abs(R)<c?w+R:(m=n(r,e,y=e+.5*v,o,s,i,h,.5*c,f,l+1,g),isNaN(m)?(g.nanEncountered=!0,NaN):(P=n(r,y,t,i,p,u,d,.5*c,f,l+1,g),isNaN(P)?(g.nanEncountered=!0,NaN):m+P));g.nanEncountered=!0}}(n,r,e,i,u,a,(i+4*u+a)*(e-r)/6,t,o,1,{maxDepthCount:0,nanEncountered:!1})}function ir(n,r,e){function o(e){return n+(1-n)*v(1-v(e,r),1/r)}function i(n){return or(o,0,n,1e-4)}for(var u=1/i(1),a=1e3,c=(1+1e-8)*u,f=[],l=0;l<=a;l++)f.push(i(l/a)*c);function g(n){var r=0,e=a,t=a>>1;do{f[t]>n?e=t:r=t,t=r+e>>1}while(t>r);var o=f[t+1]-f[t];return o&&(o=(n-f[t+1])/o),(t+1+o)/a}var s=2*g(1)/m*u/e,d=function(n,r){var e=g(t(h(r))),i=o(e)*n;return e/=s,[i,r>=0?e:-e]};return d.invert=function(n,r){var e;return t(r*=s)<1&&(e=p(r)*A(i(t(r))*u)),[n/o(t(r)),e]},d}function ur(n,r){return t(n[0]-r[0])<w&&t(n[1]-r[1])<w}function ar(n,r){for(var e,t,o,i=-1,u=n.length,a=n[0],c=[];++i<u;){t=((e=n[i])[0]-a[0])/r,o=(e[1]-a[1])/r;for(var f=0;f<r;++f)c.push([a[0]+f*t,a[1]+f*o]);a=e}return c.push(e),c}function cr(n,t,o){var i,u;function a(r,e){for(var o=e<0?-1:1,i=t[+(e<0)],u=0,a=i.length-1;u<a&&r>i[u][2][0];++u);var c=n(r-i[u][1][0],e);return c[0]+=n(i[u][1][0],o*e>o*i[u][0][1]?i[u][0][1]:e)[0],c}o?a.invert=o(a):n.invert&&(a.invert=function(r,e){for(var o=u[+(e<0)],i=t[+(e<0)],c=0,f=o.length;c<f;++c){var l=o[c];if(l[0][0]<=r&&r<l[1][0]&&l[0][1]<=e&&e<l[1][1]){var g=n.invert(r-n(i[c][1][0],0)[0],e);return g[0]+=i[c][1][0],ur(a(g[0],g[1]),[r,e])?g:null}}});var c=r.geoProjection(a),f=c.stream;return c.stream=function(n){var e=c.rotate(),t=f(n),o=(c.rotate([0,0]),f(n));return c.rotate(e),t.sphere=function(){r.geoStream(i,o)},t},c.lobes=function(r){return arguments.length?(i=function(n){var r,t,o,i,u,a,c,f=[],l=n[0].length;for(c=0;c<l;++c)t=(r=n[0][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(ar([[t+w,o+w],[t+w,i-w],[u-w,i-w],[u-w,a+w]],30));for(c=n[1].length-1;c>=0;--c)t=(r=n[1][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(ar([[u-w,a-w],[u-w,i+w],[t+w,i+w],[t+w,o-w]],30));return{type:"Polygon",coordinates:[e.merge(f)]}}(r),t=r.map(function(n){return n.map(function(n){return[[n[0][0]*k,n[0][1]*k],[n[1][0]*k,n[1][1]*k],[n[2][0]*k,n[2][1]*k]]})}),u=t.map(function(r){return r.map(function(r){var e,t=n(r[0][0],r[0][1])[0],o=n(r[2][0],r[2][1])[0],i=n(r[1][0],r[0][1])[1],u=n(r[1][0],r[1][1])[1];return i>u&&(e=i,i=u,u=e),[[t,i],[o,u]]})}),c):t.map(function(n){return n.map(function(n){return[[n[0][0]*S,n[0][1]*S],[n[1][0]*S,n[1][1]*S],[n[2][0]*S,n[2][1]*S]]})})},null!=t&&c.lobes(t),c}rr.invert=function(n,r){return r>-$n?U.invert(n,r-nr):$.invert(n,r)},er.invert=function(n,r){return t(r)>$n?U.invert(n,r+(r>0?nr:-nr)):$.invert(n,r)};var fr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var lr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var gr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var vr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var sr=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var pr=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function hr(n,r){return[3/E*n*G(m*m/3-r*r),r]}function dr(n){function r(r,e){if(t(t(e)-P)<w)return[0,e<0?-2:2];var o=h(e),i=v((1+o)/(1-o),n/2),a=.5*(i+1/i)+u(r*=n);return[2*h(r)/a,(i-1/i)/a]}return r.invert=function(r,e){var o=t(e);if(t(o-2)<w)return r?null:[0,p(e)*P];if(o>2)return null;var u=(r/=2)*r,a=(e/=2)*e,c=2*e/(1+u+a);return c=v((1+c)/(1-c),1/n),[i(2*r,1-u-a)/n,A((c-1)/(c+1))]},r}hr.invert=function(n,r){return[E/3*n/G(m*m/3-r*r),r]};var wr=m/j;function yr(n,r){return[n*(1+G(u(r)))/2,r/(u(r/2)*u(n/6))]}function mr(n,r){var e=n*n,t=r*r;return[n*(.975534+t*(-.0143059*e-.119161+-.0547009*t)),r*(1.00384+e*(.0802894+-.02855*t+199025e-9*e)+t*(.0998909+-.0491032*t))]}function Pr(n,r){return[h(n)/u(r),d(r)*u(n)]}function Rr(n){var r=u(n),e=d(R+n/2);function o(o,i){var u=i-n,a=t(u)<w?o*r:t(a=R+i/2)<w||t(t(a)-P)<w?0:o*u/f(d(a)/e);return[a,u]}return o.invert=function(o,i){var u,a=i+n;return[t(i)<w?o/r:t(u=R+a/2)<w||t(t(u)-P)<w?0:o*f(d(u)/e)/i,a]},o}function br(n,r){return[n,1.25*f(d(R+.4*r))]}function jr(n){var r=n.length-1;function e(e,t){for(var o,i=u(t),a=2/(1+i*u(e)),c=a*i*h(e),f=a*h(t),l=r,g=n[l],v=g[0],s=g[1];--l>=0;)v=(g=n[l])[0]+c*(o=v)-f*s,s=g[1]+c*s+f*o;return[v=c*(o=v)-f*s,s=c*s+f*o]}return e.invert=function(e,a){var c=20,f=e,l=a;do{for(var g,v=r,s=n[v],p=s[0],d=s[1],y=0,m=0;--v>=0;)y=p+f*(g=y)-l*m,m=d+f*m+l*g,p=(s=n[v])[0]+f*(g=p)-l*d,d=s[1]+f*d+l*g;var P,R,b=(y=p+f*(g=y)-l*m)*y+(m=d+f*m+l*g)*m;f-=P=((p=f*(g=p)-l*d-e)*y+(d=f*d+l*g-a)*m)/b,l-=R=(d*y-p*m)/b}while(t(P)+t(R)>w*w&&--c>0);if(c){var j=G(f*f+l*l),M=2*o(.5*j),E=h(M);return[i(f*E,j*u(M)),j?A(l*E/j):0]}},e}yr.invert=function(n,r){var e=t(n),o=t(r),i=w,a=P;o<wr?a*=o/wr:i+=6*x(wr/o);for(var c=0;c<25;c++){var f=h(a),l=G(u(a)),g=h(a/2),v=u(a/2),s=h(i/6),p=u(i/6),d=.5*i*(1+l)-e,y=a/(v*p)-o,m=l?-.25*i*f/l:0,R=.5*(1+l),b=(1+.5*a*g/v)/(v*p),j=a/v*(s/6)/(p*p),M=m*j-b*R,E=(d*j-y*R)/M,S=(y*m-d*b)/M;if(a-=E,i-=S,t(E)<w&&t(S)<w)break}return[n<0?-i:i,r<0?-a:a]},mr.invert=function(n,r){var e=p(n)*m,o=r/2,i=50;do{var u=e*e,a=o*o,c=e*o,f=e*(.975534+a*(-.0143059*u-.119161+-.0547009*a))-n,l=o*(1.00384+u*(.0802894+-.02855*a+199025e-9*u)+a*(.0998909+-.0491032*a))-r,g=.975534-a*(.119161+3*u*.0143059+.0547009*a),v=-c*(.238322+.2188036*a+.0286118*u),s=c*(.1605788+7961e-7*u+-.0571*a),h=1.00384+u*(.0802894+199025e-9*u)+a*(3*(.0998909-.02855*u)-.245516*a),d=v*s-h*g,y=(l*v-f*h)/d,P=(f*s-l*g)/d;e-=y,o-=P}while((t(y)>w||t(P)>w)&&--i>0);return i&&[e,o]},Pr.invert=function(n,r){var e=n*n,t=r*r+1,o=e+t,i=n?b*G((o-G(o*o-4*e))/e):1/G(t);return[A(n*i),p(r)*x(i)]},br.invert=function(n,r){return[n,2.5*o(a(.8*r))-.625*m]};var Mr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Er=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Sr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],kr=[[.9245,0],[0,0],[.01943,0]],Ar=[[.721316,0],[0,0],[-.00881625,-.00617325]];function xr(n,e){var t=r.geoProjection(jr(n)).rotate(e).clipAngle(90),o=r.geoRotation(e),i=t.center;return delete t.rotate,t.center=function(n){return arguments.length?i(o(n)):o.invert(i())},t}var Gr=G(6),Cr=G(7);function Nr(n,r){var e=A(7*h(r)/(3*Gr));return[Gr*n*(2*u(2*e/3)-1)/Cr,9*h(e/3)/Cr]}function Fr(n,r){for(var e,o=(1+b)*h(r),i=r,a=0;a<25&&(i-=e=(h(i/2)+h(i)-o)/(.5*u(i/2)+u(i)),!(t(e)<w));a++);return[n*(1+2*u(i)/u(i/2))/(3*j),2*G(3)*h(i/2)/G(2+j)]}function zr(n,r){for(var e,o=G(6/(4+m)),i=(1+m/4)*h(r),a=r/2,c=0;c<25&&(a-=e=(a/2+h(a)-i)/(.5+u(a)),!(t(e)<w));c++);return[o*(.5+u(a))*n/1.5,o*a]}function Lr(n,r){var e=r*r,t=e*e,o=e*t;return[n*(.84719-.13063*e+o*o*(.05494*e-.04515-.02326*t+.00331*o)),r*(1.01183+t*t*(.01926*e-.02625-.00396*t))]}function Hr(n,r){return[n*(1+u(r))/2,2*(r-d(r/2))]}Nr.invert=function(n,r){var e=3*A(r*Cr/9);return[n*Cr/(Gr*(2*u(2*e/3)-1)),A(3*h(e)*Gr/7)]},Fr.invert=function(n,r){var e=r*G(2+j)/(2*G(3)),t=2*A(e);return[3*j*n/(1+2*u(t)/u(t/2)),A((e+h(t))/(1+b))]},zr.invert=function(n,r){var e=G(6/(4+m)),o=r/e;return t(t(o)-P)<w&&(o=o<0?-P:P),[1.5*n/(e*(.5+u(o))),A((o/2+h(o))/(1+m/4))]},Lr.invert=function(n,r){var e,o,i,u,a=r,c=25;do{a-=e=(a*(1.01183+(i=(o=a*a)*o)*i*(.01926*o-.02625-.00396*i))-r)/(1.01183+i*i*(.21186*o-.23625+-.05148*i))}while(t(e)>y&&--c>0);return[n/(.84719-.13063*(o=a*a)+(u=o*(i=o*o))*u*(.05494*o-.04515-.02326*i+.00331*u)),a]},Hr.invert=function(n,r){for(var e=r/2,o=0,i=1/0;o<10&&t(i)>w;++o){var a=u(r/2);r-=i=(r-d(r/2)-e)/(1-.5/(a*a))}return[2*n/(1+u(r)),r]};var qr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Br(n,r){var e=h(r),o=u(r),i=p(n);if(0===n||t(r)===P)return[0,r];if(0===r)return[n,0];if(t(n)===P)return[n*o,P*e];var a=m/(2*n)-2*n/m,c=2*r/m,f=(1-c*c)/(e-c),l=a*a,g=f*f,v=1+l/g,s=1+g/l,d=(a*e/f-a/2)/v,w=(g*e/l+f/2)/s,y=w*w-(g*e*e/l+f*e-1)/s;return[P*(d+G(d*d+o*o/v)*i),P*(w+G(y<0?0:y)*p(-r*a)*i)]}Br.invert=function(n,r){var e=(n/=P)*n,t=e+(r/=P)*r,o=m*m;return[n?(t-1+G((1-t)*(1-t)+4*e))/(2*n)*P:0,T(function(n){return t*(m*h(n)-2*n)*m+4*n*n*(r-h(n))+2*m*n-o*r},0)]};var Wr=1.0148,Ir=.23185,Dr=-.14499,Qr=.02406,Tr=Wr,Vr=5*Ir,_r=7*Dr,Kr=9*Qr;function Or(n,r){var e=r*r;return[n,r*(Wr+e*e*(Ir+e*(Dr+Qr*e)))]}function Ur(n,r){if(t(r)<w)return[n,0];var e=d(r),o=n*h(r);return[h(o)/e,r+(1-u(o))/e]}function Jr(n,r){var e=Yr(n[1],n[0]),t=Yr(r[1],r[0]),o=function(n,r){return i(n[0]*r[1]-n[1]*r[0],n[0]*r[0]+n[1]*r[1])}(e,t),a=Zr(e)/Zr(t);return Xr([1,0,n[0][0],0,1,n[0][1]],Xr([a,0,0,0,a,0],Xr([u(o),h(o),0,-h(o),u(o),0],[1,0,-r[0][0],0,1,-r[0][1]])))}function Xr(n,r){return[n[0]*r[0]+n[1]*r[3],n[0]*r[1]+n[1]*r[4],n[0]*r[2]+n[1]*r[5]+n[2],n[3]*r[0]+n[4]*r[3],n[3]*r[1]+n[4]*r[4],n[3]*r[2]+n[4]*r[5]+n[5]]}function Yr(n,r){return[n[0]-r[0],n[1]-r[1]]}function Zr(n){return G(n[0]*n[0]+n[1]*n[1])}function $r(n,e,o){function i(n,r){var t,o=e(n,r),i=o.project([n*S,r*S]);return(t=o.transform)?[t[0]*i[0]+t[1]*i[1]+t[2],-(t[3]*i[0]+t[4]*i[1]+t[5])]:(i[1]=-i[1],i)}!function n(r,e){r.edges=function(n){for(var r=n.length,e=[],t=n[r-1],o=0;o<r;++o)e.push([t,t=n[o]]);return e}(r.face);if(e.face){var t=r.shared=function(n,r){for(var e,t,o=n.length,i=null,u=0;u<o;++u){e=n[u];for(var a=r.length;--a>=0;)if(t=r[a],e[0]===t[0]&&e[1]===t[1]){if(i)return[i,e];i=e}}}(r.face,e.face),o=Jr(t.map(e.project),t.map(r.project));r.transform=e.transform?Xr(e.transform,o):o;for(var i=e.edges,u=0,a=i.length;u<a;++u)ne(t[0],i[u][1])&&ne(t[1],i[u][0])&&(i[u]=r),ne(t[0],i[u][0])&&ne(t[1],i[u][1])&&(i[u]=r);for(i=r.edges,u=0,a=i.length;u<a;++u)ne(t[0],i[u][0])&&ne(t[1],i[u][1])&&(i[u]=e),ne(t[0],i[u][1])&&ne(t[1],i[u][0])&&(i[u]=e)}else r.transform=e.transform;r.children&&r.children.forEach(function(e){n(e,r)});return r}(n,{transform:null}),re(n)&&(i.invert=function(r,t){var o=function n(r,t){var o=r.project.invert,i=r.transform,u=t;i&&(c=1/((a=i)[0]*a[4]-a[1]*a[3]),i=[c*a[4],-c*a[1],c*(a[1]*a[5]-a[2]*a[4]),-c*a[3],c*a[0],c*(a[2]*a[3]-a[0]*a[5])],u=[i[0]*u[0]+i[1]*u[1]+i[2],i[3]*u[0]+i[4]*u[1]+i[5]]);var a,c;if(o&&r===function(n){return e(n[0]*k,n[1]*k)}(f=o(u)))return f;var f,l=r.children;for(var g=0,v=l&&l.length;g<v;++g)if(f=n(l[g],t))return f}(n,[r,-t]);return o&&(o[0]*=k,o[1]*=k,o)});var u=r.geoProjection(i),a=u.stream;return u.stream=function(e){var o=u.rotate(),i=a(e),c=(u.rotate([0,0]),a(e));return u.rotate(o),i.sphere=function(){c.polygonStart(),c.lineStart(),function n(e,o,i){var u,a,c=o.edges,f=c.length,l={type:"MultiPoint",coordinates:o.face},g=o.face.filter(function(n){return 90!==t(n[1])}),v=r.geoBounds({type:"MultiPoint",coordinates:g}),s=!1,p=-1,h=v[1][0]-v[0][0];var d=180===h||360===h?[(v[0][0]+v[1][0])/2,(v[0][1]+v[1][1])/2]:r.geoCentroid(l);if(i)for(;++p<f&&c[p]!==i;);++p;for(var y=0;y<f;++y)a=c[(y+p)%f],Array.isArray(a)?(s||(e.point((u=r.geoInterpolate(a[0],d)(w))[0],u[1]),s=!0),e.point((u=r.geoInterpolate(a[1],d)(w))[0],u[1])):(s=!1,a!==i&&n(e,a,o))}(c,n),c.lineEnd(),c.polygonEnd()},i},u.angle(null==o?-30:o*S)}function ne(n,r){return n&&r&&n[0]===r[0]&&n[1]===r[1]}function re(n){return n.project.invert||n.children&&n.children.some(re)}Or.invert=function(n,r){r>1.790857183?r=1.790857183:r<-1.790857183&&(r=-1.790857183);var e,o=r;do{var i=o*o;o-=e=(o*(Wr+i*i*(Ir+i*(Dr+Qr*i)))-r)/(Tr+i*i*(Vr+i*(_r+Kr*i)))}while(t(e)>w);return[n,o]},Ur.invert=function(n,r){if(t(r)<w)return[n,0];var e,o=n*n+r*r,i=.5*r,a=10;do{var c=d(i),f=1/u(i),l=o-2*r*i+i*i;i-=e=(c*l+2*(i-r))/(2+l*f*f+2*(i-r)*c)}while(t(e)>w&&--a>0);return c=d(i),[(t(r)<t(i+1/c)?A(n*c):p(n)*(x(t(n*c))+P))/h(i),i]};var ee=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],te=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(n){return n.map(function(n){return ee[n]})});var oe=2/G(3);function ie(n,r){var e=ln(n,r);return[e[0]*oe,e[1]]}function ue(n,r){for(var e=0,t=n.length,o=0;e<t;++e)o+=n[e]*r[e];return o}function ae(n){return[i(n[1],n[0])*S,A(l(-1,g(1,n[2])))*S]}function ce(n){var r=n[0]*k,e=n[1]*k,t=u(e);return[t*u(r),t*h(r),h(e)]}function fe(){}function le(n,r){return{type:"FeatureCollection",features:n.features.map(function(n){return ge(n,r)})}}function ge(n,r){return{type:"Feature",id:n.id,properties:n.properties,geometry:ve(n.geometry,r)}}function ve(n,e){if(!n)return null;if("GeometryCollection"===n.type)return function(n,r){return{type:"GeometryCollection",geometries:n.geometries.map(function(n){return ve(n,r)})}}(n,e);var t;switch(n.type){case"Point":case"MultiPoint":t=he;break;case"LineString":case"MultiLineString":t=de;break;case"Polygon":case"MultiPolygon":case"Sphere":t=we;break;default:return null}return r.geoStream(n,e(t)),t.result()}ie.invert=function(n,r){return ln.invert(n/oe,r)};var se=[],pe=[],he={point:function(n,r){se.push([n,r])},result:function(){var n=se.length?se.length<2?{type:"Point",coordinates:se[0]}:{type:"MultiPoint",coordinates:se}:null;return se=[],n}},de={lineStart:fe,point:function(n,r){se.push([n,r])},lineEnd:function(){se.length&&(pe.push(se),se=[])},result:function(){var n=pe.length?pe.length<2?{type:"LineString",coordinates:pe[0]}:{type:"MultiLineString",coordinates:pe}:null;return pe=[],n}},we={polygonStart:fe,lineStart:fe,point:function(n,r){se.push([n,r])},lineEnd:function(){var n=se.length;if(n){do{se.push(se[0].slice())}while(++n<4);pe.push(se),se=[]}},polygonEnd:fe,result:function(){if(!pe.length)return null;var n=[],r=[];return pe.forEach(function(e){!function(n){if((r=n.length)<4)return!1;for(var r,e=0,t=n[r-1][1]*n[0][0]-n[r-1][0]*n[0][1];++e<r;)t+=n[e-1][1]*n[e][0]-n[e-1][0]*n[e][1];return t<=0}(e)?r.push(e):n.push([e])}),r.forEach(function(r){var e=r[0];n.some(function(n){if(function(n,r){for(var e=r[0],t=r[1],o=!1,i=0,u=n.length,a=u-1;i<u;a=i++){var c=n[i],f=c[0],l=c[1],g=n[a],v=g[0],s=g[1];l>t^s>t&&e<(v-f)*(t-l)/(s-l)+f&&(o=!o)}return o}(n[0],e))return n.push(r),!0})||n.push([r])}),pe=[],n.length?n.length>1?{type:"MultiPolygon",coordinates:n}:{type:"Polygon",coordinates:n[0]}:null}};function ye(n){var e=n(P,0)[0]-n(-P,0)[0];function o(r,o){var i=t(r)<P,u=n(i?r:r>0?r-m:r+m,o),a=(u[0]-u[1])*b,c=(u[0]+u[1])*b;if(i)return[a,c];var f=e*b,l=a>0^c>0?-1:1;return[l*a-p(c)*f,l*c-p(a)*f]}return n.invert&&(o.invert=function(r,o){var i=(r+o)*b,u=(o-r)*b,a=t(i)<.5*e&&t(u)<.5*e;if(!a){var c=e*b,f=i>0^u>0?-1:1,l=-f*r+(u>0?1:-1)*c,g=-f*o+(i>0?1:-1)*c;i=(-l-g)*b,u=(l-g)*b}var v=n.invert(i,u);return a||(v[0]+=i>0?m:-m),v}),r.geoProjection(o).rotate([-90,-90,45]).clipAngle(179.999)}function me(){return ye(Tn).scale(111.48)}function Pe(n){var r=h(n);function e(e,t){var i=r?d(e*r/2)/r:e/2;if(!t)return[2*i,-n];var a=2*o(i*h(t)),c=1/d(t);return[h(a)*c,t+(1-u(a))*c-n]}return e.invert=function(e,i){if(t(i+=n)<w)return[r?2*o(r*e/2)/r:e,0];var a,c=e*e+i*i,f=0,l=10;do{var g=d(f),v=1/u(f),s=c-2*i*f+f*f;f-=a=(g*s+2*(f-i))/(2+s*v*v+2*(f-i)*g)}while(t(a)>w&&--l>0);var p=e*(g=d(f)),y=d(t(i)<t(f+1/g)?.5*A(p):.5*x(p)+m/4)/h(f);return[r?2*o(r*y)/r:2*y,f]},e}var Re=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function be(n,r){var e,o=g(18,36*t(r)/m),i=c(o),u=o-i,a=(e=Re[i])[0],f=e[1],l=(e=Re[++i])[0],v=e[1],s=(e=Re[g(19,++i)])[0],p=e[1];return[n*(l+u*(s-a)/2+u*u*(s-2*l+a)/2),(r>0?P:-P)*(v+u*(p-f)/2+u*u*(p-2*v+f)/2)]}function je(n,r){var e=function(n){function r(r,e){var t=u(e),o=(n-1)/(n-t*u(r));return[o*t*h(r),o*h(e)]}return r.invert=function(r,e){var t=r*r+e*e,o=G(t),u=(n-G(1-t*(n+1)/(n-1)))/((n-1)/o+o/(n-1));return[i(r*u,o*G(1-u*u)),o?A(e*u/o):0]},r}(n);if(!r)return e;var t=u(r),o=h(r);function a(r,i){var u=e(r,i),a=u[1],c=a*o/(n-1)+t;return[u[0]*t/c,a/c]}return a.invert=function(r,i){var u=(n-1)/(n-1-i*o);return e.invert(u*r,u*i*t)},a}Re.forEach(function(n){n[1]*=1.0144}),be.invert=function(n,r){var e=r/P,o=90*e,i=g(18,t(o/5)),u=l(0,c(i));do{var a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],s=v-a,p=v-2*f+a,h=2*(t(e)-f)/s,d=p/s,w=h*(1-d*h*(1-2*d*h));if(w>=0||1===u){o=(r>=0?5:-5)*(w+i);var m,R=50;do{w=(i=g(18,t(o)/5))-(u=c(i)),a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],o-=(m=(r>=0?P:-P)*(f+w*(v-a)/2+w*w*(v-2*f+a)/2)-r)*S}while(t(m)>y&&--R>0);break}}while(--u>=0);var b=Re[u][0],j=Re[u+1][0],M=Re[g(19,u+2)][0];return[n/(j+w*(M-b)/2+w*w*(M-2*j+b)/2),o*k]};var Me=1e4,Ee=-180,Se=Ee+1e-4,ke=180,Ae=ke-1e-4,xe=-90,Ge=xe+1e-4,Ce=90,Ne=Ce-1e-4;function Fe(n){return n.length>0}function ze(n){return n===xe||n===Ce?[0,n]:[Ee,(r=n,Math.floor(r*Me)/Me)];var r}function Le(n){var r=n[0],e=n[1],t=!1;return r<=Se?(r=Ee,t=!0):r>=Ae&&(r=ke,t=!0),e<=Ge?(e=xe,t=!0):e>=Ne&&(e=Ce,t=!0),t?[r,e]:n}function He(n){return n.map(Le)}function qe(n,r,e){for(var t=0,o=n.length;t<o;++t){var i=n[t].slice();e.push({index:-1,polygon:r,ring:i});for(var u=0,a=i.length;u<a;++u){var c=i[u],f=c[0],l=c[1];if(f<=Se||f>=Ae||l<=Ge||l>=Ne){i[u]=Le(c);for(var g=u+1;g<a;++g){var v=i[g],s=v[0],p=v[1];if(s>Se&&s<Ae&&p>Ge&&p<Ne)break}if(g===u+1)continue;if(u){var h={index:-1,polygon:r,ring:i.slice(0,u+1)};h.ring[h.ring.length-1]=ze(l),e[e.length-1]=h}else e.pop();if(g>=a)break;e.push({index:-1,polygon:r,ring:i=i.slice(g-1)}),i[0]=ze(i[0][1]),u=-1,a=i.length}}}}function Be(n){var r,e,t,o,i,u,a=n.length,c={},f={};for(r=0;r<a;++r)t=(e=n[r]).ring[0],i=e.ring[e.ring.length-1],t[0]!==i[0]||t[1]!==i[1]?(e.index=r,c[t]=f[i]=e):(e.polygon.push(e.ring),n[r]=null);for(r=0;r<a;++r)if(e=n[r]){if(t=e.ring[0],i=e.ring[e.ring.length-1],o=f[t],u=c[i],delete c[t],delete f[i],t[0]===i[0]&&t[1]===i[1]){e.polygon.push(e.ring);continue}o?(delete f[t],delete c[o.ring[0]],o.ring.pop(),n[o.index]=null,e={index:-1,polygon:o.polygon,ring:o.ring.concat(e.ring)},o===u?e.polygon.push(e.ring):(e.index=a++,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e))):u?(delete c[i],delete f[u.ring[u.ring.length-1]],e.ring.pop(),e={index:a++,polygon:u.polygon,ring:e.ring.concat(u.ring)},n[u.index]=null,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e)):(e.ring.push(e.ring[0]),e.polygon.push(e.ring))}}function We(n){var r={type:"Feature",geometry:Ie(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),null!=n.properties&&(r.properties=n.properties),r}function Ie(n){if(null==n)return n;var r,e,t,o;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(Ie)};break;case"Point":r={type:"Point",coordinates:Le(n.coordinates)};break;case"MultiPoint":case"LineString":r={type:n.type,coordinates:He(n.coordinates)};break;case"MultiLineString":r={type:"MultiLineString",coordinates:n.coordinates.map(He)};break;case"Polygon":var i=[];qe(n.coordinates,i,e=[]),Be(e),r={type:"Polygon",coordinates:i};break;case"MultiPolygon":e=[],t=-1,o=n.coordinates.length;for(var u=new Array(o);++t<o;)qe(n.coordinates[t],u[t]=[],e);Be(e),r={type:"MultiPolygon",coordinates:u.filter(Fe)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function De(n,r){var e=d(r/2),t=h(R*e);return[n*(.74482-.34588*t*t),1.70711*e]}function Qe(n,e,t){var o=r.geoInterpolate(e,t),i=o(.5),u=r.geoRotation([-i[0],-i[1]])(e),a=o.distance/2,c=-A(h(u[1]*k)/h(a)),f=[-i[0],-i[1],-(u[0]>0?m-c:c)*S],l=r.geoProjection(n(a)).rotate(f),g=r.geoRotation(f),v=l.center;return delete l.rotate,l.center=function(n){return arguments.length?v(g(n)):g.invert(v())},l.clipAngle(90)}function Te(n){var e=u(n);function t(n,t){var o=r.geoGnomonicRaw(n,t);return o[0]*=e,o}return t.invert=function(n,t){return r.geoGnomonicRaw.invert(n/e,t)},t}function Ve(n,r){return Qe(Te,n,r)}function _e(n){if(!(n*=2))return r.geoAzimuthalEquidistantRaw;var e=-n/2,t=-e,o=n*n,a=d(t),c=.5/h(t);function f(r,i){var a=x(u(i)*u(r-e)),c=x(u(i)*u(r-t));return[((a*=a)-(c*=c))/(2*n),(i<0?-1:1)*G(4*o*c-(o-a+c)*(o-a+c))/(2*n)]}return f.invert=function(n,r){var o,f,l=r*r,g=u(G(l+(o=n+e)*o)),v=u(G(l+(o=n+t)*o));return[i(f=g-v,o=(g+v)*a),(r<0?-1:1)*x(G(o*o+f*f)*c)]},f}function Ke(n,r){return Qe(_e,n,r)}function Oe(n,r){if(t(r)<w)return[n,0];var e=t(r/P),o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,p(r)*m*d(o/2)];var i=u(o),a=t(m/n-n/m)/2,c=a*a,f=i/(e+i-1),l=f*(2/e-1),g=l*l,v=g+c,s=f-g,h=c+f;return[p(n)*m*(a*s+G(c*s*s-v*(f*f-g)))/v,p(r)*m*(l*h-a*G((c+1)*v-h*h))/v]}function Ue(n,r){if(t(r)<w)return[n,0];var e=t(r/P),o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,p(r)*m*d(o/2)];var i=u(o),a=t(m/n-n/m)/2,c=a*a,f=i*(G(1+c)-a*i)/(1+c*e*e);return[p(n)*m*f,p(r)*m*G(1-f*(2*a+f))]}function Je(n,r){if(t(r)<w)return[n,0];var e=r/P,o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,m*d(o/2)];var i=(m/n-n/m)/2,a=e/(1+u(o));return[m*(p(n)*G(i*i+1-a*a)-i),m*a]}function Xe(n,r){if(!r)return[n,0];var e=t(r);if(!n||e===P)return[0,r];var o=e/P,i=o*o,u=(8*o-i*(i+2)-5)/(2*i*(o-1)),a=u*u,c=o*u,f=i+a+2*c,l=o+3*u,g=n/P,v=g+1/g,s=p(t(n)-P)*G(v*v-4),h=s*s,d=(s*(f+a-1)+2*G(f*(i+a*h-1)+(1-i)*(i*(l*l+4*a)+12*c*a+4*a*a)))/(4*f+h);return[p(n)*P*d,p(r)*P*G(1+s*t(d)-d*d)]}function Ye(n,r,e,t){var o=m/3;n=l(n,w),r=l(r,w),n=g(n,P),r=g(r,m-w),e=l(e,0),e=g(e,100-w);var a=(t=l(t,w))/100,c=x((e/100+1)*u(o))/o,f=h(n)/h(c*P),v=r/m,s=G(a*h(n/2)/h(r/2));return function(n,r,e,t,o){function a(i,a){var c=e*h(t*a),f=G(1-c*c),l=G(2/(1+f*u(i*=o)));return[n*f*l*h(i),r*c*l]}return a.invert=function(u,a){var c=u/n,f=a/r,l=G(c*c+f*f),g=2*A(l/2);return[i(u*d(g),n*l)/o,l&&A(a*h(g)/(r*e*l))/t]},a}(s/G(v*f*c),1/(s*G(v*f*c)),f,c,v)}function Ze(){var n=65*k,e=60*k,t=20,o=200,i=r.geoProjectionMutator(Ye),u=i(n,e,t,o);return u.poleline=function(r){return arguments.length?i(n=+r*k,e,t,o):n*S},u.parallels=function(r){return arguments.length?i(n,e=+r*k,t,o):e*S},u.inflation=function(r){return arguments.length?i(n,e,t=+r,o):t},u.ratio=function(r){return arguments.length?i(n,e,t,o=+r):o},u.scale(163.775)}De.invert=function(n,r){var e=r/1.70711,t=h(R*e);return[n/(.74482-.34588*t*t),2*o(e)]},Oe.invert=function(n,r){if(t(r)<w)return[n,0];if(t(n)<w)return[0,P*h(2*o(r/m))];var e=(n/=m)*n,i=(r/=m)*r,a=e+i,c=a*a,f=-t(r)*(1+a),l=f-2*i+e,g=-2*f+1+2*i+c,v=i/g+(2*l*l*l/(g*g*g)-9*f*l/(g*g))/27,s=(f-l*l/(3*g))/g,d=2*G(-s/3),y=x(3*v/(s*d))/3;return[m*(a-1+G(1+2*(e-i)+c))/(2*n),p(r)*m*(-d*u(y+m/3)-l/(3*g))]},Ue.invert=function(n,r){if(!n)return[0,P*h(2*o(r/m))];var e=t(n/m),u=(1-e*e-(r/=m)*r)/(2*e),a=G(u*u+1);return[p(n)*m*(a-u),p(r)*P*h(2*i(G((1-2*u*e)*(u+a)-e),G(a+u+e)))]},Je.invert=function(n,r){if(!r)return[n,0];var e=r/m,t=(m*m*(1-e*e)-n*n)/(2*m*n);return[n?m*(p(n)*G(t*t+1)-t):0,P*h(2*o(e))]},Xe.invert=function(n,r){var e;if(!n||!r)return[n,r];r/=m;var o=p(n)*n/P,i=(o*o-1+4*r*r)/t(o),u=i*i,a=2*r,c=50;do{var f=a*a,l=(8*a-f*(f+2)-5)/(2*f*(a-1)),g=(3*a-f*a-10)/(2*f*a),v=l*l,s=a*l,h=a+l,d=h*h,y=a+3*l,R=-2*h*(4*s*v+(1-4*f+3*f*f)*(1+g)+v*(14*f-6-u+(8*f-8-2*u)*g)+s*(12*f-8+(10*f-10-u)*g)),b=G(d*(f+v*u-1)+(1-f)*(f*(y*y+4*v)+v*(12*s+4*v)));a-=e=(i*(d+v-1)+2*b-o*(4*d+u))/(i*(2*l*g+2*h*(1+g))+R/b-8*h*(i*(-1+v+d)+2*b)*(1+g)/(u+4*d))}while(e>w&&--c>0);return[p(n)*(G(i*i+4)+i)*m/4,P*a]};var $e=4*m+3*G(3),nt=2*G(2*m*G(3)/$e),rt=O(nt*G(3)/m,nt,$e/6);function et(n,r){return[n*G(1-3*r*r/(m*m)),r]}function tt(n,r){var e=u(r),t=u(n)*e,o=1-t,a=u(n=i(h(n)*e,-h(r))),c=h(n);return[c*(e=G(1-t*t))-a*o,-a*e-c*o]}function ot(n,r){var e=z(n,r);return[(e[0]+n/P)/2,(e[1]+r)/2]}et.invert=function(n,r){return[n/G(1-3*r*r/(m*m)),r]},tt.invert=function(n,r){var e=(n*n+r*r)/-2,t=G(-e*(2+e)),o=r*e+n*t,u=n*e-r*t,a=G(u*u+o*o);return[i(t*o,a*(1+e)),a?-A(t*u/a):0]},ot.invert=function(n,r){var e=n,o=r,i=25;do{var a,c=u(o),f=h(o),l=h(2*o),g=f*f,v=c*c,s=h(e),p=u(e/2),d=h(e/2),y=d*d,m=1-v*p*p,R=m?x(c*p)*G(a=1/m):a=0,b=.5*(2*R*c*d+e/P)-n,j=.5*(R*f+o)-r,M=.5*a*(v*y+R*c*p*g)+.5/P,E=a*(s*l/4-R*f*d),S=.125*a*(l*d-R*f*v*s),k=.5*a*(g*p+R*y*c)+.5,A=E*S-k*M,C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]},n.geoNaturalEarth=r.geoNaturalEarth1,n.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,n.geoAiry=function(){var n=P,e=r.geoProjectionMutator(F),t=e(n);return t.radius=function(r){return arguments.length?e(n=r*k):n*S},t.scale(179.976).clipAngle(147)},n.geoAiryRaw=F,n.geoAitoff=function(){return r.geoProjection(z).scale(152.63)},n.geoAitoffRaw=z,n.geoArmadillo=function(){var n=20*k,e=n>=0?1:-1,t=d(e*n),o=r.geoProjectionMutator(L),a=o(n),c=a.stream;return a.parallel=function(r){return arguments.length?(t=d((e=(n=r*k)>=0?1:-1)*n),o(n)):n*S},a.stream=function(r){var o=a.rotate(),f=c(r),l=(a.rotate([0,0]),c(r)),g=a.precision();return a.rotate(o),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=-180*e;e*r<180;r+=90*e)l.point(r,90*e);if(n)for(;e*(r-=3*e*g)>=-180;)l.point(r,e*-i(u(r*k/2),t)*S);l.lineEnd(),l.polygonEnd()},f},a.scale(218.695).center([0,28.0974])},n.geoArmadilloRaw=L,n.geoAugust=function(){return r.geoProjection(H).scale(66.1603)},n.geoAugustRaw=H,n.geoBaker=function(){return r.geoProjection(W).scale(112.314)},n.geoBakerRaw=W,n.geoBerghaus=function(){var n=5,e=r.geoProjectionMutator(I),t=e(n),o=t.stream,a=-u(.01*k),c=h(.01*k);return t.lobes=function(r){return arguments.length?e(n=+r):n},t.stream=function(r){var e=t.rotate(),f=o(r),l=(t.rotate([0,0]),o(r));return t.rotate(e),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=0,e=360/n,t=2*m/n,o=90-180/n,f=P;r<n;++r,o-=e,f-=t)l.point(i(c*u(f),a)*S,A(c*h(f))*S),o<-90?(l.point(-90,-180-o-.01),l.point(-90,-180-o+.01)):(l.point(90,o+.01),l.point(90,o-.01));l.lineEnd(),l.polygonEnd()},f},t.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},n.geoBerghausRaw=I,n.geoBertin1953=function(){return r.geoProjection(_()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},n.geoBertin1953Raw=_,n.geoBoggs=function(){return r.geoProjection(Y).scale(160.857)},n.geoBoggsRaw=Y,n.geoBonne=function(){return Z(nn).scale(123.082).center([0,26.1441]).parallel(45)},n.geoBonneRaw=nn,n.geoBottomley=function(){var n=.5,e=r.geoProjectionMutator(rn),t=e(n);return t.fraction=function(r){return arguments.length?e(n=+r):n},t.scale(158.837)},n.geoBottomleyRaw=rn,n.geoBromley=function(){return r.geoProjection(en).scale(152.63)},n.geoBromleyRaw=en,n.geoChamberlin=fn,n.geoChamberlinRaw=an,n.geoChamberlinAfrica=function(){return fn([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},n.geoCollignon=function(){return r.geoProjection(ln).scale(95.6464).center([0,30])},n.geoCollignonRaw=ln,n.geoCraig=function(){return Z(gn).scale(249.828).clipAngle(90)},n.geoCraigRaw=gn,n.geoCraster=function(){return r.geoProjection(sn).scale(156.19)},n.geoCrasterRaw=sn,n.geoCylindricalEqualArea=function(){return Z(pn).parallel(38.58).scale(195.044)},n.geoCylindricalEqualAreaRaw=pn,n.geoCylindricalStereographic=function(){return Z(hn).scale(124.75)},n.geoCylindricalStereographicRaw=hn,n.geoEckert1=function(){return r.geoProjection(dn).scale(165.664)},n.geoEckert1Raw=dn,n.geoEckert2=function(){return r.geoProjection(wn).scale(165.664)},n.geoEckert2Raw=wn,n.geoEckert3=function(){return r.geoProjection(yn).scale(180.739)},n.geoEckert3Raw=yn,n.geoEckert4=function(){return r.geoProjection(mn).scale(180.739)},n.geoEckert4Raw=mn,n.geoEckert5=function(){return r.geoProjection(Pn).scale(173.044)},n.geoEckert5Raw=Pn,n.geoEckert6=function(){return r.geoProjection(Rn).scale(173.044)},n.geoEckert6Raw=Rn,n.geoEisenlohr=function(){return r.geoProjection(jn).scale(62.5271)},n.geoEisenlohrRaw=jn,n.geoFahey=function(){return r.geoProjection(En).scale(137.152)},n.geoFaheyRaw=En,n.geoFoucaut=function(){return r.geoProjection(Sn).scale(135.264)},n.geoFoucautRaw=Sn,n.geoFoucautSinusoidal=function(){var n=.5,e=r.geoProjectionMutator(kn),t=e(n);return t.alpha=function(r){return arguments.length?e(n=+r):n},t.scale(168.725)},n.geoFoucautSinusoidalRaw=kn,n.geoGilbert=function(n){null==n&&(n=r.geoOrthographic);var e=n(),t=r.geoEquirectangular().scale(S).precision(0).clipAngle(null).translate([0,0]);function o(n){return e(An(n))}function i(n){o[n]=function(){return arguments.length?(e[n].apply(e,arguments),o):e[n]()}}return e.invert&&(o.invert=function(n){return xn(e.invert(n))}),o.stream=function(n){var r=e.stream(n),o=t.stream({point:function(n,e){r.point(n/2,A(d(-e/2*k))*S)},lineStart:function(){r.lineStart()},lineEnd:function(){r.lineEnd()},polygonStart:function(){r.polygonStart()},polygonEnd:function(){r.polygonEnd()}});return o.sphere=r.sphere,o},o.rotate=function(n){return arguments.length?(t.rotate(n),o):t.rotate()},o.center=function(n){return arguments.length?(e.center(An(n)),o):xn(e.center())},i("angle"),i("clipAngle"),i("clipExtent"),i("fitExtent"),i("fitHeight"),i("fitSize"),i("fitWidth"),i("scale"),i("translate"),i("precision"),o.scale(249.5)},n.geoGingery=function(){var n=6,e=30*k,t=u(e),o=h(e),a=r.geoProjectionMutator(Gn),c=a(e,n),f=c.stream,l=-u(.01*k),g=h(.01*k);return c.radius=function(r){return arguments.length?(t=u(e=r*k),o=h(e),a(e,n)):e*S},c.lobes=function(r){return arguments.length?a(e,n=+r):n},c.stream=function(r){var e=c.rotate(),a=f(r),v=(c.rotate([0,0]),f(r));return c.rotate(e),a.sphere=function(){v.polygonStart(),v.lineStart();for(var r=0,e=2*m/n,a=0;r<n;++r,a-=e)v.point(i(g*u(a),l)*S,A(g*h(a))*S),v.point(i(o*u(a-e/2),t)*S,A(o*h(a-e/2))*S);v.lineEnd(),v.polygonEnd()},a},c.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},n.geoGingeryRaw=Gn,n.geoGinzburg4=function(){return r.geoProjection(zn).scale(149.995)},n.geoGinzburg4Raw=zn,n.geoGinzburg5=function(){return r.geoProjection(Ln).scale(153.93)},n.geoGinzburg5Raw=Ln,n.geoGinzburg6=function(){return r.geoProjection(Hn).scale(130.945)},n.geoGinzburg6Raw=Hn,n.geoGinzburg8=function(){return r.geoProjection(qn).scale(131.747)},n.geoGinzburg8Raw=qn,n.geoGinzburg9=function(){return r.geoProjection(Bn).scale(131.087)},n.geoGinzburg9Raw=Bn,n.geoGringorten=function(){return r.geoProjection(Wn(In)).scale(239.75)},n.geoGringortenRaw=In,n.geoGuyou=function(){return r.geoProjection(Wn(Tn)).scale(151.496)},n.geoGuyouRaw=Tn,n.geoHammer=function(){var n=2,e=r.geoProjectionMutator(D),t=e(n);return t.coefficient=function(r){return arguments.length?e(n=+r):n},t.scale(169.529)},n.geoHammerRaw=D,n.geoHammerRetroazimuthal=function(){var n=0,e=r.geoProjectionMutator(Vn),t=e(n),o=t.rotate,i=t.stream,u=r.geoCircle();return t.parallel=function(r){if(!arguments.length)return n*S;var o=t.rotate();return e(n=r*k).rotate(o)},t.rotate=function(r){return arguments.length?(o.call(t,[r[0],r[1]-n*S]),u.center([-r[0],-r[1]]),t):((r=o.call(t))[1]+=n*S,r)},t.stream=function(n){return(n=i(n)).sphere=function(){n.polygonStart();var r,e=u.radius(89.99)().coordinates[0],t=e.length-1,o=-1;for(n.lineStart();++o<t;)n.point((r=e[o])[0],r[1]);for(n.lineEnd(),t=(e=u.radius(90.01)().coordinates[0]).length-1,n.lineStart();--o>=0;)n.point((r=e[o])[0],r[1]);n.lineEnd(),n.polygonEnd()},n},t.scale(79.4187).parallel(45).clipAngle(179.999)},n.geoHammerRetroazimuthalRaw=Vn,n.geoHealpix=function(){var n=4,t=r.geoProjectionMutator(Un),o=t(n),i=o.stream;return o.lobes=function(r){return arguments.length?t(n=+r):n},o.stream=function(t){var u=o.rotate(),a=i(t),c=(o.rotate([0,0]),i(t));return o.rotate(u),a.sphere=function(){var t,o;r.geoStream((t=180/n,o=[].concat(e.range(-180,180+t/2,t).map(Jn),e.range(180,-180-t/2,-t).map(Xn)),{type:"Polygon",coordinates:[180===t?o.map(Yn):o]}),c)},a},o.scale(239.75)},n.geoHealpixRaw=Un,n.geoHill=function(){var n=1,e=r.geoProjectionMutator(Zn),t=e(n);return t.ratio=function(r){return arguments.length?e(n=+r):n},t.scale(167.774).center([0,18.67])},n.geoHillRaw=Zn,n.geoHomolosine=function(){return r.geoProjection(er).scale(152.63)},n.geoHomolosineRaw=er,n.geoHufnagel=function(){var n=1,e=0,t=45*k,o=2,i=r.geoProjectionMutator(tr),u=i(n,e,t,o);return u.a=function(r){return arguments.length?i(n=+r,e,t,o):n},u.b=function(r){return arguments.length?i(n,e=+r,t,o):e},u.psiMax=function(r){return arguments.length?i(n,e,t=+r*k,o):t*S},u.ratio=function(r){return arguments.length?i(n,e,t,o=+r):o},u.scale(180.739)},n.geoHufnagelRaw=tr,n.geoHyperelliptical=function(){var n=0,e=2.5,t=1.183136,o=r.geoProjectionMutator(ir),i=o(n,e,t);return i.alpha=function(r){return arguments.length?o(n=+r,e,t):n},i.k=function(r){return arguments.length?o(n,e=+r,t):e},i.gamma=function(r){return arguments.length?o(n,e,t=+r):t},i.scale(152.63)},n.geoHyperellipticalRaw=ir,n.geoInterrupt=cr,n.geoInterruptedBoggs=function(){return cr(Y,fr).scale(160.857)},n.geoInterruptedHomolosine=function(){return cr(er,lr).scale(152.63)},n.geoInterruptedMollweide=function(){return cr(U,gr).scale(169.529)},n.geoInterruptedMollweideHemispheres=function(){return cr(U,vr).scale(169.529).rotate([20,0])},n.geoInterruptedSinuMollweide=function(){return cr(rr,sr,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoInterruptedSinusoidal=function(){return cr($,pr).scale(152.63).rotate([-20,0])},n.geoKavrayskiy7=function(){return r.geoProjection(hr).scale(158.837)},n.geoKavrayskiy7Raw=hr,n.geoLagrange=function(){var n=.5,e=r.geoProjectionMutator(dr),t=e(n);return t.spacing=function(r){return arguments.length?e(n=+r):n},t.scale(124.75)},n.geoLagrangeRaw=dr,n.geoLarrivee=function(){return r.geoProjection(yr).scale(97.2672)},n.geoLarriveeRaw=yr,n.geoLaskowski=function(){return r.geoProjection(mr).scale(139.98)},n.geoLaskowskiRaw=mr,n.geoLittrow=function(){return r.geoProjection(Pr).scale(144.049).clipAngle(89.999)},n.geoLittrowRaw=Pr,n.geoLoximuthal=function(){return Z(Rr).parallel(40).scale(158.837)},n.geoLoximuthalRaw=Rr,n.geoMiller=function(){return r.geoProjection(br).scale(108.318)},n.geoMillerRaw=br,n.geoModifiedStereographic=xr,n.geoModifiedStereographicRaw=jr,n.geoModifiedStereographicAlaska=function(){return xr(Mr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},n.geoModifiedStereographicGs48=function(){return xr(Er,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},n.geoModifiedStereographicGs50=function(){return xr(Sr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},n.geoModifiedStereographicMiller=function(){return xr(kr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},n.geoModifiedStereographicLee=function(){return xr(Ar,[165,10]).scale(250).clipAngle(130).center([-165,-10])},n.geoMollweide=function(){return r.geoProjection(U).scale(169.529)},n.geoMollweideRaw=U,n.geoMtFlatPolarParabolic=function(){return r.geoProjection(Nr).scale(164.859)},n.geoMtFlatPolarParabolicRaw=Nr,n.geoMtFlatPolarQuartic=function(){return r.geoProjection(Fr).scale(188.209)},n.geoMtFlatPolarQuarticRaw=Fr,n.geoMtFlatPolarSinusoidal=function(){return r.geoProjection(zr).scale(166.518)},n.geoMtFlatPolarSinusoidalRaw=zr,n.geoNaturalEarth2=function(){return r.geoProjection(Lr).scale(175.295)},n.geoNaturalEarth2Raw=Lr,n.geoNellHammer=function(){return r.geoProjection(Hr).scale(152.63)},n.geoNellHammerRaw=Hr,n.geoInterruptedQuarticAuthalic=function(){return cr(D(1/0),qr).rotate([20,0]).scale(152.63)},n.geoNicolosi=function(){return r.geoProjection(Br).scale(127.267)},n.geoNicolosiRaw=Br,n.geoPatterson=function(){return r.geoProjection(Or).scale(139.319)},n.geoPattersonRaw=Or,n.geoPolyconic=function(){return r.geoProjection(Ur).scale(103.74)},n.geoPolyconicRaw=Ur,n.geoPolyhedral=$r,n.geoPolyhedralButterfly=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(101.858).center([0,45])},n.geoPolyhedralCollignon=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoProjection(ie).translate([0,0]).scale(1).rotate(e[1]>0?[-e[0],0]:[180-e[0],180])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},n.geoPolyhedralWaterman=function(n){n=n||function(n){var e=6===n.length?r.geoCentroid({type:"MultiPoint",coordinates:n}):n[0];return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=te.map(function(n){for(var r,e=n.map(ce),t=e.length,o=e[t-1],i=[],u=0;u<t;++u)r=e[u],i.push(ae([.9486832980505138*o[0]+.31622776601683794*r[0],.9486832980505138*o[1]+.31622776601683794*r[1],.9486832980505138*o[2]+.31622776601683794*r[2]]),ae([.9486832980505138*r[0]+.31622776601683794*o[0],.9486832980505138*r[1]+.31622776601683794*o[1],.9486832980505138*r[2]+.31622776601683794*o[2]])),o=r;return i}),t=[],o=[-1,0,0,1,0,1,4,5];e.forEach(function(n,r){for(var i,u,a=te[r],c=a.length,f=t[r]=[],l=0;l<c;++l)e.push([a[l],n[(2*l+2)%(2*c)],n[(2*l+1)%(2*c)]]),o.push(r),f.push((i=ce(n[(2*l+2)%(2*c)]),u=ce(n[(2*l+1)%(2*c)]),[i[1]*u[2]-i[2]*u[1],i[2]*u[0]-i[0]*u[2],i[0]*u[1]-i[1]*u[0]]))});var i=e.map(function(r){return{project:n(r),face:r}});return o.forEach(function(n,r){var e=i[n];e&&(e.children||(e.children=[])).push(i[r])}),$r(i[0],function(n,r){var e=u(r),o=[e*u(n),e*h(n),h(r)],a=n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5,c=t[a];return i[ue(c[0],o)<0?8+3*a:ue(c[1],o)<0?8+3*a+1:ue(c[2],o)<0?8+3*a+2:a]}).angle(-30).scale(110.625).center([0,45])},n.geoProject=function(n,r){var e,t=r.stream;if(!t)throw new Error("invalid projection");switch(n&&n.type){case"Feature":e=ge;break;case"FeatureCollection":e=le;break;default:e=ve}return e(n,t)},n.geoGringortenQuincuncial=function(){return ye(In).scale(176.423)},n.geoPeirceQuincuncial=me,n.geoPierceQuincuncial=me,n.geoQuantize=function(n,r){if(!(0<=(r=+r)&&r<=20))throw new Error("invalid digits");function e(n){var e=n.length,t=2,o=new Array(e);for(o[0]=+n[0].toFixed(r),o[1]=+n[1].toFixed(r);t<e;)o[t]=n[t],++t;return o}function t(n){return n.map(e)}function o(n){for(var r=e(n[0]),t=[r],o=1;o<n.length;o++){var i=e(n[o]);(i.length>2||i[0]!=r[0]||i[1]!=r[1])&&(t.push(i),r=i)}return 1===t.length&&n.length>1&&t.push(e(n[n.length-1])),t}function i(n){return n.map(o)}function u(n){if(null==n)return n;var r;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(u)};break;case"Point":r={type:"Point",coordinates:e(n.coordinates)};break;case"MultiPoint":r={type:n.type,coordinates:t(n.coordinates)};break;case"LineString":r={type:n.type,coordinates:o(n.coordinates)};break;case"MultiLineString":case"Polygon":r={type:n.type,coordinates:i(n.coordinates)};break;case"MultiPolygon":r={type:"MultiPolygon",coordinates:n.coordinates.map(i)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function a(n){var r={type:"Feature",properties:n.properties,geometry:u(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),r}if(null!=n)switch(n.type){case"Feature":return a(n);case"FeatureCollection":var c={type:"FeatureCollection",features:n.features.map(a)};return null!=n.bbox&&(c.bbox=n.bbox),c;default:return u(n)}return n},n.geoQuincuncial=ye,n.geoRectangularPolyconic=function(){return Z(Pe).scale(131.215)},n.geoRectangularPolyconicRaw=Pe,n.geoRobinson=function(){return r.geoProjection(be).scale(152.63)},n.geoRobinsonRaw=be,n.geoSatellite=function(){var n=2,e=0,t=r.geoProjectionMutator(je),o=t(n,e);return o.distance=function(r){return arguments.length?t(n=+r,e):n},o.tilt=function(r){return arguments.length?t(n,e=r*k):e*S},o.scale(432.147).clipAngle(x(1/n)*S-1e-6)},n.geoSatelliteRaw=je,n.geoSinuMollweide=function(){return r.geoProjection(rr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoSinuMollweideRaw=rr,n.geoSinusoidal=function(){return r.geoProjection($).scale(152.63)},n.geoSinusoidalRaw=$,n.geoStitch=function(n){if(null==n)return n;switch(n.type){case"Feature":return We(n);case"FeatureCollection":var r={type:"FeatureCollection",features:n.features.map(We)};return null!=n.bbox&&(r.bbox=n.bbox),r;default:return Ie(n)}},n.geoTimes=function(){return r.geoProjection(De).scale(146.153)},n.geoTimesRaw=De,n.geoTwoPointAzimuthal=Ve,n.geoTwoPointAzimuthalRaw=Te,n.geoTwoPointAzimuthalUsa=function(){return Ve([-158,21.5],[-77,39]).clipAngle(60).scale(400)},n.geoTwoPointEquidistant=Ke,n.geoTwoPointEquidistantRaw=_e,n.geoTwoPointEquidistantUsa=function(){return Ke([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},n.geoVanDerGrinten=function(){return r.geoProjection(Oe).scale(79.4183)},n.geoVanDerGrintenRaw=Oe,n.geoVanDerGrinten2=function(){return r.geoProjection(Ue).scale(79.4183)},n.geoVanDerGrinten2Raw=Ue,n.geoVanDerGrinten3=function(){return r.geoProjection(Je).scale(79.4183)},n.geoVanDerGrinten3Raw=Je,n.geoVanDerGrinten4=function(){return r.geoProjection(Xe).scale(127.16)},n.geoVanDerGrinten4Raw=Xe,n.geoWagner=Ze,n.geoWagner7=function(){return Ze().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},n.geoWagnerRaw=Ye,n.geoWagner4=function(){return r.geoProjection(rt).scale(176.84)},n.geoWagner4Raw=rt,n.geoWagner6=function(){return r.geoProjection(et).scale(152.63)},n.geoWagner6Raw=et,n.geoWiechel=function(){return r.geoProjection(tt).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},n.geoWiechelRaw=tt,n.geoWinkel3=function(){return r.geoProjection(ot).scale(158.837)},n.geoWinkel3Raw=ot,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
// https://d3js.org/d3-geo-projection/ v2.9.0 Copyright 2020 Mike Bostock | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("d3-geo"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-array"],r):r(n.d3=n.d3||{},n.d3,n.d3)}(this,function(n,r,e){"use strict";var t=Math.abs,o=Math.atan,i=Math.atan2,u=Math.cos,a=Math.exp,c=Math.floor,f=Math.log,l=Math.max,g=Math.min,v=Math.pow,s=Math.round,p=Math.sign||function(n){return n>0?1:n<0?-1:0},h=Math.sin,d=Math.tan,w=1e-6,y=1e-12,m=Math.PI,P=m/2,R=m/4,b=Math.SQRT1_2,j=G(2),M=G(m),E=2*m,S=180/m,k=m/180;function A(n){return n>1?P:n<-1?-P:Math.asin(n)}function x(n){return n>1?0:n<-1?m:Math.acos(n)}function G(n){return n>0?Math.sqrt(n):0}function C(n){return(a(n)-a(-n))/2}function N(n){return(a(n)+a(-n))/2}function F(n){var r=d(n/2),e=2*f(u(n/2))/(r*r);function o(n,r){var t=u(n),o=u(r),i=h(r),a=o*t,c=-((1-a?f((1+a)/2)/(1-a):-.5)+e/(1+a));return[c*o*h(n),c*i]}return o.invert=function(r,o){var a,c=G(r*r+o*o),l=-n/2,g=50;if(!c)return[0,0];do{var v=l/2,s=u(v),p=h(v),d=p/s,y=-f(t(s));l-=a=(2/d*y-e*d-c)/(-y/(p*p)+1-e/(2*s*s))*(s<0?.7:1)}while(t(a)>w&&--g>0);var m=h(l);return[i(r*m,c*u(l)),A(o*m/c)]},o}function z(n,r){var e=u(r),t=function(n){return n?n/Math.sin(n):1}(x(e*u(n/=2)));return[2*e*h(n)*t,h(r)*t]}function L(n){var r=h(n),e=u(n),o=n>=0?1:-1,a=d(o*n),c=(1+r-e)/2;function f(n,t){var f=u(t),l=u(n/=2);return[(1+f)*h(n),(o*t>-i(l,a)-.001?0:10*-o)+c+h(t)*e-(1+f)*r*l]}return f.invert=function(n,f){var l=0,g=0,v=50;do{var s=u(l),p=h(l),d=u(g),y=h(g),m=1+d,P=m*p-n,R=c+y*e-m*r*s-f,b=m*s/2,j=-p*y,M=r*m*p/2,E=e*d+r*s*y,S=j*M-E*b,k=(R*j-P*E)/S/2,A=(P*M-R*b)/S;t(A)>2&&(A/=2),l-=k,g-=A}while((t(k)>w||t(A)>w)&&--v>0);return o*g>-i(u(l),a)-.001?[2*l,g]:null},f}function H(n,r){var e=d(r/2),t=G(1-e*e),o=1+t*u(n/=2),i=h(n)*t/o,a=e/o,c=i*i,f=a*a;return[4/3*i*(3+c-3*f),4/3*a*(3+3*c-f)]}z.invert=function(n,r){if(!(n*n+4*r*r>m*m+w)){var e=n,o=r,i=25;do{var a,c=h(e),f=h(e/2),l=u(e/2),g=h(o),v=u(o),s=h(2*o),p=g*g,d=v*v,y=f*f,P=1-d*l*l,R=P?x(v*l)*G(a=1/P):a=0,b=2*R*v*f-n,j=R*g-r,M=a*(d*y+R*v*l*p),E=a*(.5*c*s-2*R*g*f),S=.25*a*(s*f-R*g*d*c),k=a*(p*l+R*y*v),A=E*S-k*M;if(!A)break;var C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]}},H.invert=function(n,r){if(r*=3/8,!(n*=3/8)&&t(r)>1)return null;var e=1+n*n+r*r,o=G((e-G(e*e-4*r*r))/2),a=A(o)/3,c=o?function(n){return f(n+G(n*n-1))}(t(r/o))/3:function(n){return f(n+G(n*n+1))}(t(n))/3,l=u(a),g=N(c),v=g*g-l*l;return[2*p(n)*i(C(c)*l,.25-v),2*p(r)*i(g*h(a),.25+v)]};var q=G(8),B=f(1+j);function W(n,r){var e=t(r);return e<R?[n,f(d(R+r/2))]:[n*u(e)*(2*j-1/h(e)),p(r)*(2*j*(e-R)-f(d(e/2)))]}function I(n){var e=2*m/n;function a(n,o){var a=r.geoAzimuthalEquidistantRaw(n,o);if(t(n)>P){var c=i(a[1],a[0]),f=G(a[0]*a[0]+a[1]*a[1]),l=e*s((c-P)/e)+P,g=i(h(c-=l),2-u(c));c=l+A(m/f*h(g))-g,a[0]=f*u(c),a[1]=f*h(c)}return a}return a.invert=function(n,t){var a=G(n*n+t*t);if(a>P){var c=i(t,n),f=e*s((c-P)/e)+P,l=c>f?-1:1,g=a*u(f-c),v=1/d(l*x((g-m)/G(m*(m-2*g)+a*a)));c=f+2*o((v+l*G(v*v-3))/3),n=a*u(c),t=a*h(c)}return r.geoAzimuthalEquidistantRaw.invert(n,t)},a}function D(n,e){if(arguments.length<2&&(e=n),1===e)return r.geoAzimuthalEqualAreaRaw;if(e===1/0)return Q;function t(t,o){var i=r.geoAzimuthalEqualAreaRaw(t/e,o);return i[0]*=n,i}return t.invert=function(t,o){var i=r.geoAzimuthalEqualAreaRaw.invert(t/n,o);return i[0]*=e,i},t}function Q(n,r){return[n*u(r)/u(r/=2),2*h(r)]}function T(n,r,e){var o,i,u,a=100;e=void 0===e?0:+e,r=+r;do{(i=n(e))===(u=n(e+w))&&(u=i+w),e-=o=-1*w*(i-r)/(i-u)}while(a-- >0&&t(o)>w);return a<0?NaN:e}function V(n,r,e){return void 0===r&&(r=40),void 0===e&&(e=y),function(o,i,u,a){var c,f,l;u=void 0===u?0:+u,a=void 0===a?0:+a;for(var g=0;g<r;g++){var v=n(u,a),s=v[0]-o,p=v[1]-i;if(t(s)<e&&t(p)<e)break;var h=s*s+p*p;if(h>c)u-=f/=2,a-=l/=2;else{c=h;var d=(u>0?-1:1)*e,w=(a>0?-1:1)*e,y=n(u+d,a),m=n(u,a+w),P=(y[0]-v[0])/d,R=(y[1]-v[1])/d,b=(m[0]-v[0])/w,j=(m[1]-v[1])/w,M=j*P-R*b,E=(t(M)<.5?.5:1)/M;if(u+=f=(p*b-s*j)*E,a+=l=(s*R-p*P)*E,t(f)<e&&t(l)<e)break}}return[u,a]}}function _(){var n=D(1.68,2),r=1.4,e=12;function t(t,o){if(t+o<-r){var i=(t-o+1.6)*(t+o+r)/8;t+=i,o-=.8*i*h(o+m/2)}var a=n(t,o),c=(1-u(t*o))/e;return a[1]<0&&(a[0]*=1+c),a[1]>0&&(a[1]*=1+c/1.5*a[0]*a[0]),a}return t.invert=V(t),t}function K(n,r){var e,o=n*h(r),i=30;do{r-=e=(r+h(r)-o)/(1+u(r))}while(t(e)>w&&--i>0);return r/2}function O(n,r,e){function t(t,o){return[n*t*u(o=K(e,o)),r*h(o)]}return t.invert=function(t,o){return o=A(o/r),[t/(n*u(o)),A((2*o+h(2*o))/e)]},t}W.invert=function(n,r){if((i=t(r))<B)return[n,2*o(a(r))-P];var e,i,c=R,l=25;do{var g=u(c/2),v=d(c/2);c-=e=(q*(c-R)-f(v)-i)/(q-g*g/(2*v))}while(t(e)>y&&--l>0);return[n/(u(c)*(q-1/h(c))),p(r)*c]},Q.invert=function(n,r){var e=2*A(r/2);return[n*u(e/2)/u(e),e]};var U=O(j/P,j,m);var J=2.00276,X=1.11072;function Y(n,r){var e=K(m,r);return[J*n/(1/u(r)+X/u(e)),(r+j*h(e))/J]}function Z(n){var e=0,t=r.geoProjectionMutator(n),o=t(e);return o.parallel=function(n){return arguments.length?t(e=n*k):e*S},o}function $(n,r){return[n*u(r),r]}function nn(n){if(!n)return $;var r=1/d(n);function e(e,t){var o=r+n-t,i=o?e*u(t)/o:o;return[o*h(i),r-o*u(i)]}return e.invert=function(e,t){var o=G(e*e+(t=r-t)*t),a=r+n-o;return[o/u(a)*i(e,t),a]},e}function rn(n){function r(r,e){var t=P-e,o=t?r*n*h(t)/t:t;return[t*h(o)/n,P-t*u(o)]}return r.invert=function(r,e){var t=r*n,o=P-e,u=G(t*t+o*o),a=i(t,o);return[(u?u/h(u):1)*a/n,P-u]},r}Y.invert=function(n,r){var e,o,i=J*r,a=r<0?-R:R,c=25;do{o=i-j*h(a),a-=e=(h(2*a)+2*a-m*h(o))/(2*u(2*a)+2+m*u(o)*j*u(a))}while(t(e)>w&&--c>0);return o=i-j*h(a),[n*(1/u(o)+X/u(a))/J,o]},$.invert=function(n,r){return[n/u(r),r]};var en=O(1,4/m,m);function tn(n,r,e,o,a,c){var f,l=u(c);if(t(n)>1||t(c)>1)f=x(e*a+r*o*l);else{var g=h(n/2),v=h(c/2);f=2*A(G(g*g+r*o*v*v))}return t(f)>w?[f,i(o*h(c),r*a-e*o*l)]:[0,0]}function on(n,r,e){return x((n*n+r*r-e*e)/(2*n*r))}function un(n){return n-2*m*c((n+m)/(2*m))}function an(n,r,e){for(var t,o=[[n[0],n[1],h(n[1]),u(n[1])],[r[0],r[1],h(r[1]),u(r[1])],[e[0],e[1],h(e[1]),u(e[1])]],i=o[2],a=0;a<3;++a,i=t)t=o[a],i.v=tn(t[1]-i[1],i[3],i[2],t[3],t[2],t[0]-i[0]),i.point=[0,0];var c=on(o[0].v[0],o[2].v[0],o[1].v[0]),f=on(o[0].v[0],o[1].v[0],o[2].v[0]),l=m-c;o[2].point[1]=0,o[0].point[0]=-(o[1].point[0]=o[0].v[0]/2);var g=[o[2].point[0]=o[0].point[0]+o[2].v[0]*u(c),2*(o[0].point[1]=o[1].point[1]=o[2].v[0]*h(c))];return function(n,r){var e,t=h(r),i=u(r),a=new Array(3);for(e=0;e<3;++e){var c=o[e];if(a[e]=tn(r-c[1],c[3],c[2],i,t,n-c[0]),!a[e][0])return c.point;a[e][1]=un(a[e][1]-c.v[1])}var v=g.slice();for(e=0;e<3;++e){var s=2==e?0:e+1,p=on(o[e].v[0],a[e][0],a[s][0]);a[e][1]<0&&(p=-p),e?1==e?(p=f-p,v[0]-=a[e][0]*u(p),v[1]-=a[e][0]*h(p)):(p=l-p,v[0]+=a[e][0]*u(p),v[1]+=a[e][0]*h(p)):(v[0]+=a[e][0]*u(p),v[1]-=a[e][0]*h(p))}return v[0]/=3,v[1]/=3,v}}function cn(n){return n[0]*=k,n[1]*=k,n}function fn(n,e,t){var o=r.geoCentroid({type:"MultiPoint",coordinates:[n,e,t]}),i=[-o[0],-o[1]],u=r.geoRotation(i),a=an(cn(u(n)),cn(u(e)),cn(u(t)));a.invert=V(a);var c=r.geoProjection(a).rotate(i),f=c.center;return delete c.rotate,c.center=function(n){return arguments.length?f(u(n)):u.invert(f())},c.clipAngle(90)}function ln(n,r){var e=G(1-h(r));return[2/M*n*e,M*(1-e)]}function gn(n){var r=d(n);function e(n,e){return[n,(n?n/h(n):1)*(h(e)*u(n)-r*u(e))]}return e.invert=r?function(n,e){n&&(e*=h(n)/n);var t=u(n);return[n,2*i(G(t*t+r*r-e*e)-t,r-e)]}:function(n,r){return[n,A(n?r*d(n)/n:r)]},e}ln.invert=function(n,r){var e=(e=r/M-1)*e;return[e>0?n*G(m/e)/2:0,A(1-e)]};var vn=G(3);function sn(n,r){return[vn*n*(2*u(2*r/3)-1)/M,vn*M*h(r/3)]}function pn(n){var r=u(n);function e(n,e){return[n*r,h(e)/r]}return e.invert=function(n,e){return[n/r,A(e*r)]},e}function hn(n){var r=u(n);function e(n,e){return[n*r,(1+r)*d(e/2)]}return e.invert=function(n,e){return[n/r,2*o(e/(1+r))]},e}function dn(n,r){var e=G(8/(3*m));return[e*n*(1-t(r)/m),e*r]}function wn(n,r){var e=G(4-3*h(t(r)));return[2/G(6*m)*n*e,p(r)*G(2*m/3)*(2-e)]}function yn(n,r){var e=G(m*(4+m));return[2/e*n*(1+G(1-4*r*r/(m*m))),4/e*r]}function mn(n,r){var e=(2+P)*h(r);r/=2;for(var o=0,i=1/0;o<10&&t(i)>w;o++){var a=u(r);r-=i=(r+h(r)*(a+2)-e)/(2*a*(1+a))}return[2/G(m*(4+m))*n*(1+u(r)),2*G(m/(4+m))*h(r)]}function Pn(n,r){return[n*(1+u(r))/G(2+m),2*r/G(2+m)]}function Rn(n,r){for(var e=(1+P)*h(r),o=0,i=1/0;o<10&&t(i)>w;o++)r-=i=(r+h(r)-e)/(1+u(r));return e=G(2+m),[n*(1+u(r))/e,2*r/e]}sn.invert=function(n,r){var e=3*A(r/(vn*M));return[M*n/(vn*(2*u(2*e/3)-1)),e]},dn.invert=function(n,r){var e=G(8/(3*m)),o=r/e;return[n/(e*(1-t(o)/m)),o]},wn.invert=function(n,r){var e=2-t(r)/G(2*m/3);return[n*G(6*m)/(2*e),p(r)*A((4-e*e)/3)]},yn.invert=function(n,r){var e=G(m*(4+m))/2;return[n*e/(1+G(1-r*r*(4+m)/(4*m))),r*e/2]},mn.invert=function(n,r){var e=r*G((4+m)/m)/2,t=A(e),o=u(t);return[n/(2/G(m*(4+m))*(1+o)),A((t+e*(o+2))/(2+P))]},Pn.invert=function(n,r){var e=G(2+m),t=r*e/2;return[e*n/(1+u(t)),t]},Rn.invert=function(n,r){var e=1+P,t=G(e/2);return[2*n*t/(1+u(r*=t)),A((r+h(r))/e)]};var bn=3+2*j;function jn(n,r){var e=h(n/=2),t=u(n),i=G(u(r)),a=u(r/=2),c=h(r)/(a+j*t*i),l=G(2/(1+c*c)),g=G((j*a+(t+e)*i)/(j*a+(t-e)*i));return[bn*(l*(g-1/g)-2*f(g)),bn*(l*c*(g+1/g)-2*o(c))]}jn.invert=function(n,r){if(!(e=H.invert(n/1.2,1.065*r)))return null;var e,i=e[0],a=e[1],c=20;n/=bn,r/=bn;do{var v=i/2,s=a/2,p=h(v),d=u(v),y=h(s),m=u(s),R=u(a),M=G(R),E=y/(m+j*d*M),S=E*E,k=G(2/(1+S)),A=(j*m+(d+p)*M)/(j*m+(d-p)*M),x=G(A),C=x-1/x,N=x+1/x,F=k*C-2*f(x)-n,z=k*E*N-2*o(E)-r,L=y&&b*M*p*S/y,q=(j*d*m+M)/(2*(m+j*d*M)*(m+j*d*M)*M),B=-.5*E*k*k*k,W=B*L,I=B*q,D=(D=2*m+j*M*(d-p))*D*x,Q=(j*d*m*M+R)/D,T=-j*p*y/(M*D),V=C*W-2*Q/x+k*(Q+Q/A),_=C*I-2*T/x+k*(T+T/A),K=E*N*W-2*L/(1+S)+k*N*L+k*E*(Q-Q/A),O=E*N*I-2*q/(1+S)+k*N*q+k*E*(T-T/A),U=_*K-O*V;if(!U)break;var J=(z*_-F*O)/U,X=(F*K-z*V)/U;i-=J,a=l(-P,g(P,a-X))}while((t(J)>w||t(X)>w)&&--c>0);return t(t(a)-P)<w?[0,a]:c&&[i,a]};var Mn=u(35*k);function En(n,r){var e=d(r/2);return[n*Mn*G(1-e*e),(1+Mn)*e]}function Sn(n,r){var e=r/2,t=u(e);return[2*n/M*u(r)*t*t,M*d(e)]}function kn(n){var r=1-n,e=o(m,0)[0]-o(-m,0)[0],t=G(2*(o(0,P)[1]-o(0,-P)[1])/e);function o(e,t){var o=u(t),i=h(t);return[o/(r+n*o)*e,r*t+n*i]}function i(n,r){var e=o(n,r);return[e[0]*t,e[1]/t]}function a(n){return i(0,n)[1]}return i.invert=function(e,o){var i=T(a,o);return[e/t*(n+r/u(i)),i]},i}function An(n){return[n[0]/2,A(d(n[1]/2*k))*S]}function xn(n){return[2*n[0],2*o(h(n[1]*k))*S]}function Gn(n,e){var o=2*m/e,a=n*n;function c(e,c){var f=r.geoAzimuthalEquidistantRaw(e,c),l=f[0],g=f[1],v=l*l+g*g;if(v>a){var p=G(v),d=i(g,l),y=o*s(d/o),R=d-y,b=n*u(R),j=(n*h(R)-R*h(b))/(P-b),M=Cn(R,j),E=(m-n)/Nn(M,b,m);l=p;var S,k=50;do{l-=S=(n+Nn(M,b,l)*E-p)/(M(l)*E)}while(t(S)>w&&--k>0);g=R*h(l),l<P&&(g-=j*(l-P));var A=h(y),x=u(y);f[0]=l*x-g*A,f[1]=l*A+g*x}return f}return c.invert=function(e,c){var f=e*e+c*c;if(f>a){var l=G(f),g=i(c,e),v=o*s(g/o),p=g-v;e=l*u(p),c=l*h(p);for(var d=e-P,w=h(e),R=c/w,b=e<P?1/0:0,j=10;;){var M=n*h(R),E=n*u(R),S=h(E),k=P-E,A=(M-R*S)/k,x=Cn(R,A);if(t(b)<y||!--j)break;R-=b=(R*w-A*d-c)/(w-2*d*(k*(E+R*M*u(E)-S)-M*(M-R*S))/(k*k))}e=(l=n+Nn(x,E,e)*(m-n)/Nn(x,E,m))*u(g=v+R),c=l*h(g)}return r.geoAzimuthalEquidistantRaw.invert(e,c)},c}function Cn(n,r){return function(e){var t=n*u(e);return e<P&&(t-=r),G(1+t*t)}}function Nn(n,r,e){for(var t=(e-r)/50,o=n(r)+n(e),i=1,u=r;i<50;++i)o+=2*n(u+=t);return.5*o*t}function Fn(n,r,e,o,i,a,c,f){function l(t,l){if(!l)return[n*t/m,0];var g=l*l,v=n+g*(r+g*(e+g*o)),s=l*(i-1+g*(a-f+g*c)),p=(v*v+s*s)/(2*s),d=t*A(v/p)/m;return[p*h(d),l*(1+g*f)+p*(1-u(d))]}return arguments.length<8&&(f=0),l.invert=function(l,g){var v,s,p=m*l/n,d=g,y=50;do{var P=d*d,R=n+P*(r+P*(e+P*o)),b=d*(i-1+P*(a-f+P*c)),j=R*R+b*b,M=2*b,E=j/M,S=E*E,k=A(R/E)/m,x=p*k,C=R*R,N=(2*r+P*(4*e+6*P*o))*d,F=i+P*(3*a+5*P*c),z=(2*(R*N+b*(F-1))*M-j*(2*(F-1)))/(M*M),L=u(x),H=h(x),q=E*L,B=E*H,W=p/m*(1/G(1-C/S))*(N*E-R*z)/S,I=B-l,D=d*(1+P*f)+E-q-g,Q=z*H+q*W,T=q*k,V=1+z-(z*L-B*W),_=B*k,K=Q*_-V*T;if(!K)break;p-=v=(D*Q-I*V)/K,d-=s=(I*_-D*T)/K}while((t(v)>w||t(s)>w)&&--y>0);return[p,d]},l}En.invert=function(n,r){var e=r/(1+Mn);return[n&&n/(Mn*G(1-e*e)),2*o(e)]},Sn.invert=function(n,r){var e=o(r/M),t=u(e),i=2*e;return[n*M/2/(u(i)*t*t),i]};var zn=Fn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ln=Fn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var Hn=Fn(5/6*m,-.62636,-.0344,0,1.3493,-.05524,0,.045);function qn(n,r){var e=n*n,t=r*r;return[n*(1-.162388*t)*(.87-952426e-9*e*e),r*(1+t/12)]}qn.invert=function(n,r){var e,o=n,i=r,u=50;do{var a=i*i;i-=e=(i*(1+a/12)-r)/(1+a/4)}while(t(e)>w&&--u>0);u=50,n/=1-.162388*a;do{var c=(c=o*o)*c;o-=e=(o*(.87-952426e-9*c)-n)/(.87-.00476213*c)}while(t(e)>w&&--u>0);return[o,i]};var Bn=Fn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Wn(n){var r=n(P,0)[0]-n(-P,0)[0];function e(e,t){var o=e>0?-.5:.5,i=n(e+o*m,t);return i[0]-=o*r,i}return n.invert&&(e.invert=function(e,t){var o=e>0?-.5:.5,i=n.invert(e+o*r,t),u=i[0]-o*m;return u<-m?u+=2*m:u>m&&(u-=2*m),i[0]=u,i}),e}function In(n,r){var e=p(n),o=p(r),a=u(r),c=u(n)*a,f=h(n)*a,l=h(o*r);n=t(i(f,l)),r=A(c),t(n-P)>w&&(n%=P);var g=function(n,r){if(r===P)return[0,0];var e,o,i=h(r),a=i*i,c=a*a,f=1+c,l=1+3*c,g=1-c,v=A(1/G(f)),s=g+a*f*v,p=(1-i)/s,d=G(p),y=p*f,R=G(y),b=d*g;if(0===n)return[0,-(b+a*R)];var j,M=u(r),E=1/M,S=2*i*M,k=(-s*M-(-3*a+v*l)*S*(1-i))/(s*s),x=-E*S,C=-E*(a*f*k+p*l*S),N=-2*E*(g*(.5*k/d)-2*a*d*S),F=4*n/m;if(n>.222*m||r<m/4&&n>.175*m){if(e=(b+a*G(y*(1+c)-b*b))/(1+c),n>m/4)return[e,e];var z=e,L=.5*e;e=.5*(L+z),o=50;do{var H=G(y-e*e),q=e*(N+x*H)+C*A(e/R)-F;if(!q)break;q<0?L=e:z=e,e=.5*(L+z)}while(t(z-L)>w&&--o>0)}else{e=w,o=25;do{var B=e*e,W=G(y-B),I=N+x*W,D=e*I+C*A(e/R)-F,Q=I+(C-x*B)/W;e-=j=W?D/Q:0}while(t(j)>w&&--o>0)}return[e,-b-a*G(y-e*e)]}(n>m/4?P-n:n,r);return n>m/4&&(l=g[0],g[0]=-g[1],g[1]=-l),g[0]*=e,g[1]*=-o,g}function Dn(n,r){var e,i,c,f,l,g;if(r<w)return[(f=h(n))-(e=r*(n-f*(i=u(n)))/4)*i,i+e*f,1-r*f*f/2,n-e];if(r>=1-w)return e=(1-r)/4,c=1/(i=N(n)),[(f=((g=a(2*(g=n)))-1)/(g+1))+e*((l=i*C(n))-n)/(i*i),c-e*f*c*(l-n),c+e*f*c*(l+n),2*o(a(n))-P+e*(l-n)/i];var v=[1,0,0,0,0,0,0,0,0],s=[G(r),0,0,0,0,0,0,0,0],p=0;for(i=G(1-r),l=1;t(s[p]/v[p])>w&&p<8;)e=v[p++],s[p]=(e-i)/2,v[p]=(e+i)/2,i=G(e*i),l*=2;c=l*v[p]*n;do{c=(A(f=s[p]*h(i=c)/v[p])+c)/2}while(--p);return[h(c),f=u(c),f/u(c-i),c]}function Qn(n,r){if(!r)return n;if(1===r)return f(d(n/2+R));for(var e=1,i=G(1-r),u=G(r),a=0;t(u)>w;a++){if(n%m){var c=o(i*d(n)/e);c<0&&(c+=m),n+=c+~~(n/m)*m}else n+=n;u=(e+i)/2,i=G(e*i),u=((e=u)-i)/2}return n/(v(2,a)*e)}function Tn(n,r){var e=(j-1)/(j+1),c=G(1-e*e),l=Qn(P,c*c),g=f(d(m/4+t(r)/2)),v=a(-1*g)/G(e),s=function(n,r){var e=n*n,t=r+1,o=1-e-r*r;return[.5*((n>=0?P:-P)-i(o,2*n)),-.25*f(o*o+4*e)+.5*f(t*t+e)]}(v*u(-1*n),v*h(-1*n)),w=function(n,r,e){var i=t(n),u=C(t(r));if(i){var a=1/h(i),c=1/(d(i)*d(i)),f=-(c+e*(u*u*a*a)-1+e),l=(-f+G(f*f-(e-1)*c*4))/2;return[Qn(o(1/G(l)),e)*p(n),Qn(o(G((l/c-1)/e)),1-e)*p(r)]}return[0,Qn(o(u),1-e)*p(r)]}(s[0],s[1],c*c);return[-w[1],(r>=0?1:-1)*(.5*l-w[0])]}function Vn(n){var r=h(n),e=u(n),o=_n(n);function a(n,i){var a=o(n,i);n=a[0],i=a[1];var c=h(i),f=u(i),l=u(n),g=x(r*c+e*f*l),v=h(g),s=t(v)>w?g/v:1;return[s*e*h(n),(t(n)>P?s:-s)*(r*f-e*c*l)]}return o.invert=_n(-n),a.invert=function(n,e){var t=G(n*n+e*e),a=-h(t),c=u(t),f=t*c,l=-e*a,g=t*r,v=G(f*f+l*l-g*g),s=i(f*g+l*v,l*g-f*v),p=(t>P?-1:1)*i(n*a,t*u(s)*c+e*h(s)*a);return o.invert(p,s)},a}function _n(n){var r=h(n),e=u(n);return function(n,t){var o=u(t),a=u(n)*o,c=h(n)*o,f=h(t);return[i(c,a*e-f*r),A(f*e+a*r)]}}In.invert=function(n,r){t(n)>1&&(n=2*p(n)-n),t(r)>1&&(r=2*p(r)-r);var e=p(n),o=p(r),a=-e*n,c=-o*r,f=c/a<1,l=function(n,r){var e=0,o=1,i=.5,a=50;for(;;){var c=i*i,f=G(i),l=A(1/G(1+c)),g=1-c+i*(1+c)*l,v=(1-f)/g,s=G(v),p=v*(1+c),h=s*(1-c),d=p-n*n,w=G(d),P=r+h+i*w;if(t(o-e)<y||0==--a||0===P)break;P>0?e=i:o=i,i=.5*(e+o)}if(!a)return null;var R=A(f),b=u(R),j=1/b,M=2*f*b,E=(-g*b-(-3*i+l*(1+3*c))*M*(1-f))/(g*g);return[m/4*(n*(-2*j*(.5*E/s*(1-c)-2*i*s*M)+-j*M*w)+-j*(i*(1+c)*E+v*(1+3*c)*M)*A(n/G(p))),R]}(f?c:a,f?a:c),g=l[0],v=l[1],s=u(v);return f&&(g=-P-g),[e*(i(h(g)*s,-h(v))+m),o*A(u(g)*s)]},Tn.invert=function(n,r){var e,t,u,c,l,g,v=(j-1)/(j+1),s=G(1-v*v),p=Qn(P,s*s),h=(t=-n,u=s*s,(e=.5*p-r)?(c=Dn(e,u),t?(g=(l=Dn(t,1-u))[1]*l[1]+u*c[0]*c[0]*l[0]*l[0],[[c[0]*l[2]/g,c[1]*c[2]*l[0]*l[1]/g],[c[1]*l[1]/g,-c[0]*c[2]*l[0]*l[2]/g],[c[2]*l[1]*l[2]/g,-u*c[0]*c[1]*l[0]/g]]):[[c[0],0],[c[1],0],[c[2],0]]):[[0,(l=Dn(t,1-u))[0]/l[1]],[1/l[1],0],[l[2]/l[1],0]]),d=function(n,r){var e=r[0]*r[0]+r[1]*r[1];return[(n[0]*r[0]+n[1]*r[1])/e,(n[1]*r[0]-n[0]*r[1])/e]}(h[0],h[1]);return[i(d[1],d[0])/-1,2*o(a(-.5*f(v*d[0]*d[0]+v*d[1]*d[1])))-P]};var Kn=A(1-1/3)*S,On=pn(0);function Un(n){var r=Kn*k,e=ln(m,r)[0]-ln(-m,r)[0],o=On(0,r)[1],i=ln(0,r)[1],u=M-i,a=E/n,f=4/E,v=o+u*u*4/E;function s(s,p){var h,d=t(p);if(d>r){var w=g(n-1,l(0,c((s+m)/a)));(h=ln(s+=m*(n-1)/n-w*a,d))[0]=h[0]*E/e-E*(n-1)/(2*n)+w*E/n,h[1]=o+4*(h[1]-i)*u/E,p<0&&(h[1]=-h[1])}else h=On(s,p);return h[0]*=f,h[1]/=v,h}return s.invert=function(r,s){r/=f;var p=t(s*=v);if(p>o){var h=g(n-1,l(0,c((r+m)/a)));r=(r+m*(n-1)/n-h*a)*e/E;var d=ln.invert(r,.25*(p-o)*E/u+i);return d[0]-=m*(n-1)/n-h*a,s<0&&(d[1]=-d[1]),d}return On.invert(r,s)},s}function Jn(n,r){return[n,1&r?90-w:Kn]}function Xn(n,r){return[n,1&r?-90+w:-Kn]}function Yn(n){return[n[0]*(1-w),n[1]]}function Zn(n){var r,e=1+n,o=A(h(1/e)),a=2*G(m/(r=m+4*o*e)),c=.5*a*(e+G(n*(2+n))),f=n*n,l=e*e;function g(g,v){var s,p,d=1-h(v);if(d&&d<2){var w,R=P-v,b=25;do{var j=h(R),M=u(R),E=o+i(j,e-M),S=1+l-2*e*M;R-=w=(R-f*o-e*j+S*E-.5*d*r)/(2*e*j*E)}while(t(w)>y&&--b>0);s=a*G(S),p=g*E/m}else s=a*(n+d),p=g*o/m;return[s*h(p),c-s*u(p)]}return g.invert=function(n,t){var u=n*n+(t-=c)*t,g=(1+l-u/(a*a))/(2*e),v=x(g),s=h(v),p=o+i(s,e-g);return[A(n/G(u))*m/p,A(1-2*(v-f*o-e*s+(1+l-2*e*g)*p)/r)]},g}var $n=.7109889596207567,nr=.0528035274542;function rr(n,r){return r>-$n?((n=U(n,r))[1]+=nr,n):$(n,r)}function er(n,r){return t(r)>$n?((n=U(n,r))[1]-=r>0?nr:-nr,n):$(n,r)}function tr(n,r,e,t){var o=G(4*m/(2*e+(1+n-r/2)*h(2*e)+(n+r)/2*h(4*e)+r/2*h(6*e))),i=G(t*h(e)*G((1+n*u(2*e)+r*u(4*e))/(1+n+r))),a=e*f(1);function c(e){return G(1+n*u(2*e)+r*u(4*e))}function f(t){var o=t*e;return(2*o+(1+n-r/2)*h(2*o)+(n+r)/2*h(4*o)+r/2*h(6*o))/e}function l(n){return c(n)*h(n)}var g=function(n,r){var t=e*T(f,a*h(r)/e,r/m);isNaN(t)&&(t=e*p(r));var l=o*c(t);return[l*i*n/m*u(t),l/i*h(t)]};return g.invert=function(n,r){var t=T(l,r*i/o);return[n*m/(u(t)*o*i*c(t)),A(e*f(t/e)/a)]},0===e&&(o=G(t/m),(g=function(n,r){return[n*o,h(r)/o]}).invert=function(n,r){return[n/o,A(r*o)]}),g}function or(n,r,e,t,o){void 0===t&&(t=1e-8),void 0===o&&(o=20);var i=n(r),u=n(.5*(r+e)),a=n(e);return function n(r,e,t,o,i,u,a,c,f,l,g){if(g.nanEncountered)return NaN;var v,s,p,h,d,w,y,m,P,R;if(s=r(e+.25*(v=t-e)),p=r(t-.25*v),isNaN(s))g.nanEncountered=!0;else{if(!isNaN(p))return R=((w=(h=v*(o+4*s+i)/12)+(d=v*(i+4*p+u)/12))-a)/15,l>f?(g.maxDepthCount++,w+R):Math.abs(R)<c?w+R:(m=n(r,e,y=e+.5*v,o,s,i,h,.5*c,f,l+1,g),isNaN(m)?(g.nanEncountered=!0,NaN):(P=n(r,y,t,i,p,u,d,.5*c,f,l+1,g),isNaN(P)?(g.nanEncountered=!0,NaN):m+P));g.nanEncountered=!0}}(n,r,e,i,u,a,(i+4*u+a)*(e-r)/6,t,o,1,{maxDepthCount:0,nanEncountered:!1})}function ir(n,r,e){function o(e){return n+(1-n)*v(1-v(e,r),1/r)}function i(n){return or(o,0,n,1e-4)}for(var u=1/i(1),a=1e3,c=(1+1e-8)*u,f=[],l=0;l<=a;l++)f.push(i(l/a)*c);function g(n){var r=0,e=a,t=a>>1;do{f[t]>n?e=t:r=t,t=r+e>>1}while(t>r);var o=f[t+1]-f[t];return o&&(o=(n-f[t+1])/o),(t+1+o)/a}var s=2*g(1)/m*u/e,d=function(n,r){var e=g(t(h(r))),i=o(e)*n;return e/=s,[i,r>=0?e:-e]};return d.invert=function(n,r){var e;return t(r*=s)<1&&(e=p(r)*A(i(t(r))*u)),[n/o(t(r)),e]},d}function ur(n,r){return t(n[0]-r[0])<w&&t(n[1]-r[1])<w}function ar(n,r){for(var e,t,o,i=-1,u=n.length,a=n[0],c=[];++i<u;){t=((e=n[i])[0]-a[0])/r,o=(e[1]-a[1])/r;for(var f=0;f<r;++f)c.push([a[0]+f*t,a[1]+f*o]);a=e}return c.push(e),c}function cr(n,t,o){var i,u;function a(r,e){for(var o=e<0?-1:1,i=t[+(e<0)],u=0,a=i.length-1;u<a&&r>i[u][2][0];++u);var c=n(r-i[u][1][0],e);return c[0]+=n(i[u][1][0],o*e>o*i[u][0][1]?i[u][0][1]:e)[0],c}o?a.invert=o(a):n.invert&&(a.invert=function(r,e){for(var o=u[+(e<0)],i=t[+(e<0)],c=0,f=o.length;c<f;++c){var l=o[c];if(l[0][0]<=r&&r<l[1][0]&&l[0][1]<=e&&e<l[1][1]){var g=n.invert(r-n(i[c][1][0],0)[0],e);return g[0]+=i[c][1][0],ur(a(g[0],g[1]),[r,e])?g:null}}});var c=r.geoProjection(a),f=c.stream;return c.stream=function(n){var e=c.rotate(),t=f(n),o=(c.rotate([0,0]),f(n));return c.rotate(e),t.sphere=function(){r.geoStream(i,o)},t},c.lobes=function(r){return arguments.length?(i=function(n){var r,t,o,i,u,a,c,f=[],l=n[0].length;for(c=0;c<l;++c)t=(r=n[0][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(ar([[t+w,o+w],[t+w,i-w],[u-w,i-w],[u-w,a+w]],30));for(c=n[1].length-1;c>=0;--c)t=(r=n[1][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(ar([[u-w,a-w],[u-w,i+w],[t+w,i+w],[t+w,o-w]],30));return{type:"Polygon",coordinates:[e.merge(f)]}}(r),t=r.map(function(n){return n.map(function(n){return[[n[0][0]*k,n[0][1]*k],[n[1][0]*k,n[1][1]*k],[n[2][0]*k,n[2][1]*k]]})}),u=t.map(function(r){return r.map(function(r){var e,t=n(r[0][0],r[0][1])[0],o=n(r[2][0],r[2][1])[0],i=n(r[1][0],r[0][1])[1],u=n(r[1][0],r[1][1])[1];return i>u&&(e=i,i=u,u=e),[[t,i],[o,u]]})}),c):t.map(function(n){return n.map(function(n){return[[n[0][0]*S,n[0][1]*S],[n[1][0]*S,n[1][1]*S],[n[2][0]*S,n[2][1]*S]]})})},null!=t&&c.lobes(t),c}rr.invert=function(n,r){return r>-$n?U.invert(n,r-nr):$.invert(n,r)},er.invert=function(n,r){return t(r)>$n?U.invert(n,r+(r>0?nr:-nr)):$.invert(n,r)};var fr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var lr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var gr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var vr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var sr=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var pr=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function hr(n,r){return[3/E*n*G(m*m/3-r*r),r]}function dr(n){function r(r,e){if(t(t(e)-P)<w)return[0,e<0?-2:2];var o=h(e),i=v((1+o)/(1-o),n/2),a=.5*(i+1/i)+u(r*=n);return[2*h(r)/a,(i-1/i)/a]}return r.invert=function(r,e){var o=t(e);if(t(o-2)<w)return r?null:[0,p(e)*P];if(o>2)return null;var u=(r/=2)*r,a=(e/=2)*e,c=2*e/(1+u+a);return c=v((1+c)/(1-c),1/n),[i(2*r,1-u-a)/n,A((c-1)/(c+1))]},r}hr.invert=function(n,r){return[E/3*n/G(m*m/3-r*r),r]};var wr=m/j;function yr(n,r){return[n*(1+G(u(r)))/2,r/(u(r/2)*u(n/6))]}function mr(n,r){var e=n*n,t=r*r;return[n*(.975534+t*(-.0143059*e-.119161+-.0547009*t)),r*(1.00384+e*(.0802894+-.02855*t+199025e-9*e)+t*(.0998909+-.0491032*t))]}function Pr(n,r){return[h(n)/u(r),d(r)*u(n)]}function Rr(n){var r=u(n),e=d(R+n/2);function o(o,i){var u=i-n,a=t(u)<w?o*r:t(a=R+i/2)<w||t(t(a)-P)<w?0:o*u/f(d(a)/e);return[a,u]}return o.invert=function(o,i){var u,a=i+n;return[t(i)<w?o/r:t(u=R+a/2)<w||t(t(u)-P)<w?0:o*f(d(u)/e)/i,a]},o}function br(n,r){return[n,1.25*f(d(R+.4*r))]}function jr(n){var r=n.length-1;function e(e,t){for(var o,i=u(t),a=2/(1+i*u(e)),c=a*i*h(e),f=a*h(t),l=r,g=n[l],v=g[0],s=g[1];--l>=0;)v=(g=n[l])[0]+c*(o=v)-f*s,s=g[1]+c*s+f*o;return[v=c*(o=v)-f*s,s=c*s+f*o]}return e.invert=function(e,a){var c=20,f=e,l=a;do{for(var g,v=r,s=n[v],p=s[0],d=s[1],y=0,m=0;--v>=0;)y=p+f*(g=y)-l*m,m=d+f*m+l*g,p=(s=n[v])[0]+f*(g=p)-l*d,d=s[1]+f*d+l*g;var P,R,b=(y=p+f*(g=y)-l*m)*y+(m=d+f*m+l*g)*m;f-=P=((p=f*(g=p)-l*d-e)*y+(d=f*d+l*g-a)*m)/b,l-=R=(d*y-p*m)/b}while(t(P)+t(R)>w*w&&--c>0);if(c){var j=G(f*f+l*l),M=2*o(.5*j),E=h(M);return[i(f*E,j*u(M)),j?A(l*E/j):0]}},e}yr.invert=function(n,r){var e=t(n),o=t(r),i=w,a=P;o<wr?a*=o/wr:i+=6*x(wr/o);for(var c=0;c<25;c++){var f=h(a),l=G(u(a)),g=h(a/2),v=u(a/2),s=h(i/6),p=u(i/6),d=.5*i*(1+l)-e,y=a/(v*p)-o,m=l?-.25*i*f/l:0,R=.5*(1+l),b=(1+.5*a*g/v)/(v*p),j=a/v*(s/6)/(p*p),M=m*j-b*R,E=(d*j-y*R)/M,S=(y*m-d*b)/M;if(a-=E,i-=S,t(E)<w&&t(S)<w)break}return[n<0?-i:i,r<0?-a:a]},mr.invert=function(n,r){var e=p(n)*m,o=r/2,i=50;do{var u=e*e,a=o*o,c=e*o,f=e*(.975534+a*(-.0143059*u-.119161+-.0547009*a))-n,l=o*(1.00384+u*(.0802894+-.02855*a+199025e-9*u)+a*(.0998909+-.0491032*a))-r,g=.975534-a*(.119161+3*u*.0143059+.0547009*a),v=-c*(.238322+.2188036*a+.0286118*u),s=c*(.1605788+7961e-7*u+-.0571*a),h=1.00384+u*(.0802894+199025e-9*u)+a*(3*(.0998909-.02855*u)-.245516*a),d=v*s-h*g,y=(l*v-f*h)/d,P=(f*s-l*g)/d;e-=y,o-=P}while((t(y)>w||t(P)>w)&&--i>0);return i&&[e,o]},Pr.invert=function(n,r){var e=n*n,t=r*r+1,o=e+t,i=n?b*G((o-G(o*o-4*e))/e):1/G(t);return[A(n*i),p(r)*x(i)]},br.invert=function(n,r){return[n,2.5*o(a(.8*r))-.625*m]};var Mr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Er=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Sr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],kr=[[.9245,0],[0,0],[.01943,0]],Ar=[[.721316,0],[0,0],[-.00881625,-.00617325]];function xr(n,e){var t=r.geoProjection(jr(n)).rotate(e).clipAngle(90),o=r.geoRotation(e),i=t.center;return delete t.rotate,t.center=function(n){return arguments.length?i(o(n)):o.invert(i())},t}var Gr=G(6),Cr=G(7);function Nr(n,r){var e=A(7*h(r)/(3*Gr));return[Gr*n*(2*u(2*e/3)-1)/Cr,9*h(e/3)/Cr]}function Fr(n,r){for(var e,o=(1+b)*h(r),i=r,a=0;a<25&&(i-=e=(h(i/2)+h(i)-o)/(.5*u(i/2)+u(i)),!(t(e)<w));a++);return[n*(1+2*u(i)/u(i/2))/(3*j),2*G(3)*h(i/2)/G(2+j)]}function zr(n,r){for(var e,o=G(6/(4+m)),i=(1+m/4)*h(r),a=r/2,c=0;c<25&&(a-=e=(a/2+h(a)-i)/(.5+u(a)),!(t(e)<w));c++);return[o*(.5+u(a))*n/1.5,o*a]}function Lr(n,r){var e=r*r,t=e*e,o=e*t;return[n*(.84719-.13063*e+o*o*(.05494*e-.04515-.02326*t+.00331*o)),r*(1.01183+t*t*(.01926*e-.02625-.00396*t))]}function Hr(n,r){return[n*(1+u(r))/2,2*(r-d(r/2))]}Nr.invert=function(n,r){var e=3*A(r*Cr/9);return[n*Cr/(Gr*(2*u(2*e/3)-1)),A(3*h(e)*Gr/7)]},Fr.invert=function(n,r){var e=r*G(2+j)/(2*G(3)),t=2*A(e);return[3*j*n/(1+2*u(t)/u(t/2)),A((e+h(t))/(1+b))]},zr.invert=function(n,r){var e=G(6/(4+m)),o=r/e;return t(t(o)-P)<w&&(o=o<0?-P:P),[1.5*n/(e*(.5+u(o))),A((o/2+h(o))/(1+m/4))]},Lr.invert=function(n,r){var e,o,i,u,a=r,c=25;do{a-=e=(a*(1.01183+(i=(o=a*a)*o)*i*(.01926*o-.02625-.00396*i))-r)/(1.01183+i*i*(.21186*o-.23625+-.05148*i))}while(t(e)>y&&--c>0);return[n/(.84719-.13063*(o=a*a)+(u=o*(i=o*o))*u*(.05494*o-.04515-.02326*i+.00331*u)),a]},Hr.invert=function(n,r){for(var e=r/2,o=0,i=1/0;o<10&&t(i)>w;++o){var a=u(r/2);r-=i=(r-d(r/2)-e)/(1-.5/(a*a))}return[2*n/(1+u(r)),r]};var qr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Br(n,r){var e=h(r),o=u(r),i=p(n);if(0===n||t(r)===P)return[0,r];if(0===r)return[n,0];if(t(n)===P)return[n*o,P*e];var a=m/(2*n)-2*n/m,c=2*r/m,f=(1-c*c)/(e-c),l=a*a,g=f*f,v=1+l/g,s=1+g/l,d=(a*e/f-a/2)/v,w=(g*e/l+f/2)/s,y=w*w-(g*e*e/l+f*e-1)/s;return[P*(d+G(d*d+o*o/v)*i),P*(w+G(y<0?0:y)*p(-r*a)*i)]}Br.invert=function(n,r){var e=(n/=P)*n,t=e+(r/=P)*r,o=m*m;return[n?(t-1+G((1-t)*(1-t)+4*e))/(2*n)*P:0,T(function(n){return t*(m*h(n)-2*n)*m+4*n*n*(r-h(n))+2*m*n-o*r},0)]};var Wr=1.0148,Ir=.23185,Dr=-.14499,Qr=.02406,Tr=Wr,Vr=5*Ir,_r=7*Dr,Kr=9*Qr;function Or(n,r){var e=r*r;return[n,r*(Wr+e*e*(Ir+e*(Dr+Qr*e)))]}function Ur(n,r){if(t(r)<w)return[n,0];var e=d(r),o=n*h(r);return[h(o)/e,r+(1-u(o))/e]}function Jr(n,r){var e=Yr(n[1],n[0]),t=Yr(r[1],r[0]),o=function(n,r){return i(n[0]*r[1]-n[1]*r[0],n[0]*r[0]+n[1]*r[1])}(e,t),a=Zr(e)/Zr(t);return Xr([1,0,n[0][0],0,1,n[0][1]],Xr([a,0,0,0,a,0],Xr([u(o),h(o),0,-h(o),u(o),0],[1,0,-r[0][0],0,1,-r[0][1]])))}function Xr(n,r){return[n[0]*r[0]+n[1]*r[3],n[0]*r[1]+n[1]*r[4],n[0]*r[2]+n[1]*r[5]+n[2],n[3]*r[0]+n[4]*r[3],n[3]*r[1]+n[4]*r[4],n[3]*r[2]+n[4]*r[5]+n[5]]}function Yr(n,r){return[n[0]-r[0],n[1]-r[1]]}function Zr(n){return G(n[0]*n[0]+n[1]*n[1])}function $r(n,e,o){function i(n,r){var t,o=e(n,r),i=o.project([n*S,r*S]);return(t=o.transform)?[t[0]*i[0]+t[1]*i[1]+t[2],-(t[3]*i[0]+t[4]*i[1]+t[5])]:(i[1]=-i[1],i)}!function n(r,e){r.edges=function(n){for(var r=n.length,e=[],t=n[r-1],o=0;o<r;++o)e.push([t,t=n[o]]);return e}(r.face);if(e.face){var t=r.shared=function(n,r){for(var e,t,o=n.length,i=null,u=0;u<o;++u){e=n[u];for(var a=r.length;--a>=0;)if(t=r[a],e[0]===t[0]&&e[1]===t[1]){if(i)return[i,e];i=e}}}(r.face,e.face),o=Jr(t.map(e.project),t.map(r.project));r.transform=e.transform?Xr(e.transform,o):o;for(var i=e.edges,u=0,a=i.length;u<a;++u)ne(t[0],i[u][1])&&ne(t[1],i[u][0])&&(i[u]=r),ne(t[0],i[u][0])&&ne(t[1],i[u][1])&&(i[u]=r);for(i=r.edges,u=0,a=i.length;u<a;++u)ne(t[0],i[u][0])&&ne(t[1],i[u][1])&&(i[u]=e),ne(t[0],i[u][1])&&ne(t[1],i[u][0])&&(i[u]=e)}else r.transform=e.transform;r.children&&r.children.forEach(function(e){n(e,r)});return r}(n,{transform:null}),re(n)&&(i.invert=function(r,t){var o=function n(r,t){var o=r.project.invert,i=r.transform,u=t;i&&(c=1/((a=i)[0]*a[4]-a[1]*a[3]),i=[c*a[4],-c*a[1],c*(a[1]*a[5]-a[2]*a[4]),-c*a[3],c*a[0],c*(a[2]*a[3]-a[0]*a[5])],u=[i[0]*u[0]+i[1]*u[1]+i[2],i[3]*u[0]+i[4]*u[1]+i[5]]);var a,c;if(o&&r===function(n){return e(n[0]*k,n[1]*k)}(f=o(u)))return f;var f,l=r.children;for(var g=0,v=l&&l.length;g<v;++g)if(f=n(l[g],t))return f}(n,[r,-t]);return o&&(o[0]*=k,o[1]*=k,o)});var u=r.geoProjection(i),a=u.stream;return u.stream=function(e){var o=u.rotate(),i=a(e),c=(u.rotate([0,0]),a(e));return u.rotate(o),i.sphere=function(){c.polygonStart(),c.lineStart(),function n(e,o,i){var u,a,c=o.edges,f=c.length,l={type:"MultiPoint",coordinates:o.face},g=o.face.filter(function(n){return 90!==t(n[1])}),v=r.geoBounds({type:"MultiPoint",coordinates:g}),s=!1,p=-1,h=v[1][0]-v[0][0];var d=180===h||360===h?[(v[0][0]+v[1][0])/2,(v[0][1]+v[1][1])/2]:r.geoCentroid(l);if(i)for(;++p<f&&c[p]!==i;);++p;for(var y=0;y<f;++y)a=c[(y+p)%f],Array.isArray(a)?(s||(e.point((u=r.geoInterpolate(a[0],d)(w))[0],u[1]),s=!0),e.point((u=r.geoInterpolate(a[1],d)(w))[0],u[1])):(s=!1,a!==i&&n(e,a,o))}(c,n),c.lineEnd(),c.polygonEnd()},i},u.angle(null==o?-30:o*S)}function ne(n,r){return n&&r&&n[0]===r[0]&&n[1]===r[1]}function re(n){return n.project.invert||n.children&&n.children.some(re)}Or.invert=function(n,r){r>1.790857183?r=1.790857183:r<-1.790857183&&(r=-1.790857183);var e,o=r;do{var i=o*o;o-=e=(o*(Wr+i*i*(Ir+i*(Dr+Qr*i)))-r)/(Tr+i*i*(Vr+i*(_r+Kr*i)))}while(t(e)>w);return[n,o]},Ur.invert=function(n,r){if(t(r)<w)return[n,0];var e,o=n*n+r*r,i=.5*r,a=10;do{var c=d(i),f=1/u(i),l=o-2*r*i+i*i;i-=e=(c*l+2*(i-r))/(2+l*f*f+2*(i-r)*c)}while(t(e)>w&&--a>0);return c=d(i),[(t(r)<t(i+1/c)?A(n*c):p(r)*p(n)*(x(t(n*c))+P))/h(i),i]};var ee=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],te=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(n){return n.map(function(n){return ee[n]})});var oe=2/G(3);function ie(n,r){var e=ln(n,r);return[e[0]*oe,e[1]]}function ue(n,r){for(var e=0,t=n.length,o=0;e<t;++e)o+=n[e]*r[e];return o}function ae(n){return[i(n[1],n[0])*S,A(l(-1,g(1,n[2])))*S]}function ce(n){var r=n[0]*k,e=n[1]*k,t=u(e);return[t*u(r),t*h(r),h(e)]}function fe(){}function le(n,r){return{type:"FeatureCollection",features:n.features.map(function(n){return ge(n,r)})}}function ge(n,r){return{type:"Feature",id:n.id,properties:n.properties,geometry:ve(n.geometry,r)}}function ve(n,e){if(!n)return null;if("GeometryCollection"===n.type)return function(n,r){return{type:"GeometryCollection",geometries:n.geometries.map(function(n){return ve(n,r)})}}(n,e);var t;switch(n.type){case"Point":case"MultiPoint":t=he;break;case"LineString":case"MultiLineString":t=de;break;case"Polygon":case"MultiPolygon":case"Sphere":t=we;break;default:return null}return r.geoStream(n,e(t)),t.result()}ie.invert=function(n,r){return ln.invert(n/oe,r)};var se=[],pe=[],he={point:function(n,r){se.push([n,r])},result:function(){var n=se.length?se.length<2?{type:"Point",coordinates:se[0]}:{type:"MultiPoint",coordinates:se}:null;return se=[],n}},de={lineStart:fe,point:function(n,r){se.push([n,r])},lineEnd:function(){se.length&&(pe.push(se),se=[])},result:function(){var n=pe.length?pe.length<2?{type:"LineString",coordinates:pe[0]}:{type:"MultiLineString",coordinates:pe}:null;return pe=[],n}},we={polygonStart:fe,lineStart:fe,point:function(n,r){se.push([n,r])},lineEnd:function(){var n=se.length;if(n){do{se.push(se[0].slice())}while(++n<4);pe.push(se),se=[]}},polygonEnd:fe,result:function(){if(!pe.length)return null;var n=[],r=[];return pe.forEach(function(e){!function(n){if((r=n.length)<4)return!1;for(var r,e=0,t=n[r-1][1]*n[0][0]-n[r-1][0]*n[0][1];++e<r;)t+=n[e-1][1]*n[e][0]-n[e-1][0]*n[e][1];return t<=0}(e)?r.push(e):n.push([e])}),r.forEach(function(r){var e=r[0];n.some(function(n){if(function(n,r){for(var e=r[0],t=r[1],o=!1,i=0,u=n.length,a=u-1;i<u;a=i++){var c=n[i],f=c[0],l=c[1],g=n[a],v=g[0],s=g[1];l>t^s>t&&e<(v-f)*(t-l)/(s-l)+f&&(o=!o)}return o}(n[0],e))return n.push(r),!0})||n.push([r])}),pe=[],n.length?n.length>1?{type:"MultiPolygon",coordinates:n}:{type:"Polygon",coordinates:n[0]}:null}};function ye(n){var e=n(P,0)[0]-n(-P,0)[0];function o(r,o){var i=t(r)<P,u=n(i?r:r>0?r-m:r+m,o),a=(u[0]-u[1])*b,c=(u[0]+u[1])*b;if(i)return[a,c];var f=e*b,l=a>0^c>0?-1:1;return[l*a-p(c)*f,l*c-p(a)*f]}return n.invert&&(o.invert=function(r,o){var i=(r+o)*b,u=(o-r)*b,a=t(i)<.5*e&&t(u)<.5*e;if(!a){var c=e*b,f=i>0^u>0?-1:1,l=-f*r+(u>0?1:-1)*c,g=-f*o+(i>0?1:-1)*c;i=(-l-g)*b,u=(l-g)*b}var v=n.invert(i,u);return a||(v[0]+=i>0?m:-m),v}),r.geoProjection(o).rotate([-90,-90,45]).clipAngle(179.999)}function me(){return ye(Tn).scale(111.48)}function Pe(n){var r=h(n);function e(e,t){var i=r?d(e*r/2)/r:e/2;if(!t)return[2*i,-n];var a=2*o(i*h(t)),c=1/d(t);return[h(a)*c,t+(1-u(a))*c-n]}return e.invert=function(e,i){if(t(i+=n)<w)return[r?2*o(r*e/2)/r:e,0];var a,c=e*e+i*i,f=0,l=10;do{var g=d(f),v=1/u(f),s=c-2*i*f+f*f;f-=a=(g*s+2*(f-i))/(2+s*v*v+2*(f-i)*g)}while(t(a)>w&&--l>0);var p=e*(g=d(f)),y=d(t(i)<t(f+1/g)?.5*A(p):.5*x(p)+m/4)/h(f);return[r?2*o(r*y)/r:2*y,f]},e}var Re=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function be(n,r){var e,o=g(18,36*t(r)/m),i=c(o),u=o-i,a=(e=Re[i])[0],f=e[1],l=(e=Re[++i])[0],v=e[1],s=(e=Re[g(19,++i)])[0],p=e[1];return[n*(l+u*(s-a)/2+u*u*(s-2*l+a)/2),(r>0?P:-P)*(v+u*(p-f)/2+u*u*(p-2*v+f)/2)]}function je(n,r){var e=function(n){function r(r,e){var t=u(e),o=(n-1)/(n-t*u(r));return[o*t*h(r),o*h(e)]}return r.invert=function(r,e){var t=r*r+e*e,o=G(t),u=(n-G(1-t*(n+1)/(n-1)))/((n-1)/o+o/(n-1));return[i(r*u,o*G(1-u*u)),o?A(e*u/o):0]},r}(n);if(!r)return e;var t=u(r),o=h(r);function a(r,i){var u=e(r,i),a=u[1],c=a*o/(n-1)+t;return[u[0]*t/c,a/c]}return a.invert=function(r,i){var u=(n-1)/(n-1-i*o);return e.invert(u*r,u*i*t)},a}Re.forEach(function(n){n[1]*=1.0144}),be.invert=function(n,r){var e=r/P,o=90*e,i=g(18,t(o/5)),u=l(0,c(i));do{var a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],s=v-a,p=v-2*f+a,h=2*(t(e)-f)/s,d=p/s,w=h*(1-d*h*(1-2*d*h));if(w>=0||1===u){o=(r>=0?5:-5)*(w+i);var m,R=50;do{w=(i=g(18,t(o)/5))-(u=c(i)),a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],o-=(m=(r>=0?P:-P)*(f+w*(v-a)/2+w*w*(v-2*f+a)/2)-r)*S}while(t(m)>y&&--R>0);break}}while(--u>=0);var b=Re[u][0],j=Re[u+1][0],M=Re[g(19,u+2)][0];return[n/(j+w*(M-b)/2+w*w*(M-2*j+b)/2),o*k]};var Me=1e4,Ee=-180,Se=Ee+1e-4,ke=180,Ae=ke-1e-4,xe=-90,Ge=xe+1e-4,Ce=90,Ne=Ce-1e-4;function Fe(n){return n.length>0}function ze(n){return n===xe||n===Ce?[0,n]:[Ee,(r=n,Math.floor(r*Me)/Me)];var r}function Le(n){var r=n[0],e=n[1],t=!1;return r<=Se?(r=Ee,t=!0):r>=Ae&&(r=ke,t=!0),e<=Ge?(e=xe,t=!0):e>=Ne&&(e=Ce,t=!0),t?[r,e]:n}function He(n){return n.map(Le)}function qe(n,r,e){for(var t=0,o=n.length;t<o;++t){var i=n[t].slice();e.push({index:-1,polygon:r,ring:i});for(var u=0,a=i.length;u<a;++u){var c=i[u],f=c[0],l=c[1];if(f<=Se||f>=Ae||l<=Ge||l>=Ne){i[u]=Le(c);for(var g=u+1;g<a;++g){var v=i[g],s=v[0],p=v[1];if(s>Se&&s<Ae&&p>Ge&&p<Ne)break}if(g===u+1)continue;if(u){var h={index:-1,polygon:r,ring:i.slice(0,u+1)};h.ring[h.ring.length-1]=ze(l),e[e.length-1]=h}else e.pop();if(g>=a)break;e.push({index:-1,polygon:r,ring:i=i.slice(g-1)}),i[0]=ze(i[0][1]),u=-1,a=i.length}}}}function Be(n){var r,e,t,o,i,u,a=n.length,c={},f={};for(r=0;r<a;++r)t=(e=n[r]).ring[0],i=e.ring[e.ring.length-1],t[0]!==i[0]||t[1]!==i[1]?(e.index=r,c[t]=f[i]=e):(e.polygon.push(e.ring),n[r]=null);for(r=0;r<a;++r)if(e=n[r]){if(t=e.ring[0],i=e.ring[e.ring.length-1],o=f[t],u=c[i],delete c[t],delete f[i],t[0]===i[0]&&t[1]===i[1]){e.polygon.push(e.ring);continue}o?(delete f[t],delete c[o.ring[0]],o.ring.pop(),n[o.index]=null,e={index:-1,polygon:o.polygon,ring:o.ring.concat(e.ring)},o===u?e.polygon.push(e.ring):(e.index=a++,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e))):u?(delete c[i],delete f[u.ring[u.ring.length-1]],e.ring.pop(),e={index:a++,polygon:u.polygon,ring:e.ring.concat(u.ring)},n[u.index]=null,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e)):(e.ring.push(e.ring[0]),e.polygon.push(e.ring))}}function We(n){var r={type:"Feature",geometry:Ie(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),null!=n.properties&&(r.properties=n.properties),r}function Ie(n){if(null==n)return n;var r,e,t,o;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(Ie)};break;case"Point":r={type:"Point",coordinates:Le(n.coordinates)};break;case"MultiPoint":case"LineString":r={type:n.type,coordinates:He(n.coordinates)};break;case"MultiLineString":r={type:"MultiLineString",coordinates:n.coordinates.map(He)};break;case"Polygon":var i=[];qe(n.coordinates,i,e=[]),Be(e),r={type:"Polygon",coordinates:i};break;case"MultiPolygon":e=[],t=-1,o=n.coordinates.length;for(var u=new Array(o);++t<o;)qe(n.coordinates[t],u[t]=[],e);Be(e),r={type:"MultiPolygon",coordinates:u.filter(Fe)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function De(n,r){var e=d(r/2),t=h(R*e);return[n*(.74482-.34588*t*t),1.70711*e]}function Qe(n,e,t){var o=r.geoInterpolate(e,t),i=o(.5),u=r.geoRotation([-i[0],-i[1]])(e),a=o.distance/2,c=-A(h(u[1]*k)/h(a)),f=[-i[0],-i[1],-(u[0]>0?m-c:c)*S],l=r.geoProjection(n(a)).rotate(f),g=r.geoRotation(f),v=l.center;return delete l.rotate,l.center=function(n){return arguments.length?v(g(n)):g.invert(v())},l.clipAngle(90)}function Te(n){var e=u(n);function t(n,t){var o=r.geoGnomonicRaw(n,t);return o[0]*=e,o}return t.invert=function(n,t){return r.geoGnomonicRaw.invert(n/e,t)},t}function Ve(n,r){return Qe(Te,n,r)}function _e(n){if(!(n*=2))return r.geoAzimuthalEquidistantRaw;var e=-n/2,t=-e,o=n*n,a=d(t),c=.5/h(t);function f(r,i){var a=x(u(i)*u(r-e)),c=x(u(i)*u(r-t));return[((a*=a)-(c*=c))/(2*n),(i<0?-1:1)*G(4*o*c-(o-a+c)*(o-a+c))/(2*n)]}return f.invert=function(n,r){var o,f,l=r*r,g=u(G(l+(o=n+e)*o)),v=u(G(l+(o=n+t)*o));return[i(f=g-v,o=(g+v)*a),(r<0?-1:1)*x(G(o*o+f*f)*c)]},f}function Ke(n,r){return Qe(_e,n,r)}function Oe(n,r){if(t(r)<w)return[n,0];var e=t(r/P),o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,p(r)*m*d(o/2)];var i=u(o),a=t(m/n-n/m)/2,c=a*a,f=i/(e+i-1),l=f*(2/e-1),g=l*l,v=g+c,s=f-g,h=c+f;return[p(n)*m*(a*s+G(c*s*s-v*(f*f-g)))/v,p(r)*m*(l*h-a*G((c+1)*v-h*h))/v]}function Ue(n,r){if(t(r)<w)return[n,0];var e=t(r/P),o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,p(r)*m*d(o/2)];var i=u(o),a=t(m/n-n/m)/2,c=a*a,f=i*(G(1+c)-a*i)/(1+c*e*e);return[p(n)*m*f,p(r)*m*G(1-f*(2*a+f))]}function Je(n,r){if(t(r)<w)return[n,0];var e=r/P,o=A(e);if(t(n)<w||t(t(r)-P)<w)return[0,m*d(o/2)];var i=(m/n-n/m)/2,a=e/(1+u(o));return[m*(p(n)*G(i*i+1-a*a)-i),m*a]}function Xe(n,r){if(!r)return[n,0];var e=t(r);if(!n||e===P)return[0,r];var o=e/P,i=o*o,u=(8*o-i*(i+2)-5)/(2*i*(o-1)),a=u*u,c=o*u,f=i+a+2*c,l=o+3*u,g=n/P,v=g+1/g,s=p(t(n)-P)*G(v*v-4),h=s*s,d=(s*(f+a-1)+2*G(f*(i+a*h-1)+(1-i)*(i*(l*l+4*a)+12*c*a+4*a*a)))/(4*f+h);return[p(n)*P*d,p(r)*P*G(1+s*t(d)-d*d)]}function Ye(n,r,e,t){var o=m/3;n=l(n,w),r=l(r,w),n=g(n,P),r=g(r,m-w),e=l(e,0),e=g(e,100-w);var a=(t=l(t,w))/100,c=x((e/100+1)*u(o))/o,f=h(n)/h(c*P),v=r/m,s=G(a*h(n/2)/h(r/2));return function(n,r,e,t,o){function a(i,a){var c=e*h(t*a),f=G(1-c*c),l=G(2/(1+f*u(i*=o)));return[n*f*l*h(i),r*c*l]}return a.invert=function(u,a){var c=u/n,f=a/r,l=G(c*c+f*f),g=2*A(l/2);return[i(u*d(g),n*l)/o,l&&A(a*h(g)/(r*e*l))/t]},a}(s/G(v*f*c),1/(s*G(v*f*c)),f,c,v)}function Ze(){var n=65*k,e=60*k,t=20,o=200,i=r.geoProjectionMutator(Ye),u=i(n,e,t,o);return u.poleline=function(r){return arguments.length?i(n=+r*k,e,t,o):n*S},u.parallels=function(r){return arguments.length?i(n,e=+r*k,t,o):e*S},u.inflation=function(r){return arguments.length?i(n,e,t=+r,o):t},u.ratio=function(r){return arguments.length?i(n,e,t,o=+r):o},u.scale(163.775)}De.invert=function(n,r){var e=r/1.70711,t=h(R*e);return[n/(.74482-.34588*t*t),2*o(e)]},Oe.invert=function(n,r){if(t(r)<w)return[n,0];if(t(n)<w)return[0,P*h(2*o(r/m))];var e=(n/=m)*n,i=(r/=m)*r,a=e+i,c=a*a,f=-t(r)*(1+a),l=f-2*i+e,g=-2*f+1+2*i+c,v=i/g+(2*l*l*l/(g*g*g)-9*f*l/(g*g))/27,s=(f-l*l/(3*g))/g,d=2*G(-s/3),y=x(3*v/(s*d))/3;return[m*(a-1+G(1+2*(e-i)+c))/(2*n),p(r)*m*(-d*u(y+m/3)-l/(3*g))]},Ue.invert=function(n,r){if(!n)return[0,P*h(2*o(r/m))];var e=t(n/m),u=(1-e*e-(r/=m)*r)/(2*e),a=G(u*u+1);return[p(n)*m*(a-u),p(r)*P*h(2*i(G((1-2*u*e)*(u+a)-e),G(a+u+e)))]},Je.invert=function(n,r){if(!r)return[n,0];var e=r/m,t=(m*m*(1-e*e)-n*n)/(2*m*n);return[n?m*(p(n)*G(t*t+1)-t):0,P*h(2*o(e))]},Xe.invert=function(n,r){var e;if(!n||!r)return[n,r];r/=m;var o=p(n)*n/P,i=(o*o-1+4*r*r)/t(o),u=i*i,a=2*r,c=50;do{var f=a*a,l=(8*a-f*(f+2)-5)/(2*f*(a-1)),g=(3*a-f*a-10)/(2*f*a),v=l*l,s=a*l,h=a+l,d=h*h,y=a+3*l,R=-2*h*(4*s*v+(1-4*f+3*f*f)*(1+g)+v*(14*f-6-u+(8*f-8-2*u)*g)+s*(12*f-8+(10*f-10-u)*g)),b=G(d*(f+v*u-1)+(1-f)*(f*(y*y+4*v)+v*(12*s+4*v)));a-=e=(i*(d+v-1)+2*b-o*(4*d+u))/(i*(2*l*g+2*h*(1+g))+R/b-8*h*(i*(-1+v+d)+2*b)*(1+g)/(u+4*d))}while(e>w&&--c>0);return[p(n)*(G(i*i+4)+i)*m/4,P*a]};var $e=4*m+3*G(3),nt=2*G(2*m*G(3)/$e),rt=O(nt*G(3)/m,nt,$e/6);function et(n,r){return[n*G(1-3*r*r/(m*m)),r]}function tt(n,r){var e=u(r),t=u(n)*e,o=1-t,a=u(n=i(h(n)*e,-h(r))),c=h(n);return[c*(e=G(1-t*t))-a*o,-a*e-c*o]}function ot(n,r){var e=z(n,r);return[(e[0]+n/P)/2,(e[1]+r)/2]}et.invert=function(n,r){return[n/G(1-3*r*r/(m*m)),r]},tt.invert=function(n,r){var e=(n*n+r*r)/-2,t=G(-e*(2+e)),o=r*e+n*t,u=n*e-r*t,a=G(u*u+o*o);return[i(t*o,a*(1+e)),a?-A(t*u/a):0]},ot.invert=function(n,r){var e=n,o=r,i=25;do{var a,c=u(o),f=h(o),l=h(2*o),g=f*f,v=c*c,s=h(e),p=u(e/2),d=h(e/2),y=d*d,m=1-v*p*p,R=m?x(c*p)*G(a=1/m):a=0,b=.5*(2*R*c*d+e/P)-n,j=.5*(R*f+o)-r,M=.5*a*(v*y+R*c*p*g)+.5/P,E=a*(s*l/4-R*f*d),S=.125*a*(l*d-R*f*v*s),k=.5*a*(g*p+R*y*c)+.5,A=E*S-k*M,C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]},n.geoNaturalEarth=r.geoNaturalEarth1,n.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,n.geoAiry=function(){var n=P,e=r.geoProjectionMutator(F),t=e(n);return t.radius=function(r){return arguments.length?e(n=r*k):n*S},t.scale(179.976).clipAngle(147)},n.geoAiryRaw=F,n.geoAitoff=function(){return r.geoProjection(z).scale(152.63)},n.geoAitoffRaw=z,n.geoArmadillo=function(){var n=20*k,e=n>=0?1:-1,t=d(e*n),o=r.geoProjectionMutator(L),a=o(n),c=a.stream;return a.parallel=function(r){return arguments.length?(t=d((e=(n=r*k)>=0?1:-1)*n),o(n)):n*S},a.stream=function(r){var o=a.rotate(),f=c(r),l=(a.rotate([0,0]),c(r)),g=a.precision();return a.rotate(o),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=-180*e;e*r<180;r+=90*e)l.point(r,90*e);if(n)for(;e*(r-=3*e*g)>=-180;)l.point(r,e*-i(u(r*k/2),t)*S);l.lineEnd(),l.polygonEnd()},f},a.scale(218.695).center([0,28.0974])},n.geoArmadilloRaw=L,n.geoAugust=function(){return r.geoProjection(H).scale(66.1603)},n.geoAugustRaw=H,n.geoBaker=function(){return r.geoProjection(W).scale(112.314)},n.geoBakerRaw=W,n.geoBerghaus=function(){var n=5,e=r.geoProjectionMutator(I),t=e(n),o=t.stream,a=-u(.01*k),c=h(.01*k);return t.lobes=function(r){return arguments.length?e(n=+r):n},t.stream=function(r){var e=t.rotate(),f=o(r),l=(t.rotate([0,0]),o(r));return t.rotate(e),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=0,e=360/n,t=2*m/n,o=90-180/n,f=P;r<n;++r,o-=e,f-=t)l.point(i(c*u(f),a)*S,A(c*h(f))*S),o<-90?(l.point(-90,-180-o-.01),l.point(-90,-180-o+.01)):(l.point(90,o+.01),l.point(90,o-.01));l.lineEnd(),l.polygonEnd()},f},t.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},n.geoBerghausRaw=I,n.geoBertin1953=function(){return r.geoProjection(_()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},n.geoBertin1953Raw=_,n.geoBoggs=function(){return r.geoProjection(Y).scale(160.857)},n.geoBoggsRaw=Y,n.geoBonne=function(){return Z(nn).scale(123.082).center([0,26.1441]).parallel(45)},n.geoBonneRaw=nn,n.geoBottomley=function(){var n=.5,e=r.geoProjectionMutator(rn),t=e(n);return t.fraction=function(r){return arguments.length?e(n=+r):n},t.scale(158.837)},n.geoBottomleyRaw=rn,n.geoBromley=function(){return r.geoProjection(en).scale(152.63)},n.geoBromleyRaw=en,n.geoChamberlin=fn,n.geoChamberlinRaw=an,n.geoChamberlinAfrica=function(){return fn([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},n.geoCollignon=function(){return r.geoProjection(ln).scale(95.6464).center([0,30])},n.geoCollignonRaw=ln,n.geoCraig=function(){return Z(gn).scale(249.828).clipAngle(90)},n.geoCraigRaw=gn,n.geoCraster=function(){return r.geoProjection(sn).scale(156.19)},n.geoCrasterRaw=sn,n.geoCylindricalEqualArea=function(){return Z(pn).parallel(38.58).scale(195.044)},n.geoCylindricalEqualAreaRaw=pn,n.geoCylindricalStereographic=function(){return Z(hn).scale(124.75)},n.geoCylindricalStereographicRaw=hn,n.geoEckert1=function(){return r.geoProjection(dn).scale(165.664)},n.geoEckert1Raw=dn,n.geoEckert2=function(){return r.geoProjection(wn).scale(165.664)},n.geoEckert2Raw=wn,n.geoEckert3=function(){return r.geoProjection(yn).scale(180.739)},n.geoEckert3Raw=yn,n.geoEckert4=function(){return r.geoProjection(mn).scale(180.739)},n.geoEckert4Raw=mn,n.geoEckert5=function(){return r.geoProjection(Pn).scale(173.044)},n.geoEckert5Raw=Pn,n.geoEckert6=function(){return r.geoProjection(Rn).scale(173.044)},n.geoEckert6Raw=Rn,n.geoEisenlohr=function(){return r.geoProjection(jn).scale(62.5271)},n.geoEisenlohrRaw=jn,n.geoFahey=function(){return r.geoProjection(En).scale(137.152)},n.geoFaheyRaw=En,n.geoFoucaut=function(){return r.geoProjection(Sn).scale(135.264)},n.geoFoucautRaw=Sn,n.geoFoucautSinusoidal=function(){var n=.5,e=r.geoProjectionMutator(kn),t=e(n);return t.alpha=function(r){return arguments.length?e(n=+r):n},t.scale(168.725)},n.geoFoucautSinusoidalRaw=kn,n.geoGilbert=function(n){null==n&&(n=r.geoOrthographic);var e=n(),t=r.geoEquirectangular().scale(S).precision(0).clipAngle(null).translate([0,0]);function o(n){return e(An(n))}function i(n){o[n]=function(){return arguments.length?(e[n].apply(e,arguments),o):e[n]()}}return e.invert&&(o.invert=function(n){return xn(e.invert(n))}),o.stream=function(n){var r=e.stream(n),o=t.stream({point:function(n,e){r.point(n/2,A(d(-e/2*k))*S)},lineStart:function(){r.lineStart()},lineEnd:function(){r.lineEnd()},polygonStart:function(){r.polygonStart()},polygonEnd:function(){r.polygonEnd()}});return o.sphere=r.sphere,o},o.rotate=function(n){return arguments.length?(t.rotate(n),o):t.rotate()},o.center=function(n){return arguments.length?(e.center(An(n)),o):xn(e.center())},i("angle"),i("clipAngle"),i("clipExtent"),i("fitExtent"),i("fitHeight"),i("fitSize"),i("fitWidth"),i("scale"),i("translate"),i("precision"),o.scale(249.5)},n.geoGingery=function(){var n=6,e=30*k,t=u(e),o=h(e),a=r.geoProjectionMutator(Gn),c=a(e,n),f=c.stream,l=-u(.01*k),g=h(.01*k);return c.radius=function(r){return arguments.length?(t=u(e=r*k),o=h(e),a(e,n)):e*S},c.lobes=function(r){return arguments.length?a(e,n=+r):n},c.stream=function(r){var e=c.rotate(),a=f(r),v=(c.rotate([0,0]),f(r));return c.rotate(e),a.sphere=function(){v.polygonStart(),v.lineStart();for(var r=0,e=2*m/n,a=0;r<n;++r,a-=e)v.point(i(g*u(a),l)*S,A(g*h(a))*S),v.point(i(o*u(a-e/2),t)*S,A(o*h(a-e/2))*S);v.lineEnd(),v.polygonEnd()},a},c.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},n.geoGingeryRaw=Gn,n.geoGinzburg4=function(){return r.geoProjection(zn).scale(149.995)},n.geoGinzburg4Raw=zn,n.geoGinzburg5=function(){return r.geoProjection(Ln).scale(153.93)},n.geoGinzburg5Raw=Ln,n.geoGinzburg6=function(){return r.geoProjection(Hn).scale(130.945)},n.geoGinzburg6Raw=Hn,n.geoGinzburg8=function(){return r.geoProjection(qn).scale(131.747)},n.geoGinzburg8Raw=qn,n.geoGinzburg9=function(){return r.geoProjection(Bn).scale(131.087)},n.geoGinzburg9Raw=Bn,n.geoGringorten=function(){return r.geoProjection(Wn(In)).scale(239.75)},n.geoGringortenRaw=In,n.geoGuyou=function(){return r.geoProjection(Wn(Tn)).scale(151.496)},n.geoGuyouRaw=Tn,n.geoHammer=function(){var n=2,e=r.geoProjectionMutator(D),t=e(n);return t.coefficient=function(r){return arguments.length?e(n=+r):n},t.scale(169.529)},n.geoHammerRaw=D,n.geoHammerRetroazimuthal=function(){var n=0,e=r.geoProjectionMutator(Vn),t=e(n),o=t.rotate,i=t.stream,u=r.geoCircle();return t.parallel=function(r){if(!arguments.length)return n*S;var o=t.rotate();return e(n=r*k).rotate(o)},t.rotate=function(r){return arguments.length?(o.call(t,[r[0],r[1]-n*S]),u.center([-r[0],-r[1]]),t):((r=o.call(t))[1]+=n*S,r)},t.stream=function(n){return(n=i(n)).sphere=function(){n.polygonStart();var r,e=u.radius(89.99)().coordinates[0],t=e.length-1,o=-1;for(n.lineStart();++o<t;)n.point((r=e[o])[0],r[1]);for(n.lineEnd(),t=(e=u.radius(90.01)().coordinates[0]).length-1,n.lineStart();--o>=0;)n.point((r=e[o])[0],r[1]);n.lineEnd(),n.polygonEnd()},n},t.scale(79.4187).parallel(45).clipAngle(179.999)},n.geoHammerRetroazimuthalRaw=Vn,n.geoHealpix=function(){var n=4,t=r.geoProjectionMutator(Un),o=t(n),i=o.stream;return o.lobes=function(r){return arguments.length?t(n=+r):n},o.stream=function(t){var u=o.rotate(),a=i(t),c=(o.rotate([0,0]),i(t));return o.rotate(u),a.sphere=function(){var t,o;r.geoStream((t=180/n,o=[].concat(e.range(-180,180+t/2,t).map(Jn),e.range(180,-180-t/2,-t).map(Xn)),{type:"Polygon",coordinates:[180===t?o.map(Yn):o]}),c)},a},o.scale(239.75)},n.geoHealpixRaw=Un,n.geoHill=function(){var n=1,e=r.geoProjectionMutator(Zn),t=e(n);return t.ratio=function(r){return arguments.length?e(n=+r):n},t.scale(167.774).center([0,18.67])},n.geoHillRaw=Zn,n.geoHomolosine=function(){return r.geoProjection(er).scale(152.63)},n.geoHomolosineRaw=er,n.geoHufnagel=function(){var n=1,e=0,t=45*k,o=2,i=r.geoProjectionMutator(tr),u=i(n,e,t,o);return u.a=function(r){return arguments.length?i(n=+r,e,t,o):n},u.b=function(r){return arguments.length?i(n,e=+r,t,o):e},u.psiMax=function(r){return arguments.length?i(n,e,t=+r*k,o):t*S},u.ratio=function(r){return arguments.length?i(n,e,t,o=+r):o},u.scale(180.739)},n.geoHufnagelRaw=tr,n.geoHyperelliptical=function(){var n=0,e=2.5,t=1.183136,o=r.geoProjectionMutator(ir),i=o(n,e,t);return i.alpha=function(r){return arguments.length?o(n=+r,e,t):n},i.k=function(r){return arguments.length?o(n,e=+r,t):e},i.gamma=function(r){return arguments.length?o(n,e,t=+r):t},i.scale(152.63)},n.geoHyperellipticalRaw=ir,n.geoInterrupt=cr,n.geoInterruptedBoggs=function(){return cr(Y,fr).scale(160.857)},n.geoInterruptedHomolosine=function(){return cr(er,lr).scale(152.63)},n.geoInterruptedMollweide=function(){return cr(U,gr).scale(169.529)},n.geoInterruptedMollweideHemispheres=function(){return cr(U,vr).scale(169.529).rotate([20,0])},n.geoInterruptedSinuMollweide=function(){return cr(rr,sr,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoInterruptedSinusoidal=function(){return cr($,pr).scale(152.63).rotate([-20,0])},n.geoKavrayskiy7=function(){return r.geoProjection(hr).scale(158.837)},n.geoKavrayskiy7Raw=hr,n.geoLagrange=function(){var n=.5,e=r.geoProjectionMutator(dr),t=e(n);return t.spacing=function(r){return arguments.length?e(n=+r):n},t.scale(124.75)},n.geoLagrangeRaw=dr,n.geoLarrivee=function(){return r.geoProjection(yr).scale(97.2672)},n.geoLarriveeRaw=yr,n.geoLaskowski=function(){return r.geoProjection(mr).scale(139.98)},n.geoLaskowskiRaw=mr,n.geoLittrow=function(){return r.geoProjection(Pr).scale(144.049).clipAngle(89.999)},n.geoLittrowRaw=Pr,n.geoLoximuthal=function(){return Z(Rr).parallel(40).scale(158.837)},n.geoLoximuthalRaw=Rr,n.geoMiller=function(){return r.geoProjection(br).scale(108.318)},n.geoMillerRaw=br,n.geoModifiedStereographic=xr,n.geoModifiedStereographicRaw=jr,n.geoModifiedStereographicAlaska=function(){return xr(Mr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},n.geoModifiedStereographicGs48=function(){return xr(Er,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},n.geoModifiedStereographicGs50=function(){return xr(Sr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},n.geoModifiedStereographicMiller=function(){return xr(kr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},n.geoModifiedStereographicLee=function(){return xr(Ar,[165,10]).scale(250).clipAngle(130).center([-165,-10])},n.geoMollweide=function(){return r.geoProjection(U).scale(169.529)},n.geoMollweideRaw=U,n.geoMtFlatPolarParabolic=function(){return r.geoProjection(Nr).scale(164.859)},n.geoMtFlatPolarParabolicRaw=Nr,n.geoMtFlatPolarQuartic=function(){return r.geoProjection(Fr).scale(188.209)},n.geoMtFlatPolarQuarticRaw=Fr,n.geoMtFlatPolarSinusoidal=function(){return r.geoProjection(zr).scale(166.518)},n.geoMtFlatPolarSinusoidalRaw=zr,n.geoNaturalEarth2=function(){return r.geoProjection(Lr).scale(175.295)},n.geoNaturalEarth2Raw=Lr,n.geoNellHammer=function(){return r.geoProjection(Hr).scale(152.63)},n.geoNellHammerRaw=Hr,n.geoInterruptedQuarticAuthalic=function(){return cr(D(1/0),qr).rotate([20,0]).scale(152.63)},n.geoNicolosi=function(){return r.geoProjection(Br).scale(127.267)},n.geoNicolosiRaw=Br,n.geoPatterson=function(){return r.geoProjection(Or).scale(139.319)},n.geoPattersonRaw=Or,n.geoPolyconic=function(){return r.geoProjection(Ur).scale(103.74)},n.geoPolyconicRaw=Ur,n.geoPolyhedral=$r,n.geoPolyhedralButterfly=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(101.858).center([0,45])},n.geoPolyhedralCollignon=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoProjection(ie).translate([0,0]).scale(1).rotate(e[1]>0?[-e[0],0]:[180-e[0],180])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},n.geoPolyhedralWaterman=function(n){n=n||function(n){var e=6===n.length?r.geoCentroid({type:"MultiPoint",coordinates:n}):n[0];return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=te.map(function(n){for(var r,e=n.map(ce),t=e.length,o=e[t-1],i=[],u=0;u<t;++u)r=e[u],i.push(ae([.9486832980505138*o[0]+.31622776601683794*r[0],.9486832980505138*o[1]+.31622776601683794*r[1],.9486832980505138*o[2]+.31622776601683794*r[2]]),ae([.9486832980505138*r[0]+.31622776601683794*o[0],.9486832980505138*r[1]+.31622776601683794*o[1],.9486832980505138*r[2]+.31622776601683794*o[2]])),o=r;return i}),t=[],o=[-1,0,0,1,0,1,4,5];e.forEach(function(n,r){for(var i,u,a=te[r],c=a.length,f=t[r]=[],l=0;l<c;++l)e.push([a[l],n[(2*l+2)%(2*c)],n[(2*l+1)%(2*c)]]),o.push(r),f.push((i=ce(n[(2*l+2)%(2*c)]),u=ce(n[(2*l+1)%(2*c)]),[i[1]*u[2]-i[2]*u[1],i[2]*u[0]-i[0]*u[2],i[0]*u[1]-i[1]*u[0]]))});var i=e.map(function(r){return{project:n(r),face:r}});return o.forEach(function(n,r){var e=i[n];e&&(e.children||(e.children=[])).push(i[r])}),$r(i[0],function(n,r){var e=u(r),o=[e*u(n),e*h(n),h(r)],a=n<-m/2?r<0?6:4:n<0?r<0?2:0:n<m/2?r<0?3:1:r<0?7:5,c=t[a];return i[ue(c[0],o)<0?8+3*a:ue(c[1],o)<0?8+3*a+1:ue(c[2],o)<0?8+3*a+2:a]}).angle(-30).scale(110.625).center([0,45])},n.geoProject=function(n,r){var e,t=r.stream;if(!t)throw new Error("invalid projection");switch(n&&n.type){case"Feature":e=ge;break;case"FeatureCollection":e=le;break;default:e=ve}return e(n,t)},n.geoGringortenQuincuncial=function(){return ye(In).scale(176.423)},n.geoPeirceQuincuncial=me,n.geoPierceQuincuncial=me,n.geoQuantize=function(n,r){if(!(0<=(r=+r)&&r<=20))throw new Error("invalid digits");function e(n){var e=n.length,t=2,o=new Array(e);for(o[0]=+n[0].toFixed(r),o[1]=+n[1].toFixed(r);t<e;)o[t]=n[t],++t;return o}function t(n){return n.map(e)}function o(n){for(var r=e(n[0]),t=[r],o=1;o<n.length;o++){var i=e(n[o]);(i.length>2||i[0]!=r[0]||i[1]!=r[1])&&(t.push(i),r=i)}return 1===t.length&&n.length>1&&t.push(e(n[n.length-1])),t}function i(n){return n.map(o)}function u(n){if(null==n)return n;var r;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(u)};break;case"Point":r={type:"Point",coordinates:e(n.coordinates)};break;case"MultiPoint":r={type:n.type,coordinates:t(n.coordinates)};break;case"LineString":r={type:n.type,coordinates:o(n.coordinates)};break;case"MultiLineString":case"Polygon":r={type:n.type,coordinates:i(n.coordinates)};break;case"MultiPolygon":r={type:"MultiPolygon",coordinates:n.coordinates.map(i)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function a(n){var r={type:"Feature",properties:n.properties,geometry:u(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),r}if(null!=n)switch(n.type){case"Feature":return a(n);case"FeatureCollection":var c={type:"FeatureCollection",features:n.features.map(a)};return null!=n.bbox&&(c.bbox=n.bbox),c;default:return u(n)}return n},n.geoQuincuncial=ye,n.geoRectangularPolyconic=function(){return Z(Pe).scale(131.215)},n.geoRectangularPolyconicRaw=Pe,n.geoRobinson=function(){return r.geoProjection(be).scale(152.63)},n.geoRobinsonRaw=be,n.geoSatellite=function(){var n=2,e=0,t=r.geoProjectionMutator(je),o=t(n,e);return o.distance=function(r){return arguments.length?t(n=+r,e):n},o.tilt=function(r){return arguments.length?t(n,e=r*k):e*S},o.scale(432.147).clipAngle(x(1/n)*S-1e-6)},n.geoSatelliteRaw=je,n.geoSinuMollweide=function(){return r.geoProjection(rr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoSinuMollweideRaw=rr,n.geoSinusoidal=function(){return r.geoProjection($).scale(152.63)},n.geoSinusoidalRaw=$,n.geoStitch=function(n){if(null==n)return n;switch(n.type){case"Feature":return We(n);case"FeatureCollection":var r={type:"FeatureCollection",features:n.features.map(We)};return null!=n.bbox&&(r.bbox=n.bbox),r;default:return Ie(n)}},n.geoTimes=function(){return r.geoProjection(De).scale(146.153)},n.geoTimesRaw=De,n.geoTwoPointAzimuthal=Ve,n.geoTwoPointAzimuthalRaw=Te,n.geoTwoPointAzimuthalUsa=function(){return Ve([-158,21.5],[-77,39]).clipAngle(60).scale(400)},n.geoTwoPointEquidistant=Ke,n.geoTwoPointEquidistantRaw=_e,n.geoTwoPointEquidistantUsa=function(){return Ke([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},n.geoVanDerGrinten=function(){return r.geoProjection(Oe).scale(79.4183)},n.geoVanDerGrintenRaw=Oe,n.geoVanDerGrinten2=function(){return r.geoProjection(Ue).scale(79.4183)},n.geoVanDerGrinten2Raw=Ue,n.geoVanDerGrinten3=function(){return r.geoProjection(Je).scale(79.4183)},n.geoVanDerGrinten3Raw=Je,n.geoVanDerGrinten4=function(){return r.geoProjection(Xe).scale(127.16)},n.geoVanDerGrinten4Raw=Xe,n.geoWagner=Ze,n.geoWagner7=function(){return Ze().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},n.geoWagnerRaw=Ye,n.geoWagner4=function(){return r.geoProjection(rt).scale(176.84)},n.geoWagner4Raw=rt,n.geoWagner6=function(){return r.geoProjection(et).scale(152.63)},n.geoWagner6Raw=et,n.geoWiechel=function(){return r.geoProjection(tt).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},n.geoWiechelRaw=tt,n.geoWinkel3=function(){return r.geoProjection(ot).scale(158.837)},n.geoWinkel3Raw=ot,Object.defineProperty(n,"__esModule",{value:!0})}); |
{ | ||
"name": "d3-geo-projection", | ||
"version": "2.8.1", | ||
"version": "2.9.0", | ||
"description": "Extended geographic projections for d3-geo.", | ||
@@ -57,3 +57,3 @@ "keywords": [ | ||
"d3-array": "1", | ||
"d3-geo": "^1.10.0", | ||
"d3-geo": "^1.12.0", | ||
"resolve": "^1.1.10" | ||
@@ -60,0 +60,0 @@ }, |
@@ -26,5 +26,5 @@ import {geoProjectionMutator as projectionMutator} from "d3-geo"; | ||
sinz_2 = sin(z_2), | ||
tanz_2 = tan(z_2), | ||
lnsecz_2 = log(1 / cosz_2); | ||
z -= delta = (2 / tanz_2 * lnsecz_2 - b * tanz_2 - r) / (-lnsecz_2 / (sinz_2 * sinz_2) + 1 - b / (2 * cosz_2 * cosz_2)); | ||
tanz_2 = sinz_2 / cosz_2, | ||
lnsecz_2 = -log(abs(cosz_2)); | ||
z -= delta = (2 / tanz_2 * lnsecz_2 - b * tanz_2 - r) / (-lnsecz_2 / (sinz_2 * sinz_2) + 1 - b / (2 * cosz_2 * cosz_2)) * (cosz_2 < 0 ? 0.7 : 1); | ||
} while (abs(delta) > epsilon && --i > 0); | ||
@@ -31,0 +31,0 @@ var sinz = sin(z); |
@@ -39,2 +39,3 @@ import {geoProjectionMutator as projectionMutator} from "d3-geo"; | ||
dPhi = (fx * dydLambda - fy * dxdLambda) / denominator; | ||
if (abs(dPhi) > 2) dPhi /= 2; | ||
lambda -= dLambda, phi -= dPhi; | ||
@@ -41,0 +42,0 @@ } while ((abs(dLambda) > epsilon || abs(dPhi) > epsilon) && --i > 0); |
@@ -31,3 +31,3 @@ import {geoProjection as projection} from "d3-geo"; | ||
df0dLambda = 0.5 * (1 + sqrtcosPhi), | ||
df1dPhi = (1 +0.5 * phi * sinPhi_2 / cosPhi_2) / (cosPhi_2 * cosLambda_6), | ||
df1dPhi = (1 + 0.5 * phi * sinPhi_2 / cosPhi_2) / (cosPhi_2 * cosLambda_6), | ||
df1dLambda = (phi / cosPhi_2) * (sinLambda_6 / 6) / (cosLambda_6 * cosLambda_6), | ||
@@ -34,0 +34,0 @@ denom = df0dPhi * df1dLambda - df1dPhi * df0dLambda, |
@@ -27,3 +27,3 @@ import {geoProjection as projection} from "d3-geo"; | ||
return [ | ||
(abs(y) < abs(phi + 1 / tanPhi) ? asin(x * tanPhi) : sign(x) * (acos(abs(x * tanPhi)) + halfPi)) / sin(phi), | ||
(abs(y) < abs(phi + 1 / tanPhi) ? asin(x * tanPhi) : sign(y) * sign(x) * (acos(abs(x * tanPhi)) + halfPi)) / sin(phi), | ||
phi | ||
@@ -30,0 +30,0 @@ ]; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
464955
9216
Updatedd3-geo@^1.12.0