@maplat/tin 0.9.3 → 0.11.0
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/README.ja.md +121 -0
- package/README.md +122 -111
- package/dist/index.d.ts +196 -0
- package/dist/index.html +42 -0
- package/dist/maplat_tin.cjs +3 -0
- package/dist/maplat_tin.js +3291 -0
- package/dist/maplat_tin.umd.js +3 -0
- package/package.json +64 -58
- package/src/constrained-tin.ts +78 -0
- package/src/index.ts +934 -0
- package/src/kinks.ts +1033 -0
- package/src/searchutils.ts +67 -0
- package/src/types/cdt2d.d.ts +4 -0
- package/src/types/constrainautor.d.ts +6 -0
- package/src/vertexutils.ts +81 -0
- package/es5/index.js +0 -3
- package/es5/index.js.LICENSE.txt +0 -10
- package/es5/index.js.map +0 -1
- package/lib/booleanPointInPolygon.d.ts +0 -4
- package/lib/booleanPointInPolygon.js +0 -103
- package/lib/booleanPointInPolygon.js.map +0 -1
- package/lib/constrained-tin.d.ts +0 -4
- package/lib/constrained-tin.js +0 -41
- package/lib/constrained-tin.js.map +0 -1
- package/lib/index.d.ts +0 -157
- package/lib/index.js +0 -1472
- package/lib/index.js.map +0 -1
- package/lib/kinks.d.ts +0 -2
- package/lib/kinks.js +0 -669
- package/lib/kinks.js.map +0 -1
package/es5/index.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(t,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e=r();for(var n in e)("object"==typeof exports?exports:t)[n]=e[n]}}(this,(()=>(()=>{var t={9705:(t,r,e)=>{"use strict";var n=e(1540);function i(t){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){r[0]>t[0]&&(r[0]=t[0]),r[1]>t[1]&&(r[1]=t[1]),r[2]<t[0]&&(r[2]=t[0]),r[3]<t[1]&&(r[3]=t[1])})),r}i.default=i,r.Z=i},4102:(t,r)=>{"use strict";function e(t,r,e){void 0===e&&(e={});var n={type:"Feature"};return(0===e.id||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=r||{},n.geometry=t,n}function n(t,r,n){if(void 0===n&&(n={}),!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(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:t},r,n)}function i(t,r,n){void 0===n&&(n={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:t},r,n)}function o(t,r,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:t},r,n)}function s(t,r){void 0===r&&(r={});var e={type:"FeatureCollection"};return r.id&&(e.id=r.id),r.bbox&&(e.bbox=r.bbox),e.features=t,e}function a(t,r,n){return void 0===n&&(n={}),e({type:"MultiLineString",coordinates:t},r,n)}function u(t,r,n){return void 0===n&&(n={}),e({type:"MultiPoint",coordinates:t},r,n)}function c(t,r,n){return void 0===n&&(n={}),e({type:"MultiPolygon",coordinates:t},r,n)}function f(t,e){void 0===e&&(e="kilometers");var n=r.factors[e];if(!n)throw new Error(e+" units is invalid");return t*n}function h(t,e){void 0===e&&(e="kilometers");var n=r.factors[e];if(!n)throw new Error(e+" units is invalid");return t/n}function l(t){return t%(2*Math.PI)*180/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=6371008.8,r.factors={centimeters:100*r.earthRadius,centimetres:100*r.earthRadius,degrees:r.earthRadius/111325,feet:3.28084*r.earthRadius,inches:39.37*r.earthRadius,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:1e3*r.earthRadius,millimetres:1e3*r.earthRadius,nauticalmiles:r.earthRadius/1852,radians:1,yards:1.0936*r.earthRadius},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},r.feature=e,r.geometry=function(t,r,e){switch(void 0===e&&(e={}),t){case"Point":return n(r).geometry;case"LineString":return o(r).geometry;case"Polygon":return i(r).geometry;case"MultiPoint":return u(r).geometry;case"MultiLineString":return a(r).geometry;case"MultiPolygon":return c(r).geometry;default:throw new Error(t+" is invalid")}},r.point=n,r.points=function(t,r,e){return void 0===e&&(e={}),s(t.map((function(t){return n(t,r)})),e)},r.polygon=i,r.polygons=function(t,r,e){return void 0===e&&(e={}),s(t.map((function(t){return i(t,r)})),e)},r.lineString=o,r.lineStrings=function(t,r,e){return void 0===e&&(e={}),s(t.map((function(t){return o(t,r)})),e)},r.featureCollection=s,r.multiLineString=a,r.multiPoint=u,r.multiPolygon=c,r.geometryCollection=function(t,r,n){return void 0===n&&(n={}),e({type:"GeometryCollection",geometries:t},r,n)},r.round=function(t,r){if(void 0===r&&(r=0),r&&!(r>=0))throw new Error("precision must be a positive number");var e=Math.pow(10,r||0);return Math.round(t*e)/e},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,r){return l(h(t,r))},r.bearingToAzimuth=function(t){var r=t%360;return r<0&&(r+=360),r},r.radiansToDegrees=l,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,r,e){if(void 0===r&&(r="kilometers"),void 0===e&&(e="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(h(t,r),e)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var o=r.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o},r.isNumber=p,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},1540:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e(4102);function i(t,r,e){if(null!==t)for(var n,o,s,a,u,c,f,h,l=0,p=0,v=t.type,d="FeatureCollection"===v,g="Feature"===v,y=d?t.features.length:1,m=0;m<y;m++){u=(h=!!(f=d?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===f.type)?f.geometries.length:1;for(var x=0;x<u;x++){var b=0,w=0;if(null!==(a=h?f.geometries[x]:f)){c=a.coordinates;var _=a.type;switch(l=!e||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===r(c,p,m,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(!1===r(c[n],p,m,b,w))return!1;p++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(o=0;o<c[n].length-l;o++){if(!1===r(c[n][o],p,m,b,w))return!1;p++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(w=0,o=0;o<c[n].length;o++){for(s=0;s<c[n][o].length-l;s++){if(!1===r(c[n][o][s],p,m,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===i(a.geometries[n],r,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,r){var e;switch(t.type){case"FeatureCollection":for(e=0;e<t.features.length&&!1!==r(t.features[e].properties,e);e++);break;case"Feature":r(t.properties,0)}}function s(t,r){if("Feature"===t.type)r(t,0);else if("FeatureCollection"===t.type)for(var e=0;e<t.features.length&&!1!==r(t.features[e],e);e++);}function a(t,r){var e,n,i,o,s,a,u,c,f,h,l=0,p="FeatureCollection"===t.type,v="Feature"===t.type,d=p?t.features.length:1;for(e=0;e<d;e++){for(a=p?t.features[e].geometry:v?t.geometry:t,c=p?t.features[e].properties:v?t.properties:{},f=p?t.features[e].bbox:v?t.bbox:void 0,h=p?t.features[e].id:v?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===r(o,l,c,f,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===r(o.geometries[n],l,c,f,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===r(null,l,c,f,h))return!1;l++}}function u(t,r){a(t,(function(t,e,i,o,s){var a,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==r(n.feature(t,i,{bbox:o,id:s}),e,0)&&void 0}switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var c=0;c<t.coordinates.length;c++){var f={type:a,coordinates:t.coordinates[c]};if(!1===r(n.feature(f,i),e,c))return!1}}))}function c(t,r){u(t,(function(t,e,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var u,c=0,f=0,h=0;return!1!==i(t,(function(i,a,l,p,v){if(void 0===u||e>c||p>f||v>h)return u=i,c=e,f=p,h=v,void(s=0);var d=n.lineString([u,i],t.properties);if(!1===r(d,e,o,v,s))return!1;s++,u=i}))&&void 0}}}))}function f(t,r){if(!t)throw new Error("geojson is required");u(t,(function(t,e,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===r(t,e,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===r(n.lineString(s[a],t.properties),e,i,a))return!1}}}))}r.coordAll=function(t){var r=[];return i(t,(function(t){r.push(t)})),r},r.coordEach=i,r.coordReduce=function(t,r,e,n){var o=e;return i(t,(function(t,n,i,s,a){o=0===n&&void 0===e?t:r(o,t,n,i,s,a)}),n),o},r.featureEach=s,r.featureReduce=function(t,r,e){var n=e;return s(t,(function(t,i){n=0===i&&void 0===e?t:r(n,t,i)})),n},r.findPoint=function(t,r){if(r=r||{},!n.isObject(r))throw new Error("options is invalid");var e,i=r.featureIndex||0,o=r.multiFeatureIndex||0,s=r.geometryIndex||0,a=r.coordIndex||0,u=r.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,e=t.features[i].geometry;break;case"Feature":u=u||t.properties,e=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":e=t;break;default:throw new Error("geojson is invalid")}if(null===e)return null;var c=e.coordinates;switch(e.type){case"Point":return n.point(c,u,r);case"MultiPoint":return o<0&&(o=c.length+o),n.point(c[o],u,r);case"LineString":return a<0&&(a=c.length+a),n.point(c[a],u,r);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a),n.point(c[s][a],u,r);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),n.point(c[o][a],u,r);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a),n.point(c[o][s][a],u,r)}throw new Error("geojson is invalid")},r.findSegment=function(t,r){if(r=r||{},!n.isObject(r))throw new Error("options is invalid");var e,i=r.featureIndex||0,o=r.multiFeatureIndex||0,s=r.geometryIndex||0,a=r.segmentIndex||0,u=r.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,e=t.features[i].geometry;break;case"Feature":u=u||t.properties,e=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":e=t;break;default:throw new Error("geojson is invalid")}if(null===e)return null;var c=e.coordinates;switch(e.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=c.length+a-1),n.lineString([c[a],c[a+1]],u,r);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a-1),n.lineString([c[s][a],c[s][a+1]],u,r);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a-1),n.lineString([c[o][a],c[o][a+1]],u,r);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a-1),n.lineString([c[o][s][a],c[o][s][a+1]],u,r)}throw new Error("geojson is invalid")},r.flattenEach=u,r.flattenReduce=function(t,r,e){var n=e;return u(t,(function(t,i,o){n=0===i&&0===o&&void 0===e?t:r(n,t,i,o)})),n},r.geomEach=a,r.geomReduce=function(t,r,e){var n=e;return a(t,(function(t,i,o,s,a){n=0===i&&void 0===e?t:r(n,t,i,o,s,a)})),n},r.lineEach=f,r.lineReduce=function(t,r,e){var n=e;return f(t,(function(t,i,o,s){n=0===i&&void 0===e?t:r(n,t,i,o,s)})),n},r.propEach=o,r.propReduce=function(t,r,e){var n=e;return o(t,(function(t,i){n=0===i&&void 0===e?t:r(n,t,i)})),n},r.segmentEach=c,r.segmentReduce=function(t,r,e){var n=e,i=!1;return c(t,(function(t,o,s,a,u){n=!1===i&&void 0===e?t:r(n,t,o,s,a,u),i=!0})),n}},2273:(t,r,e)=>{"use strict";var n=e(1662),i=e(3842),o=e(6960),s=e(6287).orient2d;function a(t,r,e){r=Math.max(0,void 0===r?2:r),e=e||0;var i=function(t){for(var r=t[0],e=t[0],n=t[0],i=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<r[0]&&(r=a),a[0]>n[0]&&(n=a),a[1]<e[1]&&(e=a),a[1]>i[1]&&(i=a)}var u=[r,e,n,i],c=u.slice();for(s=0;s<t.length;s++)o(t[s],u)||c.push(t[s]);return function(t){t.sort(x);for(var r=[],e=0;e<t.length;e++){for(;r.length>=2&&p(r[r.length-2],r[r.length-1],t[e])<=0;)r.pop();r.push(t[e])}for(var n=[],i=t.length-1;i>=0;i--){for(;n.length>=2&&p(n[n.length-2],n[n.length-1],t[i])<=0;)n.pop();n.push(t[i])}return n.pop(),r.pop(),r.concat(n)}(c)}(t),s=new n(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,r){return t[0]-r[0]},s.compareMinY=function(t,r){return t[1]-r[1]},s.load(t);for(var a,c=[],f=0;f<i.length;f++){var h=i[f];s.remove(h),a=d(h,a),c.push(a)}var l=new n(16);for(f=0;f<c.length;f++)l.insert(v(c[f]));for(var y=r*r,m=e*e;c.length;){var b=c.shift(),w=b.p,_=b.next.p,S=g(w,_);if(!(S<m)){var E=S/y;(h=u(s,b.prev.p,w,_,b.next.next.p,E,l))&&Math.min(g(h,w),g(h,_))<=E&&(c.push(b),c.push(d(h,b)),s.remove(h),l.remove(b),l.insert(v(b)),l.insert(v(b.next)))}}b=a;var k=[];do{k.push(b.p),b=b.next}while(b!==a);return k.push(b.p),k}function u(t,r,e,n,o,s,a){for(var u=new i([],c),h=t.data;h;){for(var p=0;p<h.children.length;p++){var v=h.children[p],d=h.leaf?y(v,e,n):f(e,n,v);d>s||u.push({node:v,dist:d})}for(;u.length&&!u.peek().node.children;){var g=u.pop(),m=g.node,x=y(m,r,e),b=y(m,n,o);if(g.dist<x&&g.dist<b&&l(e,m,a)&&l(n,m,a))return m}(h=u.pop())&&(h=h.node)}return null}function c(t,r){return t.dist-r.dist}function f(t,r,e){if(h(t,e)||h(r,e))return 0;var n=m(t[0],t[1],r[0],r[1],e.minX,e.minY,e.maxX,e.minY);if(0===n)return 0;var i=m(t[0],t[1],r[0],r[1],e.minX,e.minY,e.minX,e.maxY);if(0===i)return 0;var o=m(t[0],t[1],r[0],r[1],e.maxX,e.minY,e.maxX,e.maxY);if(0===o)return 0;var s=m(t[0],t[1],r[0],r[1],e.minX,e.maxY,e.maxX,e.maxY);return 0===s?0:Math.min(n,i,o,s)}function h(t,r){return t[0]>=r.minX&&t[0]<=r.maxX&&t[1]>=r.minY&&t[1]<=r.maxY}function l(t,r,e){for(var n,i,o,s,a=Math.min(t[0],r[0]),u=Math.min(t[1],r[1]),c=Math.max(t[0],r[0]),f=Math.max(t[1],r[1]),h=e.search({minX:a,minY:u,maxX:c,maxY:f}),l=0;l<h.length;l++)if(n=h[l].p,i=h[l].next.p,o=t,n!==(s=r)&&i!==o&&p(n,i,o)>0!=p(n,i,s)>0&&p(o,s,n)>0!=p(o,s,i)>0)return!1;return!0}function p(t,r,e){return s(t[0],t[1],r[0],r[1],e[0],e[1])}function v(t){var r=t.p,e=t.next.p;return t.minX=Math.min(r[0],e[0]),t.minY=Math.min(r[1],e[1]),t.maxX=Math.max(r[0],e[0]),t.maxY=Math.max(r[1],e[1]),t}function d(t,r){var e={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return r?(e.next=r.next,e.prev=r,r.next.prev=e,r.next=e):(e.prev=e,e.next=e),e}function g(t,r){var e=t[0]-r[0],n=t[1]-r[1];return e*e+n*n}function y(t,r,e){var n=r[0],i=r[1],o=e[0]-n,s=e[1]-i;if(0!==o||0!==s){var a=((t[0]-n)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(n=e[0],i=e[1]):a>0&&(n+=o*a,i+=s*a)}return(o=t[0]-n)*o+(s=t[1]-i)*s}function m(t,r,e,n,i,o,s,a){var u,c,f,h,l=e-t,p=n-r,v=s-i,d=a-o,g=t-i,y=r-o,m=l*l+p*p,x=l*v+p*d,b=v*v+d*d,w=l*g+p*y,_=v*g+d*y,S=m*b-x*x,E=S,k=S;0===S?(c=0,E=1,h=_,k=b):(h=m*_-x*w,(c=x*_-b*w)<0?(c=0,h=_,k=b):c>E&&(c=E,h=_+x,k=b)),h<0?(h=0,-w<0?c=0:-w>m?c=E:(c=-w,E=m)):h>k&&(h=k,-w+x<0?c=0:-w+x>m?c=E:(c=-w+x,E=m));var M=(1-(f=0===h?0:h/k))*i+f*s-((1-(u=0===c?0:c/E))*t+u*e),A=(1-f)*o+f*a-((1-u)*r+u*n);return M*M+A*A}function x(t,r){return t[0]===r[0]?t[1]-r[1]:t[0]-r[0]}i.default&&(i=i.default),t.exports=a,t.exports.default=a},1662:function(t){t.exports=function(){"use strict";function t(t,n,i,o,s){!function t(e,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=n-i+1,c=Math.log(a),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(a-f)/a)*(u-a/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-u*f/a+h)),Math.min(o,Math.floor(n+(a-u)*f/a+h)),s)}var l=e[n],p=i,v=o;for(r(e,i,n),s(e[o],l)>0&&r(e,i,o);p<v;){for(r(e,p,v),p++,v--;s(e[p],l)<0;)p++;for(;s(e[v],l)>0;)v--}0===s(e[i],l)?r(e,i,v):r(e,++v,o),v<=n&&(i=v+1),n<=v&&(o=v-1)}}(t,n,i||0,o||t.length-1,s||e)}function r(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function e(t,r){return t<r?-1:t>r?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,r,e){if(!e)return r.indexOf(t);for(var n=0;n<r.length;n++)if(e(t,r[n]))return n;return-1}function o(t,r){s(t,0,t.children.length,r,t)}function s(t,r,e,n,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=r;o<e;o++){var s=t.children[o];a(i,t.leaf?n(s):s)}return i}function a(t,r){return t.minX=Math.min(t.minX,r.minX),t.minY=Math.min(t.minY,r.minY),t.maxX=Math.max(t.maxX,r.maxX),t.maxY=Math.max(t.maxY,r.maxY),t}function u(t,r){return t.minX-r.minX}function c(t,r){return t.minY-r.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,r){return t.minX<=r.minX&&t.minY<=r.minY&&r.maxX<=t.maxX&&r.maxY<=t.maxY}function p(t,r){return r.minX<=t.maxX&&r.minY<=t.maxY&&r.maxX>=t.minX&&r.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(r,e,n,i,o){for(var s=[e,n];s.length;)if(!((n=s.pop())-(e=s.pop())<=i)){var a=e+Math.ceil((n-e)/i/2)*i;t(r,a,e,n,o),s.push(e,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var r=this.data,e=[];if(!p(t,r))return e;for(var n=this.toBBox,i=[];r;){for(var o=0;o<r.children.length;o++){var s=r.children[o],a=r.leaf?n(s):s;p(t,a)&&(r.leaf?e.push(s):l(t,a)?this._all(s,e):i.push(s))}r=i.pop()}return e},n.prototype.collides=function(t){var r=this.data;if(!p(t,r))return!1;for(var e=[];r;){for(var n=0;n<r.children.length;n++){var i=r.children[n],o=r.leaf?this.toBBox(i):i;if(p(t,o)){if(r.leaf||l(t,o))return!0;e.push(i)}}r=e.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var r=0;r<t.length;r++)this.insert(t[r]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=v([]),this},n.prototype.remove=function(t,r){if(!t)return this;for(var e,n,o,s=this.data,a=this.toBBox(t),u=[],c=[];s||u.length;){if(s||(s=u.pop(),n=u[u.length-1],e=c.pop(),o=!0),s.leaf){var f=i(t,s.children,r);if(-1!==f)return s.children.splice(f,1),u.push(s),this._condense(u),this}o||s.leaf||!l(s,a)?n?(e++,s=n.children[e],o=!1):s=null:(u.push(s),c.push(e),e=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,r){return t.minX-r.minX},n.prototype.compareMinY=function(t,r){return t.minY-r.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,r){for(var e=[];t;)t.leaf?r.push.apply(r,t.children):e.push.apply(e,t.children),t=e.pop();return r},n.prototype._build=function(t,r,e,n){var i,s=e-r+1,a=this._maxEntries;if(s<=a)return o(i=v(t.slice(r,e+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(i=v([])).leaf=!1,i.height=n;var u=Math.ceil(s/a),c=u*Math.ceil(Math.sqrt(a));d(t,r,e,c,this.compareMinX);for(var f=r;f<=e;f+=c){var h=Math.min(f+c-1,e);d(t,f,h,u,this.compareMinY);for(var l=f;l<=h;l+=u){var p=Math.min(l+u-1,h);i.children.push(this._build(t,l,p,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,r,e,n){for(;n.push(r),!r.leaf&&n.length-1!==e;){for(var i=1/0,o=1/0,s=void 0,a=0;a<r.children.length;a++){var u=r.children[a],c=f(u),h=(l=t,p=u,(Math.max(p.maxX,l.maxX)-Math.min(p.minX,l.minX))*(Math.max(p.maxY,l.maxY)-Math.min(p.minY,l.minY))-c);h<o?(o=h,i=c<i?c:i,s=u):h===o&&c<i&&(i=c,s=u)}r=s||r.children[0]}var l,p;return r},n.prototype._insert=function(t,r,e){var n=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,r,i);for(o.children.push(t),a(o,n);r>=0&&i[r].children.length>this._maxEntries;)this._split(i,r),r--;this._adjustParentBBoxes(n,i,r)},n.prototype._split=function(t,r){var e=t[r],n=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,n);var s=this._chooseSplitIndex(e,i,n),a=v(e.children.splice(s,e.children.length-s));a.height=e.height,a.leaf=e.leaf,o(e,this.toBBox),o(a,this.toBBox),r?t[r-1].children.push(a):this._splitRoot(e,a)},n.prototype._splitRoot=function(t,r){this.data=v([t,r]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,r,e){for(var n,i,o,a,u,c,h,l=1/0,p=1/0,v=r;v<=e-r;v++){var d=s(t,0,v,this.toBBox),g=s(t,v,e,this.toBBox),y=(i=d,o=g,void 0,void 0,void 0,void 0,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-u)),m=f(d)+f(g);y<l?(l=y,n=v,p=m<p?m:p):y===l&&m<p&&(p=m,n=v)}return n||e-r},n.prototype._chooseSplitAxis=function(t,r,e){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,r,e,n)<this._allDistMargin(t,r,e,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,r,e,n){t.children.sort(n);for(var i=this.toBBox,o=s(t,0,r,i),u=s(t,e-r,e,i),c=h(o)+h(u),f=r;f<e-r;f++){var l=t.children[f];a(o,t.leaf?i(l):l),c+=h(o)}for(var p=e-r-1;p>=r;p--){var v=t.children[p];a(u,t.leaf?i(v):v),c+=h(u)}return c},n.prototype._adjustParentBBoxes=function(t,r,e){for(var n=e;n>=0;n--)a(r[n],t)},n.prototype._condense=function(t){for(var r=t.length-1,e=void 0;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children).splice(e.indexOf(t[r]),1):this.clear():o(t[r],this.toBBox)},n}()},6287:function(t,r){!function(t){"use strict";const r=134217729;function e(t,r,e,n,i){let o,s,a,u,c=r[0],f=n[0],h=0,l=0;f>c==f>-c?(o=c,c=r[++h]):(o=f,f=n[++l]);let p=0;if(h<t&&l<e)for(f>c==f>-c?(a=o-((s=c+o)-c),c=r[++h]):(a=o-((s=f+o)-f),f=n[++l]),o=s,0!==a&&(i[p++]=a);h<t&&l<e;)f>c==f>-c?(a=o-((s=o+c)-(u=s-o))+(c-u),c=r[++h]):(a=o-((s=o+f)-(u=s-o))+(f-u),f=n[++l]),o=s,0!==a&&(i[p++]=a);for(;h<t;)a=o-((s=o+c)-(u=s-o))+(c-u),c=r[++h],o=s,0!==a&&(i[p++]=a);for(;l<e;)a=o-((s=o+f)-(u=s-o))+(f-u),f=n[++l],o=s,0!==a&&(i[p++]=a);return 0===o&&0!==p||(i[p++]=o),p}function n(t){return new Float64Array(t)}const i=n(4),o=n(8),s=n(12),a=n(16),u=n(4);t.orient2d=function(t,n,c,f,h,l){const p=(n-l)*(c-h),v=(t-h)*(f-l),d=p-v;if(0===p||0===v||p>0!=v>0)return d;const g=Math.abs(p+v);return Math.abs(d)>=33306690738754716e-32*g?d:-function(t,n,c,f,h,l,p){let v,d,g,y,m,x,b,w,_,S,E,k,M,A,T,P,O,I;const R=t-h,j=c-h,B=n-l,L=f-l;m=(T=(w=R-(b=(x=r*R)-(x-R)))*(S=L-(_=(x=r*L)-(x-L)))-((A=R*L)-b*_-w*_-b*S))-(E=T-(O=(w=B-(b=(x=r*B)-(x-B)))*(S=j-(_=(x=r*j)-(x-j)))-((P=B*j)-b*_-w*_-b*S))),i[0]=T-(E+m)+(m-O),m=(M=A-((k=A+E)-(m=k-A))+(E-m))-(E=M-P),i[1]=M-(E+m)+(m-P),m=(I=k+E)-k,i[2]=k-(I-m)+(E-m),i[3]=I;let N=function(t,r){let e=r[0];for(let t=1;t<4;t++)e+=r[t];return e}(0,i),C=22204460492503146e-32*p;if(N>=C||-N>=C)return N;if(v=t-(R+(m=t-R))+(m-h),g=c-(j+(m=c-j))+(m-h),d=n-(B+(m=n-B))+(m-l),y=f-(L+(m=f-L))+(m-l),0===v&&0===d&&0===g&&0===y)return N;if(C=11093356479670487e-47*p+33306690738754706e-32*Math.abs(N),(N+=R*y+L*v-(B*g+j*d))>=C||-N>=C)return N;m=(T=(w=v-(b=(x=r*v)-(x-v)))*(S=L-(_=(x=r*L)-(x-L)))-((A=v*L)-b*_-w*_-b*S))-(E=T-(O=(w=d-(b=(x=r*d)-(x-d)))*(S=j-(_=(x=r*j)-(x-j)))-((P=d*j)-b*_-w*_-b*S))),u[0]=T-(E+m)+(m-O),m=(M=A-((k=A+E)-(m=k-A))+(E-m))-(E=M-P),u[1]=M-(E+m)+(m-P),m=(I=k+E)-k,u[2]=k-(I-m)+(E-m),u[3]=I;const F=e(4,i,4,u,o);m=(T=(w=R-(b=(x=r*R)-(x-R)))*(S=y-(_=(x=r*y)-(x-y)))-((A=R*y)-b*_-w*_-b*S))-(E=T-(O=(w=B-(b=(x=r*B)-(x-B)))*(S=g-(_=(x=r*g)-(x-g)))-((P=B*g)-b*_-w*_-b*S))),u[0]=T-(E+m)+(m-O),m=(M=A-((k=A+E)-(m=k-A))+(E-m))-(E=M-P),u[1]=M-(E+m)+(m-P),m=(I=k+E)-k,u[2]=k-(I-m)+(E-m),u[3]=I;const Y=e(F,o,4,u,s);m=(T=(w=v-(b=(x=r*v)-(x-v)))*(S=y-(_=(x=r*y)-(x-y)))-((A=v*y)-b*_-w*_-b*S))-(E=T-(O=(w=d-(b=(x=r*d)-(x-d)))*(S=g-(_=(x=r*g)-(x-g)))-((P=d*g)-b*_-w*_-b*S))),u[0]=T-(E+m)+(m-O),m=(M=A-((k=A+E)-(m=k-A))+(E-m))-(E=M-P),u[1]=M-(E+m)+(m-P),m=(I=k+E)-k,u[2]=k-(I-m)+(E-m),u[3]=I;const X=e(Y,s,4,u,a);return a[X-1]}(t,n,c,f,h,l,g)},t.orient2dfast=function(t,r,e,n,i,o){return(r-o)*(e-i)-(t-i)*(n-o)},Object.defineProperty(t,"__esModule",{value:!0})}(r)},9662:(t,r,e)=>{var n=e(614),i=e(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a function")}},9483:(t,r,e)=>{var n=e(4411),i=e(6330),o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not a constructor")}},6077:(t,r,e)=>{var n=e(614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},1223:(t,r,e)=>{var n=e(5112),i=e(30),o=e(3070).f,s=n("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,r,e)=>{"use strict";var n=e(8710).charAt;t.exports=function(t,r,e){return r+(e?n(t,r).length:1)}},5787:(t,r,e)=>{var n=e(7976),i=TypeError;t.exports=function(t,r){if(n(r,t))return t;throw i("Incorrect invocation")}},9670:(t,r,e)=>{var n=e(111),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw o(i(t)+" is not an object")}},3013:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:(t,r,e)=>{"use strict";var n,i,o,s=e(3013),a=e(9781),u=e(7854),c=e(614),f=e(111),h=e(2597),l=e(648),p=e(6330),v=e(8880),d=e(8052),g=e(3070).f,y=e(7976),m=e(9518),x=e(7674),b=e(5112),w=e(9711),_=e(9909),S=_.enforce,E=_.get,k=u.Int8Array,M=k&&k.prototype,A=u.Uint8ClampedArray,T=A&&A.prototype,P=k&&m(k),O=M&&m(M),I=Object.prototype,R=u.TypeError,j=b("toStringTag"),B=w("TYPED_ARRAY_TAG"),L=s&&!!x&&"Opera"!==l(u.opera),N=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},Y=function(t){var r=m(t);if(f(r)){var e=E(r);return e&&h(e,"TypedArrayConstructor")?e.TypedArrayConstructor:Y(r)}},X=function(t){if(!f(t))return!1;var r=l(t);return h(C,r)||h(F,r)};for(n in C)(o=(i=u[n])&&i.prototype)?S(o).TypedArrayConstructor=i:L=!1;for(n in F)(o=(i=u[n])&&i.prototype)&&(S(o).TypedArrayConstructor=i);if((!L||!c(P)||P===Function.prototype)&&(P=function(){throw R("Incorrect invocation")},L))for(n in C)u[n]&&x(u[n],P);if((!L||!O||O===I)&&(O=P.prototype,L))for(n in C)u[n]&&x(u[n].prototype,O);if(L&&m(T)!==O&&x(T,O),a&&!h(O,j))for(n in N=!0,g(O,j,{get:function(){return f(this)?this[B]:void 0}}),C)u[n]&&v(u[n],B,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:N&&B,aTypedArray:function(t){if(X(t))return t;throw R("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!x||y(P,t)))return t;throw R(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,e,n){if(a){if(e)for(var i in C){var o=u[i];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(e){try{o.prototype[t]=r}catch(t){}}}O[t]&&!e||d(O,t,e?r:L&&M[t]||r,n)}},exportTypedArrayStaticMethod:function(t,r,e){var n,i;if(a){if(x){if(e)for(n in C)if((i=u[n])&&h(i,t))try{delete i[t]}catch(t){}if(P[t]&&!e)return;try{return d(P,t,e?r:L&&P[t]||r)}catch(t){}}for(n in C)!(i=u[n])||i[t]&&!e||d(i,t,r)}},getTypedArrayConstructor:Y,isView:function(t){if(!f(t))return!1;var r=l(t);return"DataView"===r||h(C,r)||h(F,r)},isTypedArray:X,TypedArray:P,TypedArrayPrototype:O}},3331:(t,r,e)=>{"use strict";var n=e(7854),i=e(1702),o=e(9781),s=e(3013),a=e(6530),u=e(8880),c=e(9190),f=e(7293),h=e(5787),l=e(9303),p=e(7466),v=e(7067),d=e(1179),g=e(9518),y=e(7674),m=e(8006).f,x=e(3070).f,b=e(1285),w=e(1589),_=e(8003),S=e(9909),E=a.PROPER,k=a.CONFIGURABLE,M=S.get,A=S.set,T="ArrayBuffer",P="Wrong index",O=n.ArrayBuffer,I=O,R=I&&I.prototype,j=n.DataView,B=j&&j.prototype,L=Object.prototype,N=n.Array,C=n.RangeError,F=i(b),Y=i([].reverse),X=d.pack,U=d.unpack,D=function(t){return[255&t]},G=function(t){return[255&t,t>>8&255]},z=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},V=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},W=function(t){return X(t,23,4)},q=function(t){return X(t,52,8)},J=function(t,r){x(t.prototype,r,{get:function(){return M(this)[r]}})},$=function(t,r,e,n){var i=v(e),o=M(t);if(i+r>o.byteLength)throw C(P);var s=M(o.buffer).bytes,a=i+o.byteOffset,u=w(s,a,a+r);return n?u:Y(u)},K=function(t,r,e,n,i,o){var s=v(e),a=M(t);if(s+r>a.byteLength)throw C(P);for(var u=M(a.buffer).bytes,c=s+a.byteOffset,f=n(+i),h=0;h<r;h++)u[c+h]=f[o?h:r-h-1]};if(s){var H=E&&O.name!==T;if(f((function(){O(1)}))&&f((function(){new O(-1)}))&&!f((function(){return new O,new O(1.5),new O(NaN),1!=O.length||H&&!k})))H&&k&&u(O,"name",T);else{(I=function(t){return h(this,R),new O(v(t))}).prototype=R;for(var Z,Q=m(O),tt=0;Q.length>tt;)(Z=Q[tt++])in I||u(I,Z,O[Z]);R.constructor=I}y&&g(B)!==L&&y(B,L);var rt=new j(new I(2)),et=i(B.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||c(B,{setInt8:function(t,r){et(this,t,r<<24>>24)},setUint8:function(t,r){et(this,t,r<<24>>24)}},{unsafe:!0})}else R=(I=function(t){h(this,R);var r=v(t);A(this,{bytes:F(N(r),0),byteLength:r}),o||(this.byteLength=r)}).prototype,B=(j=function(t,r,e){h(this,B),h(t,R);var n=M(t).byteLength,i=l(r);if(i<0||i>n)throw C("Wrong offset");if(i+(e=void 0===e?n-i:p(e))>n)throw C("Wrong length");A(this,{buffer:t,byteLength:e,byteOffset:i}),o||(this.buffer=t,this.byteLength=e,this.byteOffset=i)}).prototype,o&&(J(I,"byteLength"),J(j,"buffer"),J(j,"byteLength"),J(j,"byteOffset")),c(B,{getInt8:function(t){return $(this,1,t)[0]<<24>>24},getUint8:function(t){return $(this,1,t)[0]},getInt16:function(t){var r=$(this,2,t,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function(t){var r=$(this,2,t,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function(t){return V($(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return V($(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return U($(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return U($(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,r){K(this,1,t,D,r)},setUint8:function(t,r){K(this,1,t,D,r)},setInt16:function(t,r){K(this,2,t,G,r,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,r){K(this,2,t,G,r,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,r){K(this,4,t,z,r,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,r){K(this,4,t,z,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,r){K(this,4,t,W,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,r){K(this,8,t,q,r,arguments.length>2?arguments[2]:void 0)}});_(I,T),_(j,"DataView"),t.exports={ArrayBuffer:I,DataView:j}},1048:(t,r,e)=>{"use strict";var n=e(7908),i=e(1400),o=e(6244),s=e(5117),a=Math.min;t.exports=[].copyWithin||function(t,r){var e=n(this),u=o(e),c=i(t,u),f=i(r,u),h=arguments.length>2?arguments[2]:void 0,l=a((void 0===h?u:i(h,u))-f,u-c),p=1;for(f<c&&c<f+l&&(p=-1,f+=l-1,c+=l-1);l-- >0;)f in e?e[c]=e[f]:s(e,c),c+=p,f+=p;return e}},1285:(t,r,e)=>{"use strict";var n=e(7908),i=e(1400),o=e(6244);t.exports=function(t){for(var r=n(this),e=o(r),s=arguments.length,a=i(s>1?arguments[1]:void 0,e),u=s>2?arguments[2]:void 0,c=void 0===u?e:i(u,e);c>a;)r[a++]=t;return r}},7745:(t,r,e)=>{var n=e(6244);t.exports=function(t,r){for(var e=0,i=n(r),o=new t(i);i>e;)o[e]=r[e++];return o}},8457:(t,r,e)=>{"use strict";var n=e(9974),i=e(6916),o=e(7908),s=e(3411),a=e(7659),u=e(4411),c=e(6244),f=e(6135),h=e(4121),l=e(1246),p=Array;t.exports=function(t){var r=o(t),e=u(this),v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d;g&&(d=n(d,v>2?arguments[2]:void 0));var y,m,x,b,w,_,S=l(r),E=0;if(!S||this===p&&a(S))for(y=c(r),m=e?new this(y):p(y);y>E;E++)_=g?d(r[E],E):r[E],f(m,E,_);else for(w=(b=h(r,S)).next,m=e?new this:[];!(x=i(w,b)).done;E++)_=g?s(b,d,[x.value,E],!0):x.value,f(m,E,_);return m.length=E,m}},1318:(t,r,e)=>{var n=e(5656),i=e(1400),o=e(6244),s=function(t){return function(r,e,s){var a,u=n(r),c=o(u),f=i(s,c);if(t&&e!=e){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,r,e)=>{var n=e(9974),i=e(1702),o=e(8361),s=e(7908),a=e(6244),u=e(5417),c=i([].push),f=function(t){var r=1==t,e=2==t,i=3==t,f=4==t,h=6==t,l=7==t,p=5==t||h;return function(v,d,g,y){for(var m,x,b=s(v),w=o(b),_=n(d,g),S=a(w),E=0,k=y||u,M=r?k(v,S):e||l?k(v,0):void 0;S>E;E++)if((p||E in w)&&(x=_(m=w[E],E,b),t))if(r)M[E]=x;else if(x)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:c(M,m)}else switch(t){case 4:return!1;case 7:c(M,m)}return h?-1:i||f?f:M}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},6583:(t,r,e)=>{"use strict";var n=e(2104),i=e(5656),o=e(9303),s=e(6244),a=e(9341),u=Math.min,c=[].lastIndexOf,f=!!c&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),l=f||!h;t.exports=l?function(t){if(f)return n(c,this,arguments)||0;var r=i(this),e=s(r),a=e-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=e+a);a>=0;a--)if(a in r&&r[a]===t)return a||0;return-1}:c},1194:(t,r,e)=>{var n=e(7293),i=e(5112),o=e(7392),s=i("species");t.exports=function(t){return o>=51||!n((function(){var r=[];return(r.constructor={})[s]=function(){return{foo:1}},1!==r[t](Boolean).foo}))}},9341:(t,r,e)=>{"use strict";var n=e(7293);t.exports=function(t,r){var e=[][t];return!!e&&n((function(){e.call(null,r||function(){return 1},1)}))}},3671:(t,r,e)=>{var n=e(9662),i=e(7908),o=e(8361),s=e(6244),a=TypeError,u=function(t){return function(r,e,u,c){n(e);var f=i(r),h=o(f),l=s(f),p=t?l-1:0,v=t?-1:1;if(u<2)for(;;){if(p in h){c=h[p],p+=v;break}if(p+=v,t?p<0:l<=p)throw a("Reduce of empty array with no initial value")}for(;t?p>=0:l>p;p+=v)p in h&&(c=e(c,h[p],p,f));return c}};t.exports={left:u(!1),right:u(!0)}},1589:(t,r,e)=>{var n=e(1400),i=e(6244),o=e(6135),s=Array,a=Math.max;t.exports=function(t,r,e){for(var u=i(t),c=n(r,u),f=n(void 0===e?u:e,u),h=s(a(f-c,0)),l=0;c<f;c++,l++)o(h,l,t[c]);return h.length=l,h}},206:(t,r,e)=>{var n=e(1702);t.exports=n([].slice)},4362:(t,r,e)=>{var n=e(1589),i=Math.floor,o=function(t,r){var e=t.length,u=i(e/2);return e<8?s(t,r):a(t,o(n(t,0,u),r),o(n(t,u),r),r)},s=function(t,r){for(var e,n,i=t.length,o=1;o<i;){for(n=o,e=t[o];n&&r(t[n-1],e)>0;)t[n]=t[--n];n!==o++&&(t[n]=e)}return t},a=function(t,r,e,n){for(var i=r.length,o=e.length,s=0,a=0;s<i||a<o;)t[s+a]=s<i&&a<o?n(r[s],e[a])<=0?r[s++]:e[a++]:s<i?r[s++]:e[a++];return t};t.exports=o},7475:(t,r,e)=>{var n=e(3157),i=e(4411),o=e(111),s=e(5112)("species"),a=Array;t.exports=function(t){var r;return n(t)&&(r=t.constructor,(i(r)&&(r===a||n(r.prototype))||o(r)&&null===(r=r[s]))&&(r=void 0)),void 0===r?a:r}},5417:(t,r,e)=>{var n=e(7475);t.exports=function(t,r){return new(n(t))(0===r?0:r)}},3411:(t,r,e)=>{var n=e(9670),i=e(9212);t.exports=function(t,r,e,o){try{return o?r(n(e)[0],e[1]):r(e)}catch(r){i(t,"throw",r)}}},7072:(t,r,e)=>{var n=e(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!i)return!1;var e=!1;try{var o={};o[n]=function(){return{next:function(){return{done:e=!0}}}},t(o)}catch(t){}return e}},4326:(t,r,e)=>{var n=e(84),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:(t,r,e)=>{var n=e(1694),i=e(614),o=e(4326),s=e(5112)("toStringTag"),a=Object,u="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=a(t),s))?e:u?o(r):"Object"==(n=o(r))&&i(r.callee)?"Arguments":n}},9920:(t,r,e)=>{var n=e(2597),i=e(3887),o=e(1236),s=e(3070);t.exports=function(t,r,e){for(var a=i(r),u=s.f,c=o.f,f=0;f<a.length;f++){var h=a[f];n(t,h)||e&&n(e,h)||u(t,h,c(r,h))}}},8544:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,r){return{value:t,done:r}}},8880:(t,r,e)=>{var n=e(9781),i=e(3070),o=e(9114);t.exports=n?function(t,r,e){return i.f(t,r,o(1,e))}:function(t,r,e){return t[r]=e,t}},9114:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},6135:(t,r,e)=>{"use strict";var n=e(4948),i=e(3070),o=e(9114);t.exports=function(t,r,e){var s=n(r);s in t?i.f(t,s,o(0,e)):t[s]=e}},8052:(t,r,e)=>{var n=e(614),i=e(3070),o=e(6339),s=e(3072);t.exports=function(t,r,e,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:r;if(n(e)&&o(e,c,a),a.global)u?t[r]=e:s(r,e);else{try{a.unsafe?t[r]&&(u=!0):delete t[r]}catch(t){}u?t[r]=e:i.f(t,r,{value:e,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9190:(t,r,e)=>{var n=e(8052);t.exports=function(t,r,e){for(var i in r)n(t,i,r[i],e);return t}},3072:(t,r,e)=>{var n=e(7854),i=Object.defineProperty;t.exports=function(t,r){try{i(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},5117:(t,r,e)=>{"use strict";var n=e(6330),i=TypeError;t.exports=function(t,r){if(!delete t[r])throw i("Cannot delete property "+n(r)+" of "+n(t))}},9781:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var r="object"==typeof document&&document.all,e=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:e}},317:(t,r,e)=>{var n=e(7854),i=e(111),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7207:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,r,e)=>{var n=e(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8886:(t,r,e)=>{var n=e(8113).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},7871:(t,r,e)=>{var n=e(3823),i=e(5268);t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,r,e)=>{var n=e(8113);t.exports=/MSIE|Trident/.test(n)},1528:(t,r,e)=>{var n=e(8113),i=e(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(t,r,e)=>{var n=e(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,r,e)=>{var n=e(4326),i=e(7854);t.exports="process"==n(i.process)},1036:(t,r,e)=>{var n=e(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,r,e)=>{var n=e(5005);t.exports=n("navigator","userAgent")||""},7392:(t,r,e)=>{var n,i,o=e(7854),s=e(8113),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,f=c&&c.v8;f&&(i=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},8008:(t,r,e)=>{var n=e(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,r,e)=>{var n=e(7854),i=e(1236).f,o=e(8880),s=e(8052),a=e(3072),u=e(9920),c=e(4705);t.exports=function(t,r){var e,f,h,l,p,v=t.target,d=t.global,g=t.stat;if(e=d?n:g?n[v]||a(v,{}):(n[v]||{}).prototype)for(f in r){if(l=r[f],h=t.dontCallGetSet?(p=i(e,f))&&p.value:e[f],!c(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==h){if(typeof l==typeof h)continue;u(l,h)}(t.sham||h&&h.sham)&&o(l,"sham",!0),s(e,f,l,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,r,e)=>{"use strict";e(4916);var n=e(1702),i=e(8052),o=e(2261),s=e(7293),a=e(5112),u=e(8880),c=a("species"),f=RegExp.prototype;t.exports=function(t,r,e,h){var l=a(t),p=!s((function(){var r={};return r[l]=function(){return 7},7!=""[t](r)})),v=p&&!s((function(){var r=!1,e=/a/;return"split"===t&&((e={}).constructor={},e.constructor[c]=function(){return e},e.flags="",e[l]=/./[l]),e.exec=function(){return r=!0,null},e[l](""),!r}));if(!p||!v||e){var d=n(/./[l]),g=r(l,""[t],(function(t,r,e,i,s){var a=n(t),u=r.exec;return u===o||u===f.exec?p&&!s?{done:!0,value:d(r,e,i)}:{done:!0,value:a(e,r,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(f,l,g[1])}h&&u(f[l],"sham",!0)}},2104:(t,r,e)=>{var n=e(4374),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},9974:(t,r,e)=>{var n=e(1702),i=e(9662),o=e(4374),s=n(n.bind);t.exports=function(t,r){return i(t),void 0===r?t:o?s(t,r):function(){return t.apply(r,arguments)}}},4374:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,r,e)=>{var n=e(4374),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},6530:(t,r,e)=>{var n=e(9781),i=e(2597),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},84:(t,r,e)=>{var n=e(4374),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},1702:(t,r,e)=>{var n=e(4326),i=e(84);t.exports=function(t){if("Function"===n(t))return i(t)}},5005:(t,r,e)=>{var n=e(7854),i=e(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?o(n[t]):n[t]&&n[t][r]}},1246:(t,r,e)=>{var n=e(648),i=e(8173),o=e(8554),s=e(7497),a=e(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,a)||i(t,"@@iterator")||s[n(t)]}},4121:(t,r,e)=>{var n=e(6916),i=e(9662),o=e(9670),s=e(6330),a=e(1246),u=TypeError;t.exports=function(t,r){var e=arguments.length<2?a(t):r;if(i(e))return o(n(e,t));throw u(s(t)+" is not iterable")}},8173:(t,r,e)=>{var n=e(9662),i=e(8554);t.exports=function(t,r){var e=t[r];return i(e)?void 0:n(e)}},647:(t,r,e)=>{var n=e(1702),i=e(7908),o=Math.floor,s=n("".charAt),a=n("".replace),u=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,e,n,h,l){var p=e+t.length,v=n.length,d=f;return void 0!==h&&(h=i(h),d=c),a(l,d,(function(i,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return u(r,0,e);case"'":return u(r,p);case"<":c=h[u(a,1,-1)];break;default:var f=+a;if(0===f)return i;if(f>v){var l=o(f/10);return 0===l?i:l<=v?void 0===n[l-1]?s(a,1):n[l-1]+s(a,1):i}c=n[f-1]}return void 0===c?"":c}))}},7854:(t,r,e)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e.g&&e.g)||function(){return this}()||Function("return this")()},2597:(t,r,e)=>{var n=e(1702),i=e(7908),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return o(i(t),r)}},3501:t=>{t.exports={}},842:(t,r,e)=>{var n=e(7854);t.exports=function(t,r){var e=n.console;e&&e.error&&(1==arguments.length?e.error(t):e.error(t,r))}},490:(t,r,e)=>{var n=e(5005);t.exports=n("document","documentElement")},4664:(t,r,e)=>{var n=e(9781),i=e(7293),o=e(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:t=>{var r=Array,e=Math.abs,n=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;t.exports={pack:function(t,a,u){var c,f,h,l=r(u),p=8*u-a-1,v=(1<<p)-1,d=v>>1,g=23===a?n(2,-24)-n(2,-77):0,y=t<0||0===t&&1/t<0?1:0,m=0;for((t=e(t))!=t||t===1/0?(f=t!=t?1:0,c=v):(c=i(o(t)/s),t*(h=n(2,-c))<1&&(c--,h*=2),(t+=c+d>=1?g/h:g*n(2,1-d))*h>=2&&(c++,h/=2),c+d>=v?(f=0,c=v):c+d>=1?(f=(t*h-1)*n(2,a),c+=d):(f=t*n(2,d-1)*n(2,a),c=0));a>=8;)l[m++]=255&f,f/=256,a-=8;for(c=c<<a|f,p+=a;p>0;)l[m++]=255&c,c/=256,p-=8;return l[--m]|=128*y,l},unpack:function(t,r){var e,i=t.length,o=8*i-r-1,s=(1<<o)-1,a=s>>1,u=o-7,c=i-1,f=t[c--],h=127&f;for(f>>=7;u>0;)h=256*h+t[c--],u-=8;for(e=h&(1<<-u)-1,h>>=-u,u+=r;u>0;)e=256*e+t[c--],u-=8;if(0===h)h=1-a;else{if(h===s)return e?NaN:f?-1/0:1/0;e+=n(2,r),h-=a}return(f?-1:1)*e*n(2,h-r)}}},8361:(t,r,e)=>{var n=e(1702),i=e(7293),o=e(4326),s=Object,a=n("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},9587:(t,r,e)=>{var n=e(614),i=e(111),o=e(7674);t.exports=function(t,r,e){var s,a;return o&&n(s=r.constructor)&&s!==e&&i(a=s.prototype)&&a!==e.prototype&&o(t,a),t}},2788:(t,r,e)=>{var n=e(1702),i=e(614),o=e(5465),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},9909:(t,r,e)=>{var n,i,o,s=e(4811),a=e(7854),u=e(111),c=e(8880),f=e(2597),h=e(5465),l=e(6200),p=e(3501),v="Object already initialized",d=a.TypeError,g=a.WeakMap;if(s||h.state){var y=h.state||(h.state=new g);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,r){if(y.has(t))throw d(v);return r.facade=t,y.set(t,r),r},i=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var m=l("state");p[m]=!0,n=function(t,r){if(f(t,m))throw d(v);return r.facade=t,c(t,m,r),r},i=function(t){return f(t,m)?t[m]:{}},o=function(t){return f(t,m)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!u(r)||(e=i(r)).type!==t)throw d("Incompatible receiver, "+t+" required");return e}}}},7659:(t,r,e)=>{var n=e(5112),i=e(7497),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,r,e)=>{var n=e(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4067:(t,r,e)=>{var n=e(648),i=e(1702)("".slice);t.exports=function(t){return"Big"===i(n(t),0,3)}},614:(t,r,e)=>{var n=e(4154),i=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:(t,r,e)=>{var n=e(1702),i=e(7293),o=e(614),s=e(648),a=e(5005),u=e(2788),c=function(){},f=[],h=a("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=n(l.exec),v=!l.exec(c),d=function(t){if(!o(t))return!1;try{return h(c,f,t),!0}catch(t){return!1}},g=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!p(l,u(t))}catch(t){return!0}};g.sham=!0,t.exports=!h||i((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?g:d},4705:(t,r,e)=>{var n=e(7293),i=e(614),o=/#|\.prototype\./,s=function(t,r){var e=u[a(t)];return e==f||e!=c&&(i(r)?n(r):!!r)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},5988:(t,r,e)=>{var n=e(111),i=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&i(t)===t}},8554:t=>{t.exports=function(t){return null==t}},111:(t,r,e)=>{var n=e(614),i=e(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===o}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,r,e)=>{var n=e(5005),i=e(614),o=e(7976),s=e(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return i(r)&&o(r.prototype,a(t))}},408:(t,r,e)=>{var n=e(9974),i=e(6916),o=e(9670),s=e(6330),a=e(7659),u=e(6244),c=e(7976),f=e(4121),h=e(1246),l=e(9212),p=TypeError,v=function(t,r){this.stopped=t,this.result=r},d=v.prototype;t.exports=function(t,r,e){var g,y,m,x,b,w,_,S=e&&e.that,E=!(!e||!e.AS_ENTRIES),k=!(!e||!e.IS_RECORD),M=!(!e||!e.IS_ITERATOR),A=!(!e||!e.INTERRUPTED),T=n(r,S),P=function(t){return g&&l(g,"normal",t),new v(!0,t)},O=function(t){return E?(o(t),A?T(t[0],t[1],P):T(t[0],t[1])):A?T(t,P):T(t)};if(k)g=t.iterator;else if(M)g=t;else{if(!(y=h(t)))throw p(s(t)+" is not iterable");if(a(y)){for(m=0,x=u(t);x>m;m++)if((b=O(t[m]))&&c(d,b))return b;return new v(!1)}g=f(t,y)}for(w=k?t.next:g.next;!(_=i(w,g)).done;){try{b=O(_.value)}catch(t){l(g,"throw",t)}if("object"==typeof b&&b&&c(d,b))return b}return new v(!1)}},9212:(t,r,e)=>{var n=e(6916),i=e(9670),o=e(8173);t.exports=function(t,r,e){var s,a;i(t);try{if(!(s=o(t,"return"))){if("throw"===r)throw e;return e}s=n(s,t)}catch(t){a=!0,s=t}if("throw"===r)throw e;if(a)throw s;return i(s),e}},3061:(t,r,e)=>{"use strict";var n=e(3383).IteratorPrototype,i=e(30),o=e(9114),s=e(8003),a=e(7497),u=function(){return this};t.exports=function(t,r,e,c){var f=r+" Iterator";return t.prototype=i(n,{next:o(+!c,e)}),s(t,f,!1,!0),a[f]=u,t}},1656:(t,r,e)=>{"use strict";var n=e(2109),i=e(6916),o=e(1913),s=e(6530),a=e(614),u=e(3061),c=e(9518),f=e(7674),h=e(8003),l=e(8880),p=e(8052),v=e(5112),d=e(7497),g=e(3383),y=s.PROPER,m=s.CONFIGURABLE,x=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,w=v("iterator"),_="keys",S="values",E="entries",k=function(){return this};t.exports=function(t,r,e,s,v,g,M){u(e,r,s);var A,T,P,O=function(t){if(t===v&&L)return L;if(!b&&t in j)return j[t];switch(t){case _:case S:case E:return function(){return new e(this,t)}}return function(){return new e(this)}},I=r+" Iterator",R=!1,j=t.prototype,B=j[w]||j["@@iterator"]||v&&j[v],L=!b&&B||O(v),N="Array"==r&&j.entries||B;if(N&&(A=c(N.call(new t)))!==Object.prototype&&A.next&&(o||c(A)===x||(f?f(A,x):a(A[w])||p(A,w,k)),h(A,I,!0,!0),o&&(d[I]=k)),y&&v==S&&B&&B.name!==S&&(!o&&m?l(j,"name",S):(R=!0,L=function(){return i(B,this)})),v)if(T={values:O(S),keys:g?L:O(_),entries:O(E)},M)for(P in T)(b||R||!(P in j))&&p(j,P,T[P]);else n({target:r,proto:!0,forced:b||R},T);return o&&!M||j[w]===L||p(j,w,L,{name:v}),d[r]=L,T}},3383:(t,r,e)=>{"use strict";var n,i,o,s=e(7293),a=e(614),u=e(111),c=e(30),f=e(9518),h=e(8052),l=e(5112),p=e(1913),v=l("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=f(f(o)))!==Object.prototype&&(n=i):d=!0),!u(n)||s((function(){var t={};return n[v].call(t)!==t}))?n={}:p&&(n=c(n)),a(n[v])||h(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},7497:t=>{t.exports={}},6244:(t,r,e)=>{var n=e(7466);t.exports=function(t){return n(t.length)}},6339:(t,r,e)=>{var n=e(7293),i=e(614),o=e(2597),s=e(9781),a=e(6530).CONFIGURABLE,u=e(2788),c=e(9909),f=c.enforce,h=c.get,l=Object.defineProperty,p=s&&!n((function(){return 8!==l((function(){}),"length",{value:8}).length})),v=String(String).split("String"),d=t.exports=function(t,r,e){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!o(t,"name")||a&&t.name!==r)&&(s?l(t,"name",{value:r,configurable:!0}):t.name=r),p&&e&&o(e,"arity")&&t.length!==e.arity&&l(t,"length",{value:e.arity});try{e&&o(e,"constructor")&&e.constructor?s&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=f(t);return o(n,"source")||(n.source=v.join("string"==typeof r?r:"")),t};Function.prototype.toString=d((function(){return i(this)&&h(this).source||u(this)}),"toString")},4758:t=>{var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},5948:(t,r,e)=>{var n,i,o,s,a,u,c,f,h=e(7854),l=e(9974),p=e(1236).f,v=e(261).set,d=e(6833),g=e(1528),y=e(1036),m=e(5268),x=h.MutationObserver||h.WebKitMutationObserver,b=h.document,w=h.process,_=h.Promise,S=p(h,"queueMicrotask"),E=S&&S.value;E||(n=function(){var t,r;for(m&&(t=w.domain)&&t.exit();i;){r=i.fn,i=i.next;try{r()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},d||m||y||!x||!b?!g&&_&&_.resolve?((c=_.resolve(void 0)).constructor=_,f=l(c.then,c),s=function(){f(n)}):m?s=function(){w.nextTick(n)}:(v=l(v,h),s=function(){v(n)}):(a=!0,u=b.createTextNode(""),new x(n).observe(u,{characterData:!0}),s=function(){u.data=a=!a})),t.exports=E||function(t){var r={fn:t,next:void 0};o&&(o.next=r),i||(i=r,s()),o=r}},8523:(t,r,e)=>{"use strict";var n=e(9662),i=TypeError,o=function(t){var r,e;this.promise=new t((function(t,n){if(void 0!==r||void 0!==e)throw i("Bad Promise constructor");r=t,e=n})),this.resolve=n(r),this.reject=n(e)};t.exports.f=function(t){return new o(t)}},1574:(t,r,e)=>{"use strict";var n=e(9781),i=e(1702),o=e(6916),s=e(7293),a=e(1956),u=e(5181),c=e(5296),f=e(7908),h=e(8361),l=Object.assign,p=Object.defineProperty,v=i([].concat);t.exports=!l||s((function(){if(n&&1!==l({b:1},l(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},e=Symbol(),i="abcdefghijklmnopqrst";return t[e]=7,i.split("").forEach((function(t){r[t]=t})),7!=l({},t)[e]||a(l({},r)).join("")!=i}))?function(t,r){for(var e=f(t),i=arguments.length,s=1,l=u.f,p=c.f;i>s;)for(var d,g=h(arguments[s++]),y=l?v(a(g),l(g)):a(g),m=y.length,x=0;m>x;)d=y[x++],n&&!o(p,g,d)||(e[d]=g[d]);return e}:l},30:(t,r,e)=>{var n,i=e(9670),o=e(6048),s=e(748),a=e(3501),u=e(490),c=e(317),f=e(6200)("IE_PROTO"),h=function(){},l=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(l("")),t.close();var r=t.parentWindow.Object;return t=null,r},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,r;v="undefined"!=typeof document?document.domain&&n?p(n):((r=c("iframe")).style.display="none",u.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(l("document.F=Object")),t.close(),t.F):p(n);for(var e=s.length;e--;)delete v.prototype[s[e]];return v()};a[f]=!0,t.exports=Object.create||function(t,r){var e;return null!==t?(h.prototype=i(t),e=new h,h.prototype=null,e[f]=t):e=v(),void 0===r?e:o.f(e,r)}},6048:(t,r,e)=>{var n=e(9781),i=e(3353),o=e(3070),s=e(9670),a=e(5656),u=e(1956);r.f=n&&!i?Object.defineProperties:function(t,r){s(t);for(var e,n=a(r),i=u(r),c=i.length,f=0;c>f;)o.f(t,e=i[f++],n[e]);return t}},3070:(t,r,e)=>{var n=e(9781),i=e(4664),o=e(3353),s=e(9670),a=e(4948),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor;r.f=n?o?function(t,r,e){if(s(t),r=a(r),s(e),"function"==typeof t&&"prototype"===r&&"value"in e&&"writable"in e&&!e.writable){var n=f(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:"configurable"in e?e.configurable:n.configurable,enumerable:"enumerable"in e?e.enumerable:n.enumerable,writable:!1})}return c(t,r,e)}:c:function(t,r,e){if(s(t),r=a(r),s(e),i)try{return c(t,r,e)}catch(t){}if("get"in e||"set"in e)throw u("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},1236:(t,r,e)=>{var n=e(9781),i=e(6916),o=e(5296),s=e(9114),a=e(5656),u=e(4948),c=e(2597),f=e(4664),h=Object.getOwnPropertyDescriptor;r.f=n?h:function(t,r){if(t=a(t),r=u(r),f)try{return h(t,r)}catch(t){}if(c(t,r))return s(!i(o.f,t,r),t[r])}},1156:(t,r,e)=>{var n=e(4326),i=e(5656),o=e(8006).f,s=e(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==n(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(i(t))}},8006:(t,r,e)=>{var n=e(6324),i=e(748).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},5181:(t,r)=>{r.f=Object.getOwnPropertySymbols},9518:(t,r,e)=>{var n=e(2597),i=e(614),o=e(7908),s=e(6200),a=e(8544),u=s("IE_PROTO"),c=Object,f=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var r=o(t);if(n(r,u))return r[u];var e=r.constructor;return i(e)&&r instanceof e?e.prototype:r instanceof c?f:null}},7976:(t,r,e)=>{var n=e(1702);t.exports=n({}.isPrototypeOf)},6324:(t,r,e)=>{var n=e(1702),i=e(2597),o=e(5656),s=e(1318).indexOf,a=e(3501),u=n([].push);t.exports=function(t,r){var e,n=o(t),c=0,f=[];for(e in n)!i(a,e)&&i(n,e)&&u(f,e);for(;r.length>c;)i(n,e=r[c++])&&(~s(f,e)||u(f,e));return f}},1956:(t,r,e)=>{var n=e(6324),i=e(748);t.exports=Object.keys||function(t){return n(t,i)}},5296:(t,r)=>{"use strict";var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!e.call({1:2},1);r.f=i?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},7674:(t,r,e)=>{var n=e(1702),i=e(9670),o=e(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return i(e),o(n),r?t(e,n):e.__proto__=n,e}}():void 0)},288:(t,r,e)=>{"use strict";var n=e(1694),i=e(648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,r,e)=>{var n=e(6916),i=e(614),o=e(111),s=TypeError;t.exports=function(t,r){var e,a;if("string"===r&&i(e=t.toString)&&!o(a=n(e,t)))return a;if(i(e=t.valueOf)&&!o(a=n(e,t)))return a;if("string"!==r&&i(e=t.toString)&&!o(a=n(e,t)))return a;throw s("Can't convert object to primitive value")}},3887:(t,r,e)=>{var n=e(5005),i=e(1702),o=e(8006),s=e(5181),a=e(9670),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=o.f(a(t)),e=s.f;return e?u(r,e(t)):r}},857:(t,r,e)=>{var n=e(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,r,e)=>{var n=e(7854),i=e(2492),o=e(614),s=e(4705),a=e(2788),u=e(5112),c=e(7871),f=e(3823),h=e(1913),l=e(7392),p=i&&i.prototype,v=u("species"),d=!1,g=o(n.PromiseRejectionEvent),y=s("Promise",(function(){var t=a(i),r=t!==String(i);if(!r&&66===l)return!0;if(h&&(!p.catch||!p.finally))return!0;if(!l||l<51||!/native code/.test(t)){var e=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((e.constructor={})[v]=n,!(d=e.then((function(){}))instanceof n))return!0}return!r&&(c||f)&&!g}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:g,SUBCLASSING:d}},2492:(t,r,e)=>{var n=e(7854);t.exports=n.Promise},9478:(t,r,e)=>{var n=e(9670),i=e(111),o=e(8523);t.exports=function(t,r){if(n(t),i(r)&&r.constructor===t)return r;var e=o.f(t);return(0,e.resolve)(r),e.promise}},612:(t,r,e)=>{var n=e(2492),i=e(7072),o=e(3702).CONSTRUCTOR;t.exports=o||!i((function(t){n.all(t).then(void 0,(function(){}))}))},8572:t=>{var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var r={item:t,next:null};this.head?this.tail.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=r},7651:(t,r,e)=>{var n=e(6916),i=e(9670),o=e(614),s=e(4326),a=e(2261),u=TypeError;t.exports=function(t,r){var e=t.exec;if(o(e)){var c=n(e,t,r);return null!==c&&i(c),c}if("RegExp"===s(t))return n(a,t,r);throw u("RegExp#exec called on incompatible receiver")}},2261:(t,r,e)=>{"use strict";var n,i,o=e(6916),s=e(1702),a=e(1340),u=e(7066),c=e(2999),f=e(2309),h=e(30),l=e(9909).get,p=e(9441),v=e(7168),d=f("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,y=g,m=s("".charAt),x=s("".indexOf),b=s("".replace),w=s("".slice),_=(i=/b*/g,o(g,n=/a/,"a"),o(g,i,"a"),0!==n.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(_||E||S||p||v)&&(y=function(t){var r,e,n,i,s,c,f,p=this,v=l(p),k=a(t),M=v.raw;if(M)return M.lastIndex=p.lastIndex,r=o(y,M,k),p.lastIndex=M.lastIndex,r;var A=v.groups,T=S&&p.sticky,P=o(u,p),O=p.source,I=0,R=k;if(T&&(P=b(P,"y",""),-1===x(P,"g")&&(P+="g"),R=w(k,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==m(k,p.lastIndex-1))&&(O="(?: "+O+")",R=" "+R,I++),e=new RegExp("^(?:"+O+")",P)),E&&(e=new RegExp("^"+O+"$(?!\\s)",P)),_&&(n=p.lastIndex),i=o(g,T?e:p,R),T?i?(i.input=w(i.input,I),i[0]=w(i[0],I),i.index=p.lastIndex,p.lastIndex+=i[0].length):p.lastIndex=0:_&&i&&(p.lastIndex=p.global?i.index+i[0].length:n),E&&i&&i.length>1&&o(d,i[0],e,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&A)for(i.groups=c=h(null),s=0;s<A.length;s++)c[(f=A[s])[0]]=i[f[1]];return i}),t.exports=y},7066:(t,r,e)=>{"use strict";var n=e(9670);t.exports=function(){var t=n(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r}},4706:(t,r,e)=>{var n=e(6916),i=e(2597),o=e(7976),s=e(7066),a=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in a||i(t,"flags")||!o(a,t)?r:n(s,t)}},2999:(t,r,e)=>{var n=e(7293),i=e(7854).RegExp,o=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=o||n((function(){return!i("a","y").sticky})),a=o||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},9441:(t,r,e)=>{var n=e(7293),i=e(7854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,r,e)=>{var n=e(7293),i=e(7854).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:(t,r,e)=>{var n=e(8554),i=TypeError;t.exports=function(t){if(n(t))throw i("Can't call method on "+t);return t}},6340:(t,r,e)=>{"use strict";var n=e(5005),i=e(3070),o=e(5112),s=e(9781),a=o("species");t.exports=function(t){var r=n(t),e=i.f;s&&r&&!r[a]&&e(r,a,{configurable:!0,get:function(){return this}})}},8003:(t,r,e)=>{var n=e(3070).f,i=e(2597),o=e(5112)("toStringTag");t.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:r})}},6200:(t,r,e)=>{var n=e(2309),i=e(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,r,e)=>{var n=e(7854),i=e(3072),o="__core-js_shared__",s=n[o]||i(o,{});t.exports=s},2309:(t,r,e)=>{var n=e(1913),i=e(5465);(t.exports=function(t,r){return i[t]||(i[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.26.0",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,r,e)=>{var n=e(9670),i=e(9483),o=e(8554),s=e(5112)("species");t.exports=function(t,r){var e,a=n(t).constructor;return void 0===a||o(e=n(a)[s])?r:i(e)}},8710:(t,r,e)=>{var n=e(1702),i=e(9303),o=e(1340),s=e(4488),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),f=function(t){return function(r,e){var n,f,h=o(s(r)),l=i(e),p=h.length;return l<0||l>=p?t?"":void 0:(n=u(h,l))<55296||n>56319||l+1===p||(f=u(h,l+1))<56320||f>57343?t?a(h,l):n:t?c(h,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},6293:(t,r,e)=>{var n=e(7392),i=e(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},6532:(t,r,e)=>{var n=e(6916),i=e(5005),o=e(5112),s=e(8052);t.exports=function(){var t=i("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,a=o("toPrimitive");r&&!r[a]&&s(r,a,(function(t){return n(e,this)}),{arity:1})}},2015:(t,r,e)=>{var n=e(6293);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},261:(t,r,e)=>{var n,i,o,s,a=e(7854),u=e(2104),c=e(9974),f=e(614),h=e(2597),l=e(7293),p=e(490),v=e(206),d=e(317),g=e(8053),y=e(6833),m=e(5268),x=a.setImmediate,b=a.clearImmediate,w=a.process,_=a.Dispatch,S=a.Function,E=a.MessageChannel,k=a.String,M=0,A={};try{n=a.location}catch(t){}var T=function(t){if(h(A,t)){var r=A[t];delete A[t],r()}},P=function(t){return function(){T(t)}},O=function(t){T(t.data)},I=function(t){a.postMessage(k(t),n.protocol+"//"+n.host)};x&&b||(x=function(t){g(arguments.length,1);var r=f(t)?t:S(t),e=v(arguments,1);return A[++M]=function(){u(r,void 0,e)},i(M),M},b=function(t){delete A[t]},m?i=function(t){w.nextTick(P(t))}:_&&_.now?i=function(t){_.now(P(t))}:E&&!y?(s=(o=new E).port2,o.port1.onmessage=O,i=c(s.postMessage,s)):a.addEventListener&&f(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!l(I)?(i=I,a.addEventListener("message",O,!1)):i="onreadystatechange"in d("script")?function(t){p.appendChild(d("script")).onreadystatechange=function(){p.removeChild(this),T(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:x,clear:b}},1400:(t,r,e)=>{var n=e(9303),i=Math.max,o=Math.min;t.exports=function(t,r){var e=n(t);return e<0?i(e+r,0):o(e,r)}},4599:(t,r,e)=>{var n=e(7593),i=TypeError;t.exports=function(t){var r=n(t,"number");if("number"==typeof r)throw i("Can't convert number to bigint");return BigInt(r)}},7067:(t,r,e)=>{var n=e(9303),i=e(7466),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=n(t),e=i(r);if(r!==e)throw o("Wrong length or index");return e}},5656:(t,r,e)=>{var n=e(8361),i=e(4488);t.exports=function(t){return n(i(t))}},9303:(t,r,e)=>{var n=e(4758);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},7466:(t,r,e)=>{var n=e(9303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:(t,r,e)=>{var n=e(4488),i=Object;t.exports=function(t){return i(n(t))}},4590:(t,r,e)=>{var n=e(3002),i=RangeError;t.exports=function(t,r){var e=n(t);if(e%r)throw i("Wrong offset");return e}},3002:(t,r,e)=>{var n=e(9303),i=RangeError;t.exports=function(t){var r=n(t);if(r<0)throw i("The argument can't be less than 0");return r}},7593:(t,r,e)=>{var n=e(6916),i=e(111),o=e(2190),s=e(8173),a=e(2140),u=e(5112),c=TypeError,f=u("toPrimitive");t.exports=function(t,r){if(!i(t)||o(t))return t;var e,u=s(t,f);if(u){if(void 0===r&&(r="default"),e=n(u,t,r),!i(e)||o(e))return e;throw c("Can't convert object to primitive value")}return void 0===r&&(r="number"),a(t,r)}},4948:(t,r,e)=>{var n=e(7593),i=e(2190);t.exports=function(t){var r=n(t,"string");return i(r)?r:r+""}},1694:(t,r,e)=>{var n={};n[e(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,r,e)=>{var n=e(648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9843:(t,r,e)=>{"use strict";var n=e(2109),i=e(7854),o=e(6916),s=e(9781),a=e(3832),u=e(260),c=e(3331),f=e(5787),h=e(9114),l=e(8880),p=e(5988),v=e(7466),d=e(7067),g=e(4590),y=e(4948),m=e(2597),x=e(648),b=e(111),w=e(2190),_=e(30),S=e(7976),E=e(7674),k=e(8006).f,M=e(7321),A=e(2092).forEach,T=e(6340),P=e(3070),O=e(1236),I=e(9909),R=e(9587),j=I.get,B=I.set,L=I.enforce,N=P.f,C=O.f,F=Math.round,Y=i.RangeError,X=c.ArrayBuffer,U=X.prototype,D=c.DataView,G=u.NATIVE_ARRAY_BUFFER_VIEWS,z=u.TYPED_ARRAY_TAG,V=u.TypedArray,W=u.TypedArrayPrototype,q=u.aTypedArrayConstructor,J=u.isTypedArray,$="BYTES_PER_ELEMENT",K="Wrong length",H=function(t,r){q(t);for(var e=0,n=r.length,i=new t(n);n>e;)i[e]=r[e++];return i},Z=function(t,r){N(t,r,{get:function(){return j(this)[r]}})},Q=function(t){var r;return S(U,t)||"ArrayBuffer"==(r=x(t))||"SharedArrayBuffer"==r},tt=function(t,r){return J(t)&&!w(r)&&r in t&&p(+r)&&r>=0},rt=function(t,r){return r=y(r),tt(t,r)?h(2,t[r]):C(t,r)},et=function(t,r,e){return r=y(r),!(tt(t,r)&&b(e)&&m(e,"value"))||m(e,"get")||m(e,"set")||e.configurable||m(e,"writable")&&!e.writable||m(e,"enumerable")&&!e.enumerable?N(t,r,e):(t[r]=e.value,t)};s?(G||(O.f=rt,P.f=et,Z(W,"buffer"),Z(W,"byteOffset"),Z(W,"byteLength"),Z(W,"length")),n({target:"Object",stat:!0,forced:!G},{getOwnPropertyDescriptor:rt,defineProperty:et}),t.exports=function(t,r,e){var s=t.match(/\d+$/)[0]/8,u=t+(e?"Clamped":"")+"Array",c="get"+t,h="set"+t,p=i[u],y=p,m=y&&y.prototype,x={},w=function(t,r){N(t,r,{get:function(){return function(t,r){var e=j(t);return e.view[c](r*s+e.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,n){var i=j(t);e&&(n=(n=F(n))<0?0:n>255?255:255&n),i.view[h](r*s+i.byteOffset,n,!0)}(this,r,t)},enumerable:!0})};G?a&&(y=r((function(t,r,e,n){return f(t,m),R(b(r)?Q(r)?void 0!==n?new p(r,g(e,s),n):void 0!==e?new p(r,g(e,s)):new p(r):J(r)?H(y,r):o(M,y,r):new p(d(r)),t,y)})),E&&E(y,V),A(k(p),(function(t){t in y||l(y,t,p[t])})),y.prototype=m):(y=r((function(t,r,e,n){f(t,m);var i,a,u,c=0,h=0;if(b(r)){if(!Q(r))return J(r)?H(y,r):o(M,y,r);i=r,h=g(e,s);var l=r.byteLength;if(void 0===n){if(l%s)throw Y(K);if((a=l-h)<0)throw Y(K)}else if((a=v(n)*s)+h>l)throw Y(K);u=a/s}else u=d(r),i=new X(a=u*s);for(B(t,{buffer:i,byteOffset:h,byteLength:a,length:u,view:new D(i)});c<u;)w(t,c++)})),E&&E(y,V),m=y.prototype=_(W)),m.constructor!==y&&l(m,"constructor",y),L(m).TypedArrayConstructor=y,z&&l(m,z,u);var S=y!=p;x[u]=y,n({global:!0,constructor:!0,forced:S,sham:!G},x),$ in y||l(y,$,s),$ in m||l(m,$,s),T(u)}):t.exports=function(){}},3832:(t,r,e)=>{var n=e(7854),i=e(7293),o=e(7072),s=e(260).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,u=n.Int8Array;t.exports=!s||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||i((function(){return 1!==new u(new a(2),1,void 0).length}))},3074:(t,r,e)=>{var n=e(7745),i=e(6304);t.exports=function(t,r){return n(i(t),r)}},7321:(t,r,e)=>{var n=e(9974),i=e(6916),o=e(9483),s=e(7908),a=e(6244),u=e(4121),c=e(1246),f=e(7659),h=e(4067),l=e(260).aTypedArrayConstructor,p=e(4599);t.exports=function(t){var r,e,v,d,g,y,m,x,b=o(this),w=s(t),_=arguments.length,S=_>1?arguments[1]:void 0,E=void 0!==S,k=c(w);if(k&&!f(k))for(x=(m=u(w,k)).next,w=[];!(y=i(x,m)).done;)w.push(y.value);for(E&&_>2&&(S=n(S,arguments[2])),e=a(w),v=new(l(b))(e),d=h(v),r=0;e>r;r++)g=E?S(w[r],r):w[r],v[r]=d?p(g):+g;return v}},6304:(t,r,e)=>{var n=e(260),i=e(6707),o=n.aTypedArrayConstructor,s=n.getTypedArrayConstructor;t.exports=function(t){return o(i(t,s(t)))}},9711:(t,r,e)=>{var n=e(1702),i=0,o=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3307:(t,r,e)=>{var n=e(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,r,e)=>{var n=e(9781),i=e(7293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var r=TypeError;t.exports=function(t,e){if(t<e)throw r("Not enough arguments");return t}},4811:(t,r,e)=>{var n=e(7854),i=e(614),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},6800:(t,r,e)=>{var n=e(857),i=e(2597),o=e(6061),s=e(3070).f;t.exports=function(t){var r=n.Symbol||(n.Symbol={});i(r,t)||s(r,t,{value:o.f(t)})}},6061:(t,r,e)=>{var n=e(5112);r.f=n},5112:(t,r,e)=>{var n=e(7854),i=e(2309),o=e(2597),s=e(9711),a=e(6293),u=e(3307),c=i("wks"),f=n.Symbol,h=f&&f.for,l=u?f:f&&f.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var r="Symbol."+t;a&&o(f,t)?c[t]=f[t]:c[t]=u&&h?h(r):l(r)}return c[t]}},8264:(t,r,e)=>{"use strict";var n=e(2109),i=e(7854),o=e(3331),s=e(6340),a=o.ArrayBuffer;n({global:!0,constructor:!0,forced:i.ArrayBuffer!==a},{ArrayBuffer:a}),s("ArrayBuffer")},2222:(t,r,e)=>{"use strict";var n=e(2109),i=e(7293),o=e(3157),s=e(111),a=e(7908),u=e(6244),c=e(7207),f=e(6135),h=e(5417),l=e(1194),p=e(5112),v=e(7392),d=p("isConcatSpreadable"),g=v>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),y=l("concat"),m=function(t){if(!s(t))return!1;var r=t[d];return void 0!==r?!!r:o(t)};n({target:"Array",proto:!0,arity:1,forced:!g||!y},{concat:function(t){var r,e,n,i,o,s=a(this),l=h(s,0),p=0;for(r=-1,n=arguments.length;r<n;r++)if(m(o=-1===r?s:arguments[r]))for(i=u(o),c(p+i),e=0;e<i;e++,p++)e in o&&f(l,p,o[e]);else c(p+1),f(l,p++,o);return l.length=p,l}})},7327:(t,r,e)=>{"use strict";var n=e(2109),i=e(2092).filter;n({target:"Array",proto:!0,forced:!e(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,r,e)=>{var n=e(2109),i=e(8457);n({target:"Array",stat:!0,forced:!e(7072)((function(t){Array.from(t)}))},{from:i})},6992:(t,r,e)=>{"use strict";var n=e(5656),i=e(1223),o=e(7497),s=e(9909),a=e(3070).f,u=e(1656),c=e(6178),f=e(1913),h=e(9781),l="Array Iterator",p=s.set,v=s.getterFor(l);t.exports=u(Array,"Array",(function(t,r){p(this,{type:l,target:n(t),index:0,kind:r})}),(function(){var t=v(this),r=t.target,e=t.kind,n=t.index++;return!r||n>=r.length?(t.target=void 0,c(void 0,!0)):c("keys"==e?n:"values"==e?r[n]:[n,r[n]],!1)}),"values");var d=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!f&&h&&"values"!==d.name)try{a(d,"name",{value:"values"})}catch(t){}},9600:(t,r,e)=>{"use strict";var n=e(2109),i=e(1702),o=e(8361),s=e(5656),a=e(9341),u=i([].join),c=o!=Object,f=a("join",",");n({target:"Array",proto:!0,forced:c||!f},{join:function(t){return u(s(this),void 0===t?",":t)}})},1249:(t,r,e)=>{"use strict";var n=e(2109),i=e(2092).map;n({target:"Array",proto:!0,forced:!e(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,r,e)=>{"use strict";var n=e(2109),i=e(3157),o=e(4411),s=e(111),a=e(1400),u=e(6244),c=e(5656),f=e(6135),h=e(5112),l=e(1194),p=e(206),v=l("slice"),d=h("species"),g=Array,y=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(t,r){var e,n,h,l=c(this),v=u(l),m=a(t,v),x=a(void 0===r?v:r,v);if(i(l)&&(e=l.constructor,(o(e)&&(e===g||i(e.prototype))||s(e)&&null===(e=e[d]))&&(e=void 0),e===g||void 0===e))return p(l,m,x);for(n=new(void 0===e?g:e)(y(x-m,0)),h=0;m<x;m++,h++)m in l&&f(n,h,l[m]);return n.length=h,n}})},2707:(t,r,e)=>{"use strict";var n=e(2109),i=e(1702),o=e(9662),s=e(7908),a=e(6244),u=e(5117),c=e(1340),f=e(7293),h=e(4362),l=e(9341),p=e(8886),v=e(256),d=e(7392),g=e(8008),y=[],m=i(y.sort),x=i(y.push),b=f((function(){y.sort(void 0)})),w=f((function(){y.sort(null)})),_=l("sort"),S=!f((function(){if(d)return d<70;if(!(p&&p>3)){if(v)return!0;if(g)return g<603;var t,r,e,n,i="";for(t=65;t<76;t++){switch(r=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(n=0;n<47;n++)y.push({k:r+n,v:e})}for(y.sort((function(t,r){return r.v-t.v})),n=0;n<y.length;n++)r=y[n].k.charAt(0),i.charAt(i.length-1)!==r&&(i+=r);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:b||!w||!_||!S},{sort:function(t){void 0!==t&&o(t);var r=s(this);if(S)return void 0===t?m(r):m(r,t);var e,n,i=[],f=a(r);for(n=0;n<f;n++)n in r&&x(i,r[n]);for(h(i,function(t){return function(r,e){return void 0===e?-1:void 0===r?1:void 0!==t?+t(r,e)||0:c(r)>c(e)?1:-1}}(t)),e=a(i),n=0;n<e;)r[n]=i[n++];for(;n<f;)u(r,n++);return r}})},8862:(t,r,e)=>{var n=e(2109),i=e(5005),o=e(2104),s=e(6916),a=e(1702),u=e(7293),c=e(3157),f=e(614),h=e(111),l=e(2190),p=e(206),v=e(6293),d=i("JSON","stringify"),g=a(/./.exec),y=a("".charAt),m=a("".charCodeAt),x=a("".replace),b=a(1..toString),w=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,E=!v||u((function(){var t=i("Symbol")();return"[null]"!=d([t])||"{}"!=d({a:t})||"{}"!=d(Object(t))})),k=u((function(){return'"\\udf06\\ud834"'!==d("\udf06\ud834")||'"\\udead"'!==d("\udead")})),M=function(t,r){var e=p(arguments),n=r;if((h(r)||void 0!==t)&&!l(t))return c(r)||(r=function(t,r){if(f(n)&&(r=s(n,this,t,r)),!l(r))return r}),e[1]=r,o(d,null,e)},A=function(t,r,e){var n=y(e,r-1),i=y(e,r+1);return g(_,t)&&!g(S,i)||g(S,t)&&!g(_,n)?"\\u"+b(m(t,0),16):t};d&&n({target:"JSON",stat:!0,arity:3,forced:E||k},{stringify:function(t,r,e){var n=p(arguments),i=o(E?M:d,null,n);return k&&"string"==typeof i?x(i,w,A):i}})},9601:(t,r,e)=>{var n=e(2109),i=e(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9660:(t,r,e)=>{var n=e(2109),i=e(6293),o=e(7293),s=e(5181),a=e(7908);n({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var r=s.f;return r?r(a(t)):[]}})},7941:(t,r,e)=>{var n=e(2109),i=e(7908),o=e(1956);n({target:"Object",stat:!0,forced:e(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,r,e)=>{var n=e(1694),i=e(8052),o=e(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},821:(t,r,e)=>{"use strict";var n=e(2109),i=e(6916),o=e(9662),s=e(8523),a=e(2534),u=e(408);n({target:"Promise",stat:!0,forced:e(612)},{all:function(t){var r=this,e=s.f(r),n=e.resolve,c=e.reject,f=a((function(){var e=o(r.resolve),s=[],a=0,f=1;u(t,(function(t){var o=a++,u=!1;f++,i(e,r,t).then((function(t){u||(u=!0,s[o]=t,--f||n(s))}),c)})),--f||n(s)}));return f.error&&c(f.value),e.promise}})},4164:(t,r,e)=>{"use strict";var n=e(2109),i=e(1913),o=e(3702).CONSTRUCTOR,s=e(2492),a=e(5005),u=e(614),c=e(8052),f=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&u(s)){var h=a("Promise").prototype.catch;f.catch!==h&&c(f,"catch",h,{unsafe:!0})}},3401:(t,r,e)=>{"use strict";var n,i,o,s=e(2109),a=e(1913),u=e(5268),c=e(7854),f=e(6916),h=e(8052),l=e(7674),p=e(8003),v=e(6340),d=e(9662),g=e(614),y=e(111),m=e(5787),x=e(6707),b=e(261).set,w=e(5948),_=e(842),S=e(2534),E=e(8572),k=e(9909),M=e(2492),A=e(3702),T=e(8523),P="Promise",O=A.CONSTRUCTOR,I=A.REJECTION_EVENT,R=A.SUBCLASSING,j=k.getterFor(P),B=k.set,L=M&&M.prototype,N=M,C=L,F=c.TypeError,Y=c.document,X=c.process,U=T.f,D=U,G=!!(Y&&Y.createEvent&&c.dispatchEvent),z="unhandledrejection",V=function(t){var r;return!(!y(t)||!g(r=t.then))&&r},W=function(t,r){var e,n,i,o=r.value,s=1==r.state,a=s?t.ok:t.fail,u=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===r.rejection&&H(r),r.rejection=1),!0===a?e=o:(h&&h.enter(),e=a(o),h&&(h.exit(),i=!0)),e===t.promise?c(F("Promise-chain cycle")):(n=V(e))?f(n,e,u,c):u(e)):c(o)}catch(t){h&&!i&&h.exit(),c(t)}},q=function(t,r){t.notified||(t.notified=!0,w((function(){for(var e,n=t.reactions;e=n.get();)W(e,t);t.notified=!1,r&&!t.rejection&&$(t)})))},J=function(t,r,e){var n,i;G?((n=Y.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:r,reason:e},!I&&(i=c["on"+t])?i(n):t===z&&_("Unhandled promise rejection",e)},$=function(t){f(b,c,(function(){var r,e=t.facade,n=t.value;if(K(t)&&(r=S((function(){u?X.emit("unhandledRejection",n,e):J(z,e,n)})),t.rejection=u||K(t)?2:1,r.error))throw r.value}))},K=function(t){return 1!==t.rejection&&!t.parent},H=function(t){f(b,c,(function(){var r=t.facade;u?X.emit("rejectionHandled",r):J("rejectionhandled",r,t.value)}))},Z=function(t,r,e){return function(n){t(r,n,e)}},Q=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,q(t,!0))},tt=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw F("Promise can't be resolved itself");var n=V(r);n?w((function(){var e={done:!1};try{f(n,r,Z(tt,e,t),Z(Q,e,t))}catch(r){Q(e,r,t)}})):(t.value=r,t.state=1,q(t,!1))}catch(r){Q({done:!1},r,t)}}};if(O&&(C=(N=function(t){m(this,C),d(t),f(n,this);var r=j(this);try{t(Z(tt,r),Z(Q,r))}catch(t){Q(r,t)}}).prototype,(n=function(t){B(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=h(C,"then",(function(t,r){var e=j(this),n=U(x(this,N));return e.parent=!0,n.ok=!g(t)||t,n.fail=g(r)&&r,n.domain=u?X.domain:void 0,0==e.state?e.reactions.add(n):w((function(){W(n,e)})),n.promise})),i=function(){var t=new n,r=j(t);this.promise=t,this.resolve=Z(tt,r),this.reject=Z(Q,r)},T.f=U=function(t){return t===N||void 0===t?new i(t):D(t)},!a&&g(M)&&L!==Object.prototype)){o=L.then,R||h(L,"then",(function(t,r){var e=this;return new N((function(t,r){f(o,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete L.constructor}catch(t){}l&&l(L,C)}s({global:!0,constructor:!0,wrap:!0,forced:O},{Promise:N}),p(N,P,!1,!0),v(P)},8674:(t,r,e)=>{e(3401),e(821),e(4164),e(6027),e(683),e(6294)},6027:(t,r,e)=>{"use strict";var n=e(2109),i=e(6916),o=e(9662),s=e(8523),a=e(2534),u=e(408);n({target:"Promise",stat:!0,forced:e(612)},{race:function(t){var r=this,e=s.f(r),n=e.reject,c=a((function(){var s=o(r.resolve);u(t,(function(t){i(s,r,t).then(e.resolve,n)}))}));return c.error&&n(c.value),e.promise}})},683:(t,r,e)=>{"use strict";var n=e(2109),i=e(6916),o=e(8523);n({target:"Promise",stat:!0,forced:e(3702).CONSTRUCTOR},{reject:function(t){var r=o.f(this);return i(r.reject,void 0,t),r.promise}})},6294:(t,r,e)=>{"use strict";var n=e(2109),i=e(5005),o=e(1913),s=e(2492),a=e(3702).CONSTRUCTOR,u=e(9478),c=i("Promise"),f=o&&!a;n({target:"Promise",stat:!0,forced:o||a},{resolve:function(t){return u(f&&this===c?s:this,t)}})},4916:(t,r,e)=>{"use strict";var n=e(2109),i=e(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,r,e)=>{"use strict";var n=e(6530).PROPER,i=e(8052),o=e(9670),s=e(1340),a=e(7293),u=e(4706),c="toString",f=RegExp.prototype.toString,h=a((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),l=n&&f.name!=c;(h||l)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+s(t.source)+"/"+s(u(t))}),{unsafe:!0})},8783:(t,r,e)=>{"use strict";var n=e(8710).charAt,i=e(1340),o=e(9909),s=e(1656),a=e(6178),u="String Iterator",c=o.set,f=o.getterFor(u);s(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,r=f(this),e=r.string,i=r.index;return i>=e.length?a(void 0,!0):(t=n(e,i),r.index+=t.length,a(t,!1))}))},4723:(t,r,e)=>{"use strict";var n=e(6916),i=e(7007),o=e(9670),s=e(8554),a=e(7466),u=e(1340),c=e(4488),f=e(8173),h=e(1530),l=e(7651);i("match",(function(t,r,e){return[function(r){var e=c(this),i=s(r)?void 0:f(r,t);return i?n(i,r,e):new RegExp(r)[t](u(e))},function(t){var n=o(this),i=u(t),s=e(r,n,i);if(s.done)return s.value;if(!n.global)return l(n,i);var c=n.unicode;n.lastIndex=0;for(var f,p=[],v=0;null!==(f=l(n,i));){var d=u(f[0]);p[v]=d,""===d&&(n.lastIndex=h(i,a(n.lastIndex),c)),v++}return 0===v?null:p}]}))},5306:(t,r,e)=>{"use strict";var n=e(2104),i=e(6916),o=e(1702),s=e(7007),a=e(7293),u=e(9670),c=e(614),f=e(8554),h=e(9303),l=e(7466),p=e(1340),v=e(4488),d=e(1530),g=e(8173),y=e(647),m=e(7651),x=e(5112)("replace"),b=Math.max,w=Math.min,_=o([].concat),S=o([].push),E=o("".indexOf),k=o("".slice),M="$0"==="a".replace(/./,"$0"),A=!!/./[x]&&""===/./[x]("a","$0");s("replace",(function(t,r,e){var o=A?"$":"$0";return[function(t,e){var n=v(this),o=f(t)?void 0:g(t,x);return o?i(o,t,n,e):i(r,p(n),t,e)},function(t,i){var s=u(this),a=p(t);if("string"==typeof i&&-1===E(i,o)&&-1===E(i,"$<")){var f=e(r,s,a,i);if(f.done)return f.value}var v=c(i);v||(i=p(i));var g=s.global;if(g){var x=s.unicode;s.lastIndex=0}for(var M=[];;){var A=m(s,a);if(null===A)break;if(S(M,A),!g)break;""===p(A[0])&&(s.lastIndex=d(a,l(s.lastIndex),x))}for(var T,P="",O=0,I=0;I<M.length;I++){for(var R=p((A=M[I])[0]),j=b(w(h(A.index),a.length),0),B=[],L=1;L<A.length;L++)S(B,void 0===(T=A[L])?T:String(T));var N=A.groups;if(v){var C=_([R],B,j,a);void 0!==N&&S(C,N);var F=p(n(i,void 0,C))}else F=y(R,a,j,B,N,i);j>=O&&(P+=k(a,O,j)+F,O=j+R.length)}return P+k(a,O)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!M||A)},4032:(t,r,e)=>{"use strict";var n=e(2109),i=e(7854),o=e(6916),s=e(1702),a=e(1913),u=e(9781),c=e(6293),f=e(7293),h=e(2597),l=e(7976),p=e(9670),v=e(5656),d=e(4948),g=e(1340),y=e(9114),m=e(30),x=e(1956),b=e(8006),w=e(1156),_=e(5181),S=e(1236),E=e(3070),k=e(6048),M=e(5296),A=e(8052),T=e(2309),P=e(6200),O=e(3501),I=e(9711),R=e(5112),j=e(6061),B=e(6800),L=e(6532),N=e(8003),C=e(9909),F=e(2092).forEach,Y=P("hidden"),X="Symbol",U=C.set,D=C.getterFor(X),G=Object.prototype,z=i.Symbol,V=z&&z.prototype,W=i.TypeError,q=i.QObject,J=S.f,$=E.f,K=w.f,H=M.f,Z=s([].push),Q=T("symbols"),tt=T("op-symbols"),rt=T("wks"),et=!q||!q.prototype||!q.prototype.findChild,nt=u&&f((function(){return 7!=m($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(t,r,e){var n=J(G,r);n&&delete G[r],$(t,r,e),n&&t!==G&&$(G,r,n)}:$,it=function(t,r){var e=Q[t]=m(V);return U(e,{type:X,tag:t,description:r}),u||(e.description=r),e},ot=function(t,r,e){t===G&&ot(tt,r,e),p(t);var n=d(r);return p(e),h(Q,n)?(e.enumerable?(h(t,Y)&&t[Y][n]&&(t[Y][n]=!1),e=m(e,{enumerable:y(0,!1)})):(h(t,Y)||$(t,Y,y(1,{})),t[Y][n]=!0),nt(t,n,e)):$(t,n,e)},st=function(t,r){p(t);var e=v(r),n=x(e).concat(ft(e));return F(n,(function(r){u&&!o(at,e,r)||ot(t,r,e[r])})),t},at=function(t){var r=d(t),e=o(H,this,r);return!(this===G&&h(Q,r)&&!h(tt,r))&&(!(e||!h(this,r)||!h(Q,r)||h(this,Y)&&this[Y][r])||e)},ut=function(t,r){var e=v(t),n=d(r);if(e!==G||!h(Q,n)||h(tt,n)){var i=J(e,n);return!i||!h(Q,n)||h(e,Y)&&e[Y][n]||(i.enumerable=!0),i}},ct=function(t){var r=K(v(t)),e=[];return F(r,(function(t){h(Q,t)||h(O,t)||Z(e,t)})),e},ft=function(t){var r=t===G,e=K(r?tt:v(t)),n=[];return F(e,(function(t){!h(Q,t)||r&&!h(G,t)||Z(n,Q[t])})),n};c||(A(V=(z=function(){if(l(V,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,r=I(t),e=function(t){this===G&&o(e,tt,t),h(this,Y)&&h(this[Y],r)&&(this[Y][r]=!1),nt(this,r,y(1,t))};return u&&et&&nt(G,r,{configurable:!0,set:e}),it(r,t)}).prototype,"toString",(function(){return D(this).tag})),A(z,"withoutSetter",(function(t){return it(I(t),t)})),M.f=at,E.f=ot,k.f=st,S.f=ut,b.f=w.f=ct,_.f=ft,j.f=function(t){return it(R(t),t)},u&&($(V,"description",{configurable:!0,get:function(){return D(this).description}}),a||A(G,"propertyIsEnumerable",at,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),F(x(rt),(function(t){B(t)})),n({target:X,stat:!0,forced:!c},{useSetter:function(){et=!0},useSimple:function(){et=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,r){return void 0===r?m(t):st(m(t),r)},defineProperty:ot,defineProperties:st,getOwnPropertyDescriptor:ut}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ct}),L(),N(z,X),O[Y]=!0},1817:(t,r,e)=>{"use strict";var n=e(2109),i=e(9781),o=e(7854),s=e(1702),a=e(2597),u=e(614),c=e(7976),f=e(1340),h=e(3070).f,l=e(9920),p=o.Symbol,v=p&&p.prototype;if(i&&u(p)&&(!("description"in v)||void 0!==p().description)){var d={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),r=c(v,this)?new p(t):void 0===t?p():p(t);return""===t&&(d[r]=!0),r};l(g,p),g.prototype=v,v.constructor=g;var y="Symbol(test)"==String(p("test")),m=s(v.valueOf),x=s(v.toString),b=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),_=s("".slice);h(v,"description",{configurable:!0,get:function(){var t=m(this);if(a(d,t))return"";var r=x(t),e=y?_(r,7,-1):w(r,b,"$1");return""===e?void 0:e}}),n({global:!0,constructor:!0,forced:!0},{Symbol:g})}},763:(t,r,e)=>{var n=e(2109),i=e(5005),o=e(2597),s=e(1340),a=e(2309),u=e(2015),c=a("string-to-symbol-registry"),f=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var r=s(t);if(o(c,r))return c[r];var e=i("Symbol")(r);return c[r]=e,f[e]=r,e}})},2165:(t,r,e)=>{e(6800)("iterator")},2526:(t,r,e)=>{e(4032),e(763),e(6620),e(8862),e(9660)},6620:(t,r,e)=>{var n=e(2109),i=e(2597),o=e(2190),s=e(6330),a=e(2309),u=e(2015),c=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(i(c,t))return c[t]}})},2990:(t,r,e)=>{"use strict";var n=e(1702),i=e(260),o=n(e(1048)),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,r){return o(s(this),t,r,arguments.length>2?arguments[2]:void 0)}))},8927:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3105:(t,r,e)=>{"use strict";var n=e(260),i=e(1285),o=e(4599),s=e(648),a=e(6916),u=e(1702),c=e(7293),f=n.aTypedArray,h=n.exportTypedArrayMethod,l=u("".slice);h("fill",(function(t){var r=arguments.length;f(this);var e="Big"===l(s(this),0,3)?o(t):+t;return a(i,this,e,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},5035:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).filter,o=e(3074),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var r=i(s(this),t,arguments.length>1?arguments[1]:void 0);return o(this,r)}))},7174:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4345:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6495:(t,r,e)=>{e(9843)("Float64",(function(t){return function(r,e,n){return t(this,r,e,n)}}))},2846:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4731:(t,r,e)=>{"use strict";var n=e(260),i=e(1318).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},7209:(t,r,e)=>{"use strict";var n=e(260),i=e(1318).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6319:(t,r,e)=>{"use strict";var n=e(7854),i=e(7293),o=e(1702),s=e(260),a=e(6992),u=e(5112)("iterator"),c=n.Uint8Array,f=o(a.values),h=o(a.keys),l=o(a.entries),p=s.aTypedArray,v=s.exportTypedArrayMethod,d=c&&c.prototype,g=!i((function(){d[u].call([1])})),y=!!d&&d.values&&d[u]===d.values&&"values"===d.values.name,m=function(){return f(p(this))};v("entries",(function(){return l(p(this))}),g),v("keys",(function(){return h(p(this))}),g),v("values",m,g||!y,{name:"values"}),v(u,m,g||!y,{name:"values"})},8867:(t,r,e)=>{"use strict";var n=e(260),i=e(1702),o=n.aTypedArray,s=n.exportTypedArrayMethod,a=i([].join);s("join",(function(t){return a(o(this),t)}))},7789:(t,r,e)=>{"use strict";var n=e(260),i=e(2104),o=e(6583),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var r=arguments.length;return i(o,s(this),r>1?[t,arguments[1]]:[t])}))},3739:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).map,o=e(6304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(o(t))(r)}))}))},4483:(t,r,e)=>{"use strict";var n=e(260),i=e(3671).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var r=arguments.length;return i(o(this),t,r,r>1?arguments[1]:void 0)}))},9368:(t,r,e)=>{"use strict";var n=e(260),i=e(3671).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var r=arguments.length;return i(o(this),t,r,r>1?arguments[1]:void 0)}))},2056:(t,r,e)=>{"use strict";var n=e(260),i=n.aTypedArray,o=n.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var t,r=this,e=i(r).length,n=s(e/2),o=0;o<n;)t=r[o],r[o++]=r[--e],r[e]=t;return r}))},3462:(t,r,e)=>{"use strict";var n=e(7854),i=e(6916),o=e(260),s=e(6244),a=e(4590),u=e(7908),c=e(7293),f=n.RangeError,h=n.Int8Array,l=h&&h.prototype,p=l&&l.set,v=o.aTypedArray,d=o.exportTypedArrayMethod,g=!c((function(){var t=new Uint8ClampedArray(2);return i(p,t,{length:1,0:3},1),3!==t[1]})),y=g&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));d("set",(function(t){v(this);var r=a(arguments.length>1?arguments[1]:void 0,1),e=u(t);if(g)return i(p,this,e,r);var n=this.length,o=s(e),c=0;if(o+r>n)throw f("Wrong length");for(;c<o;)this[r+c]=e[c++]}),!g||y)},678:(t,r,e)=>{"use strict";var n=e(260),i=e(6304),o=e(7293),s=e(206),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,r){for(var e=s(a(this),t,r),n=i(this),o=0,u=e.length,c=new n(u);u>o;)c[o]=e[o++];return c}),o((function(){new Int8Array(1).slice()})))},7462:(t,r,e)=>{"use strict";var n=e(260),i=e(2092).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3824:(t,r,e)=>{"use strict";var n=e(7854),i=e(1702),o=e(7293),s=e(9662),a=e(4362),u=e(260),c=e(8886),f=e(256),h=e(7392),l=e(8008),p=u.aTypedArray,v=u.exportTypedArrayMethod,d=n.Uint16Array,g=d&&i(d.prototype.sort),y=!(!g||o((function(){g(new d(2),null)}))&&o((function(){g(new d(2),{})}))),m=!!g&&!o((function(){if(h)return h<74;if(c)return c<67;if(f)return!0;if(l)return l<602;var t,r,e=new d(516),n=Array(516);for(t=0;t<516;t++)r=t%4,e[t]=515-t,n[t]=t-2*r+3;for(g(e,(function(t,r){return(t/4|0)-(r/4|0)})),t=0;t<516;t++)if(e[t]!==n[t])return!0}));v("sort",(function(t){return void 0!==t&&s(t),m?g(this,t):a(p(this),function(t){return function(r,e){return void 0!==t?+t(r,e)||0:e!=e?-1:r!=r?1:0===r&&0===e?1/r>0&&1/e<0?1:-1:r>e}}(t))}),!m||y)},5021:(t,r,e)=>{"use strict";var n=e(260),i=e(7466),o=e(1400),s=e(6304),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(t,r){var e=a(this),n=e.length,u=o(t,n);return new(s(e))(e.buffer,e.byteOffset+u*e.BYTES_PER_ELEMENT,i((void 0===r?n:o(r,n))-u))}))},2974:(t,r,e)=>{"use strict";var n=e(7854),i=e(2104),o=e(260),s=e(7293),a=e(206),u=n.Int8Array,c=o.aTypedArray,f=o.exportTypedArrayMethod,h=[].toLocaleString,l=!!u&&s((function(){h.call(new u(1))}));f("toLocaleString",(function(){return i(h,l?a(c(this)):c(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!s((function(){u.prototype.toLocaleString.call([1,2])})))},5016:(t,r,e)=>{"use strict";var n=e(260).exportTypedArrayMethod,i=e(7293),o=e(7854),s=e(1702),a=o.Uint8Array,u=a&&a.prototype||{},c=[].toString,f=s([].join);i((function(){c.call({})}))&&(c=function(){return f(this)});var h=u.toString!=c;n("toString",c,h)},9135:(t,r,e)=>{e(9843)("Uint32",(function(t){return function(r,e,n){return t(this,r,e,n)}}))},3948:(t,r,e)=>{var n=e(7854),i=e(8324),o=e(8509),s=e(6992),a=e(8880),u=e(5112),c=u("iterator"),f=u("toStringTag"),h=s.values,l=function(t,r){if(t){if(t[c]!==h)try{a(t,c,h)}catch(r){t[c]=h}if(t[f]||a(t,f,r),i[r])for(var e in s)if(t[e]!==s[e])try{a(t,e,s[e])}catch(r){t[e]=s[e]}}};for(var p in i)l(n[p]&&n[p].prototype,p);l(o,"DOMTokenList")},1787:(t,r,e)=>{var n=e(4056),i=e(4102),o=e(1540),s=e(9705).Z,a=o.featureEach,u=(o.coordEach,i.polygon,i.featureCollection);function c(t){var r=new n(t);return r.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),n.prototype.insert.call(this,t)},r.load=function(t){var r=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),r.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),r.push(t)})),n.prototype.load.call(this,r)},r.remove=function(t,r){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),n.prototype.remove.call(this,t,r)},r.clear=function(){return n.prototype.clear.call(this)},r.search=function(t){var r=n.prototype.search.call(this,this.toBBox(t));return u(r)},r.collides=function(t){return n.prototype.collides.call(this,this.toBBox(t))},r.all=function(){var t=n.prototype.all.call(this);return u(t)},r.toJSON=function(){return n.prototype.toJSON.call(this)},r.fromJSON=function(t){return n.prototype.fromJSON.call(this,t)},r.toBBox=function(t){var r;if(t.bbox)r=t.bbox;else if(Array.isArray(t)&&4===t.length)r=t;else if(Array.isArray(t)&&6===t.length)r=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)r=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");r=s(t)}return{minX:r[0],minY:r[1],maxX:r[2],maxY:r[3]}},r}t.exports=c,t.exports.default=c},4056:function(t){t.exports=function(){"use strict";function t(t,n,i,o,s){!function t(e,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=n-i+1,c=Math.log(a),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(a-f)/a)*(u-a/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-u*f/a+h)),Math.min(o,Math.floor(n+(a-u)*f/a+h)),s)}var l=e[n],p=i,v=o;for(r(e,i,n),s(e[o],l)>0&&r(e,i,o);p<v;){for(r(e,p,v),p++,v--;s(e[p],l)<0;)p++;for(;s(e[v],l)>0;)v--}0===s(e[i],l)?r(e,i,v):r(e,++v,o),v<=n&&(i=v+1),n<=v&&(o=v-1)}}(t,n,i||0,o||t.length-1,s||e)}function r(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function e(t,r){return t<r?-1:t>r?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,r,e){if(!e)return r.indexOf(t);for(var n=0;n<r.length;n++)if(e(t,r[n]))return n;return-1}function o(t,r){s(t,0,t.children.length,r,t)}function s(t,r,e,n,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=r;o<e;o++){var s=t.children[o];a(i,t.leaf?n(s):s)}return i}function a(t,r){return t.minX=Math.min(t.minX,r.minX),t.minY=Math.min(t.minY,r.minY),t.maxX=Math.max(t.maxX,r.maxX),t.maxY=Math.max(t.maxY,r.maxY),t}function u(t,r){return t.minX-r.minX}function c(t,r){return t.minY-r.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,r){return t.minX<=r.minX&&t.minY<=r.minY&&r.maxX<=t.maxX&&r.maxY<=t.maxY}function p(t,r){return r.minX<=t.maxX&&r.minY<=t.maxY&&r.maxX>=t.minX&&r.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(r,e,n,i,o){for(var s=[e,n];s.length;)if(!((n=s.pop())-(e=s.pop())<=i)){var a=e+Math.ceil((n-e)/i/2)*i;t(r,a,e,n,o),s.push(e,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var r=this.data,e=[];if(!p(t,r))return e;for(var n=this.toBBox,i=[];r;){for(var o=0;o<r.children.length;o++){var s=r.children[o],a=r.leaf?n(s):s;p(t,a)&&(r.leaf?e.push(s):l(t,a)?this._all(s,e):i.push(s))}r=i.pop()}return e},n.prototype.collides=function(t){var r=this.data;if(!p(t,r))return!1;for(var e=[];r;){for(var n=0;n<r.children.length;n++){var i=r.children[n],o=r.leaf?this.toBBox(i):i;if(p(t,o)){if(r.leaf||l(t,o))return!0;e.push(i)}}r=e.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var r=0;r<t.length;r++)this.insert(t[r]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=v([]),this},n.prototype.remove=function(t,r){if(!t)return this;for(var e,n,o,s=this.data,a=this.toBBox(t),u=[],c=[];s||u.length;){if(s||(s=u.pop(),n=u[u.length-1],e=c.pop(),o=!0),s.leaf){var f=i(t,s.children,r);if(-1!==f)return s.children.splice(f,1),u.push(s),this._condense(u),this}o||s.leaf||!l(s,a)?n?(e++,s=n.children[e],o=!1):s=null:(u.push(s),c.push(e),e=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,r){return t.minX-r.minX},n.prototype.compareMinY=function(t,r){return t.minY-r.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,r){for(var e=[];t;)t.leaf?r.push.apply(r,t.children):e.push.apply(e,t.children),t=e.pop();return r},n.prototype._build=function(t,r,e,n){var i,s=e-r+1,a=this._maxEntries;if(s<=a)return o(i=v(t.slice(r,e+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(i=v([])).leaf=!1,i.height=n;var u=Math.ceil(s/a),c=u*Math.ceil(Math.sqrt(a));d(t,r,e,c,this.compareMinX);for(var f=r;f<=e;f+=c){var h=Math.min(f+c-1,e);d(t,f,h,u,this.compareMinY);for(var l=f;l<=h;l+=u){var p=Math.min(l+u-1,h);i.children.push(this._build(t,l,p,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,r,e,n){for(;n.push(r),!r.leaf&&n.length-1!==e;){for(var i=1/0,o=1/0,s=void 0,a=0;a<r.children.length;a++){var u=r.children[a],c=f(u),h=(l=t,p=u,(Math.max(p.maxX,l.maxX)-Math.min(p.minX,l.minX))*(Math.max(p.maxY,l.maxY)-Math.min(p.minY,l.minY))-c);h<o?(o=h,i=c<i?c:i,s=u):h===o&&c<i&&(i=c,s=u)}r=s||r.children[0]}var l,p;return r},n.prototype._insert=function(t,r,e){var n=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,r,i);for(o.children.push(t),a(o,n);r>=0&&i[r].children.length>this._maxEntries;)this._split(i,r),r--;this._adjustParentBBoxes(n,i,r)},n.prototype._split=function(t,r){var e=t[r],n=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,n);var s=this._chooseSplitIndex(e,i,n),a=v(e.children.splice(s,e.children.length-s));a.height=e.height,a.leaf=e.leaf,o(e,this.toBBox),o(a,this.toBBox),r?t[r-1].children.push(a):this._splitRoot(e,a)},n.prototype._splitRoot=function(t,r){this.data=v([t,r]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,r,e){for(var n,i,o,a,u,c,h,l=1/0,p=1/0,v=r;v<=e-r;v++){var d=s(t,0,v,this.toBBox),g=s(t,v,e,this.toBBox),y=(i=d,o=g,void 0,void 0,void 0,void 0,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-u)),m=f(d)+f(g);y<l?(l=y,n=v,p=m<p?m:p):y===l&&m<p&&(p=m,n=v)}return n||e-r},n.prototype._chooseSplitAxis=function(t,r,e){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,r,e,n)<this._allDistMargin(t,r,e,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,r,e,n){t.children.sort(n);for(var i=this.toBBox,o=s(t,0,r,i),u=s(t,e-r,e,i),c=h(o)+h(u),f=r;f<e-r;f++){var l=t.children[f];a(o,t.leaf?i(l):l),c+=h(o)}for(var p=e-r-1;p>=r;p--){var v=t.children[p];a(u,t.leaf?i(v):v),c+=h(u)}return c},n.prototype._adjustParentBBoxes=function(t,r,e){for(var n=e;n>=0;n--)a(r[n],t)},n.prototype._condense=function(t){for(var r=t.length-1,e=void 0;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children).splice(e.indexOf(t[r]),1):this.clear():o(t[r],this.toBBox)},n}()},1895:t=>{t.exports=function(t,r,e,n){var i=t[0],o=t[1],s=!1;void 0===e&&(e=0),void 0===n&&(n=r.length);for(var a=(n-e)/2,u=0,c=a-1;u<a;c=u++){var f=r[e+2*u+0],h=r[e+2*u+1],l=r[e+2*c+0],p=r[e+2*c+1];h>o!=p>o&&i<(l-f)*(o-h)/(p-h)+f&&(s=!s)}return s}},6960:(t,r,e)=>{var n=e(1895),i=e(8139);t.exports=function(t,r,e,o){return r.length>0&&Array.isArray(r[0])?i(t,r,e,o):n(t,r,e,o)},t.exports.nested=i,t.exports.flat=n},8139:t=>{t.exports=function(t,r,e,n){var i=t[0],o=t[1],s=!1;void 0===e&&(e=0),void 0===n&&(n=r.length);for(var a=n-e,u=0,c=a-1;u<a;c=u++){var f=r[u+e][0],h=r[u+e][1],l=r[c+e][0],p=r[c+e][1];h>o!=p>o&&i<(l-f)*(o-h)/(p-h)+f&&(s=!s)}return s}},2676:function(t){t.exports=function(){"use strict";function t(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}var n=function(t,r){this.next=null,this.key=t,this.data=r,this.left=null,this.right=null};function i(t,r){return t>r?1:t<r?-1:0}function o(t,r,e){for(var i=new n(null,null),o=i,s=i;;){var a=e(t,r.key);if(a<0){if(null===r.left)break;if(e(t,r.left.key)<0){var u=r.left;if(r.left=u.right,u.right=r,null===(r=u).left)break}s.left=r,s=r,r=r.left}else{if(!(a>0))break;if(null===r.right)break;if(e(t,r.right.key)>0&&(u=r.right,r.right=u.left,u.left=r,null===(r=u).right))break;o.right=r,o=r,r=r.right}}return o.right=r.left,s.left=r.right,r.left=i.right,r.right=i.left,r}function s(t,r,e,i){var s=new n(t,r);if(null===e)return s.left=s.right=null,s;var a=i(t,(e=o(t,e,i)).key);return a<0?(s.left=e.left,s.right=e,e.left=null):a>=0&&(s.right=e.right,s.left=e,e.right=null),s}function a(t,r,e){var n=null,i=null;if(r){var s=e((r=o(t,r,e)).key,t);0===s?(n=r.left,i=r.right):s<0?(i=r.right,r.right=null,n=r):(n=r.left,r.left=null,i=r)}return{left:n,right:i}}function u(t,r,e,n,i){if(t){n(r+(e?"└── ":"├── ")+i(t)+"\n");var o=r+(e?" ":"│ ");t.left&&u(t.left,o,!1,n,i),t.right&&u(t.right,o,!0,n,i)}}var c=function(){function t(t){void 0===t&&(t=i),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,r){return this._size++,this._root=s(t,r,this._root,this._comparator)},t.prototype.add=function(t,r){var e=new n(t,r);null===this._root&&(e.left=e.right=null,this._size++,this._root=e);var i=this._comparator,s=o(t,this._root,i),a=i(t,s.key);return 0===a?this._root=s:(a<0?(e.left=s.left,e.right=s,s.left=null):a>0&&(e.right=s.right,e.left=s,s.right=null),this._size++,this._root=e),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,r,e){var n;return null===r?null:0===e(t,(r=o(t,r,e)).key)?(null===r.left?n=r.right:(n=o(t,r.left,e)).right=r.right,this._size--,n):r},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var r=this._root,e=this._comparator;r;){var n=e(t,r.key);if(0===n)return r;r=n<0?r.left:r.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var r=this._root,e=this._comparator;r;){var n=e(t,r.key);if(0===n)return!0;r=n<0?r.left:r.right}return!1},t.prototype.forEach=function(t,r){for(var e=this._root,n=[],i=!1;!i;)null!==e?(n.push(e),e=e.left):0!==n.length?(e=n.pop(),t.call(r,e),e=e.right):i=!0;return this},t.prototype.range=function(t,r,e,n){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,r)>0)break;if(o(s.key,t)>=0&&e.call(n,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(r){var e=r.key;return t.push(e)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(r){var e=r.data;return t.push(e)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var r=this._root,e=!1,n=0,i=[];!e;)if(r)i.push(r),r=r.left;else if(i.length>0){if(r=i.pop(),n===t)return r;n++,r=r.right}else e=!0;return null},t.prototype.next=function(t){var r=this._root,e=null;if(t.right){for(e=t.right;e.left;)e=e.left;return e}for(var n=this._comparator;r;){var i=n(t.key,r.key);if(0===i)break;i<0?(e=r,r=r.left):r=r.right}return e},t.prototype.prev=function(t){var r=this._root,e=null;if(null!==t.left){for(e=t.left;e.right;)e=e.right;return e}for(var n=this._comparator;r;){var i=n(t.key,r.key);if(0===i)break;i<0?r=r.left:(e=r,r=r.right)}return e},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){for(var r=t,e=[],i=!1,o=new n(null,null),s=o;!i;)r?(e.push(r),r=r.left):e.length>0?r=(r=s=s.next=e.pop()).right:i=!0;return s.next=null,o.next}(this._root)},t.prototype.load=function(t,r,e){void 0===r&&(r=[]),void 0===e&&(e=!1);var i=t.length,o=this._comparator;if(e&&l(t,r,0,i-1,o),null===this._root)this._root=f(t,r,0,i),this._size=i;else{var s=function(t,r,e){for(var i=new n(null,null),o=i,s=t,a=r;null!==s&&null!==a;)e(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),i.next}(this.toList(),function(t,r){for(var e=new n(null,null),i=e,o=0;o<t.length;o++)i=i.next=new n(t[o],r[o]);return i.next=null,e.next}(t,r),o);i=this._size+i,this._root=h({head:s},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var r=[];return u(this._root,"",!0,(function(t){return r.push(t)}),t),r.join("")},t.prototype.update=function(t,r,e){var n=this._comparator,i=a(t,this._root,n),u=i.left,c=i.right;n(t,r)<0?c=s(r,e,c,n):u=s(r,e,u,n),this._root=function(t,r,e){return null===r?t:(null===t||((r=o(t.key,r,e)).left=t),r)}(u,c,n)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function f(t,r,e,i){var o=i-e;if(o>0){var s=e+Math.floor(o/2),a=t[s],u=r[s],c=new n(a,u);return c.left=f(t,r,e,s),c.right=f(t,r,s+1,i),c}return null}function h(t,r,e){var n=e-r;if(n>0){var i=r+Math.floor(n/2),o=h(t,r,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=h(t,i+1,e),s}return null}function l(t,r,e,n,i){if(!(e>=n)){for(var o=t[e+n>>1],s=e-1,a=n+1;;){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var u=t[s];t[s]=t[a],t[a]=u,u=r[s],r[s]=r[a],r[a]=u}l(t,r,e,a,i),l(t,r,a+1,n,i)}}var p=function(t,r){return t.ll.x<=r.x&&r.x<=t.ur.x&&t.ll.y<=r.y&&r.y<=t.ur.y},v=function(t,r){if(r.ur.x<t.ll.x||t.ur.x<r.ll.x||r.ur.y<t.ll.y||t.ur.y<r.ll.y)return null;var e=t.ll.x<r.ll.x?r.ll.x:t.ll.x,n=t.ur.x<r.ur.x?t.ur.x:r.ur.x;return{ll:{x:e,y:t.ll.y<r.ll.y?r.ll.y:t.ll.y},ur:{x:n,y:t.ur.y<r.ur.y?t.ur.y:r.ur.y}}},d=Number.EPSILON;void 0===d&&(d=Math.pow(2,-52));var g=d*d,y=function(t,r){if(-d<t&&t<d&&-d<r&&r<d)return 0;var e=t-r;return e*e<g*t*r?0:t<r?-1:1},m=function(){function r(){t(this,r),this.reset()}return e(r,[{key:"reset",value:function(){this.xRounder=new x,this.yRounder=new x}},{key:"round",value:function(t,r){return{x:this.xRounder.round(t),y:this.yRounder.round(r)}}}]),r}(),x=function(){function r(){t(this,r),this.tree=new c,this.round(0)}return e(r,[{key:"round",value:function(t){var r=this.tree.add(t),e=this.tree.prev(r);if(null!==e&&0===y(r.key,e.key))return this.tree.remove(t),e.key;var n=this.tree.next(r);return null!==n&&0===y(r.key,n.key)?(this.tree.remove(t),n.key):t}}]),r}(),b=new m,w=function(t,r){return t.x*r.y-t.y*r.x},_=function(t,r){return t.x*r.x+t.y*r.y},S=function(t,r,e){var n={x:r.x-t.x,y:r.y-t.y},i={x:e.x-t.x,y:e.y-t.y},o=w(n,i);return y(o,0)},E=function(t){return Math.sqrt(_(t,t))},k=function(t,r,e){var n={x:r.x-t.x,y:r.y-t.y},i={x:e.x-t.x,y:e.y-t.y};return _(i,n)/E(i)/E(n)},M=function(t,r,e){return 0===r.y?null:{x:t.x+r.x/r.y*(e-t.y),y:e}},A=function(t,r,e){return 0===r.x?null:{x:e,y:t.y+r.y/r.x*(e-t.x)}},T=function(){function r(e,n){t(this,r),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return e(r,null,[{key:"compare",value:function(t,e){var n=r.comparePoints(t.point,e.point);return 0!==n?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:O.compare(t.segment,e.segment))}},{key:"comparePoints",value:function(t,r){return t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0}}]),e(r,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var r=t.point.events,e=0,n=r.length;e<n;e++){var i=r[e];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,r=0;r<t;r++){var e=this.point.events[r];if(void 0===e.segment.consumedBy)for(var n=r+1;n<t;n++){var i=this.point.events[n];void 0===i.consumedBy&&e.otherSE.point.events===i.otherSE.point.events&&e.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],r=0,e=this.point.events.length;r<e;r++){var n=this.point.events[r];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}},{key:"getLeftmostComparator",value:function(t){var r=this,e=new Map,n=function(n){var i,o,s,a,u,c=n.otherSE;e.set(n,{sine:(i=r.point,o=t.point,s=c.point,a={x:o.x-i.x,y:o.y-i.y},u={x:s.x-i.x,y:s.y-i.y},w(u,a)/E(u)/E(a)),cosine:k(r.point,t.point,c.point)})};return function(t,r){e.has(t)||n(t),e.has(r)||n(r);var i=e.get(t),o=i.sine,s=i.cosine,a=e.get(r),u=a.sine,c=a.cosine;return o>=0&&u>=0?s<c?1:s>c?-1:0:o<0&&u<0?s<c?-1:s>c?1:0:u<o?-1:u>o?1:0}}}]),r}(),P=0,O=function(){function r(e,n,i,o){t(this,r),this.id=++P,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=i,this.windings=o}return e(r,null,[{key:"compare",value:function(t,r){var e=t.leftSE.point.x,n=r.leftSE.point.x,i=t.rightSE.point.x,o=r.rightSE.point.x;if(o<e)return 1;if(i<n)return-1;var s=t.leftSE.point.y,a=r.leftSE.point.y,u=t.rightSE.point.y,c=r.rightSE.point.y;if(e<n){if(a<s&&a<u)return 1;if(a>s&&a>u)return-1;var f=t.comparePoint(r.leftSE.point);if(f<0)return 1;if(f>0)return-1;var h=r.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(e>n){if(s<a&&s<c)return-1;if(s>a&&s>c)return 1;var l=r.comparePoint(t.leftSE.point);if(0!==l)return l;var p=t.comparePoint(r.rightSE.point);return p<0?1:p>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(i<o){var v=r.comparePoint(t.rightSE.point);if(0!==v)return v}if(i>o){var d=t.comparePoint(r.rightSE.point);if(d<0)return 1;if(d>0)return-1}if(i!==o){var g=u-s,y=i-e,m=c-a,x=o-n;if(g>y&&m<x)return 1;if(g<y&&m>x)return-1}return i>o?1:i<o||u<c?-1:u>c?1:t.id<r.id?-1:t.id>r.id?1:0}}]),e(r,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<r?t:r},ur:{x:this.rightSE.point.x,y:t>r?t:r}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var r=this.leftSE.point,e=this.rightSE.point,n=this.vector();if(r.x===e.x)return t.x===r.x?0:t.x<r.x?1:-1;var i=(t.y-r.y)/n.y,o=r.x+i*n.x;if(t.x===o)return 0;var s=(t.x-r.x)/n.x,a=r.y+s*n.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var r=this.bbox(),e=t.bbox(),n=v(r,e);if(null===n)return null;var i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,u=p(r,s)&&0===this.comparePoint(s),c=p(e,i)&&0===t.comparePoint(i),f=p(r,a)&&0===this.comparePoint(a),h=p(e,o)&&0===t.comparePoint(o);if(c&&u)return h&&!f?o:!h&&f?a:null;if(c)return f&&i.x===a.x&&i.y===a.y?null:i;if(u)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&f)return null;if(h)return o;if(f)return a;var l=function(t,r,e,n){if(0===r.x)return A(e,n,t.x);if(0===n.x)return A(t,r,e.x);if(0===r.y)return M(e,n,t.y);if(0===n.y)return M(t,r,e.y);var i=w(r,n);if(0==i)return null;var o={x:e.x-t.x,y:e.y-t.y},s=w(o,r)/i,a=w(o,n)/i;return{x:(t.x+a*r.x+(e.x+s*n.x))/2,y:(t.y+a*r.y+(e.y+s*n.y))/2}}(i,this.vector(),s,t.vector());return null===l?null:p(n,l)?b.round(l.x,l.y):null}},{key:"split",value:function(t){var e=[],n=void 0!==t.events,i=new T(t,!0),o=new T(t,!1),s=this.rightSE;this.replaceRightSE(o),e.push(o),e.push(i);var a=new r(i,s,this.rings.slice(),this.windings.slice());return T.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),T.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),e}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var r=0,e=this.windings.length;r<e;r++)this.windings[r]*=-1}},{key:"consume",value:function(t){for(var e=this,n=t;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=r.compare(e,n);if(0!==i){if(i>0){var o=e;e=n,n=o}if(e.prev===n){var s=e;e=n,n=s}for(var a=0,u=n.rings.length;a<u;a++){var c=n.rings[a],f=n.windings[a],h=e.rings.indexOf(c);-1===h?(e.rings.push(c),e.windings.push(f)):e.windings[h]+=f}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var r=this._afterState.rings,e=this._afterState.windings,n=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var s=this.rings[i],a=this.windings[i],u=r.indexOf(s);-1===u?(r.push(s),e.push(a)):e[u]+=a}for(var c=[],f=[],h=0,l=r.length;h<l;h++)if(0!==e[h]){var p=r[h],v=p.poly;if(-1===f.indexOf(v))if(p.isExterior)c.push(v);else{-1===f.indexOf(v)&&f.push(v);var d=c.indexOf(p.poly);-1!==d&&c.splice(d,1)}}for(var g=0,y=c.length;g<y;g++){var m=c[g].multiPoly;-1===n.indexOf(m)&&n.push(m)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(X.type){case"union":var e=0===t.length,n=0===r.length;this._isInResult=e!==n;break;case"intersection":var i,o;t.length<r.length?(i=t.length,o=r.length):(i=r.length,o=t.length),this._isInResult=o===X.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-r.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(r);break;default:throw new Error("Unrecognized operation type found ".concat(X.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,e,n){var i,o,s,a=T.comparePoints(t,e);if(a<0)i=t,o=e,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=e,o=t,s=-1}return new r(new T(i,!0),new T(o,!1),[n],[s])}}]),r}(),I=function(){function r(e,n,i){if(t(this,r),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=i,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=b.round(e[0][0],e[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,u=e.length;a<u;a++){if("number"!=typeof e[a][0]||"number"!=typeof e[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=b.round(e[a][0],e[a][1]);c.x===s.x&&c.y===s.y||(this.segments.push(O.fromRing(s,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),s=c)}o.x===s.x&&o.y===s.y||this.segments.push(O.fromRing(s,o,this))}return e(r,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,e=this.segments.length;r<e;r++){var n=this.segments[r];t.push(n.leftSE),t.push(n.rightSE)}return t}}]),r}(),R=function(){function r(e,n){if(t(this,r),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new I(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(var i=1,o=e.length;i<o;i++){var s=new I(e[i],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=n}return e(r,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),r=0,e=this.interiorRings.length;r<e;r++)for(var n=this.interiorRings[r].getSweepEvents(),i=0,o=n.length;i<o;i++)t.push(n[i]);return t}}]),r}(),j=function(){function r(e,n){if(t(this,r),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch(t){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,o=e.length;i<o;i++){var s=new R(e[i],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=n}return e(r,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,e=this.polys.length;r<e;r++)for(var n=this.polys[r].getSweepEvents(),i=0,o=n.length;i<o;i++)t.push(n[i]);return t}}]),r}(),B=function(){function r(e){t(this,r),this.events=e;for(var n=0,i=e.length;n<i;n++)e[n].segment.ringOut=this;this.poly=null}return e(r,null,[{key:"factory",value:function(t){for(var e=[],n=0,i=t.length;n<i;n++){var o=t[n];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,u=o.rightSE,c=[a],f=a.point,h=[];s=a,a=u,c.push(a),a.point!==f;)for(;;){var l=a.getAvailableLinkedEvents();if(0===l.length){var p=c[0].point,v=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(v.x,", ").concat(v.y,"]."))}if(1===l.length){u=l[0].otherSE;break}for(var d=null,g=0,y=h.length;g<y;g++)if(h[g].point===a.point){d=g;break}if(null===d){h.push({index:c.length,point:a.point});var m=a.getLeftmostComparator(s);u=l.sort(m)[0].otherSE;break}var x=h.splice(d)[0],b=c.splice(x.index);b.unshift(b[0].otherSE),e.push(new r(b.reverse()))}e.push(new r(c))}}return e}}]),e(r,[{key:"getGeom",value:function(){for(var t=this.events[0].point,r=[t],e=1,n=this.events.length-1;e<n;e++){var i=this.events[e].point,o=this.events[e+1].point;0!==S(i,t,o)&&(r.push(i),t=i)}if(1===r.length)return null;var s=r[0],a=r[1];0===S(s,t,a)&&r.shift(),r.push(r[0]);for(var u=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:r.length-1,f=this.isExteriorRing()?r.length:-1,h=[],l=c;l!=f;l+=u)h.push([r[l].x,r[l].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],r=1,e=this.events.length;r<e;r++){var n=this.events[r];T.compare(t,n)>0&&(t=n)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),r}(),L=function(){function r(e){t(this,r),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return e(r,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var r=0,e=this.interiorRings.length;r<e;r++){var n=this.interiorRings[r].getGeom();null!==n&&t.push(n)}return t}}]),r}(),N=function(){function r(e){t(this,r),this.rings=e,this.polys=this._composePolys(e)}return e(r,[{key:"getGeom",value:function(){for(var t=[],r=0,e=this.polys.length;r<e;r++){var n=this.polys[r].getGeom();null!==n&&t.push(n)}return t}},{key:"_composePolys",value:function(t){for(var r=[],e=0,n=t.length;e<n;e++){var i=t[e];if(!i.poly)if(i.isExteriorRing())r.push(new L(i));else{var o=i.enclosingRing();o.poly||r.push(new L(o)),o.poly.addInterior(i)}}return r}}]),r}(),C=function(){function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.compare;t(this,r),this.queue=e,this.tree=new c(n),this.segments=[]}return e(r,[{key:"process",value:function(t){var r=t.segment,e=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(r),e;var n=t.isLeft?this.tree.insert(r):this.tree.find(r);if(!n)throw new Error("Unable to find segment #".concat(r.id," ")+"[".concat(r.leftSE.point.x,", ").concat(r.leftSE.point.y,"] -> ")+"[".concat(r.rightSE.point.x,", ").concat(r.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=n,o=n,s=void 0,a=void 0;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var u=null;if(s){var c=s.getIntersection(r);if(null!==c&&(r.isAnEndpoint(c)||(u=c),!s.isAnEndpoint(c)))for(var f=this._splitSafely(s,c),h=0,l=f.length;h<l;h++)e.push(f[h])}var p=null;if(a){var v=a.getIntersection(r);if(null!==v&&(r.isAnEndpoint(v)||(p=v),!a.isAnEndpoint(v)))for(var d=this._splitSafely(a,v),g=0,y=d.length;g<y;g++)e.push(d[g])}if(null!==u||null!==p){var m;m=null===u?p:null===p||T.comparePoints(u,p)<=0?u:p,this.queue.remove(r.rightSE),e.push(r.rightSE);for(var x=r.split(m),b=0,w=x.length;b<w;b++)e.push(x[b])}e.length>0?(this.tree.remove(r),e.push(t)):(this.segments.push(r),r.prev=s)}else{if(s&&a){var _=s.getIntersection(a);if(null!==_){if(!s.isAnEndpoint(_))for(var S=this._splitSafely(s,_),E=0,k=S.length;E<k;E++)e.push(S[E]);if(!a.isAnEndpoint(_))for(var M=this._splitSafely(a,_),A=0,P=M.length;A<P;A++)e.push(M[A])}}this.tree.remove(r)}return e}},{key:"_splitSafely",value:function(t,r){this.tree.remove(t);var e=t.rightSE;this.queue.remove(e);var n=t.split(r);return n.push(e),void 0===t.consumedBy&&this.tree.insert(t),n}}]),r}(),F="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Y="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,X=new(function(){function r(){t(this,r)}return e(r,[{key:"run",value:function(t,r,e){X.type=t,b.reset();for(var n=[new j(r,!0)],i=0,o=e.length;i<o;i++)n.push(new j(e[i],!1));if(X.numMultiPolys=n.length,"difference"===X.type)for(var s=n[0],a=1;a<n.length;)null!==v(n[a].bbox,s.bbox)?a++:n.splice(a,1);if("intersection"===X.type)for(var u=0,f=n.length;u<f;u++)for(var h=n[u],l=u+1,p=n.length;l<p;l++)if(null===v(h.bbox,n[l].bbox))return[];for(var d=new c(T.compare),g=0,y=n.length;g<y;g++)for(var m=n[g].getSweepEvents(),x=0,w=m.length;x<w;x++)if(d.insert(m[x]),d.size>F)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new C(d),S=d.size,E=d.pop();E;){var k=E.key;if(d.size===S){var M=k.segment;throw new Error("Unable to pop() ".concat(k.isLeft?"left":"right"," SweepEvent ")+"[".concat(k.point.x,", ").concat(k.point.y,"] from segment #").concat(M.id," ")+"[".concat(M.leftSE.point.x,", ").concat(M.leftSE.point.y,"] -> ")+"[".concat(M.rightSE.point.x,", ").concat(M.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>F)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>Y)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var A=_.process(k),P=0,O=A.length;P<O;P++){var I=A[P];void 0===I.consumedBy&&d.insert(I)}S=d.size,E=d.pop()}b.reset();var R=B.factory(_.segments);return new N(R).getGeom()}}]),r}());return{union:function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return X.run("union",t,e)},intersection:function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return X.run("intersection",t,e)},xor:function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return X.run("xor",t,e)},difference:function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return X.run("difference",t,e)}}}()},3842:(t,r,e)=>{"use strict";e.r(r),e.d(r,{default:()=>n});class n{constructor(t=[],r=i){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:e}=this,n=r[t];for(;t>0;){const i=t-1>>1,o=r[i];if(e(n,o)>=0)break;r[t]=o,t=i}r[t]=n}_down(t){const{data:r,compare:e}=this,n=this.length>>1,i=r[t];for(;t<n;){let n=1+(t<<1),o=r[n];const s=n+1;if(s<this.length&&e(r[s],o)<0&&(n=s,o=r[s]),e(o,i)>=0)break;r[t]=o,t=n}r[t]=i}}function i(t,r){return t<r?-1:t>r?1:0}}},r={};function e(n){var i=r[n];if(void 0!==i)return i.exports;var o=r[n]={exports:{}};return t[n].call(o.exports,o,o.exports,e),o.exports}e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function t(t,r,e){void 0===e&&(e={});var n={type:"Feature"};return(0===e.id||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=r||{},n.geometry=t,n}function r(r,e,n){if(void 0===n&&(n={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(r[0])||!u(r[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:r},e,n)}function i(r,e,n){void 0===n&&(n={});for(var i=0,o=r;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:r},e,n)}function o(r,e,n){if(void 0===n&&(n={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:r},e,n)}function s(t,r){void 0===r&&(r={});var e={type:"FeatureCollection"};return r.id&&(e.id=r.id),r.bbox&&(e.bbox=r.bbox),e.features=t,e}function a(r,e,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:r},e,n)}function u(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function c(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)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 f(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function h(t){return"Feature"===t.type?t.geometry:t}function l(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new Error("point is required");if(!r)throw new Error("polygon is required");var n=c(t),i=h(r),o=i.type,s=r.bbox,a=i.coordinates;if(s&&!p(n,s))return!1;"Polygon"===o&&(a=[a]);for(var u=!1,f=0;f<a.length&&!u;f++){var l=v(n,a[f]);(0===l&&!e.ignoreBoundary||l)&&(u=!0)}return u}function p(t,r){return r[0]<=t[0]&&r[1]<=t[1]&&r[2]>=t[0]&&r[3]>=t[1]}function v(t,r){for(var e=0,n=0,i=0,o=0,s=0,a=0,u=0,c=0,f=null,h=null,l=t[0],p=t[1],v=r.length;e<v;e++){n=0;var d=r[e].length-1,g=r[e];for(s=(f=g[0])[0]-l,a=f[1]-p;n<d;n++)if(c=(h=g[n+1])[1]-p,a<0&&c<0||a>0&&c>0)a=c,s=(f=h)[0]-l;else{if(u=h[0]-t[0],c>0&&a<=0){if((o=s*c-u*a)>0)i+=1;else if(0===o)return 0}else if(a>0&&c<=0){if((o=s*c-u*a)<0)i+=1;else if(0===o)return 0}else if(0===c&&a<0){if(0==(o=s*c-u*a))return 0}else if(0===a&&c<0){if(0==(o=s*c-u*a))return 0}else if(0===a&&0===c){if(u<=0&&s>=0)return 0;if(s<=0&&u>=0)return 0}f=h,a=c,s=u}}return i%2!=0}function d(t,r,e){if(null!==t)for(var n,i,o,s,a,u,c,f,h=0,l=0,p=t.type,v="FeatureCollection"===p,g="Feature"===p,y=v?t.features.length:1,m=0;m<y;m++){a=(f=!!(c=v?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var x=0;x<a;x++){var b=0,w=0;if(null!==(s=f?c.geometries[x]:c)){u=s.coordinates;var _=s.type;switch(h=!e||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===r(u,l,m,b,w))return!1;l++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===r(u[n],l,m,b,w))return!1;l++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-h;i++){if(!1===r(u[n][i],l,m,b,w))return!1;l++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(w=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-h;o++){if(!1===r(u[n][i][o],l,m,b,w))return!1;l++}w++}b++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===d(s.geometries[n],r,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function g(t,r){if("Feature"===t.type)r(t,0);else if("FeatureCollection"===t.type)for(var e=0;e<t.features.length&&!1!==r(t.features[e],e);e++);}function y(r,e){!function(t,r){var e,n,i,o,s,a,u,c,f,h,l=0,p="FeatureCollection"===t.type,v="Feature"===t.type,d=p?t.features.length:1;for(e=0;e<d;e++){for(a=p?t.features[e].geometry:v?t.geometry:t,c=p?t.features[e].properties:v?t.properties:{},f=p?t.features[e].bbox:v?t.bbox:void 0,h=p?t.features[e].id:v?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===r(o,l,c,f,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===r(o.geometries[n],l,c,f,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===r(null,l,c,f,h))return!1;l++}}(r,(function(r,n,i,o,s){var a,u=null===r?null:r.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(t(r,i,{bbox:o,id:s}),n,0)&&void 0}switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var c=0;c<r.coordinates.length;c++){var f=r.coordinates[c];if(!1===e(t({type:a,coordinates:f},i),n,c))return!1}}))}e.r(n),e.d(n,{default:()=>ur}),e(1249),e(1539),e(7941),e(4916),e(5306),e(1038),e(8783),e(6992),e(8674),e(3948),e(4723),e(2707),e(7327),e(9601),e(2222),e(9600);var m=e(2273);function x(t,r){void 0===r&&(r={}),r.concavity=r.concavity||1/0;var e=[];if(d(t,(function(t){e.push([t[0],t[1]])})),!e.length)return null;var n=m(e,r.concavity);return n.length>3?i([n]):null}var b=e(2676);const w=function(t){if(!t)throw new Error("geojson is required");var r=[];return y(t,(function(t){!function(t,r){var e=[],n=t.geometry;if(null!==n){switch(n.type){case"Polygon":e=f(n);break;case"LineString":e=[f(n)]}e.forEach((function(e){var n=function(t,r){var e=[];return t.reduce((function(t,n){var i,s,a,u,c,f,h=o([t,n],r);return h.bbox=(s=n,a=(i=t)[0],u=i[1],[a<(c=s[0])?a:c,u<(f=s[1])?u:f,a>c?a:c,u>f?u:f]),e.push(h),n})),e}(e,t.properties);n.forEach((function(t){t.id=r.length,r.push(t)}))}))}}(t,r)})),s(r)};var _=e(1787);function S(t,e){var n=f(t),i=f(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==i.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=n[0][0],s=n[0][1],a=n[1][0],u=n[1][1],c=i[0][0],h=i[0][1],l=i[1][0],p=i[1][1],v=(p-h)*(a-o)-(l-c)*(u-s);if(0===v)return null;var d=((l-c)*(s-h)-(p-h)*(o-c))/v,g=((a-o)*(s-h)-(u-s)*(o-c))/v;return d>=0&&d<=1&&g>=0&&g<=1?r([o+d*(a-o),s+d*(u-s)]):null}function E(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function k(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function M(t,r,e){return r&&k(t.prototype,r),e&&k(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function A(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}e(6495),e(2990),e(8927),e(3105),e(5035),e(4345),e(7174),e(2846),e(4731),e(7209),e(6319),e(8867),e(7789),e(3739),e(9368),e(4483),e(2056),e(3462),e(678),e(7462),e(3824),e(5021),e(2974),e(5016),e(9135),e(8264),e(9714),e(7042);var T=function(){function t(r){E(this,t),A(this,"_xx",void 0),A(this,"_yy",void 0),A(this,"_ii",void 0),A(this,"_nn",void 0),A(this,"_zz",void 0),A(this,"_zlimit",0),A(this,"_bb",void 0),A(this,"_allBounds",void 0),A(this,"_arcIter",void 0),A(this,"_filteredArcIter",void 0),A(this,"buf",void 0),this.initArcs(r)}return M(t,[{key:"initArcs",value:function(t){var r=[],e=[],n=t.map((function(t){for(var n=t?t.length:0,i=0;i<n;i++)r.push(t[i][0]),e.push(t[i][1]);return n}));this.initXYData(n,r,e)}},{key:"initXYData",value:function(t,r,e){var n=t.length;this._xx=new Float64Array(r),this._yy=new Float64Array(e),this._nn=new Uint32Array(t),this._zz=null,this._zlimit=0,this._filteredArcIter=null,this._ii=new Uint32Array(n);for(var i=0,o=0;o<n;o++)this._ii[o]=i,i+=t[o];i==this._xx.length&&this._xx.length==this._yy.length||P("ArcCollection#initXYData() Counting error"),this.initBounds(),this._arcIter=new W(this._xx,this._yy)}},{key:"initBounds",value:function(){var t=this.calcArcBounds_(this._xx,this._yy,this._nn);this._bb=t.bb,this._allBounds=t.bounds}},{key:"calcArcBounds_",value:function(t,r,e){for(var n,i,o,s=e.length,a=new Float64Array(4*s),u=new J,c=0,f=0;f<s;f++)(n=e[f])>0&&(i=4*f,o=q(t,r,c,n),a[i++]=o[0],a[i++]=o[1],a[i++]=o[2],a[i]=o[3],c+=n,u.mergeBounds(o));return{bb:a,bounds:u}}},{key:"getBounds",value:function(){return this._allBounds.clone()}},{key:"forEachSegment",value:function(t){for(var r=0,e=0,n=this.size();e<n;e++)r+=this.forEachArcSegment(e,t);return r}},{key:"size",value:function(){return this._ii&&this._ii.length||0}},{key:"forEachArcSegment",value:function(t,r){for(var e=t>=0,n=e?t:~t,i=this.getRetainedInterval(),o=this._nn[n],s=e?1:-1,a=e?this._ii[n]:this._ii[n]+o-1,u=a,c=0,f=1;f<o;f++)u+=s,(0===i||this._zz[u]>=i)&&(r(a,u,this._xx,this._yy),a=u,c++);return c}},{key:"getRetainedInterval",value:function(){return this._zlimit}},{key:"getVertexData",value:function(){return{xx:this._xx,yy:this._yy,zz:this._zz,bb:this._bb,nn:this._nn,ii:this._ii}}},{key:"getUint32Array",value:function(t){var r=4*t;return(!this.buf||this.buf.byteLength<r)&&(this.buf=new ArrayBuffer(r)),new Uint32Array(this.buf,0,t)}},{key:"getAvgSegment2",value:function(){var t=0,r=0,e=this.forEachSegment((function(e,n,i,o){t+=Math.abs(i[e]-i[n]),r+=Math.abs(o[e]-o[n])}));return[t/e||0,r/e||0]}},{key:"calcSegmentIntersectionStripeCount",value:function(){var t=this.getBounds().height(),r=this.getAvgSegment2()[1],e=1;return r>0&&t>0&&(e=Math.ceil(t/r/20)),e||1}},{key:"findSegmentIntersections",value:function(){var t,r,e=this.getBounds(),n=e.ymin,i=e.ymax-n,o=this.calcSegmentIntersectionStripeCount(),s=new Uint32Array(o),a=o>1?function(t){return Math.floor((o-1)*(t-n)/i)}:function(){return 0};this.forEachSegment((function(t,r,e,n){for(var i=a(n[t]),o=a(n[r]);s[i]=s[i]+2,i!=o;)i+=o>i?1:-1}));var u=this.getUint32Array(function(t,r){O(t)||P("utils.sum() expects an array, received:",t);for(var e,n=0,i=0,o=t.length;i<o;i++)(e=t[i])?n+=e:isNaN(e)&&0;return n}(s)),c=0,f=[];!function(t,r,e){if(!O(t))throw new Error("#forEach() takes an array-like argument. ".concat(t));for(var n=0,i=t.length;n<i;n++)r.call(undefined,t[n],n)}(s,(function(t){var r=c;c+=t,f.push(u.subarray(r,c))})),function(t,r){for(var e=0,n=t.length;e<n;e++)t[e]=0}(s),this.forEachSegment((function(t,r,e,n){for(var i,o,u=a(n[t]),c=a(n[r]);i=s[u],s[u]=i+2,(o=f[u])[i]=t,o[i+1]=r,u!=c;)u+=c>u?1:-1}));var h,l=this.getVertexData(),p=[];for(t=0;t<o;t++)for(h=I(f[t],l.xx,l.yy),r=0;r<h.length;r++)p.push(h[r]);return V(p)}}]),t}();function P(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];var n=r.join(" ");throw new Error(n)}function O(t){return!!t&&(!!function(t){return Array.isArray(t)}(t)||!function(t){return null!=t&&t.toString===String.prototype.toString}(t)&&(0===t.length||t.length>0))}function I(t,r,e){var n,i,o,s,a,u,c,f,h,l,p,v,d,g,y,m,x,b=t.length-2,w=[];for(function(t,r){(function(t,r){for(var e=0,n=r.length;e<n;e+=2)t[r[e]]>t[r[e+1]]&&X(r,e,e+1)})(t,r),U(t,r,0,r.length-2)}(r,t),m=0;m<b;){for(n=t[m],i=t[m+1],a=r[n],u=r[i],h=e[n],l=e[i],x=m;x<b&&!(u<(c=r[o=t[x+=2]]));){if(p=e[o],f=r[s=t[x+1]],v=e[s],h>=p){if(h>v&&l>p&&l>v)continue}else if(h<v&&l<p&&l<v)continue;n!=o&&n!=s&&i!=o&&i!=s&&(d=R(a,h,u,l,c,p,f,v))&&(g=[n,i],y=[o,s],w.push(G(d,g,y,r,e)),4==d.length&&w.push(G(d.slice(2),g,y,r,e)))}m+=2}return w}function R(t,r,e,n,i,o,s,a){var u=function(t,r,e,n,i,o,s,a){return j(t,r,e,n,i,o)*j(t,r,e,n,s,a)<=0&&j(i,o,s,a,t,r)*j(i,o,s,a,e,n)<=0}(t,r,e,n,i,o,s,a),c=null;return u&&(c=function(t,r,e,n,i,o,s,a){var u,c=L(t,r,e,n,i,o,s,a);return c&&(u=function(t,r){for(var e,n=-1,i=1/0,o=0,s=0,a=arguments.length<=2?0:arguments.length-2;s<a;o++,s+=2)(e=C(t,r,s+2<2||arguments.length<=s+2?void 0:arguments[s+2],s+1+2<2||arguments.length<=s+1+2?void 0:arguments[s+1+2]))<i&&(i=e,n=o);return n}(c[0],c[1],t,r,e,n,i,o,s,a),1==u?c=L(e,n,t,r,i,o,s,a):2==u?c=L(i,o,s,a,t,r,e,n):3==u&&(c=L(s,a,i,o,t,r,e,n))),c&&function(t,r,e,n,i,o,s,a,u){var c=t[0],f=t[1];c=F(c,r,n),c=F(c,o,a),f=F(f,e,i),f=F(f,s,u),t[0]=c,t[1]=f}(c,t,r,e,n,i,o,s,a),c}(t,r,e,n,i,o,s,a),c?function(t,r,e,n,i,o,s,a){return t==i&&r==o||t==s&&r==a||e==i&&n==o||e==s&&n==a}(t,r,e,n,i,o,s,a)&&(c=null):c=function(t,r,e,n,i,o,s,a){var u=Math.min(t,e,i,s),c=Math.max(t,e,i,s),f=Math.min(r,n,o,a),h=Math.max(r,n,o,a),l=h-f>c-u,p=[];return(l?Y(r,f,h):Y(t,u,c))&&p.push(t,r),(l?Y(n,f,h):Y(e,u,c))&&p.push(e,n),(l?Y(o,f,h):Y(i,u,c))&&p.push(i,o),(l?Y(a,f,h):Y(s,u,c))&&p.push(s,a),(2!=p.length&&4!=p.length||4==p.length&&p[0]==p[2]&&p[1]==p[3])&&(p=null),p}(t,r,e,n,i,o,s,a)),c}function j(t,r,e,n,i,o){return B(t-i,r-o,e-i,n-o)}function B(t,r,e,n){return t*n-r*e}function L(t,r,e,n,i,o,s,a){var u,c=B(e-t,n-r,s-i,a-o);if(0===c)return null;var f=j(i,o,s,a,t,r)/c;return u=c<=1e-18&&c>=-1e-18?function(t,r,e,n,i,o,s,a){var u=null;return N(t,i,s)||N(r,o,a)?N(e,i,s)||N(n,o,a)?N(i,t,e)||N(o,r,n)?N(s,t,e)||N(a,r,n)||(u=[s,a]):u=[i,o]:u=[e,n]:u=[t,r],u}(t,r,e,n,i,o,s,a):[t+f*(e-t),r+f*(n-r)],u}function N(t,r,e){return r<e?t<r||t>e:r>e?t>r||t<e:t!=r}function C(t,r,e,n){var i=t-e,o=r-n;return i*i+o*o}function F(t,r,e){var n;return N(t,r,e)&&(n=Math.abs(t-r)<Math.abs(t-e)?r:e,Math.abs(t-n),t=n),t}function Y(t,r,e){return t>r&&t<e}function X(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function U(t,r,e,n){for(var i,o,s=e,a=n;s<n;){for(i=t[r[e+n>>2<<1]];s<=a;){for(;t[r[s]]<i;)s+=2;for(;t[r[a]]>i;)a-=2;s<=a&&(o=r[s],r[s]=r[a],r[a]=o,o=r[s+1],r[s+1]=r[a+1],r[a+1]=o,s+=2,a-=2)}if(a-e<40?D(t,r,e,a):U(t,r,e,a),n-s<40)return void D(t,r,s,n);e=s,a=n}}function D(t,r,e,n){for(var i,o,s=e+2;s<=n;s+=2){i=r[s],o=r[s+1];var a=void 0;for(a=s-2;a>=e&&t[i]<t[r[a]];a-=2)r[a+2]=r[a],r[a+3]=r[a+1];r[a+2]=i,r[a+3]=o}}function G(t,r,e,n,i){var o=t[0],s=t[1];r=z(o,s,r[0],r[1],n,i),e=z(o,s,e[0],e[1],n,i);var a=r[0]<e[0]?r:e;return{x:o,y:s,a,b:a==r?e:r}}function z(t,r,e,n,i,o){var s=e<n?e:n,a=s===e?n:e;return i[s]==t&&o[s]==r?a=s:i[a]==t&&o[a]==r&&(s=a),[s,a]}function V(t){var r={};return t.filter((function(t){var e=function(t){return"".concat(t.a.join(","),";").concat(t.b.join(","))}(t);return!(e in r)&&(r[e]=!0,!0)}))}var W=M((function t(r,e){E(this,t),A(this,"_i",0),A(this,"_n",0),A(this,"_inc",1),A(this,"_xx",void 0),A(this,"_yy",void 0),A(this,"i",0),A(this,"x",0),A(this,"y",0),this._xx=r,this._yy=e}));function q(t,r,e,n){var i,o,s,a,u,c,f=0|e,h=isNaN(n)?t.length-f:n+f;if(!(h>0))return[void 0,void 0,void 0,void 0];for(s=u=t[f],a=c=r[f],f++;f<h;f++)(i=t[f])<s&&(s=i),i>u&&(u=i),(o=r[f])<a&&(a=o),o>c&&(c=o);return[s,a,u,c]}var J=function(){function t(){E(this,t),A(this,"xmin",void 0),A(this,"ymin",void 0),A(this,"xmax",void 0),A(this,"ymax",void 0);for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];e.length>0&&this.setBounds(e)}return M(t,[{key:"cloneBounds",value:function(){return this.clone()}},{key:"clone",value:function(){return new t(this.xmin,this.ymin,this.xmax,this.ymax)}},{key:"width",value:function(){return this.xmax-this.xmin||0}},{key:"height",value:function(){return this.ymax-this.ymin||0}},{key:"setBounds",value:function(t,r,e,n){return 1==arguments.length&&(O(t)?(r=t[1],e=t[2],n=t[3],t=t[0]):(r=t.ymin,e=t.xmax,n=t.ymax,t=t.xmin)),this.xmin=t,this.ymin=r,this.xmax=e,this.ymax=n,(t>e||r>n)&&this.update(),this}},{key:"update",value:function(){var t;this.xmin>this.xmax&&(t=this.xmin,this.xmin=this.xmax,this.xmax=t),this.ymin>this.ymax&&(t=this.ymin,this.ymin=this.ymax,this.ymax=t)}},{key:"mergeBounds",value:function(r){var e,n,i,o;return r instanceof t?(e=r.xmin,n=r.ymin,i=r.xmax,o=r.ymax):3==(arguments.length<=1?0:arguments.length-1)?(e=r,n=arguments.length<=1?void 0:arguments[1],i=arguments.length<=2?void 0:arguments[2],o=arguments.length<=3?void 0:arguments[3]):4==r.length?(e=r[0],n=r[1],i=r[2],o=r[3]):P("Bounds#mergeBounds() invalid argument:",r),void 0===this.xmin?this.setBounds(e,n,i,o):(e<this.xmin&&(this.xmin=e),n<this.ymin&&(this.ymin=n),i>this.xmax&&(this.xmax=i),o>this.ymax&&(this.ymax=o)),this}}]),t}();e(2526),e(1817),e(2165);const $=11102230246251565e-32,K=134217729,H=(3+8*$)*$;function Z(t,r,e,n,i){let o,s,a,u,c=r[0],f=n[0],h=0,l=0;f>c==f>-c?(o=c,c=r[++h]):(o=f,f=n[++l]);let p=0;if(h<t&&l<e)for(f>c==f>-c?(s=c+o,a=o-(s-c),c=r[++h]):(s=f+o,a=o-(s-f),f=n[++l]),o=s,0!==a&&(i[p++]=a);h<t&&l<e;)f>c==f>-c?(s=o+c,u=s-o,a=o-(s-u)+(c-u),c=r[++h]):(s=o+f,u=s-o,a=o-(s-u)+(f-u),f=n[++l]),o=s,0!==a&&(i[p++]=a);for(;h<t;)s=o+c,u=s-o,a=o-(s-u)+(c-u),c=r[++h],o=s,0!==a&&(i[p++]=a);for(;l<e;)s=o+f,u=s-o,a=o-(s-u)+(f-u),f=n[++l],o=s,0!==a&&(i[p++]=a);return 0===o&&0!==p||(i[p++]=o),p}function Q(t,r,e,n,i,o,s,a){return Z(Z(t,r,e,n,s),s,i,o,a)}function tt(t,r,e,n){let i,o,s,a,u,c,f,h,l,p,v;f=K*e,p=f-(f-e),v=e-p;let d=r[0];i=d*e,f=K*d,h=f-(f-d),l=d-h,s=l*v-(i-h*p-l*p-h*v);let g=0;0!==s&&(n[g++]=s);for(let y=1;y<t;y++)d=r[y],a=d*e,f=K*d,h=f-(f-d),l=d-h,u=l*v-(a-h*p-l*p-h*v),o=i+u,c=o-i,s=i-(o-c)+(u-c),0!==s&&(n[g++]=s),i=a+o,s=o-(i-a),0!==s&&(n[g++]=s);return 0===i&&0!==g||(n[g++]=i),g}function rt(t,r){let e=r[0];for(let n=1;n<t;n++)e+=r[n];return e}function et(t){return new Float64Array(t)}const nt=et(4),it=et(8),ot=et(12),st=et(16),at=et(4);function ut(t,r,e,n,i,o){const s=(r-o)*(e-i),a=(t-i)*(n-o),u=s-a;if(0===s||0===a||s>0!=a>0)return u;const c=Math.abs(s+a);return Math.abs(u)>=33306690738754716e-32*c?u:-function(t,r,e,n,i,o,s){let a,u,c,f,h,l,p,v,d,g,y,m,x,b,w,_,S,E;const k=t-i,M=e-i,A=r-o,T=n-o;b=k*T,l=K*k,p=l-(l-k),v=k-p,l=K*T,d=l-(l-T),g=T-d,w=v*g-(b-p*d-v*d-p*g),_=A*M,l=K*A,p=l-(l-A),v=A-p,l=K*M,d=l-(l-M),g=M-d,S=v*g-(_-p*d-v*d-p*g),y=w-S,h=w-y,nt[0]=w-(y+h)+(h-S),m=b+y,h=m-b,x=b-(m-h)+(y-h),y=x-_,h=x-y,nt[1]=x-(y+h)+(h-_),E=m+y,h=E-m,nt[2]=m-(E-h)+(y-h),nt[3]=E;let P=rt(4,nt),O=22204460492503146e-32*s;if(P>=O||-P>=O)return P;if(h=t-k,a=t-(k+h)+(h-i),h=e-M,c=e-(M+h)+(h-i),h=r-A,u=r-(A+h)+(h-o),h=n-T,f=n-(T+h)+(h-o),0===a&&0===u&&0===c&&0===f)return P;if(O=11093356479670487e-47*s+H*Math.abs(P),P+=k*f+T*a-(A*c+M*u),P>=O||-P>=O)return P;b=a*T,l=K*a,p=l-(l-a),v=a-p,l=K*T,d=l-(l-T),g=T-d,w=v*g-(b-p*d-v*d-p*g),_=u*M,l=K*u,p=l-(l-u),v=u-p,l=K*M,d=l-(l-M),g=M-d,S=v*g-(_-p*d-v*d-p*g),y=w-S,h=w-y,at[0]=w-(y+h)+(h-S),m=b+y,h=m-b,x=b-(m-h)+(y-h),y=x-_,h=x-y,at[1]=x-(y+h)+(h-_),E=m+y,h=E-m,at[2]=m-(E-h)+(y-h),at[3]=E;const I=Z(4,nt,4,at,it);b=k*f,l=K*k,p=l-(l-k),v=k-p,l=K*f,d=l-(l-f),g=f-d,w=v*g-(b-p*d-v*d-p*g),_=A*c,l=K*A,p=l-(l-A),v=A-p,l=K*c,d=l-(l-c),g=c-d,S=v*g-(_-p*d-v*d-p*g),y=w-S,h=w-y,at[0]=w-(y+h)+(h-S),m=b+y,h=m-b,x=b-(m-h)+(y-h),y=x-_,h=x-y,at[1]=x-(y+h)+(h-_),E=m+y,h=E-m,at[2]=m-(E-h)+(y-h),at[3]=E;const R=Z(I,it,4,at,ot);b=a*f,l=K*a,p=l-(l-a),v=a-p,l=K*f,d=l-(l-f),g=f-d,w=v*g-(b-p*d-v*d-p*g),_=u*c,l=K*u,p=l-(l-u),v=u-p,l=K*c,d=l-(l-c),g=c-d,S=v*g-(_-p*d-v*d-p*g),y=w-S,h=w-y,at[0]=w-(y+h)+(h-S),m=b+y,h=m-b,x=b-(m-h)+(y-h),y=x-_,h=x-y,at[1]=x-(y+h)+(h-_),E=m+y,h=E-m,at[2]=m-(E-h)+(y-h),at[3]=E;const j=Z(R,ot,4,at,st);return st[j-1]}(t,r,e,n,i,o,c)}et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(8),et(8),et(8),et(4),et(8),et(8),et(8),et(12),et(192),et(192);const ct=et(4),ft=et(4),ht=et(4),lt=et(4),pt=et(4),vt=et(4),dt=et(4),gt=et(4),yt=et(8),mt=et(8),xt=et(8),bt=et(8),wt=et(8),_t=et(8),St=et(8),Et=et(8),kt=et(8),Mt=et(4),At=et(4),Tt=et(4),Pt=et(8),Ot=et(16),It=et(16),Rt=et(16),jt=et(32),Bt=et(32),Lt=et(48),Nt=et(64);let Ct=et(1152),Ft=et(1152);function Yt(t,r,e){t=Z(t,Ct,r,e,Ft);const n=Ct;return Ct=Ft,Ft=n,t}et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(4),et(24),et(24),et(24),et(24),et(24),et(24),et(24),et(24),et(24),et(24),et(1152),et(1152),et(1152),et(1152),et(1152),et(2304),et(2304),et(3456),et(5760),et(8),et(8),et(8),et(16),et(24),et(48),et(48),et(96),et(192),et(384),et(384),et(384),et(768),et(96),et(96),et(96),et(1152);const Xt=Math.pow(2,-52),Ut=new Uint32Array(512);class Dt{static from(t,r=Jt,e=$t){const n=t.length,i=new Float64Array(2*n);for(let o=0;o<n;o++){const n=t[o];i[2*o]=r(n),i[2*o+1]=e(n)}return new Dt(i)}constructor(t){const r=t.length>>1;if(r>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*r-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(r)),this._hullPrev=new Uint32Array(r),this._hullNext=new Uint32Array(r),this._hullTri=new Uint32Array(r),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(r),this._dists=new Float64Array(r),this.update()}update(){const{coords:t,_hullPrev:r,_hullNext:e,_hullTri:n,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,u=-1/0,c=-1/0;for(let r=0;r<o;r++){const e=t[2*r],n=t[2*r+1];e<s&&(s=e),n<a&&(a=n),e>u&&(u=e),n>c&&(c=n),this._ids[r]=r}const f=(s+u)/2,h=(a+c)/2;let l,p,v,d=1/0;for(let r=0;r<o;r++){const e=Gt(f,h,t[2*r],t[2*r+1]);e<d&&(l=r,d=e)}const g=t[2*l],y=t[2*l+1];d=1/0;for(let r=0;r<o;r++){if(r===l)continue;const e=Gt(g,y,t[2*r],t[2*r+1]);e<d&&e>0&&(p=r,d=e)}let m=t[2*p],x=t[2*p+1],b=1/0;for(let r=0;r<o;r++){if(r===l||r===p)continue;const e=Vt(g,y,m,x,t[2*r],t[2*r+1]);e<b&&(v=r,b=e)}let w=t[2*v],_=t[2*v+1];if(b===1/0){for(let r=0;r<o;r++)this._dists[r]=t[2*r]-t[0]||t[2*r+1]-t[1];Wt(this._ids,this._dists,0,o-1);const r=new Uint32Array(o);let e=0;for(let t=0,n=-1/0;t<o;t++){const i=this._ids[t];this._dists[i]>n&&(r[e++]=i,n=this._dists[i])}return this.hull=r.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ut(g,y,m,x,w,_)<0){const t=p,r=m,e=x;p=v,m=w,x=_,v=t,w=r,_=e}const S=function(t,r,e,n,i,o){const s=e-t,a=n-r,u=i-t,c=o-r,f=s*s+a*a,h=u*u+c*c,l=.5/(s*c-a*u);return{x:t+(c*f-a*h)*l,y:r+(s*h-u*f)*l}}(g,y,m,x,w,_);this._cx=S.x,this._cy=S.y;for(let r=0;r<o;r++)this._dists[r]=Gt(t[2*r],t[2*r+1],S.x,S.y);Wt(this._ids,this._dists,0,o-1),this._hullStart=l;let E=3;e[l]=r[v]=p,e[p]=r[l]=v,e[v]=r[p]=l,n[l]=0,n[p]=1,n[v]=2,i.fill(-1),i[this._hashKey(g,y)]=l,i[this._hashKey(m,x)]=p,i[this._hashKey(w,_)]=v,this.trianglesLen=0,this._addTriangle(l,p,v,-1,-1,-1);for(let o,s,a=0;a<this._ids.length;a++){const u=this._ids[a],c=t[2*u],f=t[2*u+1];if(a>0&&Math.abs(c-o)<=Xt&&Math.abs(f-s)<=Xt)continue;if(o=c,s=f,u===l||u===p||u===v)continue;let h=0;for(let t=0,r=this._hashKey(c,f);t<this._hashSize&&(h=i[(r+t)%this._hashSize],-1===h||h===e[h]);t++);h=r[h];let d,g=h;for(;d=e[g],ut(c,f,t[2*g],t[2*g+1],t[2*d],t[2*d+1])>=0;)if(g=d,g===h){g=-1;break}if(-1===g)continue;let y=this._addTriangle(g,u,e[g],-1,-1,n[g]);n[u]=this._legalize(y+2),n[g]=y,E++;let m=e[g];for(;d=e[m],ut(c,f,t[2*m],t[2*m+1],t[2*d],t[2*d+1])<0;)y=this._addTriangle(m,u,d,n[u],-1,n[m]),n[u]=this._legalize(y+2),e[m]=m,E--,m=d;if(g===h)for(;d=r[g],ut(c,f,t[2*d],t[2*d+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(d,u,g,-1,n[g],n[d]),this._legalize(y+2),n[d]=y,e[g]=g,E--,g=d;this._hullStart=r[u]=g,e[g]=r[m]=u,e[u]=m,i[this._hashKey(c,f)]=u,i[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(E);for(let t=0,r=this._hullStart;t<E;t++)this.hull[t]=r,r=e[r];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,r){return Math.floor(function(t,r){const e=t/(Math.abs(t)+Math.abs(r));return(r>0?3-e:1+e)/4}(t-this._cx,r-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:r,_halfedges:e,coords:n}=this;let i=0,o=0;for(;;){const s=e[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=Ut[--i];continue}const u=s-s%3,c=a+(t+1)%3,f=u+(s+2)%3,h=r[o],l=r[t],p=r[c],v=r[f];if(zt(n[2*h],n[2*h+1],n[2*l],n[2*l+1],n[2*p],n[2*p+1],n[2*v],n[2*v+1])){r[t]=v,r[s]=h;const n=e[f];if(-1===n){let r=this._hullStart;do{if(this._hullTri[r]===f){this._hullTri[r]=t;break}r=this._hullPrev[r]}while(r!==this._hullStart)}this._link(t,n),this._link(s,e[o]),this._link(o,f);const a=u+(s+1)%3;i<Ut.length&&(Ut[i++]=a)}else{if(0===i)break;t=Ut[--i]}}return o}_link(t,r){this._halfedges[t]=r,-1!==r&&(this._halfedges[r]=t)}_addTriangle(t,r,e,n,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=r,this._triangles[s+2]=e,this._link(s,n),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function Gt(t,r,e,n){const i=t-e,o=r-n;return i*i+o*o}function zt(t,r,e,n,i,o,s,a){const u=t-s,c=r-a,f=e-s,h=n-a,l=i-s,p=o-a,v=f*f+h*h,d=l*l+p*p;return u*(h*d-v*p)-c*(f*d-v*l)+(u*u+c*c)*(f*p-h*l)<0}function Vt(t,r,e,n,i,o){const s=e-t,a=n-r,u=i-t,c=o-r,f=s*s+a*a,h=u*u+c*c,l=.5/(s*c-a*u),p=(c*f-a*h)*l,v=(s*h-u*f)*l;return p*p+v*v}function Wt(t,r,e,n){if(n-e<=20)for(let i=e+1;i<=n;i++){const n=t[i],o=r[n];let s=i-1;for(;s>=e&&r[t[s]]>o;)t[s+1]=t[s--];t[s+1]=n}else{let i=e+1,o=n;qt(t,e+n>>1,i),r[t[e]]>r[t[n]]&&qt(t,e,n),r[t[i]]>r[t[n]]&&qt(t,i,n),r[t[e]]>r[t[i]]&&qt(t,e,i);const s=t[i],a=r[s];for(;;){do{i++}while(r[t[i]]<a);do{o--}while(r[t[o]]>a);if(o<i)break;qt(t,i,o)}t[e+1]=t[o],t[o]=s,n-i+1>=o-e?(Wt(t,r,i,n),Wt(t,r,e,o-1)):(Wt(t,r,e,o-1),Wt(t,r,i,n))}}function qt(t,r,e){const n=t[r];t[r]=t[e],t[e]=n}function Jt(t){return t[0]}function $t(t){return t[1]}class Kt{constructor(t,r){this.W=t,this.bs=r}add(t){const r=this.W,e=t/r|0,n=t%r;return this.bs[e]|=1<<n,this}delete(t){const r=this.W,e=t/r|0,n=t%r;return this.bs[e]&=~(1<<n),this}set(t,r){const e=this.W,n=t/e|0,i=1<<t%e;return this.bs[n]^=(-r^this.bs[n])&i,r}has(t){const r=this.W,e=t/r|0,n=t%r;return!!(this.bs[e]&1<<n)}forEach(t){const r=this.W,e=this.bs,n=e.length;for(let i=0;i<n;i++){let n=0;for(;e[i]&&n<r;)e[i]&1<<n&&t(i*r+n),n++}return this}}class Ht extends Kt{constructor(t){super(8,new Uint8Array(Math.ceil(t/8)).fill(0))}}function Zt(t){return t%3==2?t-2:t+1}function Qt(t){return t%3==0?t+2:t-1}class tr{constructor(t,r){if(!(t&&"object"==typeof t&&t.triangles&&t.halfedges&&t.coords))throw new Error("Expected an object with Delaunator output");if(t.triangles.length%3||t.halfedges.length!==t.triangles.length||t.coords.length%2)throw new Error("Delaunator output appears inconsistent");if(t.triangles.length<3)throw new Error("No edges in triangulation");this.del=t;const e=2**32-1,n=t.coords.length>>1,i=t.triangles.length;this.vertMap=new Uint32Array(n).fill(e),this.flips=new Ht(i),this.consd=new Ht(i);for(let r=0;r<i;r++){const n=t.triangles[r];this.vertMap[n]===e&&this.updateVert(r)}r&&this.constrainAll(r)}constrainOne(t,r){const{triangles:e,halfedges:n}=this.del,i=this.vertMap,o=this.consd,s=i[t];let a=s;do{const i=e[a],o=Zt(a);if(i===r)return this.protect(a);const s=Qt(a),u=e[s];if(u===r)return this.protect(o),o;if(this.intersectSegments(t,r,u,i)){a=s;break}a=n[o]}while(-1!==a&&a!==s);let u=a,c=-1;for(;-1!==a;){const i=n[a],s=Qt(a),f=Qt(i),h=Zt(i);if(-1===i)throw new Error("Constraining edge exited the hull");if(o.has(a))throw new Error("Edge intersects already constrained edge");if(this.isCollinear(t,r,e[a])||this.isCollinear(t,r,e[i]))throw new Error("Constraining edge intersects point");if(this.intersectSegments(e[a],e[i],e[s],e[f])){if(this.flipDiagonal(a),this.intersectSegments(t,r,e[s],e[f])&&(-1===c&&(c=s),c===s))throw new Error("Infinite loop: flipped diagonal still intersects");e[f]===r?(u=f,a=c,c=-1):this.intersectSegments(t,r,e[h],e[f])&&(a=h)}else{if(-1===c&&(c=a),e[f]===r){if(a===c)throw new Error("Infinite loop: non-convex quadrilateral");a=c,c=-1;continue}if(this.intersectSegments(t,r,e[f],e[i]))a=f;else if(this.intersectSegments(t,r,e[h],e[f]))a=h;else if(c===a)throw new Error("Infinite loop: no further intersect after non-convex")}}const f=this.flips;this.protect(u);do{var h=0;f.forEach((t=>{f.delete(t);const r=n[t];-1!==r&&(f.delete(r),this.isDelaunay(t)||(this.flipDiagonal(t),h++))}))}while(h>0);return this.findEdge(t,r)}delaunify(t=!1){const r=this.del.halfedges,e=this.flips,n=this.consd,i=r.length;do{var o=0;for(let t=0;t<i;t++){if(n.has(t))continue;e.delete(t);const i=r[t];-1!==i&&(e.delete(i),this.isDelaunay(t)||(this.flipDiagonal(t),o++))}}while(t&&o>0);return this}constrainAll(t){const r=t.length;for(let e=0;e<r;e++){const r=t[e];this.constrainOne(r[0],r[1])}return this}isConstrained(t){return this.consd.has(t)}findEdge(t,r){const e=this.vertMap[r],{triangles:n,halfedges:i}=this.del;let o=e,s=-1;do{if(n[o]===t)return o;s=Zt(o),o=i[s]}while(-1!==o&&o!==e);return n[Zt(s)]===t?-s:1/0}protect(t){const r=this.del.halfedges[t],e=this.flips,n=this.consd;return e.delete(t),n.add(t),-1!==r?(e.delete(r),n.add(r),r):-t}markFlip(t){const r=this.del.halfedges,e=this.flips;if(this.consd.has(t))return!1;const n=r[t];return-1!==n&&(e.add(t),e.add(n)),!0}flipDiagonal(t){const{triangles:r,halfedges:e}=this.del,n=this.flips,i=this.consd,o=e[t],s=Qt(t),a=Zt(t),u=Qt(o),c=Zt(o),f=e[s],h=e[u];if(i.has(t))throw new Error("Trying to flip a constrained edge");return r[t]=r[u],e[t]=h,n.set(t,n.has(u))||i.set(t,i.has(u)),-1!==h&&(e[h]=t),e[s]=u,r[o]=r[s],e[o]=f,n.set(o,n.has(s))||i.set(o,i.has(s)),-1!==f&&(e[f]=o),e[u]=s,this.markFlip(t),this.markFlip(a),this.markFlip(o),this.markFlip(c),n.add(s),i.delete(s),n.add(u),i.delete(u),this.updateVert(t),this.updateVert(a),this.updateVert(o),this.updateVert(c),s}isDelaunay(t){const{triangles:r,halfedges:e}=this.del,n=e[t];if(-1===n)return!0;const i=r[Qt(t)],o=r[t],s=r[Zt(t)],a=r[Qt(n)];return!this.inCircle(i,o,s,a)}updateVert(t){const{triangles:r,halfedges:e}=this.del,n=this.vertMap,i=r[t];let o=Qt(t),s=e[o];for(;-1!==s&&s!==t;)o=Qt(s),s=e[o];return n[i]=o,o}intersectSegments(t,r,e,n){const i=this.del.coords;return t!==e&&t!==n&&r!==e&&r!==n&&rr(i[2*t],i[2*t+1],i[2*r],i[2*r+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1])}inCircle(t,r,e,n){const i=this.del.coords;return function(t,r,e,n,i,o,s,a){const u=t-s,c=e-s,f=i-s,h=r-a,l=n-a,p=o-a,v=c*p,d=f*l,g=u*u+h*h,y=f*h,m=u*p,x=c*c+l*l,b=u*l,w=c*h,_=f*f+p*p,S=g*(v-d)+x*(y-m)+_*(b-w),E=(Math.abs(v)+Math.abs(d))*g+(Math.abs(y)+Math.abs(m))*x+(Math.abs(b)+Math.abs(w))*_,k=11102230246251577e-31*E;return S>k||-S>k?S:function(t,r,e,n,i,o,s,a,u){let c,f,h,l,p,v,d,g,y,m,x,b,w,_,S,E,k,M,A,T,P,O,I,R,j,B,L,N,C,F,Y,X,U,D,G;const z=t-s,V=e-s,W=i-s,q=r-a,J=n-a,$=o-a;Y=V*$,I=K*V,R=I-(I-V),j=V-R,I=K*$,B=I-(I-$),L=$-B,X=j*L-(Y-R*B-j*B-R*L),U=W*J,I=K*W,R=I-(I-W),j=W-R,I=K*J,B=I-(I-J),L=J-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,ct[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,ct[1]=F-(N+O)+(O-U),G=C+N,O=G-C,ct[2]=C-(G-O)+(N-O),ct[3]=G,Y=W*q,I=K*W,R=I-(I-W),j=W-R,I=K*q,B=I-(I-q),L=q-B,X=j*L-(Y-R*B-j*B-R*L),U=z*$,I=K*z,R=I-(I-z),j=z-R,I=K*$,B=I-(I-$),L=$-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,ft[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,ft[1]=F-(N+O)+(O-U),G=C+N,O=G-C,ft[2]=C-(G-O)+(N-O),ft[3]=G,Y=z*J,I=K*z,R=I-(I-z),j=z-R,I=K*J,B=I-(I-J),L=J-B,X=j*L-(Y-R*B-j*B-R*L),U=V*q,I=K*V,R=I-(I-V),j=V-R,I=K*q,B=I-(I-q),L=q-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,ht[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,ht[1]=F-(N+O)+(O-U),G=C+N,O=G-C,ht[2]=C-(G-O)+(N-O),ht[3]=G,c=Z(Z(Z(tt(tt(4,ct,z,Pt),Pt,z,Ot),Ot,tt(tt(4,ct,q,Pt),Pt,q,It),It,jt),jt,Z(tt(tt(4,ft,V,Pt),Pt,V,Ot),Ot,tt(tt(4,ft,J,Pt),Pt,J,It),It,Bt),Bt,Nt),Nt,Z(tt(tt(4,ht,W,Pt),Pt,W,Ot),Ot,tt(tt(4,ht,$,Pt),Pt,$,It),It,jt),jt,Ct);let et=rt(c,Ct),nt=4440892098500632e-31*u;if(et>=nt||-et>=nt)return et;if(O=t-z,f=t-(z+O)+(O-s),O=r-q,p=r-(q+O)+(O-a),O=e-V,h=e-(V+O)+(O-s),O=n-J,v=n-(J+O)+(O-a),O=i-W,l=i-(W+O)+(O-s),O=o-$,d=o-($+O)+(O-a),0===f&&0===h&&0===l&&0===p&&0===v&&0===d)return et;if(nt=5423418723394464e-46*u+H*Math.abs(et),et+=(z*z+q*q)*(V*d+$*h-(J*l+W*v))+2*(z*f+q*p)*(V*$-J*W)+((V*V+J*J)*(W*p+q*l-($*f+z*d))+2*(V*h+J*v)*(W*q-$*z))+((W*W+$*$)*(z*v+J*f-(q*h+V*p))+2*(W*l+$*d)*(z*J-q*V)),et>=nt||-et>=nt)return et;if(0===h&&0===v&&0===l&&0===d||(Y=z*z,I=K*z,R=I-(I-z),j=z-R,X=j*j-(Y-R*R-(R+R)*j),U=q*q,I=K*q,R=I-(I-q),j=q-R,D=j*j-(U-R*R-(R+R)*j),N=X+D,O=N-X,lt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,lt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,lt[2]=C-(G-O)+(N-O),lt[3]=G),0===l&&0===d&&0===f&&0===p||(Y=V*V,I=K*V,R=I-(I-V),j=V-R,X=j*j-(Y-R*R-(R+R)*j),U=J*J,I=K*J,R=I-(I-J),j=J-R,D=j*j-(U-R*R-(R+R)*j),N=X+D,O=N-X,pt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,pt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,pt[2]=C-(G-O)+(N-O),pt[3]=G),0===f&&0===p&&0===h&&0===v||(Y=W*W,I=K*W,R=I-(I-W),j=W-R,X=j*j-(Y-R*R-(R+R)*j),U=$*$,I=K*$,R=I-(I-$),j=$-R,D=j*j-(U-R*R-(R+R)*j),N=X+D,O=N-X,vt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,vt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,vt[2]=C-(G-O)+(N-O),vt[3]=G),0!==f&&(g=tt(4,ct,f,yt),c=Yt(c,Q(tt(g,yt,2*z,Ot),Ot,tt(tt(4,vt,f,Pt),Pt,J,It),It,tt(tt(4,pt,f,Pt),Pt,-$,Rt),Rt,jt,Lt),Lt)),0!==p&&(y=tt(4,ct,p,mt),c=Yt(c,Q(tt(y,mt,2*q,Ot),Ot,tt(tt(4,pt,p,Pt),Pt,W,It),It,tt(tt(4,vt,p,Pt),Pt,-V,Rt),Rt,jt,Lt),Lt)),0!==h&&(m=tt(4,ft,h,xt),c=Yt(c,Q(tt(m,xt,2*V,Ot),Ot,tt(tt(4,lt,h,Pt),Pt,$,It),It,tt(tt(4,vt,h,Pt),Pt,-q,Rt),Rt,jt,Lt),Lt)),0!==v&&(x=tt(4,ft,v,bt),c=Yt(c,Q(tt(x,bt,2*J,Ot),Ot,tt(tt(4,vt,v,Pt),Pt,z,It),It,tt(tt(4,lt,v,Pt),Pt,-W,Rt),Rt,jt,Lt),Lt)),0!==l&&(b=tt(4,ht,l,wt),c=Yt(c,Q(tt(b,wt,2*W,Ot),Ot,tt(tt(4,pt,l,Pt),Pt,q,It),It,tt(tt(4,lt,l,Pt),Pt,-J,Rt),Rt,jt,Lt),Lt)),0!==d&&(w=tt(4,ht,d,_t),c=Yt(c,Q(tt(w,_t,2*$,Ot),Ot,tt(tt(4,lt,d,Pt),Pt,V,It),It,tt(tt(4,pt,d,Pt),Pt,-z,Rt),Rt,jt,Lt),Lt)),0!==f||0!==p){if(0!==h||0!==v||0!==l||0!==d?(Y=h*$,I=K*h,R=I-(I-h),j=h-R,I=K*$,B=I-(I-$),L=$-B,X=j*L-(Y-R*B-j*B-R*L),U=V*d,I=K*V,R=I-(I-V),j=V-R,I=K*d,B=I-(I-d),L=d-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,dt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,dt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,dt[2]=C-(G-O)+(N-O),dt[3]=G,Y=l*-J,I=K*l,R=I-(I-l),j=l-R,I=K*-J,B=I-(I- -J),L=-J-B,X=j*L-(Y-R*B-j*B-R*L),U=W*-v,I=K*W,R=I-(I-W),j=W-R,I=K*-v,B=I-(I- -v),L=-v-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,gt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,gt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,gt[2]=C-(G-O)+(N-O),gt[3]=G,S=Z(4,dt,4,gt,Et),Y=h*d,I=K*h,R=I-(I-h),j=h-R,I=K*d,B=I-(I-d),L=d-B,X=j*L-(Y-R*B-j*B-R*L),U=l*v,I=K*l,R=I-(I-l),j=l-R,I=K*v,B=I-(I-v),L=v-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,At[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,At[1]=F-(N+O)+(O-U),G=C+N,O=G-C,At[2]=C-(G-O)+(N-O),At[3]=G,M=4):(Et[0]=0,S=1,At[0]=0,M=1),0!==f){const t=tt(S,Et,f,Rt);c=Yt(c,Z(tt(g,yt,f,Ot),Ot,tt(t,Rt,2*z,jt),jt,Lt),Lt);const r=tt(M,At,f,Pt);c=Yt(c,Q(tt(r,Pt,2*z,Ot),Ot,tt(r,Pt,f,It),It,tt(t,Rt,f,jt),jt,Bt,Nt),Nt),0!==v&&(c=Yt(c,tt(tt(4,vt,f,Pt),Pt,v,Ot),Ot)),0!==d&&(c=Yt(c,tt(tt(4,pt,-f,Pt),Pt,d,Ot),Ot))}if(0!==p){const t=tt(S,Et,p,Rt);c=Yt(c,Z(tt(y,mt,p,Ot),Ot,tt(t,Rt,2*q,jt),jt,Lt),Lt);const r=tt(M,At,p,Pt);c=Yt(c,Q(tt(r,Pt,2*q,Ot),Ot,tt(r,Pt,p,It),It,tt(t,Rt,p,jt),jt,Bt,Nt),Nt)}}if(0!==h||0!==v){if(0!==l||0!==d||0!==f||0!==p?(Y=l*q,I=K*l,R=I-(I-l),j=l-R,I=K*q,B=I-(I-q),L=q-B,X=j*L-(Y-R*B-j*B-R*L),U=W*p,I=K*W,R=I-(I-W),j=W-R,I=K*p,B=I-(I-p),L=p-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,dt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,dt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,dt[2]=C-(G-O)+(N-O),dt[3]=G,T=-$,P=-d,Y=f*T,I=K*f,R=I-(I-f),j=f-R,I=K*T,B=I-(I-T),L=T-B,X=j*L-(Y-R*B-j*B-R*L),U=z*P,I=K*z,R=I-(I-z),j=z-R,I=K*P,B=I-(I-P),L=P-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,gt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,gt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,gt[2]=C-(G-O)+(N-O),gt[3]=G,E=Z(4,dt,4,gt,kt),Y=l*p,I=K*l,R=I-(I-l),j=l-R,I=K*p,B=I-(I-p),L=p-B,X=j*L-(Y-R*B-j*B-R*L),U=f*d,I=K*f,R=I-(I-f),j=f-R,I=K*d,B=I-(I-d),L=d-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,Tt[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,Tt[1]=F-(N+O)+(O-U),G=C+N,O=G-C,Tt[2]=C-(G-O)+(N-O),Tt[3]=G,A=4):(kt[0]=0,E=1,Tt[0]=0,A=1),0!==h){const t=tt(E,kt,h,Rt);c=Yt(c,Z(tt(m,xt,h,Ot),Ot,tt(t,Rt,2*V,jt),jt,Lt),Lt);const r=tt(A,Tt,h,Pt);c=Yt(c,Q(tt(r,Pt,2*V,Ot),Ot,tt(r,Pt,h,It),It,tt(t,Rt,h,jt),jt,Bt,Nt),Nt),0!==d&&(c=Yt(c,tt(tt(4,lt,h,Pt),Pt,d,Ot),Ot)),0!==p&&(c=Yt(c,tt(tt(4,vt,-h,Pt),Pt,p,Ot),Ot))}if(0!==v){const t=tt(E,kt,v,Rt);c=Yt(c,Z(tt(x,bt,v,Ot),Ot,tt(t,Rt,2*J,jt),jt,Lt),Lt);const r=tt(A,Tt,v,Pt);c=Yt(c,Q(tt(r,Pt,2*J,Ot),Ot,tt(r,Pt,v,It),It,tt(t,Rt,v,jt),jt,Bt,Nt),Nt)}}if(0!==l||0!==d){if(0!==f||0!==p||0!==h||0!==v?(Y=f*J,I=K*f,R=I-(I-f),j=f-R,I=K*J,B=I-(I-J),L=J-B,X=j*L-(Y-R*B-j*B-R*L),U=z*v,I=K*z,R=I-(I-z),j=z-R,I=K*v,B=I-(I-v),L=v-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,dt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,dt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,dt[2]=C-(G-O)+(N-O),dt[3]=G,T=-q,P=-p,Y=h*T,I=K*h,R=I-(I-h),j=h-R,I=K*T,B=I-(I-T),L=T-B,X=j*L-(Y-R*B-j*B-R*L),U=V*P,I=K*V,R=I-(I-V),j=V-R,I=K*P,B=I-(I-P),L=P-B,D=j*L-(U-R*B-j*B-R*L),N=X+D,O=N-X,gt[0]=X-(N-O)+(D-O),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F+U,O=N-F,gt[1]=F-(N-O)+(U-O),G=C+N,O=G-C,gt[2]=C-(G-O)+(N-O),gt[3]=G,_=Z(4,dt,4,gt,St),Y=f*v,I=K*f,R=I-(I-f),j=f-R,I=K*v,B=I-(I-v),L=v-B,X=j*L-(Y-R*B-j*B-R*L),U=h*p,I=K*h,R=I-(I-h),j=h-R,I=K*p,B=I-(I-p),L=p-B,D=j*L-(U-R*B-j*B-R*L),N=X-D,O=X-N,Mt[0]=X-(N+O)+(O-D),C=Y+N,O=C-Y,F=Y-(C-O)+(N-O),N=F-U,O=F-N,Mt[1]=F-(N+O)+(O-U),G=C+N,O=G-C,Mt[2]=C-(G-O)+(N-O),Mt[3]=G,k=4):(St[0]=0,_=1,Mt[0]=0,k=1),0!==l){const t=tt(_,St,l,Rt);c=Yt(c,Z(tt(b,wt,l,Ot),Ot,tt(t,Rt,2*W,jt),jt,Lt),Lt);const r=tt(k,Mt,l,Pt);c=Yt(c,Q(tt(r,Pt,2*W,Ot),Ot,tt(r,Pt,l,It),It,tt(t,Rt,l,jt),jt,Bt,Nt),Nt),0!==p&&(c=Yt(c,tt(tt(4,pt,l,Pt),Pt,p,Ot),Ot)),0!==v&&(c=Yt(c,tt(tt(4,lt,-l,Pt),Pt,v,Ot),Ot))}if(0!==d){const t=tt(_,St,d,Rt);c=Yt(c,Z(tt(w,_t,d,Ot),Ot,tt(t,Rt,2*$,jt),jt,Lt),Lt);const r=tt(k,Mt,d,Pt);c=Yt(c,Q(tt(r,Pt,2*$,Ot),Ot,tt(r,Pt,d,It),It,tt(t,Rt,d,jt),jt,Bt,Nt),Nt)}}return Ct[c-1]}(t,r,e,n,i,o,s,a,E)}(i[2*t],i[2*t+1],i[2*r],i[2*r+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1])<0}isCollinear(t,r,e){const n=this.del.coords;return 0===ut(n[2*t],n[2*t+1],n[2*r],n[2*r+1],n[2*e],n[2*e+1])}}function rr(t,r,e,n,i,o,s,a){const u=ut(t,r,i,o,s,a),c=ut(e,n,i,o,s,a);if(u>0&&c>0||u<0&&c<0)return!1;const f=ut(i,o,t,r,e,n),h=ut(s,a,t,r,e,n);return!(f>0&&h>0||f<0&&h<0||0===u&&0===c&&0===f&&0===h&&(Math.max(i,s)<Math.min(t,e)||Math.max(t,e)<Math.min(i,s)||Math.max(o,a)<Math.min(r,n)||Math.max(r,n)<Math.min(o,a)))}function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}function nr(t,r,e){if(r||(r=[]),"object"!==er(t)||"FeatureCollection"!==t.type)throw"Argument points must be FeatureCollection";if(!Array.isArray(r))throw"Argument points must be Array of Array";var n=t.features.map((function(t){return t.geometry.coordinates})),o=Dt.from(n),a=[];0!==o.triangles.length&&0!==r.length&&new tr(o).constrainAll(r);for(var u=0;u<o.triangles.length;u+=3)a.push([o.triangles[u],o.triangles[u+1],o.triangles[u+2]]);var c=["a","b","c"];return s(a.map((function(r){var n={},o=r.map((function(r,i){var o=t.features[r],s=o.geometry.coordinates,a=[s[0],s[1]];return 3===s.length?a[2]=s[2]:n[c[i]]=o.properties[e],a}));return o[3]=o[0],i([o],n)})))}function ir(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function or(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sr(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}tr.intersectSegments=rr;var ar=2.00703,ur=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ir(this,e),sr(this,"bounds",void 0),sr(this,"boundsPolygon",void 0),sr(this,"centroid",void 0),sr(this,"edgeNodes",void 0),sr(this,"edges",void 0),sr(this,"importance",void 0),sr(this,"indexedTins",void 0),sr(this,"kinks",void 0),sr(this,"points",[]),sr(this,"pointsWeightBuffer",void 0),sr(this,"priority",void 0),sr(this,"stateBackward",void 0),sr(this,"stateFull",void 0),sr(this,"stateTriangle",void 0),sr(this,"strictMode",void 0),sr(this,"strict_status",void 0),sr(this,"tins",void 0),sr(this,"vertexMode",void 0),sr(this,"vertices_params",void 0),sr(this,"wh",void 0),sr(this,"xy",void 0),sr(this,"yaxisMode",void 0),sr(this,"pointsSet",void 0),t.bounds?this.setBounds(t.bounds):(this.setWh(t.wh),this.vertexMode=t.vertexMode||e.VERTEX_PLAIN),this.strictMode=t.strictMode||e.MODE_AUTO,this.yaxisMode=t.yaxisMode||e.YAXIS_INVERT,this.importance=t.importance||0,this.priority=t.priority||0,this.stateFull=t.stateFull||!1,t.points&&this.setPoints(t.points),t.edges&&this.setEdges(t.edges)}var n,u;return n=e,u=[{key:"getFormatVersion",value:function(){return ar}},{key:"setPoints",value:function(t){this.yaxisMode==e.YAXIS_FOLLOW&&(t=t.map((function(t){return[t[0],[t[1][0],-1*t[1][1]]]}))),this.points=t,this.tins=void 0,this.indexedTins=void 0}},{key:"setEdges",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.edges=_r(t),this.edgeNodes=void 0,this.tins=void 0,this.indexedTins=void 0}},{key:"setBounds",value:function(t){this.bounds=t;for(var r=t[0][0],n=r,o=t[0][1],s=o,a=[t[0]],u=1;u<t.length;u++){var c=t[u];c[0]<r&&(r=c[0]),c[0]>n&&(n=c[0]),c[1]<o&&(o=c[1]),c[1]>s&&(s=c[1]),a.push(c)}a.push(t[0]),this.boundsPolygon=i([a]),this.xy=[r,o],this.wh=[n-r,s-o],this.vertexMode=e.VERTEX_PLAIN,this.tins=void 0,this.indexedTins=void 0}},{key:"setCompiled",value:function(t){var n=this;if(t.version||!t.tins&&t.points&&t.tins_points){this.points=t.points,this.pointsWeightBuffer=!t.version||t.version<2.00703?["forw","bakw"].reduce((function(r,e){var n=t.weight_buffer[e];return n&&(r[e]=Object.keys(n).reduce((function(t,r){return t[wr(r)]=n[r],t}),{})),r}),{}):t.weight_buffer,t.strict_status?this.strict_status=t.strict_status:t.kinks_points?this.strict_status=e.STATUS_ERROR:2==t.tins_points.length?this.strict_status=e.STATUS_LOOSE:this.strict_status=e.STATUS_STRICT,this.vertices_params={forw:[t.vertices_params[0]],bakw:[t.vertices_params[1]]},this.vertices_params.forw[1]=[0,1,2,3].map((function(r){var e=(r+1)%4;return s([br(["c","b".concat(r),"b".concat(e)],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,ar)])})),this.vertices_params.bakw[1]=[0,1,2,3].map((function(r){var e=(r+1)%4;return s([br(["c","b".concat(r),"b".concat(e)],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,ar)])})),this.centroid={forw:r(t.centroid_point[0],{target:{geom:t.centroid_point[1],index:"c"}}),bakw:r(t.centroid_point[1],{target:{geom:t.centroid_point[0],index:"c"}})},this.edges=_r(t.edges||[]),this.edgeNodes=t.edgeNodes||[];var i=1==t.tins_points.length?0:1;this.tins={forw:s(t.tins_points[0].map((function(r){return br(r,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,t.version)}))),bakw:s(t.tins_points[i].map((function(r){return br(r,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,t.version)})))},this.addIndexedTin(),t.kinks_points&&(this.kinks={bakw:s(t.kinks_points.map((function(t){return r(t)})))}),t.yaxisMode?this.yaxisMode=t.yaxisMode:this.yaxisMode=e.YAXIS_INVERT,t.vertexMode&&(this.vertexMode=t.vertexMode),t.strictMode&&(this.strictMode=t.strictMode),t.bounds?(this.bounds=t.bounds,this.boundsPolygon=t.boundsPolygon,this.xy=t.xy,this.wh=t.wh):(this.xy=[0,0],t.wh&&(this.wh=t.wh),this.bounds=void 0,this.boundsPolygon=void 0)}else!function(){t=JSON.parse(JSON.stringify(t).replace('"cent"','"c"').replace(/"bbox(\d+)"/g,'"b$1"')),n.tins=t.tins,n.addIndexedTin(),n.strict_status=t.strict_status,n.pointsWeightBuffer=t.weight_buffer,n.vertices_params=t.vertices_params,n.centroid=t.centroid,n.kinks=t.kinks;for(var r=[],e=function(t){var e=n.tins.forw.features[t];["a","b","c"].map((function(t,n){var i=e.geometry.coordinates[0][n],o=e.properties[t].geom,s=e.properties[t].index;r[s]=[i,o]}))},i=0;i<n.tins.forw.features.length;i++)e(i);n.points=r}();return{tins:this.tins,strict_status:this.strict_status,weight_buffer:this.pointsWeightBuffer,vertices_params:this.vertices_params,centroid:this.centroid,kinks:this.kinks}}},{key:"getCompiled",value:function(){var t={};t.version=ar,t.points=this.points,t.weight_buffer=this.pointsWeightBuffer,t.centroid_point=[this.centroid.forw.geometry.coordinates,this.centroid.forw.properties.target.geom],t.vertices_params=[this.vertices_params.forw[0],this.vertices_params.bakw[0]],t.vertices_points=[];var r=this.vertices_params.forw[1];return[0,1,2,3].map((function(e){var n=r[e].features[0],i=n.geometry.coordinates[0][1],o=n.properties.b.geom;t.vertices_points[e]=[i,o]})),t.strict_status=this.strict_status,t.tins_points=[[]],this.tins.forw.features.map((function(r){t.tins_points[0].push(["a","b","c"].map((function(t){return r.properties[t].index})))})),this.strict_status==e.STATUS_LOOSE?(t.tins_points[1]=[],this.tins.bakw.features.map((function(r){t.tins_points[1].push(["a","b","c"].map((function(t){return r.properties[t].index})))}))):this.strict_status==e.STATUS_ERROR&&(t.kinks_points=this.kinks.bakw.features.map((function(t){return t.geometry.coordinates}))),t.yaxisMode=this.yaxisMode,t.vertexMode=this.vertexMode,t.strictMode=this.strictMode,this.bounds?(t.bounds=this.bounds,t.boundsPolygon=this.boundsPolygon,t.xy=this.xy,t.wh=this.wh):t.wh=this.wh,t.edges=this.edges,t.edgeNodes=this.edgeNodes,t}},{key:"addIndexedTin",value:function(){var t=this.tins,r=t.forw,e=t.bakw,n=Math.ceil(Math.sqrt(r.features.length));if(n<3)this.indexedTins=void 0;else{var i=[],o=[],s=r.features.map((function(t){var r=[];return f(t)[0].map((function(t){0===i.length?i=[Array.from(t),Array.from(t)]:(t[0]<i[0][0]&&(i[0][0]=t[0]),t[0]>i[1][0]&&(i[1][0]=t[0]),t[1]<i[0][1]&&(i[0][1]=t[1]),t[1]>i[1][1]&&(i[1][1]=t[1])),0===r.length?r=[Array.from(t),Array.from(t)]:(t[0]<r[0][0]&&(r[0][0]=t[0]),t[0]>r[1][0]&&(r[1][0]=t[0]),t[1]<r[0][1]&&(r[0][1]=t[1]),t[1]>r[1][1]&&(r[1][1]=t[1]))})),r})),a=(i[1][0]-i[0][0])/n,u=(i[1][1]-i[0][1])/n,c=s.reduce((function(t,r,e){for(var o=gr(r[0][0],i[0][0],a,n),s=gr(r[1][0],i[0][0],a,n),c=gr(r[0][1],i[0][1],u,n),f=gr(r[1][1],i[0][1],u,n),h=o;h<=s;h++){t[h]||(t[h]=[]);for(var l=c;l<=f;l++)t[h][l]||(t[h][l]=[]),t[h][l].push(e)}return t}),[]),h=e.features.map((function(t){var r=[];return f(t)[0].map((function(t){0===o.length?o=[Array.from(t),Array.from(t)]:(t[0]<o[0][0]&&(o[0][0]=t[0]),t[0]>o[1][0]&&(o[1][0]=t[0]),t[1]<o[0][1]&&(o[0][1]=t[1]),t[1]>o[1][1]&&(o[1][1]=t[1])),0===r.length?r=[Array.from(t),Array.from(t)]:(t[0]<r[0][0]&&(r[0][0]=t[0]),t[0]>r[1][0]&&(r[1][0]=t[0]),t[1]<r[0][1]&&(r[0][1]=t[1]),t[1]>r[1][1]&&(r[1][1]=t[1]))})),r})),l=(o[1][0]-o[0][0])/n,p=(o[1][1]-o[0][1])/n,v=h.reduce((function(t,r,e){for(var i=gr(r[0][0],o[0][0],l,n),s=gr(r[1][0],o[0][0],l,n),a=gr(r[0][1],o[0][1],p,n),u=gr(r[1][1],o[0][1],p,n),c=i;c<=s;c++){t[c]||(t[c]=[]);for(var f=a;f<=u;f++)t[c][f]||(t[c][f]=[]),t[c][f].push(e)}return t}),[]);this.indexedTins={forw:{gridNum:n,xOrigin:i[0][0],yOrigin:i[0][1],xUnit:a,yUnit:u,gridCache:c},bakw:{gridNum:n,xOrigin:o[0][0],yOrigin:o[0][1],xUnit:l,yUnit:p,gridCache:v}}}}},{key:"setWh",value:function(t){this.wh=t,this.xy=[0,0],this.bounds=void 0,this.boundsPolygon=void 0,this.tins=void 0,this.indexedTins=void 0}},{key:"setVertexMode",value:function(t){this.vertexMode=t,this.tins=void 0,this.indexedTins=void 0}},{key:"setStrictMode",value:function(t){this.strictMode=t,this.tins=void 0,this.indexedTins=void 0}},{key:"calcurateStrictTinAsync",value:function(){var t=this,n=this.pointsSet.edges;return Promise.all(this.tins.forw.features.map((function(t){return Promise.resolve(mr(t))}))).then((function(r){t.tins.bakw=s(r)})).then((function(){var r={};return Promise.all(t.tins.forw.features.map((function(e,n){var i=t.tins.bakw.features[n];return Promise.resolve(Er(r,{forw:e,bakw:i}))}))).then((function(){return Promise.all([Sr(r),Promise.resolve(r)])})).catch((function(t){throw t}))})).then((function(o){var u=o[0],c=o[1];return u.bakw&&Object.keys(u.bakw).map((function(r){if("Not include case"!=u.bakw[r]){var e=c[r],o=function(t,r,e){void 0===e&&(e={});var n=h(t),o=h(r),s=b.union(n.coordinates,o.coordinates);return 0===s.length?null:1===s.length?i(s[0],e.properties):a(s,e.properties)}(e[0].forw,e[1].forw),f=x(s([e[0].forw,e[1].forw]));if(m=o,w=h(y=f),_=h(m),S=y.properties||{},0===(E=b.difference(w.coordinates,_.coordinates)).length||!(1===E.length?i(E[0],S):a(E,S))){var l=r.split("-");if(l[0].match(/^[0-9]+$/)&&l[1].match(/^[0-9]+$/))for(var p=l.map((function(t){return parseInt(t)})).sort((function(t,r){return t<r?-1:1})),v=0;v<n.length-1;v++)if(p[0]==n[v][0]&&p[1]==n[v][1])return;var d=l.map((function(t){return["a","b","c"].map((function(t,r){var n=e[0].bakw.properties[t];return{geom:e[0].bakw.geometry.coordinates[0][r],prop:n}})).filter((function(r){return r.prop.index==t}))[0]})),g=e.map((function(t){return["a","b","c"].map((function(r,e){var n=t.bakw.properties[r];return{geom:t.bakw.geometry.coordinates[0][e],prop:n}})).filter((function(t){return t.prop.index!=d[0].prop.index&&t.prop.index!=d[1].prop.index}))[0]}));kr(c,e[0],t.tins),kr(c,e[1],t.tins),d.map((function(r){var e=i([[r.geom,g[0].geom,g[1].geom,r.geom]],{a:r.prop,b:g[0].prop,c:g[1].prop}),n=mr(e);Er(c,{forw:n,bakw:e},t.tins)}))}}var y,m,w,_,S,E})),Promise.all(["forw","bakw"].map((function(e){return new Promise((function(n){var i;n((i=t.tins[e].features.map((function(t){return t.geometry.coordinates[0]})),V(new T(i).findSegmentIntersections()).reduce((function(t,e,n,i){return t||(t={}),t["".concat(e.x,":").concat(e.y)]=e,n!=i.length-1?t:Object.keys(t).map((function(e){return r([t[e].x,t[e].y])}))}),[])))})).catch((function(t){throw t}))}))).then((function(r){0==r[0].length&&0==r[1].length?(t.strict_status=e.STATUS_STRICT,delete t.kinks):(t.strict_status=e.STATUS_ERROR,t.kinks={},r[0].length>0&&(t.kinks.forw=s(r[0])),r[1].length>0&&(t.kinks.bakw=s(r[1])))})).catch((function(t){throw t}))})).catch((function(t){throw t}))}},{key:"generatePointsSet",value:function(){for(var t=this,r={forw:[],bakw:[]},e=0;e<this.points.length;e++){var n=lr(this.points[e][0],this.points[e][1],e);r.forw.push(n),r.bakw.push(pr(n))}var i=[],o=0;this.edgeNodes=[],this.edges||(this.edges=[]);for(var a=function(e){var n=t.edges[e][2],s=Object.assign([],t.edges[e][0]),a=Object.assign([],t.edges[e][1]);if(0===s.length&&0===a.length)return i.push(n),"continue";s.unshift(t.points[n[0]][0]),s.push(t.points[n[1]][0]),a.unshift(t.points[n[0]][1]),a.push(t.points[n[1]][1]);var u=[s,a].map((function(t){var r=t.map((function(t,r,e){if(0===r)return 0;var n=e[r-1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))})),e=r.reduce((function(t,r,e){return 0===e?[0]:(t.push(t[e-1]+r),t)}),[]);return e.map((function(n,i,o){var s=n/o[o.length-1];return[t[i],r[i],e[i],s]}))}));u.map((function(t,r){var e=u[r?0:1];return t.filter((function(r,e){return!(0===e||e===t.length-1||"handled"===r[4])})).map((function(t){var n=t[0],i=t[3],o=e.reduce((function(t,r,e,n){if(t)return t;var o=n[e+1];return r[3]===i?(r[4]="handled",[r]):r[3]<i&&o[3]>i?[r,o]:void 0}),void 0);if(1===o.length)return 0===r?[n,o[0][0],i]:[o[0][0],n,i];var s=o[0],a=o[1],u=(i-s[3])/(a[3]-s[3]),c=[(a[0][0]-s[0][0])*u+s[0][0],(a[0][1]-s[0][1])*u+s[0][1]];return 0===r?[n,c,i]:[c,n,i]}))})).reduce((function(t,r){return t.concat(r)}),[]).sort((function(t,r){return t[2]<r[2]?-1:1})).map((function(e,s,a){t.edgeNodes[o]=[e[0],e[1]];var u=lr(e[0],e[1],"e".concat(o));o++,r.forw.push(u),r.bakw.push(pr(u)),0===s?i.push([n[0],r.forw.length-1]):i.push([r.forw.length-2,r.forw.length-1]),s===a.length-1&&i.push([r.forw.length-1,n[1]])}))},u=0;u<this.edges.length;u++)a(u);return{forw:s(r.forw),bakw:s(r.bakw),edges:i}}},{key:"updateTinAsync",value:function(){var n=this,i=this.strictMode,a=this.xy[0]-.05*this.wh[0],u=this.xy[0]+1.05*this.wh[0],c=this.xy[1]-.05*this.wh[1],h=this.xy[1]+1.05*this.wh[1],p=this.bounds?function(t){return l(t,n.boundsPolygon)}:function(t){return t[0]>=n.xy[0]&&t[0]<=n.xy[0]+n.wh[0]&&t[1]>=n.xy[1]&&t[1]<=n.xy[1]+n.wh[1]};return this.points.reduce((function(t,r){return t&&p(r[0])}),!0)?new Promise((function(t){i!=e.MODE_STRICT&&i!=e.MODE_LOOSE&&(i=e.MODE_AUTO);var r=[];n.wh&&(r=[[a,c],[u,c],[a,h],[u,h]]),t([n.generatePointsSet(),r])})).then((function(t){var e=t[0];return Promise.all([new Promise((function(t){t(nr(e.forw,e.edges,"target"))})),new Promise((function(t){t(nr(e.bakw,e.edges,"target"))})),new Promise((function(t){t(function(t,e){void 0===e&&(e={});var n=0,i=0,o=0;return d(t,(function(t){n+=t[0],i+=t[1],o++}),!0),r([n/o,i/o],e.properties)}(e.forw))})),Promise.resolve(t)]).catch((function(t){throw t}))})).then((function(t){var e=t[0],i=t[1],o=t[2],s=t[3],a=s[0];if(0==e.features.length||0==i.features.length)throw"TOO LINEAR1";var u={forw:o.geometry.coordinates,bakw:yr(o,e)},c=lr(u.forw,u.bakw,"c");n.centroid={forw:c,bakw:pr(c)};var f={};return Promise.all([new Promise((function(t){var n,i=x(a.forw).geometry.coordinates[0];try{n=i.map((function(t){return{forw:t,bakw:yr(r(t),e)}}))}catch(t){throw"TOO LINEAR2"}n.map((function(t){f["".concat(t.forw[0],":").concat(t.forw[1])]=t})),t(void 0)})),new Promise((function(t){var e,n=x(a.bakw).geometry.coordinates[0];try{e=n.map((function(t){return{bakw:t,forw:yr(r(t),i)}}))}catch(t){throw"TOO LINEAR2"}e.map((function(t){f["".concat(t.forw[0],":").concat(t.forw[1])]=t})),t(void 0)}))]).then((function(){return[u,f,s]})).catch((function(t){throw t}))})).then((function(t){var r=t[0],i=t[1],o=t[2],s=Object.keys(i).reduce((function(t,e,n,o){var s=i[e].forw,f=i[e].bakw,l={forw:[s[0]-r.forw[0],s[1]-r.forw[1]]};l.bakw=[f[0]-r.bakw[0],f[1]-r.bakw[1]];var p=0==l.forw[0]?1/0:((l.forw[0]<0?a:u)-r.forw[0])/l.forw[0],v=0==l.forw[1]?1/0:((l.forw[1]<0?c:h)-r.forw[1])/l.forw[1];if(Math.abs(p)/Math.abs(v)<1.1){var d={forw:[l.forw[0]*p+r.forw[0],l.forw[1]*p+r.forw[1]],bakw:[l.bakw[0]*p+r.bakw[0],l.bakw[1]*p+r.bakw[1]]};l.forw[0]<0?t[3].push(d):t[1].push(d)}if(Math.abs(v)/Math.abs(p)<1.1){var g={forw:[l.forw[0]*v+r.forw[0],l.forw[1]*v+r.forw[1]],bakw:[l.bakw[0]*v+r.bakw[0],l.bakw[1]*v+r.bakw[1]]};l.forw[1]<0?t[0].push(g):t[2].push(g)}return t}),[[],[],[],[]]),f=Object.keys(i).reduce((function(t,o,s,a){var u=i[o].forw,c=i[o].bakw,f={forw:[u[0]-r.forw[0],u[1]-r.forw[1]]};if(f.bakw=[c[0]-r.bakw[0],r.bakw[1]-c[1]],0==f.forw[0]||0==f.forw[1])return t;var h=0;return f.forw[0]>0&&(h+=1),f.forw[1]>0&&(h+=2),t[h].push([f.forw,f.bakw]),s==a.length-1?t.length==t.filter((function(t){return t.length>0})).length&&n.vertexMode==e.VERTEX_BIRDEYE?t:t.reduce((function(t,r){return[t[0].concat(r)]}),[[]]):t}),[[],[],[],[]]).map((function(t){return t.reduce((function(t,r,e,n){t||(t=[1/0,0,0]);var i=Math.sqrt(Math.pow(r[0][0],2)+Math.pow(r[0][1],2))/Math.sqrt(Math.pow(r[1][0],2)+Math.pow(r[1][1],2));i=i<t[0]?i:t[0];var o=Math.atan2(r[0][0],r[0][1])-Math.atan2(r[1][0],r[1][1]),s=t[1]+Math.cos(o),a=t[2]+Math.sin(o);return e==n.length-1?[i,Math.atan2(a,s)]:[i,s,a]}),null)}));return 1==f.length&&(f=[f[0],f[0],f[0],f[0]]),[f,r,s,o]})).then((function(r){var e=r[0],n=r[1],i=r[2],a=r[3][0],u=r[3][1],c=e.map((function(t,r){var e=u[r],i=[e[0]-n.forw[0],e[1]-n.forw[1]],o=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2))/t[0],s=Math.atan2(i[0],i[1])-t[1];return{forw:e,bakw:[n.bakw[0]+o*Math.sin(s),n.bakw[1]-o*Math.cos(s)]}})),h=c[2];c[2]=c[3],c[3]=h;for(var l=[1,1,1,1],p=function(r){var e=(r+1)%4,a=o([c[r].bakw,c[e].bakw]);i[r].map((function(i){var u=o([n.bakw,i.bakw]),c=function(r,e){var n={},i=[];if("LineString"===r.type&&(r=t(r)),"LineString"===e.type&&(e=t(e)),"Feature"===r.type&&"Feature"===e.type&&null!==r.geometry&&null!==e.geometry&&"LineString"===r.geometry.type&&"LineString"===e.geometry.type&&2===r.geometry.coordinates.length&&2===e.geometry.coordinates.length){var o=S(r,e);return o&&i.push(o),s(i)}var a=_();return a.load(w(e)),g(w(r),(function(t){g(a.search(t),(function(r){var e=S(t,r);if(e){var o=f(e).join(",");n[o]||(n[o]=!0,i.push(e))}}))})),s(i)}(a,u);if(c.features.length>0&&c.features[0].geometry){var h=c.features[0],p=Math.sqrt(Math.pow(i.bakw[0]-n.bakw[0],2)+Math.pow(i.bakw[1]-n.bakw[1],2))/Math.sqrt(Math.pow(h.geometry.coordinates[0]-n.bakw[0],2)+Math.pow(h.geometry.coordinates[1]-n.bakw[1],2));p>l[r]&&(l[r]=p),p>l[e]&&(l[e]=p)}}))},v=0;v<4;v++)p(v);return[c=c.map((function(t,r){var e=l[r],i=[(t.bakw[0]-n.bakw[0])*e+n.bakw[0],(t.bakw[1]-n.bakw[1])*e+n.bakw[1]];return{forw:t.forw,bakw:i}})),a]})).then((function(t){for(var r=t[0],o=t[1],s={forw:[],bakw:[]},a=0;a<r.length;a++){var u=lr(r[a].forw,r[a].bakw,"b".concat(a)),c=pr(u);o.forw.features.push(u),o.bakw.features.push(c),s.forw.push(u),s.bakw.push(c)}return n.pointsSet=o,n.tins={forw:cr(nr(o.forw,o.edges,"target"))},(i==e.MODE_STRICT||i==e.MODE_AUTO?n.calcurateStrictTinAsync():Promise.resolve()).then((function(){return(i==e.MODE_LOOSE||i==e.MODE_AUTO&&n.strict_status==e.STATUS_ERROR)&&(n.tins.bakw=cr(nr(o.bakw,o.edges,"target")),delete n.kinks,n.strict_status=e.STATUS_LOOSE),n.vertices_params={forw:fr(s.forw,n.centroid.forw),bakw:fr(s.bakw,n.centroid.bakw)},n.addIndexedTin(),n.calculatePointsWeightAsync()})).catch((function(t){throw t}))})).catch((function(t){throw t})):new Promise((function(t,r){r("SOME POINTS OUTSIDE")}))}},{key:"transform",value:function(t,n,i){var o=this;if(n&&this.strict_status==e.STATUS_ERROR)throw'Backward transform is not allowed if strict_status == "strict_error"';this.yaxisMode==e.YAXIS_FOLLOW&&n&&(t=[t[0],-1*t[1]]);var s=r(t);if(this.bounds&&!n&&!i&&!l(s,this.boundsPolygon))return!1;var a=n?this.tins.bakw:this.tins.forw,u=n?this.indexedTins.bakw:this.indexedTins.forw,c=n?this.vertices_params.bakw:this.vertices_params.forw,f=n?this.centroid.bakw:this.centroid.forw,h=n?this.pointsWeightBuffer.bakw:this.pointsWeightBuffer.forw,p=void 0,v=void 0;this.stateFull&&(this.stateBackward==n?p=this.stateTriangle:(this.stateBackward=n,this.stateTriangle=void 0),v=function(t){o.stateTriangle=t});var d=yr(s,a,u,c,f,h,p,v);if(this.bounds&&n&&!i){if(!l(r(d),this.boundsPolygon))return!1}else this.yaxisMode!=e.YAXIS_FOLLOW||n||(d=[d[0],-1*d[1]]);return d}},{key:"calculatePointsWeightAsync",value:function(){var t=this,r=["forw"];this.strict_status==e.STATUS_LOOSE&&r.push("bakw");var n={};return Promise.all(r.map((function(r){n[r]={};var e={},i=t.tins[r];return Promise.all(i.features.map((function(t){var i=["a","b","c"];return new Promise((function(o){for(var s=0;s<3;s++){var a=(s+1)%3,u=i[s],c=i[a],f=t.properties[u].index,h=t.properties[c].index,l=[f,h].sort().join("-");if(!e[l]){var p=t.geometry.coordinates[0][s],v=t.geometry.coordinates[0][a],d=t.properties[u].geom,g=t.properties[c].geom;e[l]=1;var y=Math.sqrt(Math.pow(d[0]-g[0],2)+Math.pow(d[1]-g[1],2))/Math.sqrt(Math.pow(p[0]-v[0],2)+Math.pow(p[1]-v[1],2));n[r][f]||(n[r][f]={}),n[r][h]||(n[r][h]={}),n[r][f][l]=y,n[r][h][l]=y}}o(void 0)}))}))).catch((function(t){throw t}))}))).then((function(){var i={};r.map((function(r){i[r]={},t.strict_status==e.STATUS_STRICT&&(i.bakw={}),Object.keys(n[r]).map((function(o){i[r][o]=Object.keys(n[r][o]).reduce((function(t,e,i,s){return t+=n[r][o][e],i==s.length-1?t/s.length:t}),0),t.strict_status==e.STATUS_STRICT&&(i.bakw[o]=1/i[r][o])})),i[r].c=[0,1,2,3].reduce((function(t,e){var n="b".concat(e);return t+=i[r][n],3==e?t/4:t}),0),t.strict_status==e.STATUS_STRICT&&(i.bakw.c=1/i[r].c)})),t.pointsWeightBuffer=i})).catch((function(t){throw t}))}}],u&&or(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),e}();function cr(t){for(var r=t.features,e=0;e<r.length;e++){var n=r[e];"b"==="".concat(n.properties.a.index).substring(0,1)&&"b"==="".concat(n.properties.b.index).substring(0,1)?r[e]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1],n.geometry.coordinates[0][2]]]},properties:{a:{geom:n.properties.c.geom,index:n.properties.c.index},b:{geom:n.properties.a.geom,index:n.properties.a.index},c:{geom:n.properties.b.geom,index:n.properties.b.index}},type:"Feature"}:"b"==="".concat(n.properties.c.index).substring(0,1)&&"b"==="".concat(n.properties.a.index).substring(0,1)&&(r[e]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][1],n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1]]]},properties:{a:{geom:n.properties.b.geom,index:n.properties.b.index},b:{geom:n.properties.c.geom,index:n.properties.c.index},c:{geom:n.properties.a.geom,index:n.properties.a.index}},type:"Feature"})}return t}function fr(t,r){var e=r.geometry.coordinates;return[0,1,2,3].map((function(n){var o=(n+1)%4,a=t[n],u=t[o],c=a.geometry.coordinates;return[Math.atan2(c[0]-e[0],c[1]-e[1]),s([i([[r,a,u,r].map((function(t){return t.geometry.coordinates}))],{a:{geom:r.properties.target.geom,index:r.properties.target.index},b:{geom:a.properties.target.geom,index:a.properties.target.index},c:{geom:u.properties.target.geom,index:u.properties.target.index}})])]})).reduce((function(t,r){return t[0].push(r[0]),t[1].push(r[1]),t}),[[],[]])}function hr(t){for(var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=r?function(t){return!(t>=0&&t<2*Math.PI)}:function(t){return!(t>-1*Math.PI&&t<=Math.PI)};e(t);)t+=2*Math.PI*(t>0?-1:1);return t}function lr(t,e,n){return r(t,{target:{geom:e,index:n}})}function pr(t){return r(t.properties.target.geom,{target:{geom:t.geometry.coordinates,index:t.properties.target.index}})}function vr(t,r,e){var n=r.geometry.coordinates[0][0],i=r.geometry.coordinates[0][1],o=r.geometry.coordinates[0][2],s=t.geometry.coordinates,a=r.properties.a.geom,u=r.properties.b.geom,c=r.properties.c.geom,f=[i[0]-n[0],i[1]-n[1]],h=[o[0]-n[0],o[1]-n[1]],l=[s[0]-n[0],s[1]-n[1]],p=[u[0]-a[0],u[1]-a[1]],v=[c[0]-a[0],c[1]-a[1]],d=(h[1]*l[0]-h[0]*l[1])/(f[0]*h[1]-f[1]*h[0]),g=(f[0]*l[1]-f[1]*l[0])/(f[0]*h[1]-f[1]*h[0]);if(e){var y,m=e[r.properties.a.index],x=e[r.properties.b.index],b=e[r.properties.c.index];if(d<0||g<0||1-d-g<0){var w=d/(d+g),_=g/(d+g);y=d/x/(w/x+_/b),g=g/b/(w/x+_/b)}else y=d/x/(d/x+g/b+(1-d-g)/m),g=g/b/(d/x+g/b+(1-d-g)/m);d=y}return[d*p[0]+g*v[0]+a[0],d*p[1]+g*v[1]+a[1]]}function dr(t,r){for(var e=0;e<r.features.length;e++)if(l(t,r.features[e]))return r.features[e]}function gr(t,r,e,n){var i=Math.floor((t-r)/e);return i>=n&&(i=n-1),i}function yr(t,r,e,n,i,o,a,u){var c;if(a&&(c=dr(t,s([a]))),!c){if(e){var f=t.geometry.coordinates,h=e.gridNum,l=e.xOrigin,p=e.yOrigin,v=e.xUnit,d=e.yUnit,g=e.gridCache,y=gr(f[0],l,v,h),m=gr(f[1],p,d,h),x=g[y]&&g[y][m]?g[y][m]:[];r=s(x.map((function(t){return r.features[t]})))}c=dr(t,r)}return u&&u(c),c?vr(t,c,o):function(t,r,e,n){var i=t.geometry.coordinates,o=e.geometry.coordinates,s=function(t,r){for(var e,n=hr(t-r[0]),i=2*Math.PI,o=0;o<r.length;o++){var s=hr(t-r[(o+1)%r.length]),a=Math.min(Math.abs(n),Math.abs(s));n*s<=0&&a<i&&(i=a,e=o),n=s}return e}(Math.atan2(i[0]-o[0],i[1]-o[1]),r[0]);return vr(t,r[1][s].features[0],n)}(t,n,i,o)}function mr(t){var r=["a","b","c","a"].map((function(r){return t.properties[r].geom})),e=t.geometry.coordinates[0],n=t.properties;return i([r],{a:{geom:e[0],index:n.a.index},b:{geom:e[1],index:n.b.index},c:{geom:e[2],index:n.c.index}})}function xr(t){return i([[0,1,2,0].map((function(r){return t[r][0][0]}))],{a:{geom:t[0][0][1],index:t[0][1]},b:{geom:t[1][0][1],index:t[1][1]},c:{geom:t[2][0][1],index:t[2][1]}})}function br(t,r,e,n,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,a=t.map((function(t){(!s||s<2.00703)&&(t=wr(t));var a=isFinite(t)?r[t]:"c"===t?n:"b0"===t?i[0]:"b1"===t?i[1]:"b2"===t?i[2]:"b3"===t?i[3]:function(){var r=t.match(/e(\d+)/);if(r){var n=parseInt(r[1]);return e[n]}throw"Bad index value for indexesToTri"}();return o?[[a[1],a[0]],t]:[[a[0],a[1]],t]}));return xr(a)}function wr(t){return"number"==typeof t?t:t.replace(/^(c|e|b)(?:ent|dgeNode|box)(\d+)?$/,"$1$2")}function _r(t,r){return r&&r>=2.00703||Array.isArray(t[0])?t:t.map((function(t){return[t.illstNodes,t.mercNodes,t.startEnd]}))}function Sr(t){var r={forw:{},bakw:{}};return Promise.all(Object.keys(t).map((function(r){return new Promise((function(e){var n=t[r];if(n.length<2)return e(void 0);["forw","bakw"].map((function(t){var r=function(t,r,e){void 0===e&&(e={});var n=h(t),o=h(r),s=b.intersection(n.coordinates,o.coordinates);return 0===s.length?null:1===s.length?i(s[0],e.properties):a(s,e.properties)}(n[0][t],n[1][t]);if(!r||"Point"==r.geometry.type||"LineString"==r.geometry.type)return e(void 0);e(void 0)}))}))}))).then((function(){return 0==Object.keys(r.forw).length&&delete r.forw,0==Object.keys(r.bakw).length&&delete r.bakw,r})).catch((function(t){throw t}))}function Er(t,r,e){var n=Mr(r.forw),i=Mr(r.bakw);if(JSON.stringify(n)!=JSON.stringify(i))throw"".concat(JSON.stringify(r,null,2),"\n").concat(JSON.stringify(n),"\n").concat(JSON.stringify(i));for(var o=0;o<n.length;o++){var s=n[o];t[s]||(t[s]=[]),t[s].push(r)}e&&(e.forw.features.push(r.forw),e.bakw.features.push(r.bakw))}function kr(t,r,e){var n=Mr(r.forw),i=Mr(r.bakw);if(JSON.stringify(n)!=JSON.stringify(i))throw"".concat(JSON.stringify(r,null,2),"\n").concat(JSON.stringify(n),"\n").concat(JSON.stringify(i));for(var o=0;o<n.length;o++){var s=n[o],a=t[s].filter((function(t){return t.forw!=r.forw}));0==a.length?delete t[s]:t[s]=a}if(e){var u=e.forw.features.filter((function(t){return t!=r.forw}));e.forw.features=u,u=e.bakw.features.filter((function(t){return t!=r.bakw})),e.bakw.features=u}}function Mr(t){var r=["a","b","c"].map((function(r){return t.properties[r].index}));return[[0,1],[0,2],[1,2],[0,1,2]].map((function(t){return t.map((function(t){return r[t]})).sort().join("-")})).sort()}sr(ur,"VERTEX_PLAIN","plain"),sr(ur,"VERTEX_BIRDEYE","birdeye"),sr(ur,"MODE_STRICT","strict"),sr(ur,"MODE_AUTO","auto"),sr(ur,"MODE_LOOSE","loose"),sr(ur,"STATUS_STRICT","strict"),sr(ur,"STATUS_ERROR","strict_error"),sr(ur,"STATUS_LOOSE","loose"),sr(ur,"YAXIS_FOLLOW","follow"),sr(ur,"YAXIS_INVERT","invert"),e.g.Tin=ur})(),n})()));
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
package/es5/index.js.LICENSE.txt
DELETED