var Qe=63710088e-1;function ue(t,e,n={}){const i={type:"Feature"};return(n.id===0||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function gt(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Je(t[0])||!Je(t[1]))throw new Error("coordinates must contain numbers");return ue({type:"Point",coordinates:t},e,n)}function Ye(t,e,n={}){for(const r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let l=0;lm?x.c=x.e=null:s.e=10;v/=10,y++);y>m?x.c=x.e=null:(x.e=y,x.c=[s]);return}E=String(s)}else{if(!Mt.test(E=String(s)))return i(x,E,p);x.s=E.charCodeAt(0)==45?(E=E.slice(1),-1):1}(y=E.indexOf("."))>-1&&(E=E.replace(".","")),(v=E.search(/e/i))>0?(y<0&&(y=v),y+=+E.slice(v+1),E=E.substring(0,v)):y<0&&(y=E.length)}else{if(U(o,2,N.length,"Base"),o==10&&_)return x=new b(s),F(x,h+x.e+1,f);if(E=String(s),p=typeof s=="number"){if(s*0!=0)return i(x,E,p,o);if(x.s=1/s<0?(E=E.slice(1),-1):1,b.DEBUG&&E.replace(/^0\.0*|\./,"").length>15)throw Error(je+s)}else x.s=E.charCodeAt(0)===45?(E=E.slice(1),-1):1;for(u=N.slice(0,o),y=v=0,d=E.length;vy){y=d;continue}}else if(!a&&(E==E.toUpperCase()&&(E=E.toLowerCase())||E==E.toLowerCase()&&(E=E.toUpperCase()))){a=!0,v=-1,y=0;continue}return i(x,String(s),p,o)}p=!1,E=n(E,o,10,x.s),(y=E.indexOf("."))>-1?E=E.replace(".",""):y=E.length}for(v=0;E.charCodeAt(v)===48;v++);for(d=E.length;E.charCodeAt(--d)===48;);if(E=E.slice(v,++d)){if(d-=v,p&&b.DEBUG&&d>15&&(s>qe||s!==ee(s)))throw Error(je+x.s*s);if((y=y-v-1)>m)x.c=x.e=null;else if(y=-K&&a<=K&&a===ee(a)){if(w[0]===0){if(a===0&&w.length===1)return!0;break e}if(o=(a+1)%C,o<1&&(o+=C),String(w[0]).length==o){for(o=0;o=ne||u!==ee(u))break e;if(u!==0)return!0}}}else if(w===null&&a===null&&(y===null||y===1||y===-1))return!0;throw Error(Q+"Invalid BigNumber: "+s)},b.maximum=b.max=function(){return G(arguments,-1)},b.minimum=b.min=function(){return G(arguments,1)},b.random=(function(){var s=9007199254740992,o=Math.random()*s&2097151?function(){return ee(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(u){var w,a,y,v,p,d=0,E=[],x=new b(l);if(u==null?u=h:U(u,0,K),v=Ge(u/C),P)if(crypto.getRandomValues){for(w=crypto.getRandomValues(new Uint32Array(v*=2));d>>11),p>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),w[d]=a[0],w[d+1]=a[1]):(E.push(p%1e14),d+=2);d=v/2}else if(crypto.randomBytes){for(w=crypto.randomBytes(v*=7);d=9e15?crypto.randomBytes(7).copy(w,d):(E.push(p%1e14),d+=7);d=v/7}else throw P=!1,Error(Q+"crypto unavailable");if(!P)for(;d=10;p/=10,d++);da-1&&(p[v+1]==null&&(p[v+1]=0),p[v+1]+=p[v]/a|0,p[v]%=a)}return p.reverse()}return function(u,w,a,y,v){var p,d,E,x,L,R,A,k,$=u.indexOf("."),X=h,I=f;for($>=0&&(x=O,O=0,u=u.replace(".",""),k=new b(w),R=k.pow(u.length-$),O=x,k.c=o(oe(j(R.c),R.e,"0"),10,a,s),k.e=k.c.length),A=o(u,w,a,v?(p=N,s):(p=s,N)),E=x=A.length;A[--x]==0;A.pop());if(!A[0])return p.charAt(0);if($<0?--E:(R.c=A,R.e=E,R.s=y,R=e(R,k,X,I,a),A=R.c,L=R.r,E=R.e),d=E+X+1,$=A[d],x=a/2,L=L||d<0||A[d+1]!=null,L=I<4?($!=null||L)&&(I==0||I==(R.s<0?3:2)):$>x||$==x&&(I==4||L||I==6&&A[d-1]&1||I==(R.s<0?8:7)),d<1||!A[0])u=L?oe(p.charAt(1),-X,p.charAt(0)):p.charAt(0);else{if(A.length=d,L)for(--a;++A[--d]>a;)A[d]=0,d||(++E,A=[1].concat(A));for(x=A.length;!A[--x];);for($=0,u="";$<=x;u+=p.charAt(A[$++]));u=oe(u,E,p.charAt(0))}return u}})(),e=(function(){function s(w,a,y){var v,p,d,E,x=0,L=w.length,R=a%he,A=a/he|0;for(w=w.slice();L--;)d=w[L]%he,E=w[L]/he|0,v=A*d+E*R,p=R*d+v%he*he+x,x=(p/y|0)+(v/he|0)+A*E,w[L]=p%y;return x&&(w=[x].concat(w)),w}function o(w,a,y,v){var p,d;if(y!=v)d=y>v?1:-1;else for(p=d=0;pa[p]?1:-1;break}return d}function u(w,a,y,v){for(var p=0;y--;)w[y]-=p,p=w[y]1;w.splice(0,1));}return function(w,a,y,v,p){var d,E,x,L,R,A,k,$,X,I,D,H,Se,ke,Be,ie,ge,J=w.s==a.s?1:-1,W=w.c,V=a.c;if(!W||!W[0]||!V||!V[0])return new b(!w.s||!a.s||(W?V&&W[0]==V[0]:!V)?NaN:W&&W[0]==0||!V?J*0:J/0);for($=new b(J),X=$.c=[],E=w.e-a.e,J=y+E+1,p||(p=ne,E=te(w.e/C)-te(a.e/C),J=J/C|0),x=0;V[x]==(W[x]||0);x++);if(V[x]>(W[x]||0)&&E--,J<0)X.push(1),L=!0;else{for(ke=W.length,ie=V.length,x=0,J+=2,R=ee(p/(V[0]+1)),R>1&&(V=s(V,R,p),W=s(W,R,p),ie=V.length,ke=W.length),Se=ie,I=W.slice(0,ie),D=I.length;D=p/2&&Be++;do{if(R=0,d=o(V,I,ie,D),d<0){if(H=I[0],ie!=D&&(H=H*p+(I[1]||0)),R=ee(H/Be),R>1)for(R>=p&&(R=p-1),A=s(V,R,p),k=A.length,D=I.length;o(A,I,k,D)==1;)R--,u(A,ie=10;J/=10,x++);F($,y+($.e=x+E*C-1)+1,v,L)}else $.e=E,$.r=+L;return $}})();function B(s,o,u,w){var a,y,v,p,d;if(u==null?u=f:U(u,0,8),!s.c)return s.toString();if(a=s.c[0],v=s.e,o==null)d=j(s.c),d=w==1||w==2&&(v<=g||v>=c)?be(d,v):oe(d,v,"0");else if(s=F(new b(s),o,u),y=s.e,d=j(s.c),p=d.length,w==1||w==2&&(o<=y||y<=g)){for(;pv),d=oe(d,y,"0"),y+1>p){if(--o>0)for(d+=".";o--;d+="0");}else if(o+=y-p,o>0)for(y+1==p&&(d+=".");o--;d+="0");return s.s<0&&a?"-"+d:d}function G(s,o){for(var u,w,a=1,y=new b(s[0]);a=10;a/=10,w++);return(u=w+u*C-1)>m?s.c=s.e=null:u=10;p/=10,a++);if(y=o-a,y<0)y+=C,v=o,d=L[E=0],x=ee(d/R[a-v-1]%10);else if(E=Ge((y+1)/C),E>=L.length)if(w){for(;L.length<=E;L.push(0));d=x=0,a=1,y%=C,v=y-C+1}else break e;else{for(d=p=L[E],a=1;p>=10;p/=10,a++);y%=C,v=y-C+a,x=v<0?0:ee(d/R[a-v-1]%10)}if(w=w||o<0||L[E+1]!=null||(v<0?d:d%R[a-v-1]),w=u<4?(x||w)&&(u==0||u==(s.s<0?3:2)):x>5||x==5&&(u==4||w||u==6&&(y>0?v>0?d/R[a-v]:0:L[E-1])%10&1||u==(s.s<0?8:7)),o<1||!L[0])return L.length=0,w?(o-=s.e+1,L[0]=R[(C-o%C)%C],s.e=-o||0):L[0]=s.e=0,s;if(y==0?(L.length=E,p=1,E--):(L.length=E+1,p=R[C-y],L[E]=v>0?ee(d/R[a-v]%R[v])*p:0),w)for(;;)if(E==0){for(y=1,v=L[0];v>=10;v/=10,y++);for(v=L[0]+=p,p=1;v>=10;v/=10,p++);y!=p&&(s.e++,L[0]==ne&&(L[0]=1));break}else{if(L[E]+=p,L[E]!=ne)break;L[E--]=0,p=1}for(y=L.length;L[--y]===0;L.pop());}s.e>m?s.c=s.e=null:s.e=c?be(o,u):oe(o,u,"0"),s.s<0?"-"+o:o)}return r.absoluteValue=r.abs=function(){var s=new b(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,o){return ce(this,new b(s,o))},r.decimalPlaces=r.dp=function(s,o){var u,w,a,y=this;if(s!=null)return U(s,0,K),o==null?o=f:U(o,0,8),F(new b(y),s+y.e+1,o);if(!(u=y.c))return null;if(w=((a=u.length-1)-te(this.e/C))*C,a=u[a])for(;a%10==0;a/=10,w--);return w<0&&(w=0),w},r.dividedBy=r.div=function(s,o){return e(this,new b(s,o),h,f)},r.dividedToIntegerBy=r.idiv=function(s,o){return e(this,new b(s,o),0,1)},r.exponentiatedBy=r.pow=function(s,o){var u,w,a,y,v,p,d,E,x,L=this;if(s=new b(s),s.c&&!s.isInteger())throw Error(Q+"Exponent not an integer: "+z(s));if(o!=null&&(o=new b(o)),p=s.e>14,!L.c||!L.c[0]||L.c[0]==1&&!L.e&&L.c.length==1||!s.c||!s.c[0])return x=new b(Math.pow(+z(L),p?s.s*(2-Pe(s)):+z(s))),o?x.mod(o):x;if(d=s.s<0,o){if(o.c?!o.c[0]:!o.s)return new b(NaN);w=!d&&L.isInteger()&&o.isInteger(),w&&(L=L.mod(o))}else{if(s.e>9&&(L.e>0||L.e<-1||(L.e==0?L.c[0]>1||p&&L.c[1]>=24e7:L.c[0]<8e13||p&&L.c[0]<=9999975e7)))return y=L.s<0&&Pe(s)?-0:0,L.e>-1&&(y=1/y),new b(d?1/y:y);O&&(y=Ge(O/C+2))}for(p?(u=new b(.5),d&&(s.s=1),E=Pe(s)):(a=Math.abs(+z(s)),E=a%2),x=new b(l);;){if(E){if(x=x.times(L),!x.c)break;y?x.c.length>y&&(x.c.length=y):w&&(x=x.mod(o))}if(a){if(a=ee(a/2),a===0)break;E=a%2}else if(s=s.times(u),F(s,s.e+1,1),s.e>14)E=Pe(s);else{if(a=+z(s),a===0)break;E=a%2}L=L.times(L),y?L.c&&L.c.length>y&&(L.c.length=y):w&&(L=L.mod(o))}return w?x:(d&&(x=l.div(x)),o?x.mod(o):y?F(x,O,f,v):x)},r.integerValue=function(s){var o=new b(this);return s==null?s=f:U(s,0,8),F(o,o.e+1,s)},r.isEqualTo=r.eq=function(s,o){return ce(this,new b(s,o))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,o){return ce(this,new b(s,o))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,o){return(o=ce(this,new b(s,o)))===1||o===0},r.isInteger=function(){return!!this.c&&te(this.e/C)>this.c.length-2},r.isLessThan=r.lt=function(s,o){return ce(this,new b(s,o))<0},r.isLessThanOrEqualTo=r.lte=function(s,o){return(o=ce(this,new b(s,o)))===-1||o===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(s,o){var u,w,a,y,v=this,p=v.s;if(s=new b(s,o),o=s.s,!p||!o)return new b(NaN);if(p!=o)return s.s=-o,v.plus(s);var d=v.e/C,E=s.e/C,x=v.c,L=s.c;if(!d||!E){if(!x||!L)return x?(s.s=-o,s):new b(L?v:NaN);if(!x[0]||!L[0])return L[0]?(s.s=-o,s):new b(x[0]?v:f==3?-0:0)}if(d=te(d),E=te(E),x=x.slice(),p=d-E){for((y=p<0)?(p=-p,a=x):(E=d,a=L),a.reverse(),o=p;o--;a.push(0));a.reverse()}else for(w=(y=(p=x.length)<(o=L.length))?p:o,p=o=0;o0)for(;o--;x[u++]=0);for(o=ne-1;w>p;){if(x[--w]=0;){for(u=0,R=H[a]%X,A=H[a]/X|0,v=d,y=a+v;y>a;)E=D[--v]%X,x=D[v]/X|0,p=A*E+x*R,E=R*E+p%X*X+k[y]+u,u=(E/$|0)+(p/X|0)+A*x,k[y--]=E%$;k[y]=u}return u?++w:k.splice(0,1),q(s,k,w)},r.negated=function(){var s=new b(this);return s.s=-s.s||null,s},r.plus=function(s,o){var u,w=this,a=w.s;if(s=new b(s,o),o=s.s,!a||!o)return new b(NaN);if(a!=o)return s.s=-o,w.minus(s);var y=w.e/C,v=s.e/C,p=w.c,d=s.c;if(!y||!v){if(!p||!d)return new b(a/0);if(!p[0]||!d[0])return d[0]?s:new b(p[0]?w:a*0)}if(y=te(y),v=te(v),p=p.slice(),a=y-v){for(a>0?(v=y,u=d):(a=-a,u=p),u.reverse();a--;u.push(0));u.reverse()}for(a=p.length,o=d.length,a-o<0&&(u=d,d=p,p=u,o=a),a=0;o;)a=(p[--o]=p[o]+d[o]+a)/ne|0,p[o]=ne===p[o]?0:p[o]%ne;return a&&(p=[a].concat(p),++v),q(s,p,v)},r.precision=r.sd=function(s,o){var u,w,a,y=this;if(s!=null&&s!==!!s)return U(s,1,K),o==null?o=f:U(o,0,8),F(new b(y),s,o);if(!(u=y.c))return null;if(a=u.length-1,w=a*C+1,a=u[a]){for(;a%10==0;a/=10,w--);for(a=u[0];a>=10;a/=10,w++);}return s&&y.e+1>w&&(w=y.e+1),w},r.shiftedBy=function(s){return U(s,-qe,qe),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,o,u,w,a,y=this,v=y.c,p=y.s,d=y.e,E=h+4,x=new b("0.5");if(p!==1||!v||!v[0])return new b(!p||p<0&&(!v||v[0])?NaN:v?y:1/0);if(p=Math.sqrt(+z(y)),p==0||p==1/0?(o=j(v),(o.length+d)%2==0&&(o+="0"),p=Math.sqrt(+o),d=te((d+1)/2)-(d<0||d%2),p==1/0?o="5e"+d:(o=p.toExponential(),o=o.slice(0,o.indexOf("e")+1)+d),u=new b(o)):u=new b(p+""),u.c[0]){for(d=u.e,p=d+E,p<3&&(p=0);;)if(a=u,u=x.times(a.plus(e(y,a,E,1))),j(a.c).slice(0,p)===(o=j(u.c)).slice(0,p))if(u.e0&&k>0){for(y=k%p||p,x=A.substr(0,y);y0&&(x+=E+A.slice(y)),R&&(x="-"+x)}w=L?x+(u.decimalSeparator||"")+((d=+u.fractionGroupSize)?L.replace(new RegExp("\\d{"+d+"}\\B","g"),"$&"+(u.fractionGroupSeparator||"")):L):x}return(u.prefix||"")+w+(u.suffix||"")},r.toFraction=function(s){var o,u,w,a,y,v,p,d,E,x,L,R,A=this,k=A.c;if(s!=null&&(p=new b(s),!p.isInteger()&&(p.c||p.s!==1)||p.lt(l)))throw Error(Q+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+z(p));if(!k)return new b(A);for(o=new b(l),E=u=new b(l),w=d=new b(l),R=j(k),y=o.e=R.length-A.e-1,o.c[0]=Fe[(v=y%C)<0?C+v:v],s=!s||p.comparedTo(o)>0?y>0?o:E:p,v=m,m=1/0,p=new b(R),d.c[0]=0;x=e(p,o,0,1),a=u.plus(x.times(w)),a.comparedTo(s)!=1;)u=w,w=a,E=d.plus(x.times(a=E)),d=a,o=p.minus(x.times(a=o)),p=a;return a=e(s.minus(u),w,0,1),d=d.plus(a.times(E)),u=u.plus(a.times(w)),d.s=E.s=A.s,y=y*2,L=e(E,w,y,f).minus(A).abs().comparedTo(e(d,u,y,f).minus(A).abs())<1?[E,w]:[d,u],m=v,L},r.toNumber=function(){return+z(this)},r.toPrecision=function(s,o){return s!=null&&U(s,1,K),B(this,s,o,2)},r.toString=function(s){var o,u=this,w=u.s,a=u.e;return a===null?w?(o="Infinity",w<0&&(o="-"+o)):o="NaN":(s==null?o=a<=g||a>=c?be(j(u.c),a):oe(j(u.c),a,"0"):s===10&&_?(u=F(new b(u),h+a+1,f),o=oe(j(u.c),u.e,"0")):(U(s,2,N.length,"Base"),o=n(oe(j(u.c),a,"0"),10,s,w,!0)),w<0&&u.c[0]&&(o="-"+o)),o},r.valueOf=r.toJSON=function(){return z(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,t!=null&&b.set(t),b}function te(t){var e=t|0;return t>0||t===e?e:e-1}function j(t){for(var e,n,i=1,r=t.length,l=t[0]+"";ic^n?1:-1;for(f=(g=r.length)<(c=l.length)?g:c,h=0;hl[h]^n?1:-1;return g==c?0:g>c^n?1:-1}function U(t,e,n,i){if(tn||t!==ee(t))throw Error(Q+(i||"Argument")+(typeof t=="number"?tn?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function Pe(t){var e=t.c.length-1;return te(t.e/C)==e&&t.c[e]%2!=0}function be(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function oe(t,e,n){var i,r;if(e<0){for(r=n+".";++e;r+=n);t=r+t}else if(i=t.length,++e>i){for(r=n,e-=i;--e;r+=n);t+=r}else e0){let c=h.left;if(c==null||(g=f(c.key,t),g>0&&(h.left=c.right,c.right=h,h=c,c=h.left,c==null)))break;n==null?i=h:n.left=h,n=h,h=c}else if(g<0){let c=h.right;if(c==null||(g=f(c.key,t),g<0&&(h.right=c.left,c.left=h,h=c,c=h.right,c==null)))break;r==null?l=h:r.right=h,r=h,h=c}else break;return r!=null&&(r.right=h.left,h.left=l),n!=null&&(n.left=h.right,h.right=i),this.root!==h&&(this.root=h,this.splayCount++),g}splayMin(t){let e=t,n=e.left;for(;n!=null;){const i=n;e.left=i.right,i.right=e,e=i,n=e.left}return e}splayMax(t){let e=t,n=e.right;for(;n!=null;){const i=n;e.right=i.left,i.left=e,e=i,n=e.right}return e}_delete(t){if(this.root==null||this.splay(t)!=0)return null;let n=this.root;const i=n,r=n.left;if(this.size--,r==null)this.root=n.right;else{const l=n.right;n=this.splayMax(r),n.right=l,this.root=n}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;const n=this.root;if(n==null){this.root=t;return}e<0?(t.left=n,t.right=n.right,n.right=null):(t.right=n,t.left=n.left,n.left=null),this.root=t}_first(){const t=this.root;return t==null?null:(this.root=this.splayMin(t),this.root)}_last(){const t=this.root;return t==null?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&this.splay(t)==0}defaultCompare(){return(t,e)=>te?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},Oe=class we extends At{root=null;compare;validKey;constructor(e,n){super(),this.compare=e??this.defaultCompare(),this.validKey=n??(i=>i!=null&&i!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(const n of e)this.delete(n)}forEach(e){const n=this[Symbol.iterator]();let i;for(;i=n.next(),!i.done;)e(i.value,i.value,this)}add(e){const n=this.splay(e);return n!=0&&this.addNewRoot(new ye(e),n),this}addAndReturn(e){const n=this.splay(e);return n!=0&&this.addNewRoot(new ye(e),n),this.root.key}addAll(e){for(const n of e)this.add(n)}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 i=this.root.left;if(i==null)return null;let r=i.right;for(;r!=null;)i=r,r=i.right;return i.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 i=this.root.right;if(i==null)return null;let r=i.left;for(;r!=null;)i=r,r=i.left;return i.key}retainAll(e){const n=new we(this.compare,this.validKey),i=this.modificationCount;for(const r of e){if(i!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(r)&&this.splay(r)==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(e){const n=new we(this.compare,this.validKey);for(const i of this)e.has(i)&&n.add(i);return n}difference(e){const n=new we(this.compare,this.validKey);for(const i of this)e.has(i)||n.add(i);return n}union(e){const n=this.clone();return n.addAll(e),n}clone(){const e=new we(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(e){if(e==null)return null;function n(r,l){let h,f;do{if(h=r.left,f=r.right,h!=null){const g=new ye(h.key);l.left=g,n(h,g)}if(f!=null){const g=new ye(f.key);l.right=g,r=f,l=g}}while(f!=null)}const i=new ye(e.key);return n(e,i),i}toSet(){return this.clone()}entries(){return new Ot(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new _t(this.wrap())}[Symbol.toStringTag]="[object Set]"},wt=class{tree;path=new Array;modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.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;const t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;t!=null;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let n=this.tree.getRoot();for(;n!=null;)this.path.push(n),n=n.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 t=this.path[this.path.length-1],e=t.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},_t=class extends wt{getValue(t){return t.key}},Ot=class extends wt{getValue(t){return[t.key,t.key]}},xt=t=>()=>t,$e=t=>{const e=t?(n,i)=>i.minus(n).abs().isLessThanOrEqualTo(t):xt(!1);return(n,i)=>e(n,i)?0:n.comparedTo(i)};function Nt(t){const e=t?(n,i,r,l,h)=>n.exponentiatedBy(2).isLessThanOrEqualTo(l.minus(i).exponentiatedBy(2).plus(h.minus(r).exponentiatedBy(2)).times(t)):xt(!1);return(n,i,r)=>{const l=n.x,h=n.y,f=r.x,g=r.y,c=h.minus(g).times(i.x.minus(f)).minus(l.minus(f).times(i.y.minus(g)));return e(c,l,h,f,g)?0:c.comparedTo(0)}}var Ct=t=>t,It=t=>{if(t){const e=new Oe($e(t)),n=new Oe($e(t)),i=(l,h)=>h.addAndReturn(l),r=l=>({x:i(l.x,e),y:i(l.y,n)});return r({x:new se(0),y:new se(0)}),r}return Ct},Ve=t=>({set:e=>{fe=Ve(e)},reset:()=>Ve(t),compare:$e(t),snap:It(t),orient:Nt(t)}),fe=Ve(),de=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),Xe=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;const n=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,i=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x,r=t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y,l=t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:i,y:l}}},Re=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),mt=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),Ne=t=>mt(t,t).sqrt(),kt=(t,e,n)=>{const i={x:e.x.minus(t.x),y:e.y.minus(t.y)},r={x:n.x.minus(t.x),y:n.y.minus(t.y)};return Re(r,i).div(Ne(r)).div(Ne(i))},Bt=(t,e,n)=>{const i={x:e.x.minus(t.x),y:e.y.minus(t.y)},r={x:n.x.minus(t.x),y:n.y.minus(t.y)};return mt(r,i).div(Ne(r)).div(Ne(i))},et=(t,e,n)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(n.minus(t.y))),y:n},tt=(t,e,n)=>e.x.isZero()?null:{x:n,y:t.y.plus(e.y.div(e.x).times(n.minus(t.x)))},Gt=(t,e,n,i)=>{if(e.x.isZero())return tt(n,i,t.x);if(i.x.isZero())return tt(t,e,n.x);if(e.y.isZero())return et(n,i,t.y);if(i.y.isZero())return et(t,e,n.y);const r=Re(e,i);if(r.isZero())return null;const l={x:n.x.minus(t.x),y:n.y.minus(t.y)},h=Re(l,e).div(r),f=Re(l,i).div(r),g=t.x.plus(f.times(e.x)),c=n.x.plus(h.times(i.x)),S=t.y.plus(f.times(e.y)),m=n.y.plus(h.times(i.y)),P=g.plus(c).div(2),T=S.plus(m).div(2);return{x:P,y:T}},re=class Et{point;isLeft;segment;otherSE;consumedBy;static compare(e,n){const i=Et.comparePoints(e.point,n.point);return i!==0?i:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Ce.compare(e.segment,n.segment))}static comparePoints(e,n){return e.x.isLessThan(n.x)?-1:e.x.isGreaterThan(n.x)?1:e.y.isLessThan(n.y)?-1:e.y.isGreaterThan(n.y)?1:0}constructor(e,n){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const n=e.point.events;for(let i=0,r=n.length;i{const l=r.otherSE;n.set(r,{sine:kt(this.point,e.point,l.point),cosine:Bt(this.point,e.point,l.point)})};return(r,l)=>{n.has(r)||i(r),n.has(l)||i(l);const{sine:h,cosine:f}=n.get(r),{sine:g,cosine:c}=n.get(l);return h.isGreaterThanOrEqualTo(0)&&g.isGreaterThanOrEqualTo(0)?f.isLessThan(c)?1:f.isGreaterThan(c)?-1:0:h.isLessThan(0)&&g.isLessThan(0)?f.isLessThan(c)?-1:f.isGreaterThan(c)?1:0:g.isLessThan(h)?-1:g.isGreaterThan(h)?1:0}}},qt=class Ke{events;poly;_isExteriorRing;_enclosingRing;static factory(e){const n=[];for(let i=0,r=e.length;i0&&(e=h)}let n=e.segment.prevInResult(),i=n?n.prevInResult():null;for(;;){if(!n)return null;if(!i)return n.ringOut;if(i.ringOut!==n.ringOut)return i.ringOut?.enclosingRing()!==n.ringOut?n.ringOut:n.ringOut?.enclosingRing();n=i.prevInResult(),i=n?n.prevInResult():null}}},nt=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=this.exteriorRing.getGeom();if(t===null)return null;const e=[t];for(let n=0,i=this.interiorRings.length;n0?(this.tree.delete(e),n.push(t)):(this.segments.push(e),e.prev=i)}else{if(i&&r){const l=i.getIntersection(r);if(l!==null){if(!i.isAnEndpoint(l)){const h=this._splitSafely(i,l);for(let f=0,g=h.length;f0)return-1;const P=n.comparePoint(e.rightSE.point);return P!==0?P:-1}if(i.isGreaterThan(r)){if(f.isLessThan(g)&&f.isLessThan(S))return-1;if(f.isGreaterThan(g)&&f.isGreaterThan(S))return 1;const m=n.comparePoint(e.leftSE.point);if(m!==0)return m;const P=e.comparePoint(n.rightSE.point);return P<0?1:P>0?-1:1}if(f.isLessThan(g))return-1;if(f.isGreaterThan(g))return 1;if(l.isLessThan(h)){const m=n.comparePoint(e.rightSE.point);if(m!==0)return m}if(l.isGreaterThan(h)){const m=e.comparePoint(n.rightSE.point);if(m<0)return 1;if(m>0)return-1}if(!l.eq(h)){const m=c.minus(f),P=l.minus(i),T=S.minus(g),O=h.minus(r);if(m.isGreaterThan(P)&&T.isLessThan(O))return 1;if(m.isLessThan(P)&&T.isGreaterThan(O))return-1}return l.isGreaterThan(h)?1:l.isLessThan(h)||c.isLessThan(S)?-1:c.isGreaterThan(S)?1:e.idn.id?1:0}constructor(e,n,i,r){this.id=++zt,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=i,this.windings=r}static fromRing(e,n,i){let r,l,h;const f=re.comparePoints(e,n);if(f<0)r=e,l=n,h=1;else if(f>0)r=n,l=e,h=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const g=new re(r,!0),c=new re(l,!1);return new Ae(g,c,[i],[h])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(n)?e:n},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(n)?e:n}}}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 fe.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const n=this.bbox(),i=e.bbox(),r=Xe(n,i);if(r===null)return null;const l=this.leftSE.point,h=this.rightSE.point,f=e.leftSE.point,g=e.rightSE.point,c=de(n,f)&&this.comparePoint(f)===0,S=de(i,l)&&e.comparePoint(l)===0,m=de(n,g)&&this.comparePoint(g)===0,P=de(i,h)&&e.comparePoint(h)===0;if(S&&c)return P&&!m?h:!P&&m?g:null;if(S)return m&&l.x.eq(g.x)&&l.y.eq(g.y)?null:l;if(c)return P&&h.x.eq(f.x)&&h.y.eq(f.y)?null:f;if(P&&m)return null;if(P)return h;if(m)return g;const T=Gt(l,this.vector(),f,e.vector());return T===null||!de(r,T)?null:fe.snap(T)}split(e){const n=[],i=e.events!==void 0,r=new re(e,!0),l=new re(e,!1),h=this.rightSE;this.replaceRightSE(l),n.push(l),n.push(r);const f=new Ae(r,h,this.rings.slice(),this.windings.slice());return re.comparePoints(f.leftSE.point,f.rightSE.point)>0&&f.swapEvents(),re.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),l.checkForConsuming()),n}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let n=0,i=this.windings.length;n0){const l=n;n=i,i=l}if(n.prev===i){const l=n;n=i,i=l}for(let l=0,h=i.rings.length;lr.length===1&&r[0].isSubject;this._isInResult=i(e)!==i(n);break}}return this._isInResult}},it=class{poly;isExterior;segments;bbox;constructor(t,e,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=fe.snap({x:new se(t[0][0]),y:new se(t[0][1])});this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let r=i;for(let l=1,h=t.length;lme.run("union",t,e),Xt=(t,...e)=>me.run("intersection",t,e),Kt=(t,...e)=>me.run("difference",t,e);fe.set;function Ht(t,e={}){const n=[];if(Ee(t,r=>{n.push(r.coordinates)}),n.length<2)throw new Error("Must specify at least 2 geometries");const i=Xt(n[0],...n.slice(1));return i.length===0?null:i.length===1?Ye(i[0],e.properties):We(i,e.properties)}var Rn=Ht;function Yt(t,e={}){const n=[];if(Ee(t,r=>{n.push(r.coordinates)}),n.length<2)throw new Error("Must have at least 2 geometries");const i=Vt(n[0],...n.slice(1));return i.length===0?null:i.length===1?Ye(i[0],e.properties):We(i,e.properties)}var An=Yt;function Wt(t){const e=[];if(Ee(t,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const n=t.features[0].properties||{},i=Kt(e[0],...e.slice(1));return i.length===0?null:i.length===1?Ye(i[0],n):We(i,n)}var _n=Wt;const le=11102230246251565e-32,Y=134217729,Zt=(3+8*le)*le;function De(t,e,n,i,r){let l,h,f,g,c=e[0],S=i[0],m=0,P=0;S>c==S>-c?(l=c,c=e[++m]):(l=S,S=i[++P]);let T=0;if(mc==S>-c?(h=c+l,f=l-(h-c),c=e[++m]):(h=S+l,f=l-(h-S),S=i[++P]),l=h,f!==0&&(r[T++]=f);mc==S>-c?(h=l+c,g=h-l,f=l-(h-g)+(c-g),c=e[++m]):(h=l+S,g=h-l,f=l-(h-g)+(S-g),S=i[++P]),l=h,f!==0&&(r[T++]=f);for(;m=v||-y>=v||(m=t-o,f=t-(o+m)+(m-r),m=n-u,c=n-(u+m)+(m-r),m=e-w,g=e-(w+m)+(m-l),m=i-a,S=i-(a+m)+(m-l),f===0&&g===0&&c===0&&S===0)||(v=en*h+Zt*Math.abs(y),y+=o*S+a*f-(w*c+u*g),y>=v||-y>=v))return y;G=f*a,P=Y*f,T=P-(P-f),O=f-T,P=Y*a,M=P-(P-a),N=a-M,q=O*N-(G-T*M-O*M-T*N),F=g*u,P=Y*g,T=P-(P-g),O=g-T,P=Y*u,M=P-(P-u),N=u-M,z=O*N-(F-T*M-O*M-T*N),_=q-z,m=q-_,Z[0]=q-(_+m)+(m-z),b=G+_,m=b-G,B=G-(b-m)+(_-m),_=B-F,m=B-_,Z[1]=B-(_+m)+(m-F),s=b+_,m=s-b,Z[2]=b-(s-m)+(_-m),Z[3]=s;const p=De(4,ae,4,Z,st);G=o*S,P=Y*o,T=P-(P-o),O=o-T,P=Y*S,M=P-(P-S),N=S-M,q=O*N-(G-T*M-O*M-T*N),F=w*c,P=Y*w,T=P-(P-w),O=w-T,P=Y*c,M=P-(P-c),N=c-M,z=O*N-(F-T*M-O*M-T*N),_=q-z,m=q-_,Z[0]=q-(_+m)+(m-z),b=G+_,m=b-G,B=G-(b-m)+(_-m),_=B-F,m=B-_,Z[1]=B-(_+m)+(m-F),s=b+_,m=s-b,Z[2]=b-(s-m)+(_-m),Z[3]=s;const d=De(p,st,4,Z,ot);G=f*S,P=Y*f,T=P-(P-f),O=f-T,P=Y*S,M=P-(P-S),N=S-M,q=O*N-(G-T*M-O*M-T*N),F=g*c,P=Y*g,T=P-(P-g),O=g-T,P=Y*c,M=P-(P-c),N=c-M,z=O*N-(F-T*M-O*M-T*N),_=q-z,m=q-_,Z[0]=q-(_+m)+(m-z),b=G+_,m=b-G,B=G-(b-m)+(_-m),_=B-F,m=B-_,Z[1]=B-(_+m)+(m-F),s=b+_,m=s-b,Z[2]=b-(s-m)+(_-m),Z[3]=s;const E=De(d,ot,4,Z,lt);return lt[E-1]}function nn(t,e,n,i,r,l){const h=(e-l)*(n-r),f=(t-r)*(i-l),g=h-f,c=Math.abs(h+f);return Math.abs(g)>=Jt*c?g:-tn(t,e,n,i,r,l,c)}function rn(t,e){var n,i,r=0,l,h,f,g,c,S,m,P=t[0],T=t[1],O=e.length;for(n=0;n=0||h<=0&&g>=0)return 0}else if(c>=0&&f<=0||c<=0&&f>=0){if(l=nn(h,g,f,c,0,0),l===0)return 0;(l>0&&c>0&&f<=0||l<0&&c<=0&&f>0)&&r++}S=m,f=c,h=g}}return r%2!==0}function sn(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ie(t){return t.type==="Feature"?t.geometry:t}function pe(t,e,n={}){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");const i=sn(t),r=Ie(e),l=r.type,h=e.bbox;let f=r.coordinates;if(h&&on(i,h)===!1)return!1;l==="Polygon"&&(f=[f]);let g=!1;for(var c=0;c=t[0]&&e[3]>=t[1]}var On=pe;class vt{constructor(e=[],n=ln){if(this.data=e,this.length=this.data.length,this.compare=n,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:n,compare:i}=this,r=n[e];for(;e>0;){const l=e-1>>1,h=n[l];if(i(r,h)>=0)break;n[e]=h,e=l}n[e]=r}_down(e){const{data:n,compare:i}=this,r=this.length>>1,l=n[e];for(;e=0)break;n[e]=f,e=h}n[e]=l}}function ln(t,e){return te?1:0}function St(t,e){return t.p.x>e.p.x?1:t.p.xe.p.y?1:-1:1}function un(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x0?(S.isLeftEndpoint=!0,c.isLeftEndpoint=!1):(c.isLeftEndpoint=!0,S.isLeftEndpoint=!1),e.push(c),e.push(S),h=f,Me=Me+1}}Le=Le+1}class hn{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}}function cn(t,e){if(t===null||e===null||t.leftSweepEvent.ringId===e.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.rightSweepEvent)||t.leftSweepEvent.isSamePoint(e.leftSweepEvent)||t.leftSweepEvent.isSamePoint(e.rightSweepEvent)))return!1;const n=t.leftSweepEvent.p.x,i=t.leftSweepEvent.p.y,r=t.rightSweepEvent.p.x,l=t.rightSweepEvent.p.y,h=e.leftSweepEvent.p.x,f=e.leftSweepEvent.p.y,g=e.rightSweepEvent.p.x,c=e.rightSweepEvent.p.y,S=(c-f)*(r-n)-(g-h)*(l-i),m=(g-h)*(i-f)-(c-f)*(n-h),P=(r-n)*(i-f)-(l-i)*(n-h);if(S===0)return!1;const T=m/S,O=P/S;if(T>=0&&T<=1&&O>=0&&O<=1){const M=n+T*(r-n),N=i+T*(l-i);return[M,N]}return!1}function an(t,e){e=e||!1;const n=[],i=new vt([],un);for(;t.length;){const r=t.pop();if(r.isLeftEndpoint){const l=new hn(r);for(let h=0;h{const S=c.join(",");g[S]||(g[S]=!0,f.push(c))})}else f=h;return ze(f.map(g=>gt(g)))}function He(t,e={}){const n=Ie(t);switch(!e.properties&&t.type==="Feature"&&(e.properties=t.properties),n.type){case"Polygon":return yn(n,e);case"MultiPolygon":return dn(n,e);default:throw new Error("invalid poly")}}function yn(t,e={}){const i=Ie(t).coordinates,r=e.properties?e.properties:t.type==="Feature"?t.properties:{};return Pt(i,r)}function dn(t,e={}){const i=Ie(t).coordinates,r=e.properties?e.properties:t.type==="Feature"?t.properties:{},l=[];return i.forEach(h=>{l.push(Pt(h,r))}),ze(l)}function Pt(t,e){return t.length>1?Lt(t,e):bt(t[0],e)}function wn(t,e,{ignoreSelfIntersections:n=!0}={ignoreSelfIntersections:!0}){let i=!0;return _e(t,r=>{_e(e,l=>{if(i===!1)return!1;i=xn(r.geometry,l.geometry,n)})}),i}function xn(t,e,n){switch(t.type){case"Point":switch(e.type){case"Point":return!Sn(t.coordinates,e.coordinates);case"LineString":return!ht(e,t);case"Polygon":return!pe(t,e)}break;case"LineString":switch(e.type){case"Point":return!ht(t,e);case"LineString":return!mn(t,e,n);case"Polygon":return!ct(e,t,n)}break;case"Polygon":switch(e.type){case"Point":return!pe(e,t);case"LineString":return!ct(t,e,n);case"Polygon":return!En(e,t,n)}}return!1}function ht(t,e){for(let n=0;n0}function ct(t,e,n){for(const r of e.coordinates)if(pe(r,t))return!0;return Ze(e,He(t),{ignoreSelfIntersections:n}).features.length>0}function En(t,e,n){for(const r of t.coordinates[0])if(pe(r,e))return!0;for(const r of e.coordinates[0])if(pe(r,t))return!0;return Ze(He(t),He(e),{ignoreSelfIntersections:n}).features.length>0}function vn(t,e,n){const i=n[0]-t[0],r=n[1]-t[1],l=e[0]-t[0],h=e[1]-t[1];return i*h-r*l!==0?!1:Math.abs(l)>=Math.abs(h)?l>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:h>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]}function Sn(t,e){return t[0]===e[0]&&t[1]===e[1]}function Pn(t,e,{ignoreSelfIntersections:n=!0}={}){let i=!1;return _e(t,r=>{_e(e,l=>{if(i===!0)return!0;i=!wn(r.geometry,l.geometry,{ignoreSelfIntersections:n})})}),i}var Nn=Pn;function bn(t,e={}){let n=0,i=0,r=0;return yt(t,function(l){n+=l[0],i+=l[1],r++}),gt([n/r,i/r],e.properties)}var Cn=bn;function Ln(t){return Tt(t,(e,n)=>e+Tn(n),0)}function Tn(t){let e=0,n;switch(t.type){case"Polygon":return at(t.coordinates);case"MultiPolygon":for(n=0;n0){e+=Math.abs(pt(t[0]));for(let n=1;n=e?(i+2)%e:i+2],f=r[0]*Ue,g=l[1]*Ue,c=h[0]*Ue;n+=(c-f)*Math.sin(g),i++}return n*Mn}var In=Ln;export{_n as a,Rn as b,Cn as c,On as d,Nn as e,ze as f,In as g,An as i}; //# sourceMappingURL=turf-B-0GbNlN.js.map