@mapcreator/sdk 0.0.0-video.15 → 0.0.0-video.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mapcreator-sdk.js +240 -9871
- package/dist/mapcreator-sdk.umd.cjs +18 -18
- package/dist/report.html +1 -1
- package/package.json +1 -1
- package/dist/adornments/world-110m.json.d.ts +0 -10058
|
@@ -936,7 +936,7 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
|
|
|
936
936
|
pointer-events="none"
|
|
937
937
|
>${_}</text>
|
|
938
938
|
</svg>
|
|
939
|
-
`}function qi(e){return Un(e,(e,t)=>e+Ji(t),0)}function Ji(e){let t=0,n;switch(e.type){case`Polygon`:return Yi(e.coordinates);case`MultiPolygon`:for(n=0;n<e.coordinates.length;n++)t+=Yi(e.coordinates[n]);return t;case`Point`:case`MultiPoint`:case`LineString`:case`MultiLineString`:return 0}return 0}function Yi(e){let t=0;if(e&&e.length>0){t+=Math.abs(Qi(e[0]));for(let n=1;n<e.length;n++)t-=Math.abs(Qi(e[n]))}return t}var Xi=Pn*Pn/2,Zi=Math.PI/180;function Qi(e){let t=e.length-1;if(t<=2)return 0;let n=0,r=0;for(;r<t;){let i=e[r],a=e[r+1===t?0:r+1],o=e[r+2>=t?(r+2)%t:r+2],s=i[0]*Zi,c=a[1]*Zi,l=o[0]*Zi;n+=(l-s)*Math.sin(c),r++}return n*Xi}function $i(e){return e}function ea(e){if(e==null)return $i;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var c=2,l=e.length,u=Array(l);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;c<l;)u[c]=e[c],++c;return u}}function ta(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function na(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return ra(e,t)})}:ra(e,t)}function ra(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=ia(e,t);return n==null&&r==null?{type:`Feature`,properties:i,geometry:a}:r==null?{type:`Feature`,id:n,properties:i,geometry:a}:{type:`Feature`,id:n,bbox:r,properties:i,geometry:a}}function ia(e,t){var n=ea(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&ta(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(s)}function l(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(l)};case`Point`:n=a(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(a);break;case`LineString`:n=o(e.arcs);break;case`MultiLineString`:n=e.arcs.map(o);break;case`Polygon`:n=c(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(c);break;default:return null}return{type:t,coordinates:n}}return l(t)}var aa=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,oa=Math.ceil,sa=Math.floor,Y=`[BigNumber Error] `,ca=Y+`Number primitive has more than 15 significant digits: `,la=0x5af3107a4000,X=14,ua=9007199254740991,da=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],fa=1e7,Z=1e9;function pa(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!aa.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(_a(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(ca+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>ua||e!==sa(e)))throw Error(ca+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%X,l<0&&(f+=X),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=X;f<m;)y.c.push(+h.slice(f,f+=X));f=X-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=pa,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],_a(n,0,Z,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],_a(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(_a(n[0],-Z,0,t),_a(n[1],0,Z,t),c=n[0],l=n[1]):(_a(n,-Z,Z,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)_a(n[0],-Z,-1,t),_a(n[1],1,Z,t),u=n[0],d=n[1];else if(_a(n,-Z,Z,t),n)u=-(d=n<0?-n:n);else throw Error(Y+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(Y+`crypto unavailable`);else f=n;else throw Error(Y+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],_a(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],_a(n,0,Z,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(Y+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(Y+t+` invalid: `+n)}else throw Error(Y+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-Z&&i<=Z&&i===sa(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%X,t<1&&(t+=X),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=la||n!==sa(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(Y+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return sa(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:_a(e,0,Z),s=oa(e/X),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(Y+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=X,s&&e&&(c=da[X-e],u[l]=sa(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=X);for(l=1,c=u[0];c>=10;c/=10,l++);l<X&&(i-=X-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(ba(ha(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?ba(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=ba(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%fa,u=t/fa|0;for(e=e.slice();c--;)a=e[c]%fa,o=e[c]/fa|0,r=u*a+o*l,i=l*a+r%fa*fa+s,s=(i/n|0)+(r/fa|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=la,l=ma(r.e/X)-ma(i.e/X),D=D/X|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=sa(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=sa(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==la){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*X-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:_a(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=ha(e.c),d=r==1||r==2&&(o<=c||o>=l)?ya(d,o):ba(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=ha(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=ya(d,a)}else if(t-=o+(r===2&&a>o),d=ba(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=ga(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*X-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(Y+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=da;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=X,o=t,c=p[l=0],f=sa(c/m[i-o-1]%10);else if(l=oa((a+1)/X),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=X,o=a-X+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=X,o=a-X+i,f=o<0?0:sa(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(X-t%X)%X],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[X-a],p[l]=o>0?sa(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==la&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=la)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=ha(e.c),t=n<=c||n>=l?ya(t,n):ba(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return ga(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return _a(e,0,Z),t==null?t=s:_a(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-ma(this.e/X))*X,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(Y+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-va(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&va(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=oa(m/X+2));for(l?(n=new v(.5),u&&(e.s=1),d=va(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=sa(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=va(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:_a(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return ga(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return ga(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=ga(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&ma(this.e/X)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return ga(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=ga(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/X,u=e.e/X,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=ma(l),u=ma(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=la-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=la}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=ma(_.e/X)+ma(e.e/X),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=la,g=fa,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/X,o=e.e/X,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=ma(a),o=ma(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/la|0,s[t]=la===s[t]?0:s[t]%la;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return _a(e,1,Z),t==null?t=s:_a(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*X+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return _a(e,-ua,ua),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=ha(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=ma((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),ha(a.c).slice(0,u)===(n=ha(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(_a(e,0,Z),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(_a(e,0,Z),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(Y+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(Y+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=ha(y),c=n.e=g.length-_.e-1,n.c[0]=da[(l=c%X)<0?X+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&_a(e,1,Z),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?ya(ha(r.c),a):ba(ha(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=ba(ha(r.c),r.e,`0`)):(_a(e,2,g.length,`Base`),t=n(ba(ha(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function ma(e){var t=e|0;return e>0||e===t?t:t-1}function ha(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=X-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function ga(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function _a(e,t,n,r){if(e<t||e>n||e!==sa(e))throw Error(Y+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function va(e){var t=e.c.length-1;return ma(e.e/X)==t&&e.c[t]%2!=0}function ya(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function ba(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var xa=pa(),Sa=class{key;left=null;right=null;constructor(e){this.key=e}},Ca=class extends Sa{constructor(e){super(e)}},wa=class{size=0;modificationCount=0;splayCount=0;splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let n=null,r=null,i=null,a=null,o=t,s=this.compare,c;for(;;)if(c=s(o.key,e),c>0){let t=o.left;if(t==null||(c=s(t.key,e),c>0&&(o.left=t.right,t.right=o,o=t,t=o.left,t==null)))break;n==null?r=o:n.left=o,n=o,o=t}else if(c<0){let t=o.right;if(t==null||(c=s(t.key,e),c<0&&(o.right=t.left,t.left=o,o=t,t=o.right,t==null)))break;i==null?a=o:i.right=o,i=o,o=t}else break;return i!=null&&(i.right=o.left,o.left=a),n!=null&&(n.left=o.right,o.right=r),this.root!==o&&(this.root=o,this.splayCount++),c}splayMin(e){let t=e,n=t.left;for(;n!=null;){let e=n;t.left=e.right,e.right=t,t=e,n=t.left}return t}splayMax(e){let t=e,n=t.right;for(;n!=null;){let e=n;t.right=e.left,e.left=t,t=e,n=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let t=this.root,n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{let e=t.right;t=this.splayMax(r),t.right=e,this.root=t}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let n=this.root;if(n==null){this.root=e;return}t<0?(e.left=n,e.right=n.right,n.right=null):(e.right=n,e.left=n.left,n.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},Ta=class e extends wa{root=null;compare;validKey;constructor(e,t){super(),this.compare=e??this.defaultCompare(),this.validKey=t??(e=>e!=null&&e!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(let t of e)this.delete(t)}forEach(e){let t=this[Symbol.iterator](),n;for(;n=t.next(),!n.done;)e(n.value,n.value,this)}add(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new Ca(e),t),this}addAndReturn(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new Ca(e),t),this.root.key}addAll(e){for(let t of e)this.add(t)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw`Bad state: No element`;if(this.size>1)throw`Bad state: Too many element`;return this.root.key}first(){if(this.size==0)throw`Bad state: No element`;return this._first().key}last(){if(this.size==0)throw`Bad state: No element`;return this._last().key}lastBefore(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)<0)return this.root.key;let t=this.root.left;if(t==null)return null;let n=t.right;for(;n!=null;)t=n,n=t.right;return t.key}firstAfter(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)>0)return this.root.key;let t=this.root.right;if(t==null)return null;let n=t.left;for(;n!=null;)t=n,n=t.left;return t.key}retainAll(t){let n=new e(this.compare,this.validKey),r=this.modificationCount;for(let e of t){if(r!=this.modificationCount)throw`Concurrent modification during iteration.`;this.validKey(e)&&this.splay(e)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(e){return!this.validKey(e)||this.splay(e)!=0?null:this.root.key}intersection(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)&&n.add(e);return n}difference(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)||n.add(e);return n}union(e){let t=this.clone();return t.addAll(e),t}clone(){let t=new e(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(e){if(e==null)return null;function t(e,n){let r,i;do{if(r=e.left,i=e.right,r!=null){let e=new Ca(r.key);n.left=e,t(r,e)}if(i!=null){let t=new Ca(i.key);n.right=t,e=i,n=t}}while(i!=null)}let n=new Ca(e.key);return t(e,n),n}toSet(){return this.clone()}entries(){return new Oa(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new Da(this.wrap())}[Symbol.toStringTag]=`[object Set]`},Ea=class{tree;path=[];modificationCount=null;splayCount;constructor(e){this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let e=this.tree.getRoot();for(;e!=null;)this.path.push(e),e=e.left;return this.path.length>0}throw`Concurrent modification during iteration.`}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},Da=class extends Ea{getValue(e){return e.key}},Oa=class extends Ea{getValue(e){return[e.key,e.key]}},ka=e=>()=>e,Aa=e=>{let t=e?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(e):ka(!1);return(e,n)=>t(e,n)?0:e.comparedTo(n)};function ja(e){let t=e?(t,n,r,i,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)):ka(!1);return(e,n,r)=>{let i=e.x,a=e.y,o=r.x,s=r.y,c=a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));return t(c,i,a,o,s)?0:c.comparedTo(0)}}var Ma=e=>e,Na=e=>{if(e){let t=new Ta(Aa(e)),n=new Ta(Aa(e)),r=(e,t)=>t.addAndReturn(e),i=e=>({x:r(e.x,t),y:r(e.y,n)});return i({x:new xa(0),y:new xa(0)}),i}return Ma},Pa=e=>({set:e=>{Q=Pa(e)},reset:()=>Pa(e),compare:Aa(e),snap:Na(e),orient:ja(e)}),Q=Pa(),$=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),Fa=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let n=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,r=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,a=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:n,y:i},ur:{x:r,y:a}}},Ia=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),La=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),Ra=e=>La(e,e).sqrt(),za=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return Ia(i,r).div(Ra(i)).div(Ra(r))},Ba=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return La(i,r).div(Ra(i)).div(Ra(r))},Va=(e,t,n)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(n.minus(e.y))),y:n},Ha=(e,t,n)=>t.x.isZero()?null:{x:n,y:e.y.plus(t.y.div(t.x).times(n.minus(e.x)))},Ua=(e,t,n,r)=>{if(t.x.isZero())return Ha(n,r,e.x);if(r.x.isZero())return Ha(e,t,n.x);if(t.y.isZero())return Va(n,r,e.y);if(r.y.isZero())return Va(e,t,n.y);let i=Ia(t,r);if(i.isZero())return null;let a={x:n.x.minus(e.x),y:n.y.minus(e.y)},o=Ia(a,t).div(i),s=Ia(a,r).div(i),c=e.x.plus(s.times(t.x)),l=n.x.plus(o.times(r.x)),u=e.y.plus(s.times(t.y)),d=n.y.plus(o.times(r.y));return{x:c.plus(l).div(2),y:u.plus(d).div(2)}},Wa=class e{point;isLeft;segment;otherSE;consumedBy;static compare(t,n){let r=e.comparePoints(t.point,n.point);return r===0?(t.point!==n.point&&t.link(n),t.isLeft===n.isLeft?Qa.compare(t.segment,n.segment):t.isLeft?1:-1):r}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw Error(`Tried to link already linked events`);let t=e.point.events;for(let e=0,n=t.length;e<n;e++){let n=t[e];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){let e=this.point.events.length;for(let t=0;t<e;t++){let n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){let e=this.point.events[r];e.consumedBy===void 0&&n.otherSE.point.events===e.otherSE.point.events&&n.segment.consume(e.segment)}}}getAvailableLinkedEvents(){let e=[];for(let t=0,n=this.point.events.length;t<n;t++){let n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}getLeftmostComparator(e){let t=new Map,n=n=>{let r=n.otherSE;t.set(n,{sine:za(this.point,e.point,r.point),cosine:Ba(this.point,e.point,r.point)})};return(e,r)=>{t.has(e)||n(e),t.has(r)||n(r);let{sine:i,cosine:a}=t.get(e),{sine:o,cosine:s}=t.get(r);return i.isGreaterThanOrEqualTo(0)&&o.isGreaterThanOrEqualTo(0)?a.isLessThan(s)?1:a.isGreaterThan(s)?-1:0:i.isLessThan(0)&&o.isLessThan(0)?a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0:o.isLessThan(i)?-1:o.isGreaterThan(i)?1:0}}},Ga=class e{events;poly;_isExteriorRing;_enclosingRing;static factory(t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];if(!i.isInResult()||i.ringOut)continue;let a=null,o=i.leftSE,s=i.rightSE,c=[o],l=o.point,u=[];for(;a=o,o=s,c.push(o),o.point!==l;)for(;;){let t=o.getAvailableLinkedEvents();if(t.length===0){let e=c[0].point,t=c[c.length-1].point;throw Error(`Unable to complete output ring starting at [${e.x}, ${e.y}]. Last matching segment found ends at [${t.x}, ${t.y}].`)}if(t.length===1){s=t[0].otherSE;break}let r=null;for(let e=0,t=u.length;e<t;e++)if(u[e].point===o.point){r=e;break}if(r!==null){let t=u.splice(r)[0],i=c.splice(t.index);i.unshift(i[0].otherSE),n.push(new e(i.reverse()));continue}u.push({index:c.length,point:o.point});let i=o.getLeftmostComparator(a);s=t.sort(i)[0].otherSE;break}n.push(new e(c))}return n}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point,t=[e];for(let n=1,r=this.events.length-1;n<r;n++){let r=this.events[n].point,i=this.events[n+1].point;Q.orient(r,e,i)!==0&&(t.push(r),e=r)}if(t.length===1)return null;let n=t[0],r=t[1];Q.orient(n,e,r)===0&&t.shift(),t.push(t[0]);let i=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,s=[];for(let e=a;e!=o;e+=i)s.push([t[e].x.toNumber(),t[e].y.toNumber()]);return s}isExteriorRing(){if(this._isExteriorRing===void 0){let e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let t=1,n=this.events.length;t<n;t++){let n=this.events[t];Wa.compare(e,n)>0&&(e=n)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut?.enclosingRing()===t.ringOut?t.ringOut?.enclosingRing():t.ringOut;t=n.prevInResult(),n=t?t.prevInResult():null}}},Ka=class{exteriorRing;interiorRings;constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let e=0,n=this.interiorRings.length;e<n;e++){let n=this.interiorRings[e].getGeom();n!==null&&t.push(n)}return t}},qa=class{rings;polys;constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];if(!r.poly)if(r.isExteriorRing())t.push(new Ka(r));else{let e=r.enclosingRing();e?.poly||t.push(new Ka(e)),e?.poly?.addInterior(r)}}return t}},Ja=class{queue;tree;segments;constructor(e,t=Qa.compare){this.queue=e,this.tree=new Ta(t),this.segments=[]}process(e){let t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),n;e.isLeft&&this.tree.add(t);let r=t,i=t;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let a=null;if(r){let e=r.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(a=e),!r.isAnEndpoint(e))){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}let o=null;if(i){let e=i.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(o=e),!i.isAnEndpoint(e))){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}if(a!==null||o!==null){let e=null;e=a===null?o:o===null||Wa.comparePoints(a,o)<=0?a:o,this.queue.delete(t.rightSE),n.push(t.rightSE);let r=t.split(e);for(let e=0,t=r.length;e<t;e++)n.push(r[e])}n.length>0?(this.tree.delete(t),n.push(e)):(this.segments.push(t),t.prev=r)}else{if(r&&i){let e=r.getIntersection(i);if(e!==null){if(!r.isAnEndpoint(e)){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}if(!i.isAnEndpoint(e)){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}}this.tree.delete(t)}return n}_splitSafely(e,t){this.tree.delete(e);let n=e.rightSE;this.queue.delete(n);let r=e.split(t);return r.push(n),e.consumedBy===void 0&&this.tree.add(e),r}},Ya=new class{type;numMultiPolys;run(e,t,n){Ya.type=e;let r=[new to(t,!0)];for(let e=0,t=n.length;e<t;e++)r.push(new to(n[e],!1));if(Ya.numMultiPolys=r.length,Ya.type===`difference`){let e=r[0],t=1;for(;t<r.length;)Fa(r[t].bbox,e.bbox)===null?r.splice(t,1):t++}if(Ya.type===`intersection`)for(let e=0,t=r.length;e<t;e++){let t=r[e];for(let n=e+1,i=r.length;n<i;n++)if(Fa(t.bbox,r[n].bbox)===null)return[]}let i=new Ta(Wa.compare);for(let e=0,t=r.length;e<t;e++){let t=r[e].getSweepEvents();for(let e=0,n=t.length;e<n;e++)i.add(t[e])}let a=new Ja(i),o=null;for(i.size!=0&&(o=i.first(),i.delete(o));o;){let e=a.process(o);for(let t=0,n=e.length;t<n;t++){let n=e[t];n.consumedBy===void 0&&i.add(n)}i.size==0?o=null:(o=i.first(),i.delete(o))}return Q.reset(),new qa(Ga.factory(a.segments)).getGeom()}},Xa=Ya,Za=0,Qa=class e{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(e,t){let n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(i.isLessThan(r))return-1;let o=e.leftSE.point.y,s=t.leftSE.point.y,c=e.rightSE.point.y,l=t.rightSE.point.y;if(n.isLessThan(r)){if(s.isLessThan(o)&&s.isLessThan(c))return 1;if(s.isGreaterThan(o)&&s.isGreaterThan(c))return-1;let n=e.comparePoint(t.leftSE.point);if(n<0)return 1;if(n>0)return-1;let r=t.comparePoint(e.rightSE.point);return r===0?-1:r}if(n.isGreaterThan(r)){if(o.isLessThan(s)&&o.isLessThan(l))return-1;if(o.isGreaterThan(s)&&o.isGreaterThan(l))return 1;let n=t.comparePoint(e.leftSE.point);if(n!==0)return n;let r=e.comparePoint(t.rightSE.point);return r<0?1:r>0?-1:1}if(o.isLessThan(s))return-1;if(o.isGreaterThan(s))return 1;if(i.isLessThan(a)){let n=t.comparePoint(e.rightSE.point);if(n!==0)return n}if(i.isGreaterThan(a)){let n=e.comparePoint(t.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!i.eq(a)){let e=c.minus(o),t=i.minus(n),u=l.minus(s),d=a.minus(r);if(e.isGreaterThan(t)&&u.isLessThan(d))return 1;if(e.isLessThan(t)&&u.isGreaterThan(d))return-1}return i.isGreaterThan(a)?1:i.isLessThan(a)||c.isLessThan(l)?-1:c.isGreaterThan(l)?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Za,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(t,n,r){let i,a,o,s=Wa.comparePoints(t,n);if(s<0)i=t,a=n,o=1;else if(s>0)i=n,a=t,o=-1;else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);return new e(new Wa(i,!0),new Wa(a,!1),[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Q.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){let t=this.bbox(),n=e.bbox(),r=Fa(t,n);if(r===null)return null;let i=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,s=e.rightSE.point,c=$(t,o)&&this.comparePoint(o)===0,l=$(n,i)&&e.comparePoint(i)===0,u=$(t,s)&&this.comparePoint(s)===0,d=$(n,a)&&e.comparePoint(a)===0;if(l&&c)return d&&!u?a:!d&&u?s:null;if(l)return u&&i.x.eq(s.x)&&i.y.eq(s.y)?null:i;if(c)return d&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(d&&u)return null;if(d)return a;if(u)return s;let f=Ua(i,this.vector(),o,e.vector());return f===null||!$(r,f)?null:Q.snap(f)}split(t){let n=[],r=t.events!==void 0,i=new Wa(t,!0),a=new Wa(t,!1),o=this.rightSE;this.replaceRightSE(a),n.push(a),n.push(i);let s=new e(i,o,this.rings.slice(),this.windings.slice());return Wa.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),Wa.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}swapEvents(){let e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e<t;e++)this.windings[e]*=-1}consume(t){let n=this,r=t;for(;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;let i=e.compare(n,r);if(i!==0){if(i>0){let e=n;n=r,r=e}if(n.prev===r){let e=n;n=r,r=e}for(let e=0,t=r.rings.length;e<t;e++){let t=r.rings[e],i=r.windings[e],a=n.rings.indexOf(t);a===-1?(n.rings.push(t),n.windings.push(i)):n.windings[a]+=i}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}prevInResult(){return this._prevInResult===void 0&&(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){return this._beforeState===void 0&&(this.prev?this._beforeState=(this.prev.consumedBy||this.prev).afterState():this._beforeState={rings:[],windings:[],multiPolys:[]}),this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};let t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let e=0,r=this.rings.length;e<r;e++){let r=this.rings[e],i=this.windings[e],a=t.indexOf(r);a===-1?(t.push(r),n.push(i)):n[a]+=i}let i=[],a=[];for(let e=0,r=t.length;e<r;e++){if(n[e]===0)continue;let r=t[e],o=r.poly;if(a.indexOf(o)===-1)if(r.isExterior)i.push(o);else{a.indexOf(o)===-1&&a.push(o);let e=i.indexOf(r.poly);e!==-1&&i.splice(e,1)}}for(let e=0,t=i.length;e<t;e++){let t=i[e].multiPoly;r.indexOf(t)===-1&&r.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Xa.type){case`union`:this._isInResult=e.length===0!=(t.length===0);break;case`intersection`:{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Xa.numMultiPolys&&n<r;break}case`xor`:this._isInResult=Math.abs(e.length-t.length)%2==1;break;case`difference`:{let n=e=>e.length===1&&e[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},$a=class{poly;isExterior;segments;bbox;constructor(e,t,n){if(!Array.isArray(e)||e.length===0||(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!=`number`||typeof e[0][1]!=`number`))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let r=Q.snap({x:new xa(e[0][0]),y:new xa(e[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let t=1,n=e.length;t<n;t++){if(typeof e[t][0]!=`number`||typeof e[t][1]!=`number`)throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let n=Q.snap({x:new xa(e[t][0]),y:new xa(e[t][1])});n.x.eq(i.x)&&n.y.eq(i.y)||(this.segments.push(Qa.fromRing(i,n,this)),n.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.x),n.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.y),n.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.x),n.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.y),i=n)}(!r.x.eq(i.x)||!r.y.eq(i.y))&&this.segments.push(Qa.fromRing(i,r,this))}getSweepEvents(){let e=[];for(let t=0,n=this.segments.length;t<n;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},eo=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);this.exteriorRing=new $a(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=e.length;t<n;t++){let n=new $a(e[t],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){let n=this.interiorRings[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},to=class{isSubject;polys;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);try{typeof e[0][0][0]==`number`&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new xa(1/0),y:new xa(1/0)},ur:{x:new xa(-1/0),y:new xa(-1/0)}};for(let t=0,n=e.length;t<n;t++){let n=new eo(e[t],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},no=(e,...t)=>Xa.run(`intersection`,e,t);Q.set;function ro(e,t={}){let n=[];if(Hn(e,e=>{n.push(e.coordinates)}),n.length<2)throw Error(`Must specify at least 2 geometries`);let r=no(n[0],...n.slice(1));return r.length===0?null:r.length===1?In(r[0],t.properties):Bn(r,t.properties)}var io=1e-6,ao=Math.PI,oo=ao/2,so=ao/4,co=ao*2,lo=180/ao,uo=ao/180,fo=Math.abs,po=Math.atan,mo=Math.atan2,ho=Math.cos,go=Math.ceil,_o=Math.exp,vo=Math.log,yo=Math.sin,bo=Math.sign||function(e){return e>0?1:e<0?-1:0},xo=Math.sqrt,So=Math.tan;function Co(e){return e>1?0:e<-1?ao:Math.acos(e)}function wo(e){return e>1?oo:e<-1?-oo:Math.asin(e)}function To(){}function Eo(e,t){e&&Oo.hasOwnProperty(e.type)&&Oo[e.type](e,t)}var Do={Feature:function(e,t){Eo(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Eo(n[r].geometry,t)}},Oo={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ko(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ko(n[r],t,0)},Polygon:function(e,t){Ao(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ao(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Eo(n[r],t)}};function ko(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function Ao(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ko(e[n],t,1);t.polygonEnd()}function jo(e,t){e&&Do.hasOwnProperty(e.type)?Do[e.type](e,t):Eo(e,t)}function Mo(e){return[mo(e[1],e[0]),wo(e[2])]}function No(e){var t=e[0],n=e[1],r=ho(n);return[r*ho(t),r*yo(t),yo(n)]}function Po(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Fo(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Io(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Lo(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ro(e){var t=xo(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function zo(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function Bo(e,t){return fo(e)>ao&&(e-=Math.round(e/co)*co),[e,t]}Bo.invert=Bo;function Vo(e,t,n){return(e%=co)?t||n?zo(Uo(e),Wo(t,n)):Uo(e):t||n?Wo(t,n):Bo}function Ho(e){return function(t,n){return t+=e,fo(t)>ao&&(t-=Math.round(t/co)*co),[t,n]}}function Uo(e){var t=Ho(e);return t.invert=Ho(-e),t}function Wo(e,t){var n=ho(e),r=yo(e),i=ho(t),a=yo(t);function o(e,t){var o=ho(t),s=ho(e)*o,c=yo(e)*o,l=yo(t),u=l*n+s*r;return[mo(c*i-u*a,s*n-l*r),wo(u*i+c*a)]}return o.invert=function(e,t){var o=ho(t),s=ho(e)*o,c=yo(e)*o,l=yo(t),u=l*i-c*a;return[mo(c*i+l*a,s*n+u*r),wo(u*n-s*r)]},o}function Go(e){e=Vo(e[0]*uo,e[1]*uo,e.length>2?e[2]*uo:0);function t(t){return t=e(t[0]*uo,t[1]*uo),t[0]*=lo,t[1]*=lo,t}return t.invert=function(t){return t=e.invert(t[0]*uo,t[1]*uo),t[0]*=lo,t[1]*=lo,t},t}function Ko(e,t,n,r,i,a){if(n){var o=ho(t),s=yo(t),c=r*n;i==null?(i=t+r*co,a=t-c/2):(i=qo(o,i),a=qo(o,a),(r>0?i<a:i>a)&&(i+=r*co));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Mo([o,-s*ho(u),-s*yo(u)]),e.point(l[0],l[1])}}function qo(e,t){t=No(t),t[0]-=e,Ro(t);var n=Co(-t[1]);return((-t[2]<0?-n:n)+co-io)%co}function Jo(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:To,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Yo(e,t){return fo(e[0]-t[0])<1e-6&&fo(e[1]-t[1])<1e-6}function Xo(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Zo(e,t,n,r,i){var a=[],o=[],s,c;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],c;if(Yo(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*io}a.push(c=new Xo(n,e,null,!0)),o.push(c.o=new Xo(n,null,c,!1)),a.push(c=new Xo(r,e,null,!1)),o.push(c.o=new Xo(r,null,c,!0))}}),a.length){for(o.sort(t),Qo(a),Qo(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,d;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((d=u[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((d=u[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Qo(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function $o(e){return fo(e[0])<=ao?e[0]:bo(e[0])*((fo(e[0])+ao)%co-ao)}function es(e,t){var n=$o(t),r=t[1],i=yo(r),a=[yo(n),-ho(n),0],o=0,s=0,c=new jt;i===1?r=oo+io:i===-1&&(r=-oo-io);for(var l=0,u=e.length;l<u;++l)if(f=(d=e[l]).length)for(var d,f,p=d[f-1],m=$o(p),h=p[1]/2+so,g=yo(h),_=ho(h),v=0;v<f;++v,m=b,g=S,_=C,p=y){var y=d[v],b=$o(y),x=y[1]/2+so,S=yo(x),C=ho(x),w=b-m,T=w>=0?1:-1,E=T*w,D=E>ao,O=g*S;if(c.add(mo(O*T*yo(E),_*C+O*ho(E))),o+=D?w+T*co:w,D^m>=n^b>=n){var k=Fo(No(p),No(y));Ro(k);var A=Fo(a,k);Ro(A);var j=(D^w>=0?-1:1)*wo(A[2]);(r>j||r===j&&(k[0]||k[1]))&&(s+=D^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&c<-1e-12)^s&1}function ts(e,t,n,r){return function(i){var a=t(i),o=Jo(),s=t(o),c=!1,l,u,d,f={point:p,lineStart:h,lineEnd:g,polygonStart:function(){f.point=_,f.lineStart=v,f.lineEnd=y,u=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=h,f.lineEnd=g,u=Gt(u);var e=es(l,r);u.length?(c||=(i.polygonStart(),!0),Zo(u,rs,e,n,i)):e&&(c||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&=(i.polygonEnd(),!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){a.point(e,t)}function h(){f.point=m,a.lineStart()}function g(){f.point=p,a.lineEnd()}function _(e,t){d.push([e,t]),s.point(e,t)}function v(){s.lineStart(),d=[]}function y(){_(d[0][0],d[0][1]),s.lineEnd();var e=s.clean(),t=o.result(),n,r=t.length,a,f,p;if(d.pop(),l.push(d),d=null,r){if(e&1){if(f=t[0],(a=f.length-1)>0){for(c||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=f[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),u.push(t.filter(ns))}}return f}}function ns(e){return e.length>1}function rs(e,t){return((e=e.x)[0]<0?e[1]-oo-io:oo-e[1])-((t=t.x)[0]<0?t[1]-oo-io:oo-t[1])}var is=ts(function(){return!0},as,ss,[-ao,-oo]);function as(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?ao:-ao,c=fo(a-t);fo(c-ao)<1e-6?(e.point(t,n=(n+o)/2>0?oo:-oo),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&c>=ao&&(fo(t-r)<1e-6&&(t-=r*io),fo(a-s)<1e-6&&(a-=s*io),n=os(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function os(e,t,n,r){var i,a,o=yo(e-n);return fo(o)>1e-6?po((yo(t)*(a=ho(r))*yo(n)-yo(r)*(i=ho(t))*yo(e))/(i*a*o)):(t+r)/2}function ss(e,t,n,r){var i;if(e==null)i=n*oo,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(fo(e[0]-t[0])>1e-6){var a=e[0]<t[0]?ao:-ao;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function cs(e){var t=ho(e),n=2*uo,r=t>0,i=fo(t)>io;function a(t,r,i,a){Ko(a,e,n,i,t,r)}function o(e,n){return ho(e)*ho(n)>t}function s(e){var t,n,a,s,u;return{lineStart:function(){s=a=!1,u=1},point:function(d,f){var p=[d,f],m,h=o(d,f),g=r?h?0:l(d,f):h?l(d+(d<0?ao:-ao),f):0;if(!t&&(s=a=h)&&e.lineStart(),h!==a&&(m=c(t,p),(!m||Yo(t,m)||Yo(p,m))&&(p[2]=1)),h!==a)u=0,h?(e.lineStart(),m=c(p,t),e.point(m[0],m[1])):(m=c(t,p),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(i&&t&&r^h){var _;!(g&n)&&(_=c(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}h&&(!t||!Yo(t,p))&&e.point(p[0],p[1]),t=p,a=h,n=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return u|(s&&a)<<1}}}function c(e,n,r){var i=No(e),a=No(n),o=[1,0,0],s=Fo(i,a),c=Po(s,s),l=s[0],u=c-l*l;if(!u)return!r&&e;var d=t*c/u,f=-t*l/u,p=Fo(o,s),m=Lo(o,d);Io(m,Lo(s,f));var h=p,g=Po(m,h),_=Po(h,h),v=g*g-_*(Po(m,m)-1);if(!(v<0)){var y=xo(v),b=Lo(h,(-g-y)/_);if(Io(b,m),b=Mo(b),!r)return b;var x=e[0],S=n[0],C=e[1],w=n[1],T;S<x&&(T=x,x=S,S=T);var E=S-x,D=fo(E-ao)<io,O=D||E<1e-6;if(!D&&w<C&&(T=C,C=w,w=T),O?D?C+w>0^b[1]<(fo(b[0]-x)<1e-6?C:w):C<=b[1]&&b[1]<=w:E>ao^(x<=b[0]&&b[0]<=S)){var k=Lo(h,(-g+y)/_);return Io(k,m),[b,Mo(k)]}}}function l(t,n){var i=r?e:ao-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return ts(o,s,a,r?[0,-e]:[-ao,e-ao])}function ls(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var us=1e9,ds=-us;function fs(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var u=0,d=0;if(i==null||(u=o(i,s))!==(d=o(a,s))||c(i,a)<0^s>0)do l.point(u===0||u===3?e:n,u>1?r:t);while((u=(u+s+4)%4)!==d);else l.point(a[0],a[1])}function o(r,i){return fo(r[0]-e)<1e-6?i>0?0:3:fo(r[0]-n)<1e-6?i>0?2:1:fo(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return c(e.x,t.x)}function c(e,t){var n=o(e,1),r=o(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(o){var c=o,l=Jo(),u,d,f,p,m,h,g,_,v,y,b,x={point:S,lineStart:E,lineEnd:D,polygonStart:w,polygonEnd:T};function S(e,t){i(e,t)&&c.point(e,t)}function C(){for(var t=0,n=0,i=d.length;n<i;++n)for(var a=d[n],o=1,s=a.length,c=a[0],l,u,f=c[0],p=c[1];o<s;++o)l=f,u=p,c=a[o],f=c[0],p=c[1],u<=r?p>r&&(f-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(f-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function w(){c=l,u=[],d=[],b=!0}function T(){var e=C(),t=b&&e,n=(u=Gt(u)).length;(t||n)&&(o.polygonStart(),t&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),n&&Zo(u,s,e,a,o),o.polygonEnd()),c=o,u=d=f=null}function E(){x.point=O,d&&d.push(f=[]),y=!0,v=!1,g=_=NaN}function D(){u&&(O(p,m),h&&v&&l.rejoin(),u.push(l.result())),x.point=S,v&&c.lineEnd()}function O(a,o){var s=i(a,o);if(d&&f.push([a,o]),y)p=a,m=o,h=s,y=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&v)c.point(a,o);else{var l=[g=Math.max(ds,Math.min(us,g)),_=Math.max(ds,Math.min(us,_))],u=[a=Math.max(ds,Math.min(us,a)),o=Math.max(ds,Math.min(us,o))];ls(l,u,e,t,n,r)?(v||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),b=!1):s&&(c.lineStart(),c.point(a,o),b=!1)}g=a,_=o,v=s}return x}}function ps(e,t,n){var r=Kt(e,t-io,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function ms(e,t,n){var r=Kt(e,t-io,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function hs(){var e,t,n,r,i,a,o,s,c=10,l=c,u=90,d=360,f,p,m,h,g=2.5;function _(){return{type:`MultiLineString`,coordinates:v()}}function v(){return Kt(go(r/u)*u,n,u).map(m).concat(Kt(go(s/d)*d,o,d).map(h)).concat(Kt(go(t/c)*c,e,c).filter(function(e){return fo(e%u)>io}).map(f)).concat(Kt(go(a/l)*l,i,l).filter(function(e){return fo(e%d)>io}).map(p))}return _.lines=function(){return v().map(function(e){return{type:`LineString`,coordinates:e}})},_.outline=function(){return{type:`Polygon`,coordinates:[m(r).concat(h(o).slice(1),m(n).reverse().slice(1),h(s).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),_.precision(g)):[[r,s],[n,o]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),_.precision(g)):[[t,a],[e,i]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(u=+e[0],d=+e[1],_):[u,d]},_.stepMinor=function(e){return arguments.length?(c=+e[0],l=+e[1],_):[c,l]},_.precision=function(c){return arguments.length?(g=+c,f=ps(a,i,90),p=ms(t,e,g),m=ps(s,o,90),h=ms(r,n,g),_):g},_.extentMajor([[-180,-90+io],[180,90-io]]).extentMinor([[-180,-80-io],[180,80+io]])}var gs=e=>e,_s=new jt,vs=new jt,ys,bs,xs,Ss,Cs={point:To,lineStart:To,lineEnd:To,polygonStart:function(){Cs.lineStart=ws,Cs.lineEnd=Ds},polygonEnd:function(){Cs.lineStart=Cs.lineEnd=Cs.point=To,_s.add(fo(vs)),vs=new jt},result:function(){var e=_s/2;return _s=new jt,e}};function ws(){Cs.point=Ts}function Ts(e,t){Cs.point=Es,ys=xs=e,bs=Ss=t}function Es(e,t){vs.add(Ss*e-xs*t),xs=e,Ss=t}function Ds(){Es(ys,bs)}var Os=1/0,ks=Os,As=-Os,js=As,Ms={point:Ns,lineStart:To,lineEnd:To,polygonStart:To,polygonEnd:To,result:function(){var e=[[Os,ks],[As,js]];return As=js=-(ks=Os=1/0),e}};function Ns(e,t){e<Os&&(Os=e),e>As&&(As=e),t<ks&&(ks=t),t>js&&(js=t)}var Ps=0,Fs=0,Is=0,Ls=0,Rs=0,zs=0,Bs=0,Vs=0,Hs=0,Us,Ws,Gs,Ks,qs={point:Js,lineStart:Ys,lineEnd:Qs,polygonStart:function(){qs.lineStart=$s,qs.lineEnd=ec},polygonEnd:function(){qs.point=Js,qs.lineStart=Ys,qs.lineEnd=Qs},result:function(){var e=Hs?[Bs/Hs,Vs/Hs]:zs?[Ls/zs,Rs/zs]:Is?[Ps/Is,Fs/Is]:[NaN,NaN];return Ps=Fs=Is=Ls=Rs=zs=Bs=Vs=Hs=0,e}};function Js(e,t){Ps+=e,Fs+=t,++Is}function Ys(){qs.point=Xs}function Xs(e,t){qs.point=Zs,Js(Gs=e,Ks=t)}function Zs(e,t){var n=e-Gs,r=t-Ks,i=xo(n*n+r*r);Ls+=i*(Gs+e)/2,Rs+=i*(Ks+t)/2,zs+=i,Js(Gs=e,Ks=t)}function Qs(){qs.point=Js}function $s(){qs.point=tc}function ec(){nc(Us,Ws)}function tc(e,t){qs.point=nc,Js(Us=Gs=e,Ws=Ks=t)}function nc(e,t){var n=e-Gs,r=t-Ks,i=xo(n*n+r*r);Ls+=i*(Gs+e)/2,Rs+=i*(Ks+t)/2,zs+=i,i=Ks*e-Gs*t,Bs+=i*(Gs+e),Vs+=i*(Ks+t),Hs+=i*3,Js(Gs=e,Ks=t)}function rc(e){this._context=e}rc.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,co);break}},result:To};var ic=new jt,ac,oc,sc,cc,lc,uc={point:To,lineStart:function(){uc.point=dc},lineEnd:function(){ac&&fc(oc,sc),uc.point=To},polygonStart:function(){ac=!0},polygonEnd:function(){ac=null},result:function(){var e=+ic;return ic=new jt,e}};function dc(e,t){uc.point=fc,oc=cc=e,sc=lc=t}function fc(e,t){cc-=e,lc-=t,ic.add(xo(cc*cc+lc*lc)),cc=e,lc=t}var pc,mc,hc,gc,_c=class{constructor(e){this._append=e==null?vc:yc(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==hc||this._append!==mc){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,hc=e,mc=this._append,gc=this._,this._=t}this._+=gc;break}}result(){let e=this._;return this._=``,e.length?e:null}};function vc(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yc(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return vc;if(t!==pc){let e=10**t;pc=t,mc=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return mc}function bc(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),jo(e,i(a))),a.result()}return o.area=function(e){return jo(e,i(Cs)),Cs.result()},o.measure=function(e){return jo(e,i(uc)),uc.result()},o.bounds=function(e){return jo(e,i(Ms)),Ms.result()},o.centroid=function(e){return jo(e,i(qs)),qs.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,gs):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new _c(n)):new rc(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new _c(n)),o},o.projection(e).digits(n).context(t)}function xc(e){return function(t){var n=new Sc;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Sc(){}Sc.prototype={constructor:Sc,point:function(e,t){this.stream.point(e,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()}};function Cc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),jo(n,e.stream(Ms)),t(Ms.result()),r!=null&&e.clipExtent(r),e}function wc(e,t,n){return Cc(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function Tc(e,t,n){return wc(e,[[0,0],t],n)}function Ec(e,t,n){return Cc(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function Dc(e,t,n){return Cc(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var Oc=16,kc=ho(30*uo);function Ac(e,t){return+t?Mc(e,t):jc(e)}function jc(e){return xc({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Mc(e,t){function n(r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=l-r,v=u-i,y=_*_+v*v;if(y>4*t&&h--){var b=o+f,x=s+p,S=c+m,C=xo(b*b+x*x+S*S),w=wo(S/=C),T=fo(fo(S)-1)<1e-6||fo(a-d)<1e-6?(a+d)/2:mo(x,b),E=e(T,w),D=E[0],O=E[1],k=D-r,A=O-i,j=v*k-_*A;(j*j/y>t||fo((_*k+v*A)/y-.5)>.3||o*f+s*p+c*m<kc)&&(n(r,i,a,o,s,c,D,O,T,b/=C,x/=C,S,h,g),g.point(D,O),n(D,O,T,b,x,S,l,u,d,f,p,m,h,g))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=No([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],Oc,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,Oc,t),h.lineEnd=y,y()}return h}}var Nc=xc({point:function(e,t){this.stream.point(e*uo,t*uo)}});function Pc(e){return xc({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Fc(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function Ic(e,t,n,r,i,a){if(!a)return Fc(e,t,n,r,i);var o=ho(a),s=yo(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function Lc(e){return Rc(function(){return e})()}function Rc(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,m=null,h=is,g=null,_,v,y,b=gs,x=.5,S,C,w,T,E;function D(e){return w(e[0]*uo,e[1]*uo)}function O(e){return e=w.invert(e[0],e[1]),e&&[e[0]*lo,e[1]*lo]}D.stream=function(e){return T&&E===e?T:T=Nc(Pc(u)(h(S(b(E=e)))))},D.preclip=function(e){return arguments.length?(h=e,m=void 0,A()):h},D.postclip=function(e){return arguments.length?(b=e,g=_=v=y=null,A()):b},D.clipAngle=function(e){return arguments.length?(h=+e?cs(m=e*uo):(m=null,is),A()):m*lo},D.clipExtent=function(e){return arguments.length?(b=e==null?(g=_=v=y=null,gs):fs(g=+e[0][0],_=+e[0][1],v=+e[1][0],y=+e[1][1]),A()):g==null?null:[[g,_],[v,y]]},D.scale=function(e){return arguments.length?(n=+e,k()):n},D.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],k()):[r,i]},D.center=function(e){return arguments.length?(a=e[0]%360*uo,o=e[1]%360*uo,k()):[a*lo,o*lo]},D.rotate=function(e){return arguments.length?(s=e[0]%360*uo,c=e[1]%360*uo,l=e.length>2?e[2]%360*uo:0,k()):[s*lo,c*lo,l*lo]},D.angle=function(e){return arguments.length?(d=e%360*uo,k()):d*lo},D.reflectX=function(e){return arguments.length?(f=e?-1:1,k()):f<0},D.reflectY=function(e){return arguments.length?(p=e?-1:1,k()):p<0},D.precision=function(e){return arguments.length?(S=Ac(C,x=e*e),A()):xo(x)},D.fitExtent=function(e,t){return wc(D,e,t)},D.fitSize=function(e,t){return Tc(D,e,t)},D.fitWidth=function(e,t){return Ec(D,e,t)},D.fitHeight=function(e,t){return Dc(D,e,t)};function k(){var e=Ic(n,0,0,f,p,d).apply(null,t(a,o)),m=Ic(n,r-e[0],i-e[1],f,p,d);return u=Vo(s,c,l),C=zo(t,m),w=zo(u,C),S=Ac(C,x),A()}function A(){return T=E=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&O,k()}}function zc(e){return function(t,n){var r=xo(t*t+n*n),i=e(r),a=yo(i),o=ho(i);return[mo(t*a,r*o),wo(r&&n*a/r)]}}function Bc(e,t){return[e,vo(So((oo+t)/2))]}Bc.invert=function(e,t){return[e,2*po(_o(t))-oo]};function Vc(){return Hc(Bc).scale(961/co)}function Hc(e){var t=Lc(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,c,l;t.scale=function(e){return arguments.length?(r(e),u()):r()},t.translate=function(e){return arguments.length?(i(e),u()):i()},t.center=function(e){return arguments.length?(n(e),u()):n()},t.clipExtent=function(e){return arguments.length?(e==null?o=s=c=l=null:(o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var n=ao*r(),i=t(Go(t.rotate()).invert([0,0]));return a(o==null?[[i[0]-n,i[1]-n],[i[0]+n,i[1]+n]]:e===Bc?[[Math.max(i[0]-n,o),s],[Math.min(i[0]+n,c),l]]:[[o,Math.max(i[1]-n,s)],[c,Math.min(i[1]+n,l)]])}return u()}function Uc(e,t){return[ho(t)*yo(e),yo(t)]}Uc.invert=zc(wo);function Wc(){return Lc(Uc).scale(249.5).clipAngle(90+io)}var Gc={type:`Topology`,objects:JSON.parse(`{"res110m":{"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"geometries":[{"type":"Polygon","arcs":[[0,1,2,3,4,5]]},{"type":"MultiPolygon","arcs":[[[6,7,8,9]],[[10,11,12]]]},{"type":"Polygon","arcs":[[13,14,15,16,17]]},{"type":"Polygon","arcs":[[18,19,20,21,22]]},{"type":"MultiPolygon","arcs":[[[23,24]],[[25,26,27,28,29,30]]]},{"type":"Polygon","arcs":[[31,32,33,34,35]]},{"type":"MultiPolygon","arcs":[[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]]]},{"type":"Polygon","arcs":[[44]]},{"type":"MultiPolygon","arcs":[[[45]],[[46]]]},{"type":"Polygon","arcs":[[47,48,49,50,51,52,53]]},{"type":"MultiPolygon","arcs":[[[54,-33]],[[55,56,-36,57,58]]]},{"type":"Polygon","arcs":[[59,60,61,62,63]]},{"type":"Polygon","arcs":[[64,65,66,67,68]]},{"type":"Polygon","arcs":[[69,70,71,72,73]]},{"type":"Polygon","arcs":[[74,-73,75,76,77,78]]},{"type":"Polygon","arcs":[[79,80,81]]},{"type":"Polygon","arcs":[[82,83,84,85,86,87]]},{"type":"MultiPolygon","arcs":[[[88]],[[89]],[[90]]]},{"type":"Polygon","arcs":[[91,92,93]]},{"type":"Polygon","arcs":[[94,95,96,97,98]]},{"type":"Polygon","arcs":[[99,100,101]]},{"type":"Polygon","arcs":[[102,-31,103,104,105]]},{"type":"Polygon","arcs":[[106,107,108,109,-27,110,-106,111,112,113,114]]},{"type":"Polygon","arcs":[[115,116]]},{"type":"Polygon","arcs":[[117,118]]},{"type":"Polygon","arcs":[[119,120,121,122]]},{"type":"Polygon","arcs":[[123,124,125,126,127,128]]},{"type":"MultiPolygon","arcs":[[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]],[[139,140,141,142,143,144,145,146,147,148,149,150,151]],[[152]],[[153]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[161]],[[162]],[[163]],[[164]],[[165]],[[166]],[[167]],[[168]],[[169]],[[170]]]},{"type":"Polygon","arcs":[[-52,171,172,173]]},{"type":"MultiPolygon","arcs":[[[-24,174]],[[-30,175,176,-104]]]},{"type":"MultiPolygon","arcs":[[[177]],[[178,179,180,181,182,183,184,185,186,-119,187,188,189,190,-1,191,192,193,194,195,196,197,198]]]},{"type":"Polygon","arcs":[[-78,199,200,201,202,203]]},{"type":"Polygon","arcs":[[-127,204,205,206,207,208,209,210,211]]},{"type":"Polygon","arcs":[[212,213,214,-61,215,216,-10,217,-13,218,-125]]},{"type":"Polygon","arcs":[[-219,-12,219,220,-205,-126]]},{"type":"Polygon","arcs":[[221,-113,222,223,224,225,226]]},{"type":"Polygon","arcs":[[227,228,229,230]]},{"type":"Polygon","arcs":[[231]]},{"type":"Polygon","arcs":[[232,233]]},{"type":"Polygon","arcs":[[234,-233]]},{"type":"Polygon","arcs":[[235,236,-54,237]]},{"type":"Polygon","arcs":[[238,-238,-53,-174,239,240,-65,241,242,243,244]]},{"type":"Polygon","arcs":[[245,246,247,248]]},{"type":"MultiPolygon","arcs":[[[249]],[[-244,250]]]},{"type":"Polygon","arcs":[[251,252]]},{"type":"Polygon","arcs":[[253,254,255,256,257,258,259,260]]},{"type":"Polygon","arcs":[[261,262,-224]]},{"type":"Polygon","arcs":[[263,264,265,266,267]]},{"type":"Polygon","arcs":[[-248,268,269,270,271,272]]},{"type":"Polygon","arcs":[[273,274,275,276]]},{"type":"Polygon","arcs":[[277,278,279,280,281]]},{"type":"Polygon","arcs":[[282,-269,-247,283,284,285,286,287,288,289,-271]]},{"type":"Polygon","arcs":[[290,291,292,293]]},{"type":"MultiPolygon","arcs":[[[294]],[[295]]]},{"type":"Polygon","arcs":[[296]]},{"type":"MultiPolygon","arcs":[[[297,298,299,-108]],[[300]],[[301,-240,-173,302,303,-274,304,-67]]]},{"type":"Polygon","arcs":[[-221,305,306,-206]]},{"type":"MultiPolygon","arcs":[[[307,308]],[[309]]]},{"type":"Polygon","arcs":[[-58,-35,310,311,312]]},{"type":"Polygon","arcs":[[313,314,-200,-77]]},{"type":"Polygon","arcs":[[315,-203,316,317,318,319,320]]},{"type":"Polygon","arcs":[[321,322]]},{"type":"Polygon","arcs":[[-320,323,324]]},{"type":"Polygon","arcs":[[-307,325,-207]]},{"type":"MultiPolygon","arcs":[[[326]],[[327,-16,328,-85,329]]]},{"type":"Polygon","arcs":[[330]]},{"type":"Polygon","arcs":[[-100,331,332,333,334,335]]},{"type":"Polygon","arcs":[[336,-115,337,338]]},{"type":"Polygon","arcs":[[339,340,341,-333,342]]},{"type":"Polygon","arcs":[[343,344,345,-94,346,347,348,349]]},{"type":"Polygon","arcs":[[-252,350]]},{"type":"Polygon","arcs":[[351,352,353,-344,-350,354,-49,355]]},{"type":"MultiPolygon","arcs":[[[356]],[[357,358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365,366]],[[367]],[[368]],[[369,370]],[[371]]]},{"type":"Polygon","arcs":[[372,-188,-118,-187,373,-82,374,375,-190]]},{"type":"Polygon","arcs":[[376,-308]]},{"type":"Polygon","arcs":[[-32,-57,377,378,-3,379,380,381,382,-55]]},{"type":"Polygon","arcs":[[-382,383,384,385,386,387,388]]},{"type":"Polygon","arcs":[[389]]},{"type":"Polygon","arcs":[[390,391,392,393,-264,394,395]]},{"type":"MultiPolygon","arcs":[[[396]],[[397]],[[398,399,-303,-172,-51]]]},{"type":"Polygon","arcs":[[400]]},{"type":"Polygon","arcs":[[401,402,-394,403,-392,404,-387]]},{"type":"MultiPolygon","arcs":[[[405]],[[406]],[[407]]]},{"type":"Polygon","arcs":[[-194,408,409,410,411,412]]},{"type":"Polygon","arcs":[[413,414,415,416,417,418,-288]]},{"type":"Polygon","arcs":[[-193,419,420,-409]]},{"type":"Polygon","arcs":[[421,422,423,424]]},{"type":"Polygon","arcs":[[425,426]]},{"type":"Polygon","arcs":[[427,-14,428,429]]},{"type":"Polygon","arcs":[[430,431,-385]]},{"type":"Polygon","arcs":[[-425,432,433,-185,434]]},{"type":"Polygon","arcs":[[-396,435,436]]},{"type":"Polygon","arcs":[[-202,437,438,-317]]},{"type":"Polygon","arcs":[[-267,439,440,441,-255,442,443]]},{"type":"Polygon","arcs":[[444]]},{"type":"Polygon","arcs":[[445]]},{"type":"Polygon","arcs":[[-97,446,447,448,449]]},{"type":"Polygon","arcs":[[-302,-66,-241]]},{"type":"Polygon","arcs":[[450,-98,-450,451,-281]]},{"type":"Polygon","arcs":[[-260,452,453]]},{"type":"Polygon","arcs":[[454,455]]},{"type":"Polygon","arcs":[[456]]},{"type":"Polygon","arcs":[[457,-101,-336,458,459]]},{"type":"Polygon","arcs":[[-329,-15,-428,460,-86]]},{"type":"Polygon","arcs":[[461,-79,-204,-316,462,463,-257]]},{"type":"Polygon","arcs":[[-434,464,465,-80,-374,-186]]},{"type":"Polygon","arcs":[[-429,-18,466,-347,-93,467]]},{"type":"Polygon","arcs":[[-196,468]]},{"type":"Polygon","arcs":[[469,470,471,472,473,474,475,476,477,478,479]]},{"type":"Polygon","arcs":[[-464,480,481,482,-258]]},{"type":"Polygon","arcs":[[-475,483,484,485]]},{"type":"MultiPolygon","arcs":[[[486,487]],[[-370,488,-117,489]]]},{"type":"Polygon","arcs":[[490,-122,491,492,-8]]},{"type":"Polygon","arcs":[[493]]},{"type":"Polygon","arcs":[[494,-210,495,-74,-75,-462,-256,-442]]},{"type":"Polygon","arcs":[[-209,496,-70,-496]]},{"type":"Polygon","arcs":[[497,-231,498,-340]]},{"type":"Polygon","arcs":[[-69,499,-242]]},{"type":"MultiPolygon","arcs":[[[500,-294,501,502]],[[503]],[[504]],[[505]]]},{"type":"Polygon","arcs":[[-373,-189]]},{"type":"MultiPolygon","arcs":[[[506]],[[507]]]},{"type":"MultiPolygon","arcs":[[[508,509,-20,510]],[[-23,511]]]},{"type":"Polygon","arcs":[[-376,512,-380,-2,-191]]},{"type":"Polygon","arcs":[[-226,513,-229,514]]},{"type":"Polygon","arcs":[[-112,-105,-177,515,-262,-223]]},{"type":"MultiPolygon","arcs":[[[516]],[[517]],[[518]],[[519]],[[520]],[[521]],[[522]]]},{"type":"MultiPolygon","arcs":[[[523]],[[524]],[[-366,525]],[[526]]]},{"type":"Polygon","arcs":[[527,-447,-96,528,529,-236,-239,530]]},{"type":"Polygon","arcs":[[531]]},{"type":"Polygon","arcs":[[532,533,-426,534,-182]]},{"type":"Polygon","arcs":[[535,-276]]},{"type":"Polygon","arcs":[[-111,-26,-103]]},{"type":"Polygon","arcs":[[-404,-393]]},{"type":"Polygon","arcs":[[536,537]]},{"type":"Polygon","arcs":[[-455,538,539,-88,540,-353,541]]},{"type":"MultiPolygon","arcs":[[[542,543]],[[544]],[[-528,545,-448]],[[546]],[[547]],[[548]],[[549]],[[550]],[[-533,-181,551,552,-199,553,-197,-469,-195,-413,554,-59,-313,555,556,-99,-451,-280,557,-278,558,-291,-501,559]],[[560]],[[561]],[[562]]]},{"type":"Polygon","arcs":[[563,-62,-215,564]]},{"type":"Polygon","arcs":[[-259,-483,565,-453]]},{"type":"Polygon","arcs":[[-432,566,-537,567,-21,-510,568,569,-402,-386]]},{"type":"Polygon","arcs":[[-290,570,-129,571,-440,-266,572,-272]]},{"type":"Polygon","arcs":[[-289,-419,573,-213,-124,-571]]},{"type":"Polygon","arcs":[[-463,-321,-325,574,-323,575,-481]]},{"type":"MultiPolygon","arcs":[[[576]],[[577]],[[578]],[[579]],[[580]]]},{"type":"Polygon","arcs":[[-439,581,-318]]},{"type":"Polygon","arcs":[[582,-334,-342]]},{"type":"Polygon","arcs":[[583,-286,584,-284,-246,585]]},{"type":"Polygon","arcs":[[-414,-287,-584,586]]},{"type":"Polygon","arcs":[[-87,-461,-430,-468,-92,-346,587,343,-354,-541]]},{"type":"Polygon","arcs":[[-299,588,-107,-337,589]]},{"type":"Polygon","arcs":[[590,-356,-48,-237,-530]]},{"type":"Polygon","arcs":[[-349,591,-399,-50,-355]]},{"type":"Polygon","arcs":[[592,-502,-293]]},{"type":"Polygon","arcs":[[-471,593]]},{"type":"Polygon","arcs":[[-405,-391,-437,594,595,-388]]},{"type":"Polygon","arcs":[[-572,-128,-212,596,-495,-441]]},{"type":"Polygon","arcs":[[-72,597,-314,-76]]},{"type":"Polygon","arcs":[[-424,598,-488,599,-465,-433]]},{"type":"Polygon","arcs":[[-420,-192,-6,600]]},{"type":"Polygon","arcs":[[-4,-379,601,-411,602]]},{"type":"Polygon","arcs":[[-358,603]]},{"type":"Polygon","arcs":[[604]]},{"type":"Polygon","arcs":[[-443,-254,605]]},{"type":"MultiPolygon","arcs":[[[-311,-34,-383,-389,-596,606]],[[-330,-84,607]]]},{"type":"Polygon","arcs":[[608]]},{"type":"Polygon","arcs":[[609,-416,610,-479,611,-477,612,-485,613,614,-64,615,-564,616]]},{"type":"Polygon","arcs":[[-418,617,-617,-565,-214,-574]]},{"type":"Polygon","arcs":[[618,-543,619,-539,-456,-542,-352,-591,-529,-95,-557]]},{"type":"Polygon","arcs":[[620,-28,-110]]},{"type":"MultiPolygon","arcs":[[[621]],[[622]],[[623]],[[624]],[[625]],[[626,146,-147,-146,627,-144,628,-142,629,-140,630,-460,631,-149]],[[632]],[[633]],[[634]],[[-151,635]]]},{"type":"Polygon","arcs":[[-421,-601,-5,-603,-410]]},{"type":"Polygon","arcs":[[-338,-114,-222,636]]},{"type":"Polygon","arcs":[[637,-422,-435,-184]]},{"type":"MultiPolygon","arcs":[[[638]],[[639]]]},{"type":"Polygon","arcs":[[640,-569,-509]]},{"type":"Polygon","arcs":[[-472,-594,-470,641,-492,-121,642],[-446]]},{"type":"Polygon","arcs":[[-614,-484,-474,643,-123,-491,-7,-217,644]]},{"type":"Polygon","arcs":[[-643,-120,-644,-473]]}]}}`),arcs:[[[7082,7337],[5,-16]],[[7087,7321],[-16,-7],[-14,-10],[-32,-7],[-30,-12],[-16,-25],[6,-25],[4,-28],[-14,-24],[1,-23],[-8,-20],[-26,1],[11,-38],[-18,-14],[-12,-35],[2,-35],[-11,-16],[-10,6],[-22,-8],[-3,-16],[-20,0],[-16,-32],[-1,-49],[-36,-24],[-19,5],[-6,-13],[-16,7],[-28,-8],[-47,29]],[[6690,6900],[25,52],[-2,37],[-21,10],[-2,37],[-9,46],[12,31],[-12,9],[7,42],[12,71]],[[6700,7235],[28,-22],[21,8],[6,26],[22,9],[15,17],[6,46],[23,12],[5,20],[13,-15],[8,-2]],[[6847,7334],[16,0],[20,-13]],[[6883,7321],[9,-7],[20,19],[9,-11],[9,26],[17,-1],[4,8],[3,24],[12,20],[15,-13],[-3,-18],[9,-3],[-3,-48],[11,-19],[10,12],[12,6],[17,26],[19,-5],[29,0]],[[5664,4553],[3,-18],[-4,-28],[5,-27],[-4,-21],[3,-20],[-58,1],[-2,-183],[19,-48],[18,-36]],[[5644,4173],[-51,-23],[-67,8],[-19,28],[-113,-3],[-4,-4],[-17,26],[-18,2],[-16,-10],[-14,-11]],[[5325,4186],[-2,36],[4,51],[9,53],[2,24],[9,52],[6,24],[16,38],[9,25],[3,43],[-1,33],[-9,20],[-7,35],[-7,35],[2,12],[8,22],[-8,56],[-6,39],[-14,36],[3,11]],[[5342,4831],[11,8],[8,-1],[10,7],[82,-1],[7,-43],[8,-34],[6,-19],[11,-30],[18,5],[9,8],[16,-9],[4,15],[7,33],[17,3],[2,10],[14,0],[-3,-21],[34,1],[1,-37],[5,-22],[-4,-35],[2,-35],[9,-21],[-1,-69],[7,5],[12,-1],[17,9],[13,-4]],[[5338,4849],[-8,43]],[[5330,4892],[12,25],[8,10],[10,-20]],[[5360,4907],[-10,-12],[-4,-15],[-1,-25],[-7,-6]],[[5557,7635],[6,-16],[7,-5],[1,-21]],[[5571,7593],[-3,-20],[4,-25],[11,-14]],[[5583,7534],[0,-15],[-9,-8],[-2,-19],[-13,-28]],[[5559,7464],[-5,4],[0,13],[-15,19],[-3,28],[2,39],[4,18],[-4,9]],[[5538,7594],[-2,18],[12,29],[1,-11],[8,5]],[[6562,6663],[4,-45]],[[6566,6618],[-14,-1],[-3,-37],[5,-8],[-12,-11],[0,-24],[-8,-24],[-1,-23]],[[6533,6490],[-6,-12],[-83,29],[-11,58],[-1,14]],[[6432,6579],[5,2],[1,-15],[22,9],[23,-2],[17,-2],[19,39],[20,37],[18,36]],[[6557,6683],[5,-20]],[[3140,2021],[-17,2],[-30,0],[0,129]],[[3093,2152],[11,-27],[14,-43],[36,-35],[39,-14],[-13,-29],[-26,-3],[-14,20]],[[3258,3901],[51,-94],[23,-8],[34,-43],[29,-22],[4,-26],[-28,-87],[28,-16],[32,-9],[22,9],[25,45],[4,50]],[[3482,3700],[14,11],[14,-33],[-1,-46],[-23,-32],[-19,-23],[-31,-56],[-37,-78]],[[3399,3443],[-7,-47],[-7,-59],[0,-57],[-6,-13],[-2,-37]],[[3377,3230],[-2,-30],[35,-50],[-4,-39],[18,-25],[-2,-28],[-26,-74],[-42,-31],[-55,-12],[-31,6],[6,-35],[-6,-43],[5,-29],[-16,-20],[-29,-8],[-26,21],[-11,-15],[4,-57],[18,-18],[16,18],[8,-29],[-26,-18],[-22,-36],[-4,-58],[-7,-31],[-26,0],[-22,-30],[-8,-43],[28,-42],[26,-12],[-9,-51],[-33,-33],[-18,-67],[-25,-23],[-12,-27],[9,-60],[19,-33],[-12,3]],[[3095,2171],[-26,9],[-67,8],[-11,33],[0,43],[-18,-3],[-10,21],[-3,61],[22,25],[9,36],[-4,30],[15,49],[10,76],[-3,34],[12,11],[-3,21],[-13,12],[10,24],[-13,22],[-6,66],[11,12],[-5,70],[7,59],[7,52],[17,20],[-9,57],[0,53],[21,37],[-1,48],[16,57],[0,52],[-7,11],[-13,99],[18,60],[-3,55],[10,53],[18,54],[20,36],[-9,22],[6,19],[-1,96],[30,28],[10,60],[-3,14]],[[3136,3873],[23,52],[36,-14],[16,-41],[11,46],[32,-2],[4,-13]],[[6291,7415],[-10,-2]],[[6281,7413],[-11,34],[0,9],[-12,-1],[-9,16],[-5,-2]],[[6244,7469],[-11,17],[-21,14],[3,28],[-5,21]],[[6210,7549],[39,9]],[[6249,7558],[5,-15],[11,-10],[-6,-15],[15,-20],[-8,-18],[12,-16],[13,-9],[0,-40]],[[3345,574],[-8,-30],[-8,-26],[-59,8],[-62,-3],[-34,19],[0,2],[-16,17],[63,-2],[60,-6],[20,24],[15,20],[29,-23]],[[577,605],[-53,-8],[-36,20],[-17,21],[-1,3],[-18,16],[17,21],[52,-9],[28,-18],[21,-20],[7,-26]],[[3745,688],[35,-25],[12,-35],[3,-24],[1,-30],[-43,-18],[-45,-14],[-52,-14],[-59,-11],[-65,3],[-37,19],[5,24],[59,16],[24,19],[18,25],[12,21],[17,21],[18,23],[14,0],[41,13],[42,-13]],[[1633,950],[36,-9],[33,10],[-16,-20],[-26,-15],[-39,5],[-27,20],[6,19],[33,-10]],[[1512,951],[43,-22],[-17,2],[-36,6],[-38,15],[20,13],[28,-14]],[[2250,1040],[31,-8],[30,7],[17,-33],[-22,5],[-34,-2],[-34,2],[-38,-3],[-28,11],[-15,24],[18,10],[35,-8],[40,-5]],[[3098,1097],[4,-26],[-5,-23],[-8,-21],[-33,-8],[-31,-12],[-36,2],[14,22],[-33,-8],[-31,-8],[-21,17],[-2,24],[30,23],[20,6],[32,-2],[8,29],[1,22],[0,46],[16,27],[25,9],[15,-21],[6,-22],[12,-26],[10,-24],[7,-26]],[[0,304],[2,0],[24,33],[50,-18],[3,2],[30,19],[4,-1],[3,0],[40,-24],[35,24],[7,3],[81,10],[27,-13],[13,-7],[41,-19],[79,-15],[63,-18],[107,-14],[80,16],[118,-11],[67,-18],[73,17],[78,16],[6,27],[-110,2],[-89,13],[-24,23],[-74,12],[5,26],[10,24],[10,22],[-5,23],[-46,16],[-22,20],[-43,18],[68,-3],[64,9],[40,-19],[50,17],[45,21],[23,19],[-10,24],[-36,16],[-41,17],[-57,3],[-50,8],[-54,6],[-18,21],[-36,18],[-21,21],[-9,65],[14,-6],[25,-18],[45,6],[44,8],[23,-25],[44,6],[37,12],[35,16],[32,19],[41,6],[-1,21],[-9,22],[8,20],[36,10],[16,-19],[42,11],[32,15],[40,1],[38,6],[37,13],[30,12],[34,13],[22,-3],[19,-5],[41,8],[37,-10],[38,1],[37,8],[37,-6],[41,-6],[39,3],[40,-1],[42,-2],[38,3],[28,17],[34,9],[35,-13],[33,10],[30,21],[18,-18],[9,-21],[18,-19],[29,17],[33,-21],[38,-7],[32,-16],[39,4],[36,10],[41,-3],[38,-7],[38,-11],[15,25],[-18,19],[-14,21],[-36,4],[-15,22],[-6,21],[-10,43],[21,-8],[36,-3],[36,3],[33,-9],[28,-17],[12,-20],[38,-4],[36,8],[38,12],[34,6],[28,-13],[37,4],[24,44],[23,-26],[32,-10],[34,6],[23,-23],[37,-2],[33,-7],[34,-12],[21,21],[11,21],[28,-23],[38,6],[28,-13],[19,-19],[37,6],[29,12],[29,15],[33,8],[39,6],[36,8],[27,13],[16,18],[7,25],[-3,23],[-9,23],[-10,22],[-9,23],[-7,20],[-1,23],[2,23],[13,21],[11,24],[5,22],[-6,25],[-3,23],[14,26],[15,16],[18,22],[19,18],[22,17],[11,25],[15,16],[18,14],[26,4],[18,18],[19,11],[23,7],[20,14],[16,18],[22,7],[16,-15],[-10,-19],[-29,-17],[-11,-12],[-21,9],[-23,-6],[-19,-13],[-20,-15],[-14,-17],[-4,-22],[2,-22],[13,-19],[-19,-14],[-26,-4],[-15,-19],[-17,-18],[-17,-25],[-4,-22],[9,-23],[15,-18],[23,-14],[21,-18],[12,-22],[6,-22],[8,-22],[13,-20],[8,-21],[4,-53],[8,-22],[2,-22],[9,-23],[-4,-30],[-15,-24],[-17,-19],[-37,-8],[-12,-20],[-17,-19],[-42,-22],[-37,-9],[-35,-12],[-37,-13],[-22,-23],[-45,-3],[-49,3],[-44,-5],[-47,0],[9,-22],[42,-11],[31,-15],[18,-21],[-31,-18],[-48,6],[-40,-15],[-2,-23],[-1,-23],[33,-19],[6,-22],[35,-21],[59,-9],[50,-16],[40,-18],[50,-18],[70,-9],[68,-16],[47,-17],[52,-19],[27,-27],[13,-21],[34,20],[46,17],[48,18],[58,14],[49,16],[69,1],[68,-8],[57,-13],[17,25],[39,17],[70,1],[55,12],[52,13],[58,8],[62,10],[43,14],[-20,21],[-12,20],[0,21],[-54,-2],[-57,-9],[-54,0],[-8,22],[4,42],[12,13],[40,13],[47,14],[34,17],[33,17],[25,22],[38,11],[38,7],[19,5],[43,2],[41,8],[34,11],[34,14],[30,13],[39,19],[24,19],[26,17],[9,22],[-30,14],[10,23],[18,18],[29,12],[31,13],[28,18],[22,23],[13,27],[21,16],[33,-4],[13,-19],[34,-2],[1,21],[14,23],[30,-6],[7,-21],[33,-3],[36,10],[35,6],[31,-3],[12,-24],[31,20],[28,10],[31,8],[31,7],[29,14],[31,9],[24,12],[17,21],[20,-15],[29,8],[20,-27],[16,-20],[32,11],[12,22],[28,16],[37,-3],[11,-22],[22,22],[30,7],[33,2],[29,-1],[31,-7],[30,-3],[13,-20],[18,-16],[31,10],[32,2],[32,0],[31,1],[28,8],[29,7],[25,16],[26,10],[28,5],[21,16],[15,32],[16,19],[29,-9],[11,-20],[24,-14],[29,5],[19,-21],[21,-14],[28,13],[10,25],[25,10],[29,19],[27,8],[33,11],[22,13],[22,13],[22,13],[26,-7],[25,20],[18,16],[26,-1],[23,14],[6,20],[23,16],[23,11],[28,9],[25,4],[25,-3],[26,-6],[22,-15],[3,-25],[24,-19],[17,-16],[33,-7],[19,-16],[23,-16],[26,-3],[23,11],[24,24],[26,-12],[27,-7],[26,-7],[27,-4],[28,0],[23,-60],[-1,-15],[-4,-26],[-26,-14],[-22,-22],[4,-22],[31,1],[-4,-23],[-14,-21],[-13,-24],[21,-18],[32,-6],[32,10],[15,23],[10,21],[15,18],[17,17],[7,21],[15,28],[18,6],[31,2],[28,7],[28,9],[14,22],[8,22],[19,21],[27,15],[23,11],[16,19],[15,10],[21,9],[27,-5],[25,5],[28,7],[30,-3],[20,16],[14,38],[11,-16],[13,-27],[23,-11],[27,-5],[26,7],[29,-5],[26,-1],[17,6],[24,-3],[21,-13],[25,8],[30,0],[25,8],[29,-8],[19,19],[14,19],[19,16],[35,43],[18,-8],[21,-16],[18,-20],[36,-35],[27,-1],[25,0],[30,7],[30,8],[23,15],[19,17],[31,3],[21,12],[22,-11],[14,-18],[19,-18],[31,2],[19,-15],[33,-14],[35,-6],[29,4],[21,19],[19,18],[25,4],[25,-8],[29,-5],[26,9],[25,0],[24,-6],[26,-6],[25,10],[30,9],[28,3],[32,0],[25,5],[25,5],[8,28],[1,24],[18,-16],[4,-26],[10,-24],[11,-19],[23,-10],[32,3],[36,2],[25,3],[37,0],[26,1],[36,-2],[32,-5],[19,-18],[-5,-21],[18,-17],[30,-14],[31,-14],[35,-10],[38,-10],[28,-9],[32,-1],[18,20],[24,-16],[21,-18],[25,-14],[34,-6],[32,-6],[13,-23],[32,-13],[21,-21],[31,-9],[32,1],[30,-3],[33,1],[34,-4],[31,-8],[28,-14],[29,-11],[20,-17],[-3,-23],[-15,-20],[-13,-26],[-9,-20],[-14,-24],[-36,-9],[-16,-20],[-36,-13],[-13,-22],[-19,-22],[-20,-18],[-11,-23],[-7,-22],[-3,-26],[0,-21],[16,-23],[6,-21],[13,-21],[52,-7],[11,-25],[-50,-9],[-43,-13],[-52,-2],[-24,-33],[-5,-27],[-12,-21],[-14,-22],[37,-19],[14,-23],[24,-22],[33,-19],[39,-18],[42,-18],[64,-18],[14,-28],[80,-13],[5,-4],[21,-17],[77,14],[63,-18],[-9951,-14]],[[6952,2320],[-43,-4],[-1,31],[4,24],[2,11],[18,-18],[26,-7],[1,-11],[-7,-26]],[[9038,2834],[27,-20],[15,8],[22,11],[16,-4],[2,-69],[-9,-19],[-3,-47],[-10,16],[-19,-40],[-6,3],[-17,2],[-17,49],[-4,38],[-16,50],[1,27],[18,-5]],[[8987,4390],[10,-45],[18,21],[9,-24],[13,-22],[-3,-26],[6,-49],[5,-29],[7,-7],[7,-49],[-3,-30],[9,-39],[31,-30],[19,-28],[19,-25],[-4,-14],[16,-36],[11,-62],[11,13],[11,-25],[7,8],[5,-61],[19,-35],[13,-22],[22,-47],[8,-46],[1,-33],[-2,-35],[13,-49],[-2,-51],[-5,-27],[-7,-51],[1,-33],[-6,-41],[-12,-53],[-21,-28],[-10,-45],[-9,-28],[-8,-50],[-11,-29],[-7,-43],[-4,-39],[2,-19],[-16,-20],[-31,-2],[-26,-23],[-13,-23],[-17,-24],[-23,25],[-17,10],[5,30],[-15,-11],[-25,-41],[-24,15],[-15,9],[-16,5],[-27,16],[-18,36],[-5,43],[-7,30],[-13,23],[-27,7],[9,28],[-7,42],[-13,-39],[-25,-11],[14,32],[5,33],[10,28],[-2,43],[-22,-49],[-18,-20],[-10,-46],[-22,24],[1,31],[-18,41],[-14,22],[5,13],[-36,35],[-19,2],[-27,28],[-50,-6],[-36,-20],[-31,-19],[-27,3],[-29,-29],[-24,-13],[-6,-31],[-10,-23],[-23,-1],[-18,-6],[-24,11],[-20,-6],[-19,-3],[-17,-31],[-8,3],[-14,-16],[-13,-19],[-21,3],[-18,0],[-30,36],[-15,11],[1,33],[14,8],[4,13],[-1,21],[4,40],[-3,34],[-15,58],[-4,33],[1,33],[-11,37],[-1,17],[-12,23],[-4,45],[-16,46],[-4,25],[13,-25],[-10,53],[14,-17],[8,-22],[0,30],[-14,45],[-3,18],[-6,17],[3,34],[6,14],[4,29],[-3,33],[11,42],[2,-44],[12,39],[22,20],[14,24],[21,21],[13,5],[7,-7],[22,21],[17,7],[4,12],[8,6],[15,-2],[29,17],[15,26],[7,30],[17,30],[1,23],[1,31],[19,49],[12,-50],[12,12],[-10,27],[9,28],[12,-13],[3,44],[15,28],[7,23],[14,10],[0,16],[13,-7],[0,15],[12,8],[14,8],[20,-27],[16,-34],[17,0],[18,-6],[-6,32],[13,46],[13,15],[-5,15],[12,33],[17,20],[14,-7],[24,11],[-1,29],[-20,19],[15,9],[18,-15],[15,-23],[23,-15],[8,6],[17,-18],[17,17],[10,-5],[7,11],[12,-29],[-7,-31],[-11,-23],[-9,-2],[3,-23],[-8,-29],[-10,-28],[2,-16],[22,-32],[21,-18],[15,-20],[20,-34],[8,0],[14,-15],[4,-18],[27,-19],[18,19],[6,31],[5,26],[4,31],[8,46],[-4,28],[2,17],[-3,33],[4,43],[5,12],[-4,19],[7,31],[5,31],[1,17],[10,21],[8,-28],[2,-36],[7,-7],[1,-24],[10,-30],[2,-32],[-1,-21]],[[5471,7981],[-3,-7],[3,-20]],[[5471,7954],[-2,-24],[-16,0],[6,-13],[-9,-37]],[[5450,7880],[-6,-9],[-24,-2],[-14,-13],[-23,5]],[[5383,7861],[-40,14],[-6,21],[-27,-10],[-4,-11],[-16,8]],[[5290,7883],[-15,1],[-12,11],[4,14],[-1,10]],[[5266,7919],[8,3],[14,-16],[4,15],[25,-2],[20,10],[13,-1],[9,-12],[2,10],[-4,37],[10,7],[10,27]],[[5377,7997],[21,-19],[15,24],[10,4],[22,-17],[13,3],[13,-11]],[[6281,7413],[-19,8],[-14,27],[-4,21]],[[6349,7590],[15,-30],[14,-41],[13,-3],[8,-15],[-23,-5],[-5,-45],[-4,-20],[-11,-13],[1,-29]],[[6357,7389],[-7,-3],[-17,30],[10,29],[-9,17],[-10,-5],[-33,-42]],[[6249,7558],[6,9],[21,-16],[15,-4],[4,7],[-14,31],[7,8]],[[6288,7593],[8,-2],[19,-35],[13,-4],[4,15],[17,23]],[[5823,4925],[0,3],[-10,55]],[[5813,4983],[0,10],[-7,26]],[[5806,5019],[17,-5],[8,33],[15,-4]],[[5846,5043],[1,-22],[6,-13]],[[5853,5008],[1,-19],[-7,-12],[-11,-30],[-10,-21],[-3,-1]],[[5171,8108],[-4,-39]],[[5167,8069],[-7,-2],[-3,-32]],[[5157,8035],[-24,26],[-14,-5],[-20,27],[-13,24],[-13,1],[-4,20]],[[5069,8128],[23,11]],[[5092,8139],[20,-4],[26,12],[17,-26],[16,-13]],[[5100,5854],[-1,-19],[6,-34],[-6,-24],[3,-15],[-13,-36],[-9,-17],[-5,-37],[1,-36],[-2,-93]],[[5074,5543],[-23,-7]],[[5051,5536],[-7,40],[2,132],[-6,12],[-1,28],[-10,20],[-8,17],[3,31]],[[5024,5816],[10,6],[6,25],[13,6],[6,17]],[[5059,5870],[10,17],[10,0],[21,-33]],[[5010,6042],[-2,-28],[3,-26],[16,-38],[1,-27],[32,-14],[-1,-39]],[[5024,5816],[-24,1]],[[5e3,5817],[-13,5],[-9,-10],[-12,4],[-48,-2],[-1,-33],[4,-43]],[[4921,5738],[-19,15],[-13,-3],[-10,-14],[-12,12],[-5,19],[-13,13]],[[4849,5780],[-1,33],[7,24],[-1,20],[23,48],[4,39],[7,14],[14,-8],[11,12],[4,15],[22,26],[5,18],[26,24],[15,8],[7,-11],[18,0]],[[7573,6452],[0,-42],[-10,9],[2,-46]],[[7565,6373],[-8,30],[-1,29],[-6,28],[-11,33],[-26,3],[3,-24],[-9,-32],[-12,12],[-4,-11],[-8,6],[-11,6]],[[7472,6453],[-4,47],[-10,43],[5,35],[-17,15],[6,21],[18,22],[-20,30],[9,39],[22,-25],[14,-2],[2,-40],[26,-8],[26,1],[16,-10],[-13,-49],[-12,-3],[-9,-33],[16,-30],[4,37],[8,0],[14,-91]],[[5793,7699],[-15,-24],[-10,-41],[9,-33]],[[5777,7601],[-24,8],[-28,-18]],[[5725,7591],[0,-29],[-26,-5],[-19,20],[-22,-16],[-21,2]],[[5637,7563],[-2,38],[-14,18]],[[5621,7619],[5,9],[-3,6],[4,19],[11,18],[-14,25],[-2,21],[7,13]],[[5629,7730],[8,-24],[11,4],[21,-9],[41,-3],[13,15],[33,13],[20,-21],[17,-6]],[[2846,6551],[-7,-3],[-7,33],[-10,17],[6,36],[8,-2],[10,-48],[0,-33]],[[2838,6713],[-30,-9],[-2,21],[13,5],[18,-2],[1,-15]],[[2861,6714],[-5,-41],[-5,7],[0,30],[-12,23],[0,7],[22,-26]],[[5527,7766],[10,0],[-7,-26],[14,-22],[-4,-27],[-7,-2]],[[5533,7689],[-5,-6],[-9,-13],[-4,-32]],[[5515,7638],[-25,22],[-10,24],[-11,13],[-12,21],[-6,18],[-14,27],[6,24],[10,-13],[6,12],[13,1],[24,-9],[19,0],[12,-12]],[[5882,8183],[-23,-4],[-9,-12],[-2,-29],[-11,5],[-25,-3],[-7,14],[-11,-10],[-10,8],[-22,1],[-31,14],[-28,5],[-22,-2],[-15,-15],[-13,-2]],[[5653,8153],[-1,25],[-8,27],[17,12],[0,23],[-8,21],[-1,26]],[[5652,8287],[27,0],[30,21],[6,33],[23,18],[-3,26]],[[5735,8385],[17,10],[30,22]],[[5782,8417],[29,-15],[4,-14],[15,7],[27,-14],[3,-27],[-6,-15],[17,-38],[12,-11],[-2,-10],[19,-10],[8,-15],[-11,-13],[-23,2],[-5,-5],[7,-19],[6,-37]],[[2529,6097],[-8,0],[2,65],[1,46]],[[2524,6208],[-1,8],[4,3],[5,-7],[10,35],[5,1]],[[2547,6248],[0,-9],[5,0],[0,-16],[-5,-25],[3,-8],[-3,-21],[2,-6],[-4,-29],[-5,-15],[-5,-2],[-6,-20]],[[3384,4021],[-1,17],[-25,30],[-26,1],[-49,-17],[-13,-51],[-1,-31],[-11,-69]],[[3136,3873],[-20,-8],[-11,80],[-15,64],[9,56],[-15,24],[-4,42],[-13,39]],[[3067,4170],[17,62],[-12,49],[7,19],[-5,21],[10,29],[1,49],[1,41],[6,19],[-24,93]],[[3068,4552],[21,-5],[14,1],[6,18],[25,23],[14,22],[37,9],[-3,-43],[3,-22],[-2,-39],[30,-51],[31,-10],[11,-21],[19,-12],[11,-16],[18,0],[16,-17],[1,-33],[6,-17],[0,-25],[-8,-1],[11,-67],[53,-2],[-4,-33],[3,-23],[15,-16],[6,-36],[-4,-45],[-8,-26],[3,-32],[-9,-12]],[[3429,5292],[15,-5],[3,12],[-5,11],[3,17],[11,-5],[13,6],[16,-12]],[[3485,5316],[12,-12],[9,15],[6,-2],[4,-16],[13,4],[11,22],[8,42],[17,53]],[[3565,5422],[9,3],[7,-32],[16,-101],[14,-10],[1,-39],[-21,-48],[9,-17],[49,-9],[1,-58],[21,38],[35,-21],[46,-35],[14,-34],[-5,-32],[33,18],[54,-30],[41,2],[41,-48],[36,-64],[21,-17],[24,-2],[10,-18],[9,-74],[5,-34],[-11,-96],[-14,-37],[-39,-80],[-18,-65],[-21,-50],[-7,-1],[-7,-43],[2,-108],[-8,-88],[-3,-38],[-9,-23],[-5,-77],[-28,-75],[-5,-60],[-22,-25],[-7,-34],[-30,0],[-44,-22],[-19,-26],[-31,-17],[-33,-45],[-23,-58],[-4,-43],[4,-31],[-5,-59],[-6,-28],[-20,-31],[-31,-102],[-24,-45],[-19,-27],[-13,-55],[-18,-33]],[[3517,3238],[-8,33],[13,27],[-16,39],[-22,32],[-29,37],[-10,-2],[-28,45],[-18,-6]],[[3482,3700],[6,34],[4,34],[0,31],[-10,11],[-11,-10],[-10,3],[-3,22],[-3,53],[-5,17],[-19,16],[-11,-12],[-30,11],[2,79],[-8,32]],[[3068,4552],[-15,-10],[-13,7],[2,87],[-23,-34],[-24,2],[-11,30],[-18,4],[6,24],[-16,35],[-11,52],[7,11],[0,24],[17,17],[-3,31],[7,20],[2,27],[32,39],[22,11],[4,9],[25,-3]],[[3058,4935],[13,158],[0,25],[-4,33],[-12,21],[0,42],[15,9],[6,-6],[1,22],[-16,6],[-1,36],[54,-1],[10,20],[7,-18],[6,-34],[5,7]],[[3142,5255],[15,-31],[22,4],[5,18],[21,13],[11,9],[4,25],[19,16],[-1,12],[-24,5],[-3,37],[1,38],[-13,15],[5,5],[21,-7],[22,-14],[8,13],[20,9],[31,22],[10,22],[-3,16]],[[3313,5482],[14,2],[7,-13],[-4,-25],[9,-9],[7,-27],[-8,-20],[-4,-49],[7,-29],[2,-27],[17,-27],[14,-3],[3,12],[8,2],[13,10],[9,16],[15,-5],[7,2]],[[8172,5443],[11,22],[23,31]],[[8206,5496],[-1,-28],[-2,-37],[-13,2],[-6,-20],[-12,30]],[[7546,6782],[12,-19],[-2,-35],[-23,-2],[-23,4],[-18,-9],[-25,22],[-1,11]],[[7466,6754],[19,43],[15,15],[20,-13],[14,-2],[12,-15]],[[5701,4161],[11,-46],[5,-10],[9,-33],[32,-64],[12,-6],[0,-20],[8,-37],[21,-9],[18,-26]],[[5817,3910],[-39,-42],[-25,-43],[-10,-38],[-8,-22],[-15,-5],[-5,-27],[-3,-18],[-17,-14],[-23,3],[-13,16],[-12,7],[-14,-13],[-6,-28],[-14,-17],[-13,-26],[-20,-5],[-6,20],[2,35],[-16,55],[-8,8]],[[5552,3756],[0,168],[27,2],[1,205],[21,2],[43,21],[10,-24],[18,22],[9,0],[15,13]],[[5696,4165],[5,-4]],[[5663,5679],[19,-23],[15,-23],[0,-19],[19,-30],[12,-25],[7,-34],[20,-23],[5,-18]],[[5760,5484],[-9,-6],[-18,1],[-21,6],[-10,-5],[-5,-14],[-9,-2],[-10,13],[-31,-29],[-13,6],[-4,-5],[-8,-35],[-21,12],[-20,5],[-18,22],[-23,19],[-15,-18],[-10,-30],[-3,-40]],[[5512,5384],[-18,3],[-19,10],[-16,-30],[-15,-54]],[[5444,5313],[-3,17],[-1,26],[-13,19],[-10,29],[-2,21],[-13,30],[2,17],[-3,24],[2,45],[7,10],[14,59]],[[5424,5610],[23,4],[5,15],[5,-1],[7,-13],[34,22],[12,22],[15,20],[-3,21],[8,5],[27,-4],[26,27],[20,63],[14,23],[18,10]],[[5635,5824],[3,-25],[16,-36],[0,-23],[-5,-24],[2,-18],[10,-16],[2,-3]],[[3231,7863],[20,-8],[26,2],[-14,-24],[-10,-4],[-35,25],[-7,19],[10,18],[10,-28]],[[3283,8010],[-14,-1],[-36,18],[-26,27],[10,5],[37,-14],[28,-24],[1,-11]],[[1569,7976],[-14,-8],[-46,26],[-8,20],[-25,21],[-5,16],[-28,10],[-11,32],[2,13],[30,-13],[17,-8],[26,-6],[9,-20],[14,-28],[28,-23],[11,-32]],[[3440,8101],[-18,-50],[18,19],[19,-12],[-10,-20],[25,-16],[12,14],[28,-18],[-8,-42],[19,10],[4,-30],[8,-36],[-11,-51],[-13,-2],[-18,11],[6,47],[-8,7],[-32,-50],[-17,2],[20,27],[-27,14],[-30,-3],[-54,2],[-4,17],[17,20],[-12,16],[24,34],[28,92],[18,33],[24,20],[13,-3],[-6,-16],[-15,-36]],[[1300,8302],[13,-8],[27,5],[-8,-66],[24,-46],[-11,0],[-17,27],[-10,26],[-14,18],[-5,25],[1,19]],[[2798,8762],[-11,-31],[-12,5],[-8,18],[2,4],[10,17],[12,-1],[7,-12]],[[2725,8794],[-33,-32],[-19,1],[-6,16],[20,26],[38,0],[0,-11]],[[2634,8963],[5,-25],[15,9],[16,-15],[30,-20],[32,-18],[2,-27],[21,4],[20,-19],[-25,-18],[-43,14],[-16,26],[-27,-31],[-40,-30],[-9,34],[-38,-6],[24,29],[4,45],[9,53],[20,-5]],[[2892,9049],[-31,-3],[-7,28],[12,33],[26,8],[21,-16],[1,-25],[-4,-8],[-18,-17]],[[2343,9162],[-17,-20],[-38,17],[-22,-6],[-38,26],[24,18],[19,25],[30,-17],[17,-10],[8,-11],[17,-22]],[[3135,7782],[-18,32],[0,79],[-13,16],[-18,-9],[-10,15],[-21,-44],[-8,-45],[-10,-26],[-12,-9],[-9,-3],[-3,-14],[-51,0],[-42,0],[-12,-11],[-29,-40]],[[2879,7723],[0,1],[-6,4],[-9,-8],[-8,-13],[-12,11],[-23,-7],[-20,-9],[-9,-7],[-8,-19],[11,-6],[9,3],[1,1]],[[2805,7674],[3,-17]],[[2808,7657],[-25,-8],[-13,-7],[-8,-9],[-15,6],[-8,-3],[-12,-16],[-21,-18],[-15,4]],[[2691,7606],[6,20],[13,31]],[[2710,7657],[18,19],[2,17],[-1,27],[13,32],[-3,36],[14,-36],[22,-7],[9,19],[-18,44],[-9,18],[-25,11],[-22,6],[-21,0],[-21,8],[-6,12],[-5,-8]],[[2657,7855],[-7,2]],[[2650,7857],[0,0]],[[2650,7857],[5,19],[-11,7],[4,22],[-10,17],[4,16],[-31,9],[-9,33],[-7,7],[-19,2],[-26,11],[-6,-7],[-6,-14],[-16,-9],[-11,-23]],[[2511,7947],[-34,15],[-23,-7],[-27,17],[-28,10],[-19,3],[-9,10],[-5,31],[-9,0],[-1,-22],[-57,0],[-95,0],[-94,0],[-84,0],[-83,0],[-82,0],[-85,0],[-27,0],[-82,0],[-79,0]],[[1588,8004],[-4,0],[-54,57],[-20,25],[-50,23],[-15,51],[3,36],[-35,24],[-5,47],[-34,42],[0,29]],[[1374,8338],[15,28],[0,36],[-48,37],[-28,66],[-17,41],[-26,26],[-19,23],[-14,30],[-28,-18],[-27,-33],[-25,38],[-19,25],[-27,16],[-28,2],[0,328],[1,214]],[[1084,9197],[51,-14],[44,-28],[29,-5],[24,24],[34,18],[41,-7],[42,25],[45,14],[20,-23],[20,13],[6,27],[20,-6],[47,-52],[37,39],[3,-43],[34,9],[11,17],[34,-3],[42,-25],[65,-21],[38,-9],[28,3],[37,-29],[-39,-28],[50,-13],[75,7],[24,10],[29,-35],[31,30],[-29,24],[18,20],[34,2],[22,6],[23,-14],[28,-31],[31,5],[49,-26],[43,9],[40,-1],[-3,35],[25,10],[43,-19],[0,-55],[17,46],[23,-1],[12,58],[-30,35],[-32,23],[2,64],[33,42],[37,-9],[28,-26],[38,-65],[-25,-28],[52,-12],[-1,-59],[38,46],[33,-37],[-9,-43],[27,-39],[29,42],[21,49],[1,63],[40,-4],[41,-8],[37,-29],[2,-29],[-21,-30],[20,-31],[-4,-28],[-54,-40],[-39,-9],[-29,17],[-8,-29],[-27,-48],[-8,-26],[-32,-39],[-40,-3],[-22,-25],[-2,-37],[-32,-7],[-34,-47],[-30,-65],[-11,-45],[-1,-67],[40,-10],[13,-54],[13,-43],[39,11],[51,-25],[28,-22],[20,-27],[35,-16],[29,-24],[46,-3],[30,-6],[-4,-50],[8,-58],[21,-64],[41,-55],[21,19],[15,59],[-14,91],[-20,30],[45,27],[31,41],[16,40],[-3,38],[-19,49],[-33,44],[32,60],[-12,52],[-9,90],[19,13],[48,-15],[29,-6],[23,15],[25,-19],[35,-34],[8,-22],[50,-4],[-1,-49],[9,-73],[25,-9],[21,-34],[40,32],[26,64],[19,27],[21,-52],[37,-73],[30,-69],[-11,-36],[37,-33],[25,-33],[44,-15],[18,-18],[11,-49],[22,-7],[11,-22],[2,-65],[-20,-21],[-20,-21],[-46,-20],[-35,-47],[-47,-10],[-59,12],[-42,1],[-29,-4],[-23,-42],[-35,-25],[-40,-76],[-32,-53],[23,9],[45,76],[58,48],[42,5],[24,-28],[-26,-38],[9,-63],[9,-43],[36,-29],[46,9],[28,64],[2,-41],[17,-21],[-34,-38],[-61,-34],[-28,-24],[-31,-41],[-21,4],[-1,49],[48,48],[-44,-2],[-31,-7]],[[1829,9393],[-14,-27],[61,17],[39,-29],[31,30],[26,-19],[23,-57],[14,24],[-20,59],[24,9],[28,-10],[31,-23],[17,-56],[9,-41],[47,-28],[50,-27],[-3,-26],[-46,-4],[18,-22],[-9,-22],[-51,10],[-48,15],[-32,-3],[-52,-20],[-70,-9],[-50,-5],[-15,27],[-38,16],[-24,-7],[-35,46],[19,6],[43,10],[39,-3],[36,10],[-54,14],[-59,-5],[-39,1],[-15,22],[64,23],[-42,-1],[-49,15],[23,43],[20,23],[74,35],[29,-11]],[[2097,9410],[-24,-38],[-44,41],[10,8],[37,2],[21,-13]],[[2879,9392],[3,-16],[-30,2],[-30,1],[-30,-8],[-8,4],[-31,30],[1,21],[14,4],[63,-6],[48,-32]],[[2595,9395],[22,-36],[26,47],[70,23],[48,-59],[-4,-38],[55,17],[26,23],[62,-30],[38,-27],[3,-25],[52,13],[29,-37],[67,-22],[24,-24],[26,-54],[-51,-26],[66,-38],[44,-13],[40,-53],[44,-3],[-9,-41],[-49,-67],[-34,25],[-44,55],[-36,-7],[-3,-33],[29,-33],[38,-27],[11,-15],[18,-57],[-9,-42],[-35,16],[-70,46],[39,-49],[29,-35],[5,-20],[-76,23],[-59,33],[-34,28],[10,16],[-42,30],[-40,28],[0,-17],[-80,-9],[-23,20],[18,42],[52,1],[57,8],[-9,20],[10,29],[36,56],[-8,25],[-11,20],[-42,28],[-57,20],[18,14],[-29,36],[-25,3],[-22,20],[-14,-17],[-51,-8],[-101,13],[-59,17],[-45,9],[-23,20],[29,26],[-39,1],[-9,58],[21,51],[29,24],[72,15],[-21,-37]],[[2212,9435],[33,-13],[50,8],[7,-17],[-26,-28],[42,-24],[-5,-52],[-45,-22],[-27,4],[-19,22],[-69,45],[0,18],[57,-7],[-31,38],[33,28]],[[2411,9373],[-30,-43],[-32,2],[-17,51],[1,28],[14,25],[28,15],[58,-2],[53,-14],[-42,-51],[-33,-11]],[[1654,9293],[-73,-28],[-15,25],[-64,31],[12,24],[19,42],[24,38],[-27,35],[94,9],[39,-11],[71,-4],[27,-16],[30,-25],[-35,-14],[-68,-41],[-34,-40],[0,-25]],[[2399,9500],[-15,-22],[-40,4],[-34,15],[15,26],[40,15],[24,-20],[10,-18]],[[2264,9600],[21,-26],[1,-30],[-13,-43],[-46,-6],[-30,9],[1,34],[-45,-4],[-2,44],[30,-2],[41,20],[40,-3],[2,7]],[[1994,9570],[11,-20],[25,10],[29,-3],[5,-28],[-17,-28],[-94,-8],[-70,-25],[-43,-2],[-3,19],[57,26],[-125,-7],[-39,10],[38,56],[26,16],[78,-19],[50,-34],[48,-5],[-40,56],[26,21],[29,-7],[9,-28]],[[2370,9622],[30,-19],[55,1],[24,-19],[-6,-22],[32,-13],[17,-14],[38,-2],[40,-5],[44,12],[57,5],[45,-4],[30,-21],[6,-24],[-17,-16],[-42,-12],[-35,7],[-80,-9],[-57,-1],[-45,7],[-74,19],[-9,31],[-4,29],[-27,25],[-58,7],[-32,18],[10,24],[58,-4]],[[1772,9654],[-4,-45],[-21,-20],[-26,-3],[-52,-24],[-44,-9],[-38,12],[47,44],[57,37],[43,-1],[38,9]],[[2393,9646],[-13,-1],[-52,3],[-7,16],[56,0],[19,-11],[-3,-7]],[[1939,9656],[-52,-16],[-41,19],[23,18],[40,6],[39,-9],[-9,-18]],[[1954,9709],[-34,-12],[-46,0],[0,9],[29,17],[14,-3],[37,-11]],[[2338,9677],[-41,-12],[-23,14],[-12,21],[-2,24],[36,-2],[16,-4],[33,-20],[-7,-21]],[[2220,9693],[11,-24],[-45,6],[-46,19],[-62,2],[27,17],[-34,14],[-2,22],[55,-8],[75,-21],[21,-27]],[[2583,9770],[33,-19],[-38,-17],[-51,-44],[-50,-4],[-57,8],[-30,23],[0,21],[22,15],[-50,0],[-31,19],[-18,26],[20,26],[19,17],[28,4],[-12,14],[65,3],[35,-31],[47,-13],[46,-10],[22,-38]],[[3097,9968],[74,-5],[60,-7],[51,-16],[-2,-15],[-67,-25],[-68,-12],[-25,-12],[61,0],[-66,-35],[-45,-16],[-48,-47],[-57,-10],[-18,-12],[-84,-6],[39,-7],[-20,-10],[23,-29],[-26,-20],[-43,-16],[-13,-22],[-39,-18],[4,-13],[48,3],[0,-14],[-74,-35],[-73,16],[-81,-9],[-42,7],[-52,3],[-4,28],[52,13],[-14,41],[17,4],[74,-25],[-38,37],[-45,11],[23,23],[49,13],[8,20],[-39,23],[-12,30],[76,-3],[22,-6],[43,21],[-62,7],[-98,-4],[-49,19],[-23,24],[-32,17],[-6,19],[41,11],[32,2],[55,9],[41,22],[34,-3],[30,-16],[21,31],[37,9],[50,6],[85,3],[14,-6],[81,9],[60,-3],[60,-4]],[[5290,7883],[-3,-24],[-12,-10],[-20,8],[-6,-24],[-14,-1],[-5,9],[-15,-20],[-13,-3],[-12,13]],[[5190,7831],[-10,25],[-13,-9],[0,26],[21,32],[-1,15],[12,-5],[8,10]],[[5207,7925],[24,-1],[5,13],[30,-18]],[[3140,2021],[-10,-23],[-23,-18],[-14,2],[-16,5],[-21,17],[-29,8],[-35,32],[-28,31],[-38,65],[23,-12],[39,-39],[36,-20],[15,26],[9,40],[25,23],[20,-6]],[[3095,2171],[-25,0],[-13,-14],[-25,-21],[-5,-53],[-11,-2],[-32,19],[-32,40],[-34,33],[-9,37],[8,33],[-14,39],[-4,98],[12,55],[30,45],[-43,16],[27,51],[9,96],[31,-20],[15,119],[-19,15],[-9,-72],[-17,8],[9,83],[9,106],[13,40],[-8,56],[-2,65],[11,2],[17,93],[20,92],[11,86],[-6,86],[8,47],[-3,72],[16,70],[5,111],[9,120],[9,129],[-2,94],[-6,81]],[[3045,4126],[14,15],[8,29]],[[8064,6258],[-24,-28],[-23,18],[0,50],[13,26],[31,16],[16,-1],[6,-22],[-12,-26],[-7,-33]],[[8715,7838],[-19,-56],[-33,10]],[[8663,7792],[-24,-20],[7,-49]],[[8646,7723],[-4,-68],[-14,-2],[0,-29]],[[8628,7624],[-18,34],[-11,-33],[-43,-24],[4,-31],[-24,2],[-13,18],[-19,-40],[-30,-31],[-23,-37]],[[8451,7482],[-39,-17],[-20,-27],[-30,-16],[15,27],[-6,22],[22,39],[-15,30],[-24,-20],[-32,-40],[-17,-37],[-27,-3],[-14,-27],[15,-39],[22,-9],[1,-26],[22,-17],[31,41],[25,-22],[18,-2],[4,-30],[-39,-16],[-13,-31],[-27,-29],[-14,-40],[30,-32],[11,-57],[17,-52],[19,-45],[-1,-42],[-17,-16],[6,-31],[17,-18],[-5,-47],[-7,-45],[-15,-5],[-21,-63],[-22,-75],[-26,-69],[-38,-53],[-39,-49],[-31,-6],[-17,-26],[-10,19],[-15,-29],[-39,-29],[-29,-8],[-10,-61],[-15,-4],[-8,42],[7,22],[-37,19],[-13,-9]],[[8001,6424],[-28,14],[-14,24],[5,33],[-26,11],[-13,21],[-24,-31],[-27,-6],[-22,0],[-15,-14]],[[7837,6476],[-14,-8],[4,-66],[-15,1],[-2,14]],[[7810,6417],[-1,24],[-20,-17],[-12,10],[-21,22],[8,48],[-18,11],[-6,53],[-30,-9],[4,68],[26,48],[1,47],[-1,45],[-12,13],[-9,34],[-16,-4]],[[7703,6810],[-30,8],[9,25],[-13,35],[-20,-24],[-23,14],[-32,-36],[-25,-43],[-23,-7]],[[7466,6754],[-2,46],[-17,-12]],[[7447,6788],[-32,5],[-32,14],[-22,25],[-22,11],[-9,28],[-16,8],[-28,38],[-22,17],[-12,-13]],[[7252,6921],[-38,40],[-28,36],[-7,64],[20,-8],[1,29],[-12,30],[3,47],[-30,67]],[[7161,7226],[-45,24],[-8,44],[-21,27]],[[7082,7337],[-4,33],[1,22],[-17,14],[-9,-6],[-7,53]],[[7046,7453],[8,13],[-4,14],[26,27],[20,11],[29,-8],[11,37],[35,7],[10,23],[44,31],[4,13]],[[7229,7621],[-2,33],[19,15],[-25,100],[55,23],[14,13],[20,103],[55,-19],[15,26],[2,58],[23,5],[21,38]],[[7426,8016],[11,5]],[[7437,8021],[7,-40],[23,-31],[40,-21],[19,-47],[-10,-67],[10,-25],[33,-10],[37,-8],[33,-36],[18,-6],[12,-53],[17,-34],[30,1],[58,-13],[36,8],[28,-8],[41,-35],[34,0],[12,-18],[32,31],[45,20],[42,2],[32,20],[20,31],[20,19],[-5,19],[-9,22],[15,38],[15,-6],[29,-11],[28,30],[42,23],[20,38],[20,16],[40,8],[22,-7],[3,21],[-25,40],[-22,18],[-22,-21],[-27,9],[-16,-7],[-7,23],[20,58],[13,43]],[[8240,8055],[34,-22],[39,37]],[[8313,8070],[-1,25],[26,61],[15,19]],[[8353,8175],[0,32],[-16,13],[23,29],[35,10],[37,2],[41,-17],[25,-22],[17,-58],[10,-24],[10,-36],[10,-56],[49,-19],[32,-41],[12,-54],[42,0],[24,23],[46,17],[-15,-52],[-11,-21],[-9,-63]],[[4921,5738],[7,-82],[-11,-49],[-8,-65],[12,-49],[-1,-23]],[[4920,5470],[-12,-1],[-20,12],[-18,-1],[-33,-10],[-19,-17],[-27,-21],[-6,2]],[[4785,5434],[2,47],[3,7],[-1,23],[-12,24],[-8,4],[-8,16],[6,25],[-3,28],[1,17]],[[4765,5625],[5,0],[1,25],[-2,11],[3,8],[10,7],[-7,46],[-6,24],[2,20],[5,4]],[[4776,5770],[4,5],[8,-8],[21,-1],[5,17],[5,-1],[8,6],[4,-24],[7,7],[11,9]],[[5444,5313],[-2,-31],[-22,14],[-22,15],[-35,2]],[[5363,5313],[-4,3],[-16,-7],[-17,7],[-13,-3]],[[5313,5313],[-45,1]],[[5268,5314],[4,45],[-11,39],[-13,9],[-6,26],[-7,8],[1,16]],[[5236,5457],[7,41],[13,56],[8,0],[17,34],[10,1],[16,-24],[19,19],[2,24],[7,24],[4,29],[15,23],[5,41],[6,13],[4,30],[7,36],[24,45],[1,19],[3,10],[-11,23]],[[5393,5901],[1,19],[8,3]],[[5402,5923],[11,-37],[2,-38]],[[5415,5848],[-1,-38],[15,-53],[-15,1],[-8,-4],[-13,6],[-6,-28],[16,-33],[13,-10],[3,-24],[9,-40],[-4,-15]],[[5760,5484],[17,-48],[12,-7],[8,10],[12,-4],[16,12],[6,-24],[25,-38]],[[5856,5385],[-2,-68],[11,-8],[-9,-20],[-10,-15],[-11,-30],[-6,-27],[-1,-46],[-7,-22],[0,-44]],[[5821,5105],[-8,-16],[-1,-34],[-4,-5],[-2,-31]],[[5813,4983],[-5,-92],[7,-32],[-5,-24],[10,-41],[17,-32],[3,-31],[8,-16],[-1,-10]],[[5847,4705],[-5,3],[-37,-10],[-7,-7],[-8,-36],[6,-26],[-5,-68],[-3,-58],[7,-10],[19,-22],[8,10],[2,-62],[-21,1],[-11,31],[-10,25],[-22,8],[-6,30],[-17,-18],[-22,8],[-10,26],[-17,5],[-13,-1],[-2,18],[-9,1]],[[5342,4831],[-4,18]],[[5360,4907],[8,-6],[9,22],[15,0],[2,-17],[11,-10],[16,36],[16,28],[7,19],[-1,47],[12,56],[13,30],[18,28],[3,18],[1,21],[5,20],[-2,33],[4,51],[5,36],[8,30],[2,35]],[[5330,4892],[-22,61]],[[5308,4953],[21,32],[-11,38],[10,15],[19,7],[2,25],[15,-27],[24,-3],[9,27],[3,39],[-3,45],[-13,34],[12,66],[-7,12],[-21,-5],[-7,30],[2,25]],[[3018,5861],[-18,-10],[-7,-29],[-10,-16],[-8,-22],[-4,-41],[-8,-34],[15,-3],[3,-27],[6,-13],[3,-23],[-4,-21],[1,-12],[7,-5],[7,-20],[36,6],[16,-8],[19,-49],[11,6],[20,-3],[16,6],[10,-10],[-5,-31],[-6,-19],[-2,-41],[5,-38],[8,-18],[1,-12],[-14,-29],[10,-13],[8,-20],[8,-57]],[[3058,4935],[-14,31],[-8,1],[18,59],[-21,27],[-17,-5],[-10,10],[-15,-16],[-21,8],[-16,60],[-13,15],[-9,27],[-19,27],[-7,-5]],[[2906,5174],[-12,13],[-14,19],[-7,-9],[-24,8],[-7,25],[-5,-1],[-28,33]],[[2809,5262],[-3,18],[10,4],[-1,29],[6,21],[14,4],[12,36],[10,30],[-10,14],[5,33],[-6,53],[6,15],[-4,49],[-12,30]],[[2836,5598],[4,28],[9,-4],[5,17],[-6,34],[3,9]],[[2851,5682],[14,-2],[21,40],[12,6],[0,19],[5,49],[16,27],[17,1],[3,12],[21,-5],[22,29],[11,13],[14,28],[9,-4],[8,-15],[-6,-19]],[[2676,5812],[7,-31],[11,-23],[13,-25]],[[2707,5733],[-11,-5],[0,-23],[6,-9],[-4,-6],[1,-11],[-2,-11],[-2,-12]],[[2695,5656],[-15,13],[-6,12],[4,10],[-1,13],[-8,13],[-11,12],[-10,7],[-1,17],[-8,10],[2,-16],[-5,-14],[-7,16],[-9,5],[-4,12],[1,18],[3,18],[-8,8],[7,11]],[[2619,5821],[4,7],[18,-15],[7,8],[9,-5],[4,-12],[8,-4],[7,12]],[[2786,6493],[11,-21],[26,7],[10,-14],[24,-35],[17,-26],[9,0],[17,-11],[-2,-17],[20,-2],[21,-23],[-3,-14],[-19,-7],[-18,-3],[-19,4],[-40,-5],[18,32],[-11,15],[-18,4],[-9,16],[-7,33],[-16,-2],[-26,15],[-8,12],[-36,9],[-10,12],[11,14],[-28,3],[-20,-30],[-11,-1],[-4,-14],[-14,-6],[-12,5],[15,18],[6,21],[13,13],[14,11],[21,5],[7,7],[23,-4],[22,-1],[26,-20]],[[5943,7201],[-3,2],[-5,-4],[-4,1],[-2,-2],[0,6],[-2,3],[-6,1],[-7,-5],[-5,3]],[[5909,7206],[2,0],[4,14],[20,-1],[25,18],[-19,-25],[2,-11]],[[5943,7201],[1,-4],[-28,-24],[-14,8],[-7,23],[14,2]],[[5417,8125],[13,-18],[21,-5],[-2,-16],[15,-12],[4,15],[19,-7],[3,-18],[20,-3],[13,-28]],[[5523,8033],[-8,0],[-4,-11],[-7,-2],[-2,-13],[-5,-3],[-1,-6],[-9,-5],[-12,0],[-4,-12]],[[5377,7997],[-16,25],[-14,14],[-3,24],[-5,17],[21,12],[10,15],[20,11],[7,11],[7,-7],[13,6]],[[5392,8278],[6,-29],[-8,-16],[11,-20],[6,-31],[-2,-20],[12,-37]],[[5207,7925],[3,41],[14,39],[-40,11],[-13,15]],[[5171,8031],[2,25],[-6,13]],[[5171,8108],[-5,60],[17,0],[7,22],[6,53],[-5,19]],[[5191,8262],[6,12],[23,3],[5,-12],[19,28],[-6,22],[-2,32]],[[5236,8347],[21,-7],[18,9]],[[5275,8349],[1,-23],[28,-13],[-1,-21],[29,11],[15,16],[32,-23],[13,-18]],[[6198,5842],[-10,-30]],[[6188,5812],[-7,10],[-6,-4],[-16,1],[0,17],[-2,16],[9,27],[10,26]],[[6176,5905],[12,-5],[8,14]],[[6196,5914],[7,-18],[-1,-24],[-16,-14],[12,-16]],[[5352,8385],[-17,-47],[-29,33],[-4,23],[41,20],[9,-29]],[[5236,8347],[-11,32],[-1,59],[5,16],[8,17],[24,4],[10,15],[22,17],[-1,-30],[-8,-19],[4,-16],[15,-8],[-7,-22],[-8,6],[-20,-41],[7,-28]],[[3008,6222],[0,15],[-7,17],[7,10],[2,22],[-2,32]],[[3008,6318],[3,10],[22,-1],[16,-15],[8,2],[5,-21],[15,2],[-1,-18],[12,-2],[14,-21],[-10,-23],[-14,12],[-12,-2],[-9,3],[-5,-11],[-11,-3],[-4,14],[-10,-9],[-11,-39],[-7,9],[-1,17]],[[5233,7310],[-5,-30],[4,-54],[-6,-48],[-18,-32],[3,-43],[23,-35],[0,-14],[17,-23],[12,-103]],[[5263,6928],[9,-51],[1,-27],[-5,-47],[2,-26],[-3,-32],[2,-36],[-11,-24],[17,-42],[1,-25],[10,-32],[13,11],[22,-27],[12,-36]],[[5333,6534],[-95,-110],[-81,-113],[-39,-26]],[[5118,6285],[-31,-5],[0,36],[-13,10],[-17,16],[-7,27],[-94,126],[-93,126]],[[4863,6621],[-105,139]],[[4758,6760],[1,11],[0,4]],[[4759,6775],[0,68],[44,43],[28,9],[23,15],[11,29],[32,23],[1,42],[16,5],[13,22],[36,9],[5,23],[-7,12],[-10,61],[-1,35],[-11,37]],[[4939,7208],[27,31],[30,10],[18,24],[26,17],[47,11],[46,4],[14,-8],[26,22],[30,1],[11,-14],[19,4]],[[2906,5174],[4,-44],[-9,-37],[-30,-61],[-33,-22],[-17,-51],[-6,-38],[-15,-24],[-12,29],[-11,6],[-12,-4],[-1,21],[8,13],[-3,24]],[[2769,4986],[15,43],[-6,26],[-11,-27],[-16,25],[5,16],[-4,53],[9,8],[5,36],[11,37],[-2,24],[15,12],[19,23]],[[5951,6980],[16,-84],[2,-15]],[[5969,6881],[-7,-23],[-6,-43],[-8,-30],[-6,-10],[-10,18],[-12,26],[-20,82],[-3,-5],[12,-61],[17,-57],[21,-90],[10,-31],[9,-33],[25,-64],[-6,-10],[1,-37],[33,-52],[4,-12]],[[6023,6449],[-110,0],[-107,0],[-112,0]],[[5694,6449],[0,212],[0,205],[-8,47],[7,35],[-5,25],[10,27]],[[5698,7e3],[37,1],[27,-15],[28,-17],[13,-9],[21,18],[11,17],[25,5],[20,-8],[7,-28],[7,19],[22,-14],[22,-3],[13,14]],[[6176,5905],[-10,18],[-11,34]],[[6155,5957],[-12,19],[-8,19]],[[6135,5995],[-24,24],[-19,0],[-7,12],[-16,-13],[-17,26],[-8,-43],[-33,12]],[[6011,6013],[-3,23],[12,85],[3,38],[9,18],[20,9],[14,33]],[[6066,6219],[16,-67],[8,-53],[15,-28],[38,-54],[16,-33],[15,-33],[8,-20],[14,-17]],[[4947,7683],[11,-23],[51,-26],[10,13],[31,-26],[32,7]],[[5082,7628],[2,-33],[-26,-39],[-36,-12],[-2,-19],[-18,-32],[-10,-47],[11,-33],[-16,-26],[-6,-37],[-21,-11],[-20,-45],[-35,-1],[-27,1],[-17,-20],[-11,-22],[-13,5],[-11,20],[-8,33],[-26,9]],[[4792,7319],[-2,19],[10,21],[4,16],[-9,17],[7,38],[-11,34],[12,5],[1,27],[5,9],[0,45],[13,15],[-8,29],[-16,2],[-5,-7],[-16,0],[-7,28],[-11,-8],[-10,-15]],[[4749,7594],[1,41],[-11,25],[39,42],[34,-11],[37,1],[30,-10],[23,3],[45,-2]],[[5777,8607],[4,-10]],[[5781,8597],[-20,-33],[8,-54]],[[5769,8510],[-12,-18]],[[5757,8492],[-22,0],[-24,22],[-13,7],[-23,-11]],[[5675,8510],[3,34],[-10,-7],[-18,21],[-2,33],[35,16],[35,8],[30,-9],[29,1]],[[6135,5995],[8,-19],[12,-19]],[[6188,5812],[-6,-21],[10,-31]],[[6192,5760],[10,-28],[11,-21]],[[6213,5711],[90,-68],[24,0]],[[6327,5643],[-79,-173],[-36,-2],[-25,-41],[-17,-1],[-8,-18]],[[6162,5408],[-19,0],[-11,20],[-26,-24],[-8,-24],[-18,4],[-6,7],[-7,-2],[-9,1],[-35,49],[-19,0],[-10,19],[0,32],[-14,10]],[[5980,5500],[-17,62],[-12,14],[-5,23],[-14,28],[-17,4],[9,33],[15,1],[4,18],[0,44]],[[5943,5727],[0,7],[8,61],[13,16],[3,23],[12,44],[17,29],[11,56],[4,50]],[[5794,9159],[-4,-40],[42,-38],[-26,-44],[33,-65],[-19,-50],[25,-42],[-11,-38],[41,-39],[-11,-30],[-25,-33],[-60,-74]],[[5779,8666],[-50,-4],[-49,-21],[-45,-12],[-16,31],[-27,19],[6,57],[-14,52],[14,33],[25,36],[63,63],[19,12],[-3,24],[-39,27]],[[5663,8983],[-9,23],[-1,88],[-43,40],[-37,28]],[[5573,9162],[17,15],[30,-30],[37,2],[30,-13],[26,25],[14,42],[43,20],[35,-23],[-11,-41]],[[9954,4184],[9,-17],[-4,-30],[-17,-8],[-16,8],[-2,25],[10,20],[13,-8],[7,10]],[[0,4257],[6,3],[-4,-28],[-2,-3],[9981,-14],[-17,-12],[-4,21],[14,12],[9,3],[-9983,18]],[[3373,2240],[22,-26],[-8,-20],[-37,-17],[-13,20],[-23,-26],[-14,26],[33,34],[24,-14],[16,23]],[[3485,5316],[7,24],[3,26],[4,25],[-10,34]],[[3489,5425],[-3,39],[15,50]],[[3501,5514],[9,-6],[21,-14],[29,-49],[5,-23]],[[5265,7610],[-9,-45],[-13,12],[-6,39],[5,21],[18,22],[5,-49]],[[5157,8035],[6,-5],[8,1]],[[5190,7831],[-2,-16],[9,-22],[-10,-18],[7,-44],[15,-8],[-3,-25]],[[5206,7698],[-25,-32],[-55,16],[-40,-19],[-4,-35]],[[4947,7683],[14,34],[5,115],[-28,61],[-21,29],[-42,22],[-3,42],[36,12],[47,-14],[-9,65],[26,-25],[65,45],[8,47],[24,12]],[[5308,4953],[-29,58],[-18,48],[-17,59],[1,20],[6,18],[7,42],[5,43]],[[5263,5241],[10,3],[40,-1],[0,70]],[[4827,8284],[-21,12],[-17,-1],[6,31],[-6,31]],[[4789,8357],[23,2],[30,-35],[-15,-40]],[[4916,8559],[-30,-62],[29,7],[30,0],[-7,-47],[-25,-51],[29,-4],[2,-6],[25,-68],[19,-9],[17,-66],[8,-23],[33,-11],[-3,-36],[-14,-17],[11,-30],[-25,-30],[-37,0],[-48,-16],[-13,12],[-18,-27],[-26,6],[-19,-22],[-15,12],[41,60],[25,13],[-1,0],[-43,9],[-8,23],[29,18],[-15,31],[5,38],[42,-5],[4,33],[-19,36],[-34,10],[-7,16],[10,26],[-9,16],[-15,-28],[-1,56],[-14,29],[10,60],[21,47],[23,-5],[33,5]],[[6210,7549],[-27,28],[-29,-3]],[[6154,7574],[4,25],[-7,39],[-16,21],[-16,7],[-10,18]],[[6109,7684],[4,6],[23,-9],[41,-10],[38,-27],[5,-11],[17,9],[25,-12],[9,-24],[17,-13]],[[5e3,5817],[-2,-18],[12,-30],[0,-42],[2,-45],[7,-21],[-6,-52],[2,-28],[8,-37],[6,-20]],[[5029,5524],[-44,-34],[-15,-20],[-25,-16],[-25,16]],[[4680,5899],[1,-21],[5,0],[7,8],[5,-2],[7,-15],[12,-5],[8,13],[9,8],[6,8],[6,-2],[6,-12],[3,-16],[12,-24],[-6,-15],[-1,-19],[6,6],[3,-7],[-1,-17],[8,-17]],[[4765,5625],[-8,2],[-5,-24],[-8,1],[-6,12],[2,23],[-11,35],[-8,-6],[-6,-1]],[[4715,5667],[-7,-4],[0,21],[-4,15],[0,17],[-6,24],[-7,21],[-22,0],[-7,-11],[-8,-1],[-4,-13],[-4,-16],[-14,-25]],[[4632,5695],[-13,34],[-10,23],[-8,7],[-6,12],[-4,25],[-4,13],[-8,9]],[[4579,5818],[13,28],[8,-1],[7,10],[6,0],[5,8],[-3,19],[3,6],[1,19]],[[4619,5907],[13,0],[20,-14],[6,1],[3,6],[15,-4],[4,3]],[[4532,5940],[3,25]],[[4535,5965],[31,2],[6,14],[9,1],[11,-15],[8,0],[9,10],[6,-17],[-12,-13],[-12,1],[-12,12],[-10,-13],[-5,0],[-7,-8],[-25,1]],[[4579,5818],[-15,24],[-11,4],[-7,16],[1,9],[-9,12],[-2,13]],[[4536,5896],[15,9],[9,-2],[8,7],[51,-3]],[[5263,5241],[-5,8],[10,65]],[[5658,7238],[15,-19],[22,3],[20,-4],[0,-10],[15,7],[-4,-17],[-40,-5],[1,10],[-34,11],[5,24]],[[5723,7533],[-17,2],[-14,5],[-34,-15],[19,-32],[-14,-9],[-15,0],[-15,29],[-5,-12],[6,-35],[14,-27],[-10,-12],[15,-27],[14,-17],[0,-32],[-25,15],[8,-29],[-18,-6],[11,-51],[-19,-1],[-23,25],[-10,46],[-5,38],[-11,27],[-14,33],[-2,16]],[[5583,7534],[19,5],[10,13],[15,-1],[5,10],[5,2]],[[5725,7591],[13,-15],[-8,-36],[-7,-7]],[[4247,9992],[174,-46],[-52,-22],[-106,-3],[-150,-5],[14,-10],[99,6],[83,-20],[54,18],[23,-21],[-30,-34],[71,22],[135,22],[83,-11],[15,-25],[-113,-40],[-16,-14],[-88,-10],[64,-2],[-32,-42],[-23,-38],[1,-64],[33,-37],[-43,-3],[-46,-18],[52,-31],[6,-49],[-30,-5],[36,-49],[-61,-5],[32,-23],[-9,-20],[-39,-9],[-39,0],[35,-39],[0,-26],[-55,24],[-14,-16],[37,-14],[37,-35],[10,-47],[-49,-11],[-22,23],[-34,33],[10,-39],[-33,-31],[73,-2],[39,-3],[-75,-50],[-75,-46],[-81,-20],[-31,0],[-29,-22],[-38,-61],[-60,-40],[-19,-3],[-37,-14],[-40,-13],[-24,-36],[0,-40],[-15,-38],[-45,-46],[11,-45],[-12,-48],[-14,-56],[-39,-3],[-41,47],[-56,0],[-27,31],[-18,57],[-49,71],[-14,38],[-3,52],[-39,53],[10,42],[-18,20],[27,68],[42,21],[11,24],[6,45],[-32,-20],[-15,-9],[-25,-8],[-34,19],[-2,39],[11,31],[25,0],[57,-15],[-48,37],[-24,19],[-28,-8],[-23,15],[31,53],[-17,22],[-22,39],[-34,62],[-35,22],[0,24],[-74,34],[-59,4],[-74,-2],[-68,-5],[-32,19],[-49,36],[73,18],[56,3],[-119,15],[-62,23],[4,23],[105,28],[101,27],[11,21],[-75,21],[24,23],[97,40],[40,6],[-12,26],[66,15],[86,9],[85,1],[30,-18],[74,32],[66,-22],[39,-5],[58,-18],[-66,31],[4,24],[93,35],[97,-3],[36,21],[98,6],[222,-7]],[[2529,6097],[10,-10],[2,8],[8,-7]],[[2549,6088],[-13,-22],[-13,-16],[-2,-11],[2,-11],[-5,-15]],[[2518,6013],[-7,-3],[2,-7],[-6,-7],[-9,-14],[-1,-9]],[[2497,5973],[-14,10],[-17,1],[-13,12],[-15,24]],[[2438,6020],[1,16],[3,14],[-4,11],[13,47],[36,0],[1,19],[-5,4],[-3,12],[-10,14],[-11,19],[13,0],[0,32],[26,1],[26,-1]],[[3412,5526],[-4,-51],[-17,-15],[1,-14],[-5,-30],[13,-42],[9,0],[3,-32],[17,-50]],[[3313,5482],[-19,44],[7,15],[0,27],[17,9],[7,11],[-10,21],[3,21],[22,34]],[[3340,5664],[18,-21],[17,-37],[1,-30],[10,-1],[15,-29],[11,-20]],[[2690,6046],[-9,1],[-4,-8],[-10,-7],[-7,0],[-6,-8],[-6,3],[-4,9],[-3,-2],[-4,-14],[-3,1],[0,-12],[-10,-16],[-5,-7],[-3,-7],[-8,12],[-6,-16],[-6,1],[-6,-1],[0,-29],[-4,0],[-3,-13],[-9,-3]],[[2574,5930],[-5,18],[-8,5]],[[2561,5953],[2,23],[-4,6],[-6,5],[-12,-7],[-1,7],[-8,10],[-6,11],[-8,5]],[[2549,6088],[3,-2],[6,10],[8,1],[3,-5],[4,3],[13,-5],[13,1],[9,7],[3,6],[9,-3],[6,-4],[8,2],[5,5],[13,-8],[4,-2],[9,-10],[8,-13],[10,-9],[7,-16]],[[5523,7826],[0,0]],[[5523,7826],[6,-22]],[[5529,7804],[9,-17],[-11,-21]],[[5515,7638],[-3,-9]],[[5512,7629],[-26,21],[-16,21],[-26,17],[-23,42],[6,4],[-13,25],[-1,19],[-17,9],[-9,-25],[-8,20],[0,20],[1,1]],[[5380,7803],[20,-2],[5,9],[9,-9],[11,-1],[0,16],[10,6],[2,23],[23,15]],[[5460,7860],[8,-7],[21,-24],[23,-12],[11,9]],[[3008,6222],[-19,9],[-13,-4],[-17,5],[-13,-11],[-15,18],[3,18],[25,-8],[21,-4],[10,12],[-12,25],[0,22],[-18,9],[7,16],[17,-2],[24,-9]],[[5613,7971],[15,-16],[2,-15]],[[5630,7940],[-17,-12],[-13,-39],[-17,-40],[-22,-10]],[[5561,7839],[-17,2],[-21,-15]],[[5460,7860],[-6,20],[-4,0]],[[5471,7954],[14,-15],[10,-6],[24,7],[2,11],[11,2],[14,9],[3,-4],[13,7],[6,14],[9,3],[30,-17],[6,6]],[[8352,4593],[-11,-1],[-37,40],[26,11],[14,-17],[10,-18],[-2,-15]],[[8471,4670],[2,-11],[1,-17]],[[8474,4642],[-18,-43],[-24,-13],[-3,7],[2,19],[12,36],[28,22]],[[8274,4716],[10,-15],[17,5],[7,-25],[-32,-11],[-19,-8],[-15,0],[10,33],[15,1],[7,20]],[[8413,4716],[-4,-32],[-42,-16],[-37,7],[0,21],[22,12],[18,-17],[18,4],[25,21]],[[8017,4792],[53,-6],[6,24],[51,-28],[10,-37],[42,-10],[34,-35],[-31,-21],[-31,23],[-25,-2],[-29,4],[-26,11],[-32,22],[-21,5],[-11,-7],[-51,24],[-5,25],[-25,4],[19,55],[34,-3],[22,-23],[12,-4],[4,-21]],[[8741,4825],[-14,-40],[-3,44],[5,20],[6,20],[7,-17],[-1,-27]],[[8534,4983],[-11,-19],[-19,11],[-5,25],[28,2],[7,-19]],[[8623,5004],[10,-44],[-23,24],[-23,5],[-16,-4],[-19,2],[6,32],[35,2],[30,-17]],[[8916,5033],[0,-188],[1,-188]],[[8917,4657],[-25,48],[-28,11],[-7,-16],[-35,-2],[12,47],[17,16],[-7,63],[-14,48],[-53,49],[-23,4],[-42,54],[-8,-28],[-11,-5],[-6,21],[0,25],[-21,28],[29,21],[20,-1],[-2,15],[-41,0],[-11,34],[-25,11],[-11,28],[37,14],[14,19],[45,-23],[4,-22],[8,-93],[29,-34],[23,61],[32,34],[25,0],[23,-20],[21,-20],[30,-11]],[[8478,5264],[-22,-57],[-21,-11],[-27,11],[-46,-3],[-24,-8],[-4,-43],[24,-52],[15,26],[52,20],[-2,-27],[-12,9],[-12,-34],[-25,-22],[27,-74],[-5,-20],[25,-66],[-1,-38],[-14,-17],[-11,20],[13,47],[-27,-22],[-7,16],[3,22],[-20,34],[3,56],[-19,-17],[2,-67],[1,-83],[-17,-8],[-12,17],[8,53],[-4,55],[-12,1],[-9,39],[12,38],[4,46],[14,86],[5,24],[24,43],[22,-17],[35,-8],[32,2],[27,42],[5,-13]],[[8574,5248],[-2,-51],[-14,6],[-4,-35],[11,-30],[-8,-7],[-11,36],[-8,74],[6,46],[9,21],[2,-32],[16,-5],[3,-23]],[[8045,5298],[5,-38],[19,-33],[18,12],[18,-4],[16,29],[13,5],[26,-16],[23,12],[14,80],[11,20],[10,65],[32,0],[24,-9]],[[8274,5421],[-16,-52],[20,-55],[-4,-26],[31,-54],[-33,-6],[-10,-40],[2,-52],[-27,-39],[-1,-58],[-10,-88],[-5,21],[-31,-26],[-11,35],[-20,3],[-14,19],[-33,-21],[-10,28],[-18,-3],[-23,7],[-4,77],[-14,16],[-13,49],[-4,50],[3,54],[16,38]],[[7939,4845],[-31,-1],[-24,48],[-35,47],[-12,35],[-21,47],[-14,43],[-21,81],[-24,48],[-9,50],[-10,44],[-25,37],[-14,49],[-21,32],[-29,64],[-3,29],[18,-2],[43,-11],[25,-57],[21,-39],[16,-24],[26,-62],[28,-1],[23,-39],[16,-48],[22,-27],[-12,-47],[16,-20],[10,-1],[5,-40],[10,-32],[20,-5],[14,-37],[-7,-71],[-1,-90]],[[7252,6921],[-17,-27],[-11,-53],[27,-22],[26,-28],[36,-33],[38,-7],[16,-30],[22,-5],[33,-13],[23,1],[4,22],[-4,37],[2,25]],[[7703,6810],[2,-22],[-10,-11],[2,-35],[-19,10],[-36,-39],[0,-33],[-15,-49],[-1,-28],[-13,-47],[-21,13],[-1,-60],[-7,-19],[3,-25],[-14,-13]],[[7472,6453],[-4,-22],[-19,1],[-34,-12],[2,-43],[-15,-34],[-40,-39],[-31,-68],[-21,-36],[-28,-38],[0,-26],[-13,-14],[-25,-21],[-13,-3],[-9,-44],[6,-75],[1,-48],[-11,-54],[0,-98],[-15,-3],[-12,-44],[8,-19],[-25,-16],[-10,-39],[-11,-17],[-26,54],[-13,81],[-11,58],[-9,27],[-15,55],[-7,72],[-5,36],[-25,79],[-12,112],[-8,74],[0,69],[-5,54],[-41,-34],[-19,7],[-36,69],[13,21],[-8,23],[-33,49]],[[6893,6547],[19,38],[61,0],[-6,49],[-15,30],[-4,44],[-18,26],[31,60],[32,-4],[29,60],[18,59],[27,57],[-1,41],[24,34],[-23,28],[-9,39],[-10,51],[14,24],[42,-14],[31,9],[26,48]],[[4827,8284],[5,-41],[-21,-51],[-49,-34],[-40,8],[23,61],[-15,58],[38,45],[21,27]],[[6357,7389],[9,-42],[26,-12],[20,-29],[39,-10],[44,15],[2,13]],[[6497,7324],[25,12],[19,33],[19,-2],[12,11],[20,-6],[31,-29],[22,-6],[31,-51],[21,-2],[3,-49]],[[6690,6900],[14,-30],[11,-35],[27,-25],[1,-51],[13,-9],[2,-27],[-40,-30],[-10,-66]],[[6708,6627],[-53,17],[-30,13],[-31,8],[-12,70],[-13,10],[-22,-10],[-28,-28],[-34,19],[-28,45],[-27,16],[-18,55],[-21,76],[-14,-9],[-18,19],[-11,-22]],[[6348,6906],[-15,30],[0,31],[-9,0],[5,41],[-15,44],[-34,32],[-19,54],[6,45],[14,20],[-2,34],[-18,17],[-18,69]],[[6243,7323],[-15,46],[5,18],[-8,66],[19,16]],[[6348,6906],[-16,3]],[[6332,6909],[-19,4],[-20,-55]],[[6293,6858],[-52,5],[-78,115],[-41,41],[-34,15]],[[6088,7034],[-11,71]],[[6077,7105],[61,59],[11,70],[-3,42],[16,14],[14,36]],[[6176,7326],[12,9],[32,-7],[10,-15],[13,10]],[[4597,9009],[-7,-37],[31,-39],[-36,-44],[-80,-40],[-24,-10],[-36,8],[-78,18],[28,26],[-61,28],[49,11],[-1,17],[-58,14],[19,37],[42,9],[43,-39],[42,31],[35,-16],[45,30],[47,-4]],[[5994,7099],[1,-24],[-4,-9],[1,0]],[[5992,7066],[-5,-18]],[[5987,7048],[-10,8],[-6,-39],[7,-6],[-7,-8],[-1,-15],[13,8]],[[5983,6996],[0,-23],[-14,-92]],[[5951,6980],[8,19],[-2,3],[8,27],[5,44],[4,14],[1,1]],[[5975,7088],[9,0],[3,10],[7,1]],[[5431,7384],[-10,-45],[4,-18],[-6,-30],[-21,22],[-14,6],[-39,29],[4,30],[32,-5],[28,6],[22,5]],[[5255,7555],[17,-40],[-4,-77],[-13,4],[-11,-19],[-10,15],[-2,70],[-6,32],[15,-2],[14,17]],[[5383,7861],[-3,-29],[7,-24]],[[5387,7808],[-22,8],[-23,-20],[1,-29],[-3,-16],[9,-30],[26,-29],[14,-47],[31,-47],[22,1],[7,-13],[-8,-11],[25,-21],[20,-18],[24,-30],[3,-10],[-5,-21],[-16,27],[-24,9],[-12,-37],[20,-21],[-3,-30],[-11,-4],[-15,-49],[-12,-5],[0,18],[6,31],[6,12],[-11,34],[-8,29],[-12,7],[-8,25],[-18,10],[-12,23],[-21,4],[-21,26],[-26,37],[-19,34],[-8,57],[-14,6],[-23,19],[-12,-8],[-16,-26],[-12,-5]],[[2864,6211],[-9,-9],[-15,9],[-16,21],[3,13],[12,4],[6,-2],[19,-5],[14,-14],[5,-16],[-19,-1]],[[6088,7034],[-5,-8],[-56,-29],[28,-58],[-9,-10],[-5,-19],[-21,-8],[-7,-21],[-12,-17],[-31,9]],[[5970,6873],[-1,8]],[[5983,6996],[4,17],[0,35]],[[5992,7066],[31,-23],[54,62]],[[8739,7149],[4,-20],[-16,-35],[-11,19],[-15,-14],[-7,-33],[-18,16],[0,27],[15,35],[16,-7],[12,24],[20,-12]],[[8915,7321],[-10,-46],[5,-29],[-15,-40],[-35,-27],[-49,-4],[-40,-66],[-19,23],[-1,43],[-48,-13],[-33,-27],[-32,-1],[28,-43],[-19,-98],[-18,-24],[-13,23],[7,52],[-18,16],[-11,40],[26,17],[15,37],[28,29],[20,40],[55,17],[30,-12],[29,103],[19,-28],[40,58],[16,22],[18,70],[-5,65],[11,37],[30,10],[15,-80],[-1,-46],[-25,-58],[0,-60]],[[8997,7726],[19,-12],[20,24],[6,-64],[-41,-16],[-25,-57],[-43,39],[-15,-63],[-31,-1],[-4,57],[14,45],[29,3],[8,80],[9,44],[32,-59],[22,-20]],[[7229,7621],[-17,9],[-14,20],[-42,6],[-46,2],[-10,-6],[-39,24],[-16,-12],[-4,-34],[-46,20],[-18,-8],[-7,-26]],[[6970,7616],[-15,-10],[-37,-41],[-12,-41],[-11,0],[-7,27],[-36,2],[-5,47],[-14,1],[2,57],[-33,42],[-48,-4],[-32,-8],[-27,51],[-22,22],[-43,41],[-6,5],[-71,-34],[1,-212]],[[6554,7561],[-14,-3],[-20,45],[-18,17],[-32,-12],[-12,-20]],[[6458,7588],[-2,15],[7,24],[-5,20],[-32,19],[-13,52],[-15,14],[-1,19],[27,-5],[1,42],[23,9],[25,-8],[5,56],[-5,35],[-28,-2],[-24,14],[-32,-26],[-26,-12]],[[6363,7854],[-14,10],[3,29],[-18,39],[-20,-2],[-24,39],[16,44],[-8,12],[22,63],[29,-34],[3,42],[58,63],[43,2],[61,-40],[33,-24],[30,25],[44,1],[35,-30],[8,17],[39,-2],[7,27],[-45,40],[27,28],[-5,15],[26,15],[-20,40],[13,19],[104,20],[13,15],[70,21],[25,24],[50,-13],[9,-59],[29,14],[35,-20],[-2,-31],[27,3],[69,54],[-10,-18],[35,-44],[62,-147],[15,31],[39,-34],[39,15],[16,-10],[13,-33],[20,-12],[11,-24],[36,8],[15,-36]],[[6162,5408],[-24,-65],[0,-210],[17,-47]],[[6155,5086],[-20,-23],[-7,-24],[-10,-5],[-4,-40],[-9,-24],[-5,-38],[-12,-19]],[[6088,4913],[-40,58],[-1,33],[-101,117]],[[5946,5121],[2,43],[-7,22]],[[5941,5186],[0,3],[8,23],[14,38],[10,42],[-13,66],[-3,29],[-13,40]],[[5944,5427],[17,35],[19,38]],[[7046,7453],[-53,-9],[-34,19],[-30,-4],[3,33],[30,-10],[10,18]],[[6972,7500],[21,-6],[36,42],[-33,30],[-20,-14],[-21,21],[24,38],[-9,5]],[[7982,6e3],[6,-38],[-3,-69],[-47,-44],[13,-35],[-30,-4],[-24,-24]],[[7897,5786],[-23,9],[-11,30],[-14,59]],[[7849,5884],[-7,70],[18,48],[36,11],[26,-9]],[[7922,6004],[23,-22],[12,39],[25,-21]],[[8504,7356],[2,5],[12,-2],[11,26],[20,3],[11,4],[4,14]],[[8564,7406],[24,-68],[7,-37],[0,-67],[-10,-31],[-25,-11],[-22,-24],[-25,-5],[-3,31],[5,43],[-13,60],[21,10],[-19,49]],[[5599,7615],[-6,-2],[-17,-9],[-1,-12],[-4,1]],[[5557,7635],[5,13]],[[5562,7648],[7,4],[4,19],[5,3],[4,-8],[5,-4],[3,-9],[5,-2],[5,-11],[4,0],[-3,-14],[-3,-7],[1,-4]],[[6332,6909],[6,-26],[-3,-13],[9,-43]],[[6344,6827],[-19,-2],[-7,28],[-25,5]],[[7922,6004],[9,26],[1,49],[-22,50],[-2,57],[-21,47],[-21,4],[-6,-20],[-16,-2],[-8,10],[-30,-34],[0,52],[7,60],[-19,3],[-2,34],[-12,18]],[[7780,6358],[6,21],[24,38]],[[7837,6476],[17,-45],[12,-53],[34,0],[11,-50],[-18,-15],[-8,-21],[34,-35],[23,-68],[17,-50],[21,-40],[7,-41],[-5,-58]],[[5975,7088],[10,47],[14,40],[0,2]],[[5999,7177],[13,-3],[4,-22],[-15,-22],[-7,-31]],[[4785,5434],[-7,-1],[-29,28],[-25,44],[-24,31],[-18,37]],[[4682,5573],[6,19],[2,16],[12,32],[13,27]],[[5694,6449],[0,-115],[-32,0],[0,-24]],[[5662,6310],[-111,110],[-111,110],[-28,-31]],[[5412,6499],[-20,-21],[-15,31],[-44,25]],[[5263,6928],[13,13],[3,24],[-3,24],[19,22],[8,19],[14,16],[2,45]],[[5319,7091],[32,-20],[12,5],[23,-10],[37,-26],[13,-51],[25,-11],[39,-24],[30,-29],[13,15],[13,27],[-6,44],[9,28],[20,27],[19,8],[37,-12],[10,-26],[10,0],[9,-10],[28,-7],[6,-19]],[[7255,5539],[-24,-13],[-13,46],[-5,83],[13,93],[19,-32],[13,-40],[13,-60],[-4,-60],[-12,-17]],[[5780,3424],[-10,-6],[-21,44],[15,37],[15,22],[13,12],[12,-18],[10,-17],[-9,-28],[-4,-19],[-16,-9],[-5,-18]],[[5652,8287],[-7,18],[-14,6]],[[5631,8311],[-2,15],[3,15],[-13,9],[-29,11]],[[5590,8361],[-6,48]],[[5584,8409],[32,18],[47,-4],[27,6],[4,-12],[15,-4],[26,-28]],[[5757,8492],[14,-13],[2,-28],[9,-34]],[[5584,8409],[1,43],[14,36],[26,20],[22,-43],[22,1],[6,44]],[[4759,6775],[-4,0],[0,-31],[-17,-2],[-9,-13],[-13,0],[-10,8],[-23,-7],[-9,-44],[-9,-5],[-13,-72],[-38,-62],[-9,-80],[-12,-26],[-3,-20],[-63,-5]],[[4527,6416],[1,27],[11,15],[9,30],[-2,20],[10,41],[15,36],[9,9],[8,34],[0,31],[10,35],[19,21],[18,59],[0,1],[14,22],[26,6],[22,40],[14,15],[23,48],[-7,72],[10,49],[4,31],[18,39],[28,26],[21,24],[18,59],[9,36],[20,-1],[17,-24],[26,4],[29,-13],[12,0]],[[5784,7802],[-5,26],[3,25],[-1,25],[-16,34],[-9,24],[-9,18],[-8,5]],[[5739,7959],[6,9],[19,5],[20,-18],[12,-2],[12,-15],[-2,-20],[11,-9],[4,-24],[9,-15],[-2,-8],[5,-6],[-7,-5],[-16,2],[-3,8],[-6,-4],[2,-11],[-7,-18],[-5,-20],[-7,-6]],[[6390,4402],[4,-69],[7,-27],[-2,-28],[-5,-17],[-10,34],[-5,-17],[5,-43],[-2,-24],[-8,-14],[-1,-48],[-11,-67],[-14,-80],[-17,-109],[-11,-80],[-12,-67],[-23,-13],[-24,-25],[-16,15],[-22,21],[-8,30],[-2,51],[-10,46],[-2,41],[5,42],[13,10],[0,19],[13,44],[3,36],[-7,28],[-5,36],[-2,53],[9,32],[4,37],[14,2],[15,12],[11,10],[12,1],[16,33],[23,35],[8,29],[-4,25],[12,-7],[15,40],[1,34],[9,26],[10,-25],[7,-24],[7,-38]],[[2301,6672],[-10,-50],[-5,-42],[-2,-77],[-3,-28],[5,-32],[9,-28],[5,-44],[19,-43],[6,-33],[11,-28],[29,-16],[12,-24],[24,16],[21,6],[21,11],[18,9],[17,24],[7,33],[2,49],[5,17],[19,15],[29,13],[25,-2],[17,5],[6,-12],[-1,-28],[-15,-34],[-6,-35],[5,-10],[-4,-25],[-7,-45],[-7,15],[-6,-1]],[[2438,6020],[-32,62],[-14,18],[-23,15],[-15,-4],[-22,-21],[-14,-6],[-20,15],[-21,11],[-26,26],[-21,8],[-31,27],[-23,28],[-7,15],[-16,4],[-28,18],[-12,26],[-30,33],[-14,36],[-6,28],[9,6],[-3,16],[7,15],[0,20],[-10,26],[-2,23],[-9,29],[-25,57],[-28,45],[-13,36],[-24,23],[-5,15],[4,35],[-14,14],[-17,28],[-7,40],[-14,4],[-17,31],[-13,28],[-1,18],[-15,43],[-10,44],[1,22],[-20,23],[-10,-2],[-15,16],[-5,-24],[5,-27],[2,-44],[10,-23],[21,-40],[4,-14],[4,-4],[4,-20],[5,1],[6,-37],[8,-15],[6,-20],[17,-29],[10,-54],[8,-25],[8,-27],[1,-30],[13,-2],[12,-26],[10,-26],[-1,-10],[-12,-22],[-5,1],[-7,35],[-18,33],[-20,27],[-14,15],[1,42],[-5,31],[-13,18],[-19,26],[-4,-8],[-7,15],[-17,14],[-16,34],[2,4],[11,-3],[11,21],[1,26],[-22,41],[-16,16],[-10,36],[-11,38],[-12,46],[-12,52]],[[1746,7056],[32,4],[35,7],[-2,-12],[41,-28],[64,-40],[55,0],[22,0],[0,24],[48,0],[10,-20],[15,-19],[16,-25],[9,-30],[7,-32],[15,-17],[23,-17],[17,45],[23,1],[19,-23],[14,-39],[10,-34],[16,-33],[6,-40],[8,-27],[22,-18],[20,-13],[10,2]],[[5599,7615],[9,3],[13,1]],[[5118,6285],[0,-132],[-15,-39],[-2,-35],[-25,-9],[-38,-5],[-10,-21],[-18,-2]],[[4680,5899],[1,18],[-2,22],[-11,16],[-5,33],[-2,36]],[[4661,6024],[10,11],[4,34],[9,1],[20,-16],[15,11],[11,-4],[4,13],[112,1],[6,40],[-5,8],[-13,248],[-14,249],[43,1]],[[7780,6358],[-16,-13],[-16,-25],[-19,-3],[-13,-62],[-12,-10],[14,-51],[17,-42],[12,-38],[-11,-50],[-9,-11],[6,-29],[19,-45],[3,-32],[0,-27],[11,-53],[-16,-53],[-13,-60]],[[7737,5754],[-3,43],[9,44],[-10,34],[3,63],[-12,30],[-9,69],[-5,73],[-12,47],[-18,-29],[-32,-41],[-15,5],[-17,14],[9,71],[-6,54],[-21,67],[3,20],[-16,8],[-20,47]],[[5538,7594],[-6,4],[-8,19],[-12,12]],[[5533,7689],[8,-10],[4,-8],[9,-6],[10,-12],[-2,-5]],[[7437,8021],[29,10],[53,50],[42,27],[24,-18],[29,-1],[19,-27],[28,-2],[40,-14],[27,40],[-11,34],[28,60],[31,-24],[26,-7],[32,-15],[6,-43],[39,-24],[26,10],[36,8],[27,-8],[28,-27],[16,-30],[26,1],[35,-9],[26,14],[36,9],[41,41],[17,-6],[14,-20],[33,5]],[[5911,3643],[-21,0]],[[5890,3643],[-2,26],[-4,25]],[[5884,3694],[-3,21],[5,64],[-7,41],[-13,81]],[[5866,3901],[29,66],[7,41],[5,5],[3,34],[-5,17],[1,43],[6,40],[0,73],[-15,19],[-13,4],[-6,14],[-13,12],[-23,-1],[-2,21]],[[5840,4289],[-2,41],[84,48]],[[5922,4378],[16,-28],[8,6],[11,-15],[1,-23],[-6,-27],[2,-40],[19,-36],[8,40],[12,12],[-2,74],[-12,42],[-10,18],[-2,0]],[[5967,4401],[-4,66],[7,54]],[[5970,4521],[10,3],[34,-16],[7,7]],[[6021,4515],[19,1],[10,18]],[[6050,4534],[17,-1],[30,22],[22,33]],[[6119,4588],[5,-25],[-1,-58],[3,-50],[1,-90],[5,-29],[-8,-41],[-11,-40],[-18,-35],[-25,-22],[-31,-28],[-32,-62],[-10,-11],[-20,-40],[-11,-14],[-3,-41],[14,-43],[5,-34],[0,-17],[5,2],[-1,-56],[-4,-27],[7,-10],[-5,-24],[-11,-20],[-23,-20],[-34,-31],[-12,-21],[3,-24],[7,-4],[-3,-30]],[[4661,6024],[-18,40],[-17,42],[-18,15],[-13,17],[-16,0],[-13,-13],[-14,5],[-10,-18]],[[4542,6112],[-2,31],[8,28],[3,54],[-3,57],[-3,29],[2,28],[-7,28],[-14,25]],[[4526,6392],[6,19],[108,0],[-5,83],[7,29],[26,5],[-1,148],[91,-3],[0,87]],[[5922,4378],[-15,15],[9,53],[9,20],[-6,48],[6,47],[5,15],[-7,49],[-14,26]],[[5909,4651],[28,-11],[5,-16]],[[5942,4624],[-1,-6],[10,-37],[2,-70],[-8,-32],[8,-42],[0,-25],[6,-17],[0,-21],[4,-13],[5,15],[10,-23],[1,7],[-6,31],[-5,3],[-1,7]],[[7836,5541],[7,-6],[16,-34],[12,-39],[2,-39],[-3,-26],[2,-20],[2,-34],[10,-16],[11,-51],[-1,-19],[-19,-4],[-27,43],[-32,45],[-4,30],[-16,38],[-4,48],[-10,31],[4,42],[-7,25]],[[7779,5555],[5,10],[23,-25],[2,-30],[18,7],[9,24]],[[8045,5298],[21,-20],[21,11],[6,49],[12,11],[33,12],[20,46],[14,36]],[[8206,5496],[22,40],[14,45],[11,0],[14,-29],[1,-25],[19,-16],[23,-17],[-2,-23],[-19,-3],[5,-28],[-20,-19]],[[5644,4173],[23,14],[18,-4],[11,-13],[0,-5]],[[5552,3756],[0,-212],[-25,-30],[-15,-4],[-17,11],[-13,4],[-4,25],[-11,15],[-14,-28]],[[5453,3537],[-20,43],[-11,42],[-6,57],[-7,41],[-9,89],[-1,69],[-3,31],[-11,24],[-15,48],[-14,69],[-6,36],[-23,56],[-2,44]],[[9641,3906],[-10,-13],[-16,15],[-19,26],[-18,31],[-19,40],[-4,20],[12,-1],[16,-20],[12,-19],[9,-16],[23,-36],[14,-27]],[[5412,6499],[7,-90],[10,-14],[1,-19],[11,-20],[-6,-24],[-11,-117],[-1,-75],[-35,-54],[-12,-76],[11,-22],[0,-37],[18,-1],[-3,-27]],[[5393,5901],[-5,-1],[-19,63],[-6,2],[-22,-32],[-21,17],[-15,3],[-8,-8],[-17,2],[-16,-25],[-14,-1],[-34,30],[-13,-14],[-14,1],[-10,21],[-28,22],[-30,-7],[-7,-12],[-4,-33],[-8,-24],[-2,-51]],[[5236,5457],[-29,-20],[-11,3],[-10,-13],[-23,1],[-15,36],[-9,42],[-19,38],[-21,-1],[-25,0]],[[2690,6046],[-2,-6],[-2,-12],[3,-21],[-6,-20],[-3,-23],[-1,-26],[1,-14],[1,-26],[-4,-6],[-3,-25],[2,-15],[-6,-15],[2,-15],[4,-10]],[[2619,5821],[-10,18],[-13,23],[-6,20],[-12,18],[-13,26],[3,9],[4,-9],[2,4]],[[5092,8139],[14,16],[24,85],[38,24],[23,-2]],[[5863,9188],[-47,-23],[-22,-6]],[[5573,9162],[-17,-3],[-4,-37],[-53,9],[-7,-32],[-27,0],[-18,-41],[-28,-64],[-43,-81],[10,-20],[-10,-22],[-27,1],[-18,-54],[2,-77],[17,-29],[-9,-68],[-23,-39],[-12,-33]],[[5306,8572],[-19,35],[-55,-67],[-37,-13],[-38,29],[-10,62],[-9,133],[26,37],[73,48],[55,60],[51,80],[66,111],[47,44],[76,72],[61,25],[46,-3],[42,48],[51,-3],[50,12],[87,-43],[-36,-15],[30,-36]],[[5686,9666],[-62,-24],[-49,13],[19,15],[-16,19],[57,11],[11,-21],[40,-13]],[[5506,9772],[92,-43],[-70,-23],[-15,-42],[-25,-11],[-13,-48],[-34,-2],[-59,35],[25,21],[-42,16],[-54,49],[-21,45],[75,21],[16,-20],[39,0],[11,20],[40,2],[35,-20]],[[5706,9813],[55,-21],[-41,-31],[-81,-6],[-82,9],[-5,16],[-40,1],[-30,26],[86,17],[40,-14],[28,17],[70,-14]],[[9805,2826],[6,-24],[20,24],[8,-25],[0,-24],[-10,-26],[-18,-43],[-14,-23],[10,-28],[-22,0],[-23,-22],[-8,-38],[-16,-58],[-21,-26],[-14,-16],[-26,1],[-18,19],[-30,4],[-5,21],[15,43],[35,57],[18,11],[20,21],[24,31],[17,29],[12,43],[10,15],[5,32],[19,27],[6,-25]],[[9849,3100],[20,-60],[1,39],[13,-16],[4,-43],[22,-19],[19,-4],[16,22],[14,-7],[-7,-51],[-8,-34],[-22,1],[-7,-17],[3,-25],[-4,-11],[-11,-31],[-14,-39],[-21,-23],[-5,15],[-12,8],[16,48],[-9,31],[-30,23],[1,21],[20,20],[5,45],[-1,37],[-12,39],[1,10],[-13,23],[-22,51],[-12,41],[11,5],[15,-32],[22,-15],[7,-52]],[[6475,6141],[-9,41],[-22,95]],[[6444,6277],[83,57],[19,115],[-13,41]],[[6566,6618],[12,-40],[16,-21],[20,-7],[17,-11],[12,-33],[8,-19],[10,-7],[0,-13],[-10,-34],[-5,-16],[-12,-19],[-10,-39],[-13,3],[-5,-14],[-5,-29],[4,-39],[-3,-7],[-13,1],[-17,-22],[-3,-28],[-6,-12],[-17,0],[-11,-14],[0,-23],[-14,-16],[-15,5],[-19,-19],[-12,-4]],[[6557,6683],[8,19],[3,-5],[-2,-23],[-4,-11]],[[6893,6547],[-20,14],[-9,42],[-21,44],[-51,-11],[-45,-1],[-39,-8]],[[2836,5598],[-9,17],[-6,31],[7,16],[-7,3],[-5,19],[-14,16],[-12,-3],[-6,-20],[-11,-15],[-6,-2],[-3,-12],[13,-31],[-7,-7],[-4,-9],[-13,-3],[-5,35],[-4,-10],[-9,3],[-5,23],[-12,4],[-7,7],[-12,0],[-1,-13],[-3,9]],[[2707,5733],[10,-20],[-1,-13],[11,-2],[3,5],[8,-15],[13,5],[12,14],[17,12],[9,17],[16,-3],[-1,-6],[15,-2],[13,-10],[9,-17],[10,-16]],[[3045,4126],[-28,33],[-2,24],[-55,57],[-50,63],[-22,36],[-11,47],[4,17],[-23,76],[-28,106],[-26,115],[-11,26],[-9,42],[-21,38],[-20,23],[9,26],[-14,55],[9,40],[22,36]],[[8510,5667],[2,-38],[2,-33],[-9,-52],[-11,58],[-13,-29],[9,-42],[-8,-27],[-32,33],[-8,42],[8,27],[-17,28],[-9,-24],[-13,2],[-21,-32],[-4,17],[11,48],[17,16],[15,22],[10,-26],[21,16],[5,25],[19,2],[-1,45],[22,-28],[3,-29],[2,-21]],[[8443,5774],[-10,-19],[-9,-36],[-8,-17],[-17,40],[5,15],[7,16],[3,36],[16,3],[-5,-38],[21,55],[-3,-55]],[[8291,5719],[-37,-55],[14,41],[20,35],[16,40],[15,57],[5,-47],[-18,-31],[-15,-40]],[[8385,5867],[16,-18],[18,0],[0,-24],[-13,-24],[-18,-17],[-1,26],[2,30],[-4,27]],[[8485,5883],[8,-64],[-21,15],[0,-20],[7,-35],[-13,-13],[-1,41],[-9,3],[-4,34],[16,-4],[0,22],[-17,44],[27,-2],[7,-21]],[[8375,5935],[-7,-50],[-12,29],[-15,44],[24,-2],[10,-21]],[[8369,6248],[17,-16],[9,15],[2,-15],[-4,-24],[9,-41],[-7,-48],[-16,-19],[-5,-47],[7,-45],[14,-7],[13,7],[34,-32],[-2,-31],[9,-14],[-3,-27],[-22,29],[-10,30],[-7,-21],[-18,34],[-25,-8],[-14,12],[1,24],[9,15],[-8,13],[-4,-21],[-14,34],[-4,25],[-1,55],[11,-19],[3,90],[9,52],[17,0]],[[9329,4790],[-8,-6],[-12,22],[-12,37],[-6,44],[4,5],[3,-17],[8,-13],[14,-37],[13,-19],[-4,-16]],[[9221,4867],[-15,-5],[-4,-16],[-15,-14],[-15,-13],[-14,0],[-23,16],[-16,17],[2,17],[25,-8],[15,4],[5,28],[4,1],[2,-30],[16,4],[8,20],[16,21],[-4,33],[17,2],[6,-10],[-1,-32],[-9,-35]],[[8916,5033],[48,-40],[51,-33],[19,-29],[16,-29],[4,-34],[46,-36],[7,-30],[-25,-7],[6,-38],[25,-38],[18,-61],[16,2],[-2,-25],[22,-10],[-8,-11],[29,-24],[-3,-17],[-18,-4],[-7,15],[-24,6],[-28,9],[-22,37],[-16,32],[-14,50],[-36,25],[-24,-16],[-17,-19],[4,-43],[-22,-20],[-16,10],[-28,2]],[[9253,4923],[-9,-15],[-5,34],[-6,22],[-13,19],[-16,25],[-20,17],[8,14],[15,-17],[9,-12],[12,-14],[11,-24],[11,-19],[3,-30]],[[5546,8316],[34,-6],[51,1]],[[5653,8153],[14,-51],[-3,-16],[-14,-7],[-25,-48],[7,-25],[-6,3]],[[5626,8009],[-26,22],[-20,-8],[-13,6],[-17,-12],[-14,20],[-11,-8],[-2,4]],[[5392,8278],[19,17],[43,26],[35,20],[28,-10],[2,-14],[27,-1]],[[3178,6232],[-7,-14],[-21,0],[-17,-2],[-1,25],[4,8],[23,0],[14,-5],[5,-12]],[[8628,7624],[4,-10]],[[8632,7614],[-11,3],[-12,-19],[-8,-20],[1,-41],[-14,-13],[-5,-10],[-11,-17],[-18,-10],[-12,-15],[-1,-25],[-3,-7],[11,-9],[15,-25]],[[8504,7356],[-13,11],[-4,-11],[-8,-4],[-1,10],[-7,6],[-8,9],[8,25],[7,7],[-3,10],[7,32],[-2,9],[-16,6],[-13,16]],[[4792,7319],[-11,-15],[-14,8],[-15,-7],[5,46],[-3,35],[-12,5],[-7,22],[2,38],[11,21],[2,23],[6,35],[-1,24],[-5,21],[-1,19]],[[6427,6601],[-8,-5],[-8,12]],[[6411,6608],[-2,42],[7,30],[8,6],[8,-18],[1,-34],[-6,-33]],[[5784,7802],[12,-11],[13,9],[13,-9]],[[5822,7791],[0,-15],[-13,-13],[-9,6],[-7,-70]],[[5629,7730],[-5,10],[6,9],[-7,8],[-8,-13],[-17,16],[-2,24],[-17,14],[-3,18],[-15,23]],[[5630,7940],[12,12],[17,-6],[18,-1],[13,-14],[10,9],[20,6],[7,13],[12,0]],[[5928,7830],[8,14],[19,-12],[9,-3],[4,-11],[4,-2]],[[5972,7816],[0,-5],[14,-14],[28,4],[-5,-21],[-31,-10],[-37,-33],[-16,12],[6,27],[-30,17],[5,11],[26,19],[-4,7]],[[8989,8105],[28,-102],[-41,19],[-17,-84],[27,-59],[-1,-40],[-21,35],[-18,-45],[-5,49],[3,56],[-3,62],[6,43],[2,77],[-17,57],[3,79],[25,26],[-11,27],[13,8],[7,-38],[10,-56],[-1,-56],[11,-58]],[[5546,8316],[6,26],[38,19]],[[9999,9261],[-30,-3],[-5,19],[-9964,24],[4,2],[23,0],[40,-17],[-2,-7],[-29,-14],[-36,-4],[9999,0]],[[8988,9398],[-42,0],[-57,6],[-5,3],[27,23],[34,5],[40,-22],[3,-15]],[[9186,9506],[-32,-23],[-44,5],[-52,23],[7,19],[51,-9],[70,-15]],[[9029,9534],[-22,-43],[-102,1],[-46,-13],[-55,37],[15,40],[37,11],[73,-3],[100,-30]],[[6598,9255],[-17,-5],[-91,7],[-7,26],[-50,15],[-4,31],[28,13],[-1,31],[55,49],[-25,7],[66,51],[-7,26],[62,30],[92,37],[92,11],[48,21],[54,8],[19,-23],[-19,-18],[-98,-28],[-85,-28],[-86,-55],[-42,-56],[-43,-55],[5,-48],[54,-47]],[[8646,7723],[-7,49],[24,20]],[[8663,7792],[33,-10],[19,56]],[[8353,8175],[-15,-19],[-26,-61],[1,-25]],[[6363,7854],[-12,-34],[-27,-9],[-28,-60],[25,-54],[-2,-39],[30,-68]],[[6109,7684],[-35,48],[-32,22],[-24,34],[20,9],[23,48],[-15,23],[41,23],[-1,13],[-25,-9]],[[6061,7895],[1,25],[14,16],[27,5],[5,19],[-7,32],[12,30],[-1,17],[-41,18],[-16,0],[-17,27],[-21,-9],[-35,20],[0,11],[-10,25],[-22,3],[-2,18],[7,11],[-18,33],[-29,-5],[-8,2],[-7,-13],[-11,3]],[[5769,8510],[-8,54],[20,33]],[[5777,8607],[31,32],[-29,27]],[[5863,9188],[29,20],[46,-35],[76,-14],[105,-65],[21,-27],[2,-38],[-31,-31],[-45,-15],[-124,44],[-21,-8],[45,-42],[2,-27],[2,-58],[36,-18],[22,-15],[3,28],[-17,25],[18,22],[67,-36],[24,14],[-19,42],[65,56],[25,-3],[26,-20],[16,39],[-23,35],[14,34],[-21,36],[78,-18],[16,-33],[-35,-7],[0,-32],[22,-20],[43,13],[7,37],[58,27],[97,49],[20,-2],[-27,-35],[35,-6],[19,19],[52,2],[42,24],[31,-35],[32,38],[-29,34],[14,19],[82,-18],[39,-18],[100,-66],[19,31],[-28,30],[-1,12],[-34,6],[10,27],[-15,45],[-1,19],[51,52],[18,52],[21,11],[74,-15],[5,-32],[-26,-47],[17,-18],[9,-40],[-6,-79],[31,-35],[-12,-39],[-55,-82],[32,-8],[11,21],[31,14],[7,29],[24,27],[-16,33],[13,38],[-31,5],[-6,32],[22,58],[-36,47],[50,38],[-7,41],[14,2],[15,-32],[-11,-56],[29,-10],[-12,41],[46,23],[58,3],[51,-33],[-25,48],[-2,61],[48,12],[67,-3],[60,8],[-23,30],[33,38],[31,1],[54,29],[74,8],[9,15],[73,6],[23,-13],[62,31],[51,-1],[8,24],[26,25],[66,24],[48,-19],[-38,-14],[63,-9],[7,-29],[25,14],[82,0],[62,-28],[23,-22],[-7,-30],[-31,-17],[-73,-32],[-21,-17],[35,-8],[41,-15],[25,11],[14,-37],[12,15],[44,9],[90,-9],[6,-27],[116,-9],[2,44],[59,-10],[44,1],[45,-31],[13,-37],[-17,-24],[35,-45],[44,-23],[27,60],[44,-26],[48,16],[53,-18],[21,16],[45,-8],[-20,53],[37,25],[251,-37],[24,-34],[72,-44],[112,11],[56,-10],[23,-24],[-4,-42],[35,-16],[37,12],[49,1],[52,-11],[53,6],[49,-51],[34,18],[-23,37],[13,26],[88,-16],[58,3],[80,-27],[-9960,-25],[68,-44],[73,-58],[-3,-35],[19,-15],[-6,42],[75,-8],[55,-54],[-28,-25],[-46,-6],[0,-57],[-11,-12],[-26,2],[-22,20],[-36,17],[-7,25],[-28,9],[-31,-7],[-16,20],[6,21],[-33,-13],[13,-27],[-16,-25],[9963,-25],[-36,4],[25,-31],[17,-47],[13,-16],[3,-24],[-7,-15],[-52,13],[-78,-44],[-25,-6],[-42,-41],[-40,-35],[-11,-26],[-39,39],[-73,-45],[-12,22],[-27,-25],[-37,8],[-9,-38],[-33,-56],[1,-23],[31,-13],[-4,-84],[-25,-2],[-12,-48],[11,-25],[-48,-29],[-10,-66],[-41,-14],[-9,-59],[-40,-53],[-10,40],[-12,84],[-15,127],[13,80],[23,35],[2,27],[43,12],[50,73],[48,59],[49,46],[23,81],[-34,-5],[-17,-47],[-70,-63],[-23,71],[-72,-20],[-69,-96],[23,-36],[-62,-15],[-43,-6],[2,42],[-43,9],[-35,-29],[-85,10],[-91,-17],[-90,-112],[-106,-136],[43,-7],[14,-36],[27,-13],[18,29],[30,-4],[40,-63],[1,-49],[-21,-58],[-3,-69],[-12,-92],[-42,-83],[-9,-40],[-38,-67],[-38,-67],[-17,-34],[-38,-33],[-17,-1],[-17,28],[-38,-42],[-4,-19]],[[7918,9692],[-157,-23],[51,76],[23,6],[21,-3],[70,-33],[-8,-23]],[[6420,9821],[-37,-8],[-25,-4],[-4,-10],[-33,-9],[-30,13],[16,18],[-62,2],[54,11],[43,0],[5,-15],[16,14],[26,9],[42,-13],[-11,-8]],[[7775,9725],[-60,-8],[-78,17],[-46,22],[-21,41],[-38,12],[72,39],[60,13],[54,-29],[64,-56],[-7,-51]],[[5844,5117],[11,-32],[-1,-34],[-8,-8]],[[5821,5105],[7,-6],[16,18]],[[4526,6392],[1,24]],[[6344,6827],[11,-50],[14,-13],[5,-20],[18,-25],[2,-23],[-3,-20],[4,-19],[8,-16],[4,-19],[4,-14]],[[6427,6601],[5,-22]],[[6444,6277],[-80,-23],[-26,-25],[-20,-61],[-13,-9],[-7,19],[-11,-3],[-27,6],[-5,5],[-32,-1],[-7,-5],[-12,15],[-7,-29],[3,-24],[-12,-18]],[[6188,6124],[-4,24],[-8,18],[-2,23],[-15,20],[-15,49],[-7,47],[-20,39],[-12,10],[-18,55],[-4,40],[2,34],[-16,64],[-13,22],[-15,12],[-10,33],[2,13],[-8,30],[-8,13],[-11,42],[-17,47],[-14,39],[-14,0],[5,32],[1,20],[3,23]],[[5943,5727],[-4,2],[0,28],[-3,20],[-14,23],[-4,41],[4,43],[-13,4],[-2,-13],[-17,-3],[7,-17],[2,-34],[-15,-32],[-14,-42],[-14,-6],[-23,34],[-11,-12],[-3,-17],[-14,-10],[-1,-12],[-28,0],[-3,12],[-20,1],[-10,-9],[-8,5],[-14,33],[-5,16],[-20,-8],[-8,-27],[-7,-51],[-10,-11],[-8,-6]],[[5635,5824],[0,14],[-10,17],[-1,33],[-5,23],[-10,-4],[3,21],[7,24],[-3,24],[9,18],[-6,13],[7,36],[13,42],[24,-4],[-1,229]],[[6023,6449],[9,-56],[-6,-11],[4,-59],[11,-69],[10,-14],[15,-21]],[[5944,5427],[-17,-26],[-20,0],[-22,-14],[-18,13],[-11,-15]],[[4536,5896],[-4,44]],[[4535,5965],[-11,45],[-14,21],[12,11],[14,40],[6,30]],[[9502,4579],[8,-20],[-19,0],[-11,36],[17,-14],[5,-2]],[[9467,4614],[-11,-1],[-17,6],[-5,8],[1,23],[19,-9],[9,-12],[4,-15]],[[9490,4630],[-4,-11],[-21,50],[-5,34],[9,0],[10,-46],[11,-27]],[[9440,4702],[1,-11],[-22,24],[-15,21],[-10,19],[4,6],[13,-14],[23,-26],[6,-19]],[[9375,4759],[-5,-3],[-13,13],[-11,24],[1,9],[17,-24],[11,-19]],[[4682,5573],[-8,4],[-20,24],[-14,31],[-5,21],[-3,42]],[[2561,5953],[-3,-13],[-16,0],[-10,6],[-12,11],[-15,4],[-8,12]],[[6359,5840],[0,-1],[0,-24],[0,-58],[0,-30],[-13,-36],[-19,-48]],[[6213,5711],[-11,21],[-10,28]],[[6198,5842],[9,-10],[5,-24],[13,-24],[14,0],[26,14],[30,7],[25,18],[13,4],[10,11],[16,2]],[[6359,5840],[9,1],[13,8],[14,6],[14,20],[10,0],[1,-16],[-3,-34],[0,-30],[-6,-21],[-7,-62],[-14,-64],[-17,-74],[-24,-84],[-23,-65],[-33,-78],[-28,-47],[-42,-57],[-25,-44],[-31,-69],[-6,-31],[-6,-13]],[[5529,7804],[-6,22]],[[3489,5425],[10,-34],[-4,-25],[-3,-26],[-7,-24]],[[3412,5526],[34,-11],[2,10],[23,4],[30,-15]],[[5626,8009],[-8,-15],[-5,-23]],[[5380,7803],[7,5]],[[5663,8983],[-47,-16],[-27,-40],[4,-35],[-44,-47],[-54,-49],[-20,-81],[20,-41],[26,-32],[-25,-65],[-29,-13],[-11,-97],[-15,-54],[-34,6],[-16,-46],[-32,-3],[-9,55],[-23,65],[-21,82]],[[5890,3643],[-5,-26],[-17,-6],[-16,31],[0,20],[7,22],[3,17],[8,4],[14,-11]],[[5999,7177],[-2,44],[7,24]],[[6004,7245],[7,13],[7,12],[2,33],[9,-12],[31,16],[14,-10],[23,0],[32,21],[15,-1],[32,9]],[[5415,5848],[-2,38],[-11,37]],[[5051,5536],[-22,-12]],[[7849,5884],[-25,27],[-24,-1],[4,45],[-24,-1],[-2,-63],[-15,-84],[-9,-51],[1,-42],[19,-1],[11,-53],[5,-50],[15,-33],[17,-6],[14,-30]],[[7779,5555],[-11,22],[-4,28],[-15,33],[-14,27],[-4,-34],[-5,32],[3,36],[8,55]],[[6883,7321],[16,59],[-6,43],[-20,13],[7,26],[23,-3],[13,32],[9,37],[37,13],[-6,-27],[4,-16],[12,2]],[[6497,7324],[-5,41],[4,60],[-22,20],[8,39],[-19,4],[6,48],[26,-14],[25,19],[-20,34],[-8,33],[-23,-15],[-3,-42],[-8,37]],[[6554,7561],[31,1],[-4,29],[24,20],[23,33],[37,-30],[3,-46],[11,-12],[30,3],[9,-11],[14,-59],[32,-40],[18,-27],[29,-28],[37,-25],[-1,-35]],[[8471,4670],[3,14],[24,13],[19,2],[9,7],[10,-7],[-10,-16],[-29,-25],[-23,-16]],[[3307,5765],[-23,-7],[-5,5],[8,16],[-1,23],[16,8],[6,-2],[-1,-43]],[[5233,7310],[31,23],[19,-7],[-1,-29],[24,21],[2,-11],[-14,-28],[0,-27],[9,-14],[-3,-50],[-19,-29],[6,-31],[14,-1],[7,-27],[11,-9]],[[6004,7245],[-11,26],[11,22],[-17,-5],[-23,13],[-19,-33],[-43,-6],[-22,31],[-30,1],[-6,-23],[-20,-7],[-26,30],[-31,-1],[-16,58],[-21,32],[14,44],[-18,28],[31,55],[43,2],[12,44],[53,-8],[33,38],[32,16],[46,1],[49,-40],[40,-23],[32,9],[24,-5],[33,30]],[[5777,7601],[3,-22],[25,-18],[-5,-14],[-33,-4],[-12,-17],[-23,-31],[-9,26],[0,12]],[[8365,6495],[-12,-47],[-14,48],[-4,43],[17,56],[22,44],[13,-17],[-5,-35],[-17,-92]],[[5885,5123],[-1,-34],[-5,-41],[7,-22],[13,13],[16,4],[3,-7],[16,14],[-11,20],[9,26],[14,25]],[[6088,4913],[-12,-71],[1,-32],[18,-21],[1,-15],[-8,-35],[2,-18],[-2,-27],[10,-36],[11,-57],[10,-13]],[[6050,4534],[-10,-18],[-19,-1]],[[5970,4521],[0,1],[-9,22],[-3,61],[-14,31],[-2,-12]],[[5909,4651],[-15,17],[-18,10],[-11,10],[-1,1]],[[5864,4689],[-14,59],[-3,36],[-22,39],[6,22],[-5,23],[1,24],[-5,9],[1,24]],[[5853,5008],[-6,13],[-1,22]],[[5844,5117],[10,7],[31,-1]],[[5941,5186],[-1,4],[-15,11],[-12,-14],[-17,-8],[-13,-33],[2,-23]],[[6061,7895],[-22,-5],[-18,-18],[-26,-4],[-24,-21],[1,-31]],[[5928,7830],[-4,6],[-43,14],[-2,22],[-25,-7],[-11,-32],[-21,-42]],[[3517,3238],[-12,-36],[-31,-32],[-21,11],[-15,-6],[-26,25],[-18,-2],[-17,32]],[[679,6281],[-4,-9],[-7,8],[1,16],[-4,21],[1,6],[5,10],[-2,11],[1,6],[3,-2],[10,-9],[5,-5],[5,-8],[7,-20],[-1,-3],[-11,-13],[-9,-9]],[[664,6371],[-9,-4],[-5,12],[-3,5],[0,3],[3,5],[9,-5],[8,-9],[-3,-7]],[[646,6402],[-1,-6],[-15,1],[2,7],[14,-2]],[[621,6410],[-2,-3],[-2,1],[-9,2],[-4,13],[-1,2],[7,8],[3,-4],[8,-19]],[[574,6448],[-4,-5],[-9,10],[1,4],[5,6],[6,-1],[1,-14]],[[2511,7947],[-28,-19],[-20,-23],[-19,-24],[0,-9],[28,12],[17,-20],[21,15],[22,19],[25,19],[-9,-31],[16,-7],[19,-22],[25,13],[27,5],[6,-16],[9,-2]],[[2657,7855],[14,-23],[-25,-5],[-1,0],[-21,6],[-22,-12],[-19,-5],[-16,-37],[-11,-21],[3,-6],[21,37],[4,0],[-14,-44],[-7,-41],[-5,-32],[4,-28],[-1,-15],[0,-15],[7,-30],[3,-4],[9,1],[8,6],[6,8],[11,28],[1,38],[-10,36],[2,24],[7,28],[7,20],[11,13],[3,-19],[5,28],[6,6],[4,22],[23,-11],[21,-23],[2,-26],[-3,-26],[-15,-23],[2,-15],[5,0],[17,25],[11,-6],[5,-33],[1,-24]],[[2691,7606],[-10,-23],[17,-12],[14,-3],[20,8],[17,16],[14,8],[21,16],[24,35],[0,6]],[[2805,7674],[13,6],[22,-2],[23,-4],[21,19],[-2,22],[-3,8]],[[3135,7782],[5,-19],[-30,-28],[-29,-20],[-29,-17],[-15,-34],[-4,-13],[-1,-31],[10,-30],[11,-2],[-3,21],[8,-12],[-2,-17],[-19,-9],[-13,1],[-20,-10],[-12,-3],[-17,-3],[-23,-17],[41,11],[8,-11],[-39,-17],[-17,0],[0,7],[-8,-16],[8,-3],[-6,-41],[-20,-44],[-2,15],[-6,3],[-9,14],[5,-31],[7,-10],[1,-22],[-9,-22],[-16,-46],[-2,2],[8,39],[-14,22],[-3,48],[-5,-25],[5,-37],[-18,9],[19,-18],[1,-55],[8,-4],[3,-20],[4,-57],[-17,-43],[-29,-17],[-18,-34],[-14,-4],[-14,-21],[-4,-19],[-31,-38],[-16,-27],[-13,-34],[-4,-41],[5,-40],[9,-49],[13,-41],[0,-25],[13,-67],[-1,-39],[-1,-22],[-7,-35],[-8,-7],[-14,7],[-4,25],[-11,13],[-15,50],[-13,44],[-4,22],[6,38],[-8,32],[-22,48],[-10,9],[-28,-26],[-5,3],[-14,27],[-17,14],[-32,-7],[-24,6],[-21,-4],[-12,-9],[5,-15],[0,-23],[5,-12],[-5,-7],[-10,8],[-11,-11],[-20,2],[-20,30],[-25,-7],[-20,14],[-17,-5],[-24,-13],[-25,-43],[-27,-25],[-16,-27],[-6,-26],[0,-40],[1,-27],[5,-20]],[[1746,7056],[-4,29],[-18,33],[-13,7],[-3,17],[-16,3],[-10,15],[-26,6],[-7,9],[-3,32],[-27,58],[-23,80],[1,13],[-13,19],[-21,48],[-4,47],[-15,32],[6,48],[-1,49],[-8,44],[10,54],[4,53],[3,52],[-5,77],[-9,49],[-8,27],[4,11],[40,-19],[15,-55],[7,16],[-5,47],[-9,47]],[[750,8471],[-28,-22],[-14,15],[-4,27],[25,21],[15,8],[18,-3],[12,-18],[-24,-28]],[[401,8632],[-17,-9],[-19,11],[-17,16],[28,10],[22,-6],[3,-22]],[[230,8855],[17,-11],[17,6],[23,-15],[27,-8],[-2,-6],[-21,-12],[-21,12],[-11,11],[-24,-4],[-7,6],[2,21]],[[1374,8338],[-15,22],[-25,18],[-8,50],[-36,47],[-15,54],[-26,4],[-44,2],[-33,16],[-57,60],[-27,11],[-49,20],[-38,-5],[-55,27],[-33,24],[-30,-12],[5,-40],[-15,-3],[-32,-13],[-25,-19],[-30,-12],[-4,34],[12,56],[30,18],[-8,14],[-35,-32],[-19,-38],[-40,-41],[20,-28],[-26,-41],[-30,-24],[-28,-18],[-7,-25],[-43,-30],[-9,-27],[-32,-25],[-20,5],[-25,-16],[-29,-20],[-23,-19],[-47,-17],[-5,10],[31,27],[27,18],[29,31],[35,7],[14,23],[38,35],[6,11],[21,21],[5,43],[14,34],[-32,-17],[-9,10],[-15,-21],[-18,29],[-8,-21],[-10,29],[-28,-23],[-17,0],[-3,34],[5,21],[-17,21],[-37,-11],[-23,27],[-19,14],[0,32],[-22,25],[11,33],[23,32],[10,30],[22,4],[19,-9],[23,27],[20,-5],[21,18],[-5,27],[-16,10],[21,22],[-17,0],[-30,-13],[-8,-13],[-22,13],[-39,-6],[-41,13],[-12,23],[-35,34],[39,24],[62,28],[23,0],[-4,-29],[59,3],[-23,35],[-34,22],[-20,29],[-26,25],[-38,18],[15,30],[49,2],[35,26],[7,28],[28,27],[28,7],[52,26],[26,-4],[42,30],[42,-12],[21,-26],[12,12],[47,-4],[-2,-13],[43,-10],[28,6],[59,-18],[53,-6],[21,-7],[37,9],[42,-17],[31,-8]],[[3018,5861],[-1,-14],[-16,-7],[9,-26],[0,-30],[-12,-33],[10,-46],[12,4],[6,41],[-8,21],[-2,43],[35,24],[-4,27],[10,18],[10,-41],[19,-1],[18,-32],[1,-19],[25,0],[30,6],[16,-26],[21,-7],[16,18],[0,14],[34,4],[34,1],[-24,-17],[10,-28],[22,-4],[21,-28],[4,-46],[15,1],[11,-14]],[[8001,6424],[-37,-50],[-24,-54],[-6,-40],[22,-61],[25,-75],[26,-36],[17,-46],[12,-106],[-3,-102],[-24,-38],[-31,-37],[-23,-48],[-35,-53],[-10,37],[8,39],[-21,32]],[[9661,4234],[-9,-7],[-9,25],[1,15],[17,-33]],[[9641,4323],[4,-47],[-7,7],[-6,-3],[-4,16],[0,44],[13,-17]],[[6475,6141],[-20,-15],[-6,-26],[-1,-19],[-27,-25],[-45,-27],[-24,-40],[-13,-3],[-8,3],[-16,-24],[-18,-11],[-23,-3],[-7,-3],[-6,-15],[-8,-5],[-4,-14],[-14,1],[-9,-8],[-19,3],[-7,34],[1,31],[-5,17],[-5,43],[-8,23],[5,3],[-2,27],[3,11],[-1,25]],[[5911,3643],[-7,-42],[-3,-48],[-7,-26],[-19,-29],[-5,-9],[-12,-29],[-8,-29],[-16,-42],[-31,-59],[-20,-35],[-21,-26],[-29,-22],[-14,-3],[-3,-16],[-17,8],[-14,-11],[-30,11],[-17,-7],[-11,3],[-29,-22],[-24,-9],[-17,-22],[-13,-2],[-11,21],[-10,1],[-12,26],[-1,-8],[-4,15],[0,34],[-9,39],[9,10],[0,44],[-19,54],[-14,49],[-20,75]],[[5817,3910],[11,0],[14,-10],[9,7],[15,-6]],[[5840,4289],[-21,-7],[-15,-23],[-4,-20],[-10,-5],[-24,-47],[-15,-37],[-10,-2],[-9,7],[-31,6]],[[5847,4705],[-1,-12],[9,-4],[6,-12],[5,3],[-2,9]]],transform:{scale:[.036003600360036005,.017366249624962495],translate:[-180,-90]}},Kc=100;function qc(e,t,n,r){let i=document.createElement(`div`);i.className=`adornment`;let a=e.scale??1,o=a*Kc;i.style.width=`${o*r}px`,i.style.height=`${o*r}px`,i.style.flexGrow=`0`,i.style.flexShrink=`0`;let s={id:e.id,map:t,container:i,moveEndPosition:t.getCenter(),geoJson:void 0,isGlobe:e.isGlobe,boundingBox:e.boundingBox,scale:a,backgroundColor:e.backgroundColor??`#000000`,globeBackgroundColor:e.globeBackgroundColor??`#000000`,borderColor:e.borderColor??`#000000`,primaryFillColor:e.primaryFillColor??`#000000`,primaryStrokeColor:e.primaryStrokeColor??`#000000`,secondaryFillColor:e.secondaryFillColor??`#000000`,secondaryStrokeColor:e.secondaryStrokeColor??`#000000`,graticuleColor:e.graticuleColor??`#000000`,frameColor:e.frameColor??`#000000`,frameOutlineColor:e.frameOutlineColor??`#000000`,dotColor:e.dotColor??`#000000`,dotOutlineColor:e.dotOutlineColor??`#000000`,mapScale:r,globeFallbackActive:!1,globeGeoJsonRequested:!1,globeGeoJson:void 0};return s.geoJson=na(Gc,Object.keys(Gc.objects)[0]),Jc(s),t.on(`moveend`,()=>{s.moveEndPosition=t.getCenter(),(s.isGlobe||s.globeFallbackActive)&&Jc(s)}),t.on(`move`,()=>{if(!s.isGlobe){let[e,r,i,a]=s.boundingBox,o=Zc(t),c=ro(Rn([o,In([[[e,r],[e,a],[i,a],[i,r],[e,r]]])])),l=qi(o),u=(c?qi(c):0)<l*.75;s.globeFallbackActive!==u&&(s.globeFallbackActive=u,s.moveEndPosition=t.getCenter(),Jc(s)),s.globeFallbackActive&&!s.globeGeoJsonRequested&&(s.globeGeoJsonRequested=!0,fetch(`${n}/data/insetmaps/world-110m.json`).then(e=>e.json()).then(e=>{s.globeGeoJson=na(e,Object.keys(e.objects)[0]),s.moveEndPosition=t.getCenter(),Jc(s)}))}Xc(s)}),i}function Jc(e){let{id:t,container:n,scale:r,backgroundColor:i,globeBackgroundColor:a,secondaryFillColor:o,secondaryStrokeColor:s,primaryFillColor:c,primaryStrokeColor:l,graticuleColor:u,borderColor:d,frameColor:f,frameOutlineColor:p,dotColor:m,dotOutlineColor:h}=e,g=e.globeFallbackActive&&e.globeGeoJson!==void 0,_=g?e.globeGeoJson:e.geoJson,v=g||e.isGlobe;if(_===void 0)return;let y=Kc*r,b=y/2,x=.1*r,S=[v?`<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>`:`<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`],{path:C}=Yc(e),w=C({..._,features:_.features.filter(e=>e.properties?.class!==`P1`)});w&&S.push(`
|
|
939
|
+
`}function qi(e){return Un(e,(e,t)=>e+Ji(t),0)}function Ji(e){let t=0,n;switch(e.type){case`Polygon`:return Yi(e.coordinates);case`MultiPolygon`:for(n=0;n<e.coordinates.length;n++)t+=Yi(e.coordinates[n]);return t;case`Point`:case`MultiPoint`:case`LineString`:case`MultiLineString`:return 0}return 0}function Yi(e){let t=0;if(e&&e.length>0){t+=Math.abs(Qi(e[0]));for(let n=1;n<e.length;n++)t-=Math.abs(Qi(e[n]))}return t}var Xi=Pn*Pn/2,Zi=Math.PI/180;function Qi(e){let t=e.length-1;if(t<=2)return 0;let n=0,r=0;for(;r<t;){let i=e[r],a=e[r+1===t?0:r+1],o=e[r+2>=t?(r+2)%t:r+2],s=i[0]*Zi,c=a[1]*Zi,l=o[0]*Zi;n+=(l-s)*Math.sin(c),r++}return n*Xi}function $i(e){return e}function ea(e){if(e==null)return $i;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var c=2,l=e.length,u=Array(l);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;c<l;)u[c]=e[c],++c;return u}}function ta(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function na(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return ra(e,t)})}:ra(e,t)}function ra(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=ia(e,t);return n==null&&r==null?{type:`Feature`,properties:i,geometry:a}:r==null?{type:`Feature`,id:n,properties:i,geometry:a}:{type:`Feature`,id:n,bbox:r,properties:i,geometry:a}}function ia(e,t){var n=ea(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&ta(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(s)}function l(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(l)};case`Point`:n=a(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(a);break;case`LineString`:n=o(e.arcs);break;case`MultiLineString`:n=e.arcs.map(o);break;case`Polygon`:n=c(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(c);break;default:return null}return{type:t,coordinates:n}}return l(t)}var aa=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,oa=Math.ceil,sa=Math.floor,Y=`[BigNumber Error] `,ca=Y+`Number primitive has more than 15 significant digits: `,la=0x5af3107a4000,X=14,ua=9007199254740991,da=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],fa=1e7,Z=1e9;function pa(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!aa.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(_a(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(ca+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>ua||e!==sa(e)))throw Error(ca+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%X,l<0&&(f+=X),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=X;f<m;)y.c.push(+h.slice(f,f+=X));f=X-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=pa,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],_a(n,0,Z,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],_a(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(_a(n[0],-Z,0,t),_a(n[1],0,Z,t),c=n[0],l=n[1]):(_a(n,-Z,Z,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)_a(n[0],-Z,-1,t),_a(n[1],1,Z,t),u=n[0],d=n[1];else if(_a(n,-Z,Z,t),n)u=-(d=n<0?-n:n);else throw Error(Y+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(Y+`crypto unavailable`);else f=n;else throw Error(Y+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],_a(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],_a(n,0,Z,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(Y+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(Y+t+` invalid: `+n)}else throw Error(Y+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-Z&&i<=Z&&i===sa(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%X,t<1&&(t+=X),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=la||n!==sa(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(Y+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return sa(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:_a(e,0,Z),s=oa(e/X),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(Y+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=X,s&&e&&(c=da[X-e],u[l]=sa(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=X);for(l=1,c=u[0];c>=10;c/=10,l++);l<X&&(i-=X-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(ba(ha(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?ba(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=ba(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%fa,u=t/fa|0;for(e=e.slice();c--;)a=e[c]%fa,o=e[c]/fa|0,r=u*a+o*l,i=l*a+r%fa*fa+s,s=(i/n|0)+(r/fa|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=la,l=ma(r.e/X)-ma(i.e/X),D=D/X|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=sa(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=sa(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==la){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*X-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:_a(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=ha(e.c),d=r==1||r==2&&(o<=c||o>=l)?ya(d,o):ba(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=ha(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=ya(d,a)}else if(t-=o+(r===2&&a>o),d=ba(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=ga(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*X-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(Y+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=da;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=X,o=t,c=p[l=0],f=sa(c/m[i-o-1]%10);else if(l=oa((a+1)/X),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=X,o=a-X+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=X,o=a-X+i,f=o<0?0:sa(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(X-t%X)%X],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[X-a],p[l]=o>0?sa(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==la&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=la)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=ha(e.c),t=n<=c||n>=l?ya(t,n):ba(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return ga(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return _a(e,0,Z),t==null?t=s:_a(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-ma(this.e/X))*X,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(Y+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-va(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&va(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=oa(m/X+2));for(l?(n=new v(.5),u&&(e.s=1),d=va(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=sa(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=va(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:_a(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return ga(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return ga(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=ga(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&ma(this.e/X)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return ga(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=ga(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/X,u=e.e/X,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=ma(l),u=ma(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=la-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=la}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=ma(_.e/X)+ma(e.e/X),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=la,g=fa,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/X,o=e.e/X,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=ma(a),o=ma(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/la|0,s[t]=la===s[t]?0:s[t]%la;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return _a(e,1,Z),t==null?t=s:_a(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*X+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return _a(e,-ua,ua),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=ha(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=ma((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),ha(a.c).slice(0,u)===(n=ha(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(_a(e,0,Z),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(_a(e,0,Z),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(Y+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(Y+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=ha(y),c=n.e=g.length-_.e-1,n.c[0]=da[(l=c%X)<0?X+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&_a(e,1,Z),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?ya(ha(r.c),a):ba(ha(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=ba(ha(r.c),r.e,`0`)):(_a(e,2,g.length,`Base`),t=n(ba(ha(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function ma(e){var t=e|0;return e>0||e===t?t:t-1}function ha(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=X-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function ga(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function _a(e,t,n,r){if(e<t||e>n||e!==sa(e))throw Error(Y+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function va(e){var t=e.c.length-1;return ma(e.e/X)==t&&e.c[t]%2!=0}function ya(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function ba(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var xa=pa(),Sa=class{key;left=null;right=null;constructor(e){this.key=e}},Ca=class extends Sa{constructor(e){super(e)}},wa=class{size=0;modificationCount=0;splayCount=0;splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let n=null,r=null,i=null,a=null,o=t,s=this.compare,c;for(;;)if(c=s(o.key,e),c>0){let t=o.left;if(t==null||(c=s(t.key,e),c>0&&(o.left=t.right,t.right=o,o=t,t=o.left,t==null)))break;n==null?r=o:n.left=o,n=o,o=t}else if(c<0){let t=o.right;if(t==null||(c=s(t.key,e),c<0&&(o.right=t.left,t.left=o,o=t,t=o.right,t==null)))break;i==null?a=o:i.right=o,i=o,o=t}else break;return i!=null&&(i.right=o.left,o.left=a),n!=null&&(n.left=o.right,o.right=r),this.root!==o&&(this.root=o,this.splayCount++),c}splayMin(e){let t=e,n=t.left;for(;n!=null;){let e=n;t.left=e.right,e.right=t,t=e,n=t.left}return t}splayMax(e){let t=e,n=t.right;for(;n!=null;){let e=n;t.right=e.left,e.left=t,t=e,n=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let t=this.root,n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{let e=t.right;t=this.splayMax(r),t.right=e,this.root=t}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let n=this.root;if(n==null){this.root=e;return}t<0?(e.left=n,e.right=n.right,n.right=null):(e.right=n,e.left=n.left,n.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},Ta=class e extends wa{root=null;compare;validKey;constructor(e,t){super(),this.compare=e??this.defaultCompare(),this.validKey=t??(e=>e!=null&&e!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(let t of e)this.delete(t)}forEach(e){let t=this[Symbol.iterator](),n;for(;n=t.next(),!n.done;)e(n.value,n.value,this)}add(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new Ca(e),t),this}addAndReturn(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new Ca(e),t),this.root.key}addAll(e){for(let t of e)this.add(t)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw`Bad state: No element`;if(this.size>1)throw`Bad state: Too many element`;return this.root.key}first(){if(this.size==0)throw`Bad state: No element`;return this._first().key}last(){if(this.size==0)throw`Bad state: No element`;return this._last().key}lastBefore(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)<0)return this.root.key;let t=this.root.left;if(t==null)return null;let n=t.right;for(;n!=null;)t=n,n=t.right;return t.key}firstAfter(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)>0)return this.root.key;let t=this.root.right;if(t==null)return null;let n=t.left;for(;n!=null;)t=n,n=t.left;return t.key}retainAll(t){let n=new e(this.compare,this.validKey),r=this.modificationCount;for(let e of t){if(r!=this.modificationCount)throw`Concurrent modification during iteration.`;this.validKey(e)&&this.splay(e)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(e){return!this.validKey(e)||this.splay(e)!=0?null:this.root.key}intersection(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)&&n.add(e);return n}difference(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)||n.add(e);return n}union(e){let t=this.clone();return t.addAll(e),t}clone(){let t=new e(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(e){if(e==null)return null;function t(e,n){let r,i;do{if(r=e.left,i=e.right,r!=null){let e=new Ca(r.key);n.left=e,t(r,e)}if(i!=null){let t=new Ca(i.key);n.right=t,e=i,n=t}}while(i!=null)}let n=new Ca(e.key);return t(e,n),n}toSet(){return this.clone()}entries(){return new Oa(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new Da(this.wrap())}[Symbol.toStringTag]=`[object Set]`},Ea=class{tree;path=[];modificationCount=null;splayCount;constructor(e){this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let e=this.tree.getRoot();for(;e!=null;)this.path.push(e),e=e.left;return this.path.length>0}throw`Concurrent modification during iteration.`}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},Da=class extends Ea{getValue(e){return e.key}},Oa=class extends Ea{getValue(e){return[e.key,e.key]}},ka=e=>()=>e,Aa=e=>{let t=e?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(e):ka(!1);return(e,n)=>t(e,n)?0:e.comparedTo(n)};function ja(e){let t=e?(t,n,r,i,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)):ka(!1);return(e,n,r)=>{let i=e.x,a=e.y,o=r.x,s=r.y,c=a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));return t(c,i,a,o,s)?0:c.comparedTo(0)}}var Ma=e=>e,Na=e=>{if(e){let t=new Ta(Aa(e)),n=new Ta(Aa(e)),r=(e,t)=>t.addAndReturn(e),i=e=>({x:r(e.x,t),y:r(e.y,n)});return i({x:new xa(0),y:new xa(0)}),i}return Ma},Pa=e=>({set:e=>{Q=Pa(e)},reset:()=>Pa(e),compare:Aa(e),snap:Na(e),orient:ja(e)}),Q=Pa(),$=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),Fa=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let n=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,r=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,a=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:n,y:i},ur:{x:r,y:a}}},Ia=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),La=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),Ra=e=>La(e,e).sqrt(),za=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return Ia(i,r).div(Ra(i)).div(Ra(r))},Ba=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return La(i,r).div(Ra(i)).div(Ra(r))},Va=(e,t,n)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(n.minus(e.y))),y:n},Ha=(e,t,n)=>t.x.isZero()?null:{x:n,y:e.y.plus(t.y.div(t.x).times(n.minus(e.x)))},Ua=(e,t,n,r)=>{if(t.x.isZero())return Ha(n,r,e.x);if(r.x.isZero())return Ha(e,t,n.x);if(t.y.isZero())return Va(n,r,e.y);if(r.y.isZero())return Va(e,t,n.y);let i=Ia(t,r);if(i.isZero())return null;let a={x:n.x.minus(e.x),y:n.y.minus(e.y)},o=Ia(a,t).div(i),s=Ia(a,r).div(i),c=e.x.plus(s.times(t.x)),l=n.x.plus(o.times(r.x)),u=e.y.plus(s.times(t.y)),d=n.y.plus(o.times(r.y));return{x:c.plus(l).div(2),y:u.plus(d).div(2)}},Wa=class e{point;isLeft;segment;otherSE;consumedBy;static compare(t,n){let r=e.comparePoints(t.point,n.point);return r===0?(t.point!==n.point&&t.link(n),t.isLeft===n.isLeft?Qa.compare(t.segment,n.segment):t.isLeft?1:-1):r}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw Error(`Tried to link already linked events`);let t=e.point.events;for(let e=0,n=t.length;e<n;e++){let n=t[e];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){let e=this.point.events.length;for(let t=0;t<e;t++){let n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){let e=this.point.events[r];e.consumedBy===void 0&&n.otherSE.point.events===e.otherSE.point.events&&n.segment.consume(e.segment)}}}getAvailableLinkedEvents(){let e=[];for(let t=0,n=this.point.events.length;t<n;t++){let n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}getLeftmostComparator(e){let t=new Map,n=n=>{let r=n.otherSE;t.set(n,{sine:za(this.point,e.point,r.point),cosine:Ba(this.point,e.point,r.point)})};return(e,r)=>{t.has(e)||n(e),t.has(r)||n(r);let{sine:i,cosine:a}=t.get(e),{sine:o,cosine:s}=t.get(r);return i.isGreaterThanOrEqualTo(0)&&o.isGreaterThanOrEqualTo(0)?a.isLessThan(s)?1:a.isGreaterThan(s)?-1:0:i.isLessThan(0)&&o.isLessThan(0)?a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0:o.isLessThan(i)?-1:o.isGreaterThan(i)?1:0}}},Ga=class e{events;poly;_isExteriorRing;_enclosingRing;static factory(t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];if(!i.isInResult()||i.ringOut)continue;let a=null,o=i.leftSE,s=i.rightSE,c=[o],l=o.point,u=[];for(;a=o,o=s,c.push(o),o.point!==l;)for(;;){let t=o.getAvailableLinkedEvents();if(t.length===0){let e=c[0].point,t=c[c.length-1].point;throw Error(`Unable to complete output ring starting at [${e.x}, ${e.y}]. Last matching segment found ends at [${t.x}, ${t.y}].`)}if(t.length===1){s=t[0].otherSE;break}let r=null;for(let e=0,t=u.length;e<t;e++)if(u[e].point===o.point){r=e;break}if(r!==null){let t=u.splice(r)[0],i=c.splice(t.index);i.unshift(i[0].otherSE),n.push(new e(i.reverse()));continue}u.push({index:c.length,point:o.point});let i=o.getLeftmostComparator(a);s=t.sort(i)[0].otherSE;break}n.push(new e(c))}return n}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point,t=[e];for(let n=1,r=this.events.length-1;n<r;n++){let r=this.events[n].point,i=this.events[n+1].point;Q.orient(r,e,i)!==0&&(t.push(r),e=r)}if(t.length===1)return null;let n=t[0],r=t[1];Q.orient(n,e,r)===0&&t.shift(),t.push(t[0]);let i=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,s=[];for(let e=a;e!=o;e+=i)s.push([t[e].x.toNumber(),t[e].y.toNumber()]);return s}isExteriorRing(){if(this._isExteriorRing===void 0){let e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let t=1,n=this.events.length;t<n;t++){let n=this.events[t];Wa.compare(e,n)>0&&(e=n)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut?.enclosingRing()===t.ringOut?t.ringOut?.enclosingRing():t.ringOut;t=n.prevInResult(),n=t?t.prevInResult():null}}},Ka=class{exteriorRing;interiorRings;constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let e=0,n=this.interiorRings.length;e<n;e++){let n=this.interiorRings[e].getGeom();n!==null&&t.push(n)}return t}},qa=class{rings;polys;constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];if(!r.poly)if(r.isExteriorRing())t.push(new Ka(r));else{let e=r.enclosingRing();e?.poly||t.push(new Ka(e)),e?.poly?.addInterior(r)}}return t}},Ja=class{queue;tree;segments;constructor(e,t=Qa.compare){this.queue=e,this.tree=new Ta(t),this.segments=[]}process(e){let t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),n;e.isLeft&&this.tree.add(t);let r=t,i=t;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let a=null;if(r){let e=r.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(a=e),!r.isAnEndpoint(e))){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}let o=null;if(i){let e=i.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(o=e),!i.isAnEndpoint(e))){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}if(a!==null||o!==null){let e=null;e=a===null?o:o===null||Wa.comparePoints(a,o)<=0?a:o,this.queue.delete(t.rightSE),n.push(t.rightSE);let r=t.split(e);for(let e=0,t=r.length;e<t;e++)n.push(r[e])}n.length>0?(this.tree.delete(t),n.push(e)):(this.segments.push(t),t.prev=r)}else{if(r&&i){let e=r.getIntersection(i);if(e!==null){if(!r.isAnEndpoint(e)){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}if(!i.isAnEndpoint(e)){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}}this.tree.delete(t)}return n}_splitSafely(e,t){this.tree.delete(e);let n=e.rightSE;this.queue.delete(n);let r=e.split(t);return r.push(n),e.consumedBy===void 0&&this.tree.add(e),r}},Ya=new class{type;numMultiPolys;run(e,t,n){Ya.type=e;let r=[new to(t,!0)];for(let e=0,t=n.length;e<t;e++)r.push(new to(n[e],!1));if(Ya.numMultiPolys=r.length,Ya.type===`difference`){let e=r[0],t=1;for(;t<r.length;)Fa(r[t].bbox,e.bbox)===null?r.splice(t,1):t++}if(Ya.type===`intersection`)for(let e=0,t=r.length;e<t;e++){let t=r[e];for(let n=e+1,i=r.length;n<i;n++)if(Fa(t.bbox,r[n].bbox)===null)return[]}let i=new Ta(Wa.compare);for(let e=0,t=r.length;e<t;e++){let t=r[e].getSweepEvents();for(let e=0,n=t.length;e<n;e++)i.add(t[e])}let a=new Ja(i),o=null;for(i.size!=0&&(o=i.first(),i.delete(o));o;){let e=a.process(o);for(let t=0,n=e.length;t<n;t++){let n=e[t];n.consumedBy===void 0&&i.add(n)}i.size==0?o=null:(o=i.first(),i.delete(o))}return Q.reset(),new qa(Ga.factory(a.segments)).getGeom()}},Xa=Ya,Za=0,Qa=class e{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(e,t){let n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(i.isLessThan(r))return-1;let o=e.leftSE.point.y,s=t.leftSE.point.y,c=e.rightSE.point.y,l=t.rightSE.point.y;if(n.isLessThan(r)){if(s.isLessThan(o)&&s.isLessThan(c))return 1;if(s.isGreaterThan(o)&&s.isGreaterThan(c))return-1;let n=e.comparePoint(t.leftSE.point);if(n<0)return 1;if(n>0)return-1;let r=t.comparePoint(e.rightSE.point);return r===0?-1:r}if(n.isGreaterThan(r)){if(o.isLessThan(s)&&o.isLessThan(l))return-1;if(o.isGreaterThan(s)&&o.isGreaterThan(l))return 1;let n=t.comparePoint(e.leftSE.point);if(n!==0)return n;let r=e.comparePoint(t.rightSE.point);return r<0?1:r>0?-1:1}if(o.isLessThan(s))return-1;if(o.isGreaterThan(s))return 1;if(i.isLessThan(a)){let n=t.comparePoint(e.rightSE.point);if(n!==0)return n}if(i.isGreaterThan(a)){let n=e.comparePoint(t.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!i.eq(a)){let e=c.minus(o),t=i.minus(n),u=l.minus(s),d=a.minus(r);if(e.isGreaterThan(t)&&u.isLessThan(d))return 1;if(e.isLessThan(t)&&u.isGreaterThan(d))return-1}return i.isGreaterThan(a)?1:i.isLessThan(a)||c.isLessThan(l)?-1:c.isGreaterThan(l)?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Za,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(t,n,r){let i,a,o,s=Wa.comparePoints(t,n);if(s<0)i=t,a=n,o=1;else if(s>0)i=n,a=t,o=-1;else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);return new e(new Wa(i,!0),new Wa(a,!1),[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Q.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){let t=this.bbox(),n=e.bbox(),r=Fa(t,n);if(r===null)return null;let i=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,s=e.rightSE.point,c=$(t,o)&&this.comparePoint(o)===0,l=$(n,i)&&e.comparePoint(i)===0,u=$(t,s)&&this.comparePoint(s)===0,d=$(n,a)&&e.comparePoint(a)===0;if(l&&c)return d&&!u?a:!d&&u?s:null;if(l)return u&&i.x.eq(s.x)&&i.y.eq(s.y)?null:i;if(c)return d&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(d&&u)return null;if(d)return a;if(u)return s;let f=Ua(i,this.vector(),o,e.vector());return f===null||!$(r,f)?null:Q.snap(f)}split(t){let n=[],r=t.events!==void 0,i=new Wa(t,!0),a=new Wa(t,!1),o=this.rightSE;this.replaceRightSE(a),n.push(a),n.push(i);let s=new e(i,o,this.rings.slice(),this.windings.slice());return Wa.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),Wa.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}swapEvents(){let e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e<t;e++)this.windings[e]*=-1}consume(t){let n=this,r=t;for(;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;let i=e.compare(n,r);if(i!==0){if(i>0){let e=n;n=r,r=e}if(n.prev===r){let e=n;n=r,r=e}for(let e=0,t=r.rings.length;e<t;e++){let t=r.rings[e],i=r.windings[e],a=n.rings.indexOf(t);a===-1?(n.rings.push(t),n.windings.push(i)):n.windings[a]+=i}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}prevInResult(){return this._prevInResult===void 0&&(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){return this._beforeState===void 0&&(this.prev?this._beforeState=(this.prev.consumedBy||this.prev).afterState():this._beforeState={rings:[],windings:[],multiPolys:[]}),this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};let t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let e=0,r=this.rings.length;e<r;e++){let r=this.rings[e],i=this.windings[e],a=t.indexOf(r);a===-1?(t.push(r),n.push(i)):n[a]+=i}let i=[],a=[];for(let e=0,r=t.length;e<r;e++){if(n[e]===0)continue;let r=t[e],o=r.poly;if(a.indexOf(o)===-1)if(r.isExterior)i.push(o);else{a.indexOf(o)===-1&&a.push(o);let e=i.indexOf(r.poly);e!==-1&&i.splice(e,1)}}for(let e=0,t=i.length;e<t;e++){let t=i[e].multiPoly;r.indexOf(t)===-1&&r.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Xa.type){case`union`:this._isInResult=e.length===0!=(t.length===0);break;case`intersection`:{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Xa.numMultiPolys&&n<r;break}case`xor`:this._isInResult=Math.abs(e.length-t.length)%2==1;break;case`difference`:{let n=e=>e.length===1&&e[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},$a=class{poly;isExterior;segments;bbox;constructor(e,t,n){if(!Array.isArray(e)||e.length===0||(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!=`number`||typeof e[0][1]!=`number`))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let r=Q.snap({x:new xa(e[0][0]),y:new xa(e[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let t=1,n=e.length;t<n;t++){if(typeof e[t][0]!=`number`||typeof e[t][1]!=`number`)throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let n=Q.snap({x:new xa(e[t][0]),y:new xa(e[t][1])});n.x.eq(i.x)&&n.y.eq(i.y)||(this.segments.push(Qa.fromRing(i,n,this)),n.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.x),n.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.y),n.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.x),n.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.y),i=n)}(!r.x.eq(i.x)||!r.y.eq(i.y))&&this.segments.push(Qa.fromRing(i,r,this))}getSweepEvents(){let e=[];for(let t=0,n=this.segments.length;t<n;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},eo=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);this.exteriorRing=new $a(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=e.length;t<n;t++){let n=new $a(e[t],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){let n=this.interiorRings[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},to=class{isSubject;polys;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);try{typeof e[0][0][0]==`number`&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new xa(1/0),y:new xa(1/0)},ur:{x:new xa(-1/0),y:new xa(-1/0)}};for(let t=0,n=e.length;t<n;t++){let n=new eo(e[t],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},no=(e,...t)=>Xa.run(`intersection`,e,t);Q.set;function ro(e,t={}){let n=[];if(Hn(e,e=>{n.push(e.coordinates)}),n.length<2)throw Error(`Must specify at least 2 geometries`);let r=no(n[0],...n.slice(1));return r.length===0?null:r.length===1?In(r[0],t.properties):Bn(r,t.properties)}var io=1e-6,ao=Math.PI,oo=ao/2,so=ao/4,co=ao*2,lo=180/ao,uo=ao/180,fo=Math.abs,po=Math.atan,mo=Math.atan2,ho=Math.cos,go=Math.ceil,_o=Math.exp,vo=Math.log,yo=Math.sin,bo=Math.sign||function(e){return e>0?1:e<0?-1:0},xo=Math.sqrt,So=Math.tan;function Co(e){return e>1?0:e<-1?ao:Math.acos(e)}function wo(e){return e>1?oo:e<-1?-oo:Math.asin(e)}function To(){}function Eo(e,t){e&&Oo.hasOwnProperty(e.type)&&Oo[e.type](e,t)}var Do={Feature:function(e,t){Eo(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Eo(n[r].geometry,t)}},Oo={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ko(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ko(n[r],t,0)},Polygon:function(e,t){Ao(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ao(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Eo(n[r],t)}};function ko(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function Ao(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ko(e[n],t,1);t.polygonEnd()}function jo(e,t){e&&Do.hasOwnProperty(e.type)?Do[e.type](e,t):Eo(e,t)}function Mo(e){return[mo(e[1],e[0]),wo(e[2])]}function No(e){var t=e[0],n=e[1],r=ho(n);return[r*ho(t),r*yo(t),yo(n)]}function Po(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Fo(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Io(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Lo(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ro(e){var t=xo(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function zo(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function Bo(e,t){return fo(e)>ao&&(e-=Math.round(e/co)*co),[e,t]}Bo.invert=Bo;function Vo(e,t,n){return(e%=co)?t||n?zo(Uo(e),Wo(t,n)):Uo(e):t||n?Wo(t,n):Bo}function Ho(e){return function(t,n){return t+=e,fo(t)>ao&&(t-=Math.round(t/co)*co),[t,n]}}function Uo(e){var t=Ho(e);return t.invert=Ho(-e),t}function Wo(e,t){var n=ho(e),r=yo(e),i=ho(t),a=yo(t);function o(e,t){var o=ho(t),s=ho(e)*o,c=yo(e)*o,l=yo(t),u=l*n+s*r;return[mo(c*i-u*a,s*n-l*r),wo(u*i+c*a)]}return o.invert=function(e,t){var o=ho(t),s=ho(e)*o,c=yo(e)*o,l=yo(t),u=l*i-c*a;return[mo(c*i+l*a,s*n+u*r),wo(u*n-s*r)]},o}function Go(e){e=Vo(e[0]*uo,e[1]*uo,e.length>2?e[2]*uo:0);function t(t){return t=e(t[0]*uo,t[1]*uo),t[0]*=lo,t[1]*=lo,t}return t.invert=function(t){return t=e.invert(t[0]*uo,t[1]*uo),t[0]*=lo,t[1]*=lo,t},t}function Ko(e,t,n,r,i,a){if(n){var o=ho(t),s=yo(t),c=r*n;i==null?(i=t+r*co,a=t-c/2):(i=qo(o,i),a=qo(o,a),(r>0?i<a:i>a)&&(i+=r*co));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Mo([o,-s*ho(u),-s*yo(u)]),e.point(l[0],l[1])}}function qo(e,t){t=No(t),t[0]-=e,Ro(t);var n=Co(-t[1]);return((-t[2]<0?-n:n)+co-io)%co}function Jo(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:To,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Yo(e,t){return fo(e[0]-t[0])<1e-6&&fo(e[1]-t[1])<1e-6}function Xo(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Zo(e,t,n,r,i){var a=[],o=[],s,c;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],c;if(Yo(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*io}a.push(c=new Xo(n,e,null,!0)),o.push(c.o=new Xo(n,null,c,!1)),a.push(c=new Xo(r,e,null,!1)),o.push(c.o=new Xo(r,null,c,!0))}}),a.length){for(o.sort(t),Qo(a),Qo(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,d;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((d=u[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((d=u[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Qo(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function $o(e){return fo(e[0])<=ao?e[0]:bo(e[0])*((fo(e[0])+ao)%co-ao)}function es(e,t){var n=$o(t),r=t[1],i=yo(r),a=[yo(n),-ho(n),0],o=0,s=0,c=new jt;i===1?r=oo+io:i===-1&&(r=-oo-io);for(var l=0,u=e.length;l<u;++l)if(f=(d=e[l]).length)for(var d,f,p=d[f-1],m=$o(p),h=p[1]/2+so,g=yo(h),_=ho(h),v=0;v<f;++v,m=b,g=S,_=C,p=y){var y=d[v],b=$o(y),x=y[1]/2+so,S=yo(x),C=ho(x),w=b-m,T=w>=0?1:-1,E=T*w,D=E>ao,O=g*S;if(c.add(mo(O*T*yo(E),_*C+O*ho(E))),o+=D?w+T*co:w,D^m>=n^b>=n){var k=Fo(No(p),No(y));Ro(k);var A=Fo(a,k);Ro(A);var j=(D^w>=0?-1:1)*wo(A[2]);(r>j||r===j&&(k[0]||k[1]))&&(s+=D^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&c<-1e-12)^s&1}function ts(e,t,n,r){return function(i){var a=t(i),o=Jo(),s=t(o),c=!1,l,u,d,f={point:p,lineStart:h,lineEnd:g,polygonStart:function(){f.point=_,f.lineStart=v,f.lineEnd=y,u=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=h,f.lineEnd=g,u=Gt(u);var e=es(l,r);u.length?(c||=(i.polygonStart(),!0),Zo(u,rs,e,n,i)):e&&(c||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&=(i.polygonEnd(),!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){a.point(e,t)}function h(){f.point=m,a.lineStart()}function g(){f.point=p,a.lineEnd()}function _(e,t){d.push([e,t]),s.point(e,t)}function v(){s.lineStart(),d=[]}function y(){_(d[0][0],d[0][1]),s.lineEnd();var e=s.clean(),t=o.result(),n,r=t.length,a,f,p;if(d.pop(),l.push(d),d=null,r){if(e&1){if(f=t[0],(a=f.length-1)>0){for(c||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=f[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),u.push(t.filter(ns))}}return f}}function ns(e){return e.length>1}function rs(e,t){return((e=e.x)[0]<0?e[1]-oo-io:oo-e[1])-((t=t.x)[0]<0?t[1]-oo-io:oo-t[1])}var is=ts(function(){return!0},as,ss,[-ao,-oo]);function as(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?ao:-ao,c=fo(a-t);fo(c-ao)<1e-6?(e.point(t,n=(n+o)/2>0?oo:-oo),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&c>=ao&&(fo(t-r)<1e-6&&(t-=r*io),fo(a-s)<1e-6&&(a-=s*io),n=os(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function os(e,t,n,r){var i,a,o=yo(e-n);return fo(o)>1e-6?po((yo(t)*(a=ho(r))*yo(n)-yo(r)*(i=ho(t))*yo(e))/(i*a*o)):(t+r)/2}function ss(e,t,n,r){var i;if(e==null)i=n*oo,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(fo(e[0]-t[0])>1e-6){var a=e[0]<t[0]?ao:-ao;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function cs(e){var t=ho(e),n=2*uo,r=t>0,i=fo(t)>io;function a(t,r,i,a){Ko(a,e,n,i,t,r)}function o(e,n){return ho(e)*ho(n)>t}function s(e){var t,n,a,s,u;return{lineStart:function(){s=a=!1,u=1},point:function(d,f){var p=[d,f],m,h=o(d,f),g=r?h?0:l(d,f):h?l(d+(d<0?ao:-ao),f):0;if(!t&&(s=a=h)&&e.lineStart(),h!==a&&(m=c(t,p),(!m||Yo(t,m)||Yo(p,m))&&(p[2]=1)),h!==a)u=0,h?(e.lineStart(),m=c(p,t),e.point(m[0],m[1])):(m=c(t,p),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(i&&t&&r^h){var _;!(g&n)&&(_=c(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}h&&(!t||!Yo(t,p))&&e.point(p[0],p[1]),t=p,a=h,n=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return u|(s&&a)<<1}}}function c(e,n,r){var i=No(e),a=No(n),o=[1,0,0],s=Fo(i,a),c=Po(s,s),l=s[0],u=c-l*l;if(!u)return!r&&e;var d=t*c/u,f=-t*l/u,p=Fo(o,s),m=Lo(o,d);Io(m,Lo(s,f));var h=p,g=Po(m,h),_=Po(h,h),v=g*g-_*(Po(m,m)-1);if(!(v<0)){var y=xo(v),b=Lo(h,(-g-y)/_);if(Io(b,m),b=Mo(b),!r)return b;var x=e[0],S=n[0],C=e[1],w=n[1],T;S<x&&(T=x,x=S,S=T);var E=S-x,D=fo(E-ao)<io,O=D||E<1e-6;if(!D&&w<C&&(T=C,C=w,w=T),O?D?C+w>0^b[1]<(fo(b[0]-x)<1e-6?C:w):C<=b[1]&&b[1]<=w:E>ao^(x<=b[0]&&b[0]<=S)){var k=Lo(h,(-g+y)/_);return Io(k,m),[b,Mo(k)]}}}function l(t,n){var i=r?e:ao-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return ts(o,s,a,r?[0,-e]:[-ao,e-ao])}function ls(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var us=1e9,ds=-us;function fs(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var u=0,d=0;if(i==null||(u=o(i,s))!==(d=o(a,s))||c(i,a)<0^s>0)do l.point(u===0||u===3?e:n,u>1?r:t);while((u=(u+s+4)%4)!==d);else l.point(a[0],a[1])}function o(r,i){return fo(r[0]-e)<1e-6?i>0?0:3:fo(r[0]-n)<1e-6?i>0?2:1:fo(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return c(e.x,t.x)}function c(e,t){var n=o(e,1),r=o(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(o){var c=o,l=Jo(),u,d,f,p,m,h,g,_,v,y,b,x={point:S,lineStart:E,lineEnd:D,polygonStart:w,polygonEnd:T};function S(e,t){i(e,t)&&c.point(e,t)}function C(){for(var t=0,n=0,i=d.length;n<i;++n)for(var a=d[n],o=1,s=a.length,c=a[0],l,u,f=c[0],p=c[1];o<s;++o)l=f,u=p,c=a[o],f=c[0],p=c[1],u<=r?p>r&&(f-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(f-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function w(){c=l,u=[],d=[],b=!0}function T(){var e=C(),t=b&&e,n=(u=Gt(u)).length;(t||n)&&(o.polygonStart(),t&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),n&&Zo(u,s,e,a,o),o.polygonEnd()),c=o,u=d=f=null}function E(){x.point=O,d&&d.push(f=[]),y=!0,v=!1,g=_=NaN}function D(){u&&(O(p,m),h&&v&&l.rejoin(),u.push(l.result())),x.point=S,v&&c.lineEnd()}function O(a,o){var s=i(a,o);if(d&&f.push([a,o]),y)p=a,m=o,h=s,y=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&v)c.point(a,o);else{var l=[g=Math.max(ds,Math.min(us,g)),_=Math.max(ds,Math.min(us,_))],u=[a=Math.max(ds,Math.min(us,a)),o=Math.max(ds,Math.min(us,o))];ls(l,u,e,t,n,r)?(v||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),b=!1):s&&(c.lineStart(),c.point(a,o),b=!1)}g=a,_=o,v=s}return x}}function ps(e,t,n){var r=Kt(e,t-io,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function ms(e,t,n){var r=Kt(e,t-io,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function hs(){var e,t,n,r,i,a,o,s,c=10,l=c,u=90,d=360,f,p,m,h,g=2.5;function _(){return{type:`MultiLineString`,coordinates:v()}}function v(){return Kt(go(r/u)*u,n,u).map(m).concat(Kt(go(s/d)*d,o,d).map(h)).concat(Kt(go(t/c)*c,e,c).filter(function(e){return fo(e%u)>io}).map(f)).concat(Kt(go(a/l)*l,i,l).filter(function(e){return fo(e%d)>io}).map(p))}return _.lines=function(){return v().map(function(e){return{type:`LineString`,coordinates:e}})},_.outline=function(){return{type:`Polygon`,coordinates:[m(r).concat(h(o).slice(1),m(n).reverse().slice(1),h(s).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),_.precision(g)):[[r,s],[n,o]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),_.precision(g)):[[t,a],[e,i]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(u=+e[0],d=+e[1],_):[u,d]},_.stepMinor=function(e){return arguments.length?(c=+e[0],l=+e[1],_):[c,l]},_.precision=function(c){return arguments.length?(g=+c,f=ps(a,i,90),p=ms(t,e,g),m=ps(s,o,90),h=ms(r,n,g),_):g},_.extentMajor([[-180,-90+io],[180,90-io]]).extentMinor([[-180,-80-io],[180,80+io]])}var gs=e=>e,_s=new jt,vs=new jt,ys,bs,xs,Ss,Cs={point:To,lineStart:To,lineEnd:To,polygonStart:function(){Cs.lineStart=ws,Cs.lineEnd=Ds},polygonEnd:function(){Cs.lineStart=Cs.lineEnd=Cs.point=To,_s.add(fo(vs)),vs=new jt},result:function(){var e=_s/2;return _s=new jt,e}};function ws(){Cs.point=Ts}function Ts(e,t){Cs.point=Es,ys=xs=e,bs=Ss=t}function Es(e,t){vs.add(Ss*e-xs*t),xs=e,Ss=t}function Ds(){Es(ys,bs)}var Os=1/0,ks=Os,As=-Os,js=As,Ms={point:Ns,lineStart:To,lineEnd:To,polygonStart:To,polygonEnd:To,result:function(){var e=[[Os,ks],[As,js]];return As=js=-(ks=Os=1/0),e}};function Ns(e,t){e<Os&&(Os=e),e>As&&(As=e),t<ks&&(ks=t),t>js&&(js=t)}var Ps=0,Fs=0,Is=0,Ls=0,Rs=0,zs=0,Bs=0,Vs=0,Hs=0,Us,Ws,Gs,Ks,qs={point:Js,lineStart:Ys,lineEnd:Qs,polygonStart:function(){qs.lineStart=$s,qs.lineEnd=ec},polygonEnd:function(){qs.point=Js,qs.lineStart=Ys,qs.lineEnd=Qs},result:function(){var e=Hs?[Bs/Hs,Vs/Hs]:zs?[Ls/zs,Rs/zs]:Is?[Ps/Is,Fs/Is]:[NaN,NaN];return Ps=Fs=Is=Ls=Rs=zs=Bs=Vs=Hs=0,e}};function Js(e,t){Ps+=e,Fs+=t,++Is}function Ys(){qs.point=Xs}function Xs(e,t){qs.point=Zs,Js(Gs=e,Ks=t)}function Zs(e,t){var n=e-Gs,r=t-Ks,i=xo(n*n+r*r);Ls+=i*(Gs+e)/2,Rs+=i*(Ks+t)/2,zs+=i,Js(Gs=e,Ks=t)}function Qs(){qs.point=Js}function $s(){qs.point=tc}function ec(){nc(Us,Ws)}function tc(e,t){qs.point=nc,Js(Us=Gs=e,Ws=Ks=t)}function nc(e,t){var n=e-Gs,r=t-Ks,i=xo(n*n+r*r);Ls+=i*(Gs+e)/2,Rs+=i*(Ks+t)/2,zs+=i,i=Ks*e-Gs*t,Bs+=i*(Gs+e),Vs+=i*(Ks+t),Hs+=i*3,Js(Gs=e,Ks=t)}function rc(e){this._context=e}rc.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,co);break}},result:To};var ic=new jt,ac,oc,sc,cc,lc,uc={point:To,lineStart:function(){uc.point=dc},lineEnd:function(){ac&&fc(oc,sc),uc.point=To},polygonStart:function(){ac=!0},polygonEnd:function(){ac=null},result:function(){var e=+ic;return ic=new jt,e}};function dc(e,t){uc.point=fc,oc=cc=e,sc=lc=t}function fc(e,t){cc-=e,lc-=t,ic.add(xo(cc*cc+lc*lc)),cc=e,lc=t}var pc,mc,hc,gc,_c=class{constructor(e){this._append=e==null?vc:yc(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==hc||this._append!==mc){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,hc=e,mc=this._append,gc=this._,this._=t}this._+=gc;break}}result(){let e=this._;return this._=``,e.length?e:null}};function vc(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yc(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return vc;if(t!==pc){let e=10**t;pc=t,mc=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return mc}function bc(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),jo(e,i(a))),a.result()}return o.area=function(e){return jo(e,i(Cs)),Cs.result()},o.measure=function(e){return jo(e,i(uc)),uc.result()},o.bounds=function(e){return jo(e,i(Ms)),Ms.result()},o.centroid=function(e){return jo(e,i(qs)),qs.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,gs):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new _c(n)):new rc(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new _c(n)),o},o.projection(e).digits(n).context(t)}function xc(e){return function(t){var n=new Sc;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Sc(){}Sc.prototype={constructor:Sc,point:function(e,t){this.stream.point(e,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()}};function Cc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),jo(n,e.stream(Ms)),t(Ms.result()),r!=null&&e.clipExtent(r),e}function wc(e,t,n){return Cc(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function Tc(e,t,n){return wc(e,[[0,0],t],n)}function Ec(e,t,n){return Cc(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function Dc(e,t,n){return Cc(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var Oc=16,kc=ho(30*uo);function Ac(e,t){return+t?Mc(e,t):jc(e)}function jc(e){return xc({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Mc(e,t){function n(r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=l-r,v=u-i,y=_*_+v*v;if(y>4*t&&h--){var b=o+f,x=s+p,S=c+m,C=xo(b*b+x*x+S*S),w=wo(S/=C),T=fo(fo(S)-1)<1e-6||fo(a-d)<1e-6?(a+d)/2:mo(x,b),E=e(T,w),D=E[0],O=E[1],k=D-r,A=O-i,j=v*k-_*A;(j*j/y>t||fo((_*k+v*A)/y-.5)>.3||o*f+s*p+c*m<kc)&&(n(r,i,a,o,s,c,D,O,T,b/=C,x/=C,S,h,g),g.point(D,O),n(D,O,T,b,x,S,l,u,d,f,p,m,h,g))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=No([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],Oc,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,Oc,t),h.lineEnd=y,y()}return h}}var Nc=xc({point:function(e,t){this.stream.point(e*uo,t*uo)}});function Pc(e){return xc({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Fc(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function Ic(e,t,n,r,i,a){if(!a)return Fc(e,t,n,r,i);var o=ho(a),s=yo(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function Lc(e){return Rc(function(){return e})()}function Rc(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,m=null,h=is,g=null,_,v,y,b=gs,x=.5,S,C,w,T,E;function D(e){return w(e[0]*uo,e[1]*uo)}function O(e){return e=w.invert(e[0],e[1]),e&&[e[0]*lo,e[1]*lo]}D.stream=function(e){return T&&E===e?T:T=Nc(Pc(u)(h(S(b(E=e)))))},D.preclip=function(e){return arguments.length?(h=e,m=void 0,A()):h},D.postclip=function(e){return arguments.length?(b=e,g=_=v=y=null,A()):b},D.clipAngle=function(e){return arguments.length?(h=+e?cs(m=e*uo):(m=null,is),A()):m*lo},D.clipExtent=function(e){return arguments.length?(b=e==null?(g=_=v=y=null,gs):fs(g=+e[0][0],_=+e[0][1],v=+e[1][0],y=+e[1][1]),A()):g==null?null:[[g,_],[v,y]]},D.scale=function(e){return arguments.length?(n=+e,k()):n},D.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],k()):[r,i]},D.center=function(e){return arguments.length?(a=e[0]%360*uo,o=e[1]%360*uo,k()):[a*lo,o*lo]},D.rotate=function(e){return arguments.length?(s=e[0]%360*uo,c=e[1]%360*uo,l=e.length>2?e[2]%360*uo:0,k()):[s*lo,c*lo,l*lo]},D.angle=function(e){return arguments.length?(d=e%360*uo,k()):d*lo},D.reflectX=function(e){return arguments.length?(f=e?-1:1,k()):f<0},D.reflectY=function(e){return arguments.length?(p=e?-1:1,k()):p<0},D.precision=function(e){return arguments.length?(S=Ac(C,x=e*e),A()):xo(x)},D.fitExtent=function(e,t){return wc(D,e,t)},D.fitSize=function(e,t){return Tc(D,e,t)},D.fitWidth=function(e,t){return Ec(D,e,t)},D.fitHeight=function(e,t){return Dc(D,e,t)};function k(){var e=Ic(n,0,0,f,p,d).apply(null,t(a,o)),m=Ic(n,r-e[0],i-e[1],f,p,d);return u=Vo(s,c,l),C=zo(t,m),w=zo(u,C),S=Ac(C,x),A()}function A(){return T=E=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&O,k()}}function zc(e){return function(t,n){var r=xo(t*t+n*n),i=e(r),a=yo(i),o=ho(i);return[mo(t*a,r*o),wo(r&&n*a/r)]}}function Bc(e,t){return[e,vo(So((oo+t)/2))]}Bc.invert=function(e,t){return[e,2*po(_o(t))-oo]};function Vc(){return Hc(Bc).scale(961/co)}function Hc(e){var t=Lc(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,c,l;t.scale=function(e){return arguments.length?(r(e),u()):r()},t.translate=function(e){return arguments.length?(i(e),u()):i()},t.center=function(e){return arguments.length?(n(e),u()):n()},t.clipExtent=function(e){return arguments.length?(e==null?o=s=c=l=null:(o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var n=ao*r(),i=t(Go(t.rotate()).invert([0,0]));return a(o==null?[[i[0]-n,i[1]-n],[i[0]+n,i[1]+n]]:e===Bc?[[Math.max(i[0]-n,o),s],[Math.min(i[0]+n,c),l]]:[[o,Math.max(i[1]-n,s)],[c,Math.min(i[1]+n,l)]])}return u()}function Uc(e,t){return[ho(t)*yo(e),yo(t)]}Uc.invert=zc(wo);function Wc(){return Lc(Uc).scale(249.5).clipAngle(90+io)}var Gc=100;function Kc(e,t,n,r){let i=document.createElement(`div`);i.className=`adornment`;let a=e.scale??1,o=a*Gc;i.style.width=`${o*r}px`,i.style.height=`${o*r}px`,i.style.flexGrow=`0`,i.style.flexShrink=`0`;let s={id:e.id,map:t,container:i,moveEndPosition:t.getCenter(),geoJson:void 0,isGlobe:e.isGlobe,boundingBox:e.boundingBox,scale:a,backgroundColor:e.backgroundColor??`#000000`,globeBackgroundColor:e.globeBackgroundColor??`#000000`,borderColor:e.borderColor??`#000000`,primaryFillColor:e.primaryFillColor??`#000000`,primaryStrokeColor:e.primaryStrokeColor??`#000000`,secondaryFillColor:e.secondaryFillColor??`#000000`,secondaryStrokeColor:e.secondaryStrokeColor??`#000000`,graticuleColor:e.graticuleColor??`#000000`,frameColor:e.frameColor??`#000000`,frameOutlineColor:e.frameOutlineColor??`#000000`,dotColor:e.dotColor??`#000000`,dotOutlineColor:e.dotOutlineColor??`#000000`,mapScale:r,globeFallbackActive:!1,globeGeoJsonRequested:!1,globeGeoJson:void 0};return fetch(`/status`,{method:`POST`,body:JSON.stringify({status:`initializing`})}),fetch(`${n}/data/insetmaps/${e.fileName}`).then(e=>e.json()).then(e=>{s.geoJson=na(e,Object.keys(e.objects)[0]),qc(s)}),t.on(`moveend`,()=>{s.moveEndPosition=t.getCenter(),(s.isGlobe||s.globeFallbackActive)&&qc(s)}),t.on(`move`,()=>{if(!s.isGlobe){let[e,r,i,a]=s.boundingBox,o=Xc(t),c=ro(Rn([o,In([[[e,r],[e,a],[i,a],[i,r],[e,r]]])])),l=qi(o),u=(c?qi(c):0)<l*.75;s.globeFallbackActive!==u&&(s.globeFallbackActive=u,s.moveEndPosition=t.getCenter(),qc(s)),s.globeFallbackActive&&!s.globeGeoJsonRequested&&(s.globeGeoJsonRequested=!0,fetch(`${n}/data/insetmaps/world-110m.json`).then(e=>e.json()).then(e=>{s.globeGeoJson=na(e,Object.keys(e.objects)[0]),s.moveEndPosition=t.getCenter(),qc(s)}))}Yc(s)}),i}function qc(e){let{id:t,container:n,scale:r,backgroundColor:i,globeBackgroundColor:a,secondaryFillColor:o,secondaryStrokeColor:s,primaryFillColor:c,primaryStrokeColor:l,graticuleColor:u,borderColor:d,frameColor:f,frameOutlineColor:p,dotColor:m,dotOutlineColor:h}=e,g=e.globeFallbackActive&&e.globeGeoJson!==void 0,_=g?e.globeGeoJson:e.geoJson,v=g||e.isGlobe;if(_===void 0)return;let y=Gc*r,b=y/2,x=.1*r,S=[v?`<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>`:`<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`],{path:C}=Jc(e),w=C({..._,features:_.features.filter(e=>e.properties?.class!==`P1`)});w&&S.push(`
|
|
940
940
|
<path
|
|
941
941
|
d="${w}"
|
|
942
942
|
fill="${o}"
|
|
@@ -999,7 +999,7 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
|
|
|
999
999
|
>
|
|
1000
1000
|
${S.join(``)}
|
|
1001
1001
|
</svg>
|
|
1002
|
-
`,
|
|
1002
|
+
`,Yc(e)}function Jc(e){let{scale:t,boundingBox:n,moveEndPosition:r}=e,i=e.globeFallbackActive&&e.globeGeoJson!==void 0||e.isGlobe,a=Gc*t,o=bc(),s;if(i){let{lng:e,lat:t}=r;s=Wc().scale(a/2).translate([a/2,a/2]).rotate([-e,-t]).clipAngle(90)}else{s=Vc().scale(1).translate([0,0]);let e=s([n[0],n[3]]),t=s([n[2],n[1]]),r=Math.abs(t[0]-e[0]),i=Math.abs(t[1]-e[1]),o=(e[0]+t[0])/2,c=(e[1]+t[1])/2,l=1/Math.max(r/a,i/a);s.scale(l).translate([a/2-l*o,a/2-l*c])}return o.projection(s),{path:o,projection:s}}function Yc(e){let{id:t,map:n,container:r,scale:i}=e,a=r.querySelector(`#frame-${t}`),o=r.querySelector(`#frame-outline-${t}`),s=r.querySelector(`#dot-${t}`);if(!a||!o||!s)return;let c=Xc(n),{path:l,projection:u}=Jc(e),d=1/0,f=-1/0,p=1/0,m=-1/0,h=1/0,g=-1/0;Vn(c,e=>{let t=u(e);d=Math.min(d,e[0]),f=Math.max(f,e[0]),p=Math.min(p,t[0]),m=Math.max(m,t[0]),h=Math.min(h,t[1]),g=Math.max(g,t[1])});let _=10*i;if(m-p<_||g-h<_){a.style.display=`none`,o.style.display=`none`,s.style.display=`block`;let e=n.getCenter(),[t,r]=u([e.lng,e.lat]);s.setAttribute(`cx`,String(t)),s.setAttribute(`cy`,String(r))}else if(f-d<180){a.style.display=`block`,o.style.display=`block`,s.style.display=`none`;let e=l(c);a.setAttribute(`d`,e),o.setAttribute(`d`,e)}else a.style.display=`none`,o.style.display=`none`,s.style.display=`none`}function Xc(e){let t=e.getCanvas().width,n=e.getCanvas().height,r=[];for(let n=0;n<64;n++){let{lng:i,lat:a}=e.unprojectWithScaleCorrection([A(0,t,n/64),0]);r.push([i,a])}for(let i=0;i<64;i++){let{lng:a,lat:o}=e.unprojectWithScaleCorrection([t,A(0,n,i/64)]);r.push([a,o])}for(let i=0;i<64;i++){let{lng:a,lat:o}=e.unprojectWithScaleCorrection([A(t,0,i/64),n]);r.push([a,o])}for(let t=0;t<64;t++){let{lng:i,lat:a}=e.unprojectWithScaleCorrection([0,A(n,0,t/64)]);r.push([i,a])}let{lng:i,lat:a}=e.unprojectWithScaleCorrection([0,0]);return r.push([i,a]),{type:`Feature`,properties:{},geometry:{coordinates:[r],type:`Polygon`}}}var Zc=[10,5,3,2,1];function Qc(e,t=1e-6){let n=Math.floor(e);if(e-=n,e<t)return[n,1];if(1-t<e)return[n+1,1];let r=0,i=1,a=1,o=1;for(;;){let s=r+a,c=i+o;if(c*(e+t)<s)a=s,o=c;else if(s<(e-t)*c)r=s,i=c;else return[n*c+s,c]}}function $c(e){let t=10**Math.floor(Math.log10(e)),n=e/t;for(let e of Zc)if(n>=e)return e*t;return el(n)*t}function el(e){let t=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*t)/t}var tl={kilometer:`km`,meter:`m`,mile:`mi`,foot:`ft`,nauticalMile:`nm`};function nl(e,t,n){let r=document.createElement(`div`);return r.className=`adornment`,r.innerHTML=rl(t,e,n),t.on(`move`,()=>{r.innerHTML=rl(t,e,n)}),r}function rl(e,t,n){let{maxWidth:r=100,fontSize:i=8,font:a=`Arial, sans-serif`,color:o=`#000000`,unit:s=`metric_and_imperial`}=t,c=e.getCenter(),l=e.projectWithScaleCorrection(c),u=S(c,e.unprojectWithScaleCorrection([l.x+r,l.y])),d=Object.fromEntries(Object.entries(tl).map(([e,t])=>{let n=k(`meter`,e,u),r=$c(n)||0;return[e,{value:n,ratio:n?r/n:0,humanized:r<1?`${Qc(r).join(`/`)} ${t}`:`${r} ${t}`}]})),f=d.meter.value>1e3?d.kilometer:d.meter,p=d.foot.value>5280?d.mile:d.foot,m={imperial:p,metric:f,nautical:d.nauticalMile},h=s===`metric_and_imperial`?void 0:m[s],g={metric:Math.round(r*f.ratio),imperial:Math.round(r*p.ratio)},_=s===`metric_and_imperial`?Math.max(g.metric,g.imperial):Math.round(r*(h?.ratio??0)),v=i+7;if(s===`metric_and_imperial`){let e=v+i*2;return`
|
|
1003
1003
|
<svg
|
|
1004
1004
|
class="adornment-svg"
|
|
1005
1005
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1128,14 +1128,14 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
|
|
|
1128
1128
|
${h?.humanized??``}
|
|
1129
1129
|
</text>
|
|
1130
1130
|
</svg>
|
|
1131
|
-
`}function al(e,t,n,r){let i=document.createElement(`div`);i.className=`adornment`;let a=`ArialMT`,o=[e.titleFont??a,e.subtitleFont??a];return Tr(Array.from(new Set(o)),t,n).then(()=>i.innerHTML=ol(e,a,r)),i}function ol(e,t,n){let{title:r,titleColor:i=`#000000`,titleFont:a=t,titleFontSize:o=20,titleJustify:s=`center`,subtitle:c,subtitleColor:l=`#000000`,subtitleFont:u=t,subtitleFontSize:d=12,subtitleJustify:f=`center`,background:p=`#ffffff`,showBackground:m=!1}=e,h=0,g=0,_=0,v=0,y=0,b=r.trim().length>0?Br([r],a,o):null,x=c.trim().length>0?Br([c],u,d):null;if(h=Math.max(b?.width??0,x?.width??0),b){let{ascent:e,descent:t}=b;g=e+t,v=8+e}if(x){let{ascent:e,descent:t}=x;_=e+t,y=b?v+b.descent+e+6:8+e}let S=h+16,C=g+_+16,w=s===`center`?S/2:s===`right`?S-8:8,T=f===`center`?S/2:f===`right`?S-8:8,E=``;if(E+=`<svg class="adornment-svg" xmlns="http://www.w3.org/2000/svg" width="${S*n}" height="${C*n}" viewBox="0 0 ${S} ${C}">`,E+=`<rect x="0" y="0" width="${S}" height="${C}" fill="${p}" rx="6" style="visibility:${m?`visible`:`hidden`}" />`,b||x){let e=s===`center`?`middle`:s===`right`?`end`:`start`,t=f===`center`?`middle`:f===`right`?`end`:`start`;E+=`<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`,b&&(E+=`${wr(r)}`),x&&(E+=`<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`,E+=`${wr(c)}`,E+=`</tspan>`),E+=`</text>`}return E+=`</svg>`,E}var sl=[`top_left`,`top_right`,`bottom_left`,`bottom_right`,`top_center`,`left_center`,`right_center`,`bottom_center`],cl=new Map;function ll(e,t,n,r,i,a,o,s,c){let{adornments:l=[]}=e;ul(n,t,s,c),l.forEach(t=>{t.type===`custom`?fl(te(t,s),t.position,t.stacking):t.type===`scalebar`?fl(rl(t,n,s),t.position,t.stacking):t.type===`northArrow`?fl(ci(t,n,s),t.position,t.stacking):t.type===`webControls`&&t.buttons?fl(Vi(t,n,r),t.position,t.stacking):t.type===`insetMap`?fl(qc(t,n,a,s),t.position,t.stacking):t.type===`heading`?fl(al(t,i,o,s),t.position,t.stacking):t.type===`manualLegend`?fl(si(t,i,o,s),t.position,t.stacking):t.type===`connectedLegend`?fl($r(t,e,n,i,o,s),t.position,t.stacking):t.type===`copyright`&&c===`video`&&fl(Ui(t,n,s),t.position,t.stacking)}),pl(n),n.on(`moveend`,()=>pl(n))}function ul(e,t,n,r){let i=e.getContainer();for(let e of sl){let a=document.createElement(`div`);a.classList.add(`adornment-container`,e),a.style.cssText=dl(e,t[e],n,r);let o=document.createElement(`div`),s=document.createElement(`div`);o.classList.add(`inner`),s.classList.add(`inner`,`vertical`),a.append(o,s),i.appendChild(a),cl.set(e,{horizontal:o,vertical:s})}}function dl(e,t,n,r){let i=v[e],a=``,o=[],s=t.x*n,c=t.y*n,{unit:l}=t;return i.x===`center`?o.push(`translateX(${s}${l})`):a+=`${i.x}: ${s}${l};`,i.y===`center`?o.push(`translateY(${c}${l})`):e===`bottom_right`&&r!==`video`?a+=`${i.y}: max(${c}${l}, 25px);`:a+=`${i.y}: ${c}${l};`,o.length&&(a+=`transform: ${o.join(` `)};`),a}function fl(e,t,n){n||=[`left_center`,`right_center`].includes(t)?`vertical`:`horizontal`;let r=cl.get(t),i=t===`left_center`||t===`right_center`?`vertical`:`horizontal`;r?.[i].hasChildNodes()||(n=i),(r?.[n])?.appendChild(e)}function pl(e){let t=Array.from(document.querySelectorAll(`.adornment, .maplibregl-ctrl-attrib`)),n=[];t.forEach(e=>{let t=e.getBoundingClientRect();t&&n.push([t.x,t.y,t.x+t.width,t.y+t.height])}),e.setLabelFreeAreas(n)}function ml(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>hl(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},paint:{"fill-color":[`get`,`fill-color`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function hl(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:C(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Vr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i},geometry:{type:`Polygon`,coordinates:or(t)}}}function gl(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>_l(t,e,1,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],paint:{"fill-color":[`get`,`fill-color`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},metadata:{"mc-model-type":`circle`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-radius-line`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`get`,`radius-line-enabled`]],paint:{"line-color":[`get`,`radius-line-color`],"line-width":[`get`,`radius-line-width`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function _l(e,t,n,r,i){let a=t.fillPattern===void 0?void 0:i.getMapLibreImageKey(r[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:C(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Vr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":a,"radius-line-enabled":t.radiusLineEnabled??!1,"radius-line-color":e.radiusLineColor||t.radiusLineColor?Vr(t.dataBindings??{},t.radiusLineColor,e.radiusLineColor):`#000000`,"radius-line-width":t.radiusLineWidth??0},geometry:{type:`GeometryCollection`,geometries:[{type:`Polygon`,coordinates:[tr(t.center,t.radius*n)]},{type:`LineString`,coordinates:nr(t.center,t.radius*n,t.radiusLineBearing??0)}]}}}var vl=`Roboto-Regular`;function yl(e,t,n,r,i){let a=[],o=new Set,s=new Set,c=[`match`,[`get`,`text-font`]],l=!!t.clustering;for(let e of t.models)(e.visible??!0)&&a.push(xl(t,e,1,r,i)),o.add(e.textFont),s.add(e.textLineHeight??1.2);if(Array.from(o).length>0){for(let e of Array.from(o))c.push(e,[`literal`,[e,vl]]);c.push([`literal`,[vl]])}e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:a},cluster:l,clusterRadius:t.clusterRadius??50,clusterMaxZoom:t.clusterMaxZoom??14}),s.forEach(r=>{e.addLayer({id:`${t.id}-${r}`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`marker`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!t.collisionDetection,"icon-ignore-placement":!t.collisionDetection,"text-allow-overlap":!t.collisionDetection,"text-ignore-placement":!t.collisionDetection,"icon-image":[`get`,`mc-image-key`],"icon-anchor":[`get`,`icon-anchor`],"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`],"text-field":`{text}`,"text-font":c,"text-max-width":[`get`,`text-max-width`],"text-offset":[`get`,`text-offset`],"text-rotate":[`get`,`text-rotate`],"text-size":[`get`,`text-size`],"text-anchor":[`get`,`text-anchor`],"text-letter-spacing":[`get`,`text-letter-spacing`],"text-line-height":r,"text-justify":[`get`,`text-justify`]},paint:{"icon-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1],"text-color":[`get`,`text-color`],"text-halo-color":[`get`,`text-halo-color`],"text-halo-width":[`get`,`text-halo-width`],"text-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},filter:[`all`,[`==`,[`get`,`text-line-height`],r],[`!`,[`has`,`point_count`]]]},n)}),l&&(e.addLayer({id:`${t.id}-circle-cluster`,type:`circle`,source:t.id,filter:[`has`,`point_count`],paint:{"circle-color":{property:`point_count`,type:`interval`,stops:t.clusterCircleColor??[]},"circle-radius":{property:`point_count`,type:`interval`,stops:t.clusterCircleRadius??[]}}}),e.addLayer({id:`${t.id}-text-cluster`,type:`symbol`,source:t.id,filter:[`has`,`point_count`],paint:{"text-color":{property:`point_count`,type:`interval`,stops:t.clusterTextColor??[]}},layout:{"text-font":[`literal`,[vl]],"text-field":`{point_count_abbreviated}`,"text-size":{property:`point_count`,type:`interval`,stops:t.clusterTextSize??[]}}}),bl(e,t))}function bl(e,t){e.on(`click`,`${t.id}-circle-cluster`,async t=>{let n=e.queryRenderedFeatures(t.point).find(e=>e.properties.cluster);if(!n)return;let r=e.getSource(n.source);if(!r)return;let i=await r.getClusterExpansionZoom(Number(n.id));e.easeTo({center:n.geometry.coordinates,zoom:i})})}function xl(e,t,n,r,i){let a=t.svg===void 0?void 0:i.getMapLibreImageKey(Ur(t.dataBindings??{},r[t.svg],e.svg?r[e.svg]:void 0),window.devicePixelRatio*(t.iconScale??1));return{type:`Feature`,id:C(t.id),properties:{id:t.id,"mc-image-key":a,"icon-anchor":t.iconAnchor??`center`,"icon-rotate":t.iconRotation??0,"icon-offset":t.iconOffset??[0,0],"icon-size":(t.iconScale??1)*n,text:e.text||t.text?Hr(t.dataBindings??{},t.text,e.text):void 0,"text-anchor":t.textAnchor??`center`,"text-font":t.textFont,"text-offset":[(t.textOffset?.[0]??0)/(t.textSize??16),(t.textOffset?.[1]??0)/(t.textSize??16)],"text-rotate":t.textRotation??0,"text-max-width":t.textMaxWidth??10,"text-size":(t.textSize??16)*n,"text-color":e.textColor||t.textColor?Vr(t.dataBindings??{},t.textColor,e.textColor):`#000000`,"text-halo-color":e.textHaloColor||t.textHaloColor?Vr(t.dataBindings??{},t.textHaloColor,e.textHaloColor):`#000000`,"text-halo-width":t.textHaloWidth??0,"text-line-height":t.textLineHeight??1.2,"text-letter-spacing":t.textLetterSpacing??0,"text-justify":t.textJustify??`center`},geometry:{type:`Point`,coordinates:[t.lngLat.lng,t.lngLat.lat]}}}async function Sl(e,t,n,r,i,a){let o=await Promise.all(t.map(e=>`${r}/styles/${e}.json?access_token=${i}`).map(e=>fetch(e).then(e=>e.json())));for(let t=0;t<e.length;t++){let n=e[t],r=o[t];for(let e of r.layers)e.metadata===void 0&&(e.metadata={}),e.metadata[`mc-original-layer-id`]=e.id,e.id=`${n} | ${e.id}`}return await Promise.all(o.map(e=>Cl(e,n,i,a))),o}async function Cl(e,t,n,r){for(let n in e.sources)t.getSource(n)===void 0&&t.addSource(n,e.sources[n]);e.sprite!==void 0&&await Tl(t,e.sprite,n);for(let n of e.layers){t.getLayer(n.id)!==void 0&&t.removeLayer(n.id);let e=n.metadata?.[`mc-add-before`]??`mc-before-none`;t.addLayer(wl(n,r),e)}}function wl(e,t){let n=t??{},r=e.metadata?.[`mc-original-layer-id`],i=r===void 0?{}:n[r]??{},a={...e,layout:{...e.layout,...i.layout},paint:{...e.paint,...i.paint},metadata:{...e.metadata,...i.metadata}};return i.minzoom!==void 0&&(a.minzoom=i.minzoom),i.maxzoom!==void 0&&(a.maxzoom=i.maxzoom),`filter`in i&&a.type!==`background`&&(a.filter=i.filter),a}async function Tl(e,t,n){try{let r=`${t}.json?access_token=${n}`,i=`${t}.png?access_token=${n}`,[a,o]=await Promise.all([fetch(r),fetch(i)]);if(!a.ok||!o.ok)throw Error(`Failed to load sprite from ${t}`);let s=await a.json(),c=await o.blob(),l=await new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=e=>t(e),n.src=URL.createObjectURL(c)}),u=document.createElement(`canvas`),d=u.getContext(`2d`,{willReadFrequently:!0});if(!d)throw Error(`Failed to get canvas context`);for(let[t,n]of Object.entries(s)){if(e.hasImage(t))continue;let{x:r,y:i,width:a,height:o,pixelRatio:s}=n;u.width=a*s,u.height=o*s,d.clearRect(0,0,u.width,u.height),d.drawImage(l,r,i,a,o,0,0,u.width,u.height);let c=d.getImageData(0,0,u.width,u.height);e.addImage(t,c,{pixelRatio:s})}}catch(e){console.error(e)}}var El=`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="currentColor"><path d="m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z"/></svg>
|
|
1132
|
-
`,
|
|
1133
|
-
`,
|
|
1134
|
-
`,
|
|
1135
|
-
`;function
|
|
1131
|
+
`}function il(e,t,n,r){let i=document.createElement(`div`);i.className=`adornment`;let a=`ArialMT`,o=[e.titleFont??a,e.subtitleFont??a];return Tr(Array.from(new Set(o)),t,n).then(()=>i.innerHTML=al(e,a,r)),i}function al(e,t,n){let{title:r,titleColor:i=`#000000`,titleFont:a=t,titleFontSize:o=20,titleJustify:s=`center`,subtitle:c,subtitleColor:l=`#000000`,subtitleFont:u=t,subtitleFontSize:d=12,subtitleJustify:f=`center`,background:p=`#ffffff`,showBackground:m=!1}=e,h=0,g=0,_=0,v=0,y=0,b=r.trim().length>0?Br([r],a,o):null,x=c.trim().length>0?Br([c],u,d):null;if(h=Math.max(b?.width??0,x?.width??0),b){let{ascent:e,descent:t}=b;g=e+t,v=8+e}if(x){let{ascent:e,descent:t}=x;_=e+t,y=b?v+b.descent+e+6:8+e}let S=h+16,C=g+_+16,w=s===`center`?S/2:s===`right`?S-8:8,T=f===`center`?S/2:f===`right`?S-8:8,E=``;if(E+=`<svg class="adornment-svg" xmlns="http://www.w3.org/2000/svg" width="${S*n}" height="${C*n}" viewBox="0 0 ${S} ${C}">`,E+=`<rect x="0" y="0" width="${S}" height="${C}" fill="${p}" rx="6" style="visibility:${m?`visible`:`hidden`}" />`,b||x){let e=s===`center`?`middle`:s===`right`?`end`:`start`,t=f===`center`?`middle`:f===`right`?`end`:`start`;E+=`<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`,b&&(E+=`${wr(r)}`),x&&(E+=`<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`,E+=`${wr(c)}`,E+=`</tspan>`),E+=`</text>`}return E+=`</svg>`,E}var ol=[`top_left`,`top_right`,`bottom_left`,`bottom_right`,`top_center`,`left_center`,`right_center`,`bottom_center`],sl=new Map;function cl(e,t,n,r,i,a,o,s,c){let{adornments:l=[]}=e;ll(n,t,s,c),l.forEach(t=>{t.type===`custom`?dl(te(t,s),t.position,t.stacking):t.type===`scalebar`?dl(nl(t,n,s),t.position,t.stacking):t.type===`northArrow`?dl(ci(t,n,s),t.position,t.stacking):t.type===`webControls`&&t.buttons?dl(Vi(t,n,r),t.position,t.stacking):t.type===`insetMap`?dl(Kc(t,n,a,s),t.position,t.stacking):t.type===`heading`?dl(il(t,i,o,s),t.position,t.stacking):t.type===`manualLegend`?dl(si(t,i,o,s),t.position,t.stacking):t.type===`connectedLegend`?dl($r(t,e,n,i,o,s),t.position,t.stacking):t.type===`copyright`&&c===`video`&&dl(Ui(t,n,s),t.position,t.stacking)}),fl(n),n.on(`moveend`,()=>fl(n))}function ll(e,t,n,r){let i=e.getContainer();for(let e of ol){let a=document.createElement(`div`);a.classList.add(`adornment-container`,e),a.style.cssText=ul(e,t[e],n,r);let o=document.createElement(`div`),s=document.createElement(`div`);o.classList.add(`inner`),s.classList.add(`inner`,`vertical`),a.append(o,s),i.appendChild(a),sl.set(e,{horizontal:o,vertical:s})}}function ul(e,t,n,r){let i=v[e],a=``,o=[],s=t.x*n,c=t.y*n,{unit:l}=t;return i.x===`center`?o.push(`translateX(${s}${l})`):a+=`${i.x}: ${s}${l};`,i.y===`center`?o.push(`translateY(${c}${l})`):e===`bottom_right`&&r!==`video`?a+=`${i.y}: max(${c}${l}, 25px);`:a+=`${i.y}: ${c}${l};`,o.length&&(a+=`transform: ${o.join(` `)};`),a}function dl(e,t,n){n||=[`left_center`,`right_center`].includes(t)?`vertical`:`horizontal`;let r=sl.get(t),i=t===`left_center`||t===`right_center`?`vertical`:`horizontal`;r?.[i].hasChildNodes()||(n=i),(r?.[n])?.appendChild(e)}function fl(e){let t=Array.from(document.querySelectorAll(`.adornment, .maplibregl-ctrl-attrib`)),n=[];t.forEach(e=>{let t=e.getBoundingClientRect();t&&n.push([t.x,t.y,t.x+t.width,t.y+t.height])}),e.setLabelFreeAreas(n)}function pl(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>ml(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},paint:{"fill-color":[`get`,`fill-color`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function ml(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:C(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Vr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i},geometry:{type:`Polygon`,coordinates:or(t)}}}function hl(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>gl(t,e,1,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],paint:{"fill-color":[`get`,`fill-color`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`],"fill-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},metadata:{"mc-model-type":`circle`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-radius-line`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`get`,`radius-line-enabled`]],paint:{"line-color":[`get`,`radius-line-color`],"line-width":[`get`,`radius-line-width`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`],"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function gl(e,t,n,r,i){let a=t.fillPattern===void 0?void 0:i.getMapLibreImageKey(r[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:C(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Vr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":a,"radius-line-enabled":t.radiusLineEnabled??!1,"radius-line-color":e.radiusLineColor||t.radiusLineColor?Vr(t.dataBindings??{},t.radiusLineColor,e.radiusLineColor):`#000000`,"radius-line-width":t.radiusLineWidth??0},geometry:{type:`GeometryCollection`,geometries:[{type:`Polygon`,coordinates:[tr(t.center,t.radius*n)]},{type:`LineString`,coordinates:nr(t.center,t.radius*n,t.radiusLineBearing??0)}]}}}var _l=`Roboto-Regular`;function vl(e,t,n,r,i){let a=[],o=new Set,s=new Set,c=[`match`,[`get`,`text-font`]],l=!!t.clustering;for(let e of t.models)(e.visible??!0)&&a.push(bl(t,e,1,r,i)),o.add(e.textFont),s.add(e.textLineHeight??1.2);if(Array.from(o).length>0){for(let e of Array.from(o))c.push(e,[`literal`,[e,_l]]);c.push([`literal`,[_l]])}e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:a},cluster:l,clusterRadius:t.clusterRadius??50,clusterMaxZoom:t.clusterMaxZoom??14}),s.forEach(r=>{e.addLayer({id:`${t.id}-${r}`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`marker`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!t.collisionDetection,"icon-ignore-placement":!t.collisionDetection,"text-allow-overlap":!t.collisionDetection,"text-ignore-placement":!t.collisionDetection,"icon-image":[`get`,`mc-image-key`],"icon-anchor":[`get`,`icon-anchor`],"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`],"text-field":`{text}`,"text-font":c,"text-max-width":[`get`,`text-max-width`],"text-offset":[`get`,`text-offset`],"text-rotate":[`get`,`text-rotate`],"text-size":[`get`,`text-size`],"text-anchor":[`get`,`text-anchor`],"text-letter-spacing":[`get`,`text-letter-spacing`],"text-line-height":r,"text-justify":[`get`,`text-justify`]},paint:{"icon-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1],"text-color":[`get`,`text-color`],"text-halo-color":[`get`,`text-halo-color`],"text-halo-width":[`get`,`text-halo-width`],"text-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},filter:[`all`,[`==`,[`get`,`text-line-height`],r],[`!`,[`has`,`point_count`]]]},n)}),l&&(e.addLayer({id:`${t.id}-circle-cluster`,type:`circle`,source:t.id,filter:[`has`,`point_count`],paint:{"circle-color":{property:`point_count`,type:`interval`,stops:t.clusterCircleColor??[]},"circle-radius":{property:`point_count`,type:`interval`,stops:t.clusterCircleRadius??[]}}}),e.addLayer({id:`${t.id}-text-cluster`,type:`symbol`,source:t.id,filter:[`has`,`point_count`],paint:{"text-color":{property:`point_count`,type:`interval`,stops:t.clusterTextColor??[]}},layout:{"text-font":[`literal`,[_l]],"text-field":`{point_count_abbreviated}`,"text-size":{property:`point_count`,type:`interval`,stops:t.clusterTextSize??[]}}}),yl(e,t))}function yl(e,t){e.on(`click`,`${t.id}-circle-cluster`,async t=>{let n=e.queryRenderedFeatures(t.point).find(e=>e.properties.cluster);if(!n)return;let r=e.getSource(n.source);if(!r)return;let i=await r.getClusterExpansionZoom(Number(n.id));e.easeTo({center:n.geometry.coordinates,zoom:i})})}function bl(e,t,n,r,i){let a=t.svg===void 0?void 0:i.getMapLibreImageKey(Ur(t.dataBindings??{},r[t.svg],e.svg?r[e.svg]:void 0),window.devicePixelRatio*(t.iconScale??1));return{type:`Feature`,id:C(t.id),properties:{id:t.id,"mc-image-key":a,"icon-anchor":t.iconAnchor??`center`,"icon-rotate":t.iconRotation??0,"icon-offset":t.iconOffset??[0,0],"icon-size":(t.iconScale??1)*n,text:e.text||t.text?Hr(t.dataBindings??{},t.text,e.text):void 0,"text-anchor":t.textAnchor??`center`,"text-font":t.textFont,"text-offset":[(t.textOffset?.[0]??0)/(t.textSize??16),(t.textOffset?.[1]??0)/(t.textSize??16)],"text-rotate":t.textRotation??0,"text-max-width":t.textMaxWidth??10,"text-size":(t.textSize??16)*n,"text-color":e.textColor||t.textColor?Vr(t.dataBindings??{},t.textColor,e.textColor):`#000000`,"text-halo-color":e.textHaloColor||t.textHaloColor?Vr(t.dataBindings??{},t.textHaloColor,e.textHaloColor):`#000000`,"text-halo-width":t.textHaloWidth??0,"text-line-height":t.textLineHeight??1.2,"text-letter-spacing":t.textLetterSpacing??0,"text-justify":t.textJustify??`center`},geometry:{type:`Point`,coordinates:[t.lngLat.lng,t.lngLat.lat]}}}async function xl(e,t,n,r,i,a){let o=await Promise.all(t.map(e=>`${r}/styles/${e}.json?access_token=${i}`).map(e=>fetch(e).then(e=>e.json())));for(let t=0;t<e.length;t++){let n=e[t],r=o[t];for(let e of r.layers)e.metadata===void 0&&(e.metadata={}),e.metadata[`mc-original-layer-id`]=e.id,e.id=`${n} | ${e.id}`}return await Promise.all(o.map(e=>Sl(e,n,i,a))),o}async function Sl(e,t,n,r){for(let n in e.sources)t.getSource(n)===void 0&&t.addSource(n,e.sources[n]);e.sprite!==void 0&&await wl(t,e.sprite,n);for(let n of e.layers){t.getLayer(n.id)!==void 0&&t.removeLayer(n.id);let e=n.metadata?.[`mc-add-before`]??`mc-before-none`;t.addLayer(Cl(n,r),e)}}function Cl(e,t){let n=t??{},r=e.metadata?.[`mc-original-layer-id`],i=r===void 0?{}:n[r]??{},a={...e,layout:{...e.layout,...i.layout},paint:{...e.paint,...i.paint},metadata:{...e.metadata,...i.metadata}};return i.minzoom!==void 0&&(a.minzoom=i.minzoom),i.maxzoom!==void 0&&(a.maxzoom=i.maxzoom),`filter`in i&&a.type!==`background`&&(a.filter=i.filter),a}async function wl(e,t,n){try{let r=`${t}.json?access_token=${n}`,i=`${t}.png?access_token=${n}`,[a,o]=await Promise.all([fetch(r),fetch(i)]);if(!a.ok||!o.ok)throw Error(`Failed to load sprite from ${t}`);let s=await a.json(),c=await o.blob(),l=await new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=e=>t(e),n.src=URL.createObjectURL(c)}),u=document.createElement(`canvas`),d=u.getContext(`2d`,{willReadFrequently:!0});if(!d)throw Error(`Failed to get canvas context`);for(let[t,n]of Object.entries(s)){if(e.hasImage(t))continue;let{x:r,y:i,width:a,height:o,pixelRatio:s}=n;u.width=a*s,u.height=o*s,d.clearRect(0,0,u.width,u.height),d.drawImage(l,r,i,a,o,0,0,u.width,u.height);let c=d.getImageData(0,0,u.width,u.height);e.addImage(t,c,{pixelRatio:s})}}catch(e){console.error(e)}}var Tl=`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="currentColor"><path d="m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z"/></svg>
|
|
1132
|
+
`,El=`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="11" viewBox="0 0 10 11" fill="currentColor"><path d="M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71"/></svg>
|
|
1133
|
+
`,Dl=`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="currentColor"><path d="m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z"/></svg>
|
|
1134
|
+
`,Ol=`<svg width="20" height="20" viewBox="0 0 40 40" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 4.167 1.667 35.834h36.667z" stroke-width="2" stroke-linejoin="round"/><path d="M20 29.167v.834m0-14.167.007 8.333" stroke-width="2" stroke-linecap="round"/></svg>
|
|
1135
|
+
`;function kl(e,t){let{allowFullscreen:n,loop:r}=e,i=w(e.src,t),a,o=i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];a=o?`https://www.youtube.com/embed/${o}`:i;let s=[];if(n||s.push(`fs=0`),r&&o&&s.push(`loop=1&playlist=${o}`),a=jl(a),a=Al(a),s.length){let e=a.includes(`?`)?`&`:`?`;a+=`${e}${s.join(`&`)}`}return a}function Al(e){return e.replace(/([?&])si=[^&]+(&)?/,(e,t,n)=>t===`?`&&!n?``:t===`?`&&n?`?`:n?`&`:``)}function jl(e){let t=new URL(e),n=t.searchParams.get(`t`);if(!n)return e;let r=0,i=/^((\d+)m)?((\d+)s)?$/;if(/^\d+$/.test(n))r=parseInt(n,10);else{let e=n.match(i);if(e){let t=parseInt(e[2]||`0`,10),n=parseInt(e[4]||`0`,10);r=t*60+n}}return r>0&&(t.searchParams.delete(`t`),t.searchParams.set(`start`,String(r))),t.toString()}function Ml(e,t,n,r){let i;if(t?.type===`video`)i=r===`preview`?Ll(t.src,n):`
|
|
1136
1136
|
<div class="youtube-container">
|
|
1137
1137
|
<iframe
|
|
1138
|
-
src="${
|
|
1138
|
+
src="${kl(t,n)}"
|
|
1139
1139
|
width="100%" height="300" style="border: none" allowfullscreen>
|
|
1140
1140
|
</iframe>
|
|
1141
1141
|
</div>
|
|
@@ -1143,36 +1143,36 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
|
|
|
1143
1143
|
<div class="image-container ${t.fill?`fill`:``}">
|
|
1144
1144
|
<img src="${e}" alt="${r}" />
|
|
1145
1145
|
</div>
|
|
1146
|
-
`}i=i?`<div class="media-content">${i}</div>`:``;let a=e?`<div class="text-content">${
|
|
1146
|
+
`}i=i?`<div class="media-content">${i}</div>`:``;let a=e?`<div class="text-content">${Fl(e,n)}</div>`:``;return`
|
|
1147
1147
|
<div class="popup-scroll-wrapper">
|
|
1148
1148
|
<div class="mc-popup">
|
|
1149
1149
|
${i}
|
|
1150
1150
|
${a}
|
|
1151
1151
|
</div>
|
|
1152
1152
|
</div>
|
|
1153
|
-
`}var
|
|
1153
|
+
`}var Nl=`
|
|
1154
1154
|
<button class="mc-popup-button close">
|
|
1155
|
-
${
|
|
1155
|
+
${El}
|
|
1156
1156
|
</button>
|
|
1157
|
-
`,
|
|
1157
|
+
`,Pl=`
|
|
1158
1158
|
<div class="cycle-buttons">
|
|
1159
1159
|
<button class="mc-popup-button prev">
|
|
1160
|
-
${
|
|
1160
|
+
${Tl}
|
|
1161
1161
|
</button>
|
|
1162
1162
|
<button class="mc-popup-button next">
|
|
1163
|
-
${
|
|
1163
|
+
${Dl}
|
|
1164
1164
|
</button>
|
|
1165
1165
|
</div>
|
|
1166
|
-
`;function
|
|
1166
|
+
`;function Fl(e,t){return e?(e=e.replace(/placeholder="[^"]+"/,``),e=e.replace(/onerror="[^"]+"/,``),e=e.replace(/youtube\.com\/embed\/\$([^"'<>\\]+)/gi,(e,n)=>{let r=T(t[n]);return r?`youtube.com/embed/${D(r)}?`:``}),e=e.replace(/(\S+?)\s*=\s*"\$([^"]+?)"/g,(e,n,r)=>{let i=T(t[r]);return[`src`,`href`].includes(n)&&!i?``:[`src`,`href`].includes(n)?/^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i)?` ${n}="${i}"`:` ${n}="${Il(i)}"`:` ${n}="${i}"`}),e=e.replace(/>\$(.+?)</gi,(e,n)=>`>${T(t[n])}<`),e=e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim,(e,t)=>t),e):``}function Il(e){return/^https?:\/\//i.test(e)?e:`https://${e}`}function Ll(e,t){return`
|
|
1167
1167
|
<div class="youtube-placeholder">
|
|
1168
1168
|
<img src="${`https://img.youtube.com/vi/${D(w(e,t))}/hqdefault.jpg`}" />
|
|
1169
1169
|
<div class="popup-alert">
|
|
1170
|
-
<div class="alert-icon">${
|
|
1170
|
+
<div class="alert-icon">${Ol}</div>
|
|
1171
1171
|
<div>${Ri(`videoAlert`)}</div>
|
|
1172
1172
|
</div>
|
|
1173
1173
|
</div>
|
|
1174
|
-
`}var
|
|
1174
|
+
`}var Rl=[`area`,`circle`,`dot`,`line`,`marker`,`polygon`],zl=class{data;customGroupIds;constructor(e){this.data={area:{},circle:{},dot:{},line:{},marker:{},polygon:{}};for(let t of Rl)for(let n of e.registry?.models?.[t]??[]){this.data[t][n.id]={};for(let e of n.models){if(t===`area`){let t=e;t.featureId===void 0&&(t.featureId=Number(t.id),t.id=`${t.vectorUrl}-${t.id}`)}this.data[t][n.id][e.id]=e}}let{beforeWaters:t=[],beforeBoundaries:n=[],beforeNames:r=[],beforeNone:i=[]}=e.registry?.slots??{};this.customGroupIds=[...t,...n,...r,...i].map(e=>e.groupId)}getModel(e){let t=String(e.properties?.id),n=e.layer.metadata,r=n?.[`mc-group-id`],i=n?.[`mc-model-type`],a=n?.[`mc-model-id-prefix`];if(a&&(t=`${a}-${t}`),!(r===void 0||t===void 0||i===void 0))return this.data[i]?.[r]?.[t]}getPopupElements(){let e=[],t=[`circle`,`dot`,`line`,`marker`,`polygon`];for(let n of this.customGroupIds)for(let r of t){let t=this.data[r]?.[n];if(t)for(let[r,i]of Object.entries(t))(i.popup||i.popupMedia)&&e.push({groupId:n,modelId:r,popup:i.popup,popupMedia:i.popupMedia,lngLat:i.lngLat,center:i.center,radius:i.radius,anchorPoints:i.anchorPoints,dataBindings:i.dataBindings})}return e.reverse()}},Bl=class{map;popupElements;markerLayerIds;resizeObserver;constructor(e,t){this.map=e,this.popupElements=t,this.markerLayerIds=this.map.getStyle().layers.filter(e=>e.id.startsWith(`custom-marker`)).filter(e=>!e.id.endsWith(`-cluster`)).map(e=>e.id)}highlight(e){if(this.deselect(),!e)return;let{groupId:t,modelId:n}=e,r=this.popupElements.filter(e=>e.groupId===t);r.length>1&&t.startsWith(`custom-marker`)&&this.highlightGroupedMarker(t,n,r),t.startsWith(`custom-marker`)&&this.fadeOtherMarkers(t),this.repositionMap(e)}deselect(){this.markerLayerIds.forEach(e=>{this.map.setPaintProperty(e,`icon-opacity`,1),this.map.setPaintProperty(e,`text-opacity`,1)}),this.resizeObserver?.disconnect()}highlightGroupedMarker(e,t,n){let r=this.markerLayerIds.find(t=>t.startsWith(e));r&&(this.map.setPaintProperty(r,`icon-opacity`,[`case`,[`boolean`,[`feature-state`,`highlighted`],!1],1,.3]),this.map.setPaintProperty(r,`text-opacity`,[`case`,[`boolean`,[`feature-state`,`highlighted`],!1],1,.3]),n.forEach(n=>{this.map.setFeatureState({source:e,id:C(n.modelId)},{highlighted:n.modelId===t})}))}fadeOtherMarkers(e){this.markerLayerIds.filter(t=>!t.startsWith(e)).forEach(e=>{this.map.setPaintProperty(e,`icon-opacity`,.3),this.map.setPaintProperty(e,`text-opacity`,.3)})}repositionMap(e){let t,n=20;e.lngLat===void 0?e.anchorPoints===void 0?e.center!==void 0&&e.radius!==void 0&&(t=this.getElementBounds(tr(e.center,e.radius))):t=this.getElementBounds(this.flattenCoordinates(e.anchorPoints)):(t=new u.LngLatBounds(e.lngLat,e.lngLat),n=40);let r=document.querySelector(`.popup-container`);if(!r||!t)return;this.resizeObserver?.disconnect();let i=0;this.resizeObserver=new ResizeObserver(e=>{let r=e[0].contentRect.height;r>i&&(i=r,this.panToElement(t,n))}),this.resizeObserver.observe(r)}getElementBounds(e){let t=new u.LngLatBounds(e[0],e[0]);for(let n of e)t.extend(n);return t}flattenCoordinates(e){return Array.isArray(e[0][0])?e.flat():e}panToElement(e,t){let n=this.map;if(n.getProjection()?.type===`globe`&&[e.getSouthWest(),e.getNorthEast(),e.getNorthWest(),e.getSouthEast()].some(e=>!this.visibleOnGlobe(e.lng,e.lat))){n.easeTo({center:e.getCenter(),duration:500});return}let r=n.projectWithScaleCorrection(e.getSouthWest()),i=n.projectWithScaleCorrection(e.getNorthEast()),a=n.getContainer().clientWidth,o=n.getContainer().clientHeight,s=a>600,c=document.querySelector(`.popup-container`)?.getBoundingClientRect(),l=c?.width??0,u=c?.height??0;s||(u=Math.min(u,o/2));let d=o-r.y>u+t,f=r.x>t+(s&&!d?l:0),p=i.x<a-t,m=i.y>t,h=s?r.y<o-t:d;if(!(f&&p&&m&&h))if(i.x-r.x+2*t<a&&r.y-i.y+2*t<o){let t=e.getCenter();n.easeTo({center:t,duration:500,offset:s?[0,0]:[0,-30]})}else n.fitBounds(e,{padding:t,maxZoom:n.getZoom(),duration:500,linear:!0})}visibleOnGlobe(e,t){let{lng:n,lat:r}=this.map.getCenter(),i=this.map.getPitch()*Math.PI/180,a=this.map.getBearing()*Math.PI/180,o=this.lngLatToUnitVector(n,r),s=this.lngLatToUnitVector(e,t),c=this.normalize(this.cross([0,0,1],o)),l=this.rotateAroundZ(c,a),u=this.rotateVectorAroundAxis(o,l,i);return u[0]*s[0]+u[1]*s[1]+u[2]*s[2]>.3}lngLatToUnitVector(e,t){let n=t*Math.PI/180,r=e*Math.PI/180;return[Math.cos(n)*Math.cos(r),Math.cos(n)*Math.sin(r),Math.sin(n)]}rotateVectorAroundAxis(e,t,n){let[r,i,a]=e,[o,s,c]=t,l=Math.cos(n),u=Math.sin(n),d=r*o+i*s+a*c;return[r*l+(s*a-c*i)*u+o*d*(1-l),i*l+(c*r-o*a)*u+s*d*(1-l),a*l+(o*i-s*r)*u+c*d*(1-l)]}rotateAroundZ(e,t){let[n,r,i]=e,a=Math.cos(t),o=Math.sin(t);return[n*a-r*o,n*o+r*a,i]}cross(e,t){let[n,r,i]=e,[a,o,s]=t;return[r*s-i*o,i*a-n*s,n*o-r*a]}normalize(e){let[t,n,r]=e,i=Math.hypot(t,n,r);return[t/i,n/i,r/i]}},Vl=class{map;popupPosition=`bottomLeft`;mapContainer;popupContainer;feature;currentFeatureId;currentModelId;popupElements=[];language=`en`;promoteIdCache=new Map;publication;floatingPopup;registry;highlightManager;mode;restrictMapMovement;center;constructor(e,t){this.map=e,this.mode=t,this.mapContainer=this.map.getContainer(),this.popupContainer=document.createElement(`div`),this.popupContainer.classList.add(`popup-container`),this.map.on(`mousemove`,e=>this.onMouseMove(e)),this.map.on(`click`,e=>this.onClick(e))}setJobObject(e){this.registry=new zl(e)}setParams(e,t,n,r){this.popupPosition=e,this.language=t,this.restrictMapMovement=n,this.center=r}setPublication(e){this.publication=e}setpopupElements(){this.popupElements=this.registry.getPopupElements()}setHighlightManager(){this.highlightManager=new Bl(this.map,this.registry.getPopupElements())}onMouseMove(e){this.feature=this.getInteractiveFeature(e),this.feature?this.map.getCanvas().style.cursor=`pointer`:this.map.getCanvas().style.cursor=``}onClick(e){this.feature=this.getInteractiveFeature(e),this.currentModelId=this.feature?.properties?.id,this.feature&&(!this.mapContainer.contains(this.popupContainer)||this.feature?.id!==this.currentFeatureId)?(this.addPopup(e),this.highlightManager?.highlight(this.getPopupElementFromFeature(this.feature))):(this.hidePopup(),this.highlightManager?.highlight(void 0))}getPopupElementFromFeature(e){return this.popupElements.find(t=>t.modelId===e.properties.id)}getInteractiveFeature(e){return this.map.queryRenderedFeatures(e.point).find(e=>{if(Object.keys(e.layer.metadata??{}).some(e=>e.startsWith(`mc-interactivity-template`)))return!0;let t=this.registry.getModel(e);return!!(t?.popup??t?.popupMedia)})}addPopup(e){if(!this.feature)return;this.floatingPopup?.remove();let t=Number(this.feature.id);this.currentFeatureId=isNaN(t)?this.feature.id:t;let n=this.getTemplate(this.feature);if(n){if(this.popupPosition===`mapElement`){if(this.feature.geometry.type===`Point`)this.addFloatingPopup(n,this.feature.geometry.coordinates);else{let{lng:t,lat:r}=this.map.unprojectWithScaleCorrection(e.point);this.addFloatingPopup(n,[t,r])}return}this.popupContainer.innerHTML=n,this.popupElements.find(e=>e.modelId===this.currentModelId)&&this.addPopupControls(),this.mapContainer.appendChild(this.popupContainer)}}addFloatingPopup(e,t){let n=this.restrictMapMovement?this.getAnchor(t):void 0;this.floatingPopup=new u.Popup({maxWidth:`none`,closeButton:!1,offset:20,...n!==void 0&&{anchor:n}}).setLngLat(t).setHTML(e).addTo(this.map)}getAnchor(e){let t=this.map.projectWithScaleCorrection(e),n=this.map.getContainer().clientWidth,r=this.map.getContainer().clientHeight,i,a;return i=t.y<r*.33?`top`:t.y>r*.66?`bottom`:`center`,a=t.x<n*.33?`left`:t.x>n*.66?`right`:`center`,i===`center`&&a===`center`?`bottom`:i===`center`?a:a===`center`?i:`${i}-${a}`}hidePopup(){this.popupContainer&&(this.popupContainer.remove(),this.feature=void 0,this.currentFeatureId=void 0),this.restrictMapMovement&&this.center&&this.map.easeTo({center:this.center})}getTemplate(e){let{layer:t}=e,n,r=this.registry.getModel(e);if(r?.popup||r?.popupMedia)n=Ml(r.popup,r.popupMedia,r.dataBindings??{},this.mode);else{let r=[];this.publication&&(r.push(`:${this.publication}-${this.language}`),r.push(`:${this.publication}-:en`)),r.push(`:${this.language}`),r.push(`:en`),r.push(``);for(let i of r){let r=t.metadata?.[`mc-interactivity-template${i}`];if(r){n=this.fillDatalayerTemplate(e,r,i);break}}n&&=`
|
|
1175
1175
|
<div class="popup-scroll-wrapper">
|
|
1176
1176
|
<div class="mc-popup data-layer text-content">${n}</div>
|
|
1177
1177
|
</div>
|
|
1178
|
-
`}return n}htmlToElement(e){let t=document.createElement(`template`);return t.innerHTML=e.trim(),t.content.firstElementChild}addPopupControls(){let e=this.htmlToElement(Pl);if(e&&(e.addEventListener(`click`,()=>{this.hidePopup(),this.highlightManager.highlight(void 0)}),this.popupContainer.appendChild(e)),this.popupElements.length<2)return;let t=this.htmlToElement(Fl);t&&(t.querySelector(`.prev`)?.addEventListener(`click`,()=>this.cyclePopups(!1)),t.querySelector(`.next`)?.addEventListener(`click`,()=>this.cyclePopups()),this.popupContainer.appendChild(t))}fillDatalayerTemplate(e,t,n){let r=`data-mention-id`,i=new DOMParser().parseFromString(t,`text/html`).body;for(let t of i.querySelectorAll(`[${r}]`)){let i=this.getProperty(e,t.getAttribute(r),n);i!==void 0&&(t.innerText=i)}return i.innerHTML}getProperty(e,t,n){if(!t)return;let r=t.endsWith(`:en`)?[t.replace(`:en`,n),t]:[t];for(let t of r){let n=e.properties[t]??this.getVectorProperty(e,t);if(n!==void 0)return n}}getVectorProperty(e,t){let n=this.promoteIdCache.get(e.source);n===void 0&&(n=this.map.getSource(e.source)?.serialize().promoteId||`id`,this.promoteIdCache.set(e.source,n));try{let r=e.properties[n];return e.layer.metadata.properties[t][r]}catch{return}}cyclePopups(e=!0){let t=this.popupElements?.findIndex(e=>e.modelId===this.currentModelId);if(t!==-1){let n=0;n=e?t===this.popupElements.length-1?0:t+1:t===0?this.popupElements.length-1:t-1;let r=this.popupElements?.[n];this.highlightManager.highlight(r);let i=Nl(r.popup,r.popupMedia,r.dataBindings??{},this.mode),a=this.popupContainer;this.popupContainer.remove(),a.innerHTML=i,this.mapContainer.appendChild(a),this.currentModelId=r.modelId,this.addPopupControls(),e?this.popupContainer.querySelector(`.mc-popup-button.next`)?.focus():this.popupContainer.querySelector(`.mc-popup-button.prev`)?.focus(),this.currentFeatureId=void 0}}},Ul=class e{static#e(e){let t=0,n=[t];for(let r=1;r<e.length;++r){let i=e[r-1],a=e[r],o=a.x-i.x,s=a.y-i.y;t+=Math.sqrt(o*o+s*s),n.push(t)}return n}static#t(e,t){return e.x===t.x&&e.y===t.y}#n;#r;#i;#a;constructor(t){this.#n=t.filter((e,n)=>n===0||t[n][0]!==t[n-1][0]||t[n][1]!==t[n-1][1]),this.#r=this.#n.map(e=>u.MercatorCoordinate.fromLngLat(e)),this.#i=e.#e(this.#r),this.#a=this.#i[this.#i.length-1]}sample(e){let t=this.#r,n=this.#i;if(t.length<2)return t[0];e*=this.#a;for(let r=1;r<t.length;++r){let i=t[r-1],a=t[r],o=n[r-1],s=n[r];if(s>=e){let t=(e-o)/(s-o);return new u.MercatorCoordinate(A(i.x,a.x,t),A(i.y,a.y,t))}}return new u.MercatorCoordinate(t[t.length-1].x,t[t.length-1].y)}slice(t,n){if(this.#n.length<2)return this.#n;let r=this.#r.filter((e,r)=>this.#i[r]>=t*this.#a&&this.#i[r]<=n*this.#a);if(t>0){let n=this.sample(t);e.#t(n,r[0])||r.unshift(n)}if(n<1){let t=this.sample(n);e.#t(t,r[r.length-1])||r.push(t)}return r.map(e=>{let{lng:t,lat:n}=e.toLngLat();return[t,n]})}get length(){return this.#a}},Wl={solid:[1,0],dotted:[.7,.3],dashed:[3.5,1.5]};function Gl(e,t,n,r){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(n=>Kl(e,t,n,1,r))}}),Object.entries(Wl).forEach(([r,i])=>{t.models.some(e=>(e.lineStyle??`solid`)===r)&&e.addLayer({id:`${t.id}-${r}`,type:`line`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`==`,[`get`,`line-style`],r]],paint:{"line-width":[`get`,`line-width`],"line-color":[`get`,`line-color`],"line-dasharray":i,"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}),e.addLayer({id:`${t.id}-clickable`,type:`line`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},paint:{"line-width":[`max`,[`get`,`line-width`],15],"line-opacity":0},filter:[`==`,[`geometry-type`],`LineString`]},n),t.models.some(e=>e.svg)&&e.addLayer({id:`${t.id}-icon`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":[`get`,`mc-image-key`],"icon-anchor":`center`,"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`]},paint:{"icon-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},filter:[`==`,[`geometry-type`],`Point`]},n)}function Kl(e,t,n,r,i){let a=new Ul(n.geometry).slice(0,r),o=n.svg===void 0?void 0:i.getMapLibreImageKey(Ur(n.dataBindings??{},n.svg,void 0),window.devicePixelRatio*(n.iconScale??1));return{type:`Feature`,id:C(n.id),properties:{id:n.id,"line-width":n.lineWidth??3,"line-color":t.lineColor||n.lineColor?Vr(n.dataBindings??{},n.lineColor,t.lineColor):`#000000`,"line-style":n.lineStyle??`solid`,"mc-image-key":o,"icon-rotate":ql(n,a,e),"icon-offset":n.iconOffset,"icon-size":n.iconScale},geometry:{type:`GeometryCollection`,geometries:[{type:`LineString`,coordinates:a},{type:`Point`,coordinates:a[a.length-1]}]}}}function ql(e,t,n){return e.iconRotation?e.iconAlign?ur(t,n)+e.iconRotation:e.iconRotation:0}function Jl(e,t,n,r,i,a,o){let s=_r(t),c=new Map,l=new Map;for(let e of t.models){let n=e.featureId,a=t.id,o=[],u=cr(e),d=sr(a,e),f=l.get(d)??{model:e,featureIds:o,modelIdToFillColor:{},modelIdToFillPattern:{},modelIdToOutlineColor:{},modelIdToOutlineWidth:{}};if(e.visible??!0){f.featureIds.push(n);let a=e.fillPattern===void 0?null:i.getMapLibreImageKey(r[e.fillPattern],2*window.devicePixelRatio);f.modelIdToFillColor[n]=t.fillColor||e.fillColor?Vr(e.dataBindings??{},e.fillColor,t.fillColor,s,t.choropleth?.unmatchedColor):`#000000`,f.modelIdToFillPattern[n]=a,f.modelIdToOutlineColor[n]=t.outlineColor||e.outlineColor?Vr(e.dataBindings??{},e.outlineColor,t.outlineColor):`#000000`,f.modelIdToOutlineWidth[n]=e.outlineWidth??.5}c.set(u,e),l.set(d,f)}for(let t of c.keys())e.getSource(t)||e.addSource(t,{type:`vector`,url:`${a}${c.get(t).vectorUrl}?access_token=${o}`});for(let r of l.keys()){let{model:i}=l.get(r),{sourceLayerId:a}=i,o=cr(i);e.addLayer({id:r,type:`fill`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"fill-color":`#ffffff`,"fill-outline-color":`#000000`,"fill-antialias":!1}},n),e.addLayer({id:`${r}-pattern`,type:`fill`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"fill-pattern":[`get`,`fill-pattern`]},layout:{visibility:`visible`}},n),e.addLayer({id:`${r}-outline`,type:`line`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"line-color":`#000000`,"line-width":.5}},n)}l.forEach((t,n)=>{let{featureIds:r,modelIdToFillColor:i,modelIdToFillPattern:a,modelIdToOutlineColor:o,modelIdToOutlineWidth:s}=t;e.setFilter(n,[`in`,`id`,...r]),e.setFilter(`${n}-outline`,[`in`,`id`,...r]),e.setPaintProperty(n,`fill-color`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,i]]),e.setPaintProperty(`${n}-outline`,`line-color`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,o]]),e.setPaintProperty(`${n}-outline`,`line-width`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,s]]),e.setFilter(`${n}-pattern`,[`to-boolean`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,a]]]),e.setPaintProperty(`${n}-pattern`,`fill-pattern`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,a]])})}function Yl(e,t,n){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>Xl(t,e))}}),e.addLayer({id:t.id,type:`circle`,source:t.id,metadata:{"mc-model-type":`dot`,"mc-group-id":t.id},paint:{"circle-color":[`get`,`circle-color`],"circle-radius":[`get`,`circle-radius`],"circle-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function Xl(e,t){return{type:`Feature`,id:t.id,properties:{id:t.id,"circle-radius":t.radius,"circle-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`},geometry:{type:`Point`,coordinates:[t.center.lng,t.center.lat]}}}function Zl(e,t,n,r){return t+n/r*e}function Ql(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function $l(e,t,n,r){let i=1.70158,a=0,o=n;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,o<Math.abs(n)?(o=n,i=a/4):i=a/(2*Math.PI)*Math.asin(n/o),o*2**(-10*e)*Math.sin((e*r-i)*(2*Math.PI)/a)+n+t)}function eu(e,t,n,r,i){return i===void 0&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t}function tu(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}var nu={linear:Zl,easeOutCubic:Ql,easeOutBack:eu,easeOutBounce:tu,easeOutElastic:$l};function ru(e){return e.entryType===`fade`||e.exitType===`fade`||e.entryType===`instant`||e.exitType===`instant`}function iu(e){return e.entryType===`grow`||e.exitType===`grow`}function au(e,t,n){let{entry:r,entryDuration:i,exit:a,exitDuration:o}=e,{entryType:s,entryEasing:c,exitType:l,exitEasing:u}=e;return n<r&&(s===t||s===`instant`&&t===`fade`)||n>a&&(l===t||l===`instant`&&t===`fade`)?0:i>0&&n<r+i&&s===t?nu[c](n-r,0,1,i):o>0&&n>a-o&&l===t?nu[u](n-(a-o),1,-1,o):1}function ou(e){let t=e.length>0?[su(e[0])]:[],n=0,r=0;for(let i=1;i<e.length;++i){let a=su(e[i]);n+=cu(e[i-1].center[0],a.center[0]),r+=cu(e[i-1].bearing,a.bearing),a.center[0]+=n*360,a.x+=n,a.bearing+=r*360,t.push(a)}return t}function su(e){return{...e,center:[e.center[0],e.center[1]]}}function cu(e,t){if(Math.abs(e)+Math.abs(t)>180){if(e>0&&t<0)return 1;if(e<0&&t>0)return-1}return 0}function lu(e){return 2**-e}function uu(e){return e.length>0?e[e.length-1].time:0}function du(e){return P(e,23.976)?24e3/1001:P(e,29.97)?3e4/1001:P(e,59.94)?6e4/1001:e}function fu(e){return e<0?-1:1}function pu(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(fu(a)+fu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function mu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hu(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function gu(e){this._context=e}gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hu(this,this._t0,mu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hu(this,mu(this,n=pu(this,e,t)),n);break;default:hu(this,this._t0,n=pu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function _u(e){this._context=new vu(e)}(_u.prototype=Object.create(gu.prototype)).point=function(e,t){gu.prototype.point.call(this,t,e)};function vu(e){this._context=e}vu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function yu(e){return new gu(e)}function bu(e){return e}var{cbrt:xu,sqrt:Su,PI:Cu}=Math,wu=(e,t,n,r,i)=>{let a=t+n*e,o=a**2+r;if(o>0){let e=Su(o);return xu(a+e)+xu(a-e)-i}let s=xu(Su(a*a-o)),c=a?Math.atan(Su(-o)/a):-Cu/2,l;return l=n<0?(a>0?2*Cu:Cu)-c:i<0?(a>0?2*Cu:-3*Cu)+c:(a>0?0:Cu)+c,2*s*Math.cos(l/3)-i},Tu=(e,t,n,r)=>((t*e+3*n)*e+r)*e;function Eu(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw Error(`bezier x values must be in [0, 1] range`);if(e===t&&n===r)return bu;let i=6*(3*e-3*n+1),a=6*(n-2*e),o=3*e,s=i*i,c=a*a,l=a/i,u=3*a*o/s-c*a/(s*i),d=2*o/i-c/s,f=d*d*d,p=3/i,m=3*t-3*r+1,h=r-2*t,g=3*t,_=i?wu:bu;return function(e){return e===0||e===1?e:Tu(_(e,u,p,f,l),m,h,g)}}var Du=l(s(((e,t)=>{t.exports=n;function n(e,t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g,_;for(typeof t!=`function`&&(r=n,n=t,t=null),r||={},s=r.tolerance===void 0?1e-7:r.tolerance,_=r.epsilon===void 0?2220446049250313e-31:r.epsilon,c=r.maxIterations===void 0?20:r.maxIterations,m=r.h===void 0?1e-4:r.h,g=r.verbose===void 0?!1:r.verbose,h=1/m,l=0;l++<c;){if(a=e(n),t?o=t(n):(u=e(n+m),d=e(n-m),f=e(n+2*m),p=e(n-2*m),o=(p-f+8*(u-d))*h/12),Math.abs(o)<=_*Math.abs(a))return g&&console.log(`Newton-Raphson: failed to converged due to nearly zero first derivative`),!1;if(i=n-a/o,Math.abs(i-n)<=s*Math.abs(i))return g&&console.log(`Newton-Raphson: converged to x = `+i+` after `+l+` iterations`),i;n=i}return g&&console.log(`Newton-Raphson: Maximum iterations reached (`+c+`)`),!1}}))(),1),Ou=class{segments;constructor(e){this.segments=[];let t=new ku,n=yu(t);n.lineStart();for(let t of e)n.point(t.x,t.y);n.lineEnd(),this.segments=t.segments}sample(e){if(e<=0)return this.segments[0].startY;if(e>=this.segments[this.segments.length-1].endX)return this.segments[this.segments.length-1].endY;let t=this.segments.find(t=>e>=t.startX&&e<t.endX),n=j(t.startX,t.endX,e);return t.startY!==t.endY&&t.easing!==void 0?A(t.startY,t.endY,t.easing(n)):A(t.startY,t.endY,n)}solve(e,t){let n=(0,Du.default)(t=>this.sample(t)-e,t);return n===!1?t:n}},ku=class{previousPoint={x:0,y:0};segments=[];bezierCurveTo(e,t,n,r,i,a){let o=this.previousPoint.x,s=this.previousPoint.y,c=i===o?void 0:Eu((e-o)/(i-o),(t-s)/(a-s),(n-o)/(i-o),(r-s)/(a-s));this.segments.push({startX:o,endX:i,startY:s,endY:a,easing:c}),this.previousPoint={x:i,y:a}}lineTo(e,t){this.segments.push({startX:this.previousPoint.x,endX:e,startY:this.previousPoint.y,endY:t,easing:void 0}),this.previousPoint={x:e,y:t}}moveTo(e,t){this.previousPoint={x:e,y:t}}closePath(){}arc(){}rect(){}arcTo(){}quadraticCurveTo(){}},Au=class{script;xCurve;yCurve;fovCurve;zoomCurve;pitchCurve;bearingCurve;altitudeCurve;elevationCurve;constructor(e){this.script=ou(e),this.xCurve=this.createMonotonicCurve(this.script,`x`),this.yCurve=this.createMonotonicCurve(this.script,`y`),this.fovCurve=this.createMonotonicCurve(this.script,`fov`),this.zoomCurve=this.createMonotonicCurve(this.script,`zoom`),this.pitchCurve=this.createMonotonicCurve(this.script,`pitch`),this.bearingCurve=this.createMonotonicCurve(this.script,`bearing`),this.altitudeCurve=this.createMonotonicCurve(this.script,`altitude`),this.elevationCurve=this.createMonotonicCurve(this.script,`elevation`)}sample(e){let t=this.zoomCurve.sample(e),n=this.altitudeCurve.solve(lu(t),e),r=this.xCurve.sample(n),i=this.yCurve.sample(n),a=this.elevationCurve.sample(n),o=this.bearingCurve.sample(e),s=this.pitchCurve.sample(e),c=this.fovCurve.sample(e);return{center:new u.MercatorCoordinate(r,i).toLngLat(),zoom:t,bearing:o,pitch:s,fov:c,elevation:a}}createMonotonicCurve(e,t){let n=[];for(let r=0;r<e.length;r++){let i=r===0,a=r===e.length-1,o=e[r],s=e[r+1],c=e[r-1],l=this.getKeyframeValue(o,t);if(i&&n.push({x:-1,y:l}),n.push({x:o.time,y:l}),!i&&!a&&c.transition===`instant`&&o.transition===`ease`&&n.push({x:o.time+.1,y:l}),!a)if(o.transition===`linear`){let e=o.time+.1,r=s.time-.1,i=j(o.time,s.time,e),a=j(o.time,s.time,r),c=this.getKeyframeValue(s,t);n.push({x:e,y:A(l,c,i)}),n.push({x:r,y:A(l,c,a)})}else o.transition===`instant`&&(n.push({x:o.time+.1,y:l}),n.push({x:s.time-.1,y:l}));a&&n.push({x:o.time+1,y:l})}return new Ou(n)}sampleAutoHideOpacity(e){let t=this.script;if(t.length<2)return 1;let n=this.getKeyframeIndexByTime(e);if(n===-1||n===t.length-1)return 1;let r=t[n],i=t[n+1],a=n>0?t[n-1]:void 0,o;if(r.hideLabels===(a?.hideLabels??!1))o=r.hideLabels?0:1;else{let t=e-r.time,n=Math.min(400,i.time-r.time);o=ee(Ql(t,r.hideLabels?1:0,r.hideLabels?-1:1,n),0,1)}let s;if(n===t.length-2&&r.hideLabels){let t=Math.max(r.time,i.time-400);s=ee(Ql(e-t,0,1,i.time-t),0,1)}else s=0;return Math.max(o,s)}getKeyframeIndexByTime(e){let t=this.script;if(t.length!==0){for(let n=0;n<t.length;n++)if(e<t[n].time)return n-1;return t.length-1}}getKeyframeValue(e,t){return t===`altitude`?lu(e.zoom):e[t]}},ju=Mu;function Mu(e,t,n){var r=null,i=null,a=function(){r&&=(clearTimeout(r),i=null,null)},o=function(){var e=i;a(),e&&e()},s=function(){if(!t)return e.apply(this,arguments);var o=this,s=arguments,c=n&&!r;if(a(),i=function(){e.apply(o,s)},r=setTimeout(function(){if(r=null,!c){var e=i;return i=null,e()}},t),c)return i()};return s.cancel=a,s.flush=o,s}var Nu=class{mcMap;cameraCurve;jobObject;svgs;svgCache;duration;mapstyle;overlays;layerInfo;playhead;playbackContext;constructor(e,t,n,r,i,a,o){this.mcMap=e,this.playhead=0,this.playbackContext=void 0;let s=(t.video?.keyframes??[]).map(e=>{let{x:t,y:n}=u.MercatorCoordinate.fromLngLat(e.center);return{...e,x:t,y:n,fov:e.fov??36.87,elevation:e.elevation??0}});this.duration=uu(s),this.cameraCurve=new Au(s),this.jobObject=t,this.svgs=n,this.svgCache=r,this.mapstyle=i,this.overlays=a,this.layerInfo=o}play(){this.playbackContext===void 0&&this.duration>0&&(this.playhead>=this.duration&&(this.playhead=0),this.playbackContext={startTime:Date.now(),startPlayhead:this.playhead},this.mcMap.fire(`playstart`,{time:this.playhead}),this.playFrame())}pause(){this.playbackContext!==void 0&&(this.playbackContext=void 0,this.mcMap.fire(`playend`,{time:this.playhead}))}seekTo(e){this.duration>0&&(e=ee(e,0,this.duration),this.prepareForPlayback(),this.setCamera(e),this.playbackContext!==void 0&&(this.playbackContext={startTime:Date.now(),startPlayhead:e}))}async*frames(){let e=this.mcMap.map,t=du(this.jobObject.export?.frameRate??60),n=Math.ceil(this.duration*t/1e3);e._fadeDuration=0,e.style.stylesheet.transition={duration:0,delay:0},e.setCenterClampedToGround(!1);let r=e.getCanvas(),{width:i,height:a}=r,o=new OffscreenCanvas(i,a).getContext(`2d`,{desynchronized:!0,willReadFrequently:!0}),s=e.getContainer(),c=s.getBoundingClientRect();for(let e=0;e<n;e++)yield this.captureFrame(e*1e3/t,r,o,i,a,s,c);e._fadeDuration=300,e.style.stylesheet.transition=void 0,e.setCenterClampedToGround(!0)}async captureFrame(e,t,n,r,i,a,o){return this.setCamera(e),await this.mcMap.map.once(`idle`),n.fillStyle=`#ffffff`,n.fillRect(0,0,r,i),n.drawImage(t,0,0),await this.drawAdornments(n,a,o),n.getImageData(0,0,r,i)}async drawAdornments(e,t,n){let r=t.querySelectorAll(`.adornment-svg`),i=await Promise.all(Array.from(r).map(async e=>{let t=e.outerHTML,r=e.getBoundingClientRect(),i=r.left-n.left,a=r.top-n.top,o=r.width,s=r.height;return{image:await Dr(t,o,s),x:i,y:a}}));for(let t of i)e.drawImage(t.image,t.x,t.y)}playFrame(){if(this.playbackContext!==void 0){let e=this.playbackContext.startPlayhead+(Date.now()-this.playbackContext.startTime);this.prepareForPlayback(),e>this.duration?(this.setCamera(this.duration),this.playbackContext=void 0,this.mcMap.fire(`playend`,{time:this.playhead})):(this.setCamera(e),requestAnimationFrame(()=>this.playFrame()))}}setCamera(e){this.playhead=e;let t=this.mcMap.map,n=this.cameraCurve.sample(e),r=t.getCenter(),i=t.getZoom(),a=t.getBearing(),o=t.getPitch(),s=t.getCenterElevation(),c=t.getVerticalFieldOfView();n.center.lat!==r.lat||n.center.lng!==r.lng||n.zoom!==i||n.bearing!==a||n.pitch!==o||n.elevation!==s||n.fov!==c?(t.setVerticalFieldOfView(n.fov),t.jumpTo(n)):t.triggerRepaint(),this.applyAnimations(e),this.mcMap.fire(`play`,{time:e})}applyAnimations(e){let t=this.mcMap.map,{svgs:n,svgCache:r}=this,i=this.jobObject.video?.animations??[];for(let n of i){let{target:r}=n;if(r.type===`model`&&ru(n)){let{modelType:i,groupId:a,modelId:o}=r,s=au(n,`fade`,e);(i===`polygon`||i===`circle`||i===`line`||i===`marker`||i===`dot`)&&(o===void 0?t.setGlobalStateProperty(`opacity-${a}`,s===1?null:s):t.setFeatureState({source:a,id:C(o)},{opacity:s}))}}for(let n of this.jobObject.registry?.models?.area??[]){let{groupAnimation:r,modelAnimations:a}=this.getGroupAnimations(i,`area`,n.id,`opacity`);if(!(r===void 0&&a.size===0))if(r!==void 0&&a.size===0){let i=au(r,`fade`,e);n.models.reduce((e,t)=>e.add(sr(n.id,t)),new Set).forEach(e=>{t.setPaintProperty(e,`fill-opacity`,i),t.setPaintProperty(`${e}-outline`,`line-opacity`,i),t.setPaintProperty(`${e}-pattern`,`fill-opacity`,i)})}else{let i=r===void 0?1:au(r,`fade`,e),o={};for(let t of n.models){let r=t.featureId===void 0?t.id:String(t.featureId),s=sr(n.id,t),c=a.get(t.id),l=c===void 0?i:au(c,`fade`,e);o[s]??={},o[s][r]=l}for(let[e,n]of Object.entries(o)){let r=[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,n]];t.setPaintProperty(e,`fill-opacity`,r),t.setPaintProperty(`${e}-outline`,`line-opacity`,r),t.setPaintProperty(`${e}-pattern`,`fill-opacity`,r)}}}for(let a of this.jobObject.registry?.models?.circle??[]){let{groupAnimation:o,modelAnimations:s}=this.getGroupAnimations(i,`circle`,a.id,`scale`),c=o===void 0?1:au(o,`grow`,e);(o!==void 0||s.size>0)&&t.getSource(a.id).setData({type:`FeatureCollection`,features:a.models.filter(e=>e.visible??!0).map(t=>{let i=s.get(t.id);return _l(a,t,i===void 0?c:au(i,`grow`,e),n,r)})})}for(let n of this.jobObject.registry?.models?.line??[]){let{groupAnimation:a,modelAnimations:o}=this.getGroupAnimations(i,`line`,n.id,`scale`),s=a===void 0?1:au(a,`grow`,e);(a!==void 0||o.size>0)&&t.getSource(n.id).setData({type:`FeatureCollection`,features:n.models.filter(e=>e.visible??!0).map(i=>{let a=o.get(i.id);return Kl(t,n,i,a===void 0?s:au(a,`grow`,e),r)})})}for(let a of this.jobObject.registry?.models?.marker??[]){let{groupAnimation:o,modelAnimations:s}=this.getGroupAnimations(i,`marker`,a.id,`scale`),c=o===void 0?1:au(o,`grow`,e);(o!==void 0||s.size>0)&&t.getSource(a.id).setData({type:`FeatureCollection`,features:a.models.filter(e=>e.visible??!0).map(t=>{let i=s.get(t.id);return xl(a,t,i===void 0?c:au(i,`grow`,e),n,r)})})}let a=this.cameraCurve.sampleAutoHideOpacity(e);for(let t of this.mapstyle.layers){let n=this.getLayerOpacity(i,t,e,void 0);n===void 0?t.type===`symbol`&&this.setLayerOpacity(t,a):this.setLayerOpacity(t,n)}for(let[t,n]of this.overlays)for(let r of n.layers){let n=this.getLayerOpacity(i,r,e,t);n===void 0?this.resetLayerOpacity(r):this.setLayerOpacity(r,n)}}prepareForPlayback(){let e=this.mcMap.map;e.setCenterClampedToGround(!1),e.style?.stylesheet&&(e.style.stylesheet.transition={duration:0,delay:0}),this.restoreAfterPlayback()}restoreAfterPlayback=ju(()=>{let e=this.mcMap.map;e.setCenterClampedToGround(!0),e.style?.stylesheet&&(e.style.stylesheet.transition=void 0)},300);getGroupAnimations(e,t,n,r){let i,a=new Map;for(let o of e){let{target:e}=o;e.type===`model`&&e.modelType===t&&e.groupId===n&&(r===`opacity`&&ru(o)||r===`scale`&&iu(o))&&(e.modelId===void 0?i=o:a.set(e.modelId,o))}return{groupAnimation:i,modelAnimations:a}}getLayerOpacity(e,t,n,r){let i,a,o=1/0;r!==void 0&&(i=e.find(e=>e.target.type===`overlay`&&e.target.id===r));for(let n of e){let{target:e}=n;e.type===`layer`&&e.ids.includes(t.id)&&e.ids.length<o&&(a=n,o=e.ids.length)}return a===void 0?i===void 0?void 0:au(i,`fade`,n):au(a,`fade`,n)}setLayerOpacity(e,t){let n=this.mcMap.map;e.type===`fill`?n.setPaintProperty(e.id,`fill-opacity`,t):e.type===`line`?n.setPaintProperty(e.id,`line-opacity`,t):e.type===`circle`?(n.setPaintProperty(e.id,`circle-opacity`,t),n.setPaintProperty(e.id,`circle-stroke-opacity`,t)):e.type===`heatmap`?n.setPaintProperty(e.id,`heatmap-opacity`,t):e.type===`fill-extrusion`?n.setPaintProperty(e.id,`fill-extrusion-opacity`,t):e.type===`symbol`?(n.setPaintProperty(e.id,`icon-opacity`,t),n.setPaintProperty(e.id,`text-opacity`,t)):e.type===`raster`?n.setPaintProperty(e.id,`raster-opacity`,t):e.type===`hillshade`?n.setPaintProperty(e.id,`hillshade-exaggeration`,t*.5):e.type===`color-relief`?n.setPaintProperty(e.id,`color-relief-opacity`,t):e.type===`background`&&n.setPaintProperty(e.id,`background-opacity`,t),n.setLayoutProperty(e.id,`visibility`,t===0?`none`:this.layerInfo[e.id]?.visibility?`visible`:`none`)}resetLayerOpacity(e){let t=this.mcMap.map;e.type===`fill`?t.setPaintProperty(e.id,`fill-opacity`,e.paint?.[`fill-opacity`]??1):e.type===`line`?t.setPaintProperty(e.id,`line-opacity`,e.paint?.[`line-opacity`]??1):e.type===`circle`?(t.setPaintProperty(e.id,`circle-opacity`,e.paint?.[`circle-opacity`]??1),t.setPaintProperty(e.id,`circle-stroke-opacity`,e.paint?.[`circle-stroke-opacity`]??1)):e.type===`heatmap`?t.setPaintProperty(e.id,`heatmap-opacity`,e.paint?.[`heatmap-opacity`]??1):e.type===`fill-extrusion`?t.setPaintProperty(e.id,`fill-extrusion-opacity`,e.paint?.[`fill-extrusion-opacity`]??1):e.type===`symbol`?(t.setPaintProperty(e.id,`icon-opacity`,e.paint?.[`icon-opacity`]??1),t.setPaintProperty(e.id,`text-opacity`,e.paint?.[`text-opacity`]??1)):e.type===`raster`?t.setPaintProperty(e.id,`raster-opacity`,e.paint?.[`raster-opacity`]??1):e.type===`hillshade`?t.setPaintProperty(e.id,`hillshade-exaggeration`,e.paint?.[`hillshade-exaggeration`]??.5):e.type===`color-relief`?t.setPaintProperty(e.id,`color-relief-opacity`,e.paint?.[`color-relief-opacity`]??1):e.type===`background`&&t.setPaintProperty(e.id,`background-opacity`,e.paint?.[`background-opacity`]??1),t.setLayoutProperty(e.id,`visibility`,this.layerInfo[e.id]?.visibility?`visible`:`none`)}},Pu=class extends u.Evented{map;video;constructor(e,t,n,r,i,a,o){super(),this.map=e,this.video=new Nu(this,t,n,r,i,a,o)}on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}off(e,t){return super.off(e,t)}fire(e,t){return super.fire(e,t)}play(){this.video.play()}pause(){this.video.pause()}seekTo(e){this.video.seekTo(e)}frames(){return this.video.frames()}};async function Fu(e){let{accessToken:t,mode:n=`sdk`,env:r=`production`}=e,i=r===`bleeding`?`https://vapi.bleeding.mc-cdn.io`:r===`beta`?`https://vapi.beta.mc-cdn.io`:`https://vapi.mc-cdn.io`,a=r===`bleeding`?`https://cdn.bleeding.mapcreator.io`:r===`beta`?`https://cdn.beta.mapcreator.io`:`https://cdn.mapcreator.io`,o=typeof e.job==`string`?await Iu(e.job,a,t):e.job;await Lu();let s=new u.Map({container:e.container,attributionControl:!1,style:null,maxBounds:[-1/0,-90,1/0,90],maxPitch:85,maxZoom:22,locale:{"CooperativeGesturesHandler.WindowsHelpText":Ri(`windowsHelpText`),"CooperativeGesturesHandler.MacHelpText":Ri(`macHelpText`),"CooperativeGesturesHandler.MobileHelpText":Ri(`mobileHelpText`)},canvasContextAttributes:{preserveDrawingBuffer:n===`video`}}),c=s.getContainer();c.classList.add(`mc-map`),c.classList.add(`mc-mode-${n}`);let l=new Ir(s),f=new Hl(s,n),{map:{language:m,pitch:g=0,rotation:v=0,center:y,hideBasemap:b,detailLevel:x=0,projection:S=`mercator`,terrain:C=!1,terrainExaggeration:w=1},registry:T={},web:E,positionOffsets:D,title:O}=o,{models:k={},slots:A={},svgs:j={}}=T;Bu(r,i,t),s.resize(),n===`app`&&(document.title=O?`${O} - Mapcreator`:`Mapcreator`),s.setPitch(g),s.setBearing(v);let ee=N(o,c),M,P;if(n===`video`?(P=o.map.zoom-x,M=ee):(P=o.map.zoom-x+Math.log2(ee),M=1),s.setScale(M),s.setZoom(P),s.setCenter(y),s.setDetailLevel(x),s.setMinZoom(x),s.addControl(new u.AttributionControl({compact:!1})),n===`app`&&s.cooperativeGestures.enable(),ll(o,D??_,s,{center:y,zoom:P,pitch:g,rotation:v},i,a,t,M,n),f.setJobObject(o),E){let{restrictMapMovement:e,popupPosition:t}=E;e&&(s.boxZoom.disable(),s.doubleClickZoom.disable(),s.dragPan.disable(),s.dragRotate.disable(),s.keyboard.disable(),s.scrollZoom.disable(),s.touchPitch.disable(),s.touchZoomRotate.disable()),f.setParams(t,h(m,p.TWO),e,y)}let te=await fetch(`${i}/styles/${o.meta.mapstyleSet}.json?access_token=${t}`).then(e=>e.json());s.setStyle(null),s.setStyle(te),await s.once(`style.load`),n===`app`&&Vu(s.getStyle().metadata?.customCssFilePath,t),d(m,s);let F=await Sl(o.map.overlays??[],o.meta.layers??[],s,i,t,te.metadata?.styleOverride),ne=(o.map.overlays??[]).reduce((e,t,n)=>e.set(t,F[n]),new Map);Wu(s,l,k,A,j,i,t),d(m,s),f.setPublication(te.metadata?.publication),f.setpopupElements(),f.setHighlightManager(),s.setProjection({type:S===`globe`?`globe`:`mercator`}),Ru(s,S),C&&zu(s,i,t,w);let I=Hu(o.map.layerInfo,te,F);return Uu(s,I,!b),new Pu(s,o,j,l,te,ne,I)}function Iu(e,t,n){return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then(e=>e.json())}function Lu(){return new Promise(e=>{let t=()=>{window.innerWidth>0&&window.innerHeight>0&&(window.removeEventListener(`resize`,t),e())};window.addEventListener(`resize`,t),t()})}function Ru(e,t){let n=e.getStyle().metadata??{},r=n[`mc:background-color`]??`#f8f8f8`,i=n[`mc:background-color-globe`]??`#000000`;e.getContainer().style.backgroundColor=t===`globe`?i:r,e.setSky(e.getStyle().sky??g),e.setLight({position:[1.15,210,45]})}function zu(e,t,n,r){e.addSource(`mc-dem`,{type:`raster-dem`,tiles:[`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],attribution:`<a href="https://earth.jaxa.jp/en/data/policy" target="_blank">© AW3D30 (JAXA)</a>`,minzoom:0,maxzoom:12}),e.setTerrain({source:`mc-dem`,exaggeration:r})}function Bu(e,t,n){let r=`${t}/stylesheets/ff-${e===`beta`?`b-`:``}${n}.css?access_token=${n}`,i=document.createElement(`link`);i.setAttribute(`rel`,`stylesheet`),i.setAttribute(`href`,r),i.setAttribute(`type`,`text/css`),document.head.insertBefore(i,document.head.firstChild)}function Vu(e,t){if(document.getElementById(`custom-style`)?.remove(),!e)return;let n;e.startsWith(`http`)?(e=`${e}?access_token=${t}`,n=document.createElement(`link`),n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e.replace(/https?:/,``))):(n=document.createElement(`style`),n.appendChild(document.createTextNode(e))),n.setAttribute(`id`,`custom-style`),n.setAttribute(`type`,`text/css`),document.head.appendChild(n)}function Hu(e,t,n){let r=e?.reduce((e,t)=>(e[t.id]={visibility:t.visibility},e),{})??{},i={};for(let e of t.layers)i[e.id]=r[e.id]??{visibility:(e.layout?.visibility??`visible`)===`visible`};for(let e of n)for(let t of e.layers)i[t.id]=r[t.id]??{visibility:!1};return i}function Uu(e,t,n){for(let r in t)e.getLayer(r)!==void 0&&e.setLayoutProperty(r,`visibility`,t[r].visibility&&n?`visible`:`none`)}function Wu(e,t,n,r,i,a,o){let{beforeNone:s=[],beforeNames:c=[],beforeBoundaries:l=[],beforeWaters:u=[]}=r;s.forEach(r=>{Gu(e,t,n,r,i,`mc-before-none`,a,o)}),c.forEach(r=>{Gu(e,t,n,r,i,`mc-before-names`,a,o)}),l.forEach(r=>{Gu(e,t,n,r,i,`mc-before-boundaries`,a,o)}),u.forEach(r=>{Gu(e,t,n,r,i,`mc-before-waters`,a,o)})}function Gu(e,t,n,r,i,a,o,s){if(r.type===`marker`){let o=n.marker?.find(e=>e.id===r.groupId);o&&yl(e,o,a,i,t)}else if(r.type===`polygon`){let o=n.polygon?.find(e=>e.id===r.groupId);o&&ml(e,o,a,i,t)}else if(r.type===`circle`){let o=n.circle?.find(e=>e.id===r.groupId);o&&gl(e,o,a,i,t)}else if(r.type===`line`){let i=n.line?.find(e=>e.id===r.groupId);i&&Gl(e,i,a,t)}else if(r.type===`dot`){let t=n.dot?.find(e=>e.id===r.groupId);t&&Yl(e,t,a)}else if(r.type===`area`){let c=n.area?.find(e=>e.id===r.groupId);c&&Jl(e,c,a,i,t,o,s)}}e.initMap=Fu,e.setRTLTextPlugin=u.setRTLTextPlugin});
|
|
1178
|
+
`}return n}htmlToElement(e){let t=document.createElement(`template`);return t.innerHTML=e.trim(),t.content.firstElementChild}addPopupControls(){let e=this.htmlToElement(Nl);if(e&&(e.addEventListener(`click`,()=>{this.hidePopup(),this.highlightManager.highlight(void 0)}),this.popupContainer.appendChild(e)),this.popupElements.length<2)return;let t=this.htmlToElement(Pl);t&&(t.querySelector(`.prev`)?.addEventListener(`click`,()=>this.cyclePopups(!1)),t.querySelector(`.next`)?.addEventListener(`click`,()=>this.cyclePopups()),this.popupContainer.appendChild(t))}fillDatalayerTemplate(e,t,n){let r=`data-mention-id`,i=new DOMParser().parseFromString(t,`text/html`).body;for(let t of i.querySelectorAll(`[${r}]`)){let i=this.getProperty(e,t.getAttribute(r),n);i!==void 0&&(t.innerText=i)}return i.innerHTML}getProperty(e,t,n){if(!t)return;let r=t.endsWith(`:en`)?[t.replace(`:en`,n),t]:[t];for(let t of r){let n=e.properties[t]??this.getVectorProperty(e,t);if(n!==void 0)return n}}getVectorProperty(e,t){let n=this.promoteIdCache.get(e.source);n===void 0&&(n=this.map.getSource(e.source)?.serialize().promoteId||`id`,this.promoteIdCache.set(e.source,n));try{let r=e.properties[n];return e.layer.metadata.properties[t][r]}catch{return}}cyclePopups(e=!0){let t=this.popupElements?.findIndex(e=>e.modelId===this.currentModelId);if(t!==-1){let n=0;n=e?t===this.popupElements.length-1?0:t+1:t===0?this.popupElements.length-1:t-1;let r=this.popupElements?.[n];this.highlightManager.highlight(r);let i=Ml(r.popup,r.popupMedia,r.dataBindings??{},this.mode),a=this.popupContainer;this.popupContainer.remove(),a.innerHTML=i,this.mapContainer.appendChild(a),this.currentModelId=r.modelId,this.addPopupControls(),e?this.popupContainer.querySelector(`.mc-popup-button.next`)?.focus():this.popupContainer.querySelector(`.mc-popup-button.prev`)?.focus(),this.currentFeatureId=void 0}}},Hl=class e{static#e(e){let t=0,n=[t];for(let r=1;r<e.length;++r){let i=e[r-1],a=e[r],o=a.x-i.x,s=a.y-i.y;t+=Math.sqrt(o*o+s*s),n.push(t)}return n}static#t(e,t){return e.x===t.x&&e.y===t.y}#n;#r;#i;#a;constructor(t){this.#n=t.filter((e,n)=>n===0||t[n][0]!==t[n-1][0]||t[n][1]!==t[n-1][1]),this.#r=this.#n.map(e=>u.MercatorCoordinate.fromLngLat(e)),this.#i=e.#e(this.#r),this.#a=this.#i[this.#i.length-1]}sample(e){let t=this.#r,n=this.#i;if(t.length<2)return t[0];e*=this.#a;for(let r=1;r<t.length;++r){let i=t[r-1],a=t[r],o=n[r-1],s=n[r];if(s>=e){let t=(e-o)/(s-o);return new u.MercatorCoordinate(A(i.x,a.x,t),A(i.y,a.y,t))}}return new u.MercatorCoordinate(t[t.length-1].x,t[t.length-1].y)}slice(t,n){if(this.#n.length<2)return this.#n;let r=this.#r.filter((e,r)=>this.#i[r]>=t*this.#a&&this.#i[r]<=n*this.#a);if(t>0){let n=this.sample(t);e.#t(n,r[0])||r.unshift(n)}if(n<1){let t=this.sample(n);e.#t(t,r[r.length-1])||r.push(t)}return r.map(e=>{let{lng:t,lat:n}=e.toLngLat();return[t,n]})}get length(){return this.#a}},Ul={solid:[1,0],dotted:[.7,.3],dashed:[3.5,1.5]};function Wl(e,t,n,r){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(n=>Gl(e,t,n,1,r))}}),Object.entries(Ul).forEach(([r,i])=>{t.models.some(e=>(e.lineStyle??`solid`)===r)&&e.addLayer({id:`${t.id}-${r}`,type:`line`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`==`,[`get`,`line-style`],r]],paint:{"line-width":[`get`,`line-width`],"line-color":[`get`,`line-color`],"line-dasharray":i,"line-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}),e.addLayer({id:`${t.id}-clickable`,type:`line`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},paint:{"line-width":[`max`,[`get`,`line-width`],15],"line-opacity":0},filter:[`==`,[`geometry-type`],`LineString`]},n),t.models.some(e=>e.svg)&&e.addLayer({id:`${t.id}-icon`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`line`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":[`get`,`mc-image-key`],"icon-anchor":`center`,"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`]},paint:{"icon-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]},filter:[`==`,[`geometry-type`],`Point`]},n)}function Gl(e,t,n,r,i){let a=new Hl(n.geometry).slice(0,r),o=n.svg===void 0?void 0:i.getMapLibreImageKey(Ur(n.dataBindings??{},n.svg,void 0),window.devicePixelRatio*(n.iconScale??1));return{type:`Feature`,id:C(n.id),properties:{id:n.id,"line-width":n.lineWidth??3,"line-color":t.lineColor||n.lineColor?Vr(n.dataBindings??{},n.lineColor,t.lineColor):`#000000`,"line-style":n.lineStyle??`solid`,"mc-image-key":o,"icon-rotate":Kl(n,a,e),"icon-offset":n.iconOffset,"icon-size":n.iconScale},geometry:{type:`GeometryCollection`,geometries:[{type:`LineString`,coordinates:a},{type:`Point`,coordinates:a[a.length-1]}]}}}function Kl(e,t,n){return e.iconRotation?e.iconAlign?ur(t,n)+e.iconRotation:e.iconRotation:0}function ql(e,t,n,r,i,a,o){let s=_r(t),c=new Map,l=new Map;for(let e of t.models){let n=e.featureId,a=t.id,o=[],u=cr(e),d=sr(a,e),f=l.get(d)??{model:e,featureIds:o,modelIdToFillColor:{},modelIdToFillPattern:{},modelIdToOutlineColor:{},modelIdToOutlineWidth:{}};if(e.visible??!0){f.featureIds.push(n);let a=e.fillPattern===void 0?null:i.getMapLibreImageKey(r[e.fillPattern],2*window.devicePixelRatio);f.modelIdToFillColor[n]=t.fillColor||e.fillColor?Vr(e.dataBindings??{},e.fillColor,t.fillColor,s,t.choropleth?.unmatchedColor):`#000000`,f.modelIdToFillPattern[n]=a,f.modelIdToOutlineColor[n]=t.outlineColor||e.outlineColor?Vr(e.dataBindings??{},e.outlineColor,t.outlineColor):`#000000`,f.modelIdToOutlineWidth[n]=e.outlineWidth??.5}c.set(u,e),l.set(d,f)}for(let t of c.keys())e.getSource(t)||e.addSource(t,{type:`vector`,url:`${a}${c.get(t).vectorUrl}?access_token=${o}`});for(let r of l.keys()){let{model:i}=l.get(r),{sourceLayerId:a}=i,o=cr(i);e.addLayer({id:r,type:`fill`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"fill-color":`#ffffff`,"fill-outline-color":`#000000`,"fill-antialias":!1}},n),e.addLayer({id:`${r}-pattern`,type:`fill`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"fill-pattern":[`get`,`fill-pattern`]},layout:{visibility:`visible`}},n),e.addLayer({id:`${r}-outline`,type:`line`,source:o,"source-layer":a,filter:[`literal`,!1],metadata:{"mc-model-type":`area`,"mc-model-id-prefix":i.vectorUrl,"mc-group-id":t.id},paint:{"line-color":`#000000`,"line-width":.5}},n)}l.forEach((t,n)=>{let{featureIds:r,modelIdToFillColor:i,modelIdToFillPattern:a,modelIdToOutlineColor:o,modelIdToOutlineWidth:s}=t;e.setFilter(n,[`in`,`id`,...r]),e.setFilter(`${n}-outline`,[`in`,`id`,...r]),e.setPaintProperty(n,`fill-color`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,i]]),e.setPaintProperty(`${n}-outline`,`line-color`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,o]]),e.setPaintProperty(`${n}-outline`,`line-width`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,s]]),e.setFilter(`${n}-pattern`,[`to-boolean`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,a]]]),e.setPaintProperty(`${n}-pattern`,`fill-pattern`,[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,a]])})}function Jl(e,t,n){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>Yl(t,e))}}),e.addLayer({id:t.id,type:`circle`,source:t.id,metadata:{"mc-model-type":`dot`,"mc-group-id":t.id},paint:{"circle-color":[`get`,`circle-color`],"circle-radius":[`get`,`circle-radius`],"circle-opacity":[`coalesce`,[`feature-state`,`opacity`],[`global-state`,`opacity-${t.id}`],1]}},n)}function Yl(e,t){return{type:`Feature`,id:t.id,properties:{id:t.id,"circle-radius":t.radius,"circle-color":e.fillColor||t.fillColor?Vr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`},geometry:{type:`Point`,coordinates:[t.center.lng,t.center.lat]}}}function Xl(e,t,n,r){return t+n/r*e}function Zl(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ql(e,t,n,r){let i=1.70158,a=0,o=n;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,o<Math.abs(n)?(o=n,i=a/4):i=a/(2*Math.PI)*Math.asin(n/o),o*2**(-10*e)*Math.sin((e*r-i)*(2*Math.PI)/a)+n+t)}function $l(e,t,n,r,i){return i===void 0&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t}function eu(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}var tu={linear:Xl,easeOutCubic:Zl,easeOutBack:$l,easeOutBounce:eu,easeOutElastic:Ql};function nu(e){return e.entryType===`fade`||e.exitType===`fade`||e.entryType===`instant`||e.exitType===`instant`}function ru(e){return e.entryType===`grow`||e.exitType===`grow`}function iu(e,t,n){let{entry:r,entryDuration:i,exit:a,exitDuration:o}=e,{entryType:s,entryEasing:c,exitType:l,exitEasing:u}=e;return n<r&&(s===t||s===`instant`&&t===`fade`)||n>a&&(l===t||l===`instant`&&t===`fade`)?0:i>0&&n<r+i&&s===t?tu[c](n-r,0,1,i):o>0&&n>a-o&&l===t?tu[u](n-(a-o),1,-1,o):1}function au(e){let t=e.length>0?[ou(e[0])]:[],n=0,r=0;for(let i=1;i<e.length;++i){let a=ou(e[i]);n+=su(e[i-1].center[0],a.center[0]),r+=su(e[i-1].bearing,a.bearing),a.center[0]+=n*360,a.x+=n,a.bearing+=r*360,t.push(a)}return t}function ou(e){return{...e,center:[e.center[0],e.center[1]]}}function su(e,t){if(Math.abs(e)+Math.abs(t)>180){if(e>0&&t<0)return 1;if(e<0&&t>0)return-1}return 0}function cu(e){return 2**-e}function lu(e){return e.length>0?e[e.length-1].time:0}function uu(e){return P(e,23.976)?24e3/1001:P(e,29.97)?3e4/1001:P(e,59.94)?6e4/1001:e}function du(e){return e<0?-1:1}function fu(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(du(a)+du(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function pu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mu(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function hu(e){this._context=e}hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mu(this,this._t0,pu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mu(this,pu(this,n=fu(this,e,t)),n);break;default:mu(this,this._t0,n=fu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function gu(e){this._context=new _u(e)}(gu.prototype=Object.create(hu.prototype)).point=function(e,t){hu.prototype.point.call(this,t,e)};function _u(e){this._context=e}_u.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function vu(e){return new hu(e)}function yu(e){return e}var{cbrt:bu,sqrt:xu,PI:Su}=Math,Cu=(e,t,n,r,i)=>{let a=t+n*e,o=a**2+r;if(o>0){let e=xu(o);return bu(a+e)+bu(a-e)-i}let s=bu(xu(a*a-o)),c=a?Math.atan(xu(-o)/a):-Su/2,l;return l=n<0?(a>0?2*Su:Su)-c:i<0?(a>0?2*Su:-3*Su)+c:(a>0?0:Su)+c,2*s*Math.cos(l/3)-i},wu=(e,t,n,r)=>((t*e+3*n)*e+r)*e;function Tu(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw Error(`bezier x values must be in [0, 1] range`);if(e===t&&n===r)return yu;let i=6*(3*e-3*n+1),a=6*(n-2*e),o=3*e,s=i*i,c=a*a,l=a/i,u=3*a*o/s-c*a/(s*i),d=2*o/i-c/s,f=d*d*d,p=3/i,m=3*t-3*r+1,h=r-2*t,g=3*t,_=i?Cu:yu;return function(e){return e===0||e===1?e:wu(_(e,u,p,f,l),m,h,g)}}var Eu=l(s(((e,t)=>{t.exports=n;function n(e,t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g,_;for(typeof t!=`function`&&(r=n,n=t,t=null),r||={},s=r.tolerance===void 0?1e-7:r.tolerance,_=r.epsilon===void 0?2220446049250313e-31:r.epsilon,c=r.maxIterations===void 0?20:r.maxIterations,m=r.h===void 0?1e-4:r.h,g=r.verbose===void 0?!1:r.verbose,h=1/m,l=0;l++<c;){if(a=e(n),t?o=t(n):(u=e(n+m),d=e(n-m),f=e(n+2*m),p=e(n-2*m),o=(p-f+8*(u-d))*h/12),Math.abs(o)<=_*Math.abs(a))return g&&console.log(`Newton-Raphson: failed to converged due to nearly zero first derivative`),!1;if(i=n-a/o,Math.abs(i-n)<=s*Math.abs(i))return g&&console.log(`Newton-Raphson: converged to x = `+i+` after `+l+` iterations`),i;n=i}return g&&console.log(`Newton-Raphson: Maximum iterations reached (`+c+`)`),!1}}))(),1),Du=class{segments;constructor(e){this.segments=[];let t=new Ou,n=vu(t);n.lineStart();for(let t of e)n.point(t.x,t.y);n.lineEnd(),this.segments=t.segments}sample(e){if(e<=0)return this.segments[0].startY;if(e>=this.segments[this.segments.length-1].endX)return this.segments[this.segments.length-1].endY;let t=this.segments.find(t=>e>=t.startX&&e<t.endX),n=j(t.startX,t.endX,e);return t.startY!==t.endY&&t.easing!==void 0?A(t.startY,t.endY,t.easing(n)):A(t.startY,t.endY,n)}solve(e,t){let n=(0,Eu.default)(t=>this.sample(t)-e,t);return n===!1?t:n}},Ou=class{previousPoint={x:0,y:0};segments=[];bezierCurveTo(e,t,n,r,i,a){let o=this.previousPoint.x,s=this.previousPoint.y,c=i===o?void 0:Tu((e-o)/(i-o),(t-s)/(a-s),(n-o)/(i-o),(r-s)/(a-s));this.segments.push({startX:o,endX:i,startY:s,endY:a,easing:c}),this.previousPoint={x:i,y:a}}lineTo(e,t){this.segments.push({startX:this.previousPoint.x,endX:e,startY:this.previousPoint.y,endY:t,easing:void 0}),this.previousPoint={x:e,y:t}}moveTo(e,t){this.previousPoint={x:e,y:t}}closePath(){}arc(){}rect(){}arcTo(){}quadraticCurveTo(){}},ku=class{script;xCurve;yCurve;fovCurve;zoomCurve;pitchCurve;bearingCurve;altitudeCurve;elevationCurve;constructor(e){this.script=au(e),this.xCurve=this.createMonotonicCurve(this.script,`x`),this.yCurve=this.createMonotonicCurve(this.script,`y`),this.fovCurve=this.createMonotonicCurve(this.script,`fov`),this.zoomCurve=this.createMonotonicCurve(this.script,`zoom`),this.pitchCurve=this.createMonotonicCurve(this.script,`pitch`),this.bearingCurve=this.createMonotonicCurve(this.script,`bearing`),this.altitudeCurve=this.createMonotonicCurve(this.script,`altitude`),this.elevationCurve=this.createMonotonicCurve(this.script,`elevation`)}sample(e){let t=this.zoomCurve.sample(e),n=this.altitudeCurve.solve(cu(t),e),r=this.xCurve.sample(n),i=this.yCurve.sample(n),a=this.elevationCurve.sample(n),o=this.bearingCurve.sample(e),s=this.pitchCurve.sample(e),c=this.fovCurve.sample(e);return{center:new u.MercatorCoordinate(r,i).toLngLat(),zoom:t,bearing:o,pitch:s,fov:c,elevation:a}}createMonotonicCurve(e,t){let n=[];for(let r=0;r<e.length;r++){let i=r===0,a=r===e.length-1,o=e[r],s=e[r+1],c=e[r-1],l=this.getKeyframeValue(o,t);if(i&&n.push({x:-1,y:l}),n.push({x:o.time,y:l}),!i&&!a&&c.transition===`instant`&&o.transition===`ease`&&n.push({x:o.time+.1,y:l}),!a)if(o.transition===`linear`){let e=o.time+.1,r=s.time-.1,i=j(o.time,s.time,e),a=j(o.time,s.time,r),c=this.getKeyframeValue(s,t);n.push({x:e,y:A(l,c,i)}),n.push({x:r,y:A(l,c,a)})}else o.transition===`instant`&&(n.push({x:o.time+.1,y:l}),n.push({x:s.time-.1,y:l}));a&&n.push({x:o.time+1,y:l})}return new Du(n)}sampleAutoHideOpacity(e){let t=this.script;if(t.length<2)return 1;let n=this.getKeyframeIndexByTime(e);if(n===-1||n===t.length-1)return 1;let r=t[n],i=t[n+1],a=n>0?t[n-1]:void 0,o;if(r.hideLabels===(a?.hideLabels??!1))o=r.hideLabels?0:1;else{let t=e-r.time,n=Math.min(400,i.time-r.time);o=ee(Zl(t,r.hideLabels?1:0,r.hideLabels?-1:1,n),0,1)}let s;if(n===t.length-2&&r.hideLabels){let t=Math.max(r.time,i.time-400);s=ee(Zl(e-t,0,1,i.time-t),0,1)}else s=0;return Math.max(o,s)}getKeyframeIndexByTime(e){let t=this.script;if(t.length!==0){for(let n=0;n<t.length;n++)if(e<t[n].time)return n-1;return t.length-1}}getKeyframeValue(e,t){return t===`altitude`?cu(e.zoom):e[t]}},Au=ju;function ju(e,t,n){var r=null,i=null,a=function(){r&&=(clearTimeout(r),i=null,null)},o=function(){var e=i;a(),e&&e()},s=function(){if(!t)return e.apply(this,arguments);var o=this,s=arguments,c=n&&!r;if(a(),i=function(){e.apply(o,s)},r=setTimeout(function(){if(r=null,!c){var e=i;return i=null,e()}},t),c)return i()};return s.cancel=a,s.flush=o,s}var Mu=class{mcMap;cameraCurve;jobObject;svgs;svgCache;duration;mapstyle;overlays;layerInfo;playhead;playbackContext;constructor(e,t,n,r,i,a,o){this.mcMap=e,this.playhead=0,this.playbackContext=void 0;let s=(t.video?.keyframes??[]).map(e=>{let{x:t,y:n}=u.MercatorCoordinate.fromLngLat(e.center);return{...e,x:t,y:n,fov:e.fov??36.87,elevation:e.elevation??0}});this.duration=lu(s),this.cameraCurve=new ku(s),this.jobObject=t,this.svgs=n,this.svgCache=r,this.mapstyle=i,this.overlays=a,this.layerInfo=o}play(){this.playbackContext===void 0&&this.duration>0&&(this.playhead>=this.duration&&(this.playhead=0),this.playbackContext={startTime:Date.now(),startPlayhead:this.playhead},this.mcMap.fire(`playstart`,{time:this.playhead}),this.playFrame())}pause(){this.playbackContext!==void 0&&(this.playbackContext=void 0,this.mcMap.fire(`playend`,{time:this.playhead}))}seekTo(e){this.duration>0&&(e=ee(e,0,this.duration),this.prepareForPlayback(),this.setCamera(e),this.playbackContext!==void 0&&(this.playbackContext={startTime:Date.now(),startPlayhead:e}))}async*frames(){let e=this.mcMap.map,t=uu(this.jobObject.export?.frameRate??60),n=Math.ceil(this.duration*t/1e3);e._fadeDuration=0,e.style.stylesheet.transition={duration:0,delay:0},e.setCenterClampedToGround(!1);let r=e.getCanvas(),{width:i,height:a}=r,o=new OffscreenCanvas(i,a).getContext(`2d`,{desynchronized:!0,willReadFrequently:!0}),s=e.getContainer(),c=s.getBoundingClientRect();for(let e=0;e<n;e++)yield this.captureFrame(e*1e3/t,r,o,i,a,s,c);e._fadeDuration=300,e.style.stylesheet.transition=void 0,e.setCenterClampedToGround(!0)}async captureFrame(e,t,n,r,i,a,o){return this.setCamera(e),await this.mcMap.map.once(`idle`),n.fillStyle=`#ffffff`,n.fillRect(0,0,r,i),n.drawImage(t,0,0),await this.drawAdornments(n,a,o),n.getImageData(0,0,r,i)}async drawAdornments(e,t,n){let r=t.querySelectorAll(`.adornment-svg`),i=await Promise.all(Array.from(r).map(async e=>{let t=e.outerHTML,r=e.getBoundingClientRect(),i=r.left-n.left,a=r.top-n.top,o=r.width,s=r.height;return{image:await Dr(t,o,s),x:i,y:a}}));for(let t of i)e.drawImage(t.image,t.x,t.y)}playFrame(){if(this.playbackContext!==void 0){let e=this.playbackContext.startPlayhead+(Date.now()-this.playbackContext.startTime);this.prepareForPlayback(),e>this.duration?(this.setCamera(this.duration),this.playbackContext=void 0,this.mcMap.fire(`playend`,{time:this.playhead})):(this.setCamera(e),requestAnimationFrame(()=>this.playFrame()))}}setCamera(e){this.playhead=e;let t=this.mcMap.map,n=this.cameraCurve.sample(e),r=t.getCenter(),i=t.getZoom(),a=t.getBearing(),o=t.getPitch(),s=t.getCenterElevation(),c=t.getVerticalFieldOfView();n.center.lat!==r.lat||n.center.lng!==r.lng||n.zoom!==i||n.bearing!==a||n.pitch!==o||n.elevation!==s||n.fov!==c?(t.setVerticalFieldOfView(n.fov),t.jumpTo(n)):t.triggerRepaint(),this.applyAnimations(e),this.mcMap.fire(`play`,{time:e})}applyAnimations(e){let t=this.mcMap.map,{svgs:n,svgCache:r}=this,i=this.jobObject.video?.animations??[];for(let n of i){let{target:r}=n;if(r.type===`model`&&nu(n)){let{modelType:i,groupId:a,modelId:o}=r,s=iu(n,`fade`,e);(i===`polygon`||i===`circle`||i===`line`||i===`marker`||i===`dot`)&&(o===void 0?t.setGlobalStateProperty(`opacity-${a}`,s===1?null:s):t.setFeatureState({source:a,id:C(o)},{opacity:s}))}}for(let n of this.jobObject.registry?.models?.area??[]){let{groupAnimation:r,modelAnimations:a}=this.getGroupAnimations(i,`area`,n.id,`opacity`);if(!(r===void 0&&a.size===0))if(r!==void 0&&a.size===0){let i=iu(r,`fade`,e);n.models.reduce((e,t)=>e.add(sr(n.id,t)),new Set).forEach(e=>{t.setPaintProperty(e,`fill-opacity`,i),t.setPaintProperty(`${e}-outline`,`line-opacity`,i),t.setPaintProperty(`${e}-pattern`,`fill-opacity`,i)})}else{let i=r===void 0?1:iu(r,`fade`,e),o={};for(let t of n.models){let r=t.featureId===void 0?t.id:String(t.featureId),s=sr(n.id,t),c=a.get(t.id),l=c===void 0?i:iu(c,`fade`,e);o[s]??={},o[s][r]=l}for(let[e,n]of Object.entries(o)){let r=[`get`,[`case`,[`==`,[`typeof`,[`get`,`id`]],`number`],[`to-string`,[`get`,`id`]],[`get`,`id`]],[`literal`,n]];t.setPaintProperty(e,`fill-opacity`,r),t.setPaintProperty(`${e}-outline`,`line-opacity`,r),t.setPaintProperty(`${e}-pattern`,`fill-opacity`,r)}}}for(let a of this.jobObject.registry?.models?.circle??[]){let{groupAnimation:o,modelAnimations:s}=this.getGroupAnimations(i,`circle`,a.id,`scale`),c=o===void 0?1:iu(o,`grow`,e);(o!==void 0||s.size>0)&&t.getSource(a.id).setData({type:`FeatureCollection`,features:a.models.filter(e=>e.visible??!0).map(t=>{let i=s.get(t.id);return gl(a,t,i===void 0?c:iu(i,`grow`,e),n,r)})})}for(let n of this.jobObject.registry?.models?.line??[]){let{groupAnimation:a,modelAnimations:o}=this.getGroupAnimations(i,`line`,n.id,`scale`),s=a===void 0?1:iu(a,`grow`,e);(a!==void 0||o.size>0)&&t.getSource(n.id).setData({type:`FeatureCollection`,features:n.models.filter(e=>e.visible??!0).map(i=>{let a=o.get(i.id);return Gl(t,n,i,a===void 0?s:iu(a,`grow`,e),r)})})}for(let a of this.jobObject.registry?.models?.marker??[]){let{groupAnimation:o,modelAnimations:s}=this.getGroupAnimations(i,`marker`,a.id,`scale`),c=o===void 0?1:iu(o,`grow`,e);(o!==void 0||s.size>0)&&t.getSource(a.id).setData({type:`FeatureCollection`,features:a.models.filter(e=>e.visible??!0).map(t=>{let i=s.get(t.id);return bl(a,t,i===void 0?c:iu(i,`grow`,e),n,r)})})}let a=this.cameraCurve.sampleAutoHideOpacity(e);for(let t of this.mapstyle.layers){let n=this.getLayerOpacity(i,t,e,void 0);n===void 0?t.type===`symbol`&&this.setLayerOpacity(t,a):this.setLayerOpacity(t,n)}for(let[t,n]of this.overlays)for(let r of n.layers){let n=this.getLayerOpacity(i,r,e,t);n===void 0?this.resetLayerOpacity(r):this.setLayerOpacity(r,n)}}prepareForPlayback(){let e=this.mcMap.map;e.setCenterClampedToGround(!1),e.style?.stylesheet&&(e.style.stylesheet.transition={duration:0,delay:0}),this.restoreAfterPlayback()}restoreAfterPlayback=Au(()=>{let e=this.mcMap.map;e.setCenterClampedToGround(!0),e.style?.stylesheet&&(e.style.stylesheet.transition=void 0)},300);getGroupAnimations(e,t,n,r){let i,a=new Map;for(let o of e){let{target:e}=o;e.type===`model`&&e.modelType===t&&e.groupId===n&&(r===`opacity`&&nu(o)||r===`scale`&&ru(o))&&(e.modelId===void 0?i=o:a.set(e.modelId,o))}return{groupAnimation:i,modelAnimations:a}}getLayerOpacity(e,t,n,r){let i,a,o=1/0;r!==void 0&&(i=e.find(e=>e.target.type===`overlay`&&e.target.id===r));for(let n of e){let{target:e}=n;e.type===`layer`&&e.ids.includes(t.id)&&e.ids.length<o&&(a=n,o=e.ids.length)}return a===void 0?i===void 0?void 0:iu(i,`fade`,n):iu(a,`fade`,n)}setLayerOpacity(e,t){let n=this.mcMap.map;e.type===`fill`?n.setPaintProperty(e.id,`fill-opacity`,t):e.type===`line`?n.setPaintProperty(e.id,`line-opacity`,t):e.type===`circle`?(n.setPaintProperty(e.id,`circle-opacity`,t),n.setPaintProperty(e.id,`circle-stroke-opacity`,t)):e.type===`heatmap`?n.setPaintProperty(e.id,`heatmap-opacity`,t):e.type===`fill-extrusion`?n.setPaintProperty(e.id,`fill-extrusion-opacity`,t):e.type===`symbol`?(n.setPaintProperty(e.id,`icon-opacity`,t),n.setPaintProperty(e.id,`text-opacity`,t)):e.type===`raster`?n.setPaintProperty(e.id,`raster-opacity`,t):e.type===`hillshade`?n.setPaintProperty(e.id,`hillshade-exaggeration`,t*.5):e.type===`color-relief`?n.setPaintProperty(e.id,`color-relief-opacity`,t):e.type===`background`&&n.setPaintProperty(e.id,`background-opacity`,t),n.setLayoutProperty(e.id,`visibility`,t===0?`none`:this.layerInfo[e.id]?.visibility?`visible`:`none`)}resetLayerOpacity(e){let t=this.mcMap.map;e.type===`fill`?t.setPaintProperty(e.id,`fill-opacity`,e.paint?.[`fill-opacity`]??1):e.type===`line`?t.setPaintProperty(e.id,`line-opacity`,e.paint?.[`line-opacity`]??1):e.type===`circle`?(t.setPaintProperty(e.id,`circle-opacity`,e.paint?.[`circle-opacity`]??1),t.setPaintProperty(e.id,`circle-stroke-opacity`,e.paint?.[`circle-stroke-opacity`]??1)):e.type===`heatmap`?t.setPaintProperty(e.id,`heatmap-opacity`,e.paint?.[`heatmap-opacity`]??1):e.type===`fill-extrusion`?t.setPaintProperty(e.id,`fill-extrusion-opacity`,e.paint?.[`fill-extrusion-opacity`]??1):e.type===`symbol`?(t.setPaintProperty(e.id,`icon-opacity`,e.paint?.[`icon-opacity`]??1),t.setPaintProperty(e.id,`text-opacity`,e.paint?.[`text-opacity`]??1)):e.type===`raster`?t.setPaintProperty(e.id,`raster-opacity`,e.paint?.[`raster-opacity`]??1):e.type===`hillshade`?t.setPaintProperty(e.id,`hillshade-exaggeration`,e.paint?.[`hillshade-exaggeration`]??.5):e.type===`color-relief`?t.setPaintProperty(e.id,`color-relief-opacity`,e.paint?.[`color-relief-opacity`]??1):e.type===`background`&&t.setPaintProperty(e.id,`background-opacity`,e.paint?.[`background-opacity`]??1),t.setLayoutProperty(e.id,`visibility`,this.layerInfo[e.id]?.visibility?`visible`:`none`)}},Nu=class extends u.Evented{map;video;constructor(e,t,n,r,i,a,o){super(),this.map=e,this.video=new Mu(this,t,n,r,i,a,o)}on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}off(e,t){return super.off(e,t)}fire(e,t){return super.fire(e,t)}play(){this.video.play()}pause(){this.video.pause()}seekTo(e){this.video.seekTo(e)}frames(){return this.video.frames()}};async function Pu(e){let{accessToken:t,mode:n=`sdk`,env:r=`production`}=e,i=r===`bleeding`?`https://vapi.bleeding.mc-cdn.io`:r===`beta`?`https://vapi.beta.mc-cdn.io`:`https://vapi.mc-cdn.io`,a=r===`bleeding`?`https://cdn.bleeding.mapcreator.io`:r===`beta`?`https://cdn.beta.mapcreator.io`:`https://cdn.mapcreator.io`,o=typeof e.job==`string`?await Fu(e.job,a,t):e.job;await Iu();let s=new u.Map({container:e.container,attributionControl:!1,style:null,maxBounds:[-1/0,-90,1/0,90],maxPitch:85,maxZoom:22,locale:{"CooperativeGesturesHandler.WindowsHelpText":Ri(`windowsHelpText`),"CooperativeGesturesHandler.MacHelpText":Ri(`macHelpText`),"CooperativeGesturesHandler.MobileHelpText":Ri(`mobileHelpText`)},canvasContextAttributes:{preserveDrawingBuffer:n===`video`}}),c=s.getContainer();c.classList.add(`mc-map`),c.classList.add(`mc-mode-${n}`);let l=new Ir(s),f=new Vl(s,n),{map:{language:m,pitch:g=0,rotation:v=0,center:y,hideBasemap:b,detailLevel:x=0,projection:S=`mercator`,terrain:C=!1,terrainExaggeration:w=1},registry:T={},web:E,positionOffsets:D,title:O}=o,{models:k={},slots:A={},svgs:j={}}=T;zu(r,i,t),s.resize(),n===`app`&&(document.title=O?`${O} - Mapcreator`:`Mapcreator`),s.setPitch(g),s.setBearing(v);let ee=N(o,c),M,P;if(n===`video`?(P=o.map.zoom-x,M=ee):(P=o.map.zoom-x+Math.log2(ee),M=1),s.setScale(M),s.setZoom(P),s.setCenter(y),s.setDetailLevel(x),s.setMinZoom(x),s.addControl(new u.AttributionControl({compact:!1})),n===`app`&&s.cooperativeGestures.enable(),cl(o,D??_,s,{center:y,zoom:P,pitch:g,rotation:v},i,a,t,M,n),f.setJobObject(o),E){let{restrictMapMovement:e,popupPosition:t}=E;e&&(s.boxZoom.disable(),s.doubleClickZoom.disable(),s.dragPan.disable(),s.dragRotate.disable(),s.keyboard.disable(),s.scrollZoom.disable(),s.touchPitch.disable(),s.touchZoomRotate.disable()),f.setParams(t,h(m,p.TWO),e,y)}let te=await fetch(`${i}/styles/${o.meta.mapstyleSet}.json?access_token=${t}`).then(e=>e.json());s.setStyle(null),s.setStyle(te),await s.once(`style.load`),n===`app`&&Bu(s.getStyle().metadata?.customCssFilePath,t),d(m,s);let F=await xl(o.map.overlays??[],o.meta.layers??[],s,i,t,te.metadata?.styleOverride),ne=(o.map.overlays??[]).reduce((e,t,n)=>e.set(t,F[n]),new Map);Uu(s,l,k,A,j,i,t),d(m,s),f.setPublication(te.metadata?.publication),f.setpopupElements(),f.setHighlightManager(),s.setProjection({type:S===`globe`?`globe`:`mercator`}),Lu(s,S),C&&Ru(s,i,t,w);let I=Vu(o.map.layerInfo,te,F);return Hu(s,I,!b),new Nu(s,o,j,l,te,ne,I)}function Fu(e,t,n){return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then(e=>e.json())}function Iu(){return new Promise(e=>{let t=()=>{window.innerWidth>0&&window.innerHeight>0&&(window.removeEventListener(`resize`,t),e())};window.addEventListener(`resize`,t),t()})}function Lu(e,t){let n=e.getStyle().metadata??{},r=n[`mc:background-color`]??`#f8f8f8`,i=n[`mc:background-color-globe`]??`#000000`;e.getContainer().style.backgroundColor=t===`globe`?i:r,e.setSky(e.getStyle().sky??g),e.setLight({position:[1.15,210,45]})}function Ru(e,t,n,r){e.addSource(`mc-dem`,{type:`raster-dem`,tiles:[`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],attribution:`<a href="https://earth.jaxa.jp/en/data/policy" target="_blank">© AW3D30 (JAXA)</a>`,minzoom:0,maxzoom:12}),e.setTerrain({source:`mc-dem`,exaggeration:r})}function zu(e,t,n){let r=`${t}/stylesheets/ff-${e===`beta`?`b-`:``}${n}.css?access_token=${n}`,i=document.createElement(`link`);i.setAttribute(`rel`,`stylesheet`),i.setAttribute(`href`,r),i.setAttribute(`type`,`text/css`),document.head.insertBefore(i,document.head.firstChild)}function Bu(e,t){if(document.getElementById(`custom-style`)?.remove(),!e)return;let n;e.startsWith(`http`)?(e=`${e}?access_token=${t}`,n=document.createElement(`link`),n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e.replace(/https?:/,``))):(n=document.createElement(`style`),n.appendChild(document.createTextNode(e))),n.setAttribute(`id`,`custom-style`),n.setAttribute(`type`,`text/css`),document.head.appendChild(n)}function Vu(e,t,n){let r=e?.reduce((e,t)=>(e[t.id]={visibility:t.visibility},e),{})??{},i={};for(let e of t.layers)i[e.id]=r[e.id]??{visibility:(e.layout?.visibility??`visible`)===`visible`};for(let e of n)for(let t of e.layers)i[t.id]=r[t.id]??{visibility:!1};return i}function Hu(e,t,n){for(let r in t)e.getLayer(r)!==void 0&&e.setLayoutProperty(r,`visibility`,t[r].visibility&&n?`visible`:`none`)}function Uu(e,t,n,r,i,a,o){let{beforeNone:s=[],beforeNames:c=[],beforeBoundaries:l=[],beforeWaters:u=[]}=r;s.forEach(r=>{Wu(e,t,n,r,i,`mc-before-none`,a,o)}),c.forEach(r=>{Wu(e,t,n,r,i,`mc-before-names`,a,o)}),l.forEach(r=>{Wu(e,t,n,r,i,`mc-before-boundaries`,a,o)}),u.forEach(r=>{Wu(e,t,n,r,i,`mc-before-waters`,a,o)})}function Wu(e,t,n,r,i,a,o,s){if(r.type===`marker`){let o=n.marker?.find(e=>e.id===r.groupId);o&&vl(e,o,a,i,t)}else if(r.type===`polygon`){let o=n.polygon?.find(e=>e.id===r.groupId);o&&pl(e,o,a,i,t)}else if(r.type===`circle`){let o=n.circle?.find(e=>e.id===r.groupId);o&&hl(e,o,a,i,t)}else if(r.type===`line`){let i=n.line?.find(e=>e.id===r.groupId);i&&Wl(e,i,a,t)}else if(r.type===`dot`){let t=n.dot?.find(e=>e.id===r.groupId);t&&Jl(e,t,a)}else if(r.type===`area`){let c=n.area?.find(e=>e.id===r.groupId);c&&ql(e,c,a,i,t,o,s)}}e.initMap=Pu,e.setRTLTextPlugin=u.setRTLTextPlugin});
|