-
Notifications
You must be signed in to change notification settings - Fork 22
/
d3-composite-projections.min.js
2 lines (2 loc) · 39.7 KB
/
d3-composite-projections.min.js
1
2
// http://geoexamples.com/d3-composite-projections/ v1.4.0 Copyright 2022 Roger Veciana i Rovira
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-geo"),require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-path"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).d3=n.d3||{},n.d3,n.d3)}(this,(function(n,t,e){"use strict";var r=1e-6;function o(){}var i=1/0,a=i,l=-i,s=l,c={point:function(n,t){n<i&&(i=n);n>l&&(l=n);t<a&&(a=t);t>s&&(s=t)},lineStart:o,lineEnd:o,polygonStart:o,polygonEnd:o,result:function(){var n=[[i,a],[l,s]];return l=s=-(a=i=1/0),n}};function u(n,e,r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),null!=a&&n.clipExtent(null),t.geoStream(r,n.stream(c));var l=c.result(),s=Math.min(o/(l[1][0]-l[0][0]),i/(l[1][1]-l[0][1])),u=+e[0][0]+(o-s*(l[1][0]+l[0][0]))/2,p=+e[0][1]+(i-s*(l[1][1]+l[0][1]))/2;return null!=a&&n.clipExtent(a),n.scale(150*s).translate([u,p])}function p(n,t,e){return u(n,[[0,0],t],e)}n.geoAlbersUk=function(){var n,o,i,a,l,s=t.geoAlbers().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),c=t.geoAlbers().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),f={point:function(n,t){l=[n,t]}};function v(n){var t=n[0],e=n[1];return l=null,i.point(t,e),l||(a.point(t,e),l)}function m(){return n=o=null,v}return v.invert=function(n){var t=s.scale(),e=s.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.089&&o<.06&&r>=.029&&r<.046?c:s).invert(n)},v.stream=function(t){return n&&o===t?n:(e=[s.stream(o=t),c.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},v.precision=function(n){return arguments.length?(s.precision(n),c.precision(n),m()):s.precision()},v.scale=function(n){return arguments.length?(s.scale(n),c.scale(n),v.translate(s.translate())):s.scale()},v.translate=function(n){if(!arguments.length)return s.translate();var t=s.scale(),e=+n[0],o=+n[1];return i=s.translate(n).clipExtent([[e-.065*t,o-.089*t],[e+.075*t,o+.089*t]]).stream(f),a=c.translate([e+.01*t,o+.025*t]).clipExtent([[e+.029*t+r,o-.089*t+r],[e+.046*t-r,o-.06*t-r]]).stream(f),m()},v.fitExtent=function(n,t){return u(v,n,t)},v.fitSize=function(n,t){return p(v,n,t)},v.drawCompositionBorders=function(n){var t,e,r,o;t=s([-1.113205870242365,59.64920050773357]),e=s([.807899092399606,59.59085836472269]),r=s([.5778611961420386,57.93467822832577]),o=s([-1.25867782078448,57.99029450085142]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath()},v.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},v.scale(2800)},n.geoAlbersUsa=function(){var n,o,i,a,l,s,c=t.geoAlbers(),f=t.geoConicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),v=t.geoConicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),m={point:function(n,t){s=[n,t]}};function g(n){var t=n[0],e=n[1];return s=null,i.point(t,e),s||(a.point(t,e),s)||(l.point(t,e),s)}function T(){return n=o=null,g}return g.invert=function(n){var t=c.scale(),e=c.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?f:o>=.166&&o<.234&&r>=-.214&&r<-.115?v:c).invert(n)},g.stream=function(t){return n&&o===t?n:(e=[c.stream(o=t),f.stream(t),v.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},g.precision=function(n){return arguments.length?(c.precision(n),f.precision(n),v.precision(n),T()):c.precision()},g.scale=function(n){return arguments.length?(c.scale(n),f.scale(.35*n),v.scale(n),g.translate(c.translate())):c.scale()},g.translate=function(n){if(!arguments.length)return c.translate();var t=c.scale(),e=+n[0],o=+n[1];return i=c.translate(n).clipExtent([[e-.455*t,o-.238*t],[e+.455*t,o+.238*t]]).stream(m),a=f.translate([e-.307*t,o+.201*t]).clipExtent([[e-.425*t+r,o+.12*t+r],[e-.214*t-r,o+.234*t-r]]).stream(m),l=v.translate([e-.205*t,o+.212*t]).clipExtent([[e-.214*t+r,o+.166*t+r],[e-.115*t-r,o+.234*t-r]]).stream(m),T()},g.fitExtent=function(n,t){return u(g,n,t)},g.fitSize=function(n,t){return p(g,n,t)},g.drawCompositionBorders=function(n){var t=c([-102.91,26.3]),e=c([-104,27.5]),r=c([-108,29.1]),o=c([-110,29.1]),i=c([-110,26.7]),a=c([-112.8,27.6]),l=c([-114.3,30.6]),s=c([-119.3,30.1]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1])},g.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},g.scale(1070)},n.geoAlbersUsaTerritories=function(){var n,o,i,a,l,s,c,f,v,m=t.geoAlbers(),g=t.geoConicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),T=t.geoConicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h=t.geoConicEqualArea().rotate([66,0]).center([0,18]).parallels([8,18]),d=t.geoEquirectangular().rotate([173,14]),E=t.geoEquirectangular().rotate([-145,-16.8]),C={point:function(n,t){v=[n,t]}};function S(n){var t=n[0],e=n[1];return v=null,i.point(t,e),v||(a.point(t,e),v)||(l.point(t,e),v)||(s.point(t,e),v)||(c.point(t,e),v)||(f.point(t,e),v)}function x(){return n=o=null,S}return S.invert=function(n){var t=m.scale(),e=m.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?g:o>=.166&&o<.234&&r>=-.214&&r<-.115?T:o>=.2064&&o<.2413&&r>=.312&&r<.385?h:o>=.09&&o<.1197&&r>=-.4243&&r<-.3232?d:o>=-.0518&&o<.0895&&r>=-.4243&&r<-.3824?E:m).invert(n)},S.stream=function(t){return n&&o===t?n:(e=[m.stream(o=t),g.stream(t),T.stream(t),h.stream(t),d.stream(t),E.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},S.precision=function(n){return arguments.length?(m.precision(n),g.precision(n),T.precision(n),h.precision(n),d.precision(n),E.precision(n),x()):m.precision()},S.scale=function(n){return arguments.length?(m.scale(n),g.scale(.35*n),T.scale(n),h.scale(n),d.scale(2*n),E.scale(n),S.translate(m.translate())):m.scale()},S.translate=function(n){if(!arguments.length)return m.translate();var t=m.scale(),e=+n[0],o=+n[1];return i=m.translate(n).clipExtent([[e-.455*t,o-.238*t],[e+.455*t,o+.238*t]]).stream(C),a=g.translate([e-.307*t,o+.201*t]).clipExtent([[e-.425*t+r,o+.12*t+r],[e-.214*t-r,o+.233*t-r]]).stream(C),l=T.translate([e-.205*t,o+.212*t]).clipExtent([[e-.214*t+r,o+.166*t+r],[e-.115*t-r,o+.233*t-r]]).stream(C),s=h.translate([e+.35*t,o+.224*t]).clipExtent([[e+.312*t+r,o+.2064*t+r],[e+.385*t-r,o+.233*t-r]]).stream(C),c=d.translate([e-.492*t,o+.09*t]).clipExtent([[e-.4243*t+r,o+.0903*t+r],[e-.3233*t-r,o+.1197*t-r]]).stream(C),f=E.translate([e-.408*t,o+.018*t]).clipExtent([[e-.4244*t+r,o-.0519*t+r],[e-.3824*t-r,o+.0895*t-r]]).stream(C),x()},S.fitExtent=function(n,t){return u(S,n,t)},S.fitSize=function(n,t){return p(S,n,t)},S.drawCompositionBorders=function(n){var t=m([-110.4641,28.2805]),e=m([-104.0597,28.9528]),r=m([-103.7049,25.1031]),o=m([-109.8337,24.4531]),i=m([-124.4745,28.1407]),a=m([-110.931,30.8844]),l=m([-109.8337,24.4531]),s=m([-122.4628,21.8562]),c=m([-76.8579,25.1544]),u=m([-72.429,24.2097]),p=m([-72.8265,22.7056]),f=m([-77.1852,23.6392]),v=m([-125.0093,29.7791]),g=m([-118.5193,31.3262]),T=m([-118.064,29.6912]),h=m([-124.4369,28.169]),d=m([-128.1314,37.4582]),E=m([-125.2132,38.214]),C=m([-122.3616,30.5115]),S=m([-125.0315,29.8211]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1]),n.closePath(),n.moveTo(c[0],c[1]),n.lineTo(u[0],u[1]),n.lineTo(p[0],p[1]),n.lineTo(p[0],p[1]),n.lineTo(f[0],f[1]),n.closePath(),n.moveTo(v[0],v[1]),n.lineTo(g[0],g[1]),n.lineTo(T[0],T[1]),n.lineTo(T[0],T[1]),n.lineTo(h[0],h[1]),n.closePath(),n.moveTo(d[0],d[1]),n.lineTo(E[0],E[1]),n.lineTo(C[0],C[1]),n.lineTo(C[0],C[1]),n.lineTo(S[0],S[1]),n.closePath()},S.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},S.scale(1070)},n.geoConicConformalEurope=function(){var n,o,i,a,l,s,c,f,v,m,g,T,h,d,E,C=t.geoConicConformal().rotate([-10,-53]).parallels([0,60]),S=t.geoMercator().center([-61.46,16.14]),x=t.geoMercator().center([-53.2,3.9]),y=t.geoConicConformal().rotate([27.8,-38.9]).parallels([0,60]),P=t.geoConicConformal().rotate([25.43,-37.398]).parallels([0,60]),B=t.geoConicConformal().rotate([31.17,-39.539]).parallels([0,60]),M=t.geoConicConformal().rotate([17,-32.7]).parallels([0,60]),w=t.geoConicConformal().rotate([16,-28.5]).parallels([0,60]),q=t.geoMercator().center([-61.03,14.67]),z=t.geoMercator().center([45.16,-12.8]),A=t.geoMercator().center([55.52,-21.13]),b=t.geoConicConformal().rotate([-14.4,-35.95]).parallels([0,60]),U={point:function(n,t){E=[n,t]}};function j(n){var t=n[0],e=n[1];return E=null,i.point(t,e),E||(l.point(t,e),E)||(g.point(t,e),E)||(a.point(t,e),E)||(m.point(t,e),E)||(v.point(t,e),E)||(T.point(t,e),E)||(h.point(t,e),E)||(d.point(t,e),E)||(s.point(t,e),E)||(c.point(t,e),E)||(f.point(t,e),E)}function k(){return n=o=null,j}return j.invert=function(n){var t=C.scale(),e=C.translate(),r=(n[0]-(e[0]+.08*t))/t,o=(n[1]-e[1])/t;return(o>=-.31&&o<-.24&&r>=.14&&r<.24?S:o>=-.24&&o<-.17&&r>=.14&&r<.24?x:o>=-.17&&o<-.12&&r>=.21&&r<.24?P:o>=-.17&&o<-.14&&r>=.14&&r<.165?B:o>=-.17&&o<-.1&&r>=.14&&r<.24?y:o>=-.1&&o<-.03&&r>=.14&&r<.24?M:o>=-.03&&o<.04&&r>=.14&&r<.24?w:o>=-.31&&o<-.24&&r>=.24&&r<.34?q:o>=-.24&&o<-.17&&r>=.24&&r<.34?z:o>=-.17&&o<-.1&&r>=.24&&r<.34?A:o>=-.1&&o<-.03&&r>=.24&&r<.34?b:C).invert(n)},j.stream=function(t){return n&&o===t?n:(e=[C.stream(o=t),x.stream(t),q.stream(t),S.stream(t),w.stream(t),M.stream(t),z.stream(t),A.stream(t),b.stream(t),y.stream(t),P.stream(t),B.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},j.precision=function(n){return arguments.length?(C.precision(n),x.precision(n),q.precision(n),S.precision(n),w.precision(n),M.precision(n),z.precision(n),A.precision(n),b.precision(n),y.precision(n),P.precision(n),B.precision(n),k()):C.precision()},j.scale=function(n){return arguments.length?(C.scale(n),S.scale(3*n),x.scale(.8*n),q.scale(3.5*n),A.scale(2.7*n),y.scale(2*n),P.scale(2*n),B.scale(2*n),M.scale(3*n),w.scale(n),z.scale(5.5*n),b.scale(6*n),j.translate(C.translate())):C.scale()},j.translate=function(n){if(!arguments.length)return C.translate();var t=C.scale(),e=+n[0],o=+n[1];return i=C.translate([e-.08*t,o]).clipExtent([[e-.51*t,o-.33*t],[e+.5*t,o+.33*t]]).stream(U),a=S.translate([e+.19*t,o-.275*t]).clipExtent([[e+.14*t+r,o-.31*t+r],[e+.24*t-r,o-.24*t-r]]).stream(U),l=x.translate([e+.19*t,o-.205*t]).clipExtent([[e+.14*t+r,o-.24*t+r],[e+.24*t-r,o-.17*t-r]]).stream(U),s=y.translate([e+.19*t,o-.135*t]).clipExtent([[e+.14*t+r,o-.17*t+r],[e+.24*t-r,o-.1*t-r]]).stream(U),c=P.translate([e+.225*t,o-.147*t]).clipExtent([[e+.21*t+r,o-.17*t+r],[e+.24*t-r,o-.12*t-r]]).stream(U),f=B.translate([e+.153*t,o-.15*t]).clipExtent([[e+.14*t+r,o-.17*t+r],[e+.165*t-r,o-.14*t-r]]).stream(U),v=M.translate([e+.19*t,o-.065*t]).clipExtent([[e+.14*t+r,o-.1*t+r],[e+.24*t-r,o-.03*t-r]]).stream(U),m=w.translate([e+.19*t,o+.005*t]).clipExtent([[e+.14*t+r,o-.03*t+r],[e+.24*t-r,o+.04*t-r]]).stream(U),g=q.translate([e+.29*t,o-.275*t]).clipExtent([[e+.24*t+r,o-.31*t+r],[e+.34*t-r,o-.24*t-r]]).stream(U),T=z.translate([e+.29*t,o-.205*t]).clipExtent([[e+.24*t+r,o-.24*t+r],[e+.34*t-r,o-.17*t-r]]).stream(U),h=A.translate([e+.29*t,o-.135*t]).clipExtent([[e+.24*t+r,o-.17*t+r],[e+.34*t-r,o-.1*t-r]]).stream(U),d=b.translate([e+.29*t,o-.065*t]).clipExtent([[e+.24*t+r,o-.1*t+r],[e+.34*t-r,o-.03*t-r]]).stream(U),k()},j.fitExtent=function(n,t){return u(j,n,t)},j.fitSize=function(n,t){return p(j,n,t)},j.drawCompositionBorders=function(n){var t,e,r,o;t=C([42.45755610828648,63.343658547914934]),e=C([52.65837266667029,59.35045080290929]),r=C([47.19754502247785,56.12653496548117]),o=C([37.673034273363044,59.61638268506111]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([59.41110754003403,62.35069727399336]),e=C([66.75050228640794,57.11797303636038]),r=C([60.236065725110436,54.63331433818992]),o=C([52.65837313153311,59.350450804599355]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([48.81091130080243,66.93353402634641]),e=C([59.41110730654679,62.35069740653086]),r=C([52.6583728974441,59.3504509222445]),o=C([42.45755631675751,63.34365868805821]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([31.054198418446475,52.1080673766184]),e=C([39.09869284884117,49.400700047190554]),r=C([36.0580811499175,46.02944174908498]),o=C([28.690508588835726,48.433126979386415]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([33.977877745912025,55.849945501331]),e=C([42.75328432167726,52.78455122462353]),r=C([39.09869297540224,49.400700176148625]),o=C([31.05419851807008,52.10806751810923]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([52.658372900759296,59.35045068526415]),e=C([60.23606549583304,54.63331423800264]),r=C([54.6756370953122,51.892298789399455]),o=C([47.19754524788189,56.126534861222794]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([47.19754506082455,56.126534735591456]),e=C([54.675636900123514,51.892298681337095]),r=C([49.94448648951486,48.98775484983285]),o=C([42.75328468716108,52.78455126060818]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([42.75328453416769,52.78455113209101]),e=C([49.94448632339758,48.98775473706457]),r=C([45.912339990394315,45.99361784987003]),o=C([39.09869317356607,49.40070009378711]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([37.673034114296634,59.61638254183119]),e=C([47.197544835420544,56.126534839849846]),r=C([42.75328447467064,52.78455135314068]),o=C([33.977877870363905,55.849945644671145]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([44.56748486446032,57.26489367845818]),r=C([43.9335791193588,53.746540942601726]),o=C([43,56]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([37.673034114296634,59.61638254183119]),e=C([40.25902691953466,58.83002044222639]),r=C([38.458270492742024,57.26232178028002]),o=C([35.97754948030156,58.00266637992386]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath()},j.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},j.scale(750)},n.geoConicConformalFrance=function(){var n,o,i,a,l,s,c,f,v,m,g,T,h,d,E,C=t.geoConicConformal().rotate([-3,-46.2]).parallels([0,60]),S=t.geoMercator().center([-53.2,3.9]),x=t.geoMercator().center([-61.03,14.67]),y=t.geoMercator().center([-61.46,16.14]),P=t.geoMercator().center([-62.85,17.92]),B=t.geoMercator().center([-56.23,46.93]),M=t.geoMercator().center([45.16,-12.8]),w=t.geoMercator().center([55.52,-21.13]),q=t.geoMercator().center([165.8,-21.07]),z=t.geoMercator().center([-178.1,-14.3]),A=t.geoMercator().center([-150.55,-17.11]),b=t.geoMercator().center([-150.55,-17.11]),U={point:function(n,t){E=[n,t]}};function j(n){var t=n[0],e=n[1];return E=null,i.point(t,e),E||(a.point(t,e),E)||(l.point(t,e),E)||(s.point(t,e),E)||(c.point(t,e),E)||(f.point(t,e),E)||(v.point(t,e),E)||(m.point(t,e),E)||(g.point(t,e),E)||(T.point(t,e),E)||(h.point(t,e),E)||(d.point(t,e),E)}function k(){return n=o=null,j}return j.invert=function(n){var t=C.scale(),e=C.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.029&&o<.0864&&r>=-.14&&r<-.0996?S:o>=0&&o<.029&&r>=-.14&&r<-.0996?x:o>=-.032&&o<0&&r>=-.14&&r<-.0996?y:o>=-.052&&o<-.032&&r>=-.14&&r<-.0996?P:o>=-.076&&o<.052&&r>=-.14&&r<-.0996?B:o>=-.076&&o<-.052&&r>=.0967&&r<.1371?M:o>=-.052&&o<-.02&&r>=.0967&&r<.1371?w:o>=-.02&&o<.012&&r>=.0967&&r<.1371?q:o>=.012&&o<.033&&r>=.0967&&r<.1371?z:o>=.033&&o<.0864&&r>=.0967&&r<.1371?A:C).invert(n)},j.stream=function(t){return n&&o===t?n:(e=[C.stream(o=t),S.stream(t),x.stream(t),y.stream(t),P.stream(t),B.stream(t),M.stream(t),w.stream(t),q.stream(t),z.stream(t),A.stream(t),b.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},j.precision=function(n){return arguments.length?(C.precision(n),S.precision(n),x.precision(n),y.precision(n),P.precision(n),B.precision(n),M.precision(n),w.precision(n),q.precision(n),z.precision(n),A.precision(n),b.precision(n),k()):C.precision()},j.scale=function(n){return arguments.length?(C.scale(n),S.scale(.6*n),x.scale(1.6*n),y.scale(1.4*n),P.scale(5*n),B.scale(1.3*n),M.scale(1.6*n),w.scale(1.2*n),q.scale(.3*n),z.scale(2.7*n),A.scale(.5*n),b.scale(.06*n),j.translate(C.translate())):C.scale()},j.translate=function(n){if(!arguments.length)return C.translate();var t=C.scale(),e=+n[0],o=+n[1];return i=C.translate(n).clipExtent([[e-.0996*t,o-.0908*t],[e+.0967*t,o+.0864*t]]).stream(U),a=S.translate([e-.12*t,o+.0575*t]).clipExtent([[e-.14*t+r,o+.029*t+r],[e-.0996*t-r,o+.0864*t-r]]).stream(U),l=x.translate([e-.12*t,o+.013*t]).clipExtent([[e-.14*t+r,o+0*t+r],[e-.0996*t-r,o+.029*t-r]]).stream(U),s=y.translate([e-.12*t,o-.014*t]).clipExtent([[e-.14*t+r,o-.032*t+r],[e-.0996*t-r,o+0*t-r]]).stream(U),c=P.translate([e-.12*t,o-.044*t]).clipExtent([[e-.14*t+r,o-.052*t+r],[e-.0996*t-r,o-.032*t-r]]).stream(U),f=B.translate([e-.12*t,o-.065*t]).clipExtent([[e-.14*t+r,o-.076*t+r],[e-.0996*t-r,o-.052*t-r]]).stream(U),v=M.translate([e+.117*t,o-.064*t]).clipExtent([[e+.0967*t+r,o-.076*t+r],[e+.1371*t-r,o-.052*t-r]]).stream(U),m=w.translate([e+.116*t,o-.0355*t]).clipExtent([[e+.0967*t+r,o-.052*t+r],[e+.1371*t-r,o-.02*t-r]]).stream(U),g=q.translate([e+.116*t,o-.0048*t]).clipExtent([[e+.0967*t+r,o-.02*t+r],[e+.1371*t-r,o+.012*t-r]]).stream(U),T=z.translate([e+.116*t,o+.022*t]).clipExtent([[e+.0967*t+r,o+.012*t+r],[e+.1371*t-r,o+.033*t-r]]).stream(U),d=b.translate([e+.11*t,o+.045*t]).clipExtent([[e+.0967*t+r,o+.033*t+r],[e+.1371*t-r,o+.06*t-r]]).stream(U),h=A.translate([e+.115*t,o+.075*t]).clipExtent([[e+.0967*t+r,o+.06*t+r],[e+.1371*t-r,o+.0864*t-r]]).stream(U),k()},j.fitExtent=function(n,t){return u(j,n,t)},j.fitSize=function(n,t){return p(j,n,t)},j.drawCompositionBorders=function(n){var t,e,r,o;t=C([-7.938886725111036,43.7219460918835]),e=C([-4.832080896458295,44.12930268549372]),r=C([-4.205299743793263,40.98096346967365]),o=C([-7.071796453126152,40.610037319181444]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([-8.42751373617692,45.32889452553031]),e=C([-5.18599305777107,45.7566442062976]),r=C([-4.832080905154431,44.129302726751426]),o=C([-7.938886737126192,43.72194613263854]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([-9.012656899657046,47.127733821030176]),e=C([-5.6105244772793155,47.579777861410626]),r=C([-5.185993067168585,45.756644248170346]),o=C([-8.427513749141811,45.32889456686326]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([-9.405747558985553,48.26506375557457]),e=C([-5.896175018439575,48.733352850851624]),r=C([-5.610524487556043,47.57977790393761]),o=C([-9.012656913808351,47.127733862971255]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([-9.908436061346974,49.642448789505856]),e=C([-6.262026716233124,50.131426841787174]),r=C([-5.896175029331232,48.73335289377258]),o=C([-9.40574757396393,48.26506379787767]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([11.996907706504462,50.16039028163579]),e=C([15.649907879773343,49.68279246765253]),r=C([15.156712840526632,48.30371557625831]),o=C([11.64122661754411,48.761078240546816]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([11.641226606955788,48.7610781975889]),e=C([15.156712825832164,48.30371553390465]),r=C([14.549932166241172,46.4866532486199]),o=C([11.204443787952183,46.91899233914248]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([11.204443778297161,46.918992296823646]),e=C([14.549932152815039,46.486653206856396]),r=C([13.994409796764009,44.695833444323256]),o=C([10.805306599253848,45.105133870684924]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([10.805306590412085,45.10513382903308]),e=C([13.99440978444733,44.695833403183606]),r=C([13.654633799024392,43.53552468558152]),o=C([10.561516803980956,43.930671459798624]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([10.561516795617383,43.93067141859757]),e=C([13.654633787361952,43.5355246448671]),r=C([12.867691604239901,40.640701985019405]),o=C([9.997809515987688,41.00288343254471]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=C([10.8,42.4]),e=C([12.8,42.13]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1])},j.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},j.scale(2700)},n.geoConicConformalNetherlands=function(){var n,o,i,a,l,s,c=t.geoConicConformal().rotate([-5.5,-52.2]).parallels([0,60]),f=t.geoMercator().center([-68.25,12.2]),v=t.geoMercator().center([-63.1,17.5]),m={point:function(n,t){s=[n,t]}};function g(n){const[t,e]=n;return s=null,i.point(t,e),s||(a.point(t,e),s)||(l.point(t,e),s)}function T(){return n=o=null,g}return g.invert=function(n){var t=c.scale(),e=c.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.0067&&o<.0015&&r>=-.0232&&r<-.0154?f:o>=-.022&&o<-.014&&r>=-.023&&r<-.014?v:c).invert(n)},g.stream=function(t){return n&&o===t?n:(e=[c.stream(o=t),f.stream(t),v.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},g.precision=function(n){return arguments.length?(c.precision(n),f.precision(n),v.precision(n),T()):c.precision()},g.scale=function(n){return arguments.length?(c.scale(n),f.scale(n),v.scale(n),g.translate(c.translate())):c.scale()},g.translate=function(n){if(!arguments.length)return c.translate();const t=c.scale(),e=+n[0],o=+n[1];return i=c.translate(n).clipExtent([[e-.0245*t,o-.026*t],[e+.023*t,o+.026*t]]).stream(m),a=f.translate([e-.0186*t,o-.00325*t]).clipExtent([[e-.0232*t+r,o-.0067*t+r],[e-.0154*t-r,o+.0015*t-r]]).stream(m),l=v.translate([e-.0185*t,o-.017*t]).clipExtent([[e-.023*t+r,o-.022*t+r],[e-.014*t-r,o-.014*t-r]]).stream(m),T()},g.fitExtent=function(n,t){return u(g,n,t)},g.fitSize=function(n,t){return p(g,n,t)},g.drawCompositionBorders=function(n){var t=c([3.30573,52.5562]),e=c([4.043,52.572]),r=c([4.0646,52.1017]),o=c([3.3382,52.0861]),i=c([3.262,53.439]),a=c([4.1373,53.4571]),l=c([4.1574,52.9946]),s=c([3.2951,52.9768]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1]),n.closePath()},g.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},g.scale(4200)},n.geoConicConformalPortugal=function(){var n,o,i,a,l,s,c=t.geoConicConformal().rotate([10,-39.3]).parallels([0,60]),f=t.geoConicConformal().rotate([17,-32.7]).parallels([0,60]),v=t.geoConicConformal().rotate([27.8,-38.6]).parallels([0,60]),m={point:function(n,t){s=[n,t]}};function g(n){var t=n[0],e=n[1];return s=null,i.point(t,e),s||(a.point(t,e),s)||(l.point(t,e),s)}function T(){return n=o=null,g}return g.invert=function(n){var t=c.scale(),e=c.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.0093&&o<.03678&&r>=-.03875&&r<-.0116?f:o>=-.0412&&o<.0091&&r>=-.07782&&r<-.01166?v:c).invert(n)},g.stream=function(t){return n&&o===t?n:(e=[c.stream(o=t),f.stream(t),v.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},g.precision=function(n){return arguments.length?(c.precision(n),f.precision(n),v.precision(n),T()):c.precision()},g.scale=function(n){return arguments.length?(c.scale(n),f.scale(n),v.scale(.6*n),g.translate(c.translate())):c.scale()},g.translate=function(n){if(!arguments.length)return c.translate();var t=c.scale(),e=+n[0],o=+n[1];return i=c.translate(n).clipExtent([[e-.0115*t,o-.1138*t],[e+.2105*t,o+.0673*t]]).stream(m),a=f.translate([e-.0265*t,o+.025*t]).clipExtent([[e-.0388*t+r,o+.0093*t+r],[e-.0116*t-r,o+.0368*t-r]]).stream(m),l=v.translate([e-.045*t,o+-.02*t]).clipExtent([[e-.0778*t+r,o-.0413*t+r],[e-.0117*t-r,o+.0091*t-r]]).stream(m),T()},g.fitExtent=function(n,t){return u(g,n,t)},g.fitSize=function(n,t){return p(g,n,t)},g.drawCompositionBorders=function(n){var t=c([-12.8351,38.7113]),e=c([-10.8482,38.7633]),r=c([-10.8181,37.2072]),o=c([-12.7345,37.1573]),i=c([-16.0753,41.4436]),a=c([-10.9168,41.6861]),l=c([-10.8557,38.7747]),s=c([-15.6728,38.5505]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1]),n.closePath()},g.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},g.scale(4200)},n.geoConicConformalSpain=function(){var n,o,i,a,l,s=t.geoConicConformal().rotate([5,-38.6]).parallels([0,60]),c=t.geoConicConformal().rotate([5,-38.6]).parallels([0,60]),f={point:function(n,t){l=[n,t]}};function v(n){var t=n[0],e=n[1];return l=null,i.point(t,e),l||(a.point(t,e),l)}function m(){return n=o=null,v}return v.invert=function(n){var t=s.scale(),e=s.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.05346&&o<.0897&&r>=-.13388&&r<-.0322?c:s).invert(n)},v.stream=function(t){return n&&o===t?n:(e=[s.stream(o=t),c.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},v.precision=function(n){return arguments.length?(s.precision(n),c.precision(n),m()):s.precision()},v.scale=function(n){return arguments.length?(s.scale(n),c.scale(n),v.translate(s.translate())):s.scale()},v.translate=function(n){if(!arguments.length)return s.translate();var t=s.scale(),e=+n[0],o=+n[1];return i=s.translate(n).clipExtent([[e-.06857*t,o-.1288*t],[e+.13249*t,o+.06*t]]).stream(f),a=c.translate([e+.1*t,o-.094*t]).clipExtent([[e-.1331*t+r,o+.053457*t+r],[e-.0354*t-r,o+.08969*t-r]]).stream(f),m()},v.fitExtent=function(n,t){return u(v,n,t)},v.fitSize=function(n,t){return p(v,n,t)},v.drawCompositionBorders=function(n){var t=s([-14.034675,34.965007]),e=s([-7.4208899,35.536988]),r=s([-7.3148275,33.54359]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1])},v.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},v.scale(2700)},n.geoConicEquidistantJapan=function(){var n,o,i,a,l,s,c=t.geoConicEquidistant().rotate([-136,-22]).parallels([40,34]),f=t.geoConicEquidistant().rotate([-146,-26]).parallels([40,34]),v=t.geoConicEquidistant().rotate([-126,-19]).parallels([40,34]),m={point:function(n,t){s=[n,t]}};function g(n){var t=n[0],e=n[1];return s=null,i.point(t,e),s||(a.point(t,e),s)||(l.point(t,e),s)}function T(){return n=o=null,g}return g.invert=function(n){var t=c.scale(),e=c.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.10925&&o<-.02701&&r>=-.135&&r<-.0397?f:o>=.04713&&o<.11138&&r>=-.03986&&r<.051?v:c).invert(n)},g.stream=function(t){return n&&o===t?n:(e=[c.stream(o=t),f.stream(t),v.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},g.precision=function(n){return arguments.length?(c.precision(n),f.precision(n),v.precision(n),T()):c.precision()},g.scale=function(n){return arguments.length?(c.scale(n),f.scale(n),v.scale(.7*n),g.translate(c.translate())):c.scale()},g.translate=function(n){if(!arguments.length)return c.translate();var t=c.scale(),e=+n[0],o=+n[1];return i=c.translate(n).clipExtent([[e-.1352*t,o-.1091*t],[e+.117*t,o+.098*t]]).stream(m),a=f.translate([e-.0425*t,o-.005*t]).clipExtent([[e-.135*t+r,o-.1093*t+r],[e-.0397*t-r,o-.027*t-r]]).stream(m),l=v.translate(n).clipExtent([[e-.0399*t+r,o+.0471*t+r],[e+.051*t-r,o+.1114*t-r]]).stream(m),T()},g.fitExtent=function(n,t){return u(g,n,t)},g.fitSize=function(n,t){return p(g,n,t)},g.drawCompositionBorders=function(n){var t=c([126.01320483689143,41.621090310215585]),e=c([133.04304387025903,42.15087523707186]),r=c([133.3021766080688,37.43975444725098]),o=c([126.87889168628224,36.95488945159779]),i=c([132.9,29.8]),a=c([134,33]),l=c([139.3,33.2]),s=c([139.16,30.5]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1])},g.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},g.scale(2200)},n.geoMercatorEcuador=function(){var n,o,i,a,l,s=t.geoMercator().rotate([80,1.5]),c=t.geoMercator().rotate([90.73,1]),f={point:function(n,t){l=[n,t]}};function v(n){var t=n[0],e=n[1];return l=null,i.point(t,e),l||(a.point(t,e),l)}function m(){return n=o=null,v}return v.invert=function(n){var t=s.scale(),e=s.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.0676&&o<-.026&&r>=-.0857&&r<-.0263?c:s).invert(n)},v.stream=function(t){return n&&o===t?n:(e=[s.stream(o=t),c.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},v.precision=function(n){return arguments.length?(s.precision(n),c.precision(n),m()):s.precision()},v.scale=function(n){return arguments.length?(s.scale(n),c.scale(n),v.translate(s.translate())):s.scale()},v.translate=function(n){if(!arguments.length)return s.translate();var t=s.scale(),e=+n[0],o=+n[1];return i=s.translate(n).clipExtent([[e-.0262*t,o-.0734*t],[e+.1741*t,o+.079*t]]).stream(f),a=c.translate([e-.06*t,o-.04*t]).clipExtent([[e-.0857*t+r,o-.0676*t+r],[e-.0263*t-r,o-.026*t-r]]).stream(f),m()},v.fitExtent=function(n,t){return u(v,n,t)},v.fitSize=function(n,t){return p(v,n,t)},v.drawCompositionBorders=function(n){var t=s([-84.9032,2.3757]),e=s([-81.5047,2.3708]),r=s([-81.5063,-.01]),o=s([-84.9086,-.005]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath()},v.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},v.scale(3500)},n.geoMercatorEquatorialGuinea=function(){var n,o,i,a,l,s,c=t.geoMercator().rotate([-9.5,-1.5]),f=t.geoMercator().rotate([-8.6,-3.5]),v=t.geoMercator().rotate([-5.6,1.45]),m={point:function(n,t){s=[n,t]}};function g(n){var t=n[0],e=n[1];return s=null,i.point(t,e),s||(a.point(t,e),s)||(l.point(t,e),s)}function T(){return n=o=null,g}return g.invert=function(n){var t=c.scale(),e=c.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.02&&o<0&&r>=-.038&&r<-.005?f:o>=0&&o<.02&&r>=-.038&&r<-.005?v:c).invert(n)},g.stream=function(t){return n&&o===t?n:(e=[c.stream(o=t),f.stream(t),v.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},g.precision=function(n){return arguments.length?(c.precision(n),f.precision(n),v.precision(n),T()):c.precision()},g.scale=function(n){return arguments.length?(c.scale(n),f.scale(1.5*n),v.scale(4*n),g.translate(c.translate())):c.scale()},g.translate=function(n){if(!arguments.length)return c.translate();var t=c.scale(),e=+n[0],o=+n[1];return i=c.translate(n).clipExtent([[e-.005*t,o-.02*t],[e+.038*t,o+.02*t]]).stream(m),a=f.translate([e-.025*t,o-.01*t]).clipExtent([[e-.038*t+r,o-.02*t+r],[e-.005*t-r,o+0*t-r]]).stream(m),l=v.translate([e-.025*t,o+.01*t]).clipExtent([[e-.038*t+r,o-0*t+r],[e-.005*t-r,o+.02*t-r]]).stream(m),T()},g.fitExtent=function(n,t){return u(g,n,t)},g.fitSize=function(n,t){return p(g,n,t)},g.drawCompositionBorders=function(n){var t,e,r,o;t=c([9.21327272751682,2.645820439454123]),e=c([11.679126293239872,2.644755519268689]),r=c([11.676845389029227,.35307824637606433]),o=c([9.213572917774014,.35414205204417754]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=c([7.320873711543669,2.64475551449975]),e=c([9.213272722738658,2.645820434679803]),r=c([9.213422896480349,1.4999812505283054]),o=c([7.322014760520787,1.4989168878985566]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),t=c([7.3220147605302905,1.4989168783492766]),e=c([9.213422896481598,1.499981240979021]),r=c([9.213572912999604,.354142056817247]),o=c([7.323154615739809,.353078251154504]),n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath()},g.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},g.scale(12e3)},n.geoMercatorMalaysia=function(){var n,o,i,a,l,s=t.geoMercator().center([105.25,4]),c=t.geoMercator().center([118.65,2.86]),f={point:function(n,t){l=[n,t]}};function v(n){var t=n[0],e=n[1];return l=null,i.point(t,e),l||(a.point(t,e),l)}function m(){return n=o=null,v}return v.invert=function(n){var t=s.scale(),e=s.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=-.0521&&o<.0229&&r>=-.0111&&r<.1?c:s).invert(n)},v.stream=function(t){return n&&o===t?n:(e=[s.stream(o=t),c.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},v.precision=function(n){return arguments.length?(s.precision(n),c.precision(n),m()):s.precision()},v.scale=function(n){return arguments.length?(s.scale(n),c.scale(.615*n),v.translate(s.translate())):s.scale()},v.translate=function(n){if(!arguments.length)return s.translate();var t=s.scale(),e=+n[0],o=+n[1];return i=s.translate(n).clipExtent([[e-.11*t,o-.0521*t],[e-.0111*t,o+.0521*t]]).stream(f),a=c.translate([e+.09*t,o-0*t]).clipExtent([[e-.0111*t+r,o-.0521*t+r],[e+.1*t-r,o+.024*t-r]]).stream(f),m()},v.fitExtent=function(n,t){return u(v,n,t)},v.fitSize=function(n,t){return p(v,n,t)},v.drawCompositionBorders=function(n){var t=s([106.3214,2.0228]),e=s([105.1843,2.3761]),r=s([104.2151,3.3618]),o=s([104.215,4.5651]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1])},v.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},v.scale(4800)},n.geoTransverseMercatorChile=function(){var n,o,i,a,l,s,c,f=t.geoTransverseMercator().rotate([72,37]),v=t.geoStereographic().rotate([72,0]),m=t.geoMercator().rotate([80,33.5]),g=t.geoMercator().rotate([110,25]),T={point:function(n,t){c=[n,t]}};function h(n){var t=n[0],e=n[1];return c=null,i.point(t,e),c||(a.point(t,e),c)||(l.point(t,e),c)||(s.point(t,e),c)}function d(){return n=o=null,h}return h.invert=function(n){var t=f.scale(),e=f.translate(),r=(n[0]-e[0])/t,o=(n[1]-e[1])/t;return(o>=.2582&&o<.32&&r>=-.1036&&r<-.087?v:o>=-.01298&&o<.0133&&r>=-.11396&&r<-.05944?m:o>=.01539&&o<.03911&&r>=-.089&&r<-.0588?g:f).invert(n)},h.stream=function(t){return n&&o===t?n:(e=[f.stream(o=t),v.stream(t),m.stream(t),g.stream(t)],r=e.length,n={point:function(n,t){for(var o=-1;++o<r;)e[o].point(n,t)},sphere:function(){for(var n=-1;++n<r;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<r;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<r;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<r;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<r;)e[n].polygonEnd()}});var e,r},h.precision=function(n){return arguments.length?(f.precision(n),v.precision(n),m.precision(n),g.precision(n),d()):f.precision()},h.scale=function(n){return arguments.length?(f.scale(n),v.scale(.15*n),m.scale(1.5*n),g.scale(1.5*n),h.translate(f.translate())):f.scale()},h.translate=function(n){if(!arguments.length)return f.translate();var t=f.scale(),e=+n[0],o=+n[1];return i=f.translate(n).clipExtent([[e-.059*t,o-.3835*t],[e+.4498*t,o+.3375*t]]).stream(T),a=v.translate([e-.087*t,o+.17*t]).clipExtent([[e-.1166*t+r,o+.2582*t+r],[e-.06*t-r,o+.32*t-r]]).stream(T),l=m.translate([e-.092*t,o-0*t]).clipExtent([[e-.114*t+r,o-.013*t+r],[e-.0594*t-r,o+.0133*t-r]]).stream(T),s=g.translate([e-.089*t,o-.0265*t]).clipExtent([[e-.089*t+r,o+.0154*t+r],[e-.0588*t-r,o+.0391*t-r]]).stream(T),d()},h.fitExtent=function(n,t){return u(h,n,t)},h.fitSize=function(n,t){return p(h,n,t)},h.drawCompositionBorders=function(n){var t=f([-82.6999,-51.3043]),e=f([-77.5442,-51.6631]),r=f([-78.0254,-55.186]),o=f([-83.6106,-54.7785]),i=f([-80.0638,-35.984]),a=f([-76.2153,-36.1811]),l=f([-76.2994,-37.6839]),s=f([-80.2231,-37.4757]),c=f([-78.442,-37.706]),u=f([-76.263,-37.8054]),p=f([-76.344,-39.1595]),v=f([-78.5638,-39.0559]);n.moveTo(t[0],t[1]),n.lineTo(e[0],e[1]),n.lineTo(r[0],r[1]),n.lineTo(r[0],r[1]),n.lineTo(o[0],o[1]),n.closePath(),n.moveTo(i[0],i[1]),n.lineTo(a[0],a[1]),n.lineTo(l[0],l[1]),n.lineTo(l[0],l[1]),n.lineTo(s[0],s[1]),n.closePath(),n.moveTo(c[0],c[1]),n.lineTo(u[0],u[1]),n.lineTo(p[0],p[1]),n.lineTo(p[0],p[1]),n.lineTo(v[0],v[1]),n.closePath()},h.getCompositionBorders=function(){var n=e.path();return this.drawCompositionBorders(n),n.toString()},h.scale(700)}}));