Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-geo

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-geo - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

build/d3-geo.min.js

@@ -1,2 +0,2 @@

// https://d3js.org/d3-geo/ Version 0.0.2. Copyright 2016 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(){return new i}function i(){this.reset()}function e(n,t,r){var i=n.s=t+r,e=i-t,o=i-e;n.t=t-o+(r-e)}function o(n){return n>1?0:-1>n?hr:Math.acos(n)}function u(n){return n>1?gr:-1>n?-gr:Math.asin(n)}function c(n){return(n=Ar(n/2))*n}function f(){}function a(n,t){n&&Rr.hasOwnProperty(n.type)&&Rr[n.type](n,t)}function l(n,t,r){var i,e=-1,o=n.length-r;for(t.lineStart();++e<o;)i=n[e],t.point(i[0],i[1],i[2]);t.lineEnd()}function p(n,t){var r=-1,i=n.length;for(t.polygonStart();++r<i;)l(n[r],t,1);t.polygonEnd()}function s(n,t){n&&Lr.hasOwnProperty(n.type)?Lr[n.type](n,t):a(n,t)}function v(){Or.point=g}function h(){d(Rt,Ot)}function g(n,t){Or.point=d,Rt=n,Ot=t,n*=yr,t*=yr,Tt=n,Gt=Nr(t=t/2+dr),Ft=Ar(t)}function d(n,t){n*=yr,t*=yr,t=t/2+dr;var r=n-Tt,i=r>=0?1:-1,e=i*r,o=Nr(t),u=Ar(t),c=Ft*u,f=Gt*o+c*Nr(e),a=c*i*Ar(e);zt.add(xr(a,f)),Tt=n,Gt=o,Ft=u}function E(n){return Lt?Lt.reset():(Lt=r(),zt=r()),s(n,Or),2*Lt}function S(n){return[xr(n[1],n[0]),u(n[2])]}function y(n){var t=n[0],r=n[1],i=Nr(r);return[i*Nr(t),i*Ar(t),Ar(r)]}function m(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function M(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 x(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function N(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function j(n){var t=qr(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function w(n,t){Kt.push(Qt=[It=n,Bt=n]),_t>t&&(_t=t),t>Dt&&(Dt=t)}function P(n,t){var r=y([n*yr,t*yr]);if(Ht){var i=M(Ht,r),e=[i[1],-i[0],0],o=M(e,i);j(o),o=S(o);var u,c=n-Ut,f=c>0?1:-1,a=o[0]*Sr*f,l=mr(c)>180;l^(a>f*Ut&&f*n>a)?(u=o[1]*Sr,u>Dt&&(Dt=u)):(a=(a+360)%360-180,l^(a>f*Ut&&f*n>a)?(u=-o[1]*Sr,_t>u&&(_t=u)):(_t>t&&(_t=t),t>Dt&&(Dt=t))),l?Ut>n?L(It,n)>L(It,Bt)&&(Bt=n):L(n,Bt)>L(It,Bt)&&(It=n):Bt>=It?(It>n&&(It=n),n>Bt&&(Bt=n)):n>Ut?L(It,n)>L(It,Bt)&&(Bt=n):L(n,Bt)>L(It,Bt)&&(It=n)}else w(n,t);Ht=r,Ut=n}function C(){Tr.point=P}function A(){Qt[0]=It,Qt[1]=Bt,Tr.point=w,Ht=null}function b(n,t){if(Ht){var r=n-Ut;Jt.add(mr(r)>180?r+(r>0?360:-360):r)}else Zt=n,kt=t;Or.point(n,t),P(n,t)}function q(){Or.lineStart()}function z(){b(Zt,kt),Or.lineEnd(),mr(Jt)>sr&&(It=-(Bt=180)),Qt[0]=It,Qt[1]=Bt,Ht=null}function L(n,t){return(t-=n)<0?t+360:t}function R(n,t){return n[0]-t[0]}function O(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}function T(n){var t,i,e,o,u,c,f;if(Jt?Jt.reset():Jt=r(),Dt=Bt=-(It=_t=1/0),Kt=[],s(n,Tr),i=Kt.length){for(Kt.sort(R),t=1,e=Kt[0],u=[e];i>t;++t)o=Kt[t],O(e,o[0])||O(e,o[1])?(L(e[0],o[1])>L(e[0],e[1])&&(e[1]=o[1]),L(o[0],e[1])>L(e[0],e[1])&&(e[0]=o[0])):u.push(e=o);for(c=-(1/0),i=u.length-1,t=0,e=u[i];i>=t;e=o,++t)o=u[t],(f=L(e[1],o[0]))>c&&(c=f,It=o[0],Bt=e[1])}return Kt=Qt=null,It===1/0||_t===1/0?[[NaN,NaN],[NaN,NaN]]:[[It,_t],[Bt,Dt]]}function G(n,t){n*=yr,t*=yr;var r=Nr(t);F(r*Nr(n),r*Ar(n),Ar(t))}function F(n,t,r){++Vt,Xt+=(n-Xt)/Vt,Yt+=(t-Yt)/Vt,$t+=(r-$t)/Vt}function I(){Gr.point=_}function _(n,t){n*=yr,t*=yr;var r=Nr(t);fr=r*Nr(n),ar=r*Ar(n),lr=Ar(t),Gr.point=B,F(fr,ar,lr)}function B(n,t){n*=yr,t*=yr;var r=Nr(t),i=r*Nr(n),e=r*Ar(n),o=Ar(t),u=xr(qr((u=ar*o-lr*e)*u+(u=lr*i-fr*o)*u+(u=fr*e-ar*i)*u),fr*i+ar*e+lr*o);Wt+=u,nr+=u*(fr+(fr=i)),tr+=u*(ar+(ar=e)),rr+=u*(lr+(lr=o)),F(fr,ar,lr)}function D(){Gr.point=G}function U(){Gr.point=k}function Z(){H(ur,cr),Gr.point=G}function k(n,t){ur=n,cr=t,n*=yr,t*=yr,Gr.point=H;var r=Nr(t);fr=r*Nr(n),ar=r*Ar(n),lr=Ar(t),F(fr,ar,lr)}function H(n,t){n*=yr,t*=yr;var r=Nr(t),i=r*Nr(n),e=r*Ar(n),u=Ar(t),c=ar*u-lr*e,f=lr*i-fr*u,a=fr*e-ar*i,l=qr(c*c+f*f+a*a),p=fr*i+ar*e+lr*u,s=l&&-o(p)/l,v=xr(l,p);ir+=s*c,er+=s*f,or+=s*a,Wt+=v,nr+=v*(fr+(fr=i)),tr+=v*(ar+(ar=e)),rr+=v*(lr+(lr=u)),F(fr,ar,lr)}function J(n){Vt=Wt=Xt=Yt=$t=nr=tr=rr=ir=er=or=0,s(n,Gr);var t=ir,r=er,i=or,e=t*t+r*r+i*i;return vr>e&&(t=nr,r=tr,i=rr,sr>Wt&&(t=Xt,r=Yt,i=$t),e=t*t+r*r+i*i,vr>e)?[NaN,NaN]:[xr(r,t)*Sr,u(i/qr(e))*Sr]}function K(n){return function(){return n}}function Q(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),r&&n.invert(r[0],r[1])}),r}function V(n,t){return[n>hr?n-Er:-hr>n?n+Er:n,t]}function W(n,t,r){return(n%=Er)?t||r?Q(Y(n),$(t,r)):Y(n):t||r?$(t,r):V}function X(n){return function(t,r){return t+=n,[t>hr?t-Er:-hr>t?t+Er:t,r]}}function Y(n){var t=X(n);return t.invert=X(-n),t}function $(n,t){function r(n,t){var r=Nr(t),f=Nr(n)*r,a=Ar(n)*r,l=Ar(t),p=l*i+f*e;return[xr(a*o-p*c,f*i-l*e),u(p*o+a*c)]}var i=Nr(n),e=Ar(n),o=Nr(t),c=Ar(t);return r.invert=function(n,t){var r=Nr(t),f=Nr(n)*r,a=Ar(n)*r,l=Ar(t),p=l*o-a*c;return[xr(a*o+l*c,f*i+p*e),u(p*i-f*e)]},r}function nn(n){function t(t){return t=n(t[0]*yr,t[1]*yr),t[0]*=Sr,t[1]*=Sr,t}return n=W(n[0]*yr,n[1]*yr,n.length>2?n[2]*yr:0),t.invert=function(t){return t=n.invert(t[0]*yr,t[1]*yr),t[0]*=Sr,t[1]*=Sr,t},t}function tn(n,t,r,i,e,o){if(r){var u=Nr(t),c=Ar(t),f=i*r;null==e?(e=t+i*Er,o=t-f/2):(e=rn(u,e),o=rn(u,o),(i>0?o>e:e>o)&&(e+=i*Er));for(var a,l=e;i>0?l>o:o>l;l-=f)a=S([u,-c*Nr(l),-c*Ar(l)]),n.point(a[0],a[1])}}function rn(n,t){t=y(t),t[0]-=n,j(t);var r=o(-t[1]);return((-t[2]<0?-r:r)+Er-sr)%Er}function en(){function n(n,t){r.push(n=i(n,t)),n[0]*=Sr,n[1]*=Sr}function t(){var n=e.apply(this,arguments),t=o.apply(this,arguments)*yr,f=u.apply(this,arguments)*yr;return r=[],i=W(-n[0]*yr,-n[1]*yr,0).invert,tn(c,t,f,1),n={type:"Polygon",coordinates:[r]},r=i=null,n}var r,i,e=K([0,0]),o=K(90),u=K(6),c={point:n};return t.center=function(n){return arguments.length?(e="function"==typeof n?n:K([+n[0],+n[1]]),t):e},t.radius=function(n){return arguments.length?(o="function"==typeof n?n:K(+n),t):o},t.precision=function(n){return arguments.length?(u="function"==typeof n?n:K(+n),t):u},t}function on(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:f,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function un(n,t,r,i,e,o){var u,c=n[0],f=n[1],a=t[0],l=t[1],p=0,s=1,v=a-c,h=l-f;if(u=r-c,v||!(u>0)){if(u/=v,0>v){if(p>u)return;s>u&&(s=u)}else if(v>0){if(u>s)return;u>p&&(p=u)}if(u=e-c,v||!(0>u)){if(u/=v,0>v){if(u>s)return;u>p&&(p=u)}else if(v>0){if(p>u)return;s>u&&(s=u)}if(u=i-f,h||!(u>0)){if(u/=h,0>h){if(p>u)return;s>u&&(s=u)}else if(h>0){if(u>s)return;u>p&&(p=u)}if(u=o-f,h||!(0>u)){if(u/=h,0>h){if(u>s)return;u>p&&(p=u)}else if(h>0){if(p>u)return;s>u&&(s=u)}return p>0&&(n[0]=c+p*v,n[1]=f+p*h),1>s&&(t[0]=c+s*v,t[1]=f+s*h),!0}}}}}function cn(n,t){return mr(n[0]-t[0])<sr&&mr(n[1]-t[1])<sr}function fn(n,t,r,i){this.x=n,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function an(n,t,r,i,e){var o,u,c=[],f=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,r,i=n[0],u=n[t];if(cn(i,u)){for(e.lineStart(),o=0;t>o;++o)e.point((i=n[o])[0],i[1]);return void e.lineEnd()}c.push(r=new fn(i,n,null,!0)),f.push(r.o=new fn(i,null,r,!1)),c.push(r=new fn(u,n,null,!1)),f.push(r.o=new fn(u,null,r,!0))}}),c.length){for(f.sort(t),ln(c),ln(f),o=0,u=f.length;u>o;++o)f[o].e=r=!r;for(var a,l,p=c[0];;){for(var s=p,v=!0;s.v;)if((s=s.n)===p)return;a=s.z,e.lineStart();do{if(s.v=s.o.v=!0,s.e){if(v)for(o=0,u=a.length;u>o;++o)e.point((l=a[o])[0],l[1]);else i(s.x,s.n.x,1,e);s=s.n}else{if(v)for(a=s.p.z,o=a.length-1;o>=0;--o)e.point((l=a[o])[0],l[1]);else i(s.x,s.p.x,-1,e);s=s.p}s=s.o,a=s.z,v=!v}while(!s.v);e.lineEnd()}}}function ln(n){if(t=n.length){for(var t,r,i=0,e=n[0];++i<t;)e.n=r=n[i],r.p=e,e=r;e.n=r=n[0],r.p=e}}function pn(n,r,i,e){function o(t,o){return t>=n&&i>=t&&o>=r&&e>=o}function u(t,o,u,f){var l=0,p=0;if(null==t||(l=c(t,u))!==(p=c(o,u))||a(t,o)<0^u>0){do f.point(0===l||3===l?n:i,l>1?e:r);while((l=(l+u+4)%4)!==p)}else f.point(o[0],o[1])}function c(t,e){return mr(t[0]-n)<sr?e>0?0:3:mr(t[0]-i)<sr?e>0?2:1:mr(t[1]-r)<sr?e>0?1:0:e>0?3:2}function f(n,t){return a(n.x,t.x)}function a(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 a(n,t){o(n,t)&&C.point(n,t)}function l(){for(var t=0,r=0,i=E.length;i>r;++r)for(var o,u,c=E[r],f=1,a=c.length,l=c[0],p=l[0],s=l[1];a>f;++f)o=p,u=s,l=c[f],p=l[0],s=l[1],e>=u?s>e&&(p-o)*(e-u)>(s-u)*(n-o)&&++t:e>=s&&(s-u)*(n-o)>(p-o)*(e-u)&&--t;return t}function p(){C=A,d=[],E=[],P=!0}function s(){var n=l(),r=P&&n,i=(d=t.merge(d)).length;(r||i)&&(c.polygonStart(),r&&(c.lineStart(),u(null,null,1,c),c.lineEnd()),i&&an(d,f,n,u,c),c.polygonEnd()),C=c,d=E=S=null}function v(){b.point=g,E&&E.push(S=[]),w=!0,j=!1,x=N=NaN}function h(){d&&(g(y,m),M&&j&&A.rejoin(),d.push(A.result())),b.point=a,j&&C.lineEnd()}function g(t,u){var c=o(t,u);if(E&&S.push([t,u]),w)y=t,m=u,M=c,w=!1,c&&(C.lineStart(),C.point(t,u));else if(c&&j)C.point(t,u);else{var f=[x=Math.max(Wr,Math.min(Vr,x)),N=Math.max(Wr,Math.min(Vr,N))],a=[t=Math.max(Wr,Math.min(Vr,t)),u=Math.max(Wr,Math.min(Vr,u))];un(f,a,n,r,i,e)?(j||(C.lineStart(),C.point(f[0],f[1])),C.point(a[0],a[1]),c||C.lineEnd(),P=!1):c&&(C.lineStart(),C.point(t,u),P=!1)}x=t,N=u,j=c}var d,E,S,y,m,M,x,N,j,w,P,C=c,A=on(),b={point:a,lineStart:v,lineEnd:h,polygonStart:p,polygonEnd:s};return b}}function sn(){var n,t,r,i=0,e=0,o=960,u=500;return r={stream:function(r){return n&&t===r?n:n=pn(i,e,o,u)(t=r)},extent:function(c){return arguments.length?(i=+c[0][0],e=+c[0][1],o=+c[1][0],u=+c[1][1],n=t=null,r):[[i,e],[o,u]]}}}function vn(){Xr.point=gn,Xr.lineEnd=hn}function hn(){Xr.point=Xr.lineEnd=f}function gn(n,t){n*=yr,t*=yr,Ir=n,_r=Ar(t),Br=Nr(t),Xr.point=dn}function dn(n,t){n*=yr,t*=yr;var r=Ar(t),i=Nr(t),e=mr(n-Ir),o=Nr(e),u=Ar(e),c=i*u,f=Br*r-_r*i*o,a=_r*r+Br*i*o;Fr.add(xr(qr(c*c+f*f),a)),Ir=n,_r=r,Br=i}function En(n){return Fr?Fr.reset():Fr=r(),s(n,Xr),+Fr}function Sn(n,t){return Yr[0]=n,Yr[1]=t,En($r)}function yn(n,r,i){var e=t.range(n,r-sr,i).concat(r);return function(n){return e.map(function(t){return[n,t]})}}function mn(n,r,i){var e=t.range(n,r-sr,i).concat(r);return function(n){return e.map(function(t){return[t,n]})}}function Mn(){function n(){return{type:"MultiLineString",coordinates:r()}}function r(){return t.range(jr(u/E)*E,o,E).map(v).concat(t.range(jr(l/S)*S,a,S).map(h)).concat(t.range(jr(e/g)*g,i,g).filter(function(n){return mr(n%E)>sr}).map(p)).concat(t.range(jr(f/d)*d,c,d).filter(function(n){return mr(n%S)>sr}).map(s))}var i,e,o,u,c,f,a,l,p,s,v,h,g=10,d=g,E=90,S=360,y=2.5;return n.lines=function(){return r().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[v(u).concat(h(a).slice(1),v(o).reverse().slice(1),h(l).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],l=+t[0][1],a=+t[1][1],u>o&&(t=u,u=o,o=t),l>a&&(t=l,l=a,a=t),n.precision(y)):[[u,l],[o,a]]},n.extentMinor=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],f=+t[0][1],c=+t[1][1],e>i&&(t=e,e=i,i=t),f>c&&(t=f,f=c,c=t),n.precision(y)):[[e,f],[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],S=+t[1],n):[E,S]},n.stepMinor=function(t){return arguments.length?(g=+t[0],d=+t[1],n):[g,d]},n.precision=function(t){return arguments.length?(y=+t,p=yn(f,c,90),s=mn(e,i,y),v=yn(l,a,90),h=mn(u,o,y),n):y},n.extentMajor([[-180,-90+sr],[180,90-sr]]).extentMinor([[-180,-80-sr],[180,80+sr]])}function xn(n,t){var r=n[0]*yr,i=n[1]*yr,e=t[0]*yr,o=t[1]*yr,f=Nr(i),a=Ar(i),l=Nr(o),p=Ar(o),s=f*Nr(r),v=f*Ar(r),h=l*Nr(e),g=l*Ar(e),d=2*u(qr(c(o-i)+f*l*c(e-r))),E=Ar(d),S=d?function(n){var t=Ar(n*=d)/E,r=Ar(d-n)/E,i=r*s+t*h,e=r*v+t*g,o=r*a+t*p;return[xr(e,i)*Sr,xr(o,qr(i*i+e*e))*Sr]}:function(){return[r*Sr,i*Sr]};return S.distance=d,S}function Nn(n){return n}function jn(){ri.point=wn}function wn(n,t){ri.point=Pn,Dr=Zr=n,Ur=kr=t}function Pn(n,t){ti.add(kr*n-Zr*t),Zr=n,kr=t}function Cn(){Pn(Dr,Ur)}function An(n,t){ii>n&&(ii=n),n>oi&&(oi=n),ei>t&&(ei=t),t>ui&&(ui=t)}function bn(n,t){fi+=n,ai+=t,++li}function qn(){Ei.point=zn}function zn(n,t){Ei.point=Ln,bn(Kr=n,Qr=t)}function Ln(n,t){var r=n-Kr,i=t-Qr,e=qr(r*r+i*i);pi+=e*(Kr+n)/2,si+=e*(Qr+t)/2,vi+=e,bn(Kr=n,Qr=t)}function Rn(){Ei.point=bn}function On(){Ei.point=Gn}function Tn(){Fn(Hr,Jr)}function Gn(n,t){Ei.point=Fn,bn(Hr=Kr=n,Jr=Qr=t)}function Fn(n,t){var r=n-Kr,i=t-Qr,e=qr(r*r+i*i);pi+=e*(Kr+n)/2,si+=e*(Qr+t)/2,vi+=e,e=Qr*n-Kr*t,hi+=e*(Kr+n),gi+=e*(Qr+t),di+=3*e,bn(Kr=n,Qr=t)}function In(n){function t(t,r){n.moveTo(t+u,r),n.arc(t,r,u,0,Er)}function r(t,r){n.moveTo(t,r),c.point=i}function i(t,r){n.lineTo(t,r)}function e(){c.point=t}function o(){n.closePath()}var u=4.5,c={point:t,lineStart:function(){c.point=r},lineEnd:e,polygonStart:function(){c.lineEnd=o},polygonEnd:function(){c.lineEnd=e,c.point=t},pointRadius:function(n){return u=n,c},result:f};return c}function _n(){function n(n,t){c.push("M",n,",",t,u)}function t(n,t){c.push("M",n,",",t),f.point=r}function r(n,t){c.push("L",n,",",t)}function i(){f.point=t}function e(){f.point=n}function o(){c.push("Z")}var u=Bn(4.5),c=[],f={point:n,lineStart:i,lineEnd:e,polygonStart:function(){f.lineEnd=o},polygonEnd:function(){f.lineEnd=e,f.point=n},pointRadius:function(n){return u=Bn(n),f},result:function(){if(c.length){var n=c.join("");return c=[],n}}};return f}function Bn(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Dn(){function n(n){return n&&("function"==typeof o&&e.pointRadius(+o.apply(this,arguments)),s(n,i(e))),e.result()}var t,r,i,e,o=4.5;return n.area=function(n){return s(n,i(ri)),ri.result()},n.bounds=function(n){return s(n,i(ci)),ci.result()},n.centroid=function(n){return s(n,i(Ei)),Ei.result()},n.projection=function(r){return arguments.length?(i=(t=r)?r.stream:Nn,n):t},n.context=function(t){return arguments.length?(e=null==(r=t)?new _n:new In(t),"function"!=typeof o&&e.pointRadius(o),n):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(e.pointRadius(+t),+t),n):o},n.projection(null).context(null)}function Un(n,t){for(var r=t[0],i=t[1],e=[Ar(r),-Nr(r),0],o=0,c=0,f=0,a=n.length;a>f;++f)if(p=(l=n[f]).length)for(var l,p,s=l[p-1],v=s[0],h=s[1]/2+dr,g=Ar(h),d=Nr(h),E=0;p>E;++E,v=m,g=N,d=w,s=S){var S=l[E],m=S[0],x=S[1]/2+dr,N=Ar(x),w=Nr(x),P=m-v,C=P>=0?1:-1,A=C*P,b=A>hr,q=g*N;if(Si.add(xr(q*C*Ar(A),d*w+q*Nr(A))),o+=b?P+C*Er:P,b^v>=r^m>=r){var z=M(y(s),y(S));j(z);var L=M(e,z);j(L);var R=(b^P>=0?-1:1)*u(L[2]);(i>R||i===R&&(z[0]||z[1]))&&(c+=b^P>=0?1:-1)}}var O=(-sr>o||sr>o&&-sr>Si)^1&c;return Si.reset(),O}function Zn(n,r,i,e){return function(o,u){function c(t,r){var i=o(t,r);n(t=i[0],r=i[1])&&u.point(t,r)}function f(n,t){var r=o(n,t);E.point(r[0],r[1])}function a(){x.point=f,E.lineStart()}function l(){x.point=c,E.lineEnd()}function p(n,t){d.push([n,t]);var r=o(n,t);m.point(r[0],r[1])}function s(){m.lineStart(),d=[]}function v(){p(d[0][0],d[0][1]),m.lineEnd();var n,t,r,i,e=m.clean(),o=y.result(),c=o.length;if(d.pop(),h.push(d),d=null,c)if(1&e){if(r=o[0],(t=r.length-1)>0){for(M||(u.polygonStart(),M=!0),u.lineStart(),n=0;t>n;++n)u.point((i=r[n])[0],i[1]);u.lineEnd()}}else c>1&&2&e&&o.push(o.pop().concat(o.shift())),g.push(o.filter(kn))}var h,g,d,E=r(u),S=o.invert(e[0],e[1]),y=on(),m=r(y),M=!1,x={point:c,lineStart:a,lineEnd:l,polygonStart:function(){x.point=p,x.lineStart=s,x.lineEnd=v,g=[],h=[]},polygonEnd:function(){x.point=c,x.lineStart=a,x.lineEnd=l,g=t.merge(g);var n=Un(h,S);g.length?(M||(u.polygonStart(),M=!0),an(g,Hn,n,i,u)):n&&(M||(u.polygonStart(),M=!0),u.lineStart(),i(null,null,1,u),u.lineEnd()),M&&(u.polygonEnd(),M=!1),g=h=null},sphere:function(){u.polygonStart(),u.lineStart(),i(null,null,1,u),u.lineEnd(),u.polygonEnd()}};return x}}function kn(n){return n.length>1}function Hn(n,t){return((n=n.x)[0]<0?n[1]-gr-sr:gr-n[1])-((t=t.x)[0]<0?t[1]-gr-sr:gr-t[1])}function Jn(n){var t,r=NaN,i=NaN,e=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var c=o>0?hr:-hr,f=mr(o-r);mr(f-hr)<sr?(n.point(r,i=(i+u)/2>0?gr:-gr),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),n.point(o,i),t=0):e!==c&&f>=hr&&(mr(r-e)<sr&&(r-=e*sr),mr(o-c)<sr&&(o-=c*sr),i=Kn(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 Kn(n,t,r,i){var e,o,u=Ar(n-r);return mr(u)>sr?Mr((Ar(t)*(o=Nr(i))*Ar(r)-Ar(i)*(e=Nr(t))*Ar(n))/(e*o*u)):(t+i)/2}function Qn(n,t,r,i){var e;if(null==n)e=r*gr,i.point(-hr,e),i.point(0,e),i.point(hr,e),i.point(hr,0),i.point(hr,-e),i.point(0,-e),i.point(-hr,-e),i.point(-hr,0),i.point(-hr,e);else if(mr(n[0]-t[0])>sr){var o=n[0]<t[0]?hr:-hr;e=r*o/2,i.point(-o,e),i.point(0,e),i.point(o,e)}else i.point(t[0],t[1])}function Vn(n,t){function r(r,i,e,o){tn(o,n,t,e,r,i)}function i(n,t){return Nr(n)*Nr(t)>c}function e(n){var t,r,e,c,l;return{lineStart:function(){c=e=!1,l=1},point:function(p,s){var v,h=[p,s],g=i(p,s),d=f?g?0:u(p,s):g?u(p+(0>p?hr:-hr),s):0;if(!t&&(c=e=g)&&n.lineStart(),g!==e&&(v=o(t,h),(cn(t,v)||cn(h,v))&&(h[0]+=sr,h[1]+=sr,g=i(h[0],h[1]))),g!==e)l=0,g?(n.lineStart(),v=o(h,t),n.point(v[0],v[1])):(v=o(t,h),n.point(v[0],v[1]),n.lineEnd()),t=v;else if(a&&t&&f^g){var E;d&r||!(E=o(h,t,!0))||(l=0,f?(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])))}!g||t&&cn(t,h)||n.point(h[0],h[1]),t=h,e=g,r=d},lineEnd:function(){e&&n.lineEnd(),t=null},clean:function(){return l|(c&&e)<<1}}}function o(n,t,r){var i=y(n),e=y(t),o=[1,0,0],u=M(i,e),f=m(u,u),a=u[0],l=f-a*a;if(!l)return!r&&n;var p=c*f/l,s=-c*a/l,v=M(o,u),h=N(o,p),g=N(u,s);x(h,g);var d=v,E=m(h,d),j=m(d,d),w=E*E-j*(m(h,h)-1);if(!(0>w)){var P=qr(w),C=N(d,(-E-P)/j);if(x(C,h),C=S(C),!r)return C;var A,b=n[0],q=t[0],z=n[1],L=t[1];b>q&&(A=b,b=q,q=A);var R=q-b,O=mr(R-hr)<sr,T=O||sr>R;if(!O&&z>L&&(A=z,z=L,L=A),T?O?z+L>0^C[1]<(mr(C[0]-b)<sr?z:L):z<=C[1]&&C[1]<=L:R>hr^(b<=C[0]&&C[0]<=q)){var G=N(d,(-E+P)/j);return x(G,h),[C,S(G)]}}}function u(t,r){var i=f?n:hr-n,e=0;return-i>t?e|=1:t>i&&(e|=2),-i>r?e|=4:r>i&&(e|=8),e}var c=Nr(n),f=c>0,a=mr(c)>sr;return Zn(i,e,r,f?[0,-n]:[-hr,n-hr])}function Wn(n){function t(){}var r=t.prototype=Object.create(Xn.prototype);for(var i in n)r[i]=n[i];return function(n){var r=new t;return r.stream=n,r}}function Xn(){}function Yn(n,t){return+t?nt(n,t*t):$n(n)}function $n(n){return Wn({point:function(t,r){t=n(t,r),this.stream.point(t[0],t[1])}})}function nt(n,t){function r(i,e,o,c,f,a,l,p,s,v,h,g,d,E){var S=l-i,y=p-e,m=S*S+y*y;if(m>4*t&&d--){var M=c+v,x=f+h,N=a+g,j=qr(M*M+x*x+N*N),w=u(N/=j),P=mr(mr(N)-1)<sr||mr(o-s)<sr?(o+s)/2:xr(x,M),C=n(P,w),A=C[0],b=C[1],q=A-i,z=b-e,L=y*q-S*z;(L*L/m>t||mr((S*q+y*z)/m-.5)>.3||Mi>c*v+f*h+a*g)&&(r(i,e,o,c,f,a,A,b,P,M/=j,x/=j,N,d,E),E.point(A,b),r(A,b,P,M,x,N,l,p,s,v,h,g,d,E))}}return function(t){function i(r,i){r=n(r,i),t.point(r[0],r[1])}function e(){E=NaN,N.point=o,t.lineStart()}function o(i,e){var o=y([i,e]),u=n(i,e);r(E,S,d,m,M,x,E=u[0],S=u[1],d=i,m=o[0],M=o[1],x=o[2],mi,t),t.point(E,S)}function u(){N.point=i,t.lineEnd()}function c(){e(),N.point=f,N.lineEnd=a}function f(n,t){o(l=n,t),p=E,s=S,v=m,h=M,g=x,N.point=o}function a(){r(E,S,d,m,M,x,p,s,l,v,h,g,mi,t),N.lineEnd=u,u()}var l,p,s,v,h,g,d,E,S,m,M,x,N={point:i,lineStart:e,lineEnd:u,polygonStart:function(){t.polygonStart(),N.lineStart=c},polygonEnd:function(){t.polygonEnd(),N.lineStart=e}};return N}}function tt(n){return rt(function(){return n})()}function rt(n){function t(n){return n=l(n[0]*yr,n[1]*yr),[n[0]*d+c,f-n[1]*d]}function r(n){return n=l.invert((n[0]-c)/d,(f-n[1])/d),n&&[n[0]*Sr,n[1]*Sr]}function i(n,t){return n=u(n,t),[n[0]*d+c,f-n[1]*d]}function e(){l=Q(a=W(M,x,N),u);var n=u(y,m);return c=E-n[0]*d,f=S+n[1]*d,o()}function o(){return h=g=null,t}var u,c,f,a,l,p,s,v,h,g,d=150,E=480,S=250,y=0,m=0,M=0,x=0,N=0,j=null,w=yi,P=null,C=Nn,A=6*yr,b=Yn(i,A);return t.stream=function(n){return h&&g===n?h:h=xi(w(a,b(C(g=n))))},t.clipAngle=function(n){return arguments.length?(w=+n?Vn(j=n*yr,A):(j=null,yi),o()):j*Sr},t.clipExtent=function(n){return arguments.length?(C=null==n?(P=p=s=v=null,Nn):pn(P=+n[0][0],p=+n[0][1],s=+n[1][0],v=+n[1][1]),o()):null==P?null:[[P,p],[s,v]]},t.scale=function(n){return arguments.length?(d=+n,e()):d},t.translate=function(n){return arguments.length?(E=+n[0],S=+n[1],e()):[E,S]},t.center=function(n){return arguments.length?(y=n[0]%360*yr,m=n[1]%360*yr,e()):[y*Sr,m*Sr]},t.rotate=function(n){return arguments.length?(M=n[0]%360*yr,x=n[1]%360*yr,N=n.length>2?n[2]%360*yr:0,e()):[M*Sr,x*Sr,N*Sr]},t.precision=function(n){return arguments.length?(b=Yn(i,A=n*yr),j&&(w=Vn(j,A)),o()):A*Sr},function(){return u=n.apply(this,arguments),t.invert=u.invert&&r,e()}}function it(n){var t=0,r=hr/3,i=rt(n),e=i(t,r);return e.parallels=function(n){return arguments.length?i(t=n[0]*yr,r=n[1]*yr):[t*Sr,r*Sr]},e}function et(n,t){function r(n,t){var r=qr(o-2*e*Ar(t))/e;return[r*Ar(n*=e),c-r*Nr(n)]}var i=Ar(n),e=(i+Ar(t))/2,o=1+i*(2*e-i),c=qr(o)/e;return r.invert=function(n,t){var r=c-t;return[xr(n,r)/e,u((o-(n*n+r*r)*e*e)/(2*e))]},r}function ot(){return it(et)}function ut(){return ot().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)}function ct(n){var t=n.length;return{point:function(r,i){for(var e=-1;++e<t;)n[e].point(r,i)},sphere:function(){for(var r=-1;++r<t;)n[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)n[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)n[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)n[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)n[r].polygonEnd()}}}function ft(){function n(n){var t=n[0],r=n[1];return u=null,i(t,r),u||(e(t,r),u)||(o(t,r),u)}var t,r,i,e,o,u,c=ut(),f=ot().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ot().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,t){u=[n,t]}};return n.invert=function(n){var t=c.scale(),r=c.translate(),i=(n[0]-r[0])/t,e=(n[1]-r[1])/t;return(e>=.12&&.234>e&&i>=-.425&&-.214>i?f:e>=.166&&.234>e&&i>=-.214&&-.115>i?a:c).invert(n)},n.stream=function(n){return t&&r===n?t:t=ct([c.stream(r=n),f.stream(n),a.stream(n)])},n.precision=function(t){return arguments.length?(c.precision(t),f.precision(t),a.precision(t),n):c.precision()},n.scale=function(t){return arguments.length?(c.scale(t),f.scale(.35*t),a.scale(t),n.translate(c.translate())):c.scale()},n.translate=function(t){if(!arguments.length)return c.translate();var r=c.scale(),u=+t[0],p=+t[1];return i=c.translate(t).clipExtent([[u-.455*r,p-.238*r],[u+.455*r,p+.238*r]]).stream(l).point,e=f.translate([u-.307*r,p+.201*r]).clipExtent([[u-.425*r+sr,p+.12*r+sr],[u-.214*r-sr,p+.234*r-sr]]).stream(l).point,o=a.translate([u-.205*r,p+.212*r]).clipExtent([[u-.214*r+sr,p+.166*r+sr],[u-.115*r-sr,p+.234*r-sr]]).stream(l).point,n},n.scale(1070)}function at(n){return function(t,r){var i=Nr(t),e=Nr(r),o=n(i*e);return[o*e*Ar(t),o*Ar(r)]}}function lt(n){return function(t,r){var i=qr(t*t+r*r),e=n(i),o=Ar(e),c=Nr(e);return[xr(t*o,i*c),u(i&&r*o/i)]}}function pt(){return tt(Ni)}function st(){return tt(ji)}function vt(n,t){return[n,Pr(zr((gr+t)/2))]}function ht(){return gt(vt)}function gt(n){var t,r=tt(n),i=r.scale,e=r.translate,o=r.clipExtent;return r.scale=function(n){return arguments.length?(i(n),t&&r.clipExtent(null),r):i()},r.translate=function(n){return arguments.length?(e(n),t&&r.clipExtent(null),r):e()},r.clipExtent=function(n){if(!arguments.length)return t?null:o();if(t=null==n){var u=hr*i(),c=e();n=[[c[0]-u,c[1]-u],[c[0]+u,c[1]+u]]}return o(n),r},r.clipExtent(null)}function dt(n){return zr((gr+n)/2)}function Et(n,t){function r(n,t){o>0?-gr+sr>t&&(t=-gr+sr):t>gr-sr&&(t=gr-sr);var r=o/Cr(dt(t),e);return[r*Ar(e*n),o-r*Nr(e*n)]}var i=Nr(n),e=n===t?Ar(n):Pr(i/Nr(t))/Pr(dt(t)/dt(n)),o=i*Cr(dt(n),e)/e;return e?(r.invert=function(n,t){var r=o-t,i=br(e)*qr(n*n+r*r);return[xr(n,r)/e,2*Mr(Cr(o/i,1/e))-gr]},r):vt}function St(){return it(Et)}function yt(n,t){return[n,t]}function mt(){return tt(yt)}function Mt(n,t){function r(n,t){var r=o-t,i=e*n;return[r*Ar(i),o-r*Nr(i)]}var i=Nr(n),e=n===t?Ar(n):(i-Nr(t))/(t-n),o=i/e+n;return mr(e)<sr?yt:(r.invert=function(n,t){var r=o-t;return[xr(n,r)/e,o-br(e)*qr(n*n+r*r)]},r)}function xt(){return it(Mt)}function Nt(n,t){var r=Nr(t),i=Nr(n)*r;return[r*Ar(n)/i,Ar(t)/i]}function jt(){return tt(Nt)}function wt(n,t){return[Nr(t)*Ar(n),Ar(t)]}function Pt(){return tt(wt)}function Ct(n,t){var r=Nr(t),i=1+Nr(n)*r;return[r*Ar(n)/i,Ar(t)/i]}function At(){return tt(Ct)}function bt(n,t){return[Pr(zr((gr+t)/2)),-n]}function qt(){var n=gt(bt),t=n.center,r=n.rotate;return n.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90])}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(n){e(pr,n,this.t),e(this,pr.s,this.s),this.s?this.t+=pr.t:this.s=pr.t},valueOf:function(){return this.s}};var zt,Lt,Rt,Ot,Tt,Gt,Ft,It,_t,Bt,Dt,Ut,Zt,kt,Ht,Jt,Kt,Qt,Vt,Wt,Xt,Yt,$t,nr,tr,rr,ir,er,or,ur,cr,fr,ar,lr,pr=new i,sr=1e-6,vr=1e-12,hr=Math.PI,gr=hr/2,dr=hr/4,Er=2*hr,Sr=180/hr,yr=hr/180,mr=Math.abs,Mr=Math.atan,xr=Math.atan2,Nr=Math.cos,jr=Math.ceil,wr=Math.exp,Pr=Math.log,Cr=Math.pow,Ar=Math.sin,br=Math.sign||function(n){return n>0?1:0>n?-1:0},qr=Math.sqrt,zr=Math.tan,Lr={Feature:function(n,t){a(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i<e;)a(r[i].geometry,t)}},Rr={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)n=r[i],t.point(n[0],n[1],n[2])},LineString:function(n,t){l(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)l(r[i],t,0)},Polygon:function(n,t){p(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)p(r[i],t)},GeometryCollection:function(n,t){for(var r=n.geometries,i=-1,e=r.length;++i<e;)a(r[i],t)}},Or={point:f,lineStart:f,lineEnd:f,polygonStart:function(){zt.reset(),Or.lineStart=v,Or.lineEnd=h},polygonEnd:function(){var n=+zt;Lt.add(0>n?Er+n:n),this.lineStart=this.lineEnd=this.point=f},sphere:function(){Lt.add(Er)}},Tr={point:w,lineStart:C,lineEnd:A,polygonStart:function(){Tr.point=b,Tr.lineStart=q,Tr.lineEnd=z,Jt.reset(),Or.polygonStart()},polygonEnd:function(){Or.polygonEnd(),Tr.point=w,Tr.lineStart=C,Tr.lineEnd=A,0>zt?(It=-(Bt=180),_t=-(Dt=90)):Jt>sr?Dt=90:-sr>Jt&&(_t=-90),Qt[0]=It,Qt[1]=Bt}},Gr={sphere:f,point:G,lineStart:I,lineEnd:D,polygonStart:function(){Gr.lineStart=U,Gr.lineEnd=Z},polygonEnd:function(){Gr.lineStart=I,Gr.lineEnd=D}};V.invert=V;var Fr,Ir,_r,Br,Dr,Ur,Zr,kr,Hr,Jr,Kr,Qr,Vr=1e9,Wr=-Vr,Xr={sphere:f,point:f,lineStart:vn,lineEnd:f,polygonStart:f,polygonEnd:f},Yr=[null,null],$r={type:"LineString",coordinates:Yr},ni=r(),ti=r(),ri={point:f,lineStart:f,lineEnd:f,polygonStart:function(){ri.lineStart=jn,ri.lineEnd=Cn},polygonEnd:function(){ri.lineStart=ri.lineEnd=ri.point=f,ni.add(mr(ti)),ti.reset()},result:function(){var n=ni/2;return ni.reset(),n}},ii=1/0,ei=ii,oi=-ii,ui=oi,ci={point:An,lineStart:f,lineEnd:f,polygonStart:f,polygonEnd:f,result:function(){var n=[[ii,ei],[oi,ui]];return oi=ui=-(ei=ii=1/0),n}},fi=0,ai=0,li=0,pi=0,si=0,vi=0,hi=0,gi=0,di=0,Ei={point:bn,lineStart:qn,lineEnd:Rn,polygonStart:function(){Ei.lineStart=On,Ei.lineEnd=Tn},polygonEnd:function(){Ei.point=bn,Ei.lineStart=qn,Ei.lineEnd=Rn},result:function(){var n=di?[hi/di,gi/di]:vi?[pi/vi,si/vi]:li?[fi/li,ai/li]:[NaN,NaN];return fi=ai=li=pi=si=vi=hi=gi=di=0,n}},Si=r(),yi=Zn(function(){return!0},Jn,Qn,[-hr,-gr]);Xn.prototype={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 mi=16,Mi=Nr(30*yr),xi=Wn({point:function(n,t){this.stream.point(n*yr,t*yr)}}),Ni=at(function(n){return qr(2/(1+n))});Ni.invert=lt(function(n){return 2*u(n/2)});var ji=at(function(n){return(n=o(n))&&n/Ar(n)});ji.invert=lt(function(n){return n}),vt.invert=function(n,t){return[n,2*Mr(wr(t))-gr]},yt.invert=yt,Nt.invert=lt(Mr),wt.invert=lt(u),Ct.invert=lt(function(n){return 2+Mr(n)}),bt.invert=function(n,t){return[-t,2*Mr(wr(n))-gr]},n.geoArea=E,n.geoBounds=T,n.geoCentroid=J,n.geoCircle=en,n.geoClipExtent=sn,n.geoDistance=Sn,n.geoGraticule=Mn,n.geoInterpolate=xn,n.geoLength=En,n.geoPath=Dn,n.geoAlbers=ut,n.geoAlbersUsa=ft,n.geoAzimuthalEqualArea=pt,n.geoAzimuthalEquidistant=st,n.geoConicConformal=St,n.geoConicEqualArea=ot,n.geoConicEquidistant=xt,n.geoEquirectangular=mt,n.geoGnomonic=jt,n.geoProjection=tt,n.geoProjectionMutator=rt,n.geoMercator=ht,n.geoOrthographic=Pt,n.geoStereographic=At,n.geoTransverseMercator=qt,n.geoRotation=nn,n.geoStream=s,n.geoTransform=Wn,Object.defineProperty(n,"__esModule",{value:!0})});
// https://d3js.org/d3-geo/ Version 0.0.3. Copyright 2016 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(){return new i}function i(){this.reset()}function e(n,t,r){var i=n.s=t+r,e=i-t,o=i-e;n.t=t-o+(r-e)}function o(n){return n>1?0:-1>n?gr:Math.acos(n)}function u(n){return n>1?hr:-1>n?-hr:Math.asin(n)}function c(n){return(n=Cr(n/2))*n}function f(){}function a(n,t){n&&Rr.hasOwnProperty(n.type)&&Rr[n.type](n,t)}function l(n,t,r){var i,e=-1,o=n.length-r;for(t.lineStart();++e<o;)i=n[e],t.point(i[0],i[1],i[2]);t.lineEnd()}function p(n,t){var r=-1,i=n.length;for(t.polygonStart();++r<i;)l(n[r],t,1);t.polygonEnd()}function s(n,t){n&&Lr.hasOwnProperty(n.type)?Lr[n.type](n,t):a(n,t)}function v(){Or.point=h}function g(){d(Rt,Ot)}function h(n,t){Or.point=d,Rt=n,Ot=t,n*=yr,t*=yr,Tt=n,Gt=Nr(t=t/2+dr),Ft=Cr(t)}function d(n,t){n*=yr,t*=yr,t=t/2+dr;var r=n-Tt,i=r>=0?1:-1,e=i*r,o=Nr(t),u=Cr(t),c=Ft*u,f=Gt*o+c*Nr(e),a=c*i*Cr(e);zt.add(xr(a,f)),Tt=n,Gt=o,Ft=u}function E(n){return Lt?Lt.reset():(Lt=r(),zt=r()),s(n,Or),2*Lt}function S(n){return[xr(n[1],n[0]),u(n[2])]}function y(n){var t=n[0],r=n[1],i=Nr(r);return[i*Nr(t),i*Cr(t),Cr(r)]}function m(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function M(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 x(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function N(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function j(n){var t=qr(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function w(n,t){Kt.push(Qt=[It=n,Bt=n]),_t>t&&(_t=t),t>Dt&&(Dt=t)}function P(n,t){var r=y([n*yr,t*yr]);if(Ht){var i=M(Ht,r),e=[i[1],-i[0],0],o=M(e,i);j(o),o=S(o);var u,c=n-Ut,f=c>0?1:-1,a=o[0]*Sr*f,l=mr(c)>180;l^(a>f*Ut&&f*n>a)?(u=o[1]*Sr,u>Dt&&(Dt=u)):(a=(a+360)%360-180,l^(a>f*Ut&&f*n>a)?(u=-o[1]*Sr,_t>u&&(_t=u)):(_t>t&&(_t=t),t>Dt&&(Dt=t))),l?Ut>n?L(It,n)>L(It,Bt)&&(Bt=n):L(n,Bt)>L(It,Bt)&&(It=n):Bt>=It?(It>n&&(It=n),n>Bt&&(Bt=n)):n>Ut?L(It,n)>L(It,Bt)&&(Bt=n):L(n,Bt)>L(It,Bt)&&(It=n)}else w(n,t);Ht=r,Ut=n}function A(){Tr.point=P}function C(){Qt[0]=It,Qt[1]=Bt,Tr.point=w,Ht=null}function b(n,t){if(Ht){var r=n-Ut;Jt.add(mr(r)>180?r+(r>0?360:-360):r)}else Zt=n,kt=t;Or.point(n,t),P(n,t)}function q(){Or.lineStart()}function z(){b(Zt,kt),Or.lineEnd(),mr(Jt)>sr&&(It=-(Bt=180)),Qt[0]=It,Qt[1]=Bt,Ht=null}function L(n,t){return(t-=n)<0?t+360:t}function R(n,t){return n[0]-t[0]}function O(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}function T(n){var t,i,e,o,u,c,f;if(Jt?Jt.reset():Jt=r(),Dt=Bt=-(It=_t=1/0),Kt=[],s(n,Tr),i=Kt.length){for(Kt.sort(R),t=1,e=Kt[0],u=[e];i>t;++t)o=Kt[t],O(e,o[0])||O(e,o[1])?(L(e[0],o[1])>L(e[0],e[1])&&(e[1]=o[1]),L(o[0],e[1])>L(e[0],e[1])&&(e[0]=o[0])):u.push(e=o);for(c=-(1/0),i=u.length-1,t=0,e=u[i];i>=t;e=o,++t)o=u[t],(f=L(e[1],o[0]))>c&&(c=f,It=o[0],Bt=e[1])}return Kt=Qt=null,It===1/0||_t===1/0?[[NaN,NaN],[NaN,NaN]]:[[It,_t],[Bt,Dt]]}function G(n,t){n*=yr,t*=yr;var r=Nr(t);F(r*Nr(n),r*Cr(n),Cr(t))}function F(n,t,r){++Vt,Xt+=(n-Xt)/Vt,Yt+=(t-Yt)/Vt,$t+=(r-$t)/Vt}function I(){Gr.point=_}function _(n,t){n*=yr,t*=yr;var r=Nr(t);fr=r*Nr(n),ar=r*Cr(n),lr=Cr(t),Gr.point=B,F(fr,ar,lr)}function B(n,t){n*=yr,t*=yr;var r=Nr(t),i=r*Nr(n),e=r*Cr(n),o=Cr(t),u=xr(qr((u=ar*o-lr*e)*u+(u=lr*i-fr*o)*u+(u=fr*e-ar*i)*u),fr*i+ar*e+lr*o);Wt+=u,nr+=u*(fr+(fr=i)),tr+=u*(ar+(ar=e)),rr+=u*(lr+(lr=o)),F(fr,ar,lr)}function D(){Gr.point=G}function U(){Gr.point=k}function Z(){H(ur,cr),Gr.point=G}function k(n,t){ur=n,cr=t,n*=yr,t*=yr,Gr.point=H;var r=Nr(t);fr=r*Nr(n),ar=r*Cr(n),lr=Cr(t),F(fr,ar,lr)}function H(n,t){n*=yr,t*=yr;var r=Nr(t),i=r*Nr(n),e=r*Cr(n),u=Cr(t),c=ar*u-lr*e,f=lr*i-fr*u,a=fr*e-ar*i,l=qr(c*c+f*f+a*a),p=fr*i+ar*e+lr*u,s=l&&-o(p)/l,v=xr(l,p);ir+=s*c,er+=s*f,or+=s*a,Wt+=v,nr+=v*(fr+(fr=i)),tr+=v*(ar+(ar=e)),rr+=v*(lr+(lr=u)),F(fr,ar,lr)}function J(n){Vt=Wt=Xt=Yt=$t=nr=tr=rr=ir=er=or=0,s(n,Gr);var t=ir,r=er,i=or,e=t*t+r*r+i*i;return vr>e&&(t=nr,r=tr,i=rr,sr>Wt&&(t=Xt,r=Yt,i=$t),e=t*t+r*r+i*i,vr>e)?[NaN,NaN]:[xr(r,t)*Sr,u(i/qr(e))*Sr]}function K(n){return function(){return n}}function Q(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),r&&n.invert(r[0],r[1])}),r}function V(n,t){return[n>gr?n-Er:-gr>n?n+Er:n,t]}function W(n,t,r){return(n%=Er)?t||r?Q(Y(n),$(t,r)):Y(n):t||r?$(t,r):V}function X(n){return function(t,r){return t+=n,[t>gr?t-Er:-gr>t?t+Er:t,r]}}function Y(n){var t=X(n);return t.invert=X(-n),t}function $(n,t){function r(n,t){var r=Nr(t),f=Nr(n)*r,a=Cr(n)*r,l=Cr(t),p=l*i+f*e;return[xr(a*o-p*c,f*i-l*e),u(p*o+a*c)]}var i=Nr(n),e=Cr(n),o=Nr(t),c=Cr(t);return r.invert=function(n,t){var r=Nr(t),f=Nr(n)*r,a=Cr(n)*r,l=Cr(t),p=l*o-a*c;return[xr(a*o+l*c,f*i+p*e),u(p*i-f*e)]},r}function nn(n){function t(t){return t=n(t[0]*yr,t[1]*yr),t[0]*=Sr,t[1]*=Sr,t}return n=W(n[0]*yr,n[1]*yr,n.length>2?n[2]*yr:0),t.invert=function(t){return t=n.invert(t[0]*yr,t[1]*yr),t[0]*=Sr,t[1]*=Sr,t},t}function tn(n,t,r,i,e,o){if(r){var u=Nr(t),c=Cr(t),f=i*r;null==e?(e=t+i*Er,o=t-f/2):(e=rn(u,e),o=rn(u,o),(i>0?o>e:e>o)&&(e+=i*Er));for(var a,l=e;i>0?l>o:o>l;l-=f)a=S([u,-c*Nr(l),-c*Cr(l)]),n.point(a[0],a[1])}}function rn(n,t){t=y(t),t[0]-=n,j(t);var r=o(-t[1]);return((-t[2]<0?-r:r)+Er-sr)%Er}function en(){function n(n,t){r.push(n=i(n,t)),n[0]*=Sr,n[1]*=Sr}function t(){var n=e.apply(this,arguments),t=o.apply(this,arguments)*yr,f=u.apply(this,arguments)*yr;return r=[],i=W(-n[0]*yr,-n[1]*yr,0).invert,tn(c,t,f,1),n={type:"Polygon",coordinates:[r]},r=i=null,n}var r,i,e=K([0,0]),o=K(90),u=K(6),c={point:n};return t.center=function(n){return arguments.length?(e="function"==typeof n?n:K([+n[0],+n[1]]),t):e},t.radius=function(n){return arguments.length?(o="function"==typeof n?n:K(+n),t):o},t.precision=function(n){return arguments.length?(u="function"==typeof n?n:K(+n),t):u},t}function on(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:f,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function un(n,t,r,i,e,o){var u,c=n[0],f=n[1],a=t[0],l=t[1],p=0,s=1,v=a-c,g=l-f;if(u=r-c,v||!(u>0)){if(u/=v,0>v){if(p>u)return;s>u&&(s=u)}else if(v>0){if(u>s)return;u>p&&(p=u)}if(u=e-c,v||!(0>u)){if(u/=v,0>v){if(u>s)return;u>p&&(p=u)}else if(v>0){if(p>u)return;s>u&&(s=u)}if(u=i-f,g||!(u>0)){if(u/=g,0>g){if(p>u)return;s>u&&(s=u)}else if(g>0){if(u>s)return;u>p&&(p=u)}if(u=o-f,g||!(0>u)){if(u/=g,0>g){if(u>s)return;u>p&&(p=u)}else if(g>0){if(p>u)return;s>u&&(s=u)}return p>0&&(n[0]=c+p*v,n[1]=f+p*g),1>s&&(t[0]=c+s*v,t[1]=f+s*g),!0}}}}}function cn(n,t){return mr(n[0]-t[0])<sr&&mr(n[1]-t[1])<sr}function fn(n,t,r,i){this.x=n,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function an(n,t,r,i,e){var o,u,c=[],f=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,r,i=n[0],u=n[t];if(cn(i,u)){for(e.lineStart(),o=0;t>o;++o)e.point((i=n[o])[0],i[1]);return void e.lineEnd()}c.push(r=new fn(i,n,null,!0)),f.push(r.o=new fn(i,null,r,!1)),c.push(r=new fn(u,n,null,!1)),f.push(r.o=new fn(u,null,r,!0))}}),c.length){for(f.sort(t),ln(c),ln(f),o=0,u=f.length;u>o;++o)f[o].e=r=!r;for(var a,l,p=c[0];;){for(var s=p,v=!0;s.v;)if((s=s.n)===p)return;a=s.z,e.lineStart();do{if(s.v=s.o.v=!0,s.e){if(v)for(o=0,u=a.length;u>o;++o)e.point((l=a[o])[0],l[1]);else i(s.x,s.n.x,1,e);s=s.n}else{if(v)for(a=s.p.z,o=a.length-1;o>=0;--o)e.point((l=a[o])[0],l[1]);else i(s.x,s.p.x,-1,e);s=s.p}s=s.o,a=s.z,v=!v}while(!s.v);e.lineEnd()}}}function ln(n){if(t=n.length){for(var t,r,i=0,e=n[0];++i<t;)e.n=r=n[i],r.p=e,e=r;e.n=r=n[0],r.p=e}}function pn(n,r,i,e){function o(t,o){return t>=n&&i>=t&&o>=r&&e>=o}function u(t,o,u,f){var l=0,p=0;if(null==t||(l=c(t,u))!==(p=c(o,u))||a(t,o)<0^u>0){do f.point(0===l||3===l?n:i,l>1?e:r);while((l=(l+u+4)%4)!==p)}else f.point(o[0],o[1])}function c(t,e){return mr(t[0]-n)<sr?e>0?0:3:mr(t[0]-i)<sr?e>0?2:1:mr(t[1]-r)<sr?e>0?1:0:e>0?3:2}function f(n,t){return a(n.x,t.x)}function a(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 a(n,t){o(n,t)&&A.point(n,t)}function l(){for(var t=0,r=0,i=E.length;i>r;++r)for(var o,u,c=E[r],f=1,a=c.length,l=c[0],p=l[0],s=l[1];a>f;++f)o=p,u=s,l=c[f],p=l[0],s=l[1],e>=u?s>e&&(p-o)*(e-u)>(s-u)*(n-o)&&++t:e>=s&&(s-u)*(n-o)>(p-o)*(e-u)&&--t;return t}function p(){A=C,d=[],E=[],P=!0}function s(){var n=l(),r=P&&n,i=(d=t.merge(d)).length;(r||i)&&(c.polygonStart(),r&&(c.lineStart(),u(null,null,1,c),c.lineEnd()),i&&an(d,f,n,u,c),c.polygonEnd()),A=c,d=E=S=null}function v(){b.point=h,E&&E.push(S=[]),w=!0,j=!1,x=N=NaN}function g(){d&&(h(y,m),M&&j&&C.rejoin(),d.push(C.result())),b.point=a,j&&A.lineEnd()}function h(t,u){var c=o(t,u);if(E&&S.push([t,u]),w)y=t,m=u,M=c,w=!1,c&&(A.lineStart(),A.point(t,u));else if(c&&j)A.point(t,u);else{var f=[x=Math.max(Wr,Math.min(Vr,x)),N=Math.max(Wr,Math.min(Vr,N))],a=[t=Math.max(Wr,Math.min(Vr,t)),u=Math.max(Wr,Math.min(Vr,u))];un(f,a,n,r,i,e)?(j||(A.lineStart(),A.point(f[0],f[1])),A.point(a[0],a[1]),c||A.lineEnd(),P=!1):c&&(A.lineStart(),A.point(t,u),P=!1)}x=t,N=u,j=c}var d,E,S,y,m,M,x,N,j,w,P,A=c,C=on(),b={point:a,lineStart:v,lineEnd:g,polygonStart:p,polygonEnd:s};return b}}function sn(){var n,t,r,i=0,e=0,o=960,u=500;return r={stream:function(r){return n&&t===r?n:n=pn(i,e,o,u)(t=r)},extent:function(c){return arguments.length?(i=+c[0][0],e=+c[0][1],o=+c[1][0],u=+c[1][1],n=t=null,r):[[i,e],[o,u]]}}}function vn(){Xr.point=hn,Xr.lineEnd=gn}function gn(){Xr.point=Xr.lineEnd=f}function hn(n,t){n*=yr,t*=yr,Ir=n,_r=Cr(t),Br=Nr(t),Xr.point=dn}function dn(n,t){n*=yr,t*=yr;var r=Cr(t),i=Nr(t),e=mr(n-Ir),o=Nr(e),u=Cr(e),c=i*u,f=Br*r-_r*i*o,a=_r*r+Br*i*o;Fr.add(xr(qr(c*c+f*f),a)),Ir=n,_r=r,Br=i}function En(n){return Fr?Fr.reset():Fr=r(),s(n,Xr),+Fr}function Sn(n,t){return Yr[0]=n,Yr[1]=t,En($r)}function yn(n,r,i){var e=t.range(n,r-sr,i).concat(r);return function(n){return e.map(function(t){return[n,t]})}}function mn(n,r,i){var e=t.range(n,r-sr,i).concat(r);return function(n){return e.map(function(t){return[t,n]})}}function Mn(){function n(){return{type:"MultiLineString",coordinates:r()}}function r(){return t.range(jr(u/E)*E,o,E).map(v).concat(t.range(jr(l/S)*S,a,S).map(g)).concat(t.range(jr(e/h)*h,i,h).filter(function(n){return mr(n%E)>sr}).map(p)).concat(t.range(jr(f/d)*d,c,d).filter(function(n){return mr(n%S)>sr}).map(s))}var i,e,o,u,c,f,a,l,p,s,v,g,h=10,d=h,E=90,S=360,y=2.5;return n.lines=function(){return r().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[v(u).concat(g(a).slice(1),v(o).reverse().slice(1),g(l).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],l=+t[0][1],a=+t[1][1],u>o&&(t=u,u=o,o=t),l>a&&(t=l,l=a,a=t),n.precision(y)):[[u,l],[o,a]]},n.extentMinor=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],f=+t[0][1],c=+t[1][1],e>i&&(t=e,e=i,i=t),f>c&&(t=f,f=c,c=t),n.precision(y)):[[e,f],[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],S=+t[1],n):[E,S]},n.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],n):[h,d]},n.precision=function(t){return arguments.length?(y=+t,p=yn(f,c,90),s=mn(e,i,y),v=yn(l,a,90),g=mn(u,o,y),n):y},n.extentMajor([[-180,-90+sr],[180,90-sr]]).extentMinor([[-180,-80-sr],[180,80+sr]])}function xn(n,t){var r=n[0]*yr,i=n[1]*yr,e=t[0]*yr,o=t[1]*yr,f=Nr(i),a=Cr(i),l=Nr(o),p=Cr(o),s=f*Nr(r),v=f*Cr(r),g=l*Nr(e),h=l*Cr(e),d=2*u(qr(c(o-i)+f*l*c(e-r))),E=Cr(d),S=d?function(n){var t=Cr(n*=d)/E,r=Cr(d-n)/E,i=r*s+t*g,e=r*v+t*h,o=r*a+t*p;return[xr(e,i)*Sr,xr(o,qr(i*i+e*e))*Sr]}:function(){return[r*Sr,i*Sr]};return S.distance=d,S}function Nn(n){return n}function jn(){ri.point=wn}function wn(n,t){ri.point=Pn,Dr=Zr=n,Ur=kr=t}function Pn(n,t){ti.add(kr*n-Zr*t),Zr=n,kr=t}function An(){Pn(Dr,Ur)}function Cn(n,t){ii>n&&(ii=n),n>oi&&(oi=n),ei>t&&(ei=t),t>ui&&(ui=t)}function bn(n,t){fi+=n,ai+=t,++li}function qn(){Ei.point=zn}function zn(n,t){Ei.point=Ln,bn(Kr=n,Qr=t)}function Ln(n,t){var r=n-Kr,i=t-Qr,e=qr(r*r+i*i);pi+=e*(Kr+n)/2,si+=e*(Qr+t)/2,vi+=e,bn(Kr=n,Qr=t)}function Rn(){Ei.point=bn}function On(){Ei.point=Gn}function Tn(){Fn(Hr,Jr)}function Gn(n,t){Ei.point=Fn,bn(Hr=Kr=n,Jr=Qr=t)}function Fn(n,t){var r=n-Kr,i=t-Qr,e=qr(r*r+i*i);pi+=e*(Kr+n)/2,si+=e*(Qr+t)/2,vi+=e,e=Qr*n-Kr*t,gi+=e*(Kr+n),hi+=e*(Qr+t),di+=3*e,bn(Kr=n,Qr=t)}function In(n){function t(t,r){n.moveTo(t+u,r),n.arc(t,r,u,0,Er)}function r(t,r){n.moveTo(t,r),c.point=i}function i(t,r){n.lineTo(t,r)}function e(){c.point=t}function o(){n.closePath()}var u=4.5,c={point:t,lineStart:function(){c.point=r},lineEnd:e,polygonStart:function(){c.lineEnd=o},polygonEnd:function(){c.lineEnd=e,c.point=t},pointRadius:function(n){return u=n,c},result:f};return c}function _n(){function n(n,t){c.push("M",n,",",t,u)}function t(n,t){c.push("M",n,",",t),f.point=r}function r(n,t){c.push("L",n,",",t)}function i(){f.point=t}function e(){f.point=n}function o(){c.push("Z")}var u=Bn(4.5),c=[],f={point:n,lineStart:i,lineEnd:e,polygonStart:function(){f.lineEnd=o},polygonEnd:function(){f.lineEnd=e,f.point=n},pointRadius:function(n){return u=Bn(n),f},result:function(){if(c.length){var n=c.join("");return c=[],n}}};return f}function Bn(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Dn(){function n(n){return n&&("function"==typeof o&&e.pointRadius(+o.apply(this,arguments)),s(n,i(e))),e.result()}var t,r,i,e,o=4.5;return n.area=function(n){return s(n,i(ri)),ri.result()},n.bounds=function(n){return s(n,i(ci)),ci.result()},n.centroid=function(n){return s(n,i(Ei)),Ei.result()},n.projection=function(r){return arguments.length?(i=(t=r)?r.stream:Nn,n):t},n.context=function(t){return arguments.length?(e=null==(r=t)?new _n:new In(t),"function"!=typeof o&&e.pointRadius(o),n):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(e.pointRadius(+t),+t),n):o},n.projection(null).context(null)}function Un(n,t){for(var r=t[0],i=t[1],e=[Cr(r),-Nr(r),0],o=0,c=0,f=0,a=n.length;a>f;++f)if(p=(l=n[f]).length)for(var l,p,s=l[p-1],v=s[0],g=s[1]/2+dr,h=Cr(g),d=Nr(g),E=0;p>E;++E,v=m,h=N,d=w,s=S){var S=l[E],m=S[0],x=S[1]/2+dr,N=Cr(x),w=Nr(x),P=m-v,A=P>=0?1:-1,C=A*P,b=C>gr,q=h*N;if(Si.add(xr(q*A*Cr(C),d*w+q*Nr(C))),o+=b?P+A*Er:P,b^v>=r^m>=r){var z=M(y(s),y(S));j(z);var L=M(e,z);j(L);var R=(b^P>=0?-1:1)*u(L[2]);(i>R||i===R&&(z[0]||z[1]))&&(c+=b^P>=0?1:-1)}}var O=(-sr>o||sr>o&&-sr>Si)^1&c;return Si.reset(),O}function Zn(n,r,i,e){return function(o,u){function c(t,r){var i=o(t,r);n(t=i[0],r=i[1])&&u.point(t,r)}function f(n,t){var r=o(n,t);E.point(r[0],r[1])}function a(){x.point=f,E.lineStart()}function l(){x.point=c,E.lineEnd()}function p(n,t){d.push([n,t]);var r=o(n,t);m.point(r[0],r[1])}function s(){m.lineStart(),d=[]}function v(){p(d[0][0],d[0][1]),m.lineEnd();var n,t,r,i,e=m.clean(),o=y.result(),c=o.length;if(d.pop(),g.push(d),d=null,c)if(1&e){if(r=o[0],(t=r.length-1)>0){for(M||(u.polygonStart(),M=!0),u.lineStart(),n=0;t>n;++n)u.point((i=r[n])[0],i[1]);u.lineEnd()}}else c>1&&2&e&&o.push(o.pop().concat(o.shift())),h.push(o.filter(kn))}var g,h,d,E=r(u),S=o.invert(e[0],e[1]),y=on(),m=r(y),M=!1,x={point:c,lineStart:a,lineEnd:l,polygonStart:function(){x.point=p,x.lineStart=s,x.lineEnd=v,h=[],g=[]},polygonEnd:function(){x.point=c,x.lineStart=a,x.lineEnd=l,h=t.merge(h);var n=Un(g,S);h.length?(M||(u.polygonStart(),M=!0),an(h,Hn,n,i,u)):n&&(M||(u.polygonStart(),M=!0),u.lineStart(),i(null,null,1,u),u.lineEnd()),M&&(u.polygonEnd(),M=!1),h=g=null},sphere:function(){u.polygonStart(),u.lineStart(),i(null,null,1,u),u.lineEnd(),u.polygonEnd()}};return x}}function kn(n){return n.length>1}function Hn(n,t){return((n=n.x)[0]<0?n[1]-hr-sr:hr-n[1])-((t=t.x)[0]<0?t[1]-hr-sr:hr-t[1])}function Jn(n){var t,r=NaN,i=NaN,e=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var c=o>0?gr:-gr,f=mr(o-r);mr(f-gr)<sr?(n.point(r,i=(i+u)/2>0?hr:-hr),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),n.point(o,i),t=0):e!==c&&f>=gr&&(mr(r-e)<sr&&(r-=e*sr),mr(o-c)<sr&&(o-=c*sr),i=Kn(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 Kn(n,t,r,i){var e,o,u=Cr(n-r);return mr(u)>sr?Mr((Cr(t)*(o=Nr(i))*Cr(r)-Cr(i)*(e=Nr(t))*Cr(n))/(e*o*u)):(t+i)/2}function Qn(n,t,r,i){var e;if(null==n)e=r*hr,i.point(-gr,e),i.point(0,e),i.point(gr,e),i.point(gr,0),i.point(gr,-e),i.point(0,-e),i.point(-gr,-e),i.point(-gr,0),i.point(-gr,e);else if(mr(n[0]-t[0])>sr){var o=n[0]<t[0]?gr:-gr;e=r*o/2,i.point(-o,e),i.point(0,e),i.point(o,e)}else i.point(t[0],t[1])}function Vn(n,t){function r(r,i,e,o){tn(o,n,t,e,r,i)}function i(n,t){return Nr(n)*Nr(t)>c}function e(n){var t,r,e,c,l;return{lineStart:function(){c=e=!1,l=1},point:function(p,s){var v,g=[p,s],h=i(p,s),d=f?h?0:u(p,s):h?u(p+(0>p?gr:-gr),s):0;if(!t&&(c=e=h)&&n.lineStart(),h!==e&&(v=o(t,g),(cn(t,v)||cn(g,v))&&(g[0]+=sr,g[1]+=sr,h=i(g[0],g[1]))),h!==e)l=0,h?(n.lineStart(),v=o(g,t),n.point(v[0],v[1])):(v=o(t,g),n.point(v[0],v[1]),n.lineEnd()),t=v;else if(a&&t&&f^h){var E;d&r||!(E=o(g,t,!0))||(l=0,f?(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])))}!h||t&&cn(t,g)||n.point(g[0],g[1]),t=g,e=h,r=d},lineEnd:function(){e&&n.lineEnd(),t=null},clean:function(){return l|(c&&e)<<1}}}function o(n,t,r){var i=y(n),e=y(t),o=[1,0,0],u=M(i,e),f=m(u,u),a=u[0],l=f-a*a;if(!l)return!r&&n;var p=c*f/l,s=-c*a/l,v=M(o,u),g=N(o,p),h=N(u,s);x(g,h);var d=v,E=m(g,d),j=m(d,d),w=E*E-j*(m(g,g)-1);if(!(0>w)){var P=qr(w),A=N(d,(-E-P)/j);if(x(A,g),A=S(A),!r)return A;var C,b=n[0],q=t[0],z=n[1],L=t[1];b>q&&(C=b,b=q,q=C);var R=q-b,O=mr(R-gr)<sr,T=O||sr>R;if(!O&&z>L&&(C=z,z=L,L=C),T?O?z+L>0^A[1]<(mr(A[0]-b)<sr?z:L):z<=A[1]&&A[1]<=L:R>gr^(b<=A[0]&&A[0]<=q)){var G=N(d,(-E+P)/j);return x(G,g),[A,S(G)]}}}function u(t,r){var i=f?n:gr-n,e=0;return-i>t?e|=1:t>i&&(e|=2),-i>r?e|=4:r>i&&(e|=8),e}var c=Nr(n),f=c>0,a=mr(c)>sr;return Zn(i,e,r,f?[0,-n]:[-gr,n-gr])}function Wn(n){function t(){}var r=t.prototype=Object.create(Xn.prototype);for(var i in n)r[i]=n[i];return function(n){var r=new t;return r.stream=n,r}}function Xn(){}function Yn(n,t){return+t?nt(n,t):$n(n)}function $n(n){return Wn({point:function(t,r){t=n(t,r),this.stream.point(t[0],t[1])}})}function nt(n,t){function r(i,e,o,c,f,a,l,p,s,v,g,h,d,E){var S=l-i,y=p-e,m=S*S+y*y;if(m>4*t&&d--){var M=c+v,x=f+g,N=a+h,j=qr(M*M+x*x+N*N),w=u(N/=j),P=mr(mr(N)-1)<sr||mr(o-s)<sr?(o+s)/2:xr(x,M),A=n(P,w),C=A[0],b=A[1],q=C-i,z=b-e,L=y*q-S*z;(L*L/m>t||mr((S*q+y*z)/m-.5)>.3||Mi>c*v+f*g+a*h)&&(r(i,e,o,c,f,a,C,b,P,M/=j,x/=j,N,d,E),E.point(C,b),r(C,b,P,M,x,N,l,p,s,v,g,h,d,E))}}return function(t){function i(r,i){r=n(r,i),t.point(r[0],r[1])}function e(){E=NaN,N.point=o,t.lineStart()}function o(i,e){var o=y([i,e]),u=n(i,e);r(E,S,d,m,M,x,E=u[0],S=u[1],d=i,m=o[0],M=o[1],x=o[2],mi,t),t.point(E,S)}function u(){N.point=i,t.lineEnd()}function c(){e(),N.point=f,N.lineEnd=a}function f(n,t){o(l=n,t),p=E,s=S,v=m,g=M,h=x,N.point=o}function a(){r(E,S,d,m,M,x,p,s,l,v,g,h,mi,t),N.lineEnd=u,u()}var l,p,s,v,g,h,d,E,S,m,M,x,N={point:i,lineStart:e,lineEnd:u,polygonStart:function(){t.polygonStart(),N.lineStart=c},polygonEnd:function(){t.polygonEnd(),N.lineStart=e}};return N}}function tt(n){return rt(function(){return n})()}function rt(n){function t(n){return n=l(n[0]*yr,n[1]*yr),[n[0]*d+c,f-n[1]*d]}function r(n){return n=l.invert((n[0]-c)/d,(f-n[1])/d),n&&[n[0]*Sr,n[1]*Sr]}function i(n,t){return n=u(n,t),[n[0]*d+c,f-n[1]*d]}function e(){l=Q(a=W(M,x,N),u);var n=u(y,m);return c=E-n[0]*d,f=S+n[1]*d,o()}function o(){return g=h=null,t}var u,c,f,a,l,p,s,v,g,h,d=150,E=480,S=250,y=0,m=0,M=0,x=0,N=0,j=null,w=yi,P=null,A=Nn,C=.5,b=Yn(i,C);return t.stream=function(n){return g&&h===n?g:g=xi(w(a,b(A(h=n))))},t.clipAngle=function(n){return arguments.length?(w=+n?Vn(j=n*yr,6*yr):(j=null,yi),o()):j*Sr},t.clipExtent=function(n){return arguments.length?(A=null==n?(P=p=s=v=null,Nn):pn(P=+n[0][0],p=+n[0][1],s=+n[1][0],v=+n[1][1]),o()):null==P?null:[[P,p],[s,v]]},t.scale=function(n){return arguments.length?(d=+n,e()):d},t.translate=function(n){return arguments.length?(E=+n[0],S=+n[1],e()):[E,S]},t.center=function(n){return arguments.length?(y=n[0]%360*yr,m=n[1]%360*yr,e()):[y*Sr,m*Sr]},t.rotate=function(n){return arguments.length?(M=n[0]%360*yr,x=n[1]%360*yr,N=n.length>2?n[2]%360*yr:0,e()):[M*Sr,x*Sr,N*Sr]},t.precision=function(n){return arguments.length?(b=Yn(i,C=n*n),o()):qr(C)},function(){return u=n.apply(this,arguments),t.invert=u.invert&&r,e()}}function it(n){var t=0,r=gr/3,i=rt(n),e=i(t,r);return e.parallels=function(n){return arguments.length?i(t=n[0]*yr,r=n[1]*yr):[t*Sr,r*Sr]},e}function et(n,t){function r(n,t){var r=qr(o-2*e*Cr(t))/e;return[r*Cr(n*=e),c-r*Nr(n)]}var i=Cr(n),e=(i+Cr(t))/2,o=1+i*(2*e-i),c=qr(o)/e;return r.invert=function(n,t){var r=c-t;return[xr(n,r)/e,u((o-(n*n+r*r)*e*e)/(2*e))]},r}function ot(){return it(et).scale(151).translate([480,347])}function ut(){return ot().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ct(n){var t=n.length;return{point:function(r,i){for(var e=-1;++e<t;)n[e].point(r,i)},sphere:function(){for(var r=-1;++r<t;)n[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)n[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)n[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)n[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)n[r].polygonEnd()}}}function ft(){function n(n){var t=n[0],r=n[1];return u=null,i(t,r),u||(e(t,r),u)||(o(t,r),u)}var t,r,i,e,o,u,c=ut(),f=ot().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ot().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,t){u=[n,t]}};return n.invert=function(n){var t=c.scale(),r=c.translate(),i=(n[0]-r[0])/t,e=(n[1]-r[1])/t;return(e>=.12&&.234>e&&i>=-.425&&-.214>i?f:e>=.166&&.234>e&&i>=-.214&&-.115>i?a:c).invert(n)},n.stream=function(n){return t&&r===n?t:t=ct([c.stream(r=n),f.stream(n),a.stream(n)])},n.precision=function(t){return arguments.length?(c.precision(t),f.precision(t),a.precision(t),n):c.precision()},n.scale=function(t){return arguments.length?(c.scale(t),f.scale(.35*t),a.scale(t),n.translate(c.translate())):c.scale()},n.translate=function(t){if(!arguments.length)return c.translate();var r=c.scale(),u=+t[0],p=+t[1];return i=c.translate(t).clipExtent([[u-.455*r,p-.238*r],[u+.455*r,p+.238*r]]).stream(l).point,e=f.translate([u-.307*r,p+.201*r]).clipExtent([[u-.425*r+sr,p+.12*r+sr],[u-.214*r-sr,p+.234*r-sr]]).stream(l).point,o=a.translate([u-.205*r,p+.212*r]).clipExtent([[u-.214*r+sr,p+.166*r+sr],[u-.115*r-sr,p+.234*r-sr]]).stream(l).point,n},n.scale(1070)}function at(n){return function(t,r){var i=Nr(t),e=Nr(r),o=n(i*e);return[o*e*Cr(t),o*Cr(r)]}}function lt(n){return function(t,r){var i=qr(t*t+r*r),e=n(i),o=Cr(e),c=Nr(e);return[xr(t*o,i*c),u(i&&r*o/i)]}}function pt(){return tt(Ni).scale(120).clipAngle(179.999)}function st(){return tt(ji).scale(480/Er).clipAngle(179.999)}function vt(n,t){return[n,Pr(zr((hr+t)/2))]}function gt(){return ht(vt)}function ht(n){var t,r=tt(n),i=r.scale,e=r.translate,o=r.clipExtent;return r.scale=function(n){return arguments.length?(i(n),t&&r.clipExtent(null),r):i()},r.translate=function(n){return arguments.length?(e(n),t&&r.clipExtent(null),r):e()},r.clipExtent=function(n){if(!arguments.length)return t?null:o();if(t=null==n){var u=gr*i(),c=e();n=[[c[0]-u,c[1]-u],[c[0]+u,c[1]+u]]}return o(n),r},r.clipExtent(null).scale(961/Er)}function dt(n){return zr((hr+n)/2)}function Et(n,t){function r(n,t){o>0?-hr+sr>t&&(t=-hr+sr):t>hr-sr&&(t=hr-sr);var r=o/Ar(dt(t),e);return[r*Cr(e*n),o-r*Nr(e*n)]}var i=Nr(n),e=n===t?Cr(n):Pr(i/Nr(t))/Pr(dt(t)/dt(n)),o=i*Ar(dt(n),e)/e;return e?(r.invert=function(n,t){var r=o-t,i=br(e)*qr(n*n+r*r);return[xr(n,r)/e,2*Mr(Ar(o/i,1/e))-hr]},r):vt}function St(){return it(Et)}function yt(n,t){return[n,t]}function mt(){return tt(yt)}function Mt(n,t){function r(n,t){var r=o-t,i=e*n;return[r*Cr(i),o-r*Nr(i)]}var i=Nr(n),e=n===t?Cr(n):(i-Nr(t))/(t-n),o=i/e+n;return mr(e)<sr?yt:(r.invert=function(n,t){var r=o-t;return[xr(n,r)/e,o-br(e)*qr(n*n+r*r)]},r)}function xt(){return it(Mt).scale(128).translate([480,280])}function Nt(n,t){var r=Nr(t),i=Nr(n)*r;return[r*Cr(n)/i,Cr(t)/i]}function jt(){return tt(Nt).scale(139).clipAngle(70)}function wt(n,t){return[Nr(t)*Cr(n),Cr(t)]}function Pt(){return tt(wt).scale(240).clipAngle(90+sr)}function At(n,t){var r=Nr(t),i=1+Nr(n)*r;return[r*Cr(n)/i,Cr(t)/i]}function Ct(){return tt(At).scale(240).clipAngle(179.999)}function bt(n,t){return[Pr(zr((hr+t)/2)),-n]}function qt(){var n=ht(bt),t=n.center,r=n.rotate;return n.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90])}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(n){e(pr,n,this.t),e(this,pr.s,this.s),this.s?this.t+=pr.t:this.s=pr.t},valueOf:function(){return this.s}};var zt,Lt,Rt,Ot,Tt,Gt,Ft,It,_t,Bt,Dt,Ut,Zt,kt,Ht,Jt,Kt,Qt,Vt,Wt,Xt,Yt,$t,nr,tr,rr,ir,er,or,ur,cr,fr,ar,lr,pr=new i,sr=1e-6,vr=1e-12,gr=Math.PI,hr=gr/2,dr=gr/4,Er=2*gr,Sr=180/gr,yr=gr/180,mr=Math.abs,Mr=Math.atan,xr=Math.atan2,Nr=Math.cos,jr=Math.ceil,wr=Math.exp,Pr=Math.log,Ar=Math.pow,Cr=Math.sin,br=Math.sign||function(n){return n>0?1:0>n?-1:0},qr=Math.sqrt,zr=Math.tan,Lr={Feature:function(n,t){a(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i<e;)a(r[i].geometry,t)}},Rr={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)n=r[i],t.point(n[0],n[1],n[2])},LineString:function(n,t){l(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)l(r[i],t,0)},Polygon:function(n,t){p(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)p(r[i],t)},GeometryCollection:function(n,t){for(var r=n.geometries,i=-1,e=r.length;++i<e;)a(r[i],t)}},Or={point:f,lineStart:f,lineEnd:f,polygonStart:function(){zt.reset(),Or.lineStart=v,Or.lineEnd=g},polygonEnd:function(){var n=+zt;Lt.add(0>n?Er+n:n),this.lineStart=this.lineEnd=this.point=f},sphere:function(){Lt.add(Er)}},Tr={point:w,lineStart:A,lineEnd:C,polygonStart:function(){Tr.point=b,Tr.lineStart=q,Tr.lineEnd=z,Jt.reset(),Or.polygonStart()},polygonEnd:function(){Or.polygonEnd(),Tr.point=w,Tr.lineStart=A,Tr.lineEnd=C,0>zt?(It=-(Bt=180),_t=-(Dt=90)):Jt>sr?Dt=90:-sr>Jt&&(_t=-90),Qt[0]=It,Qt[1]=Bt}},Gr={sphere:f,point:G,lineStart:I,lineEnd:D,polygonStart:function(){Gr.lineStart=U,Gr.lineEnd=Z},polygonEnd:function(){Gr.lineStart=I,Gr.lineEnd=D}};V.invert=V;var Fr,Ir,_r,Br,Dr,Ur,Zr,kr,Hr,Jr,Kr,Qr,Vr=1e9,Wr=-Vr,Xr={sphere:f,point:f,lineStart:vn,lineEnd:f,polygonStart:f,polygonEnd:f},Yr=[null,null],$r={type:"LineString",coordinates:Yr},ni=r(),ti=r(),ri={point:f,lineStart:f,lineEnd:f,polygonStart:function(){ri.lineStart=jn,ri.lineEnd=An},polygonEnd:function(){ri.lineStart=ri.lineEnd=ri.point=f,ni.add(mr(ti)),ti.reset()},result:function(){var n=ni/2;return ni.reset(),n}},ii=1/0,ei=ii,oi=-ii,ui=oi,ci={point:Cn,lineStart:f,lineEnd:f,polygonStart:f,polygonEnd:f,result:function(){var n=[[ii,ei],[oi,ui]];return oi=ui=-(ei=ii=1/0),n}},fi=0,ai=0,li=0,pi=0,si=0,vi=0,gi=0,hi=0,di=0,Ei={point:bn,lineStart:qn,lineEnd:Rn,polygonStart:function(){Ei.lineStart=On,Ei.lineEnd=Tn},polygonEnd:function(){Ei.point=bn,Ei.lineStart=qn,Ei.lineEnd=Rn},result:function(){var n=di?[gi/di,hi/di]:vi?[pi/vi,si/vi]:li?[fi/li,ai/li]:[NaN,NaN];return fi=ai=li=pi=si=vi=gi=hi=di=0,n}},Si=r(),yi=Zn(function(){return!0},Jn,Qn,[-gr,-hr]);Xn.prototype={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 mi=16,Mi=Nr(30*yr),xi=Wn({point:function(n,t){this.stream.point(n*yr,t*yr)}}),Ni=at(function(n){return qr(2/(1+n))});Ni.invert=lt(function(n){return 2*u(n/2)});var ji=at(function(n){return(n=o(n))&&n/Cr(n)});ji.invert=lt(function(n){return n}),vt.invert=function(n,t){return[n,2*Mr(wr(t))-hr]},yt.invert=yt,Nt.invert=lt(Mr),wt.invert=lt(u),At.invert=lt(function(n){return 2+Mr(n)}),bt.invert=function(n,t){return[-t,2*Mr(wr(n))-hr]},n.geoArea=E,n.geoBounds=T,n.geoCentroid=J,n.geoCircle=en,n.geoClipExtent=sn,n.geoDistance=Sn,n.geoGraticule=Mn,n.geoInterpolate=xn,n.geoLength=En,n.geoPath=Dn,n.geoAlbers=ut,n.geoAlbersUsa=ft,n.geoAzimuthalEqualArea=pt,n.geoAzimuthalEquidistant=st,n.geoConicConformal=St,n.geoConicEqualArea=ot,n.geoConicEquidistant=xt,n.geoEquirectangular=mt,n.geoGnomonic=jt,n.geoProjection=tt,n.geoProjectionMutator=rt,n.geoMercator=gt,n.geoOrthographic=Pt,n.geoStereographic=Ct,n.geoTransverseMercator=qt,n.geoRotation=nn,n.geoStream=s,n.geoTransform=Wn,Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "d3-geo",
"version": "0.0.2",
"version": "0.0.3",
"description": "Shapes and calculators for spherical coordinates.",

@@ -34,2 +34,3 @@ "keywords": [

"devDependencies": {
"canvas": "1",
"eslint": "2",

@@ -39,4 +40,5 @@ "package-preamble": "0.0",

"tape": "4",
"topojson": "1",
"uglify-js": "2"
}
}

@@ -5,6 +5,7 @@ import conicEqualArea from "./conicEqualArea";

return conicEqualArea()
.parallels([29.5, 45.5])
.scale(1070)
.translate([480, 250])
.rotate([96, 0])
.center([-0.6, 38.7])
.parallels([29.5, 45.5])
.scale(1070);
.center([-0.6, 38.7]);
}

@@ -14,3 +14,5 @@ import {asin, sqrt} from "../math";

export default function() {
return projection(azimuthalEqualArea);
return projection(azimuthalEqualArea)
.scale(120)
.clipAngle(180 - 1e-3);
}

@@ -1,2 +0,2 @@

import {acos, sin} from "../math";
import {acos, sin, tau} from "../math";
import {azimuthal, azimuthalInvert} from "./azimuthal";

@@ -14,3 +14,5 @@ import projection from "./index";

export default function() {
return projection(azimuthalEquidistant);
return projection(azimuthalEquidistant)
.scale(480 / tau)
.clipAngle(180 - 1e-3);
}

@@ -24,3 +24,5 @@ import {asin, atan2, cos, sin, sqrt} from "../math";

export default function() {
return conicProjection(conicEqualArea);
return conicProjection(conicEqualArea)
.scale(151)
.translate([480, 347]);
}

@@ -26,3 +26,5 @@ import {abs, atan2, cos, epsilon, sign, sin, sqrt} from "../math";

export default function() {
return conicProjection(conicEquidistant);
return conicProjection(conicEquidistant)
.scale(128)
.translate([480, 280]);
}

@@ -13,3 +13,5 @@ import {atan, cos, sin} from "../math";

export default function() {
return projection(gnomonic);
return projection(gnomonic)
.scale(139)
.clipAngle(70);
}

@@ -6,3 +6,3 @@ import clipAntimeridian from "../clip/antimeridian";

import identity from "../identity";
import {degrees, radians} from "../math";
import {degrees, radians, sqrt} from "../math";
import {rotateRadians} from "../rotation";

@@ -30,3 +30,3 @@ import transform from "../transform";

x0 = null, y0, x1, y1, postclip = identity, // clip extent
delta = 6 * radians, projectResample = resample(projectTransform, delta), // precision
delta2 = 0.5, projectResample = resample(projectTransform, delta2), // precision
stream,

@@ -54,3 +54,3 @@ streamSink;

projection.clipAngle = function(_) {
return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians, delta) : (theta = null, clipAntimeridian), reset()) : theta * degrees;
return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians, 6 * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;
};

@@ -79,3 +79,3 @@

projection.precision = function(_) {
return arguments.length ? (projectResample = resample(projectTransform, delta = _ * radians), theta && (preclip = clipCircle(theta, delta)), reset()) : delta * degrees;
return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);
};

@@ -82,0 +82,0 @@

import projection from "./index";
import {atan, exp, halfPi, log, pi, tan} from "../math";
import {atan, exp, halfPi, log, pi, tan, tau} from "../math";

@@ -41,3 +41,3 @@ export function mercator(lambda, phi) {

return m.clipExtent(null);
return m.clipExtent(null).scale(961 / tau);
}

@@ -1,2 +0,2 @@

import {asin, cos, sin} from "../math";
import {asin, cos, epsilon, sin} from "../math";
import {azimuthalInvert} from "./azimuthal";

@@ -12,3 +12,5 @@ import projection from "./index";

export default function() {
return projection(orthographic);
return projection(orthographic)
.scale(240)
.clipAngle(90 + epsilon);
}

@@ -8,4 +8,4 @@ import {cartesian} from "../cartesian";

export default function(project, delta) {
return +delta ? resample(project, delta * delta) : resampleNone(project);
export default function(project, delta2) {
return +delta2 ? resample(project, delta2) : resampleNone(project);
}

@@ -12,0 +12,0 @@

@@ -15,3 +15,5 @@ import {atan, cos, sin} from "../math";

export default function() {
return projection(stereographic);
return projection(stereographic)
.scale(240)
.clipAngle(180 - 1e-3);
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc