// https://d3js.org/d3-geo/ Version 1.9.1. Copyright 2017 Mike Bostock. !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-array"],t):t(n.d3=n.d3||{},n.d3)}(this,function(n,t){"use strict";function r(){this.reset()}function i(n,t,r){var i=n.s=t+r,e=i-t,o=i-e;n.t=t-o+(r-e)}function e(n){return n>1?0:n<-1?Gt:Math.acos(n)}function o(n){return n>1?Tt:n<-1?-Tt:Math.asin(n)}function u(n){return(n=Kt(n/2))*n}function c(){}function a(n,t){n&&tr.hasOwnProperty(n.type)&&tr[n.type](n,t)}function l(n,t,r){var i,e=-1,o=n.length-r;for(t.lineStart();++e=0?1:-1,e=i*r,o=Ut(t),u=Kt(t),c=ct*u,a=ut*o+c*Ut(e),l=c*i*Kt(e);ir.add(Dt(l,a)),ot=n,ut=o,ct=u}function v(n){return[Dt(n[1],n[0]),o(n[2])]}function d(n){var t=n[0],r=n[1],i=Ut(r);return[i*Ut(t),i*Kt(t),Kt(r)]}function E(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function y(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 S(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function m(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function M(n){var t=Vt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function x(n,t){dt.push(Et=[at=n,ft=n]),tst&&(st=t)}function _(n,t){var r=d([n*It,t*It]);if(vt){var i=y(vt,r),e=y([i[1],-i[0],0],i);M(e),e=v(e);var o,u=n-pt,c=u>0?1:-1,a=e[0]*Ht*c,l=Wt(u)>180;l^(c*ptst&&(st=o):(a=(a+360)%360-180,l^(c*ptst&&(st=t))),l?nA(at,ft)&&(ft=n):A(n,ft)>A(at,ft)&&(at=n):ft>=at?(nft&&(ft=n)):n>pt?A(at,n)>A(at,ft)&&(ft=n):A(n,ft)>A(at,ft)&&(at=n)}else dt.push(Et=[at=n,ft=n]);tst&&(st=t),vt=r,pt=n}function N(){cr.point=_}function w(){Et[0]=at,Et[1]=ft,cr.point=x,vt=null}function C(n,t){if(vt){var r=n-pt;ur.add(Wt(r)>180?r+(r>0?360:-360):r)}else ht=n,gt=t;or.point(n,t),_(n,t)}function P(){or.lineStart()}function R(){C(ht,gt),or.lineEnd(),Wt(ur)>Ot&&(at=-(ft=180)),Et[0]=at,Et[1]=ft,vt=null}function A(n,t){return(t-=n)<0?t+360:t}function j(n,t){return n[0]-t[0]}function q(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tGt?n-Ft:n<-Gt?n+Ft:n,t]}function B(n,t,r){return(n%=Ft)?t||r?fr(U(n),X(t,r)):U(n):t||r?X(t,r):W}function D(n){return function(t,r){return t+=n,[t>Gt?t-Ft:t<-Gt?t+Ft:t,r]}}function U(n){var t=D(n);return t.invert=D(-n),t}function X(n,t){function r(n,t){var r=Ut(t),a=Ut(n)*r,l=Kt(n)*r,f=Kt(t),s=f*i+a*e;return[Dt(l*u-s*c,a*i-f*e),o(s*u+l*c)]}var i=Ut(n),e=Kt(n),u=Ut(t),c=Kt(t);return r.invert=function(n,t){var r=Ut(t),a=Ut(n)*r,l=Kt(n)*r,f=Kt(t),s=f*u-l*c;return[Dt(l*u+f*c,a*i+s*e),o(s*i-a*e)]},r}function Y(n,t,r,i,e,o){if(r){var u=Ut(t),c=Kt(t),a=i*r;null==e?(e=t+i*Ft,o=t-a/2):(e=Z(u,e),o=Z(u,o),(i>0?eo)&&(e+=i*Ft));for(var l,f=e;i>0?f>o:f1}function V(n,t){return((n=n.x)[0]<0?n[1]-Tt-Ot:Tt-n[1])-((t=t.x)[0]<0?t[1]-Tt-Ot:Tt-t[1])}function $(n,r,i,e){function o(t,o){return n<=t&&t<=i&&r<=o&&o<=e}function u(t,o,u,a){var f=0,s=0;if(null==t||(f=c(t,u))!==(s=c(o,u))||l(t,o)<0^u>0)do{a.point(0===f||3===f?n:i,f>1?e:r)}while((f=(f+u+4)%4)!==s);else a.point(o[0],o[1])}function c(t,e){return Wt(t[0]-n)0?0:3:Wt(t[0]-i)0?2:1:Wt(t[1]-r)0?1:0:e>0?3:2}function a(n,t){return l(n.x,t.x)}function l(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(c){function l(n,t){o(n,t)&&x.point(n,t)}function f(t,u){var c=o(t,u);if(p&&h.push([t,u]),m)g=t,v=u,d=c,m=!1,c&&(x.lineStart(),x.point(t,u));else if(c&&S)x.point(t,u);else{var a=[E=Math.max(br,Math.min(zr,E)),y=Math.max(br,Math.min(zr,y))],l=[t=Math.max(br,Math.min(zr,t)),u=Math.max(br,Math.min(zr,u))];qr(a,l,n,r,i,e)?(S||(x.lineStart(),x.point(a[0],a[1])),x.point(l[0],l[1]),c||x.lineEnd(),M=!1):c&&(x.lineStart(),x.point(t,u),M=!1)}E=t,y=u,S=c}var s,p,h,g,v,d,E,y,S,m,M,x=c,_=_r(),N={point:l,lineStart:function(){N.point=f,p&&p.push(h=[]),m=!0,S=!1,E=y=NaN},lineEnd:function(){s&&(f(g,v),d&&S&&_.rejoin(),s.push(_.result())),N.point=l,S&&x.lineEnd()},polygonStart:function(){x=_,s=[],p=[],M=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=p.length;re&&(s-o)*(e-u)>(h-u)*(n-o)&&++t:h<=e&&(s-o)*(e-u)<(h-u)*(n-o)&&--t;return t}(),i=M&&r,o=(s=t.merge(s)).length;(i||o)&&(c.polygonStart(),i&&(c.lineStart(),u(null,null,1,c),c.lineEnd()),o&&wr(s,a,r,u,c),c.polygonEnd()),x=c,s=p=h=null}};return N}}function nn(){Or.point=Or.lineEnd=c}function tn(n,t){sr=n*=It,pr=Kt(t*=It),hr=Ut(t),Or.point=rn}function rn(n,t){n*=It;var r=Kt(t*=It),i=Ut(t),e=Wt(n-sr),o=Ut(e),u=i*Kt(e),c=hr*r-pr*i*o,a=pr*r+hr*i*o;Lr.add(Dt(Vt(u*u+c*c),a)),sr=n,pr=r,hr=i}function en(n,t){return!(!n||!Ir.hasOwnProperty(n.type))&&Ir[n.type](n,t)}function on(n,t){return 0===Fr(n,t)}function un(n,t){var r=Fr(n[0],n[1]);return Fr(n[0],t)+Fr(t,n[1])<=r+Ot}function cn(n,t){return!!Pr(n.map(an),ln(t))}function an(n){return(n=n.map(ln)).pop(),n}function ln(n){return[n[0]*It,n[1]*It]}function fn(n,r,i){var e=t.range(n,r-Ot,i).concat(r);return function(n){return e.map(function(t){return[n,t]})}}function sn(n,r,i){var e=t.range(n,r-Ot,i).concat(r);return function(n){return e.map(function(t){return[t,n]})}}function pn(){function n(){return{type:"MultiLineString",coordinates:r()}}function r(){return t.range(Xt(u/E)*E,o,E).map(h).concat(t.range(Xt(f/y)*y,l,y).map(g)).concat(t.range(Xt(e/v)*v,i,v).filter(function(n){return Wt(n%E)>Ot}).map(s)).concat(t.range(Xt(a/d)*d,c,d).filter(function(n){return Wt(n%y)>Ot}).map(p))}var i,e,o,u,c,a,l,f,s,p,h,g,v=10,d=v,E=90,y=360,S=2.5;return n.lines=function(){return r().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(g(l).slice(1),h(o).reverse().slice(1),g(f).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.extentMajor(t).extentMinor(t):n.extentMinor()},n.extentMajor=function(t){return arguments.length?(u=+t[0][0],o=+t[1][0],f=+t[0][1],l=+t[1][1],u>o&&(t=u,u=o,o=t),f>l&&(t=f,f=l,l=t),n.precision(S)):[[u,f],[o,l]]},n.extentMinor=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],a=+t[0][1],c=+t[1][1],e>i&&(t=e,e=i,i=t),a>c&&(t=a,a=c,c=t),n.precision(S)):[[e,a],[i,c]]},n.step=function(t){return arguments.length?n.stepMajor(t).stepMinor(t):n.stepMinor()},n.stepMajor=function(t){return arguments.length?(E=+t[0],y=+t[1],n):[E,y]},n.stepMinor=function(t){return arguments.length?(v=+t[0],d=+t[1],n):[v,d]},n.precision=function(t){return arguments.length?(S=+t,s=fn(a,c,90),p=sn(e,i,S),h=fn(f,l,90),g=sn(u,o,S),n):S},n.extentMajor([[-180,-90+Ot],[180,90-Ot]]).extentMinor([[-180,-80-Ot],[180,80+Ot]])}function hn(){Ur.point=gn}function gn(n,t){Ur.point=vn,gr=dr=n,vr=Er=t}function vn(n,t){Dr.add(Er*n-dr*t),dr=n,Er=t}function dn(){vn(gr,vr)}function En(n,t){Qr+=n,Vr+=t,++$r}function yn(){ui.point=Sn}function Sn(n,t){ui.point=mn,En(mr=n,Mr=t)}function mn(n,t){var r=n-mr,i=t-Mr,e=Vt(r*r+i*i);ni+=e*(mr+n)/2,ti+=e*(Mr+t)/2,ri+=e,En(mr=n,Mr=t)}function Mn(){ui.point=En}function xn(){ui.point=Nn}function _n(){wn(yr,Sr)}function Nn(n,t){ui.point=wn,En(yr=mr=n,Sr=Mr=t)}function wn(n,t){var r=n-mr,i=t-Mr,e=Vt(r*r+i*i);ni+=e*(mr+n)/2,ti+=e*(Mr+t)/2,ri+=e,ii+=(e=Mr*n-mr*t)*(mr+n),ei+=e*(Mr+t),oi+=3*e,En(mr=n,Mr=t)}function Cn(n){this._context=n}function Pn(n,t){hi.point=Rn,ai=fi=n,li=si=t}function Rn(n,t){fi-=n,si-=t,pi.add(Vt(fi*fi+si*si)),fi=n,si=t}function An(){this._string=[]}function jn(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function qn(n){return function(t){var r=new zn;for(var i in n)r[i]=n[i];return r.stream=t,r}}function zn(){}function bn(n,t,r){var i=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=i&&n.clipExtent(null),rr(r,n.stream(Kr)),t(Kr.result()),null!=i&&n.clipExtent(i),n}function Ln(n,t,r){return bn(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,c=+t[0][1]+(e-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,c])},r)}function On(n,t,r){return Ln(n,[[0,0],t],r)}function Gn(n,t,r){return bn(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 Tn(n,t,r){return bn(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)}function kn(n){return Fn(function(){return n})()}function Fn(n){function t(n){return n=l(n[0]*It,n[1]*It),[n[0]*v+u,c-n[1]*v]}function r(n,t){return n=o(n,t),[n[0]*v+u,c-n[1]*v]}function i(){l=fr(a=B(m,M,x),o);var n=o(y,S);return u=d-n[0]*v,c=E+n[1]*v,e()}function e(){return h=g=null,t}var o,u,c,a,l,f,s,p,h,g,v=150,d=480,E=250,y=0,S=0,m=0,M=0,x=0,_=null,N=Ar,w=null,C=Wr,P=.5,R=di(r,P);return t.stream=function(n){return h&&g===n?h:h=Ei(function(n){return qn({point:function(t,r){var i=n(t,r);return this.stream.point(i[0],i[1])}})}(a)(N(R(C(g=n)))))},t.preclip=function(n){return arguments.length?(N=n,_=void 0,e()):N},t.postclip=function(n){return arguments.length?(C=n,w=f=s=p=null,e()):C},t.clipAngle=function(n){return arguments.length?(N=+n?jr(_=n*It):(_=null,Ar),e()):_*Ht},t.clipExtent=function(n){return arguments.length?(C=null==n?(w=f=s=p=null,Wr):$(w=+n[0][0],f=+n[0][1],s=+n[1][0],p=+n[1][1]),e()):null==w?null:[[w,f],[s,p]]},t.scale=function(n){return arguments.length?(v=+n,i()):v},t.translate=function(n){return arguments.length?(d=+n[0],E=+n[1],i()):[d,E]},t.center=function(n){return arguments.length?(y=n[0]%360*It,S=n[1]%360*It,i()):[y*Ht,S*Ht]},t.rotate=function(n){return arguments.length?(m=n[0]%360*It,M=n[1]%360*It,x=n.length>2?n[2]%360*It:0,i()):[m*Ht,M*Ht,x*Ht]},t.precision=function(n){return arguments.length?(R=di(r,P=n*n),e()):Vt(P)},t.fitExtent=function(n,r){return Ln(t,n,r)},t.fitSize=function(n,r){return On(t,n,r)},t.fitWidth=function(n,r){return Gn(t,n,r)},t.fitHeight=function(n,r){return Tn(t,n,r)},function(){return o=n.apply(this,arguments),t.invert=o.invert&&function(n){return(n=l.invert((n[0]-u)/v,(c-n[1])/v))&&[n[0]*Ht,n[1]*Ht]},i()}}function Hn(n){var t=0,r=Gt/3,i=Fn(n),e=i(t,r);return e.parallels=function(n){return arguments.length?i(t=n[0]*It,r=n[1]*It):[t*Ht,r*Ht]},e}function In(n,t){function r(n,t){var r=Vt(u-2*e*Kt(t))/e;return[r*Kt(n*=e),c-r*Ut(n)]}var i=Kt(n),e=(i+Kt(t))/2;if(Wt(e)0?t<-Tt+Ot&&(t=-Tt+Ot):t>Tt-Ot&&(t=Tt-Ot);var r=o/Jt(Xn(t),e);return[r*Kt(e*n),o-r*Ut(e*n)]}var i=Ut(n),e=n===t?Kt(n):Zt(i/Ut(t))/Zt(Xn(t)/Xn(n)),o=i*Jt(Xn(n),e)/e;return e?(r.invert=function(n,t){var r=o-t,i=Qt(e)*Vt(n*n+r*r);return[Dt(n,Wt(r))/e*Qt(r),2*Bt(Jt(o/i,1/e))-Tt]},r):Dn}function Zn(n,t){return[n,t]}function Jn(n,t){function r(n,t){var r=o-t,i=e*n;return[r*Kt(i),o-r*Ut(i)]}var i=Ut(n),e=n===t?Kt(n):(i-Ut(t))/(t-n),o=i/e+n;return Wt(e)0?1:n<0?-1:0},Vt=Math.sqrt,$t=Math.tan,nr={Feature:function(n,t){a(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++iOt?st=90:ur<-Ot&&(lt=-90),Et[0]=at,Et[1]=ft}},ar={sphere:c,point:z,lineStart:L,lineEnd:T,polygonStart:function(){ar.lineStart=k,ar.lineEnd=F},polygonEnd:function(){ar.lineStart=L,ar.lineEnd=T}},lr=function(n){return function(){return n}},fr=function(n,t){function r(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,i){return(r=t.invert(r,i))&&n.invert(r[0],r[1])}),r};W.invert=W;var sr,pr,hr,gr,vr,dr,Er,yr,Sr,mr,Mr,xr=function(n){function t(t){return t=n(t[0]*It,t[1]*It),t[0]*=Ht,t[1]*=Ht,t}return n=B(n[0]*It,n[1]*It,n.length>2?n[2]*It:0),t.invert=function(t){return t=n.invert(t[0]*It,t[1]*It),t[0]*=Ht,t[1]*=Ht,t},t},_r=function(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:c,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}},Nr=function(n,t){return Wt(n[0]-t[0])=0;--o)e.point((f=l[o])[0],f[1]);else i(p.x,p.p.x,-1,e);p=p.p}l=(p=p.o).z,h=!h}while(!p.v);e.lineEnd()}}},Cr=rt(),Pr=function(n,t){var r=t[0],i=t[1],e=[Kt(r),-Ut(r),0],u=0,c=0;Cr.reset();for(var a=0,l=n.length;a=0?1:-1,R=P*C,A=R>Gt,j=v*N;if(Cr.add(Dt(j*P*Kt(R),E*w+j*Ut(R))),u+=A?C+P*Ft:C,A^h>=r^x>=r){var q=y(d(p),d(m));M(q);var z=y(e,q);M(z);var b=(A^C>=0?-1:1)*o(z[2]);(i>b||i===b&&(q[0]||q[1]))&&(c+=A^C>=0?1:-1)}}return(u<-Ot||u0){for(S||(o.polygonStart(),S=!0),o.lineStart(),n=0;n1&&2&e&&u.push(u.pop().concat(u.shift())),g.push(u.filter(Q))}var h,g,v,d=r(o),E=_r(),y=r(E),S=!1,m={point:u,lineStart:a,lineEnd:l,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=p,g=[],h=[]},polygonEnd:function(){m.point=u,m.lineStart=a,m.lineEnd=l,g=t.merge(g);var n=Pr(h,e);g.length?(S||(o.polygonStart(),S=!0),wr(g,V,n,i,o)):n&&(S||(o.polygonStart(),S=!0),o.lineStart(),i(null,null,1,o),o.lineEnd()),S&&(o.polygonEnd(),S=!1),g=h=null},sphere:function(){o.polygonStart(),o.lineStart(),i(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return m}},Ar=Rr(function(){return!0},function(n){var t,r=NaN,i=NaN,e=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var c=o>0?Gt:-Gt,a=Wt(o-r);Wt(a-Gt)0?Tt:-Tt),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),n.point(o,i),t=0):e!==c&&a>=Gt&&(Wt(r-e)Ot?Bt((Kt(t)*(o=Ut(i))*Kt(r)-Kt(i)*(e=Ut(t))*Kt(n))/(e*o*u)):(t+i)/2}(r,i,o,u),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),t=0),n.point(r=o,i=u),e=c},lineEnd:function(){n.lineEnd(),r=i=NaN},clean:function(){return 2-t}}},function(n,t,r,i){var e;if(null==n)e=r*Tt,i.point(-Gt,e),i.point(0,e),i.point(Gt,e),i.point(Gt,0),i.point(Gt,-e),i.point(0,-e),i.point(-Gt,-e),i.point(-Gt,0),i.point(-Gt,e);else if(Wt(n[0]-t[0])>Ot){var o=n[0]e}function r(n,t,r){var i=[1,0,0],o=y(d(n),d(t)),u=E(o,o),c=o[0],a=u-c*c;if(!a)return!r&&n;var l=e*u/a,f=-e*c/a,s=y(i,o),p=m(i,l);S(p,m(o,f));var h=s,g=E(p,h),M=E(h,h),x=g*g-M*(E(p,p)-1);if(!(x<0)){var _=Vt(x),N=m(h,(-g-_)/M);if(S(N,p),N=v(N),!r)return N;var w,C=n[0],P=t[0],R=n[1],A=t[1];P0^N[1]<(Wt(N[0]-C)Gt^(C<=N[0]&&N[0]<=P)){var z=m(h,(-g+_)/M);return S(z,p),[N,v(z)]}}}function i(t,r){var i=u?n:Gt-n,e=0;return t<-i?e|=1:t>i&&(e|=2),r<-i?e|=4:r>i&&(e|=8),e}var e=Ut(n),o=6*It,u=e>0,c=Wt(e)>Ot;return Rr(t,function(n){var e,o,a,l,f;return{lineStart:function(){l=a=!1,f=1},point:function(s,p){var h,g=[s,p],v=t(s,p),d=u?v?0:i(s,p):v?i(s+(s<0?Gt:-Gt),p):0;if(!e&&(l=a=v)&&n.lineStart(),v!==a&&(!(h=r(e,g))||Nr(e,h)||Nr(g,h))&&(g[0]+=Ot,g[1]+=Ot,v=t(g[0],g[1])),v!==a)f=0,v?(n.lineStart(),h=r(g,e),n.point(h[0],h[1])):(h=r(e,g),n.point(h[0],h[1]),n.lineEnd()),e=h;else if(c&&e&&u^v){var E;d&o||!(E=r(g,e,!0))||(f=0,u?(n.lineStart(),n.point(E[0][0],E[0][1]),n.point(E[1][0],E[1][1]),n.lineEnd()):(n.point(E[1][0],E[1][1]),n.lineEnd(),n.lineStart(),n.point(E[0][0],E[0][1])))}!v||e&&Nr(e,g)||n.point(g[0],g[1]),e=g,a=v,o=d},lineEnd:function(){a&&n.lineEnd(),e=null},clean:function(){return f|(l&&a)<<1}}},function(t,r,i,e){Y(e,n,o,i,t,r)},u?[0,-n]:[-Gt,n-Gt])},qr=function(n,t,r,i,e,o){var u,c=n[0],a=n[1],l=0,f=1,s=t[0]-c,p=t[1]-a;if(u=r-c,s||!(u>0)){if(u/=s,s<0){if(u0){if(u>f)return;u>l&&(l=u)}if(u=e-c,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-a,p||!(u<0)){if(u/=p,p<0){if(u>f)return;u>l&&(l=u)}else if(p>0){if(u0&&(n[0]=c+l*s,n[1]=a+l*p),f<1&&(t[0]=c+f*s,t[1]=a+f*p),!0}}}}},zr=1e9,br=-zr,Lr=rt(),Or={sphere:c,point:c,lineStart:function(){Or.point=tn,Or.lineEnd=nn},lineEnd:c,polygonStart:c,polygonEnd:c},Gr=function(n){return Lr.reset(),rr(n,Or),+Lr},Tr=[null,null],kr={type:"LineString",coordinates:Tr},Fr=function(n,t){return Tr[0]=n,Tr[1]=t,Gr(kr)},Hr={Feature:function(n,t){return en(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++iZr&&(Zr=n),tJr&&(Jr=t)},lineStart:c,lineEnd:c,polygonStart:c,polygonEnd:c,result:function(){var n=[[Xr,Yr],[Zr,Jr]];return Zr=Jr=-(Yr=Xr=1/0),n}},Qr=0,Vr=0,$r=0,ni=0,ti=0,ri=0,ii=0,ei=0,oi=0,ui={point:En,lineStart:yn,lineEnd:Mn,polygonStart:function(){ui.lineStart=xn,ui.lineEnd=_n},polygonEnd:function(){ui.point=En,ui.lineStart=yn,ui.lineEnd=Mn},result:function(){var n=oi?[ii/oi,ei/oi]:ri?[ni/ri,ti/ri]:$r?[Qr/$r,Vr/$r]:[NaN,NaN];return Qr=Vr=$r=ni=ti=ri=ii=ei=oi=0,n}};Cn.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,Ft)}},result:c};var ci,ai,li,fi,si,pi=rt(),hi={point:c,lineStart:function(){hi.point=Pn},lineEnd:function(){ci&&Rn(ai,li),hi.point=c},polygonStart:function(){ci=!0},polygonEnd:function(){ci=null},result:function(){var n=+pi;return pi.reset(),n}};An.prototype={_radius:4.5,_circle:jn(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=jn(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}};zn.prototype={constructor:zn,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 gi=16,vi=Ut(30*It),di=function(n,t){return+t?function(n,t){function r(i,e,u,c,a,l,f,s,p,h,g,v,d,E){var y=f-i,S=s-e,m=y*y+S*S;if(m>4*t&&d--){var M=c+h,x=a+g,_=l+v,N=Vt(M*M+x*x+_*_),w=o(_/=N),C=Wt(Wt(_)-1)t||Wt((y*j+S*q)/m-.5)>.3||c*h+a*g+l*vOt&&--e>0);return[n/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]};$n.invert=Bn(o);nt.invert=Bn(function(n){return 2*Bt(n)});tt.invert=function(n,t){return[-t,2*Bt(Yt(n))-Tt]};n.geoArea=function(n){return er.reset(),rr(n,or),2*er},n.geoBounds=function(n){var t,r,i,e,o,u,c;if(st=ft=-(at=lt=1/0),dt=[],rr(n,cr),r=dt.length){for(dt.sort(j),t=1,o=[i=dt[0]];tA(i[0],i[1])&&(i[1]=e[1]),A(e[0],i[1])>A(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],(c=A(i[1],e[0]))>u&&(u=c,at=e[0],ft=i[1])}return dt=Et=null,at===1/0||lt===1/0?[[NaN,NaN],[NaN,NaN]]:[[at,lt],[ft,st]]},n.geoCentroid=function(n){yt=St=mt=Mt=xt=_t=Nt=wt=Ct=Pt=Rt=0,rr(n,ar);var t=Ct,r=Pt,i=Rt,e=t*t+r*r+i*i;return e<1e-12&&(t=_t,r=Nt,i=wt,St=.12&&e<.234&&i>=-.425&&i<-.214?l:e>=.166&&e<.234&&i>=-.214&&i<-.115?f:a).invert(n)},n.stream=function(n){return r&&i===n?r:r=function(n){var t=n.length;return{point:function(r,i){for(var e=-1;++e2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)},n.geoTransverseMercatorRaw=tt,n.geoRotation=xr,n.geoStream=rr,n.geoTransform=function(n){return{stream:qn(n)}},Object.defineProperty(n,"__esModule",{value:!0})});