/** * Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2. * Original file: /npm/d3-geo@3.1.1/src/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ import{Adder as n,merge as t,range as r}from"../d3-array@3.2.4/e95f898e.js";var i=1e-6,e=1e-12,o=Math.PI,u=o/2,a=o/4,c=2*o,l=180/o,f=o/180,s=Math.abs,p=Math.atan,h=Math.atan2,g=Math.cos,v=Math.ceil,d=Math.exp,E=Math.hypot,y=Math.log,S=Math.pow,m=Math.sin,M=Math.sign||function(n){return n>0?1:n<0?-1:0},w=Math.sqrt,x=Math.tan;function _(n){return n>1?0:n<-1?o:Math.acos(n)}function N(n){return n>1?u:n<-1?-u:Math.asin(n)}function R(n){return(n=m(n/2))*n}function C(){}function P(n,t){n&&$.hasOwnProperty(n.type)&&$[n.type](n,t)}var A={Feature:function(n,t){P(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i=0?1:-1,e=i*r,o=g(t=(t*=f)/2+a),u=m(t),c=T*u,l=O*o+c*g(e),s=c*i*m(e);J.add(h(s,l)),G=n,O=o,T=u}function en(t){return K=new n,j(t,Q),2*K}function on(n){return[h(n[1],n[0]),N(n[2])]}function un(n){var t=n[0],r=n[1],i=g(r);return[i*g(t),i*m(t),m(r)]}function an(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function cn(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ln(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function fn(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function sn(n){var t=w(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}var pn,hn,gn,vn,dn,En,yn,Sn,mn,Mn,wn,xn,_n,Nn,Rn,Cn,Pn={point:An,lineStart:qn,lineEnd:zn,polygonStart:function(){Pn.point=jn,Pn.lineStart=Ln,Pn.lineEnd=bn,D=new n,Q.polygonStart()},polygonEnd:function(){Q.polygonEnd(),Pn.point=An,Pn.lineStart=qn,Pn.lineEnd=zn,J<0?(k=-(H=180),F=-(I=90)):D>i?I=90:D<-i&&(F=-90),Z[0]=k,Z[1]=H},sphere:function(){k=-(H=180),F=-(I=90)}};function An(n,t){U.push(Z=[k=n,H=n]),tI&&(I=t)}function $n(n,t){var r=un([n*f,t*f]);if(B){var i=cn(B,r),e=cn([i[1],-i[0],0],i);sn(e),e=on(e);var o,u=n-W,a=u>0?1:-1,c=e[0]*l*a,p=s(u)>180;p^(a*WI&&(I=o):p^(a*W<(c=(c+360)%360-180)&&cI&&(I=t)),p?nGn(k,H)&&(H=n):Gn(n,H)>Gn(k,H)&&(k=n):H>=k?(nH&&(H=n)):n>W?Gn(k,n)>Gn(k,H)&&(H=n):Gn(n,H)>Gn(k,H)&&(k=n)}else U.push(Z=[k=n,H=n]);tI&&(I=t),B=r,W=n}function qn(){Pn.point=$n}function zn(){Z[0]=k,Z[1]=H,Pn.point=An,B=null}function jn(n,t){if(B){var r=n-W;D.add(s(r)>180?r+(r>0?360:-360):r)}else X=n,Y=t;Q.point(n,t),$n(n,t)}function Ln(){Q.lineStart()}function bn(){jn(X,Y),Q.lineEnd(),s(D)>i&&(k=-(H=180)),Z[0]=k,Z[1]=H,B=null}function Gn(n,t){return(t-=n)<0?t+360:t}function On(n,t){return n[0]-t[0]}function Tn(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tGn(i[0],i[1])&&(i[1]=e[1]),Gn(e[0],i[1])>Gn(i[0],i[1])&&(i[0]=e[0])):o.push(i=e);for(u=-1/0,t=0,i=o[r=o.length-1];t<=r;i=e,++t)e=o[t],(a=Gn(i[1],e[0]))>u&&(u=a,k=e[0],H=i[1])}return U=Z=null,k===1/0||F===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,F],[H,I]]}var Fn={sphere:C,point:Hn,lineStart:Wn,lineEnd:Bn,polygonStart:function(){Fn.lineStart=Dn,Fn.lineEnd=Un},polygonEnd:function(){Fn.lineStart=Wn,Fn.lineEnd=Bn}};function Hn(n,t){n*=f;var r=g(t*=f);In(r*g(n),r*m(n),m(t))}function In(n,t,r){++pn,gn+=(n-gn)/pn,vn+=(t-vn)/pn,dn+=(r-dn)/pn}function Wn(){Fn.point=Xn}function Xn(n,t){n*=f;var r=g(t*=f);Nn=r*g(n),Rn=r*m(n),Cn=m(t),Fn.point=Yn,In(Nn,Rn,Cn)}function Yn(n,t){n*=f;var r=g(t*=f),i=r*g(n),e=r*m(n),o=m(t),u=h(w((u=Rn*o-Cn*e)*u+(u=Cn*i-Nn*o)*u+(u=Nn*e-Rn*i)*u),Nn*i+Rn*e+Cn*o);hn+=u,En+=u*(Nn+(Nn=i)),yn+=u*(Rn+(Rn=e)),Sn+=u*(Cn+(Cn=o)),In(Nn,Rn,Cn)}function Bn(){Fn.point=Hn}function Dn(){Fn.point=Zn}function Un(){Jn(xn,_n),Fn.point=Hn}function Zn(n,t){xn=n,_n=t,n*=f,t*=f,Fn.point=Jn;var r=g(t);Nn=r*g(n),Rn=r*m(n),Cn=m(t),In(Nn,Rn,Cn)}function Jn(n,t){n*=f;var r=g(t*=f),i=r*g(n),e=r*m(n),o=m(t),u=Rn*o-Cn*e,a=Cn*i-Nn*o,c=Nn*e-Rn*i,l=E(u,a,c),s=N(l),p=l&&-s/l;mn.add(p*u),Mn.add(p*a),wn.add(p*c),hn+=s,En+=s*(Nn+(Nn=i)),yn+=s*(Rn+(Rn=e)),Sn+=s*(Cn+(Cn=o)),In(Nn,Rn,Cn)}function Kn(t){pn=hn=gn=vn=dn=En=yn=Sn=0,mn=new n,Mn=new n,wn=new n,j(t,Fn);var r=+mn,o=+Mn,u=+wn,a=E(r,o,u);return ao&&(n-=Math.round(n/c)*c),[n,t]}function tt(n,t,r){return(n%=c)?t||r?Vn(it(n),et(t,r)):it(n):t||r?et(t,r):nt}function rt(n){return function(t,r){return s(t+=n)>o&&(t-=Math.round(t/c)*c),[t,r]}}function it(n){var t=rt(n);return t.invert=rt(-n),t}function et(n,t){var r=g(n),i=m(n),e=g(t),o=m(t);function u(n,t){var u=g(t),a=g(n)*u,c=m(n)*u,l=m(t),f=l*r+a*i;return[h(c*e-f*o,a*r-l*i),N(f*e+c*o)]}return u.invert=function(n,t){var u=g(t),a=g(n)*u,c=m(n)*u,l=m(t),f=l*e-c*o;return[h(c*e+l*o,a*r+f*i),N(f*r-a*i)]},u}function ot(n){function t(t){return(t=n(t[0]*f,t[1]*f))[0]*=l,t[1]*=l,t}return n=tt(n[0]*f,n[1]*f,n.length>2?n[2]*f:0),t.invert=function(t){return(t=n.invert(t[0]*f,t[1]*f))[0]*=l,t[1]*=l,t},t}function ut(n,t,r,i,e,o){if(r){var u=g(t),a=m(t),l=i*r;null==e?(e=t+i*c,o=t-l/2):(e=at(u,e),o=at(u,o),(i>0?eo)&&(e+=i*c));for(var f,s=e;i>0?s>o:s1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function ft(n,t){return s(n[0]-t[0])=0;--u)o.point((s=f[u])[0],s[1]);else e(h.x,h.p.x,-1,o);h=h.p}f=(h=h.o).z,g=!g}while(!h.v);o.lineEnd()}}}function ht(n){if(t=n.length){for(var t,r,i=0,e=n[0];++i=0?1:-1,O=G*b,T=O>o,k=C*j;if(E.add(h(k*G*m(O),P*L+k*g(O))),v+=T?b+G*c:b,T^_>=l^q>=l){var F=cn(un(x),un($));sn(F);var H=cn(p,F);sn(H);var I=(T^b>=0?-1:1)*N(H[2]);(f>I||f===I&&(F[0]||F[1]))&&(d+=T^b>=0?1:-1)}}return(v<-i||v0){for(p||(o.polygonStart(),p=!0),o.lineStart(),n=0;n1&&2&e&&l.push(l.pop().concat(l.shift())),a.push(l.filter(Et))}return h}}function Et(n){return n.length>1}function yt(n,t){return((n=n.x)[0]<0?n[1]-u-i:u-n[1])-((t=t.x)[0]<0?t[1]-u-i:u-t[1])}nt.invert=nt;var St=dt((function(){return!0}),(function(n){var t,r=NaN,e=NaN,a=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(c,l){var f=c>0?o:-o,h=s(c-r);s(h-o)0?u:-u),n.point(a,e),n.lineEnd(),n.lineStart(),n.point(f,e),n.point(c,e),t=0):a!==f&&h>=o&&(s(r-a)i?p((m(t)*(u=g(e))*m(r)-m(e)*(o=g(t))*m(n))/(o*u*a)):(t+e)/2}(r,e,c,l),n.point(a,e),n.lineEnd(),n.lineStart(),n.point(f,e),t=0),n.point(r=c,e=l),a=f},lineEnd:function(){n.lineEnd(),r=e=NaN},clean:function(){return 2-t}}}),(function(n,t,r,e){var a;if(null==n)a=r*u,e.point(-o,a),e.point(0,a),e.point(o,a),e.point(o,0),e.point(o,-a),e.point(0,-a),e.point(-o,-a),e.point(-o,0),e.point(-o,a);else if(s(n[0]-t[0])>i){var c=n[0]0,u=s(t)>i;function a(n,r){return g(n)*g(r)>t}function c(n,r,e){var u=[1,0,0],a=cn(un(n),un(r)),c=an(a,a),l=a[0],f=c-l*l;if(!f)return!e&&n;var p=t*c/f,h=-t*l/f,g=cn(u,a),v=fn(u,p);ln(v,fn(a,h));var d=g,E=an(v,d),y=an(d,d),S=E*E-y*(an(v,v)-1);if(!(S<0)){var m=w(S),M=fn(d,(-E-m)/y);if(ln(M,v),M=on(M),!e)return M;var x,_=n[0],N=r[0],R=n[1],C=r[1];N<_&&(x=_,_=N,N=x);var P=N-_,A=s(P-o)0^M[1]<(s(M[0]-_)o^(_<=M[0]&&M[0]<=N)){var $=fn(d,(-E+m)/y);return ln($,v),[M,on($)]}}}function l(t,r){var i=e?n:o-n,u=0;return t<-i?u|=1:t>i&&(u|=2),r<-i?u|=4:r>i&&(u|=8),u}return dt(a,(function(n){var t,r,i,f,s;return{lineStart:function(){f=i=!1,s=1},point:function(p,h){var g,v=[p,h],d=a(p,h),E=e?d?0:l(p,h):d?l(p+(p<0?o:-o),h):0;if(!t&&(f=i=d)&&n.lineStart(),d!==i&&(!(g=c(t,v))||ft(t,g)||ft(v,g))&&(v[2]=1),d!==i)s=0,d?(n.lineStart(),g=c(v,t),n.point(g[0],g[1])):(g=c(t,v),n.point(g[0],g[1],2),n.lineEnd()),t=g;else if(u&&t&&e^d){var y;E&r||!(y=c(v,t,!0))||(s=0,e?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1],3)))}!d||t&&ft(t,v)||n.point(v[0],v[1]),t=v,i=d,r=E},lineEnd:function(){i&&n.lineEnd(),t=null},clean:function(){return s|(f&&i)<<1}}}),(function(t,i,e,o){ut(o,n,r,e,t,i)}),e?[0,-n]:[-o,n-o])}var Mt,wt,xt,_t,Nt=1e9,Rt=-Nt;function Ct(n,r,e,o){function u(t,i){return n<=t&&t<=e&&r<=i&&i<=o}function a(t,i,u,a){var l=0,s=0;if(null==t||(l=c(t,u))!==(s=c(i,u))||f(t,i)<0^u>0)do{a.point(0===l||3===l?n:e,l>1?o:r)}while((l=(l+u+4)%4)!==s);else a.point(i[0],i[1])}function c(t,o){return s(t[0]-n)0?0:3:s(t[0]-e)0?2:1:s(t[1]-r)0?1:0:o>0?3:2}function l(n,t){return f(n.x,t.x)}function f(n,t){var r=c(n,1),i=c(t,1);return r!==i?r-i:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(i){var c,f,s,p,h,g,v,d,E,y,S,m=i,M=lt(),w={point:x,lineStart:function(){w.point=_,f&&f.push(s=[]);y=!0,E=!1,v=d=NaN},lineEnd:function(){c&&(_(p,h),g&&E&&M.rejoin(),c.push(M.result()));w.point=x,E&&m.lineEnd()},polygonStart:function(){m=M,c=[],f=[],S=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=f.length;ro&&(p-e)*(o-u)>(h-u)*(n-e)&&++t:h<=o&&(p-e)*(o-u)<(h-u)*(n-e)&&--t;return t}(),e=S&&r,u=(c=t(c)).length;(e||u)&&(i.polygonStart(),e&&(i.lineStart(),a(null,null,1,i),i.lineEnd()),u&&pt(c,l,r,a,i),i.polygonEnd());m=i,c=f=s=null}};function x(n,t){u(n,t)&&m.point(n,t)}function _(t,i){var a=u(t,i);if(f&&s.push([t,i]),y)p=t,h=i,g=a,y=!1,a&&(m.lineStart(),m.point(t,i));else if(a&&E)m.point(t,i);else{var c=[v=Math.max(Rt,Math.min(Nt,v)),d=Math.max(Rt,Math.min(Nt,d))],l=[t=Math.max(Rt,Math.min(Nt,t)),i=Math.max(Rt,Math.min(Nt,i))];!function(n,t,r,i,e,o){var u,a=n[0],c=n[1],l=0,f=1,s=t[0]-a,p=t[1]-c;if(u=r-a,s||!(u>0)){if(u/=s,s<0){if(u0){if(u>f)return;u>l&&(l=u)}if(u=e-a,s||!(u<0)){if(u/=s,s<0){if(u>f)return;u>l&&(l=u)}else if(s>0){if(u0)){if(u/=p,p<0){if(u0){if(u>f)return;u>l&&(l=u)}if(u=o-c,p||!(u<0)){if(u/=p,p<0){if(u>f)return;u>l&&(l=u)}else if(p>0){if(u0&&(n[0]=a+l*s,n[1]=c+l*p),f<1&&(t[0]=a+f*s,t[1]=c+f*p),!0}}}}}(c,l,n,r,e,o)?a&&(m.lineStart(),m.point(t,i),S=!1):(E||(m.lineStart(),m.point(c[0],c[1])),m.point(l[0],l[1]),a||m.lineEnd(),S=!1)}v=t,d=i,E=a}return w}}function Pt(){var n,t,r,i=0,e=0,o=960,u=500;return r={stream:function(r){return n&&t===r?n:n=Ct(i,e,o,u)(t=r)},extent:function(a){return arguments.length?(i=+a[0][0],e=+a[0][1],o=+a[1][0],u=+a[1][1],n=t=null,r):[[i,e],[o,u]]}}}var At={sphere:C,point:C,lineStart:function(){At.point=qt,At.lineEnd=$t},lineEnd:C,polygonStart:C,polygonEnd:C};function $t(){At.point=At.lineEnd=C}function qt(n,t){wt=n*=f,xt=m(t*=f),_t=g(t),At.point=zt}function zt(n,t){n*=f;var r=m(t*=f),i=g(t),e=s(n-wt),o=g(e),u=i*m(e),a=_t*r-xt*i*o,c=xt*r+_t*i*o;Mt.add(h(w(u*u+a*a),c)),wt=n,xt=r,_t=i}function jt(t){return Mt=new n,j(t,At),+Mt}var Lt=[null,null],bt={type:"LineString",coordinates:Lt};function Gt(n,t){return Lt[0]=n,Lt[1]=t,jt(bt)}var Ot={Feature:function(n,t){return kt(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i0&&(o=Gt(n[u],n[u-1]))>0&&r<=o&&i<=o&&(r+i-o)*(1-Math.pow((r-i)/o,2))i})).map(f)).concat(r(v(a/E)*E,u,E).filter((function(n){return s(n%S)>i})).map(p))}return M.lines=function(){return w().map((function(n){return{type:"LineString",coordinates:n}}))},M.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(g(c).slice(1),h(e).reverse().slice(1),g(l).reverse().slice(1))]}},M.extent=function(n){return arguments.length?M.extentMajor(n).extentMinor(n):M.extentMinor()},M.extentMajor=function(n){return arguments.length?(o=+n[0][0],e=+n[1][0],l=+n[0][1],c=+n[1][1],o>e&&(n=o,o=e,e=n),l>c&&(n=l,l=c,c=n),M.precision(m)):[[o,l],[e,c]]},M.extentMinor=function(r){return arguments.length?(t=+r[0][0],n=+r[1][0],a=+r[0][1],u=+r[1][1],t>n&&(r=t,t=n,n=r),a>u&&(r=a,a=u,u=r),M.precision(m)):[[t,a],[n,u]]},M.step=function(n){return arguments.length?M.stepMajor(n).stepMinor(n):M.stepMinor()},M.stepMajor=function(n){return arguments.length?(y=+n[0],S=+n[1],M):[y,S]},M.stepMinor=function(n){return arguments.length?(d=+n[0],E=+n[1],M):[d,E]},M.precision=function(r){return arguments.length?(m=+r,f=Bt(a,u,90),p=Dt(t,n,m),h=Bt(l,c,90),g=Dt(o,e,m),M):m},M.extentMajor([[-180,-90+i],[180,90-i]]).extentMinor([[-180,-80-i],[180,80+i]])}function Zt(){return Ut()()}function Jt(n,t){var r=n[0]*f,i=n[1]*f,e=t[0]*f,o=t[1]*f,u=g(i),a=m(i),c=g(o),s=m(o),p=u*g(r),v=u*m(r),d=c*g(e),E=c*m(e),y=2*N(w(R(o-i)+u*c*R(e-r))),S=m(y),M=y?function(n){var t=m(n*=y)/S,r=m(y-n)/S,i=r*p+t*d,e=r*v+t*E,o=r*a+t*s;return[h(e,i)*l,h(o,w(i*i+e*e))*l]}:function(){return[r*l,i*l]};return M.distance=y,M}var Kt,Qt,Vt,nr,tr=n=>n,rr=new n,ir=new n,er={point:C,lineStart:C,lineEnd:C,polygonStart:function(){er.lineStart=or,er.lineEnd=cr},polygonEnd:function(){er.lineStart=er.lineEnd=er.point=C,rr.add(s(ir)),ir=new n},result:function(){var t=rr/2;return rr=new n,t}};function or(){er.point=ur}function ur(n,t){er.point=ar,Kt=Vt=n,Qt=nr=t}function ar(n,t){ir.add(nr*n-Vt*t),Vt=n,nr=t}function cr(){ar(Kt,Qt)}var lr=1/0,fr=lr,sr=-lr,pr=sr,hr={point:function(n,t){nsr&&(sr=n);tpr&&(pr=t)},lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var n=[[lr,fr],[sr,pr]];return sr=pr=-(fr=lr=1/0),n}};var gr,vr,dr,Er,yr=0,Sr=0,mr=0,Mr=0,wr=0,xr=0,_r=0,Nr=0,Rr=0,Cr={point:Pr,lineStart:Ar,lineEnd:zr,polygonStart:function(){Cr.lineStart=jr,Cr.lineEnd=Lr},polygonEnd:function(){Cr.point=Pr,Cr.lineStart=Ar,Cr.lineEnd=zr},result:function(){var n=Rr?[_r/Rr,Nr/Rr]:xr?[Mr/xr,wr/xr]:mr?[yr/mr,Sr/mr]:[NaN,NaN];return yr=Sr=mr=Mr=wr=xr=_r=Nr=Rr=0,n}};function Pr(n,t){yr+=n,Sr+=t,++mr}function Ar(){Cr.point=$r}function $r(n,t){Cr.point=qr,Pr(dr=n,Er=t)}function qr(n,t){var r=n-dr,i=t-Er,e=w(r*r+i*i);Mr+=e*(dr+n)/2,wr+=e*(Er+t)/2,xr+=e,Pr(dr=n,Er=t)}function zr(){Cr.point=Pr}function jr(){Cr.point=br}function Lr(){Gr(gr,vr)}function br(n,t){Cr.point=Gr,Pr(gr=dr=n,vr=Er=t)}function Gr(n,t){var r=n-dr,i=t-Er,e=w(r*r+i*i);Mr+=e*(dr+n)/2,wr+=e*(Er+t)/2,xr+=e,_r+=(e=Er*n-dr*t)*(dr+n),Nr+=e*(Er+t),Rr+=3*e,Pr(dr=n,Er=t)}function Or(n){this._context=n}Or.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,c)}},result:C};var Tr,kr,Fr,Hr,Ir,Wr=new n,Xr={point:C,lineStart:function(){Xr.point=Yr},lineEnd:function(){Tr&&Br(kr,Fr),Xr.point=C},polygonStart:function(){Tr=!0},polygonEnd:function(){Tr=null},result:function(){var t=+Wr;return Wr=new n,t}};function Yr(n,t){Xr.point=Br,kr=Hr=n,Fr=Ir=t}function Br(n,t){Hr-=n,Ir-=t,Wr.add(w(Hr*Hr+Ir*Ir)),Hr=n,Ir=t}let Dr,Ur,Zr,Jr;class Kr{constructor(n){this._append=null==n?Qr:function(n){const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);if(t>15)return Qr;if(t!==Dr){const n=10**t;Dr=t,Ur=function(t){let r=1;this._+=t[0];for(const i=t.length;r=0))throw new RangeError(`invalid digits: ${n}`);e=t}return null===t&&(i=new Kr(e)),u},u.projection(n).digits(e).context(t)}function ni(n){return{stream:ti(n)}}function ti(n){return function(t){var r=new ri;for(var i in n)r[i]=n[i];return r.stream=t,r}}function ri(){}function ii(n,t,r){var i=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=i&&n.clipExtent(null),j(r,n.stream(hr)),t(hr.result()),null!=i&&n.clipExtent(i),n}function ei(n,t,r){return ii(n,(function(r){var i=t[1][0]-t[0][0],e=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),e/(r[1][1]-r[0][1])),u=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,a=+t[0][1]+(e-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,a])}),r)}function oi(n,t,r){return ei(n,[[0,0],t],r)}function ui(n,t,r){return ii(n,(function(r){var i=+t,e=i/(r[1][0]-r[0][0]),o=(i-e*(r[1][0]+r[0][0]))/2,u=-e*r[0][1];n.scale(150*e).translate([o,u])}),r)}function ai(n,t,r){return ii(n,(function(r){var i=+t,e=i/(r[1][1]-r[0][1]),o=-e*r[0][0],u=(i-e*(r[1][1]+r[0][1]))/2;n.scale(150*e).translate([o,u])}),r)}ri.prototype={constructor:ri,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ci=16,li=g(30*f);function fi(n,t){return+t?function(n,t){function r(e,o,u,a,c,l,f,p,g,v,d,E,y,S){var m=f-e,M=p-o,x=m*m+M*M;if(x>4*t&&y--){var _=a+v,R=c+d,C=l+E,P=w(_*_+R*R+C*C),A=N(C/=P),$=s(s(C)-1)t||s((m*L+M*b)/x-.5)>.3||a*v+c*d+l*E2?n[2]%360*f:0,z()):[y*l,S*l,m*l]},$.angle=function(n){return arguments.length?(M=n%360*f,z()):M*l},$.reflectX=function(n){return arguments.length?(x=n?-1:1,z()):x<0},$.reflectY=function(n){return arguments.length?(_=n?-1:1,z()):_<0},$.precision=function(n){return arguments.length?(u=fi(a,A=n*n),j()):w(A)},$.fitExtent=function(n,t){return ei($,n,t)},$.fitSize=function(n,t){return oi($,n,t)},$.fitWidth=function(n,t){return ui($,n,t)},$.fitHeight=function(n,t){return ai($,n,t)},function(){return t=n.apply(this,arguments),$.invert=t.invert&&q,z()}}function vi(n){var t=0,r=o/3,i=gi(n),e=i(t,r);return e.parallels=function(n){return arguments.length?i(t=n[0]*f,r=n[1]*f):[t*l,r*l]},e}function di(n,t){var r=m(n),e=(r+m(t))/2;if(s(e)=.12&&e<.234&&i>=-.425&&i<-.214?c:e>=.166&&e<.234&&i>=-.214&&i<-.115?l:a).invert(n)},s.stream=function(r){return n&&t===r?n:(i=[a.stream(t=r),c.stream(r),l.stream(r)],e=i.length,n={point:function(n,t){for(var r=-1;++r0?t<-u+i&&(t=-u+i):t>u-i&&(t=u-i);var r=a/S(Ai(t),e);return[r*m(e*n),a-r*g(e*n)]}return c.invert=function(n,t){var r=a-t,i=M(e)*w(n*n+r*r),c=h(n,s(r))*M(r);return r*e<0&&(c-=o*M(n)*M(r)),[c/e,2*p(S(a/i,1/e))-u]},c}function qi(){return vi($i).scale(109.5).parallels([30,30])}function zi(n,t){return[n,t]}function ji(){return hi(zi).scale(152.63)}function Li(n,t){var r=g(n),e=n===t?m(n):(r-g(t))/(t-n),u=r/e+n;if(s(e)2?n[2]+90:90]):[(n=r())[0],n[1],n[2]-90]},r([0,0,90]).scale(159.155)}Hi.invert=function(n,t){for(var r,i=t,o=i*i,u=o*o*o,a=0;a<12&&(u=(o=(i-=r=(i*(Gi+Oi*o+u*(Ti+ki*o))-t)/(Gi+3*Oi*o+u*(7*Ti+9*ki*o)))*i)*o*o,!(s(r)i&&--o>0);return[n/(.8707+(u=e*e)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),e]},Ui.invert=Mi(N),Ji.invert=Mi((function(n){return 2*p(n)})),Qi.invert=function(n,t){return[-t,2*p(d(n))-u]};export{yi as geoAlbers,Si as geoAlbersUsa,en as geoArea,xi as geoAzimuthalEqualArea,wi as geoAzimuthalEqualAreaRaw,Ni as geoAzimuthalEquidistant,_i as geoAzimuthalEquidistantRaw,kn as geoBounds,Kn as geoCentroid,ct as geoCircle,St as geoClipAntimeridian,mt as geoClipCircle,Pt as geoClipExtent,Ct as geoClipRectangle,qi as geoConicConformal,$i as geoConicConformalRaw,Ei as geoConicEqualArea,di as geoConicEqualAreaRaw,bi as geoConicEquidistant,Li as geoConicEquidistantRaw,Yt as geoContains,Gt as geoDistance,Ii as geoEqualEarth,Hi as geoEqualEarthRaw,ji as geoEquirectangular,zi as geoEquirectangularRaw,Xi as geoGnomonic,Wi as geoGnomonicRaw,Ut as geoGraticule,Zt as geoGraticule10,Yi as geoIdentity,Jt as geoInterpolate,jt as geoLength,Ci as geoMercator,Ri as geoMercatorRaw,Di as geoNaturalEarth1,Bi as geoNaturalEarth1Raw,Zi as geoOrthographic,Ui as geoOrthographicRaw,Vr as geoPath,hi as geoProjection,gi as geoProjectionMutator,ot as geoRotation,Ki as geoStereographic,Ji as geoStereographicRaw,j as geoStream,ni as geoTransform,Vi as geoTransverseMercator,Qi as geoTransverseMercatorRaw};export default null;