@aibee/crc-bmap 0.12.28 → 0.12.30
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.
|
@@ -7979,7 +7979,7 @@ void main() {
|
|
|
7979
7979
|
gl_FragColor = vec4(vColor, uOpacity); // \u5176\u4ED6\u9762\u989C\u8272\uFF09
|
|
7980
7980
|
}
|
|
7981
7981
|
}
|
|
7982
|
-
`,n=-1/0,r=1/0,o=this.geometry.getAttribute("position");if(o)for(let a=0;a<o.count;a++){let u=o.getZ(a);u>n&&(n=u),u<r&&(r=u)}let s=new Xz({uniforms:{maxZ:{value:n},uColor:{value:new vh(this.options[0].fillColor)},uGradualColor1:{value:new vh(Be(this.options[0].fillColor,.99))},uGradualColor2:{value:new vh(Be(this.options[0].fillColor,.9))},uOpacity:{value:this.options[0].fillOpacity},minZ:{value:r}},vertexShader:t,fragmentShader:e,transparent:!0});this.material=s}initLineMaterial(){let{strokeColor:t,strokeOpacity:e}=this.options[0],n=D.createLineMaterial({color:t,opacity:e});return this.lineMaterial=n,n}getBorderPoints(t){let{height:e,deltaHeight:n,geometry:r}=t,o=[],s=e+(n||0),{coords:a}=r;for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let h=l[c],p=c+1===l.length?l[0]:l[c+1];o.push(new T3(h[0],h[1],s)),o.push(new T3(p[0],p[1],s))}}return o}initLineGeometry(){let t=this.options.map(e=>{let n=this.getBorderPoints(e);return new Vz().setFromPoints(n)});this.lineGeometry=jz(t)}createBorder(){let t=new Hz(this.lineGeometry,this.lineMaterial);return this.LineMesh=t,this.add(t),t}setOpacity(t,e){e===void 0&&(e=!1),e?this.material.uniforms.uOpacity.value=t:this.material.uniforms.uOpacity.value=Math.min(t,this.originFillOpacity),this.material.needsUpdate=!0}init(){return y(this,null,function*(){yield this.initGeometry(),this.initMaterial();let t=new Wz(this.geometry,this.material);this.add(t),this.options[0].strokeOpacity!==0&&(this.initLineMaterial(),this.initLineGeometry())})}dispose(){var t,e,n;(t=this.geometry)==null||t.dispose(),(e=this.material)==null||e.dispose(),(n=this.lineGeometry)==null||n.dispose(),this.clear()}constructor(t,e){super(),this.context=t,this.options=e,this.originFillOpacity=1,e.length&&(this.originFillOpacity=e[0].fillOpacity,this.init())}};var V$=f(F(),1),H$=f(A(),1);import{Float32BufferAttribute as Yz,FrontSide as Zz,InstancedMesh as Kz,Matrix4 as $z,MeshBasicMaterial as Jz,Object3D as Qz,Quaternion as tG,Shape as eG,ShapeGeometry as nG,Vector2 as Ra,Vector3 as _h}from"three";var yh={id:"",uuid:"",iconUrl:"",name:"",airHeight:0,deltaHeight:0,height:0,geometry:{cds:[],type:"polygon",coords:[],curveCpt:[],curveIndex:[]},opacity:1,visible:!0,centerCoords:[0,0],secondWidth:0,secondHeight:0,secondRotate:0},ir=class extends Qz{init(){return y(this,null,function*(){let t=this.options.reduce((r,o)=>{let{iconUrl:s}=o;return r.has(s)||r.set(s,[]),r.get(s).push(o),r},new Map),e=Array.from(t.values());(yield Promise.all(e.map(r=>y(this,null,function*(){let o=r[0].iconUrl,s=yield ht.getTextureByUrl(o);return new Jz({map:s,transparent:!0,alphaTest:.2,side:Zz})})))).forEach((r,o)=>{let s=new Kz(this.geometry,r,e[o].length);e[o].forEach((a,u)=>{let l=new $z().compose(new _h(a.centerCoords[0],a.centerCoords[1],a.deltaHeight+a.airHeight+a.height),new tG().setFromAxisAngle(new _h(0,0,1),a.secondRotate),new _h(a.secondWidth,a.secondHeight,1));s.setMatrixAt(u,l)}),this.add(s)}),this.position.z+=.004})}setOpacity(t){this.children.forEach(e=>{e.material.opacity=t,e.material.needsUpdate=!0})}dispose(){W(this),this.clear()}constructor(t,e){super(),this.context=t,this.geometry=new nG(new eG([new Ra(-.5,-.5),new Ra(-.5,.5),new Ra(.5,.5),new Ra(.5,-.5)])),this.options=e.map(r=>S({},yh,r));let n=new Yz([0,0,0,1,1,1,1,0],2);this.geometry.setAttribute("uv",n),this.init()}};import{Box3 as rG,Mesh as iG,Object3D as oG,Vector3 as sG}from"three";var aG={url:"",geometry:{type:"polygon",cds:[],coords:[],curveCpt:[],curveIndex:[]},id:"",width:0,rotate:1,airHeight:1,deltaHeight:0,center_x:0,center_y:0},A3=class extends oG{loadModel(){return y(this,null,function*(){let t=yield _t.loadModel(this.options.url);t.scene.rotation.set(Math.PI/2,0,0);let n=new rG().setFromObject(t.scene).getSize(new sG),r=Math.max(n.x,n.y),o=this.options.width/r;this.scale.set(o,o,o),this.add(t.scene),this.position.set(this.options.center_x,this.options.center_y,0),this.position.z+=this.options.airHeight+this.options.deltaHeight,this.model=t,this.rotateZ(this.options.rotate)})}meshSetMaterial(t){t instanceof iG&&(t.frustumCulled=!1,t.castShadow=!0,t.material.emissiveIntensity*=.95,t.material.emissive=t.material.color,t.material.emissiveMap=t.material.map),t.children.forEach(n=>{this.meshSetMaterial(n)})}dispose(){W(this),this.model=null}constructor(t,e){super(),this.context=t,this.model=null,this.options=Object.assign({},aG,e),this.loadModel()}};var tJ=f(F(),1);import{BufferGeometry as uG,Color as lG,LineSegments as cG,Mesh as hG,Object3D as pG,Vector2 as fG,Vector3 as C3}from"three";import{mergeGeometries as dG}from"three/examples/jsm/utils/BufferGeometryUtils.js";import{LineSegments2 as gG}from"three/examples/jsm/lines/LineSegments2.js";import{LineSegmentsGeometry as mG}from"three/examples/jsm/lines/LineSegmentsGeometry.js";var Pa=class extends pG{initGeometry(){return y(this,null,function*(){this.geometry=yield _e.GetMergedShapeGeometry(this.options)})}initMaterial(){let t=D.createMeshBasicMaterial({color:"#ffffff",opacity:1,vertexColors:!0});return this.material=t,t}initLineMaterial(){let{strokeColor:t,strokeOpacity:e}=this.options[0],n=D.createLineMaterial({color:t,opacity:e,vertexColors:!0});return this.lineMaterial=n,n}getBorderPoints(t){let{deltaHeight:e,geometry:n}=t,r=[],o=e||0,{coords:s}=n;for(let a=0;a<s.length;a++){let u=s[a];for(let l=0;l<u.length;l++){let c=u[l],h=l+1===u.length?u[0]:u[l+1];r.push(new C3(c[0],c[1],o)),r.push(new C3(h[0],h[1],o))}}return r}initDoubleLine(){let t=this.options.filter(e=>{var n,r;return e.double&&((r=e.geometry.otherCoords)==null||(n=r[1])==null?void 0:n.length)});t.length&&[!0,!1].forEach(e=>{let n=t.filter(l=>l.dashed===e);if(!n.length)return;let r=D.createLine2MaterialMap({color:"#ffffff",width:.2,dashed:e,resolution:new fG(this.context.clientSize.width,this.context.clientSize.height),vertexColors:!0}),o=[],s=[];n.forEach(l=>{let c=l.geometry.otherCoords[1],h=l.airHeight+(l.deltaHeight||0)+.01,p=new lG(l.secondColor);for(let d=0;d<c.length-1;d++){let g=c[d],v=c[d+1];o.push(g[0],g[1],h,v[0],v[1],h),s.push(p.r,p.g,p.b,p.r,p.g,p.b)}});let a=new mG;a.setPositions(o),a.setColors(s);let u=new gG(a,r);u.computeLineDistances(),u.position.z+=.01,this.add(u),this.doubleLines.push(u)})}initLineGeometry(){let t=this.options.map(e=>{let n=this.getBorderPoints(e);return new uG().setFromPoints(n)});this.lineGeometry=dG(t)}createBorder(){let t=new cG(this.lineGeometry,this.lineMaterial);return this.LineMesh=t,this.add(t),t}init(){return y(this,null,function*(){yield this.initGeometry(),this.initMaterial();let t=new hG(this.geometry,this.material);this.add(t),this.initDoubleLine(),this.position.z+=.02+(this.options[0].deltaHeight||0)})}dispose(){var t,e;(t=this.geometry)==null||t.dispose(),(e=this.lineGeometry)==null||e.dispose(),this.doubleLines.map(n=>n.geometry.dispose()),this.clear()}constructor(t,e){super(),this.context=t,this.options=e,this.doubleLines=[],e.length&&this.init()}};var lJ=f(F(),1);import{Object3D as vG,Mesh as _G,Vector3 as R3,BufferGeometry as yG,LineSegments as xG,ShaderMaterial as EG,Color as P3,ObjectLoader as SG}from"three";var I3=class extends vG{initMergedElement(){let t=new SG,e=t.parseGeometries([this.mergedElement.mergedGeometry]);if(this.geometry=e[this.mergedElement.mergedGeometry.uuid],this.initMaterial(),this.initMesh(),this.mesh.position.z=(this.mergedElement.deltaHeight||0)+this.mergedElement.airHeight,this.mergedElement.lineGeometry){let n=t.parseGeometries([this.mergedElement.lineGeometry]);this.lineGeometry=n[this.mergedElement.lineGeometry.uuid],this.initLineMaterial(),this.createBorder()}}init(){return y(this,null,function*(){this.geometry=yield this.initGeometry(),this.initMaterial(),this.initMesh(),this.mesh.position.z=this.options[0].deltaHeight+this.options[0].airHeight,this.options[0].strokeOpacity!==0&&(this.initLineMaterial(),this.initLineGeometry(),this.createBorder())})}initGeometry(){return y(this,null,function*(){let t=yield _e.GetMergeGeometry(this.options);return this.dispatchEvent({type:"init-geometry",geometry:t}),t})}initMaterial(){let t=`
|
|
7982
|
+
`,n=-1/0,r=1/0,o=this.geometry.getAttribute("position");if(o)for(let a=0;a<o.count;a++){let u=o.getZ(a);u>n&&(n=u),u<r&&(r=u)}let s=new Xz({uniforms:{maxZ:{value:n},uColor:{value:new vh(this.options[0].fillColor)},uGradualColor1:{value:new vh(Be(this.options[0].fillColor,.99))},uGradualColor2:{value:new vh(Be(this.options[0].fillColor,.9))},uOpacity:{value:this.options[0].fillOpacity},minZ:{value:r}},vertexShader:t,fragmentShader:e,transparent:!0});this.material=s}initLineMaterial(){let{strokeColor:t,strokeOpacity:e}=this.options[0],n=D.createLineMaterial({color:t,opacity:e});return this.lineMaterial=n,n}getBorderPoints(t){let{height:e,deltaHeight:n,geometry:r}=t,o=[],s=e+(n||0),{coords:a}=r;for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let h=l[c],p=c+1===l.length?l[0]:l[c+1];o.push(new T3(h[0],h[1],s)),o.push(new T3(p[0],p[1],s))}}return o}initLineGeometry(){let t=this.options.map(e=>{let n=this.getBorderPoints(e);return new Vz().setFromPoints(n)});this.lineGeometry=jz(t)}createBorder(){let t=new Hz(this.lineGeometry,this.lineMaterial);return this.LineMesh=t,this.add(t),t}setOpacity(t,e){e===void 0&&(e=!1),e?this.material.uniforms.uOpacity.value=t:this.material.uniforms.uOpacity.value=Math.min(t,this.originFillOpacity),this.material.needsUpdate=!0}init(){return y(this,null,function*(){yield this.initGeometry(),this.initMaterial();let t=new Wz(this.geometry,this.material);this.add(t),this.options[0].strokeOpacity!==0&&(this.initLineMaterial(),this.initLineGeometry())})}dispose(){var t,e,n;(t=this.geometry)==null||t.dispose(),(e=this.material)==null||e.dispose(),(n=this.lineGeometry)==null||n.dispose(),this.clear()}constructor(t,e){super(),this.context=t,this.options=e,this.originFillOpacity=1,e.length&&(this.originFillOpacity=e[0].fillOpacity,this.init())}};var V$=f(F(),1),H$=f(A(),1);import{Float32BufferAttribute as Yz,FrontSide as Zz,InstancedMesh as Kz,Matrix4 as $z,MeshBasicMaterial as Jz,Object3D as Qz,Quaternion as tG,Shape as eG,ShapeGeometry as nG,Vector2 as Ra,Vector3 as _h}from"three";var yh={id:"",uuid:"",iconUrl:"",name:"",airHeight:0,deltaHeight:0,height:0,geometry:{cds:[],type:"polygon",coords:[],curveCpt:[],curveIndex:[]},opacity:1,visible:!0,centerCoords:[0,0],secondWidth:0,secondHeight:0,secondRotate:0},ir=class extends Qz{init(){return y(this,null,function*(){let t=this.options.reduce((r,o)=>{let{iconUrl:s}=o;return r.has(s)||r.set(s,[]),r.get(s).push(o),r},new Map),e=Array.from(t.values());(yield Promise.all(e.map(r=>y(this,null,function*(){let o=r[0].iconUrl,s=yield ht.getTextureByUrl(o);return new Jz({map:s,transparent:!0,alphaTest:.2,side:Zz})})))).forEach((r,o)=>{let s=new Kz(this.geometry,r,e[o].length);e[o].forEach((a,u)=>{let l=new $z().compose(new _h(a.centerCoords[0],a.centerCoords[1],a.deltaHeight+a.airHeight+a.height),new tG().setFromAxisAngle(new _h(0,0,1),a.secondRotate),new _h(a.secondWidth,a.secondHeight,1));s.setMatrixAt(u,l)}),this.add(s)}),this.position.z+=.004})}setOpacity(t){this.children.forEach(e=>{e.material.opacity=t,e.material.needsUpdate=!0})}dispose(){W(this),this.clear()}constructor(t,e){super(),this.context=t,this.geometry=new nG(new eG([new Ra(-.5,-.5),new Ra(-.5,.5),new Ra(.5,.5),new Ra(.5,-.5)])),this.options=e.map(r=>S({},yh,r));let n=new Yz([0,0,0,1,1,1,1,0],2);this.geometry.setAttribute("uv",n),this.init()}};import{Box3 as rG,Mesh as iG,Object3D as oG,Vector3 as sG}from"three";var aG={url:"",geometry:{type:"polygon",cds:[],coords:[],curveCpt:[],curveIndex:[]},id:"",width:0,rotate:1,airHeight:1,deltaHeight:0,center_x:0,center_y:0},A3=class extends oG{loadModel(){return y(this,null,function*(){let t=yield _t.loadModel(this.options.url);t.scene.rotation.set(Math.PI/2,0,0);let n=new rG().setFromObject(t.scene).getSize(new sG),r=Math.max(n.x,n.y),o=this.options.width/r;this.scale.set(o,o,o),this.add(t.scene),this.position.set(this.options.center_x,this.options.center_y,0),this.position.z+=this.options.airHeight+this.options.deltaHeight,this.model=t,this.rotateZ(this.options.rotate),this.dispatchEvent({type:"load-model-end",object:t})})}meshSetMaterial(t){t instanceof iG&&(t.frustumCulled=!1,t.castShadow=!0,t.material.emissiveIntensity*=.95,t.material.emissive=t.material.color,t.material.emissiveMap=t.material.map),t.children.forEach(n=>{this.meshSetMaterial(n)})}dispose(){W(this),this.model=null,this._listeners={}}constructor(t,e){super(),this.context=t,this.model=null,this.options=Object.assign({},aG,e),this.loadModel()}};var tJ=f(F(),1);import{BufferGeometry as uG,Color as lG,LineSegments as cG,Mesh as hG,Object3D as pG,Vector2 as fG,Vector3 as C3}from"three";import{mergeGeometries as dG}from"three/examples/jsm/utils/BufferGeometryUtils.js";import{LineSegments2 as gG}from"three/examples/jsm/lines/LineSegments2.js";import{LineSegmentsGeometry as mG}from"three/examples/jsm/lines/LineSegmentsGeometry.js";var Pa=class extends pG{initGeometry(){return y(this,null,function*(){this.geometry=yield _e.GetMergedShapeGeometry(this.options)})}initMaterial(){let t=D.createMeshBasicMaterial({color:"#ffffff",opacity:1,vertexColors:!0});return this.material=t,t}initLineMaterial(){let{strokeColor:t,strokeOpacity:e}=this.options[0],n=D.createLineMaterial({color:t,opacity:e,vertexColors:!0});return this.lineMaterial=n,n}getBorderPoints(t){let{deltaHeight:e,geometry:n}=t,r=[],o=e||0,{coords:s}=n;for(let a=0;a<s.length;a++){let u=s[a];for(let l=0;l<u.length;l++){let c=u[l],h=l+1===u.length?u[0]:u[l+1];r.push(new C3(c[0],c[1],o)),r.push(new C3(h[0],h[1],o))}}return r}initDoubleLine(){let t=this.options.filter(e=>{var n,r;return e.double&&((r=e.geometry.otherCoords)==null||(n=r[1])==null?void 0:n.length)});t.length&&[!0,!1].forEach(e=>{let n=t.filter(l=>l.dashed===e);if(!n.length)return;let r=D.createLine2MaterialMap({color:"#ffffff",width:.2,dashed:e,resolution:new fG(this.context.clientSize.width,this.context.clientSize.height),vertexColors:!0}),o=[],s=[];n.forEach(l=>{let c=l.geometry.otherCoords[1],h=l.airHeight+(l.deltaHeight||0)+.01,p=new lG(l.secondColor);for(let d=0;d<c.length-1;d++){let g=c[d],v=c[d+1];o.push(g[0],g[1],h,v[0],v[1],h),s.push(p.r,p.g,p.b,p.r,p.g,p.b)}});let a=new mG;a.setPositions(o),a.setColors(s);let u=new gG(a,r);u.computeLineDistances(),u.position.z+=.01,this.add(u),this.doubleLines.push(u)})}initLineGeometry(){let t=this.options.map(e=>{let n=this.getBorderPoints(e);return new uG().setFromPoints(n)});this.lineGeometry=dG(t)}createBorder(){let t=new cG(this.lineGeometry,this.lineMaterial);return this.LineMesh=t,this.add(t),t}init(){return y(this,null,function*(){yield this.initGeometry(),this.initMaterial();let t=new hG(this.geometry,this.material);this.add(t),this.initDoubleLine(),this.position.z+=.02+(this.options[0].deltaHeight||0)})}dispose(){var t,e;(t=this.geometry)==null||t.dispose(),(e=this.lineGeometry)==null||e.dispose(),this.doubleLines.map(n=>n.geometry.dispose()),this.clear()}constructor(t,e){super(),this.context=t,this.options=e,this.doubleLines=[],e.length&&this.init()}};var lJ=f(F(),1);import{Object3D as vG,Mesh as _G,Vector3 as R3,BufferGeometry as yG,LineSegments as xG,ShaderMaterial as EG,Color as P3,ObjectLoader as SG}from"three";var I3=class extends vG{initMergedElement(){let t=new SG,e=t.parseGeometries([this.mergedElement.mergedGeometry]);if(this.geometry=e[this.mergedElement.mergedGeometry.uuid],this.initMaterial(),this.initMesh(),this.mesh.position.z=(this.mergedElement.deltaHeight||0)+this.mergedElement.airHeight,this.mergedElement.lineGeometry){let n=t.parseGeometries([this.mergedElement.lineGeometry]);this.lineGeometry=n[this.mergedElement.lineGeometry.uuid],this.initLineMaterial(),this.createBorder()}}init(){return y(this,null,function*(){this.geometry=yield this.initGeometry(),this.initMaterial(),this.initMesh(),this.mesh.position.z=this.options[0].deltaHeight+this.options[0].airHeight,this.options[0].strokeOpacity!==0&&(this.initLineMaterial(),this.initLineGeometry(),this.createBorder())})}initGeometry(){return y(this,null,function*(){let t=yield _e.GetMergeGeometry(this.options);return this.dispatchEvent({type:"init-geometry",geometry:t}),t})}initMaterial(){let t=`
|
|
7983
7983
|
varying vec3 vPosition; // \u7528\u4E8E\u4F20\u9012\u9876\u70B9\u7684\u4F4D\u7F6E\u7ED9\u7247\u6BB5\u7740\u8272\u5668
|
|
7984
7984
|
uniform float maxZ; // \u58F0\u660E\u4E00\u4E2Auniform\u53D8\u91CF
|
|
7985
7985
|
uniform vec3 uColor;
|
|
@@ -19642,7 +19642,7 @@ void main() {
|
|
|
19642
19642
|
float uvx = prevUv + (vUv.y + 1.0) / 2.0 * vCustomUv;
|
|
19643
19643
|
gl_FragColor = diffuseColor * texture2D(map, vec2(uvx, (vUv.x + 1.0) / 2.0) * repeat);
|
|
19644
19644
|
}
|
|
19645
|
-
`};var pu=class extends pH{constructor(t){super({type:"ArrowLineMaterial",uniforms:Object.assign({},w1.clone(cu["custom-line"].uniforms),{map:{value:null}}),vertexShader:cu["custom-line"].vertexShader,fragmentShader:cu["custom-line"].fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(e){this.uniforms.map.value=e}},color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(e){this.uniforms.repeat.value.copy(e)}},allDistance:{enumerable:!0,get:function(){return this.uniforms.allDistance.value},set:function(e){this.uniforms.allDistance.value=e}}}),this.setValues(t),this.isLineMaterial=!0}};import{LineGeometry as xH}from"three/examples/jsm/lines/LineGeometry.js";import{Line2 as EH}from"three/examples/jsm/lines/Line2.js";var T1={texture_url:ua,lineWidth:8,color:16777215},fu=class extends fH{registryEvent(){this.navigation.bmap.context.addEventListener("control-change",this.onControlChange),this.navigation.bmap.context.addEventListener("update",this.onUpdate),this.navigation.bmap.context.addEventListener("resize",this.onResize)}unRegistryEvent(){this.navigation.bmap.context.removeEventListener("control-change",this.onControlChange),this.navigation.bmap.context.removeEventListener("update",this.onUpdate),this.navigation.bmap.context.removeEventListener("resize",this.onResize)}getRepeat(){let{points:t,navigation:{bmap:{context:{camera:e,clientSize:{width:n,height:r}}}}}=this,o=t.map(a=>{let[u,l,c]=a;return O(new mH(u,l,c),e,n,r)}).map(a=>{let{x:u,y:l}=a;return[u,l]});return Tt(o)/32}changeRepeat(){if(!this.material)return;let t=this.getRepeat();this.material.repeat=new Nh(t,1)}loadTexture(t){return new Promise((e,n)=>{new dH().load(t,e,void 0,n)})}transformPoints(t){let e=[];for(let n=0;n<t.length;n++)e.push(...t[n]);return e}updatePoints(t){var e;this.points=t,this.changeRepeat(),(e=this.geometry)==null||e.setPositions(t.flat(2))}movePath(t){this.material&&(this.material.thresholdRatio=t)}create(t){return y(this,null,function*(){let e=new xH;this.points=t,e.setPositions(t.flat(2)),this.geometry=e;let n=Tt(t.map(s=>{let[a,u]=s;return[a,u]}));if(!this.texture){let s=this.texture=yield this.loadTexture(this.config.texture_url);s.wrapS=s.wrapT=_H}let r=this.material=new pu({color:new gH(this.config.color),transparent:!0,resolution:new Nh(this.navigation.bmap.context.clientSize.width,this.navigation.bmap.context.clientSize.height),depthTest:!0,depthWrite:!0,linewidth:this.config.lineWidth,map:this.texture,blending:vH,repeat:new Nh(this.getRepeat(),1),allDistance:n}),o=this.mesh=new EH(e,r);return o.computeLineDistances(),o.renderOrder=9,this.add(o),o})}getBoundingBox(){return this.mesh?(this.mesh.geometry.computeBoundingBox(),new yH().copy(this.mesh.geometry.boundingBox).applyMatrix4(this.mesh.matrixWorld)):null}dispose(){var t,e,n;this.unRegistryEvent(),this.clear(),(t=this.geometry)==null||t.dispose(),(e=this.material)==null||e.dispose(),(n=this.texture)==null||n.dispose(),this.navigation=null}constructor(t,e){super(),this.navigation=t,this.mesh=null,this.geometry=null,this.material=null,this.texture=null,this.config=T1,this.points=[],this.basicRepeat=1,this.prevCameraZoom=0,this.onControlChange=()=>{let n=this.navigation.bmap.context.camera.zoom;n!==this.prevCameraZoom&&(this.prevCameraZoom=n,this.changeRepeat())},this.onUpdate=()=>{this.texture},this.onResize=()=>{if(this.material){let{width:n,height:r}=this.navigation.bmap.context.clientSize;this.material.resolution.set(n,r)}},this.config=Object.assign({},T1,e),this.registryEvent(),this.prevCameraZoom=this.navigation.bmap.context.camera.zoom}};import{Tween as wH}from"@tweenjs/tween.js";import{AnimationMixer as SH,Box3 as bH,Object3D as A1,Box2 as MH,Vector3 as du,Vector2 as io}from"three";var gu=class extends A1{getBaseScale(t){let{clientSize:{width:e,height:n},camera:r}=this.bmap.context,o=new bH().setFromObject(t),{max:s,min:a}=o,u=new du(a.x,s.y,s.z),l=new du(s.x,s.y,s.z),c=new du(s.x,a.y,a.z),h=new du(a.x,a.y,a.z),p=O(u,r,e,n),d=O(l,r,e,n),g=O(h,r,e,n),v=O(c,r,e,n),E=new MH().setFromPoints([new io(p.x,p.y),new io(d.x,d.y),new io(g.x,g.y),new io(v.x,v.y)]).getSize(new io),b=this.options.size/E.x,w=this.options.size/E.y,P=Math.min(b,w),L=r.zoom;return P*L}registryEvent(){this.bmap.context.addEventListener("update",this._update),this.bmap.context.addEventListener("control-zoom-change",this._onChangeZoom)}unRegistryEvent(){this.bmap.context.removeEventListener("update",this._update),this.bmap.context.removeEventListener("control-zoom-change",this._onChangeZoom)}printGraph(t){console.group(" <"+t.type+"> "+t.name),t.children.forEach(e=>this.printGraph(e)),console.groupEnd()}setClips(t){this.clearClips(),t.length&&(this.mixer=new SH(this.model.scene),t.forEach(e=>this.mixer.clipAction(e).play()))}startClips(){var t;this.setClips(((t=this.model)==null?void 0:t.animations)||[])}clearClips(){this.mixer&&(this.mixer.stopAllAction(),this.mixer.uncacheRoot(this.mixer.getRoot()),this.mixer=null)}dispose(){this.unRegistryEvent(),this.clearClips(),this.clear(),this.model&&W(this.model.scene),this.bmap=null}constructor(t,e,n={}){super(),this.bmap=t,this.group=new A1,this.mixer=null,this.previewTime=0,this.basicScale=1,this.options={size:40},this._update=()=>{let r=Date.now();if(!this.previewTime)this.previewTime=r;else{var o;let s=r-this.previewTime;this.previewTime=r,(o=this.mixer)==null||o.update(s/1e3)}},this._onChangeZoom=r=>{let{zoom:o}=r;var s;let a=this.basicScale/o;(s=this.model)==null||s.scene.scale.set(a,a,a)},this.options=S({},this.options,n),this.add(this.group),_t.loadModel(e,!1).then(r=>{this.model=r;let o=this.getBaseScale(r.scene);this.basicScale=o;let s=this.bmap.context.camera.zoom;r.scene.scale.set(o/s,o/s,o/s),this.group.add(r.scene),this.setClips(r.animations),this.group.rotation.set(Math.PI/2,Math.PI,0),this.group.renderOrder=1e4,this.dispatchEvent({type:"loaded"})}),this.registryEvent()}};import{Vector3 as mu}from"three";import{isNil as TH}from"lodash";var C1=class extends lt{registryEvent(){this.bmap.context.addEventListener("update",this.onUpdate)}pauseAnimation(){this.tweenUtil.pause()}continueAnimation(){this.tweenUtil.continue()}clearTween(){this.tweenUtil.clear(),this.bmap.context.control.enabled=!0}unRegistryEvent(){this.bmap.context.removeEventListener("update",this.onUpdate)}clearPath(){this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose(),this.path=null,this.movedDistance=0,this.clearTween()),this.startModel&&(this.startModel.visible=!1),this.translatePath=null}addPath(t){this.paths=t;let e=t.map(n=>S({},n,{points:this.translatePoints(n.points)}));if(this.clearTween(),this.movedDistance=0,this.bmap.currentBuildGround)this.renderPath(e);else{let n=()=>{this.bmap.removeEventListener("center-change",n),this.renderPath(e)};this.bmap.addEventListener("center-change",n)}this.dispatchEvent({type:"add-path",paths:t})}translatePoints(t){let[e,n]=this.bmap.buildingCenter;return t.map(r=>[r[0]-e,r[1]-n])}renderPath(t){return y(this,null,function*(){if(!t.length)return this.clearPath();let e=[];t.forEach((n,r,o)=>{let s=this.mulFloor.floors.find(a=>a.name===n.floor);e.push(...n.points.map(a=>{let[u,l]=a;return[u,l,s.position.z+s.groundMaxHeight]}))}),this.cPath=e,this.animationPathOptions={cPathIndex:0},this.path?this.path.updatePoints(e):(this.path=new fu(this),yield this.path.create(e),this.path.position.z=.5,this.bmap.context.scene.add(this.path)),this.startModel&&(this.startModel.position.set(e[0][0],e[0][1],e[0][2]),this.startModel.visible=!0),this.dispatchEvent({type:"render-path",path:this.path})})}catmullRomCurve3(t){return us(t,!1,!0,.1,170,2.5)}getPathDirection(t,e){if(t.length<2)return null;let n=Fe(t,e),r=t[n],o=t[n+1],s=new mu(o[0]-r[0],o[1]-r[1],0).normalize(),a=new mu(0,1,0).normalize(),u=s.angleTo(a),l=new mu().crossVectors(a,s);return(Object.is(l.y,0)?-1:1)*u}startSimulation(t){return y(this,null,function*(){t===void 0&&(t=1);let{paths:e,movedDistance:n}=this;if(!e.length)return;let r=e.reduce((s,a)=>s+a.distance,0);if(!r||n>=r)return;this.simulationTween&&this.tweenUtil.remove(this.simulationTween);let o=r/t;return this.startModel.startClips(),new Promise(s=>{let a=this.simulationTween=new wH({distance:this.movedDistance},this.tweenUtil.group).to({distance:r},o*1e3).onUpdate(u=>{var l;this.movedDistance=u.distance;let c=u.distance,h=0;for(let E=0;E<e.length;E++)if(e[E].distance>=c){h=E;break}else c-=e[E].distance;let p=Sr(e[h].points,c);if(p===null)return;this.currentPathPosition=p;let d=this.translatePoints([p])[0],g=this.mulFloor.floors.find(E=>E.name===e[h].floor),v=g?g.position.z+g.groundMaxHeight:(l=this.startModel)==null?void 0:l.position.z;this.startModel&&this.startModel.position.set(d[0],d[1],v);let _=this.getPathDirection(e[h].points,p);TH(_)||this.startModel.setRotationFromAxisAngle(new mu(0,0,1),_)}).onComplete(()=>{this.tweenUtil.remove(a),this.startModel.clearClips(),s(!0)}).start()})})}setStartPoiRotate(t){if(this.startPoi){let n=(this.bmap.context.control.getAzimuthalAngle()*180/Math.PI+360)%360;this.startPoi.options.icon_rotate=(360-t-n)%360}}dispose(){this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose()),this.startModel&&(this.bmap.context.scene.remove(this.startModel),this.startModel.dispose()),this.tweenUtil.dispose(),this.unRegistryEvent(),super.dispose()}constructor(t,e,n={}){super(t),this.mulFloor=e,this.path=null,this.fetchRoadStatus=!1,this.paths=[],this.curFloorPath=null,this.translatePath=null,this.currentPathPosition=null,this.pathTween=null,this.startPoi=null,this.movedDistance=0,this.tweenUtil=new Tn,this.animationPathOptions={cPathIndex:0},this.cPath=[],this.onUpdate=()=>{this.tweenUtil.update()},this.startModel=new gu(t,u3,n.startModel),this.startModel.visible=!1,this.bmap.context.scene.add(this.startModel),this.registryEvent()}};var rst=f(hs(),1),ist=f(ps(),1);import{Raycaster as AH,Vector2 as CH}from"three";var R1=class extends lt{registryEvent(){this.clickHelper.addEventListener("click",this._click)}unRegistryEvent(){this.clickHelper.removeEventListener("click",this._click)}dispose(){this.unRegistryEvent(),this.clickHelper.dispose(),this.mulFloors=null,super.dispose()}constructor(t,e){super(t),this.mulFloors=e,this._click=n=>{let{e:r}=n;if(!this.mulFloors.showStatus)return;let o=new CH,{offsetX:s,offsetY:a}=r,u=this.mulFloors.poiLayer.getPoiByDeviceXy(s,a),{clientSize:l}=this.bmap.context;o.x=s/l.width*2-1,o.y=a/l.height*-2+1;let c=new AH;c.setFromCamera(o,this.bmap.context.camera),c.ray.origin.sub(c.ray.direction.clone().multiplyScalar(1e4));let h=this.mulFloors.floors.map(p=>p.graphicLayer.getGraphicByRaycaster(c).graphics).flat();this.dispatchEvent({type:"select",pois:u,graphics:h})},this.clickHelper=new gs(this.bmap.context.container),this.registryEvent()}};var bst=f(P1(),1),Mst=f(I1(),1),wst=f(F(),1);var fst=f(A(),1),dst=f(F(),1),gst=f(jn(),1);import{Vector2 as oo}from"three";function DH(i){let t=i.length,e=0,n=0,r=0,o=0;i.forEach(u=>{e+=u[0],n+=u[1],r+=u[0]*u[1],o+=u[0]*u[0]});let s=(t*r-e*n)/(t*o-e*e),a=(n-s*e)/t;return{m:s,b:a}}function UH(i,t,e){let n=e[0][0],r=e.slice(-1)[0][0],o=i*n+t,s=i*r+t;return{start:[n,o],end:[r,s]}}function vu(i){if(i.length<2)return null;let t=i.filter((u,l)=>{let c=[...i];return c.splice(l,1),c.every(h=>h[0]!==u[0]&&h[1]!==u[1])});if(t.length<2)return null;let{m:e,b:n}=DH(t),{start:r,end:o}=UH(e,n,t),a=360-(new oo().subVectors(new oo(o[0],o[1]),new oo(r[0],r[1])).angle()/Math.PI*180-90+360)%360;return Number.isNaN(a)?null:a}function _st(i){let t=[];for(let e=1;e<i.length;e++){let n=i[e-1],r=i[e],o=r.position[0]-n.position[0],s=r.position[1]-n.position[1],a=Math.sqrt(o**2+s**2),u=r.time-n.time;if(u>0){let l=a/u;console.log("speedDelta",n.type,r.type,Oh(l),a,u),t.push(l)}else t.push(0)}return t}function yst(i,t){let e=i[0],n=i.slice(-1)[0],r=X(n.position,e.position),o=n.time-e.time;return o<100||r<3?null:r/o}function Oh(i){return i*60*60}function so(i,t,e,n){let r=(e+90)%360*(Math.PI/180),o=t*n,s=new oo(i[0],i[1]),a=Math.cos(r),u=Math.sin(r),l=new oo(a,u);return s.add(l.normalize().multiplyScalar(o)),[s.x,s.y]}function xst(i){let t=[...i].sort((l,c)=>l-c),e=L1(t,25),n=L1(t,75),r=n-e,o=e-1.5*r,s=n+1.5*r,a=t.filter(l=>l>=o&&l<=s);return i.filter(l=>a.includes(l))}function L1(i,t){let e=t/100*(i.length-1),n=Math.floor(e),r=Math.ceil(e);if(n===r)return i[n];let o=e-n;return i[n]*(1-o)+i[r]*o}import{isNil as _u}from"lodash";var yu=class extends st{setPathAngle(t){this.pathAngle=t,this.dispatchEvent({type:"change-compass",value:this.pathAngle}),_u(this.angle)&&(this.angle=t)}changeSpeed(){let t=this.history.filter(u=>["vision"].includes(u.type));if(t.length<2){this.speedFilter.filter(0),this.speed=0;return}let e=t[0],n=t.slice(-1)[0],r=X(n.position,e.position),o=n.time-e.time,s=o>0?r/o:0,a=this.speedFilter.filter(s);this.speed=a}changeAngle(t){t===void 0&&(t=this.visionHistory),t.length<2&&(this.angle=null);let e=vu(t.map(n=>n.position));e!==null&&this.setAngle(e)}setAngle(t,e){e===void 0&&(e=!0),this.angle=t,e&&this.dispatchEvent({type:"change-position-compass",value:t})}setPosition(t,e,n){let r={position:t,time:e,clientTime:Date.now()-n,type:"vision"};if(this._setVisionHistoryForAngle(r),_u(this.angle)||!this.speed){this.addHistory(r);return}let o=this.history.findLastIndex(a=>a.type==="vision"),s=this.history[o];if(s){if(s.time>e)return;let a=vu([this.history.slice(-1)[0].position,t]);if(a&&Math.abs(a-this.angle)<60){this.addHistory(r);return}let u=so(t,this.speed,360-this.pathAngle,n);X(u,this.history.slice(-1)[0].position)>5?this.visionExcessesCount++:this.visionExcessesCount=0,this.visionExcessesCount>3&&(console.warn("\u8FDE\u7EED\u4E09\u6B21\u89C6\u89C9\u548Cpdr\u5DEE\u8DDD\u5927\u4E8E5\u7C73\uFF0C\u4F7F\u7528\u89C6\u89C9\u6821\u51C6"),this.addHistory(r),this.visionExcessesCount=0)}}resetPdrPosition(){let t=this.history.findLast(e=>e.type==="vision");if(t&&this.speed){let e=so(t.position,this.speed,360-this.pathAngle,Date.now()-t.clientTime);e&&this.history.push({position:e,time:Date.now(),clientTime:Date.now(),type:"pdr"})}}getLastVisionPdrPos(){let t=this.history.findLastIndex(n=>n.type==="vision");if(t!==-1){var e;return(e=this.history[t+1])!=null?e:this.history[t]}return null}_setVisionHistoryForAngle(t){if(!this.visionHistory.length){this.visionHistory.push(t);return}let e=vu([this.visionHistory.slice(-1)[0].position,t.position]);if(e!==null&&(this.angle&&Math.abs(this.angle-e)>60?this.angleExcessesCount++:(this.angleExcessesCount=0,this.visionHistory.push(t))),this.angleExcessesCount>3)console.warn("\u8FDE\u7EED\u4E09\u6B21\u89D2\u5EA6\u6BD4\u8F83\u6B6A\uFF0C\u91CD\u65B0\u77EB\u6B63"),this.visionHistory=[t],this.angleExcessesCount=0;else{let n=X(this.visionHistory[0].position,this.visionHistory.slice(-1)[0].position);for(;n>5&&this.visionHistory.length>15;)this.visionHistory.shift(),n=X(this.visionHistory[0].position,this.visionHistory.slice(-1)[0].position)}this.changeAngle()}addHistory(t){this.history.push(t);let e=this.history.filter(a=>a.type==="vision"),n=e.length?Date.now()-e.slice(-1)[0].clientTime:0,r=X(this.history[0].position,this.history.slice(-1)[0].position),o=n>5e3?10:3,s=n>5e3?0:5;for(n>5e3&&console.warn("\u89C6\u89C9\u7ED3\u679C\u8D85\u51FA5s\u4E0D\u53EF\u7528\uFF0C\u5168\u90E8\u6E05\u7A7A");e.length>s&&r>o;)this.history.shift(),e=this.history.filter(a=>a.type==="vision"),r=X(this.history[0].position,this.history.slice(-1)[0].position);s===0?this.changeSpeed():t.type==="vision"&&this.changeSpeed(),this.changePosition(t.type)}setBeaconPosition(t,e,n){let r=Date.now()-n,o={position:t,time:e,clientTime:r,type:"beacon"},s=this.history.findLastIndex(c=>c.type!=="pdr"),a=this.history[s];if(!a){this.addHistory(o);return}if(_u(this.pathAngle)||!this.speed){this.addHistory(o);return}if(a&&a.time>e)return;let u=so(t,this.speed,360-this.pathAngle,n);X(u,this.history.slice(-1)[0].position)>5?this.beaconExcessesCount++:this.beaconExcessesCount=0,this.beaconExcessesCount>3&&(console.warn("\u8FDE\u7EED\u4E09\u6B21beacon\u548Cpdr\u5DEE\u8DDD\u5927\u4E8E5\u7C73\uFF0C\u4F7F\u7528beacon\u6821\u51C6"),this.addHistory(o),this.beaconExcessesCount=0)}startPositionTimer(){this.positionTimer&&this.timer.clearInterval(this.positionTimer),this.positionTimer=this.timer.setInterval(()=>{this.changePosition()},20)}stopPositionTimer(){this.positionTimer&&(this.timer.clearInterval(this.positionTimer),this.positionTimer=null)}changePosition(t){t===void 0&&(t="pdr");let e=this.getPosition(t);e.success&&(this.history.push({position:e.pos,time:Date.now(),clientTime:Date.now(),type:"pdr"}),this.speed?this.dispatchEvent({type:"change-pos",value:S({},e)}):this.dispatchEvent({type:"change-pos",value:e}))}getPosition(t){if(this.history.length===0)return{success:!1,pos:[0,0],compass:null,speed:0};let e=this.history.slice(-1)[0];if(this.history.length<2)return{success:!0,pos:e.position,compass:this.pathAngle,speed:this.speed};if(_u(this.pathAngle)||!this.speed)return{success:!0,pos:e.position,compass:this.pathAngle,speed:this.speed};let n=e.clientTime,r=Date.now()-n;return{success:!0,pos:this.pathAngle?so(e.position,this.speed,360-this.pathAngle,r):e.position,compass:this.pathAngle,speed:Oh(this.speed)}}dispose(){this.timer.dispose()}constructor(){super(),this.history=[],this.visionHistory=[],this.speed=0,this.angle=null,this.timer=new Q,this.positionTimer=null,this.speedFilter=new vs,this.visionExcessesCount=0,this.beaconExcessesCount=0,this.angleExcessesCount=0,this.pathAngle=0,this.startPositionTimer()}};var Nst=f(Hn(),1);function Dh(){let i=new Blob([`var PU=Object.create;var EE=Object.defineProperty;var IU=Object.getOwnPropertyDescriptor;var RU=Object.getOwnPropertyNames;var LU=Object.getPrototypeOf,NU=Object.prototype.hasOwnProperty;var st=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var OU=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of RU(t))!NU.call(n,s)&&s!==e&&EE(n,s,{get:()=>t[s],enumerable:!(o=IU(t,s))||o.enumerable});return n};var sn=(n,t,e)=>(e=n!=null?PU(LU(n)):{},OU(t||!n||!n.__esModule?EE(e,"default",{value:n,enumerable:!0}):e,n));var ac=(n,t,e)=>new Promise((o,s)=>{var l=g=>{try{h(e.next(g))}catch(m){s(m)}},p=g=>{try{h(e.throw(g))}catch(m){s(m)}},h=g=>g.done?o(g.value):Promise.resolve(g.value).then(l,p);h((e=e.apply(n,t)).next())});var so=st((Vm,wE)=>{"use strict";var zf=function(n){return n&&n.Math===Math&&n};wE.exports=zf(typeof globalThis=="object"&&globalThis)||zf(typeof window=="object"&&window)||zf(typeof self=="object"&&self)||zf(typeof global=="object"&&global)||zf(typeof Vm=="object"&&Vm)||function(){return this}()||Function("return this")()});var mi=st((oj,SE)=>{"use strict";SE.exports=function(n){try{return!!n()}catch(t){return!0}}});var Ys=st((sj,ME)=>{"use strict";var DU=mi();ME.exports=!DU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Gf=st((aj,bE)=>{"use strict";var FU=mi();bE.exports=!FU(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})});var Ns=st((uj,AE)=>{"use strict";var UU=Gf(),gp=Function.prototype.call;AE.exports=UU?gp.bind(gp):function(){return gp.apply(gp,arguments)}});var IE=st(PE=>{"use strict";var TE={}.propertyIsEnumerable,CE=Object.getOwnPropertyDescriptor,BU=CE&&!TE.call({1:2},1);PE.f=BU?function(t){var e=CE(this,t);return!!e&&e.enumerable}:TE});var mp=st((cj,RE)=>{"use strict";RE.exports=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}}});var yi=st((fj,OE)=>{"use strict";var LE=Gf(),NE=Function.prototype,Wm=NE.call,zU=LE&&NE.bind.bind(Wm,Wm);OE.exports=LE?zU:function(n){return function(){return Wm.apply(n,arguments)}}});var uc=st((hj,FE)=>{"use strict";var DE=yi(),GU=DE({}.toString),kU=DE("".slice);FE.exports=function(n){return kU(GU(n),8,-1)}});var BE=st((pj,UE)=>{"use strict";var qU=yi(),HU=mi(),VU=uc(),Xm=Object,WU=qU("".split);UE.exports=HU(function(){return!Xm("z").propertyIsEnumerable(0)})?function(n){return VU(n)==="String"?WU(n,""):Xm(n)}:Xm});var Ym=st((dj,zE)=>{"use strict";zE.exports=function(n){return n==null}});var lc=st((gj,GE)=>{"use strict";var XU=Ym(),YU=TypeError;GE.exports=function(n){if(XU(n))throw new YU("Can't call method on "+n);return n}});var cc=st((mj,kE)=>{"use strict";var $U=BE(),ZU=lc();kE.exports=function(n){return $U(ZU(n))}});var Ui=st((yj,qE)=>{"use strict";var $m=typeof document=="object"&&document.all;qE.exports=typeof $m=="undefined"&&$m!==void 0?function(n){return typeof n=="function"||n===$m}:function(n){return typeof n=="function"}});var $s=st((vj,HE)=>{"use strict";var JU=Ui();HE.exports=function(n){return typeof n=="object"?n!==null:JU(n)}});var fc=st((_j,VE)=>{"use strict";var Zm=so(),KU=Ui(),jU=function(n){return KU(n)?n:void 0};VE.exports=function(n,t){return arguments.length<2?jU(Zm[n]):Zm[n]&&Zm[n][t]}});var XE=st((xj,WE)=>{"use strict";var QU=yi();WE.exports=QU({}.isPrototypeOf)});var JE=st((Ej,ZE)=>{"use strict";var tB=so(),YE=tB.navigator,$E=YE&&YE.userAgent;ZE.exports=$E?String($E):""});var rw=st((wj,nw)=>{"use strict";var ew=so(),Jm=JE(),KE=ew.process,jE=ew.Deno,QE=KE&&KE.versions||jE&&jE.version,tw=QE&&QE.v8,Zs,yp;tw&&(Zs=tw.split("."),yp=Zs[0]>0&&Zs[0]<4?1:+(Zs[0]+Zs[1]));!yp&&Jm&&(Zs=Jm.match(/Edge\\/(\\d+)/),(!Zs||Zs[1]>=74)&&(Zs=Jm.match(/Chrome\\/(\\d+)/),Zs&&(yp=+Zs[1])));nw.exports=yp});var Km=st((Sj,ow)=>{"use strict";var iw=rw(),eB=mi(),nB=so(),rB=nB.String;ow.exports=!!Object.getOwnPropertySymbols&&!eB(function(){var n=Symbol("symbol detection");return!rB(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&iw&&iw<41})});var jm=st((Mj,sw)=>{"use strict";var iB=Km();sw.exports=iB&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Qm=st((bj,aw)=>{"use strict";var oB=fc(),sB=Ui(),aB=XE(),uB=jm(),lB=Object;aw.exports=uB?function(n){return typeof n=="symbol"}:function(n){var t=oB("Symbol");return sB(t)&&aB(t.prototype,lB(n))}});var lw=st((Aj,uw)=>{"use strict";var cB=String;uw.exports=function(n){try{return cB(n)}catch(t){return"Object"}}});var kf=st((Tj,cw)=>{"use strict";var fB=Ui(),hB=lw(),pB=TypeError;cw.exports=function(n){if(fB(n))return n;throw new pB(hB(n)+" is not a function")}});var vp=st((Cj,fw)=>{"use strict";var dB=kf(),gB=Ym();fw.exports=function(n,t){var e=n[t];return gB(e)?void 0:dB(e)}});var pw=st((Pj,hw)=>{"use strict";var t0=Ns(),e0=Ui(),n0=$s(),mB=TypeError;hw.exports=function(n,t){var e,o;if(t==="string"&&e0(e=n.toString)&&!n0(o=t0(e,n))||e0(e=n.valueOf)&&!n0(o=t0(e,n))||t!=="string"&&e0(e=n.toString)&&!n0(o=t0(e,n)))return o;throw new mB("Can't convert object to primitive value")}});var qf=st((Ij,dw)=>{"use strict";dw.exports=!1});var _p=st((Rj,mw)=>{"use strict";var gw=so(),yB=Object.defineProperty;mw.exports=function(n,t){try{yB(gw,n,{value:t,configurable:!0,writable:!0})}catch(e){gw[n]=t}return t}});var xp=st((Lj,_w)=>{"use strict";var vB=qf(),_B=so(),xB=_p(),yw="__core-js_shared__",vw=_w.exports=_B[yw]||xB(yw,{});(vw.versions||(vw.versions=[])).push({version:"3.42.0",mode:vB?"pure":"global",copyright:"\\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Ep=st((Nj,Ew)=>{"use strict";var xw=xp();Ew.exports=function(n,t){return xw[n]||(xw[n]=t||{})}});var hc=st((Oj,ww)=>{"use strict";var EB=lc(),wB=Object;ww.exports=function(n){return wB(EB(n))}});var ba=st((Dj,Sw)=>{"use strict";var SB=yi(),MB=hc(),bB=SB({}.hasOwnProperty);Sw.exports=Object.hasOwn||function(t,e){return bB(MB(t),e)}});var r0=st((Fj,Mw)=>{"use strict";var AB=yi(),TB=0,CB=Math.random(),PB=AB(1 .toString);Mw.exports=function(n){return"Symbol("+(n===void 0?"":n)+")_"+PB(++TB+CB,36)}});var Os=st((Uj,Aw)=>{"use strict";var IB=so(),RB=Ep(),bw=ba(),LB=r0(),NB=Km(),OB=jm(),pc=IB.Symbol,i0=RB("wks"),DB=OB?pc.for||pc:pc&&pc.withoutSetter||LB;Aw.exports=function(n){return bw(i0,n)||(i0[n]=NB&&bw(pc,n)?pc[n]:DB("Symbol."+n)),i0[n]}});var Iw=st((Bj,Pw)=>{"use strict";var FB=Ns(),Tw=$s(),Cw=Qm(),UB=vp(),BB=pw(),zB=Os(),GB=TypeError,kB=zB("toPrimitive");Pw.exports=function(n,t){if(!Tw(n)||Cw(n))return n;var e=UB(n,kB),o;if(e){if(t===void 0&&(t="default"),o=FB(e,n,t),!Tw(o)||Cw(o))return o;throw new GB("Can't convert object to primitive value")}return t===void 0&&(t="number"),BB(n,t)}});var o0=st((zj,Rw)=>{"use strict";var qB=Iw(),HB=Qm();Rw.exports=function(n){var t=qB(n,"string");return HB(t)?t:t+""}});var wp=st((Gj,Nw)=>{"use strict";var VB=so(),Lw=$s(),s0=VB.document,WB=Lw(s0)&&Lw(s0.createElement);Nw.exports=function(n){return WB?s0.createElement(n):{}}});var a0=st((kj,Ow)=>{"use strict";var XB=Ys(),YB=mi(),$B=wp();Ow.exports=!XB&&!YB(function(){return Object.defineProperty($B("div"),"a",{get:function(){return 7}}).a!==7})});var u0=st(Fw=>{"use strict";var ZB=Ys(),JB=Ns(),KB=IE(),jB=mp(),QB=cc(),tz=o0(),ez=ba(),nz=a0(),Dw=Object.getOwnPropertyDescriptor;Fw.f=ZB?Dw:function(t,e){if(t=QB(t),e=tz(e),nz)try{return Dw(t,e)}catch(o){}if(ez(t,e))return jB(!JB(KB.f,t,e),t[e])}});var l0=st((Hj,Uw)=>{"use strict";var rz=Ys(),iz=mi();Uw.exports=rz&&iz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Aa=st((Vj,Bw)=>{"use strict";var oz=$s(),sz=String,az=TypeError;Bw.exports=function(n){if(oz(n))return n;throw new az(sz(n)+" is not an object")}});var Ru=st(Gw=>{"use strict";var uz=Ys(),lz=a0(),cz=l0(),Sp=Aa(),zw=o0(),fz=TypeError,c0=Object.defineProperty,hz=Object.getOwnPropertyDescriptor,f0="enumerable",h0="configurable",p0="writable";Gw.f=uz?cz?function(t,e,o){if(Sp(t),e=zw(e),Sp(o),typeof t=="function"&&e==="prototype"&&"value"in o&&p0 in o&&!o[p0]){var s=hz(t,e);s&&s[p0]&&(t[e]=o.value,o={configurable:h0 in o?o[h0]:s[h0],enumerable:f0 in o?o[f0]:s[f0],writable:!1})}return c0(t,e,o)}:c0:function(t,e,o){if(Sp(t),e=zw(e),Sp(o),lz)try{return c0(t,e,o)}catch(s){}if("get"in o||"set"in o)throw new fz("Accessors not supported");return"value"in o&&(t[e]=o.value),t}});var dc=st((Xj,kw)=>{"use strict";var pz=Ys(),dz=Ru(),gz=mp();kw.exports=pz?function(n,t,e){return dz.f(n,t,gz(1,e))}:function(n,t,e){return n[t]=e,n}});var m0=st((Yj,Hw)=>{"use strict";var d0=Ys(),mz=ba(),qw=Function.prototype,yz=d0&&Object.getOwnPropertyDescriptor,g0=mz(qw,"name"),vz=g0&&function(){}.name==="something",_z=g0&&(!d0||d0&&yz(qw,"name").configurable);Hw.exports={EXISTS:g0,PROPER:vz,CONFIGURABLE:_z}});var v0=st(($j,Vw)=>{"use strict";var xz=yi(),Ez=Ui(),y0=xp(),wz=xz(Function.toString);Ez(y0.inspectSource)||(y0.inspectSource=function(n){return wz(n)});Vw.exports=y0.inspectSource});var Yw=st((Zj,Xw)=>{"use strict";var Sz=so(),Mz=Ui(),Ww=Sz.WeakMap;Xw.exports=Mz(Ww)&&/native code/.test(String(Ww))});var Mp=st((Jj,Zw)=>{"use strict";var bz=Ep(),Az=r0(),$w=bz("keys");Zw.exports=function(n){return $w[n]||($w[n]=Az(n))}});var bp=st((Kj,Jw)=>{"use strict";Jw.exports={}});var Cp=st((jj,Qw)=>{"use strict";var Tz=Yw(),jw=so(),Cz=$s(),Pz=dc(),_0=ba(),x0=xp(),Iz=Mp(),Rz=bp(),Kw="Object already initialized",E0=jw.TypeError,Lz=jw.WeakMap,Ap,Hf,Tp,Nz=function(n){return Tp(n)?Hf(n):Ap(n,{})},Oz=function(n){return function(t){var e;if(!Cz(t)||(e=Hf(t)).type!==n)throw new E0("Incompatible receiver, "+n+" required");return e}};Tz||x0.state?(Js=x0.state||(x0.state=new Lz),Js.get=Js.get,Js.has=Js.has,Js.set=Js.set,Ap=function(n,t){if(Js.has(n))throw new E0(Kw);return t.facade=n,Js.set(n,t),t},Hf=function(n){return Js.get(n)||{}},Tp=function(n){return Js.has(n)}):(El=Iz("state"),Rz[El]=!0,Ap=function(n,t){if(_0(n,El))throw new E0(Kw);return t.facade=n,Pz(n,El,t),t},Hf=function(n){return _0(n,El)?n[El]:{}},Tp=function(n){return _0(n,El)});var Js,El;Qw.exports={set:Ap,get:Hf,has:Tp,enforce:Nz,getterFor:Oz}});var rS=st((Qj,nS)=>{"use strict";var S0=yi(),Dz=mi(),Fz=Ui(),Pp=ba(),w0=Ys(),Uz=m0().CONFIGURABLE,Bz=v0(),eS=Cp(),zz=eS.enforce,Gz=eS.get,tS=String,Ip=Object.defineProperty,kz=S0("".slice),qz=S0("".replace),Hz=S0([].join),Vz=w0&&!Dz(function(){return Ip(function(){},"length",{value:8}).length!==8}),Wz=String(String).split("String"),Xz=nS.exports=function(n,t,e){kz(tS(t),0,7)==="Symbol("&&(t="["+qz(tS(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!Pp(n,"name")||Uz&&n.name!==t)&&(w0?Ip(n,"name",{value:t,configurable:!0}):n.name=t),Vz&&e&&Pp(e,"arity")&&n.length!==e.arity&&Ip(n,"length",{value:e.arity});try{e&&Pp(e,"constructor")&&e.constructor?w0&&Ip(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch(s){}var o=zz(n);return Pp(o,"source")||(o.source=Hz(Wz,typeof t=="string"?t:"")),n};Function.prototype.toString=Xz(function(){return Fz(this)&&Gz(this).source||Bz(this)},"toString")});var Vf=st((tQ,iS)=>{"use strict";var Yz=Ui(),$z=Ru(),Zz=rS(),Jz=_p();iS.exports=function(n,t,e,o){o||(o={});var s=o.enumerable,l=o.name!==void 0?o.name:t;if(Yz(e)&&Zz(e,l,o),o.global)s?n[t]=e:Jz(t,e);else{try{o.unsafe?n[t]&&(s=!0):delete n[t]}catch(p){}s?n[t]=e:$z.f(n,t,{value:e,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return n}});var sS=st((eQ,oS)=>{"use strict";var Kz=Math.ceil,jz=Math.floor;oS.exports=Math.trunc||function(t){var e=+t;return(e>0?jz:Kz)(e)}});var wl=st((nQ,aS)=>{"use strict";var Qz=sS();aS.exports=function(n){var t=+n;return t!==t||t===0?0:Qz(t)}});var lS=st((rQ,uS)=>{"use strict";var tG=wl(),eG=Math.max,nG=Math.min;uS.exports=function(n,t){var e=tG(n);return e<0?eG(e+t,0):nG(e,t)}});var M0=st((iQ,cS)=>{"use strict";var rG=wl(),iG=Math.min;cS.exports=function(n){var t=rG(n);return t>0?iG(t,9007199254740991):0}});var Wf=st((oQ,fS)=>{"use strict";var oG=M0();fS.exports=function(n){return oG(n.length)}});var dS=st((sQ,pS)=>{"use strict";var sG=cc(),aG=lS(),uG=Wf(),hS=function(n){return function(t,e,o){var s=sG(t),l=uG(s);if(l===0)return!n&&-1;var p=aG(o,l),h;if(n&&e!==e){for(;l>p;)if(h=s[p++],h!==h)return!0}else for(;l>p;p++)if((n||p in s)&&s[p]===e)return n||p||0;return!n&&-1}};pS.exports={includes:hS(!0),indexOf:hS(!1)}});var A0=st((aQ,mS)=>{"use strict";var lG=yi(),b0=ba(),cG=cc(),fG=dS().indexOf,hG=bp(),gS=lG([].push);mS.exports=function(n,t){var e=cG(n),o=0,s=[],l;for(l in e)!b0(hG,l)&&b0(e,l)&&gS(s,l);for(;t.length>o;)b0(e,l=t[o++])&&(~fG(s,l)||gS(s,l));return s}});var Rp=st((uQ,yS)=>{"use strict";yS.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var _S=st(vS=>{"use strict";var pG=A0(),dG=Rp(),gG=dG.concat("length","prototype");vS.f=Object.getOwnPropertyNames||function(t){return pG(t,gG)}});var ES=st(xS=>{"use strict";xS.f=Object.getOwnPropertySymbols});var SS=st((fQ,wS)=>{"use strict";var mG=fc(),yG=yi(),vG=_S(),_G=ES(),xG=Aa(),EG=yG([].concat);wS.exports=mG("Reflect","ownKeys")||function(t){var e=vG.f(xG(t)),o=_G.f;return o?EG(e,o(t)):e}});var AS=st((hQ,bS)=>{"use strict";var MS=ba(),wG=SS(),SG=u0(),MG=Ru();bS.exports=function(n,t,e){for(var o=wG(t),s=MG.f,l=SG.f,p=0;p<o.length;p++){var h=o[p];!MS(n,h)&&!(e&&MS(e,h))&&s(n,h,l(t,h))}}});var CS=st((pQ,TS)=>{"use strict";var bG=mi(),AG=Ui(),TG=/#|\\.prototype\\./,Xf=function(n,t){var e=PG[CG(n)];return e===RG?!0:e===IG?!1:AG(t)?bG(t):!!t},CG=Xf.normalize=function(n){return String(n).replace(TG,".").toLowerCase()},PG=Xf.data={},IG=Xf.NATIVE="N",RG=Xf.POLYFILL="P";TS.exports=Xf});var Ds=st((dQ,PS)=>{"use strict";var Lp=so(),LG=u0().f,NG=dc(),OG=Vf(),DG=_p(),FG=AS(),UG=CS();PS.exports=function(n,t){var e=n.target,o=n.global,s=n.stat,l,p,h,g,m,v;if(o?p=Lp:s?p=Lp[e]||DG(e,{}):p=Lp[e]&&Lp[e].prototype,p)for(h in t){if(m=t[h],n.dontCallGetSet?(v=LG(p,h),g=v&&v.value):g=p[h],l=UG(o?h:e+(s?".":"#")+h,n.forced),!l&&g!==void 0){if(typeof m==typeof g)continue;FG(m,g)}(n.sham||g&&g.sham)&&NG(m,"sham",!0),OG(p,h,m,n)}}});var Np=st((gQ,IS)=>{"use strict";var BG=uc();IS.exports=Array.isArray||function(t){return BG(t)==="Array"}});var LS=st((mQ,RS)=>{"use strict";var zG=Ys(),GG=Np(),kG=TypeError,qG=Object.getOwnPropertyDescriptor,HG=zG&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(n){return n instanceof TypeError}}();RS.exports=HG?function(n,t){if(GG(n)&&!qG(n,"length").writable)throw new kG("Cannot set read only .length");return n.length=t}:function(n,t){return n.length=t}});var T0=st((yQ,NS)=>{"use strict";var VG=TypeError,WG=9007199254740991;NS.exports=function(n){if(n>WG)throw VG("Maximum allowed index exceeded");return n}});var C0=st(()=>{"use strict";var XG=Ds(),YG=hc(),$G=Wf(),ZG=LS(),JG=T0(),KG=mi(),jG=KG(function(){return[].push.call({length:4294967296},1)!==4294967297}),QG=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(n){return n instanceof TypeError}},t4=jG||!QG();XG({target:"Array",proto:!0,arity:1,forced:t4},{push:function(t){var e=YG(this),o=$G(e),s=arguments.length;JG(o+s);for(var l=0;l<s;l++)e[o]=arguments[l],o++;return ZG(e,o),o}})});var DS=st((EQ,OS)=>{"use strict";OS.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}});var BS=st((wQ,US)=>{"use strict";var e4=wp(),P0=e4("span").classList,FS=P0&&P0.constructor&&P0.constructor.prototype;US.exports=FS===Object.prototype?void 0:FS});var GS=st((SQ,zS)=>{"use strict";var n4=A0(),r4=Rp();zS.exports=Object.keys||function(t){return n4(t,r4)}});var qS=st(kS=>{"use strict";var i4=Ys(),o4=l0(),s4=Ru(),a4=Aa(),u4=cc(),l4=GS();kS.f=i4&&!o4?Object.defineProperties:function(t,e){a4(t);for(var o=u4(e),s=l4(e),l=s.length,p=0,h;l>p;)s4.f(t,h=s[p++],o[h]);return t}});var VS=st((bQ,HS)=>{"use strict";var c4=fc();HS.exports=c4("document","documentElement")});var Yf=st((AQ,KS)=>{"use strict";var f4=Aa(),h4=qS(),WS=Rp(),p4=bp(),d4=VS(),g4=wp(),m4=Mp(),XS=">",YS="<",R0="prototype",L0="script",ZS=m4("IE_PROTO"),I0=function(){},JS=function(n){return YS+L0+XS+n+YS+"/"+L0+XS},$S=function(n){n.write(JS("")),n.close();var t=n.parentWindow.Object;return n=null,t},y4=function(){var n=g4("iframe"),t="java"+L0+":",e;return n.style.display="none",d4.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(JS("document.F=Object")),e.close(),e.F},Op,Dp=function(){try{Op=new ActiveXObject("htmlfile")}catch(t){}Dp=typeof document!="undefined"?document.domain&&Op?$S(Op):y4():$S(Op);for(var n=WS.length;n--;)delete Dp[R0][WS[n]];return Dp()};p4[ZS]=!0;KS.exports=Object.create||function(t,e){var o;return t!==null?(I0[R0]=f4(t),o=new I0,I0[R0]=null,o[ZS]=t):o=Dp(),e===void 0?o:h4.f(o,e)}});var D0=st((TQ,jS)=>{"use strict";var v4=Os(),_4=Yf(),x4=Ru().f,N0=v4("unscopables"),O0=Array.prototype;O0[N0]===void 0&&x4(O0,N0,{configurable:!0,value:_4(null)});jS.exports=function(n){O0[N0][n]=!0}});var Fp=st((CQ,QS)=>{"use strict";QS.exports={}});var eM=st((PQ,tM)=>{"use strict";var E4=mi();tM.exports=!E4(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})});var U0=st((IQ,rM)=>{"use strict";var w4=ba(),S4=Ui(),M4=hc(),b4=Mp(),A4=eM(),nM=b4("IE_PROTO"),F0=Object,T4=F0.prototype;rM.exports=A4?F0.getPrototypeOf:function(n){var t=M4(n);if(w4(t,nM))return t[nM];var e=t.constructor;return S4(e)&&t instanceof e?e.prototype:t instanceof F0?T4:null}});var k0=st((RQ,sM)=>{"use strict";var C4=mi(),P4=Ui(),I4=$s(),R4=Yf(),iM=U0(),L4=Vf(),N4=Os(),O4=qf(),G0=N4("iterator"),oM=!1,nu,B0,z0;[].keys&&(z0=[].keys(),"next"in z0?(B0=iM(iM(z0)),B0!==Object.prototype&&(nu=B0)):oM=!0);var D4=!I4(nu)||C4(function(){var n={};return nu[G0].call(n)!==n});D4?nu={}:O4&&(nu=R4(nu));P4(nu[G0])||L4(nu,G0,function(){return this});sM.exports={IteratorPrototype:nu,BUGGY_SAFARI_ITERATORS:oM}});var Up=st((LQ,uM)=>{"use strict";var F4=Ru().f,U4=ba(),B4=Os(),aM=B4("toStringTag");uM.exports=function(n,t,e){n&&!e&&(n=n.prototype),n&&!U4(n,aM)&&F4(n,aM,{configurable:!0,value:t})}});var cM=st((NQ,lM)=>{"use strict";var z4=k0().IteratorPrototype,G4=Yf(),k4=mp(),q4=Up(),H4=Fp(),V4=function(){return this};lM.exports=function(n,t,e,o){var s=t+" Iterator";return n.prototype=G4(z4,{next:k4(+!o,e)}),q4(n,s,!1,!0),H4[s]=V4,n}});var q0=st((OQ,fM)=>{"use strict";var W4=yi(),X4=kf();fM.exports=function(n,t,e){try{return W4(X4(Object.getOwnPropertyDescriptor(n,t)[e]))}catch(o){}}});var pM=st((DQ,hM)=>{"use strict";var Y4=$s();hM.exports=function(n){return Y4(n)||n===null}});var gM=st((FQ,dM)=>{"use strict";var $4=pM(),Z4=String,J4=TypeError;dM.exports=function(n){if($4(n))return n;throw new J4("Can't set "+Z4(n)+" as a prototype")}});var yM=st((UQ,mM)=>{"use strict";var K4=q0(),j4=$s(),Q4=lc(),tk=gM();mM.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=K4(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch(o){}return function(s,l){return Q4(s),tk(l),j4(s)&&(n?e(s,l):s.__proto__=l),s}}():void 0)});var CM=st((BQ,TM)=>{"use strict";var ek=Ds(),nk=Ns(),Bp=qf(),bM=m0(),rk=Ui(),ik=cM(),vM=U0(),_M=yM(),ok=Up(),sk=dc(),H0=Vf(),ak=Os(),xM=Fp(),AM=k0(),uk=bM.PROPER,lk=bM.CONFIGURABLE,EM=AM.IteratorPrototype,zp=AM.BUGGY_SAFARI_ITERATORS,$f=ak("iterator"),wM="keys",Zf="values",SM="entries",MM=function(){return this};TM.exports=function(n,t,e,o,s,l,p){ik(e,t,o);var h=function(w){if(w===s&&E)return E;if(!zp&&w&&w in v)return v[w];switch(w){case wM:return function(){return new e(this,w)};case Zf:return function(){return new e(this,w)};case SM:return function(){return new e(this,w)}}return function(){return new e(this)}},g=t+" Iterator",m=!1,v=n.prototype,x=v[$f]||v["@@iterator"]||s&&v[s],E=!zp&&x||h(s),b=t==="Array"&&v.entries||x,T,I,S;if(b&&(T=vM(b.call(new n)),T!==Object.prototype&&T.next&&(!Bp&&vM(T)!==EM&&(_M?_M(T,EM):rk(T[$f])||H0(T,$f,MM)),ok(T,g,!0,!0),Bp&&(xM[g]=MM))),uk&&s===Zf&&x&&x.name!==Zf&&(!Bp&&lk?sk(v,"name",Zf):(m=!0,E=function(){return nk(x,this)})),s)if(I={values:h(Zf),keys:l?E:h(wM),entries:h(SM)},p)for(S in I)(zp||m||!(S in v))&&H0(v,S,I[S]);else ek({target:t,proto:!0,forced:zp||m},I);return(!Bp||p)&&v[$f]!==E&&H0(v,$f,E,{name:s}),xM[t]=E,I}});var IM=st((zQ,PM)=>{"use strict";PM.exports=function(n,t){return{value:n,done:t}}});var FM=st((GQ,DM)=>{"use strict";var ck=cc(),V0=D0(),RM=Fp(),NM=Cp(),fk=Ru().f,hk=CM(),Gp=IM(),pk=qf(),dk=Ys(),OM="Array Iterator",gk=NM.set,mk=NM.getterFor(OM);DM.exports=hk(Array,"Array",function(n,t){gk(this,{type:OM,target:ck(n),index:0,kind:t})},function(){var n=mk(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,Gp(void 0,!0);switch(n.kind){case"keys":return Gp(e,!1);case"values":return Gp(t[e],!1)}return Gp([e,t[e]],!1)},"values");var LM=RM.Arguments=RM.Array;V0("keys");V0("values");V0("entries");if(!pk&&dk&&LM.name!=="values")try{fk(LM,"name",{value:"values"})}catch(n){}});var Y0=st(()=>{"use strict";var UM=so(),zM=DS(),yk=BS(),Jf=FM(),BM=dc(),vk=Up(),_k=Os(),W0=_k("iterator"),X0=Jf.values,GM=function(n,t){if(n){if(n[W0]!==X0)try{BM(n,W0,X0)}catch(o){n[W0]=X0}if(vk(n,t,!0),zM[t]){for(var e in Jf)if(n[e]!==Jf[e])try{BM(n,e,Jf[e])}catch(o){n[e]=Jf[e]}}}};for(kp in zM)GM(UM[kp]&&UM[kp].prototype,kp);var kp;GM(yk,"DOMTokenList")});var HM=st((HQ,qM)=>{"use strict";var xk=Os(),Ek=xk("toStringTag"),kM={};kM[Ek]="z";qM.exports=String(kM)==="[object z]"});var $0=st((VQ,VM)=>{"use strict";var wk=HM(),Sk=Ui(),qp=uc(),Mk=Os(),bk=Mk("toStringTag"),Ak=Object,Tk=qp(function(){return arguments}())==="Arguments",Ck=function(n,t){try{return n[t]}catch(e){}};VM.exports=wk?qp:function(n){var t,e,o;return n===void 0?"Undefined":n===null?"Null":typeof(e=Ck(t=Ak(n),bk))=="string"?e:Tk?qp(t):(o=qp(t))==="Object"&&Sk(t.callee)?"Arguments":o}});var Hp=st((WQ,WM)=>{"use strict";var Pk=$0(),Ik=String;WM.exports=function(n){if(Pk(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Ik(n)}});var YM=st((XQ,XM)=>{"use strict";var Rk=Aa();XM.exports=function(){var n=Rk(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t}});var ZM=st((YQ,$M)=>{"use strict";var Z0=mi(),Lk=so(),J0=Lk.RegExp,K0=Z0(function(){var n=J0("a","y");return n.lastIndex=2,n.exec("abcd")!==null}),Nk=K0||Z0(function(){return!J0("a","y").sticky}),Ok=K0||Z0(function(){var n=J0("^r","gy");return n.lastIndex=2,n.exec("str")!==null});$M.exports={BROKEN_CARET:Ok,MISSED_STICKY:Nk,UNSUPPORTED_Y:K0}});var KM=st(($Q,JM)=>{"use strict";var Dk=mi(),Fk=so(),Uk=Fk.RegExp;JM.exports=Dk(function(){var n=Uk(".","s");return!(n.dotAll&&n.test(\`
|
|
19645
|
+
`};var pu=class extends pH{constructor(t){super({type:"ArrowLineMaterial",uniforms:Object.assign({},w1.clone(cu["custom-line"].uniforms),{map:{value:null}}),vertexShader:cu["custom-line"].vertexShader,fragmentShader:cu["custom-line"].fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(e){this.uniforms.map.value=e}},color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(e){this.uniforms.repeat.value.copy(e)}},allDistance:{enumerable:!0,get:function(){return this.uniforms.allDistance.value},set:function(e){this.uniforms.allDistance.value=e}}}),this.setValues(t),this.isLineMaterial=!0}};import{LineGeometry as xH}from"three/examples/jsm/lines/LineGeometry.js";import{Line2 as EH}from"three/examples/jsm/lines/Line2.js";var T1={texture_url:ua,lineWidth:8,color:16777215},fu=class extends fH{registryEvent(){this.navigation.bmap.context.addEventListener("control-change",this.onControlChange),this.navigation.bmap.context.addEventListener("update",this.onUpdate),this.navigation.bmap.context.addEventListener("resize",this.onResize)}unRegistryEvent(){this.navigation.bmap.context.removeEventListener("control-change",this.onControlChange),this.navigation.bmap.context.removeEventListener("update",this.onUpdate),this.navigation.bmap.context.removeEventListener("resize",this.onResize)}getRepeat(){let{points:t,navigation:{bmap:{context:{camera:e,clientSize:{width:n,height:r}}}}}=this,o=t.map(a=>{let[u,l,c]=a;return O(new mH(u,l,c),e,n,r)}).map(a=>{let{x:u,y:l}=a;return[u,l]});return Tt(o)/32}changeRepeat(){if(!this.material)return;let t=this.getRepeat();this.material.repeat=new Nh(t,1)}loadTexture(t){return new Promise((e,n)=>{new dH().load(t,e,void 0,n)})}transformPoints(t){let e=[];for(let n=0;n<t.length;n++)e.push(...t[n]);return e}updatePoints(t){if(this.points=t,this.mesh){var e,n;this.remove(this.mesh),(e=this.material)==null||e.dispose(),(n=this.geometry)==null||n.dispose()}this.geometry=new xH,this.geometry.setPositions(t.flat(2)),console.log("points.flat(2)",t);let r=Tt(t.map(a=>{let[u,l]=a;return[u,l]})),o=this.material=new pu({color:new gH(this.config.color),transparent:!0,resolution:new Nh(this.navigation.bmap.context.clientSize.width,this.navigation.bmap.context.clientSize.height),depthTest:!0,depthWrite:!0,linewidth:this.config.lineWidth,map:this.texture,blending:vH,repeat:new Nh(this.getRepeat(),1),allDistance:r}),s=this.mesh=new EH(this.geometry,o);return s.computeLineDistances(),s.renderOrder=9,this.add(s),s}movePath(t){this.material&&(this.material.thresholdRatio=t)}create(t){return y(this,null,function*(){if(!this.texture){let e=this.texture=yield this.loadTexture(this.config.texture_url);e.wrapS=e.wrapT=_H}return this.updatePoints(t)})}getBoundingBox(){return this.mesh?(this.mesh.geometry.computeBoundingBox(),new yH().copy(this.mesh.geometry.boundingBox).applyMatrix4(this.mesh.matrixWorld)):null}dispose(){var t,e,n;this.unRegistryEvent(),this.clear(),(t=this.geometry)==null||t.dispose(),(e=this.material)==null||e.dispose(),(n=this.texture)==null||n.dispose(),this.navigation=null}constructor(t,e){super(),this.navigation=t,this.mesh=null,this.geometry=null,this.material=null,this.texture=null,this.config=T1,this.points=[],this.basicRepeat=1,this.prevCameraZoom=0,this.onControlChange=()=>{let n=this.navigation.bmap.context.camera.zoom;n!==this.prevCameraZoom&&(this.prevCameraZoom=n,this.changeRepeat())},this.onUpdate=()=>{this.texture},this.onResize=()=>{if(this.material){let{width:n,height:r}=this.navigation.bmap.context.clientSize;this.material.resolution.set(n,r)}},this.config=Object.assign({},T1,e),this.registryEvent(),this.prevCameraZoom=this.navigation.bmap.context.camera.zoom}};import{Tween as wH}from"@tweenjs/tween.js";import{AnimationMixer as SH,Box3 as bH,Object3D as A1,Box2 as MH,Vector3 as du,Vector2 as io}from"three";var gu=class extends A1{getBaseScale(t){let{clientSize:{width:e,height:n},camera:r}=this.bmap.context,o=new bH().setFromObject(t),{max:s,min:a}=o,u=new du(a.x,s.y,s.z),l=new du(s.x,s.y,s.z),c=new du(s.x,a.y,a.z),h=new du(a.x,a.y,a.z),p=O(u,r,e,n),d=O(l,r,e,n),g=O(h,r,e,n),v=O(c,r,e,n),E=new MH().setFromPoints([new io(p.x,p.y),new io(d.x,d.y),new io(g.x,g.y),new io(v.x,v.y)]).getSize(new io),b=this.options.size/E.x,w=this.options.size/E.y,P=Math.min(b,w),L=r.zoom;return P*L}registryEvent(){this.bmap.context.addEventListener("update",this._update),this.bmap.context.addEventListener("control-zoom-change",this._onChangeZoom)}unRegistryEvent(){this.bmap.context.removeEventListener("update",this._update),this.bmap.context.removeEventListener("control-zoom-change",this._onChangeZoom)}printGraph(t){console.group(" <"+t.type+"> "+t.name),t.children.forEach(e=>this.printGraph(e)),console.groupEnd()}setClips(t){this.clearClips(),t.length&&(this.mixer=new SH(this.model.scene),t.forEach(e=>this.mixer.clipAction(e).play()))}startClips(){var t;this.setClips(((t=this.model)==null?void 0:t.animations)||[])}clearClips(){this.mixer&&(this.mixer.stopAllAction(),this.mixer.uncacheRoot(this.mixer.getRoot()),this.mixer=null)}dispose(){this.unRegistryEvent(),this.clearClips(),this.clear(),this.model&&W(this.model.scene),this.bmap=null}constructor(t,e,n={}){super(),this.bmap=t,this.group=new A1,this.mixer=null,this.previewTime=0,this.basicScale=1,this.options={size:40},this._update=()=>{let r=Date.now();if(!this.previewTime)this.previewTime=r;else{var o;let s=r-this.previewTime;this.previewTime=r,(o=this.mixer)==null||o.update(s/1e3)}},this._onChangeZoom=r=>{let{zoom:o}=r;var s;let a=this.basicScale/o;(s=this.model)==null||s.scene.scale.set(a,a,a)},this.options=S({},this.options,n),this.add(this.group),_t.loadModel(e,!1).then(r=>{this.model=r;let o=this.getBaseScale(r.scene);this.basicScale=o;let s=this.bmap.context.camera.zoom;r.scene.scale.set(o/s,o/s,o/s),this.group.add(r.scene),this.setClips(r.animations),this.group.rotation.set(Math.PI/2,Math.PI,0),this.group.renderOrder=1e4,this.dispatchEvent({type:"loaded"})}),this.registryEvent()}};import{Vector3 as mu}from"three";import{isNil as TH}from"lodash";var C1=class extends lt{registryEvent(){this.bmap.context.addEventListener("update",this.onUpdate)}pauseAnimation(){this.tweenUtil.pause()}continueAnimation(){this.tweenUtil.continue()}clearTween(){this.tweenUtil.clear(),this.bmap.context.control.enabled=!0}unRegistryEvent(){this.bmap.context.removeEventListener("update",this.onUpdate)}clearPath(){this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose(),this.path=null,this.movedDistance=0,this.clearTween()),this.startModel&&(this.startModel.visible=!1),this.translatePath=null}addPath(t){this.paths=t;let e=t.map(n=>S({},n,{points:this.translatePoints(n.points)}));if(this.clearTween(),this.movedDistance=0,this.bmap.currentBuildGround)this.renderPath(e);else{let n=()=>{this.bmap.removeEventListener("center-change",n),this.renderPath(e)};this.bmap.addEventListener("center-change",n)}this.dispatchEvent({type:"add-path",paths:t})}translatePoints(t){let[e,n]=this.bmap.buildingCenter;return t.map(r=>[r[0]-e,r[1]-n])}renderPath(t){return y(this,null,function*(){if(!t.length)return this.clearPath();let e=[];t.forEach((n,r,o)=>{let s=this.mulFloor.floors.find(a=>a.name===n.floor);e.push(...n.points.map(a=>{let[u,l]=a;return[u,l,s.position.z+s.groundMaxHeight]}))}),this.cPath=e,this.animationPathOptions={cPathIndex:0},this.path?this.path.updatePoints(e):(this.path=new fu(this),yield this.path.create(e),this.path.position.z=.5,this.bmap.context.scene.add(this.path)),this.startModel&&(this.startModel.position.set(e[0][0],e[0][1],e[0][2]),this.startModel.visible=!0),this.dispatchEvent({type:"render-path",path:this.path})})}catmullRomCurve3(t){return us(t,!1,!0,.1,170,2.5)}getPathDirection(t,e){if(t.length<2)return null;let n=Fe(t,e),r=t[n],o=t[n+1],s=new mu(o[0]-r[0],o[1]-r[1],0).normalize(),a=new mu(0,1,0).normalize(),u=s.angleTo(a),l=new mu().crossVectors(a,s);return(Object.is(l.y,0)?-1:1)*u}startSimulation(t){return y(this,null,function*(){t===void 0&&(t=1);let{paths:e,movedDistance:n}=this;if(!e.length)return;let r=e.reduce((s,a)=>s+a.distance,0);if(!r||n>=r)return;this.simulationTween&&this.tweenUtil.remove(this.simulationTween);let o=r/t;return this.startModel.startClips(),new Promise(s=>{let a=this.simulationTween=new wH({distance:this.movedDistance},this.tweenUtil.group).to({distance:r},o*1e3).onUpdate(u=>{var l;this.movedDistance=u.distance;let c=u.distance,h=0;for(let E=0;E<e.length;E++)if(e[E].distance>=c){h=E;break}else c-=e[E].distance;let p=Sr(e[h].points,c);if(p===null)return;this.currentPathPosition=p;let d=this.translatePoints([p])[0],g=this.mulFloor.floors.find(E=>E.name===e[h].floor),v=g?g.position.z+g.groundMaxHeight:(l=this.startModel)==null?void 0:l.position.z;this.startModel&&this.startModel.position.set(d[0],d[1],v);let _=this.getPathDirection(e[h].points,p);TH(_)||this.startModel.setRotationFromAxisAngle(new mu(0,0,1),_)}).onComplete(()=>{this.tweenUtil.remove(a),this.startModel.clearClips(),s(!0)}).start()})})}setStartPoiRotate(t){if(this.startPoi){let n=(this.bmap.context.control.getAzimuthalAngle()*180/Math.PI+360)%360;this.startPoi.options.icon_rotate=(360-t-n)%360}}dispose(){this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose()),this.startModel&&(this.bmap.context.scene.remove(this.startModel),this.startModel.dispose()),this.tweenUtil.dispose(),this.unRegistryEvent(),super.dispose()}constructor(t,e,n={}){super(t),this.mulFloor=e,this.path=null,this.fetchRoadStatus=!1,this.paths=[],this.curFloorPath=null,this.translatePath=null,this.currentPathPosition=null,this.pathTween=null,this.startPoi=null,this.movedDistance=0,this.tweenUtil=new Tn,this.animationPathOptions={cPathIndex:0},this.cPath=[],this.onUpdate=()=>{this.tweenUtil.update()},this.startModel=new gu(t,u3,n.startModel),this.startModel.visible=!1,this.bmap.context.scene.add(this.startModel),this.registryEvent()}};var rst=f(hs(),1),ist=f(ps(),1);import{Raycaster as AH,Vector2 as CH}from"three";var R1=class extends lt{registryEvent(){this.clickHelper.addEventListener("click",this._click)}unRegistryEvent(){this.clickHelper.removeEventListener("click",this._click)}dispose(){this.unRegistryEvent(),this.clickHelper.dispose(),this.mulFloors=null,super.dispose()}constructor(t,e){super(t),this.mulFloors=e,this._click=n=>{let{e:r}=n;if(!this.mulFloors.showStatus)return;let o=new CH,{offsetX:s,offsetY:a}=r,u=this.mulFloors.poiLayer.getPoiByDeviceXy(s,a),{clientSize:l}=this.bmap.context;o.x=s/l.width*2-1,o.y=a/l.height*-2+1;let c=new AH;c.setFromCamera(o,this.bmap.context.camera),c.ray.origin.sub(c.ray.direction.clone().multiplyScalar(1e4));let h=this.mulFloors.floors.map(p=>p.graphicLayer.getGraphicByRaycaster(c).graphics).flat();this.dispatchEvent({type:"select",pois:u,graphics:h})},this.clickHelper=new gs(this.bmap.context.container),this.registryEvent()}};var bst=f(P1(),1),Mst=f(I1(),1),wst=f(F(),1);var fst=f(A(),1),dst=f(F(),1),gst=f(jn(),1);import{Vector2 as oo}from"three";function DH(i){let t=i.length,e=0,n=0,r=0,o=0;i.forEach(u=>{e+=u[0],n+=u[1],r+=u[0]*u[1],o+=u[0]*u[0]});let s=(t*r-e*n)/(t*o-e*e),a=(n-s*e)/t;return{m:s,b:a}}function UH(i,t,e){let n=e[0][0],r=e.slice(-1)[0][0],o=i*n+t,s=i*r+t;return{start:[n,o],end:[r,s]}}function vu(i){if(i.length<2)return null;let t=i.filter((u,l)=>{let c=[...i];return c.splice(l,1),c.every(h=>h[0]!==u[0]&&h[1]!==u[1])});if(t.length<2)return null;let{m:e,b:n}=DH(t),{start:r,end:o}=UH(e,n,t),a=360-(new oo().subVectors(new oo(o[0],o[1]),new oo(r[0],r[1])).angle()/Math.PI*180-90+360)%360;return Number.isNaN(a)?null:a}function _st(i){let t=[];for(let e=1;e<i.length;e++){let n=i[e-1],r=i[e],o=r.position[0]-n.position[0],s=r.position[1]-n.position[1],a=Math.sqrt(o**2+s**2),u=r.time-n.time;if(u>0){let l=a/u;console.log("speedDelta",n.type,r.type,Oh(l),a,u),t.push(l)}else t.push(0)}return t}function yst(i,t){let e=i[0],n=i.slice(-1)[0],r=X(n.position,e.position),o=n.time-e.time;return o<100||r<3?null:r/o}function Oh(i){return i*60*60}function so(i,t,e,n){let r=(e+90)%360*(Math.PI/180),o=t*n,s=new oo(i[0],i[1]),a=Math.cos(r),u=Math.sin(r),l=new oo(a,u);return s.add(l.normalize().multiplyScalar(o)),[s.x,s.y]}function xst(i){let t=[...i].sort((l,c)=>l-c),e=L1(t,25),n=L1(t,75),r=n-e,o=e-1.5*r,s=n+1.5*r,a=t.filter(l=>l>=o&&l<=s);return i.filter(l=>a.includes(l))}function L1(i,t){let e=t/100*(i.length-1),n=Math.floor(e),r=Math.ceil(e);if(n===r)return i[n];let o=e-n;return i[n]*(1-o)+i[r]*o}import{isNil as _u}from"lodash";var yu=class extends st{setPathAngle(t){this.pathAngle=t,this.dispatchEvent({type:"change-compass",value:this.pathAngle}),_u(this.angle)&&(this.angle=t)}changeSpeed(){let t=this.history.filter(u=>["vision"].includes(u.type));if(t.length<2){this.speedFilter.filter(0),this.speed=0;return}let e=t[0],n=t.slice(-1)[0],r=X(n.position,e.position),o=n.time-e.time,s=o>0?r/o:0,a=this.speedFilter.filter(s);this.speed=a}changeAngle(t){t===void 0&&(t=this.visionHistory),t.length<2&&(this.angle=null);let e=vu(t.map(n=>n.position));e!==null&&this.setAngle(e)}setAngle(t,e){e===void 0&&(e=!0),this.angle=t,e&&this.dispatchEvent({type:"change-position-compass",value:t})}setPosition(t,e,n){let r={position:t,time:e,clientTime:Date.now()-n,type:"vision"};if(this._setVisionHistoryForAngle(r),_u(this.angle)||!this.speed){this.addHistory(r);return}let o=this.history.findLastIndex(a=>a.type==="vision"),s=this.history[o];if(s){if(s.time>e)return;let a=vu([this.history.slice(-1)[0].position,t]);if(a&&Math.abs(a-this.angle)<60){this.addHistory(r);return}let u=so(t,this.speed,360-this.pathAngle,n);X(u,this.history.slice(-1)[0].position)>5?this.visionExcessesCount++:this.visionExcessesCount=0,this.visionExcessesCount>3&&(console.warn("\u8FDE\u7EED\u4E09\u6B21\u89C6\u89C9\u548Cpdr\u5DEE\u8DDD\u5927\u4E8E5\u7C73\uFF0C\u4F7F\u7528\u89C6\u89C9\u6821\u51C6"),this.addHistory(r),this.visionExcessesCount=0)}}resetPdrPosition(){let t=this.history.findLast(e=>e.type==="vision");if(t&&this.speed){let e=so(t.position,this.speed,360-this.pathAngle,Date.now()-t.clientTime);e&&this.history.push({position:e,time:Date.now(),clientTime:Date.now(),type:"pdr"})}}getLastVisionPdrPos(){let t=this.history.findLastIndex(n=>n.type==="vision");if(t!==-1){var e;return(e=this.history[t+1])!=null?e:this.history[t]}return null}_setVisionHistoryForAngle(t){if(!this.visionHistory.length){this.visionHistory.push(t);return}let e=vu([this.visionHistory.slice(-1)[0].position,t.position]);if(e!==null&&(this.angle&&Math.abs(this.angle-e)>60?this.angleExcessesCount++:(this.angleExcessesCount=0,this.visionHistory.push(t))),this.angleExcessesCount>3)console.warn("\u8FDE\u7EED\u4E09\u6B21\u89D2\u5EA6\u6BD4\u8F83\u6B6A\uFF0C\u91CD\u65B0\u77EB\u6B63"),this.visionHistory=[t],this.angleExcessesCount=0;else{let n=X(this.visionHistory[0].position,this.visionHistory.slice(-1)[0].position);for(;n>5&&this.visionHistory.length>15;)this.visionHistory.shift(),n=X(this.visionHistory[0].position,this.visionHistory.slice(-1)[0].position)}this.changeAngle()}addHistory(t){this.history.push(t);let e=this.history.filter(a=>a.type==="vision"),n=e.length?Date.now()-e.slice(-1)[0].clientTime:0,r=X(this.history[0].position,this.history.slice(-1)[0].position),o=n>5e3?10:3,s=n>5e3?0:5;for(n>5e3&&console.warn("\u89C6\u89C9\u7ED3\u679C\u8D85\u51FA5s\u4E0D\u53EF\u7528\uFF0C\u5168\u90E8\u6E05\u7A7A");e.length>s&&r>o;)this.history.shift(),e=this.history.filter(a=>a.type==="vision"),r=X(this.history[0].position,this.history.slice(-1)[0].position);s===0?this.changeSpeed():t.type==="vision"&&this.changeSpeed(),this.changePosition(t.type)}setBeaconPosition(t,e,n){let r=Date.now()-n,o={position:t,time:e,clientTime:r,type:"beacon"},s=this.history.findLastIndex(c=>c.type!=="pdr"),a=this.history[s];if(!a){this.addHistory(o);return}if(_u(this.pathAngle)||!this.speed){this.addHistory(o);return}if(a&&a.time>e)return;let u=so(t,this.speed,360-this.pathAngle,n);X(u,this.history.slice(-1)[0].position)>5?this.beaconExcessesCount++:this.beaconExcessesCount=0,this.beaconExcessesCount>3&&(console.warn("\u8FDE\u7EED\u4E09\u6B21beacon\u548Cpdr\u5DEE\u8DDD\u5927\u4E8E5\u7C73\uFF0C\u4F7F\u7528beacon\u6821\u51C6"),this.addHistory(o),this.beaconExcessesCount=0)}startPositionTimer(){this.positionTimer&&this.timer.clearInterval(this.positionTimer),this.positionTimer=this.timer.setInterval(()=>{this.changePosition()},20)}stopPositionTimer(){this.positionTimer&&(this.timer.clearInterval(this.positionTimer),this.positionTimer=null)}changePosition(t){t===void 0&&(t="pdr");let e=this.getPosition(t);e.success&&(this.history.push({position:e.pos,time:Date.now(),clientTime:Date.now(),type:"pdr"}),this.speed?this.dispatchEvent({type:"change-pos",value:S({},e)}):this.dispatchEvent({type:"change-pos",value:e}))}getPosition(t){if(this.history.length===0)return{success:!1,pos:[0,0],compass:null,speed:0};let e=this.history.slice(-1)[0];if(this.history.length<2)return{success:!0,pos:e.position,compass:this.pathAngle,speed:this.speed};if(_u(this.pathAngle)||!this.speed)return{success:!0,pos:e.position,compass:this.pathAngle,speed:this.speed};let n=e.clientTime,r=Date.now()-n;return{success:!0,pos:this.pathAngle?so(e.position,this.speed,360-this.pathAngle,r):e.position,compass:this.pathAngle,speed:Oh(this.speed)}}dispose(){this.timer.dispose()}constructor(){super(),this.history=[],this.visionHistory=[],this.speed=0,this.angle=null,this.timer=new Q,this.positionTimer=null,this.speedFilter=new vs,this.visionExcessesCount=0,this.beaconExcessesCount=0,this.angleExcessesCount=0,this.pathAngle=0,this.startPositionTimer()}};var Nst=f(Hn(),1);function Dh(){let i=new Blob([`var PU=Object.create;var EE=Object.defineProperty;var IU=Object.getOwnPropertyDescriptor;var RU=Object.getOwnPropertyNames;var LU=Object.getPrototypeOf,NU=Object.prototype.hasOwnProperty;var st=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var OU=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of RU(t))!NU.call(n,s)&&s!==e&&EE(n,s,{get:()=>t[s],enumerable:!(o=IU(t,s))||o.enumerable});return n};var sn=(n,t,e)=>(e=n!=null?PU(LU(n)):{},OU(t||!n||!n.__esModule?EE(e,"default",{value:n,enumerable:!0}):e,n));var ac=(n,t,e)=>new Promise((o,s)=>{var l=g=>{try{h(e.next(g))}catch(m){s(m)}},p=g=>{try{h(e.throw(g))}catch(m){s(m)}},h=g=>g.done?o(g.value):Promise.resolve(g.value).then(l,p);h((e=e.apply(n,t)).next())});var so=st((Vm,wE)=>{"use strict";var zf=function(n){return n&&n.Math===Math&&n};wE.exports=zf(typeof globalThis=="object"&&globalThis)||zf(typeof window=="object"&&window)||zf(typeof self=="object"&&self)||zf(typeof global=="object"&&global)||zf(typeof Vm=="object"&&Vm)||function(){return this}()||Function("return this")()});var mi=st((oj,SE)=>{"use strict";SE.exports=function(n){try{return!!n()}catch(t){return!0}}});var Ys=st((sj,ME)=>{"use strict";var DU=mi();ME.exports=!DU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Gf=st((aj,bE)=>{"use strict";var FU=mi();bE.exports=!FU(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})});var Ns=st((uj,AE)=>{"use strict";var UU=Gf(),gp=Function.prototype.call;AE.exports=UU?gp.bind(gp):function(){return gp.apply(gp,arguments)}});var IE=st(PE=>{"use strict";var TE={}.propertyIsEnumerable,CE=Object.getOwnPropertyDescriptor,BU=CE&&!TE.call({1:2},1);PE.f=BU?function(t){var e=CE(this,t);return!!e&&e.enumerable}:TE});var mp=st((cj,RE)=>{"use strict";RE.exports=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}}});var yi=st((fj,OE)=>{"use strict";var LE=Gf(),NE=Function.prototype,Wm=NE.call,zU=LE&&NE.bind.bind(Wm,Wm);OE.exports=LE?zU:function(n){return function(){return Wm.apply(n,arguments)}}});var uc=st((hj,FE)=>{"use strict";var DE=yi(),GU=DE({}.toString),kU=DE("".slice);FE.exports=function(n){return kU(GU(n),8,-1)}});var BE=st((pj,UE)=>{"use strict";var qU=yi(),HU=mi(),VU=uc(),Xm=Object,WU=qU("".split);UE.exports=HU(function(){return!Xm("z").propertyIsEnumerable(0)})?function(n){return VU(n)==="String"?WU(n,""):Xm(n)}:Xm});var Ym=st((dj,zE)=>{"use strict";zE.exports=function(n){return n==null}});var lc=st((gj,GE)=>{"use strict";var XU=Ym(),YU=TypeError;GE.exports=function(n){if(XU(n))throw new YU("Can't call method on "+n);return n}});var cc=st((mj,kE)=>{"use strict";var $U=BE(),ZU=lc();kE.exports=function(n){return $U(ZU(n))}});var Ui=st((yj,qE)=>{"use strict";var $m=typeof document=="object"&&document.all;qE.exports=typeof $m=="undefined"&&$m!==void 0?function(n){return typeof n=="function"||n===$m}:function(n){return typeof n=="function"}});var $s=st((vj,HE)=>{"use strict";var JU=Ui();HE.exports=function(n){return typeof n=="object"?n!==null:JU(n)}});var fc=st((_j,VE)=>{"use strict";var Zm=so(),KU=Ui(),jU=function(n){return KU(n)?n:void 0};VE.exports=function(n,t){return arguments.length<2?jU(Zm[n]):Zm[n]&&Zm[n][t]}});var XE=st((xj,WE)=>{"use strict";var QU=yi();WE.exports=QU({}.isPrototypeOf)});var JE=st((Ej,ZE)=>{"use strict";var tB=so(),YE=tB.navigator,$E=YE&&YE.userAgent;ZE.exports=$E?String($E):""});var rw=st((wj,nw)=>{"use strict";var ew=so(),Jm=JE(),KE=ew.process,jE=ew.Deno,QE=KE&&KE.versions||jE&&jE.version,tw=QE&&QE.v8,Zs,yp;tw&&(Zs=tw.split("."),yp=Zs[0]>0&&Zs[0]<4?1:+(Zs[0]+Zs[1]));!yp&&Jm&&(Zs=Jm.match(/Edge\\/(\\d+)/),(!Zs||Zs[1]>=74)&&(Zs=Jm.match(/Chrome\\/(\\d+)/),Zs&&(yp=+Zs[1])));nw.exports=yp});var Km=st((Sj,ow)=>{"use strict";var iw=rw(),eB=mi(),nB=so(),rB=nB.String;ow.exports=!!Object.getOwnPropertySymbols&&!eB(function(){var n=Symbol("symbol detection");return!rB(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&iw&&iw<41})});var jm=st((Mj,sw)=>{"use strict";var iB=Km();sw.exports=iB&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Qm=st((bj,aw)=>{"use strict";var oB=fc(),sB=Ui(),aB=XE(),uB=jm(),lB=Object;aw.exports=uB?function(n){return typeof n=="symbol"}:function(n){var t=oB("Symbol");return sB(t)&&aB(t.prototype,lB(n))}});var lw=st((Aj,uw)=>{"use strict";var cB=String;uw.exports=function(n){try{return cB(n)}catch(t){return"Object"}}});var kf=st((Tj,cw)=>{"use strict";var fB=Ui(),hB=lw(),pB=TypeError;cw.exports=function(n){if(fB(n))return n;throw new pB(hB(n)+" is not a function")}});var vp=st((Cj,fw)=>{"use strict";var dB=kf(),gB=Ym();fw.exports=function(n,t){var e=n[t];return gB(e)?void 0:dB(e)}});var pw=st((Pj,hw)=>{"use strict";var t0=Ns(),e0=Ui(),n0=$s(),mB=TypeError;hw.exports=function(n,t){var e,o;if(t==="string"&&e0(e=n.toString)&&!n0(o=t0(e,n))||e0(e=n.valueOf)&&!n0(o=t0(e,n))||t!=="string"&&e0(e=n.toString)&&!n0(o=t0(e,n)))return o;throw new mB("Can't convert object to primitive value")}});var qf=st((Ij,dw)=>{"use strict";dw.exports=!1});var _p=st((Rj,mw)=>{"use strict";var gw=so(),yB=Object.defineProperty;mw.exports=function(n,t){try{yB(gw,n,{value:t,configurable:!0,writable:!0})}catch(e){gw[n]=t}return t}});var xp=st((Lj,_w)=>{"use strict";var vB=qf(),_B=so(),xB=_p(),yw="__core-js_shared__",vw=_w.exports=_B[yw]||xB(yw,{});(vw.versions||(vw.versions=[])).push({version:"3.42.0",mode:vB?"pure":"global",copyright:"\\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Ep=st((Nj,Ew)=>{"use strict";var xw=xp();Ew.exports=function(n,t){return xw[n]||(xw[n]=t||{})}});var hc=st((Oj,ww)=>{"use strict";var EB=lc(),wB=Object;ww.exports=function(n){return wB(EB(n))}});var ba=st((Dj,Sw)=>{"use strict";var SB=yi(),MB=hc(),bB=SB({}.hasOwnProperty);Sw.exports=Object.hasOwn||function(t,e){return bB(MB(t),e)}});var r0=st((Fj,Mw)=>{"use strict";var AB=yi(),TB=0,CB=Math.random(),PB=AB(1 .toString);Mw.exports=function(n){return"Symbol("+(n===void 0?"":n)+")_"+PB(++TB+CB,36)}});var Os=st((Uj,Aw)=>{"use strict";var IB=so(),RB=Ep(),bw=ba(),LB=r0(),NB=Km(),OB=jm(),pc=IB.Symbol,i0=RB("wks"),DB=OB?pc.for||pc:pc&&pc.withoutSetter||LB;Aw.exports=function(n){return bw(i0,n)||(i0[n]=NB&&bw(pc,n)?pc[n]:DB("Symbol."+n)),i0[n]}});var Iw=st((Bj,Pw)=>{"use strict";var FB=Ns(),Tw=$s(),Cw=Qm(),UB=vp(),BB=pw(),zB=Os(),GB=TypeError,kB=zB("toPrimitive");Pw.exports=function(n,t){if(!Tw(n)||Cw(n))return n;var e=UB(n,kB),o;if(e){if(t===void 0&&(t="default"),o=FB(e,n,t),!Tw(o)||Cw(o))return o;throw new GB("Can't convert object to primitive value")}return t===void 0&&(t="number"),BB(n,t)}});var o0=st((zj,Rw)=>{"use strict";var qB=Iw(),HB=Qm();Rw.exports=function(n){var t=qB(n,"string");return HB(t)?t:t+""}});var wp=st((Gj,Nw)=>{"use strict";var VB=so(),Lw=$s(),s0=VB.document,WB=Lw(s0)&&Lw(s0.createElement);Nw.exports=function(n){return WB?s0.createElement(n):{}}});var a0=st((kj,Ow)=>{"use strict";var XB=Ys(),YB=mi(),$B=wp();Ow.exports=!XB&&!YB(function(){return Object.defineProperty($B("div"),"a",{get:function(){return 7}}).a!==7})});var u0=st(Fw=>{"use strict";var ZB=Ys(),JB=Ns(),KB=IE(),jB=mp(),QB=cc(),tz=o0(),ez=ba(),nz=a0(),Dw=Object.getOwnPropertyDescriptor;Fw.f=ZB?Dw:function(t,e){if(t=QB(t),e=tz(e),nz)try{return Dw(t,e)}catch(o){}if(ez(t,e))return jB(!JB(KB.f,t,e),t[e])}});var l0=st((Hj,Uw)=>{"use strict";var rz=Ys(),iz=mi();Uw.exports=rz&&iz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Aa=st((Vj,Bw)=>{"use strict";var oz=$s(),sz=String,az=TypeError;Bw.exports=function(n){if(oz(n))return n;throw new az(sz(n)+" is not an object")}});var Ru=st(Gw=>{"use strict";var uz=Ys(),lz=a0(),cz=l0(),Sp=Aa(),zw=o0(),fz=TypeError,c0=Object.defineProperty,hz=Object.getOwnPropertyDescriptor,f0="enumerable",h0="configurable",p0="writable";Gw.f=uz?cz?function(t,e,o){if(Sp(t),e=zw(e),Sp(o),typeof t=="function"&&e==="prototype"&&"value"in o&&p0 in o&&!o[p0]){var s=hz(t,e);s&&s[p0]&&(t[e]=o.value,o={configurable:h0 in o?o[h0]:s[h0],enumerable:f0 in o?o[f0]:s[f0],writable:!1})}return c0(t,e,o)}:c0:function(t,e,o){if(Sp(t),e=zw(e),Sp(o),lz)try{return c0(t,e,o)}catch(s){}if("get"in o||"set"in o)throw new fz("Accessors not supported");return"value"in o&&(t[e]=o.value),t}});var dc=st((Xj,kw)=>{"use strict";var pz=Ys(),dz=Ru(),gz=mp();kw.exports=pz?function(n,t,e){return dz.f(n,t,gz(1,e))}:function(n,t,e){return n[t]=e,n}});var m0=st((Yj,Hw)=>{"use strict";var d0=Ys(),mz=ba(),qw=Function.prototype,yz=d0&&Object.getOwnPropertyDescriptor,g0=mz(qw,"name"),vz=g0&&function(){}.name==="something",_z=g0&&(!d0||d0&&yz(qw,"name").configurable);Hw.exports={EXISTS:g0,PROPER:vz,CONFIGURABLE:_z}});var v0=st(($j,Vw)=>{"use strict";var xz=yi(),Ez=Ui(),y0=xp(),wz=xz(Function.toString);Ez(y0.inspectSource)||(y0.inspectSource=function(n){return wz(n)});Vw.exports=y0.inspectSource});var Yw=st((Zj,Xw)=>{"use strict";var Sz=so(),Mz=Ui(),Ww=Sz.WeakMap;Xw.exports=Mz(Ww)&&/native code/.test(String(Ww))});var Mp=st((Jj,Zw)=>{"use strict";var bz=Ep(),Az=r0(),$w=bz("keys");Zw.exports=function(n){return $w[n]||($w[n]=Az(n))}});var bp=st((Kj,Jw)=>{"use strict";Jw.exports={}});var Cp=st((jj,Qw)=>{"use strict";var Tz=Yw(),jw=so(),Cz=$s(),Pz=dc(),_0=ba(),x0=xp(),Iz=Mp(),Rz=bp(),Kw="Object already initialized",E0=jw.TypeError,Lz=jw.WeakMap,Ap,Hf,Tp,Nz=function(n){return Tp(n)?Hf(n):Ap(n,{})},Oz=function(n){return function(t){var e;if(!Cz(t)||(e=Hf(t)).type!==n)throw new E0("Incompatible receiver, "+n+" required");return e}};Tz||x0.state?(Js=x0.state||(x0.state=new Lz),Js.get=Js.get,Js.has=Js.has,Js.set=Js.set,Ap=function(n,t){if(Js.has(n))throw new E0(Kw);return t.facade=n,Js.set(n,t),t},Hf=function(n){return Js.get(n)||{}},Tp=function(n){return Js.has(n)}):(El=Iz("state"),Rz[El]=!0,Ap=function(n,t){if(_0(n,El))throw new E0(Kw);return t.facade=n,Pz(n,El,t),t},Hf=function(n){return _0(n,El)?n[El]:{}},Tp=function(n){return _0(n,El)});var Js,El;Qw.exports={set:Ap,get:Hf,has:Tp,enforce:Nz,getterFor:Oz}});var rS=st((Qj,nS)=>{"use strict";var S0=yi(),Dz=mi(),Fz=Ui(),Pp=ba(),w0=Ys(),Uz=m0().CONFIGURABLE,Bz=v0(),eS=Cp(),zz=eS.enforce,Gz=eS.get,tS=String,Ip=Object.defineProperty,kz=S0("".slice),qz=S0("".replace),Hz=S0([].join),Vz=w0&&!Dz(function(){return Ip(function(){},"length",{value:8}).length!==8}),Wz=String(String).split("String"),Xz=nS.exports=function(n,t,e){kz(tS(t),0,7)==="Symbol("&&(t="["+qz(tS(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!Pp(n,"name")||Uz&&n.name!==t)&&(w0?Ip(n,"name",{value:t,configurable:!0}):n.name=t),Vz&&e&&Pp(e,"arity")&&n.length!==e.arity&&Ip(n,"length",{value:e.arity});try{e&&Pp(e,"constructor")&&e.constructor?w0&&Ip(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch(s){}var o=zz(n);return Pp(o,"source")||(o.source=Hz(Wz,typeof t=="string"?t:"")),n};Function.prototype.toString=Xz(function(){return Fz(this)&&Gz(this).source||Bz(this)},"toString")});var Vf=st((tQ,iS)=>{"use strict";var Yz=Ui(),$z=Ru(),Zz=rS(),Jz=_p();iS.exports=function(n,t,e,o){o||(o={});var s=o.enumerable,l=o.name!==void 0?o.name:t;if(Yz(e)&&Zz(e,l,o),o.global)s?n[t]=e:Jz(t,e);else{try{o.unsafe?n[t]&&(s=!0):delete n[t]}catch(p){}s?n[t]=e:$z.f(n,t,{value:e,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return n}});var sS=st((eQ,oS)=>{"use strict";var Kz=Math.ceil,jz=Math.floor;oS.exports=Math.trunc||function(t){var e=+t;return(e>0?jz:Kz)(e)}});var wl=st((nQ,aS)=>{"use strict";var Qz=sS();aS.exports=function(n){var t=+n;return t!==t||t===0?0:Qz(t)}});var lS=st((rQ,uS)=>{"use strict";var tG=wl(),eG=Math.max,nG=Math.min;uS.exports=function(n,t){var e=tG(n);return e<0?eG(e+t,0):nG(e,t)}});var M0=st((iQ,cS)=>{"use strict";var rG=wl(),iG=Math.min;cS.exports=function(n){var t=rG(n);return t>0?iG(t,9007199254740991):0}});var Wf=st((oQ,fS)=>{"use strict";var oG=M0();fS.exports=function(n){return oG(n.length)}});var dS=st((sQ,pS)=>{"use strict";var sG=cc(),aG=lS(),uG=Wf(),hS=function(n){return function(t,e,o){var s=sG(t),l=uG(s);if(l===0)return!n&&-1;var p=aG(o,l),h;if(n&&e!==e){for(;l>p;)if(h=s[p++],h!==h)return!0}else for(;l>p;p++)if((n||p in s)&&s[p]===e)return n||p||0;return!n&&-1}};pS.exports={includes:hS(!0),indexOf:hS(!1)}});var A0=st((aQ,mS)=>{"use strict";var lG=yi(),b0=ba(),cG=cc(),fG=dS().indexOf,hG=bp(),gS=lG([].push);mS.exports=function(n,t){var e=cG(n),o=0,s=[],l;for(l in e)!b0(hG,l)&&b0(e,l)&&gS(s,l);for(;t.length>o;)b0(e,l=t[o++])&&(~fG(s,l)||gS(s,l));return s}});var Rp=st((uQ,yS)=>{"use strict";yS.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var _S=st(vS=>{"use strict";var pG=A0(),dG=Rp(),gG=dG.concat("length","prototype");vS.f=Object.getOwnPropertyNames||function(t){return pG(t,gG)}});var ES=st(xS=>{"use strict";xS.f=Object.getOwnPropertySymbols});var SS=st((fQ,wS)=>{"use strict";var mG=fc(),yG=yi(),vG=_S(),_G=ES(),xG=Aa(),EG=yG([].concat);wS.exports=mG("Reflect","ownKeys")||function(t){var e=vG.f(xG(t)),o=_G.f;return o?EG(e,o(t)):e}});var AS=st((hQ,bS)=>{"use strict";var MS=ba(),wG=SS(),SG=u0(),MG=Ru();bS.exports=function(n,t,e){for(var o=wG(t),s=MG.f,l=SG.f,p=0;p<o.length;p++){var h=o[p];!MS(n,h)&&!(e&&MS(e,h))&&s(n,h,l(t,h))}}});var CS=st((pQ,TS)=>{"use strict";var bG=mi(),AG=Ui(),TG=/#|\\.prototype\\./,Xf=function(n,t){var e=PG[CG(n)];return e===RG?!0:e===IG?!1:AG(t)?bG(t):!!t},CG=Xf.normalize=function(n){return String(n).replace(TG,".").toLowerCase()},PG=Xf.data={},IG=Xf.NATIVE="N",RG=Xf.POLYFILL="P";TS.exports=Xf});var Ds=st((dQ,PS)=>{"use strict";var Lp=so(),LG=u0().f,NG=dc(),OG=Vf(),DG=_p(),FG=AS(),UG=CS();PS.exports=function(n,t){var e=n.target,o=n.global,s=n.stat,l,p,h,g,m,v;if(o?p=Lp:s?p=Lp[e]||DG(e,{}):p=Lp[e]&&Lp[e].prototype,p)for(h in t){if(m=t[h],n.dontCallGetSet?(v=LG(p,h),g=v&&v.value):g=p[h],l=UG(o?h:e+(s?".":"#")+h,n.forced),!l&&g!==void 0){if(typeof m==typeof g)continue;FG(m,g)}(n.sham||g&&g.sham)&&NG(m,"sham",!0),OG(p,h,m,n)}}});var Np=st((gQ,IS)=>{"use strict";var BG=uc();IS.exports=Array.isArray||function(t){return BG(t)==="Array"}});var LS=st((mQ,RS)=>{"use strict";var zG=Ys(),GG=Np(),kG=TypeError,qG=Object.getOwnPropertyDescriptor,HG=zG&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(n){return n instanceof TypeError}}();RS.exports=HG?function(n,t){if(GG(n)&&!qG(n,"length").writable)throw new kG("Cannot set read only .length");return n.length=t}:function(n,t){return n.length=t}});var T0=st((yQ,NS)=>{"use strict";var VG=TypeError,WG=9007199254740991;NS.exports=function(n){if(n>WG)throw VG("Maximum allowed index exceeded");return n}});var C0=st(()=>{"use strict";var XG=Ds(),YG=hc(),$G=Wf(),ZG=LS(),JG=T0(),KG=mi(),jG=KG(function(){return[].push.call({length:4294967296},1)!==4294967297}),QG=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(n){return n instanceof TypeError}},t4=jG||!QG();XG({target:"Array",proto:!0,arity:1,forced:t4},{push:function(t){var e=YG(this),o=$G(e),s=arguments.length;JG(o+s);for(var l=0;l<s;l++)e[o]=arguments[l],o++;return ZG(e,o),o}})});var DS=st((EQ,OS)=>{"use strict";OS.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}});var BS=st((wQ,US)=>{"use strict";var e4=wp(),P0=e4("span").classList,FS=P0&&P0.constructor&&P0.constructor.prototype;US.exports=FS===Object.prototype?void 0:FS});var GS=st((SQ,zS)=>{"use strict";var n4=A0(),r4=Rp();zS.exports=Object.keys||function(t){return n4(t,r4)}});var qS=st(kS=>{"use strict";var i4=Ys(),o4=l0(),s4=Ru(),a4=Aa(),u4=cc(),l4=GS();kS.f=i4&&!o4?Object.defineProperties:function(t,e){a4(t);for(var o=u4(e),s=l4(e),l=s.length,p=0,h;l>p;)s4.f(t,h=s[p++],o[h]);return t}});var VS=st((bQ,HS)=>{"use strict";var c4=fc();HS.exports=c4("document","documentElement")});var Yf=st((AQ,KS)=>{"use strict";var f4=Aa(),h4=qS(),WS=Rp(),p4=bp(),d4=VS(),g4=wp(),m4=Mp(),XS=">",YS="<",R0="prototype",L0="script",ZS=m4("IE_PROTO"),I0=function(){},JS=function(n){return YS+L0+XS+n+YS+"/"+L0+XS},$S=function(n){n.write(JS("")),n.close();var t=n.parentWindow.Object;return n=null,t},y4=function(){var n=g4("iframe"),t="java"+L0+":",e;return n.style.display="none",d4.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(JS("document.F=Object")),e.close(),e.F},Op,Dp=function(){try{Op=new ActiveXObject("htmlfile")}catch(t){}Dp=typeof document!="undefined"?document.domain&&Op?$S(Op):y4():$S(Op);for(var n=WS.length;n--;)delete Dp[R0][WS[n]];return Dp()};p4[ZS]=!0;KS.exports=Object.create||function(t,e){var o;return t!==null?(I0[R0]=f4(t),o=new I0,I0[R0]=null,o[ZS]=t):o=Dp(),e===void 0?o:h4.f(o,e)}});var D0=st((TQ,jS)=>{"use strict";var v4=Os(),_4=Yf(),x4=Ru().f,N0=v4("unscopables"),O0=Array.prototype;O0[N0]===void 0&&x4(O0,N0,{configurable:!0,value:_4(null)});jS.exports=function(n){O0[N0][n]=!0}});var Fp=st((CQ,QS)=>{"use strict";QS.exports={}});var eM=st((PQ,tM)=>{"use strict";var E4=mi();tM.exports=!E4(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})});var U0=st((IQ,rM)=>{"use strict";var w4=ba(),S4=Ui(),M4=hc(),b4=Mp(),A4=eM(),nM=b4("IE_PROTO"),F0=Object,T4=F0.prototype;rM.exports=A4?F0.getPrototypeOf:function(n){var t=M4(n);if(w4(t,nM))return t[nM];var e=t.constructor;return S4(e)&&t instanceof e?e.prototype:t instanceof F0?T4:null}});var k0=st((RQ,sM)=>{"use strict";var C4=mi(),P4=Ui(),I4=$s(),R4=Yf(),iM=U0(),L4=Vf(),N4=Os(),O4=qf(),G0=N4("iterator"),oM=!1,nu,B0,z0;[].keys&&(z0=[].keys(),"next"in z0?(B0=iM(iM(z0)),B0!==Object.prototype&&(nu=B0)):oM=!0);var D4=!I4(nu)||C4(function(){var n={};return nu[G0].call(n)!==n});D4?nu={}:O4&&(nu=R4(nu));P4(nu[G0])||L4(nu,G0,function(){return this});sM.exports={IteratorPrototype:nu,BUGGY_SAFARI_ITERATORS:oM}});var Up=st((LQ,uM)=>{"use strict";var F4=Ru().f,U4=ba(),B4=Os(),aM=B4("toStringTag");uM.exports=function(n,t,e){n&&!e&&(n=n.prototype),n&&!U4(n,aM)&&F4(n,aM,{configurable:!0,value:t})}});var cM=st((NQ,lM)=>{"use strict";var z4=k0().IteratorPrototype,G4=Yf(),k4=mp(),q4=Up(),H4=Fp(),V4=function(){return this};lM.exports=function(n,t,e,o){var s=t+" Iterator";return n.prototype=G4(z4,{next:k4(+!o,e)}),q4(n,s,!1,!0),H4[s]=V4,n}});var q0=st((OQ,fM)=>{"use strict";var W4=yi(),X4=kf();fM.exports=function(n,t,e){try{return W4(X4(Object.getOwnPropertyDescriptor(n,t)[e]))}catch(o){}}});var pM=st((DQ,hM)=>{"use strict";var Y4=$s();hM.exports=function(n){return Y4(n)||n===null}});var gM=st((FQ,dM)=>{"use strict";var $4=pM(),Z4=String,J4=TypeError;dM.exports=function(n){if($4(n))return n;throw new J4("Can't set "+Z4(n)+" as a prototype")}});var yM=st((UQ,mM)=>{"use strict";var K4=q0(),j4=$s(),Q4=lc(),tk=gM();mM.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=K4(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch(o){}return function(s,l){return Q4(s),tk(l),j4(s)&&(n?e(s,l):s.__proto__=l),s}}():void 0)});var CM=st((BQ,TM)=>{"use strict";var ek=Ds(),nk=Ns(),Bp=qf(),bM=m0(),rk=Ui(),ik=cM(),vM=U0(),_M=yM(),ok=Up(),sk=dc(),H0=Vf(),ak=Os(),xM=Fp(),AM=k0(),uk=bM.PROPER,lk=bM.CONFIGURABLE,EM=AM.IteratorPrototype,zp=AM.BUGGY_SAFARI_ITERATORS,$f=ak("iterator"),wM="keys",Zf="values",SM="entries",MM=function(){return this};TM.exports=function(n,t,e,o,s,l,p){ik(e,t,o);var h=function(w){if(w===s&&E)return E;if(!zp&&w&&w in v)return v[w];switch(w){case wM:return function(){return new e(this,w)};case Zf:return function(){return new e(this,w)};case SM:return function(){return new e(this,w)}}return function(){return new e(this)}},g=t+" Iterator",m=!1,v=n.prototype,x=v[$f]||v["@@iterator"]||s&&v[s],E=!zp&&x||h(s),b=t==="Array"&&v.entries||x,T,I,S;if(b&&(T=vM(b.call(new n)),T!==Object.prototype&&T.next&&(!Bp&&vM(T)!==EM&&(_M?_M(T,EM):rk(T[$f])||H0(T,$f,MM)),ok(T,g,!0,!0),Bp&&(xM[g]=MM))),uk&&s===Zf&&x&&x.name!==Zf&&(!Bp&&lk?sk(v,"name",Zf):(m=!0,E=function(){return nk(x,this)})),s)if(I={values:h(Zf),keys:l?E:h(wM),entries:h(SM)},p)for(S in I)(zp||m||!(S in v))&&H0(v,S,I[S]);else ek({target:t,proto:!0,forced:zp||m},I);return(!Bp||p)&&v[$f]!==E&&H0(v,$f,E,{name:s}),xM[t]=E,I}});var IM=st((zQ,PM)=>{"use strict";PM.exports=function(n,t){return{value:n,done:t}}});var FM=st((GQ,DM)=>{"use strict";var ck=cc(),V0=D0(),RM=Fp(),NM=Cp(),fk=Ru().f,hk=CM(),Gp=IM(),pk=qf(),dk=Ys(),OM="Array Iterator",gk=NM.set,mk=NM.getterFor(OM);DM.exports=hk(Array,"Array",function(n,t){gk(this,{type:OM,target:ck(n),index:0,kind:t})},function(){var n=mk(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,Gp(void 0,!0);switch(n.kind){case"keys":return Gp(e,!1);case"values":return Gp(t[e],!1)}return Gp([e,t[e]],!1)},"values");var LM=RM.Arguments=RM.Array;V0("keys");V0("values");V0("entries");if(!pk&&dk&&LM.name!=="values")try{fk(LM,"name",{value:"values"})}catch(n){}});var Y0=st(()=>{"use strict";var UM=so(),zM=DS(),yk=BS(),Jf=FM(),BM=dc(),vk=Up(),_k=Os(),W0=_k("iterator"),X0=Jf.values,GM=function(n,t){if(n){if(n[W0]!==X0)try{BM(n,W0,X0)}catch(o){n[W0]=X0}if(vk(n,t,!0),zM[t]){for(var e in Jf)if(n[e]!==Jf[e])try{BM(n,e,Jf[e])}catch(o){n[e]=Jf[e]}}}};for(kp in zM)GM(UM[kp]&&UM[kp].prototype,kp);var kp;GM(yk,"DOMTokenList")});var HM=st((HQ,qM)=>{"use strict";var xk=Os(),Ek=xk("toStringTag"),kM={};kM[Ek]="z";qM.exports=String(kM)==="[object z]"});var $0=st((VQ,VM)=>{"use strict";var wk=HM(),Sk=Ui(),qp=uc(),Mk=Os(),bk=Mk("toStringTag"),Ak=Object,Tk=qp(function(){return arguments}())==="Arguments",Ck=function(n,t){try{return n[t]}catch(e){}};VM.exports=wk?qp:function(n){var t,e,o;return n===void 0?"Undefined":n===null?"Null":typeof(e=Ck(t=Ak(n),bk))=="string"?e:Tk?qp(t):(o=qp(t))==="Object"&&Sk(t.callee)?"Arguments":o}});var Hp=st((WQ,WM)=>{"use strict";var Pk=$0(),Ik=String;WM.exports=function(n){if(Pk(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Ik(n)}});var YM=st((XQ,XM)=>{"use strict";var Rk=Aa();XM.exports=function(){var n=Rk(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t}});var ZM=st((YQ,$M)=>{"use strict";var Z0=mi(),Lk=so(),J0=Lk.RegExp,K0=Z0(function(){var n=J0("a","y");return n.lastIndex=2,n.exec("abcd")!==null}),Nk=K0||Z0(function(){return!J0("a","y").sticky}),Ok=K0||Z0(function(){var n=J0("^r","gy");return n.lastIndex=2,n.exec("str")!==null});$M.exports={BROKEN_CARET:Ok,MISSED_STICKY:Nk,UNSUPPORTED_Y:K0}});var KM=st(($Q,JM)=>{"use strict";var Dk=mi(),Fk=so(),Uk=Fk.RegExp;JM.exports=Dk(function(){var n=Uk(".","s");return!(n.dotAll&&n.test(\`
|
|
19646
19646
|
\`)&&n.flags==="s")})});var QM=st((ZQ,jM)=>{"use strict";var Bk=mi(),zk=so(),Gk=zk.RegExp;jM.exports=Bk(function(){var n=Gk("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"})});var Xp=st((JQ,eb)=>{"use strict";var gc=Ns(),Wp=yi(),kk=Hp(),qk=YM(),Hk=ZM(),Vk=Ep(),Wk=Yf(),Xk=Cp().get,Yk=KM(),$k=QM(),Zk=Vk("native-string-replace",String.prototype.replace),Vp=RegExp.prototype.exec,Q0=Vp,Jk=Wp("".charAt),Kk=Wp("".indexOf),jk=Wp("".replace),j0=Wp("".slice),ty=function(){var n=/a/,t=/b*/g;return gc(Vp,n,"a"),gc(Vp,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),tb=Hk.BROKEN_CARET,ey=/()??/.exec("")[1]!==void 0,Qk=ty||ey||tb||Yk||$k;Qk&&(Q0=function(t){var e=this,o=Xk(e),s=kk(t),l=o.raw,p,h,g,m,v,x,E;if(l)return l.lastIndex=e.lastIndex,p=gc(Q0,l,s),e.lastIndex=l.lastIndex,p;var b=o.groups,T=tb&&e.sticky,I=gc(qk,e),S=e.source,w=0,R=s;if(T&&(I=jk(I,"y",""),Kk(I,"g")===-1&&(I+="g"),R=j0(s,e.lastIndex),e.lastIndex>0&&(!e.multiline||e.multiline&&Jk(s,e.lastIndex-1)!==\`
|
|
19647
19647
|
\`)&&(S="(?: "+S+")",R=" "+R,w++),h=new RegExp("^(?:"+S+")",I)),ey&&(h=new RegExp("^"+S+"$(?!\\\\s)",I)),ty&&(g=e.lastIndex),m=gc(Vp,T?h:e,R),T?m?(m.input=j0(m.input,w),m[0]=j0(m[0],w),m.index=e.lastIndex,e.lastIndex+=m[0].length):e.lastIndex=0:ty&&m&&(e.lastIndex=e.global?m.index+m[0].length:g),ey&&m&&m.length>1&&gc(Zk,m[0],h,function(){for(v=1;v<arguments.length-2;v++)arguments[v]===void 0&&(m[v]=void 0)}),m&&b)for(m.groups=x=Wk(null),v=0;v<b.length;v++)E=b[v],x[E[0]]=m[E[1]];return m});eb.exports=Q0});var Yp=st(()=>{"use strict";var tq=Ds(),nb=Xp();tq({target:"RegExp",proto:!0,forced:/./.exec!==nb},{exec:nb})});var Ks=st((QQ,rb)=>{"use strict";var ny=yi(),$p=Set.prototype;rb.exports={Set,add:ny($p.add),has:ny($p.has),remove:ny($p.delete),proto:$p}});var Nu=st((ttt,ib)=>{"use strict";var eq=Ks().has;ib.exports=function(n){return eq(n),n}});var Ou=st((ett,ob)=>{"use strict";var nq=Ns();ob.exports=function(n,t,e){for(var o=e?n:n.iterator,s=n.next,l,p;!(l=nq(s,o)).done;)if(p=t(l.value),p!==void 0)return p}});var mc=st((ntt,cb)=>{"use strict";var sb=yi(),rq=Ou(),ab=Ks(),iq=ab.Set,ub=ab.proto,oq=sb(ub.forEach),lb=sb(ub.keys),sq=lb(new iq).next;cb.exports=function(n,t,e){return e?rq({iterator:lb(n),next:sq},t):oq(n,t)}});var Zp=st((rtt,hb)=>{"use strict";var fb=Ks(),aq=mc(),uq=fb.Set,lq=fb.add;hb.exports=function(n){var t=new uq;return aq(n,function(e){lq(t,e)}),t}});var yc=st((itt,pb)=>{"use strict";var cq=q0(),fq=Ks();pb.exports=cq(fq.proto,"size","get")||function(n){return n.size}});var gb=st((ott,db)=>{"use strict";db.exports=function(n){return{iterator:n,next:n.next,done:!1}}});var Du=st((stt,Eb)=>{"use strict";var mb=kf(),_b=Aa(),yb=Ns(),hq=wl(),pq=gb(),vb="Invalid size",dq=RangeError,gq=TypeError,mq=Math.max,xb=function(n,t){this.set=n,this.size=mq(t,0),this.has=mb(n.has),this.keys=mb(n.keys)};xb.prototype={getIterator:function(){return pq(_b(yb(this.keys,this.set)))},includes:function(n){return yb(this.has,this.set,n)}};Eb.exports=function(n){_b(n);var t=+n.size;if(t!==t)throw new gq(vb);var e=hq(t);if(e<0)throw new dq(vb);return new xb(n,e)}});var bb=st((att,Mb)=>{"use strict";var yq=Nu(),Sb=Ks(),vq=Zp(),_q=yc(),xq=Du(),Eq=mc(),wq=Ou(),Sq=Sb.has,wb=Sb.remove;Mb.exports=function(t){var e=yq(this),o=xq(t),s=vq(e);return _q(e)<=o.size?Eq(e,function(l){o.includes(l)&&wb(s,l)}):wq(o.getIterator(),function(l){Sq(e,l)&&wb(s,l)}),s}});var Fu=st((utt,Cb)=>{"use strict";var Mq=fc(),Ab=function(n){return{size:n,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Tb=function(n){return{size:n,has:function(){return!0},keys:function(){throw new Error("e")}}};Cb.exports=function(n,t){var e=Mq("Set");try{new e()[n](Ab(0));try{return new e()[n](Ab(-1)),!1}catch(s){if(!t)return!0;try{return new e()[n](Tb(-1/0)),!1}catch(l){var o=new e;return o.add(1),o.add(2),t(o[n](Tb(1/0)))}}}catch(s){return!1}}});var Pb=st(()=>{"use strict";var bq=Ds(),Aq=bb(),Tq=Fu(),Cq=!Tq("difference",function(n){return n.size===0});bq({target:"Set",proto:!0,real:!0,forced:Cq},{difference:Aq})});var Lb=st((ftt,Rb)=>{"use strict";var Pq=Nu(),ry=Ks(),Iq=yc(),Rq=Du(),Lq=mc(),Nq=Ou(),Oq=ry.Set,Ib=ry.add,Dq=ry.has;Rb.exports=function(t){var e=Pq(this),o=Rq(t),s=new Oq;return Iq(e)>o.size?Nq(o.getIterator(),function(l){Dq(e,l)&&Ib(s,l)}):Lq(e,function(l){o.includes(l)&&Ib(s,l)}),s}});var Nb=st(()=>{"use strict";var Fq=Ds(),Uq=mi(),Bq=Lb(),zq=Fu(),Gq=!zq("intersection",function(n){return n.size===2&&n.has(1)&&n.has(2)})||Uq(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Fq({target:"Set",proto:!0,real:!0,forced:Gq},{intersection:Bq})});var iy=st((dtt,Db)=>{"use strict";var kq=Ns(),Ob=Aa(),qq=vp();Db.exports=function(n,t,e){var o,s;Ob(n);try{if(o=qq(n,"return"),!o){if(t==="throw")throw e;return e}o=kq(o,n)}catch(l){s=!0,o=l}if(t==="throw")throw e;if(s)throw o;return Ob(o),e}});var Ub=st((gtt,Fb)=>{"use strict";var Hq=Nu(),Vq=Ks().has,Wq=yc(),Xq=Du(),Yq=mc(),$q=Ou(),Zq=iy();Fb.exports=function(t){var e=Hq(this),o=Xq(t);if(Wq(e)<=o.size)return Yq(e,function(l){if(o.includes(l))return!1},!0)!==!1;var s=o.getIterator();return $q(s,function(l){if(Vq(e,l))return Zq(s,"normal",!1)})!==!1}});var Bb=st(()=>{"use strict";var Jq=Ds(),Kq=Ub(),jq=Fu(),Qq=!jq("isDisjointFrom",function(n){return!n});Jq({target:"Set",proto:!0,real:!0,forced:Qq},{isDisjointFrom:Kq})});var Gb=st((vtt,zb)=>{"use strict";var t5=Nu(),e5=yc(),n5=mc(),r5=Du();zb.exports=function(t){var e=t5(this),o=r5(t);return e5(e)>o.size?!1:n5(e,function(s){if(!o.includes(s))return!1},!0)!==!1}});var kb=st(()=>{"use strict";var i5=Ds(),o5=Gb(),s5=Fu(),a5=!s5("isSubsetOf",function(n){return n});i5({target:"Set",proto:!0,real:!0,forced:a5},{isSubsetOf:o5})});var Hb=st((Ett,qb)=>{"use strict";var u5=Nu(),l5=Ks().has,c5=yc(),f5=Du(),h5=Ou(),p5=iy();qb.exports=function(t){var e=u5(this),o=f5(t);if(c5(e)<o.size)return!1;var s=o.getIterator();return h5(s,function(l){if(!l5(e,l))return p5(s,"normal",!1)})!==!1}});var Vb=st(()=>{"use strict";var d5=Ds(),g5=Hb(),m5=Fu(),y5=!m5("isSupersetOf",function(n){return!n});d5({target:"Set",proto:!0,real:!0,forced:y5},{isSupersetOf:g5})});var Xb=st((Mtt,Wb)=>{"use strict";var v5=Nu(),oy=Ks(),_5=Zp(),x5=Du(),E5=Ou(),w5=oy.add,S5=oy.has,M5=oy.remove;Wb.exports=function(t){var e=v5(this),o=x5(t).getIterator(),s=_5(e);return E5(o,function(l){S5(e,l)?M5(s,l):w5(s,l)}),s}});var Yb=st(()=>{"use strict";var b5=Ds(),A5=Xb(),T5=Fu();b5({target:"Set",proto:!0,real:!0,forced:!T5("symmetricDifference")},{symmetricDifference:A5})});var Zb=st((Ttt,$b)=>{"use strict";var C5=Nu(),P5=Ks().add,I5=Zp(),R5=Du(),L5=Ou();$b.exports=function(t){var e=C5(this),o=R5(t).getIterator(),s=I5(e);return L5(o,function(l){P5(s,l)}),s}});var Jb=st(()=>{"use strict";var N5=Ds(),O5=Zb(),D5=Fu();N5({target:"Set",proto:!0,real:!0,forced:!D5("union")},{union:O5})});var jb=st((Itt,Kb)=>{"use strict";var F5=uc(),U5=yi();Kb.exports=function(n){if(F5(n)==="Function")return U5(n)}});var eA=st((Rtt,tA)=>{"use strict";var Qb=jb(),B5=kf(),z5=Gf(),G5=Qb(Qb.bind);tA.exports=function(n,t){return B5(n),t===void 0?n:z5?G5(n,t):function(){return n.apply(t,arguments)}}});var iA=st((Ltt,rA)=>{"use strict";var k5=Np(),q5=Wf(),H5=T0(),V5=eA(),nA=function(n,t,e,o,s,l,p,h){for(var g=s,m=0,v=p?V5(p,h):!1,x,E;m<o;)m in e&&(x=v?v(e[m],m,t):e[m],l>0&&k5(x)?(E=q5(x),g=nA(n,t,x,E,g,l-1)-1):(H5(g+1),n[g]=x),g++),m++;return g};rA.exports=nA});var cA=st((Ntt,lA)=>{"use strict";var W5=yi(),X5=mi(),oA=Ui(),Y5=$0(),$5=fc(),Z5=v0(),sA=function(){},aA=$5("Reflect","construct"),sy=/^\\s*(?:class|function)\\b/,J5=W5(sy.exec),K5=!sy.test(sA),Kf=function(t){if(!oA(t))return!1;try{return aA(sA,[],t),!0}catch(e){return!1}},uA=function(t){if(!oA(t))return!1;switch(Y5(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return K5||!!J5(sy,Z5(t))}catch(e){return!0}};uA.sham=!0;lA.exports=!aA||X5(function(){var n;return Kf(Kf.call)||!Kf(Object)||!Kf(function(){n=!0})||n})?uA:Kf});var dA=st((Ott,pA)=>{"use strict";var fA=Np(),j5=cA(),Q5=$s(),tH=Os(),eH=tH("species"),hA=Array;pA.exports=function(n){var t;return fA(n)&&(t=n.constructor,j5(t)&&(t===hA||fA(t.prototype))?t=void 0:Q5(t)&&(t=t[eH],t===null&&(t=void 0))),t===void 0?hA:t}});var mA=st((Dtt,gA)=>{"use strict";var nH=dA();gA.exports=function(n,t){return new(nH(n))(t===0?0:t)}});var yA=st(()=>{"use strict";var rH=Ds(),iH=iA(),oH=hc(),sH=Wf(),aH=wl(),uH=mA();rH({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=oH(this),o=sH(e),s=uH(e,0);return s.length=iH(s,e,e,o,0,t===void 0?1:aH(t)),s}})});var vA=st(()=>{"use strict";var lH=D0();lH("flat")});var xA=st((Gtt,_A)=>{var ay=class{constructor(){this.keys=new Set,this.queue=[]}sort(){this.queue.sort((t,e)=>t.priority-e.priority)}set(t,e){let o=Number(e);if(isNaN(o))throw new TypeError('"priority" must be a number');return this.keys.has(t)?this.queue.map(s=>(s.key===t&&Object.assign(s,{priority:o}),s)):(this.keys.add(t),this.queue.push({key:t,priority:o})),this.sort(),this.queue.length}next(){let t=this.queue.shift();return this.keys.delete(t.key),t}isEmpty(){return this.queue.length===0}has(t){return this.keys.has(t)}get(t){return this.queue.find(e=>e.key===t)}};_A.exports=ay});var SA=st((ktt,wA)=>{function EA(n,t){let e=new Map;for(let[o,s]of n)o!==t&&s instanceof Map?e.set(o,EA(s,t)):o!==t&&e.set(o,s);return e}wA.exports=EA});var AA=st((qtt,bA)=>{function cH(n){let t=Number(n);return!(isNaN(t)||t<=0)}function MA(n){let t=new Map;return Object.keys(n).forEach(o=>{let s=n[o];if(s!==null&&typeof s=="object"&&!Array.isArray(s))return t.set(o,MA(s));if(!cH(s))throw new Error(\`Could not add node at key "\${o}", make sure it's a valid node\`,s);return t.set(o,Number(s))}),t}bA.exports=MA});var PA=st((Htt,CA)=>{function TA(n){if(!(n instanceof Map))throw new Error(\`Invalid graph: Expected Map instead found \${typeof n}\`);n.forEach((t,e)=>{if(typeof t=="object"&&t instanceof Map){TA(t);return}if(typeof t!="number"||t<=0)throw new Error(\`Values must be numbers greater than 0. Found value \${t} at \${e}\`)})}CA.exports=TA});var NA=st((Vtt,LA)=>{var fH=xA(),hH=SA(),IA=AA(),RA=PA(),uy=class{constructor(t){t instanceof Map?(RA(t),this.graph=t):t?this.graph=IA(t):this.graph=new Map}addNode(t,e){let o;return e instanceof Map?(RA(e),o=e):o=IA(e),this.graph.set(t,o),this}addVertex(t,e){return this.addNode(t,e)}removeNode(t){return this.graph=hH(this.graph,t),this}path(t,e,o={}){if(!this.graph.size)return o.cost?{path:null,cost:0}:null;let s=new Set,l=new fH,p=new Map,h=[],g=0,m=[];if(o.avoid&&(m=[].concat(o.avoid)),m.includes(t))throw new Error(\`Starting node (\${t}) cannot be avoided\`);if(m.includes(e))throw new Error(\`Ending node (\${e}) cannot be avoided\`);for(l.set(t,0);!l.isEmpty();){let v=l.next();if(v.key===e){g=v.priority;let E=v.key;for(;p.has(E);)h.push(E),E=p.get(E);break}s.add(v.key),(this.graph.get(v.key)||new Map).forEach((E,b)=>{if(s.has(b)||m.includes(b))return null;if(!l.has(b))return p.set(b,v.key),l.set(b,v.priority+E);let T=l.get(b).priority,I=v.priority+E;return I<T?(p.set(b,v.key),l.set(b,I)):null})}return h.length?(o.trim?h.shift():h=h.concat([t]),o.reverse||(h=h.reverse()),o.cost?{path:h,cost:g}:h):o.cost?{path:null,cost:0}:null}shortestPath(...t){return this.path(...t)}};LA.exports=uy});var Xd=st((net,PC)=>{"use strict";var CC=Object.getOwnPropertySymbols,MX=Object.prototype.hasOwnProperty,bX=Object.prototype.propertyIsEnumerable;function AX(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function TX(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var t={},e=0;e<10;e++)t["_"+String.fromCharCode(e)]=e;var o=Object.getOwnPropertyNames(t).map(function(l){return t[l]});if(o.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(l){s[l]=l}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch(l){return!1}}PC.exports=TX()?Object.assign:function(n,t){for(var e,o=AX(n),s,l=1;l<arguments.length;l++){e=Object(arguments[l]);for(var p in e)MX.call(e,p)&&(o[p]=e[p]);if(CC){s=CC(e);for(var h=0;h<s.length;h++)bX.call(e,s[h])&&(o[s[h]]=e[s[h]])}}return o}});var qv=st((Gv,kv)=>{(function(n,t){typeof Gv=="object"&&typeof kv!="undefined"?kv.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self).RBush=t()})(Gv,function(){"use strict";function n(S,w,R,C,F){(function W(X,q,D,xt,B){for(;xt>D;){if(xt-D>600){var j=xt-D+1,J=q-D+1,Dt=Math.log(j),Q=.5*Math.exp(2*Dt/3),At=.5*Math.sqrt(Dt*Q*(j-Q)/j)*(J-j/2<0?-1:1),Mt=Math.max(D,Math.floor(q-J*Q/j+At)),Lt=Math.min(xt,Math.floor(q+(j-J)*Q/j+At));W(X,q,Mt,Lt,B)}var pt=X[q],yt=D,K=xt;for(t(X,D,q),B(X[xt],pt)>0&&t(X,D,xt);yt<K;){for(t(X,yt,K),yt++,K--;B(X[yt],pt)<0;)yt++;for(;B(X[K],pt)>0;)K--}B(X[D],pt)===0?t(X,D,K):t(X,++K,xt),K<=q&&(D=K+1),q<=K&&(xt=K-1)}})(S,w,R||0,C||S.length-1,F||e)}function t(S,w,R){var C=S[w];S[w]=S[R],S[R]=C}function e(S,w){return S<w?-1:S>w?1:0}var o=function(S){S===void 0&&(S=9),this._maxEntries=Math.max(4,S),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(S,w,R){if(!R)return w.indexOf(S);for(var C=0;C<w.length;C++)if(R(S,w[C]))return C;return-1}function l(S,w){p(S,0,S.children.length,w,S)}function p(S,w,R,C,F){F||(F=T(null)),F.minX=1/0,F.minY=1/0,F.maxX=-1/0,F.maxY=-1/0;for(var W=w;W<R;W++){var X=S.children[W];h(F,S.leaf?C(X):X)}return F}function h(S,w){return S.minX=Math.min(S.minX,w.minX),S.minY=Math.min(S.minY,w.minY),S.maxX=Math.max(S.maxX,w.maxX),S.maxY=Math.max(S.maxY,w.maxY),S}function g(S,w){return S.minX-w.minX}function m(S,w){return S.minY-w.minY}function v(S){return(S.maxX-S.minX)*(S.maxY-S.minY)}function x(S){return S.maxX-S.minX+(S.maxY-S.minY)}function E(S,w){return S.minX<=w.minX&&S.minY<=w.minY&&w.maxX<=S.maxX&&w.maxY<=S.maxY}function b(S,w){return w.minX<=S.maxX&&w.minY<=S.maxY&&w.maxX>=S.minX&&w.maxY>=S.minY}function T(S){return{children:S,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(S,w,R,C,F){for(var W=[w,R];W.length;)if(!((R=W.pop())-(w=W.pop())<=C)){var X=w+Math.ceil((R-w)/C/2)*C;n(S,X,w,R,F),W.push(w,X,X,R)}}return o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(S){var w=this.data,R=[];if(!b(S,w))return R;for(var C=this.toBBox,F=[];w;){for(var W=0;W<w.children.length;W++){var X=w.children[W],q=w.leaf?C(X):X;b(S,q)&&(w.leaf?R.push(X):E(S,q)?this._all(X,R):F.push(X))}w=F.pop()}return R},o.prototype.collides=function(S){var w=this.data;if(!b(S,w))return!1;for(var R=[];w;){for(var C=0;C<w.children.length;C++){var F=w.children[C],W=w.leaf?this.toBBox(F):F;if(b(S,W)){if(w.leaf||E(S,W))return!0;R.push(F)}}w=R.pop()}return!1},o.prototype.load=function(S){if(!S||!S.length)return this;if(S.length<this._minEntries){for(var w=0;w<S.length;w++)this.insert(S[w]);return this}var R=this._build(S.slice(),0,S.length-1,0);if(this.data.children.length)if(this.data.height===R.height)this._splitRoot(this.data,R);else{if(this.data.height<R.height){var C=this.data;this.data=R,R=C}this._insert(R,this.data.height-R.height-1,!0)}else this.data=R;return this},o.prototype.insert=function(S){return S&&this._insert(S,this.data.height-1),this},o.prototype.clear=function(){return this.data=T([]),this},o.prototype.remove=function(S,w){if(!S)return this;for(var R,C,F,W=this.data,X=this.toBBox(S),q=[],D=[];W||q.length;){if(W||(W=q.pop(),C=q[q.length-1],R=D.pop(),F=!0),W.leaf){var xt=s(S,W.children,w);if(xt!==-1)return W.children.splice(xt,1),q.push(W),this._condense(q),this}F||W.leaf||!E(W,X)?C?(R++,W=C.children[R],F=!1):W=null:(q.push(W),D.push(R),R=0,C=W,W=W.children[0])}return this},o.prototype.toBBox=function(S){return S},o.prototype.compareMinX=function(S,w){return S.minX-w.minX},o.prototype.compareMinY=function(S,w){return S.minY-w.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(S){return this.data=S,this},o.prototype._all=function(S,w){for(var R=[];S;)S.leaf?w.push.apply(w,S.children):R.push.apply(R,S.children),S=R.pop();return w},o.prototype._build=function(S,w,R,C){var F,W=R-w+1,X=this._maxEntries;if(W<=X)return l(F=T(S.slice(w,R+1)),this.toBBox),F;C||(C=Math.ceil(Math.log(W)/Math.log(X)),X=Math.ceil(W/Math.pow(X,C-1))),(F=T([])).leaf=!1,F.height=C;var q=Math.ceil(W/X),D=q*Math.ceil(Math.sqrt(X));I(S,w,R,D,this.compareMinX);for(var xt=w;xt<=R;xt+=D){var B=Math.min(xt+D-1,R);I(S,xt,B,q,this.compareMinY);for(var j=xt;j<=B;j+=q){var J=Math.min(j+q-1,B);F.children.push(this._build(S,j,J,C-1))}}return l(F,this.toBBox),F},o.prototype._chooseSubtree=function(S,w,R,C){for(;C.push(w),!w.leaf&&C.length-1!==R;){for(var F=1/0,W=1/0,X=void 0,q=0;q<w.children.length;q++){var D=w.children[q],xt=v(D),B=(j=S,J=D,(Math.max(J.maxX,j.maxX)-Math.min(J.minX,j.minX))*(Math.max(J.maxY,j.maxY)-Math.min(J.minY,j.minY))-xt);B<W?(W=B,F=xt<F?xt:F,X=D):B===W&&xt<F&&(F=xt,X=D)}w=X||w.children[0]}var j,J;return w},o.prototype._insert=function(S,w,R){var C=R?S:this.toBBox(S),F=[],W=this._chooseSubtree(C,this.data,w,F);for(W.children.push(S),h(W,C);w>=0&&F[w].children.length>this._maxEntries;)this._split(F,w),w--;this._adjustParentBBoxes(C,F,w)},o.prototype._split=function(S,w){var R=S[w],C=R.children.length,F=this._minEntries;this._chooseSplitAxis(R,F,C);var W=this._chooseSplitIndex(R,F,C),X=T(R.children.splice(W,R.children.length-W));X.height=R.height,X.leaf=R.leaf,l(R,this.toBBox),l(X,this.toBBox),w?S[w-1].children.push(X):this._splitRoot(R,X)},o.prototype._splitRoot=function(S,w){this.data=T([S,w]),this.data.height=S.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(S,w,R){for(var C,F,W,X,q,D,xt,B=1/0,j=1/0,J=w;J<=R-w;J++){var Dt=p(S,0,J,this.toBBox),Q=p(S,J,R,this.toBBox),At=(F=Dt,W=Q,X=void 0,q=void 0,D=void 0,xt=void 0,X=Math.max(F.minX,W.minX),q=Math.max(F.minY,W.minY),D=Math.min(F.maxX,W.maxX),xt=Math.min(F.maxY,W.maxY),Math.max(0,D-X)*Math.max(0,xt-q)),Mt=v(Dt)+v(Q);At<B?(B=At,C=J,j=Mt<j?Mt:j):At===B&&Mt<j&&(j=Mt,C=J)}return C||R-w},o.prototype._chooseSplitAxis=function(S,w,R){var C=S.leaf?this.compareMinX:g,F=S.leaf?this.compareMinY:m;this._allDistMargin(S,w,R,C)<this._allDistMargin(S,w,R,F)&&S.children.sort(C)},o.prototype._allDistMargin=function(S,w,R,C){S.children.sort(C);for(var F=this.toBBox,W=p(S,0,w,F),X=p(S,R-w,R,F),q=x(W)+x(X),D=w;D<R-w;D++){var xt=S.children[D];h(W,S.leaf?F(xt):xt),q+=x(W)}for(var B=R-w-1;B>=w;B--){var j=S.children[B];h(X,S.leaf?F(j):j),q+=x(X)}return q},o.prototype._adjustParentBBoxes=function(S,w,R){for(var C=R;C>=0;C--)h(w[C],S)},o.prototype._condense=function(S){for(var w=S.length-1,R=void 0;w>=0;w--)S[w].children.length===0?w>0?(R=S[w-1].children).splice(R.indexOf(S[w]),1):this.clear():l(S[w],this.toBBox)},o})});var IC=st((Hv,Vv)=>{(function(n,t){typeof Hv=="object"&&typeof Vv!="undefined"?Vv.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.TinyQueue=t())})(Hv,function(){"use strict";var n=function(o,s){if(o===void 0&&(o=[]),s===void 0&&(s=t),this.data=o,this.length=this.data.length,this.compare=s,this.length>0)for(var l=(this.length>>1)-1;l>=0;l--)this._down(l)};n.prototype.push=function(o){this.data.push(o),this.length++,this._up(this.length-1)},n.prototype.pop=function(){if(this.length!==0){var o=this.data[0],s=this.data.pop();return this.length--,this.length>0&&(this.data[0]=s,this._down(0)),o}},n.prototype.peek=function(){return this.data[0]},n.prototype._up=function(o){for(var s=this,l=s.data,p=s.compare,h=l[o];o>0;){var g=o-1>>1,m=l[g];if(p(h,m)>=0)break;l[o]=m,o=g}l[o]=h},n.prototype._down=function(o){for(var s=this,l=s.data,p=s.compare,h=this.length>>1,g=l[o];o<h;){var m=(o<<1)+1,v=l[m],x=m+1;if(x<this.length&&p(l[x],v)<0&&(m=x,v=l[x]),p(v,g)>=0)break;l[o]=v,o=m}l[o]=g};function t(e,o){return e<o?-1:e>o?1:0}return n})});var LC=st((uet,RC)=>{RC.exports=function(t,e,o,s){var l=t[0],p=t[1],h=!1;o===void 0&&(o=0),s===void 0&&(s=e.length);for(var g=(s-o)/2,m=0,v=g-1;m<g;v=m++){var x=e[o+m*2+0],E=e[o+m*2+1],b=e[o+v*2+0],T=e[o+v*2+1],I=E>p!=T>p&&l<(b-x)*(p-E)/(T-E)+x;I&&(h=!h)}return h}});var OC=st((cet,NC)=>{NC.exports=function(t,e,o,s){var l=t[0],p=t[1],h=!1;o===void 0&&(o=0),s===void 0&&(s=e.length);for(var g=s-o,m=0,v=g-1;m<g;v=m++){var x=e[m+o][0],E=e[m+o][1],b=e[v+o][0],T=e[v+o][1],I=E>p!=T>p&&l<(b-x)*(p-E)/(T-E)+x;I&&(h=!h)}return h}});var UC=st((fet,Zd)=>{var DC=LC(),FC=OC();Zd.exports=function(t,e,o,s){return e.length>0&&Array.isArray(e[0])?FC(t,e,o,s):DC(t,e,o,s)};Zd.exports.nested=FC;Zd.exports.flat=DC});var zC=st((Jd,BC)=>{(function(n,t){typeof Jd=="object"&&typeof BC!="undefined"?t(Jd):typeof define=="function"&&define.amd?define(["exports"],t):t((n=n||self).predicates={})})(Jd,function(n){"use strict";let e=33306690738754706e-32;function o(b,T,I,S,w){let R,C,F,W,X=T[0],q=S[0],D=0,xt=0;q>X==q>-X?(R=X,X=T[++D]):(R=q,q=S[++xt]);let B=0;if(D<b&&xt<I)for(q>X==q>-X?(F=R-((C=X+R)-X),X=T[++D]):(F=R-((C=q+R)-q),q=S[++xt]),R=C,F!==0&&(w[B++]=F);D<b&&xt<I;)q>X==q>-X?(F=R-((C=R+X)-(W=C-R))+(X-W),X=T[++D]):(F=R-((C=R+q)-(W=C-R))+(q-W),q=S[++xt]),R=C,F!==0&&(w[B++]=F);for(;D<b;)F=R-((C=R+X)-(W=C-R))+(X-W),X=T[++D],R=C,F!==0&&(w[B++]=F);for(;xt<I;)F=R-((C=R+q)-(W=C-R))+(q-W),q=S[++xt],R=C,F!==0&&(w[B++]=F);return R===0&&B!==0||(w[B++]=R),B}function s(b){return new Float64Array(b)}let l=33306690738754716e-32,p=22204460492503146e-32,h=11093356479670487e-47,g=s(4),m=s(8),v=s(12),x=s(16),E=s(4);n.orient2d=function(b,T,I,S,w,R){let C=(T-R)*(I-w),F=(b-w)*(S-R),W=C-F;if(C===0||F===0||C>0!=F>0)return W;let X=Math.abs(C+F);return Math.abs(W)>=l*X?W:-function(q,D,xt,B,j,J,Dt){let Q,At,Mt,Lt,pt,yt,K,Bt,Gt,ae,ut,Ut,jt,ce,te,$t,qt,xe,ft=q-j,We=xt-j,ee=D-J,ge=B-J;pt=(te=(Bt=ft-(K=(yt=134217729*ft)-(yt-ft)))*(ae=ge-(Gt=(yt=134217729*ge)-(yt-ge)))-((ce=ft*ge)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=ee-(K=(yt=134217729*ee)-(yt-ee)))*(ae=We-(Gt=(yt=134217729*We)-(yt-We)))-(($t=ee*We)-K*Gt-Bt*Gt-K*ae))),g[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),g[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,g[2]=Ut-(xe-pt)+(ut-pt),g[3]=xe;let fe=function(tt,z){let Pt=z[0];for(let Ot=1;Ot<tt;Ot++)Pt+=z[Ot];return Pt}(4,g),Te=p*Dt;if(fe>=Te||-fe>=Te||(Q=q-(ft+(pt=q-ft))+(pt-j),Mt=xt-(We+(pt=xt-We))+(pt-j),At=D-(ee+(pt=D-ee))+(pt-J),Lt=B-(ge+(pt=B-ge))+(pt-J),Q===0&&At===0&&Mt===0&&Lt===0)||(Te=h*Dt+e*Math.abs(fe),(fe+=ft*Lt+ge*Q-(ee*Mt+We*At))>=Te||-fe>=Te))return fe;pt=(te=(Bt=Q-(K=(yt=134217729*Q)-(yt-Q)))*(ae=ge-(Gt=(yt=134217729*ge)-(yt-ge)))-((ce=Q*ge)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=At-(K=(yt=134217729*At)-(yt-At)))*(ae=We-(Gt=(yt=134217729*We)-(yt-We)))-(($t=At*We)-K*Gt-Bt*Gt-K*ae))),E[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),E[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,E[2]=Ut-(xe-pt)+(ut-pt),E[3]=xe;let be=o(4,g,4,E,m);pt=(te=(Bt=ft-(K=(yt=134217729*ft)-(yt-ft)))*(ae=Lt-(Gt=(yt=134217729*Lt)-(yt-Lt)))-((ce=ft*Lt)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=ee-(K=(yt=134217729*ee)-(yt-ee)))*(ae=Mt-(Gt=(yt=134217729*Mt)-(yt-Mt)))-(($t=ee*Mt)-K*Gt-Bt*Gt-K*ae))),E[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),E[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,E[2]=Ut-(xe-pt)+(ut-pt),E[3]=xe;let Wt=o(be,m,4,E,v);pt=(te=(Bt=Q-(K=(yt=134217729*Q)-(yt-Q)))*(ae=Lt-(Gt=(yt=134217729*Lt)-(yt-Lt)))-((ce=Q*Lt)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=At-(K=(yt=134217729*At)-(yt-At)))*(ae=Mt-(Gt=(yt=134217729*Mt)-(yt-Mt)))-(($t=At*Mt)-K*Gt-Bt*Gt-K*ae))),E[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),E[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,E[2]=Ut-(xe-pt)+(ut-pt),E[3]=xe;let Me=o(Wt,v,4,E,x);return x[Me-1]}(b,T,I,S,w,R,X)},n.orient2dfast=function(b,T,I,S,w,R){return(T-R)*(I-w)-(b-w)*(S-R)},Object.defineProperty(n,"__esModule",{value:!0})})});var WC=st((het,$v)=>{"use strict";var GC=qv(),jd=IC(),PX=UC(),IX=zC().orient2d;jd.default&&(jd=jd.default);$v.exports=VC;$v.exports.default=VC;function VC(n,t,e){t=Math.max(0,t===void 0?2:t),e=e||0;var o=DX(n),s=new GC(16);s.toBBox=function(R){return{minX:R[0],minY:R[1],maxX:R[0],maxY:R[1]}},s.compareMinX=function(R,C){return R[0]-C[0]},s.compareMinY=function(R,C){return R[1]-C[1]},s.load(n);for(var l=[],p=0,h;p<o.length;p++){var g=o[p];s.remove(g),h=HC(g,h),l.push(h)}var m=new GC(16);for(p=0;p<l.length;p++)m.insert(Wv(l[p]));for(var v=t*t,x=e*e;l.length;){var E=l.shift(),b=E.p,T=E.next.p,I=Xv(b,T);if(!(I<x)){var S=I/v;g=RX(s,E.prev.p,b,T,E.next.next.p,S,m),g&&Math.min(Xv(g,b),Xv(g,T))<=S&&(l.push(E),l.push(HC(g,E)),s.remove(g),m.remove(E),m.insert(Wv(E)),m.insert(Wv(E.next)))}}E=h;var w=[];do w.push(E.p),E=E.next;while(E!==h);return w.push(E.p),w}function RX(n,t,e,o,s,l,p){for(var h=new jd([],LX),g=n.data;g;){for(var m=0;m<g.children.length;m++){var v=g.children[m],x=g.leaf?Yv(v,e,o):NX(e,o,v);x>l||h.push({node:v,dist:x})}for(;h.length&&!h.peek().node.children;){var E=h.pop(),b=E.node,T=Yv(b,t,e),I=Yv(b,o,s);if(E.dist<T&&E.dist<I&&qC(e,b,p)&&qC(o,b,p))return b}g=h.pop(),g&&(g=g.node)}return null}function LX(n,t){return n.dist-t.dist}function NX(n,t,e){if(kC(n,e)||kC(t,e))return 0;var o=Kd(n[0],n[1],t[0],t[1],e.minX,e.minY,e.maxX,e.minY);if(o===0)return 0;var s=Kd(n[0],n[1],t[0],t[1],e.minX,e.minY,e.minX,e.maxY);if(s===0)return 0;var l=Kd(n[0],n[1],t[0],t[1],e.maxX,e.minY,e.maxX,e.maxY);if(l===0)return 0;var p=Kd(n[0],n[1],t[0],t[1],e.minX,e.maxY,e.maxX,e.maxY);return p===0?0:Math.min(o,s,l,p)}function kC(n,t){return n[0]>=t.minX&&n[0]<=t.maxX&&n[1]>=t.minY&&n[1]<=t.maxY}function qC(n,t,e){for(var o=Math.min(n[0],t[0]),s=Math.min(n[1],t[1]),l=Math.max(n[0],t[0]),p=Math.max(n[1],t[1]),h=e.search({minX:o,minY:s,maxX:l,maxY:p}),g=0;g<h.length;g++)if(OX(h[g].p,h[g].next.p,n,t))return!1;return!0}function Zc(n,t,e){return IX(n[0],n[1],t[0],t[1],e[0],e[1])}function OX(n,t,e,o){return n!==o&&t!==e&&Zc(n,t,e)>0!=Zc(n,t,o)>0&&Zc(e,o,n)>0!=Zc(e,o,t)>0}function Wv(n){var t=n.p,e=n.next.p;return n.minX=Math.min(t[0],e[0]),n.minY=Math.min(t[1],e[1]),n.maxX=Math.max(t[0],e[0]),n.maxY=Math.max(t[1],e[1]),n}function DX(n){for(var t=n[0],e=n[0],o=n[0],s=n[0],l=0;l<n.length;l++){var p=n[l];p[0]<t[0]&&(t=p),p[0]>o[0]&&(o=p),p[1]<e[1]&&(e=p),p[1]>s[1]&&(s=p)}var h=[t,e,o,s],g=h.slice();for(l=0;l<n.length;l++)PX(n[l],h)||g.push(n[l]);return UX(g)}function HC(n,t){var e={p:n,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(e.next=t.next,e.prev=t,t.next.prev=e,t.next=e):(e.prev=e,e.next=e),e}function Xv(n,t){var e=n[0]-t[0],o=n[1]-t[1];return e*e+o*o}function Yv(n,t,e){var o=t[0],s=t[1],l=e[0]-o,p=e[1]-s;if(l!==0||p!==0){var h=((n[0]-o)*l+(n[1]-s)*p)/(l*l+p*p);h>1?(o=e[0],s=e[1]):h>0&&(o+=l*h,s+=p*h)}return l=n[0]-o,p=n[1]-s,l*l+p*p}function Kd(n,t,e,o,s,l,p,h){var g=e-n,m=o-t,v=p-s,x=h-l,E=n-s,b=t-l,T=g*g+m*m,I=g*v+m*x,S=v*v+x*x,w=g*E+m*b,R=v*E+x*b,C=T*S-I*I,F,W,X,q,D=C,xt=C;C===0?(W=0,D=1,q=R,xt=S):(W=I*R-S*w,q=T*R-I*w,W<0?(W=0,q=R,xt=S):W>D&&(W=D,q=R+I,xt=S)),q<0?(q=0,-w<0?W=0:-w>T?W=D:(W=-w,D=T)):q>xt&&(q=xt,-w+I<0?W=0:-w+I>T?W=D:(W=-w+I,D=T)),F=W===0?0:W/D,X=q===0?0:q/xt;var B=(1-F)*n+F*e,j=(1-F)*t+F*o,J=(1-X)*s+X*p,Dt=(1-X)*l+X*h,Q=J-B,At=Dt-j;return Q*Q+At*At}function FX(n,t){return n[0]===t[0]?n[1]-t[1]:n[0]-t[0]}function UX(n){n.sort(FX);for(var t=[],e=0;e<n.length;e++){for(;t.length>=2&&Zc(t[t.length-2],t[t.length-1],n[e])<=0;)t.pop();t.push(n[e])}for(var o=[],s=n.length-1;s>=0;s--){for(;o.length>=2&&Zc(o[o.length-2],o[o.length-1],n[s])<=0;)o.pop();o.push(n[s])}return o.pop(),t.pop(),t.concat(o)}});var KC=st((Jv,Kv)=>{(function(n,t){typeof Jv=="object"&&typeof Kv!="undefined"?Kv.exports=t():typeof define=="function"&&define.amd?define(t):n.quickselect=t()})(Jv,function(){"use strict";function n(s,l,p,h,g){t(s,l,p||0,h||s.length-1,g||o)}function t(s,l,p,h,g){for(;h>p;){if(h-p>600){var m=h-p+1,v=l-p+1,x=Math.log(m),E=.5*Math.exp(2*x/3),b=.5*Math.sqrt(x*E*(m-E)/m)*(v-m/2<0?-1:1),T=Math.max(p,Math.floor(l-v*E/m+b)),I=Math.min(h,Math.floor(l+(m-v)*E/m+b));t(s,l,T,I,g)}var S=s[l],w=p,R=h;for(e(s,p,l),g(s[h],S)>0&&e(s,p,h);w<R;){for(e(s,w,R),w++,R--;g(s[w],S)<0;)w++;for(;g(s[R],S)>0;)R--}g(s[p],S)===0?e(s,p,R):(R++,e(s,R,h)),R<=l&&(p=R+1),l<=R&&(h=R-1)}}function e(s,l,p){var h=s[l];s[l]=s[p],s[p]=h}function o(s,l){return s<l?-1:s>l?1:0}return n})});var e_=st((zrt,t_)=>{"use strict";t_.exports=ph;t_.exports.default=ph;var JX=KC();function ph(n,t){if(!(this instanceof ph))return new ph(n,t);this._maxEntries=Math.max(4,n||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),t&&this._initFormat(t),this.clear()}ph.prototype={all:function(){return this._all(this.data,[])},search:function(n){var t=this.data,e=[],o=this.toBBox;if(!tg(n,t))return e;for(var s=[],l,p,h,g;t;){for(l=0,p=t.children.length;l<p;l++)h=t.children[l],g=t.leaf?o(h):h,tg(n,g)&&(t.leaf?e.push(h):Qv(n,g)?this._all(h,e):s.push(h));t=s.pop()}return e},collides:function(n){var t=this.data,e=this.toBBox;if(!tg(n,t))return!1;for(var o=[],s,l,p,h;t;){for(s=0,l=t.children.length;s<l;s++)if(p=t.children[s],h=t.leaf?e(p):p,tg(n,h)){if(t.leaf||Qv(n,h))return!0;o.push(p)}t=o.pop()}return!1},load:function(n){if(!(n&&n.length))return this;if(n.length<this._minEntries){for(var t=0,e=n.length;t<e;t++)this.insert(n[t]);return this}var o=this._build(n.slice(),0,n.length-1,0);if(!this.data.children.length)this.data=o;else if(this.data.height===o.height)this._splitRoot(this.data,o);else{if(this.data.height<o.height){var s=this.data;this.data=o,o=s}this._insert(o,this.data.height-o.height-1,!0)}return this},insert:function(n){return n&&this._insert(n,this.data.height-1),this},clear:function(){return this.data=jc([]),this},remove:function(n,t){if(!n)return this;for(var e=this.data,o=this.toBBox(n),s=[],l=[],p,h,g,m;e||s.length;){if(e||(e=s.pop(),h=s[s.length-1],p=l.pop(),m=!0),e.leaf&&(g=KX(n,e.children,t),g!==-1))return e.children.splice(g,1),s.push(e),this._condense(s),this;!m&&!e.leaf&&Qv(e,o)?(s.push(e),l.push(p),p=0,h=e,e=e.children[0]):h?(p++,e=h.children[p],m=!1):e=null}return this},toBBox:function(n){return n},compareMinX:jC,compareMinY:QC,toJSON:function(){return this.data},fromJSON:function(n){return this.data=n,this},_all:function(n,t){for(var e=[];n;)n.leaf?t.push.apply(t,n.children):e.push.apply(e,n.children),n=e.pop();return t},_build:function(n,t,e,o){var s=e-t+1,l=this._maxEntries,p;if(s<=l)return p=jc(n.slice(t,e+1)),Kc(p,this.toBBox),p;o||(o=Math.ceil(Math.log(s)/Math.log(l)),l=Math.ceil(s/Math.pow(l,o-1))),p=jc([]),p.leaf=!1,p.height=o;var h=Math.ceil(s/l),g=h*Math.ceil(Math.sqrt(l)),m,v,x,E;for(tP(n,t,e,g,this.compareMinX),m=t;m<=e;m+=g)for(x=Math.min(m+g-1,e),tP(n,m,x,h,this.compareMinY),v=m;v<=x;v+=h)E=Math.min(v+h-1,x),p.children.push(this._build(n,v,E,o-1));return Kc(p,this.toBBox),p},_chooseSubtree:function(n,t,e,o){for(var s,l,p,h,g,m,v,x;o.push(t),!(t.leaf||o.length-1===e);){for(v=x=1/0,s=0,l=t.children.length;s<l;s++)p=t.children[s],g=jv(p),m=jX(n,p)-g,m<x?(x=m,v=g<v?g:v,h=p):m===x&&g<v&&(v=g,h=p);t=h||t.children[0]}return t},_insert:function(n,t,e){var o=this.toBBox,s=e?n:o(n),l=[],p=this._chooseSubtree(s,this.data,t,l);for(p.children.push(n),hh(p,s);t>=0&&l[t].children.length>this._maxEntries;)this._split(l,t),t--;this._adjustParentBBoxes(s,l,t)},_split:function(n,t){var e=n[t],o=e.children.length,s=this._minEntries;this._chooseSplitAxis(e,s,o);var l=this._chooseSplitIndex(e,s,o),p=jc(e.children.splice(l,e.children.length-l));p.height=e.height,p.leaf=e.leaf,Kc(e,this.toBBox),Kc(p,this.toBBox),t?n[t-1].children.push(p):this._splitRoot(e,p)},_splitRoot:function(n,t){this.data=jc([n,t]),this.data.height=n.height+1,this.data.leaf=!1,Kc(this.data,this.toBBox)},_chooseSplitIndex:function(n,t,e){var o,s,l,p,h,g,m,v;for(g=m=1/0,o=t;o<=e-t;o++)s=fh(n,0,o,this.toBBox),l=fh(n,o,e,this.toBBox),p=QX(s,l),h=jv(s)+jv(l),p<g?(g=p,v=o,m=h<m?h:m):p===g&&h<m&&(m=h,v=o);return v},_chooseSplitAxis:function(n,t,e){var o=n.leaf?this.compareMinX:jC,s=n.leaf?this.compareMinY:QC,l=this._allDistMargin(n,t,e,o),p=this._allDistMargin(n,t,e,s);l<p&&n.children.sort(o)},_allDistMargin:function(n,t,e,o){n.children.sort(o);var s=this.toBBox,l=fh(n,0,t,s),p=fh(n,e-t,e,s),h=Qd(l)+Qd(p),g,m;for(g=t;g<e-t;g++)m=n.children[g],hh(l,n.leaf?s(m):m),h+=Qd(l);for(g=e-t-1;g>=t;g--)m=n.children[g],hh(p,n.leaf?s(m):m),h+=Qd(p);return h},_adjustParentBBoxes:function(n,t,e){for(var o=e;o>=0;o--)hh(t[o],n)},_condense:function(n){for(var t=n.length-1,e;t>=0;t--)n[t].children.length===0?t>0?(e=n[t-1].children,e.splice(e.indexOf(n[t]),1)):this.clear():Kc(n[t],this.toBBox)},_initFormat:function(n){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(n[0])),this.compareMinY=new Function("a","b",t.join(n[1])),this.toBBox=new Function("a","return {minX: a"+n[0]+", minY: a"+n[1]+", maxX: a"+n[2]+", maxY: a"+n[3]+"};")}};function KX(n,t,e){if(!e)return t.indexOf(n);for(var o=0;o<t.length;o++)if(e(n,t[o]))return o;return-1}function Kc(n,t){fh(n,0,n.children.length,t,n)}function fh(n,t,e,o,s){s||(s=jc(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var l=t,p;l<e;l++)p=n.children[l],hh(s,n.leaf?o(p):p);return s}function hh(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function jC(n,t){return n.minX-t.minX}function QC(n,t){return n.minY-t.minY}function jv(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function Qd(n){return n.maxX-n.minX+(n.maxY-n.minY)}function jX(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function QX(n,t){var e=Math.max(n.minX,t.minX),o=Math.max(n.minY,t.minY),s=Math.min(n.maxX,t.maxX),l=Math.min(n.maxY,t.maxY);return Math.max(0,s-e)*Math.max(0,l-o)}function Qv(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function tg(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function jc(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function tP(n,t,e,o,s){for(var l=[t,e],p;l.length;)e=l.pop(),t=l.pop(),!(e-t<=o)&&(p=t+Math.ceil((e-t)/o/2)*o,JX(n,p,t,e,s),l.push(t,p,p,e))}});var sP=st((jit,a_)=>{"use strict";a_.exports=ig;a_.exports.default=ig;function ig(n,t,e){e=e||2;var o=t&&t.length,s=o?t[0]*e:n.length,l=rP(n,0,s,e,!0),p=[];if(!l||l.next===l.prev)return p;var h,g,m,v,x,E,b;if(o&&(l=l7(n,t,l,e)),n.length>80*e){h=m=n[0],g=v=n[1];for(var T=e;T<s;T+=e)x=n[T],E=n[T+1],x<h&&(h=x),E<g&&(g=E),x>m&&(m=x),E>v&&(v=E);b=Math.max(m-h,v-g),b=b!==0?32767/b:0}return mh(l,p,e,h,g,b,0),p}function rP(n,t,e,o,s){var l,p;if(s===s_(n,t,e,o)>0)for(l=t;l<e;l+=o)p=nP(l,n[l],n[l+1],p);else for(l=e-o;l>=t;l-=o)p=nP(l,n[l],n[l+1],p);return p&&og(p,p.next)&&(vh(p),p=p.next),p}function kl(n,t){if(!n)return n;t||(t=n);var e=n,o;do if(o=!1,!e.steiner&&(og(e,e.next)||Hr(e.prev,e,e.next)===0)){if(vh(e),e=t=e.prev,e===e.next)break;o=!0}else e=e.next;while(o||e!==t);return t}function mh(n,t,e,o,s,l,p){if(n){!p&&l&&d7(n,o,s,l);for(var h=n,g,m;n.prev!==n.next;){if(g=n.prev,m=n.next,l?s7(n,o,s,l):o7(n)){t.push(g.i/e|0),t.push(n.i/e|0),t.push(m.i/e|0),vh(n),n=m.next,h=m.next;continue}if(n=m,n===h){p?p===1?(n=a7(kl(n),t,e),mh(n,t,e,o,s,l,2)):p===2&&u7(n,t,e,o,s,l):mh(kl(n),t,e,o,s,l,1);break}}}}function o7(n){var t=n.prev,e=n,o=n.next;if(Hr(t,e,o)>=0)return!1;for(var s=t.x,l=e.x,p=o.x,h=t.y,g=e.y,m=o.y,v=s<l?s<p?s:p:l<p?l:p,x=h<g?h<m?h:m:g<m?g:m,E=s>l?s>p?s:p:l>p?l:p,b=h>g?h>m?h:m:g>m?g:m,T=o.next;T!==t;){if(T.x>=v&&T.x<=E&&T.y>=x&&T.y<=b&&ef(s,h,l,g,p,m,T.x,T.y)&&Hr(T.prev,T,T.next)>=0)return!1;T=T.next}return!0}function s7(n,t,e,o){var s=n.prev,l=n,p=n.next;if(Hr(s,l,p)>=0)return!1;for(var h=s.x,g=l.x,m=p.x,v=s.y,x=l.y,E=p.y,b=h<g?h<m?h:m:g<m?g:m,T=v<x?v<E?v:E:x<E?x:E,I=h>g?h>m?h:m:g>m?g:m,S=v>x?v>E?v:E:x>E?x:E,w=i_(b,T,t,e,o),R=i_(I,S,t,e,o),C=n.prevZ,F=n.nextZ;C&&C.z>=w&&F&&F.z<=R;){if(C.x>=b&&C.x<=I&&C.y>=T&&C.y<=S&&C!==s&&C!==p&&ef(h,v,g,x,m,E,C.x,C.y)&&Hr(C.prev,C,C.next)>=0||(C=C.prevZ,F.x>=b&&F.x<=I&&F.y>=T&&F.y<=S&&F!==s&&F!==p&&ef(h,v,g,x,m,E,F.x,F.y)&&Hr(F.prev,F,F.next)>=0))return!1;F=F.nextZ}for(;C&&C.z>=w;){if(C.x>=b&&C.x<=I&&C.y>=T&&C.y<=S&&C!==s&&C!==p&&ef(h,v,g,x,m,E,C.x,C.y)&&Hr(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;F&&F.z<=R;){if(F.x>=b&&F.x<=I&&F.y>=T&&F.y<=S&&F!==s&&F!==p&&ef(h,v,g,x,m,E,F.x,F.y)&&Hr(F.prev,F,F.next)>=0)return!1;F=F.nextZ}return!0}function a7(n,t,e){var o=n;do{var s=o.prev,l=o.next.next;!og(s,l)&&iP(s,o,o.next,l)&&yh(s,l)&&yh(l,s)&&(t.push(s.i/e|0),t.push(o.i/e|0),t.push(l.i/e|0),vh(o),vh(o.next),o=n=l),o=o.next}while(o!==n);return kl(o)}function u7(n,t,e,o,s,l){var p=n;do{for(var h=p.next.next;h!==p.prev;){if(p.i!==h.i&&y7(p,h)){var g=oP(p,h);p=kl(p,p.next),g=kl(g,g.next),mh(p,t,e,o,s,l,0),mh(g,t,e,o,s,l,0);return}h=h.next}p=p.next}while(p!==n)}function l7(n,t,e,o){var s=[],l,p,h,g,m;for(l=0,p=t.length;l<p;l++)h=t[l]*o,g=l<p-1?t[l+1]*o:n.length,m=rP(n,h,g,o,!1),m===m.next&&(m.steiner=!0),s.push(m7(m));for(s.sort(c7),l=0;l<s.length;l++)e=f7(s[l],e);return e}function c7(n,t){return n.x-t.x}function f7(n,t){var e=h7(n,t);if(!e)return t;var o=oP(e,n);return kl(o,o.next),kl(e,e.next)}function h7(n,t){var e=t,o=n.x,s=n.y,l=-1/0,p;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var h=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=o&&h>l&&(l=h,p=e.x<e.next.x?e:e.next,h===o))return p}e=e.next}while(e!==t);if(!p)return null;var g=p,m=p.x,v=p.y,x=1/0,E;e=p;do o>=e.x&&e.x>=m&&o!==e.x&&ef(s<v?o:l,s,m,v,s<v?l:o,s,e.x,e.y)&&(E=Math.abs(s-e.y)/(o-e.x),yh(e,n)&&(E<x||E===x&&(e.x>p.x||e.x===p.x&&p7(p,e)))&&(p=e,x=E)),e=e.next;while(e!==g);return p}function p7(n,t){return Hr(n.prev,n,t.prev)<0&&Hr(t.next,n,n.next)<0}function d7(n,t,e,o){var s=n;do s.z===0&&(s.z=i_(s.x,s.y,t,e,o)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,g7(s)}function g7(n){var t,e,o,s,l,p,h,g,m=1;do{for(e=n,n=null,l=null,p=0;e;){for(p++,o=e,h=0,t=0;t<m&&(h++,o=o.nextZ,!!o);t++);for(g=m;h>0||g>0&&o;)h!==0&&(g===0||!o||e.z<=o.z)?(s=e,e=e.nextZ,h--):(s=o,o=o.nextZ,g--),l?l.nextZ=s:n=s,s.prevZ=l,l=s;e=o}l.nextZ=null,m*=2}while(p>1);return n}function i_(n,t,e,o,s){return n=(n-e)*s|0,t=(t-o)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n|t<<1}function m7(n){var t=n,e=n;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==n);return e}function ef(n,t,e,o,s,l,p,h){return(s-p)*(t-h)>=(n-p)*(l-h)&&(n-p)*(o-h)>=(e-p)*(t-h)&&(e-p)*(l-h)>=(s-p)*(o-h)}function y7(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!v7(n,t)&&(yh(n,t)&&yh(t,n)&&_7(n,t)&&(Hr(n.prev,n,t.prev)||Hr(n,t.prev,t))||og(n,t)&&Hr(n.prev,n,n.next)>0&&Hr(t.prev,t,t.next)>0)}function Hr(n,t,e){return(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y)}function og(n,t){return n.x===t.x&&n.y===t.y}function iP(n,t,e,o){var s=rg(Hr(n,t,e)),l=rg(Hr(n,t,o)),p=rg(Hr(e,o,n)),h=rg(Hr(e,o,t));return!!(s!==l&&p!==h||s===0&&ng(n,e,t)||l===0&&ng(n,o,t)||p===0&&ng(e,n,o)||h===0&&ng(e,t,o))}function ng(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.y<=Math.max(n.y,e.y)&&t.y>=Math.min(n.y,e.y)}function rg(n){return n>0?1:n<0?-1:0}function v7(n,t){var e=n;do{if(e.i!==n.i&&e.next.i!==n.i&&e.i!==t.i&&e.next.i!==t.i&&iP(e,e.next,n,t))return!0;e=e.next}while(e!==n);return!1}function yh(n,t){return Hr(n.prev,n,n.next)<0?Hr(n,t,n.next)>=0&&Hr(n,n.prev,t)>=0:Hr(n,t,n.prev)<0||Hr(n,n.next,t)<0}function _7(n,t){var e=n,o=!1,s=(n.x+t.x)/2,l=(n.y+t.y)/2;do e.y>l!=e.next.y>l&&e.next.y!==e.y&&s<(e.next.x-e.x)*(l-e.y)/(e.next.y-e.y)+e.x&&(o=!o),e=e.next;while(e!==n);return o}function oP(n,t){var e=new o_(n.i,n.x,n.y),o=new o_(t.i,t.x,t.y),s=n.next,l=t.prev;return n.next=t,t.prev=n,e.next=s,s.prev=e,o.next=e,e.prev=o,l.next=o,o.prev=l,o}function nP(n,t,e,o){var s=new o_(n,t,e);return o?(s.next=o.next,s.prev=o,o.next.prev=s,o.next=s):(s.prev=s,s.next=s),s}function vh(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function o_(n,t,e){this.i=n,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ig.deviation=function(n,t,e,o){var s=t&&t.length,l=s?t[0]*e:n.length,p=Math.abs(s_(n,0,l,e));if(s)for(var h=0,g=t.length;h<g;h++){var m=t[h]*e,v=h<g-1?t[h+1]*e:n.length;p-=Math.abs(s_(n,m,v,e))}var x=0;for(h=0;h<o.length;h+=3){var E=o[h]*e,b=o[h+1]*e,T=o[h+2]*e;x+=Math.abs((n[E]-n[T])*(n[b+1]-n[E+1])-(n[E]-n[b])*(n[T+1]-n[E+1]))}return p===0&&x===0?0:Math.abs((x-p)/p)};function s_(n,t,e,o){for(var s=0,l=t,p=e-o;l<e;l+=o)s+=(n[p]-n[l])*(n[l+1]+n[p+1]),p=l;return s}ig.flatten=function(n){for(var t=n[0][0].length,e={vertices:[],holes:[],dimensions:t},o=0,s=0;s<n.length;s++){for(var l=0;l<n[s].length;l++)for(var p=0;p<t;p++)e.vertices.push(n[s][l][p]);s>0&&(o+=n[s-1].length,e.holes.push(o))}return e}});var h_=st(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.earthRadius=63710088e-1;Oe.factors={centimeters:Oe.earthRadius*100,centimetres:Oe.earthRadius*100,degrees:Oe.earthRadius/111325,feet:Oe.earthRadius*3.28084,inches:Oe.earthRadius*39.37,kilometers:Oe.earthRadius/1e3,kilometres:Oe.earthRadius/1e3,meters:Oe.earthRadius,metres:Oe.earthRadius,miles:Oe.earthRadius/1609.344,millimeters:Oe.earthRadius*1e3,millimetres:Oe.earthRadius*1e3,nauticalmiles:Oe.earthRadius/1852,radians:1,yards:Oe.earthRadius*1.0936};Oe.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Oe.earthRadius,yards:1.0936133};Oe.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};function nl(n,t,e){e===void 0&&(e={});var o={type:"Feature"};return(e.id===0||e.id)&&(o.id=e.id),e.bbox&&(o.bbox=e.bbox),o.properties=t||{},o.geometry=n,o}Oe.feature=nl;function E7(n,t,e){switch(e===void 0&&(e={}),n){case"Point":return u_(t).geometry;case"LineString":return c_(t).geometry;case"Polygon":return l_(t).geometry;case"MultiPoint":return uP(t).geometry;case"MultiLineString":return aP(t).geometry;case"MultiPolygon":return lP(t).geometry;default:throw new Error(n+" is invalid")}}Oe.geometry=E7;function u_(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!sg(n[0])||!sg(n[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:n};return nl(o,t,e)}Oe.point=u_;function w7(n,t,e){return e===void 0&&(e={}),ag(n.map(function(o){return u_(o,t)}),e)}Oe.points=w7;function l_(n,t,e){e===void 0&&(e={});for(var o=0,s=n;o<s.length;o++){var l=s[o];if(l.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var p=0;p<l[l.length-1].length;p++)if(l[l.length-1][p]!==l[0][p])throw new Error("First and last Position are not equivalent.")}var h={type:"Polygon",coordinates:n};return nl(h,t,e)}Oe.polygon=l_;function S7(n,t,e){return e===void 0&&(e={}),ag(n.map(function(o){return l_(o,t)}),e)}Oe.polygons=S7;function c_(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var o={type:"LineString",coordinates:n};return nl(o,t,e)}Oe.lineString=c_;function M7(n,t,e){return e===void 0&&(e={}),ag(n.map(function(o){return c_(o,t)}),e)}Oe.lineStrings=M7;function ag(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}Oe.featureCollection=ag;function aP(n,t,e){e===void 0&&(e={});var o={type:"MultiLineString",coordinates:n};return nl(o,t,e)}Oe.multiLineString=aP;function uP(n,t,e){e===void 0&&(e={});var o={type:"MultiPoint",coordinates:n};return nl(o,t,e)}Oe.multiPoint=uP;function lP(n,t,e){e===void 0&&(e={});var o={type:"MultiPolygon",coordinates:n};return nl(o,t,e)}Oe.multiPolygon=lP;function b7(n,t,e){e===void 0&&(e={});var o={type:"GeometryCollection",geometries:n};return nl(o,t,e)}Oe.geometryCollection=b7;function A7(n,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var e=Math.pow(10,t||0);return Math.round(n*e)/e}Oe.round=A7;function cP(n,t){t===void 0&&(t="kilometers");var e=Oe.factors[t];if(!e)throw new Error(t+" units is invalid");return n*e}Oe.radiansToLength=cP;function f_(n,t){t===void 0&&(t="kilometers");var e=Oe.factors[t];if(!e)throw new Error(t+" units is invalid");return n/e}Oe.lengthToRadians=f_;function T7(n,t){return fP(f_(n,t))}Oe.lengthToDegrees=T7;function C7(n){var t=n%360;return t<0&&(t+=360),t}Oe.bearingToAzimuth=C7;function fP(n){var t=n%(2*Math.PI);return t*180/Math.PI}Oe.radiansToDegrees=fP;function P7(n){var t=n%360;return t*Math.PI/180}Oe.degreesToRadians=P7;function I7(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return cP(f_(n,t),e)}Oe.convertLength=I7;function R7(n,t,e){if(t===void 0&&(t="meters"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("area must be a positive number");var o=Oe.areaFactors[t];if(!o)throw new Error("invalid original units");var s=Oe.areaFactors[e];if(!s)throw new Error("invalid final units");return n/o*s}Oe.convertArea=R7;function sg(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}Oe.isNumber=sg;function L7(n){return!!n&&n.constructor===Object}Oe.isObject=L7;function N7(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(function(t){if(!sg(t))throw new Error("bbox must only contain numbers")})}Oe.validateBBox=N7;function O7(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}Oe.validateId=O7});var d_=st(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var co=h_();function _h(n,t,e){if(n!==null)for(var o,s,l,p,h,g,m,v=0,x=0,E,b=n.type,T=b==="FeatureCollection",I=b==="Feature",S=T?n.features.length:1,w=0;w<S;w++){m=T?n.features[w].geometry:I?n.geometry:n,E=m?m.type==="GeometryCollection":!1,h=E?m.geometries.length:1;for(var R=0;R<h;R++){var C=0,F=0;if(p=E?m.geometries[R]:m,p!==null){g=p.coordinates;var W=p.type;switch(v=e&&(W==="Polygon"||W==="MultiPolygon")?1:0,W){case null:break;case"Point":if(t(g,x,w,C,F)===!1)return!1;x++,C++;break;case"LineString":case"MultiPoint":for(o=0;o<g.length;o++){if(t(g[o],x,w,C,F)===!1)return!1;x++,W==="MultiPoint"&&C++}W==="LineString"&&C++;break;case"Polygon":case"MultiLineString":for(o=0;o<g.length;o++){for(s=0;s<g[o].length-v;s++){if(t(g[o][s],x,w,C,F)===!1)return!1;x++}W==="MultiLineString"&&C++,W==="Polygon"&&F++}W==="Polygon"&&C++;break;case"MultiPolygon":for(o=0;o<g.length;o++){for(F=0,s=0;s<g[o].length;s++){for(l=0;l<g[o][s].length-v;l++){if(t(g[o][s][l],x,w,C,F)===!1)return!1;x++}F++}C++}break;case"GeometryCollection":for(o=0;o<p.geometries.length;o++)if(_h(p.geometries[o],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function D7(n,t,e,o){var s=e;return _h(n,function(l,p,h,g,m){p===0&&e===void 0?s=l:s=t(s,l,p,h,g,m)},o),s}function hP(n,t){var e;switch(n.type){case"FeatureCollection":for(e=0;e<n.features.length&&t(n.features[e].properties,e)!==!1;e++);break;case"Feature":t(n.properties,0);break}}function F7(n,t,e){var o=e;return hP(n,function(s,l){l===0&&e===void 0?o=s:o=t(o,s,l)}),o}function pP(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function U7(n,t,e){var o=e;return pP(n,function(s,l){l===0&&e===void 0?o=s:o=t(o,s,l)}),o}function B7(n){var t=[];return _h(n,function(e){t.push(e)}),t}function p_(n,t){var e,o,s,l,p,h,g,m,v,x,E=0,b=n.type==="FeatureCollection",T=n.type==="Feature",I=b?n.features.length:1;for(e=0;e<I;e++){for(h=b?n.features[e].geometry:T?n.geometry:n,m=b?n.features[e].properties:T?n.properties:{},v=b?n.features[e].bbox:T?n.bbox:void 0,x=b?n.features[e].id:T?n.id:void 0,g=h?h.type==="GeometryCollection":!1,p=g?h.geometries.length:1,s=0;s<p;s++){if(l=g?h.geometries[s]:h,l===null){if(t(null,E,m,v,x)===!1)return!1;continue}switch(l.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(l,E,m,v,x)===!1)return!1;break}case"GeometryCollection":{for(o=0;o<l.geometries.length;o++)if(t(l.geometries[o],E,m,v,x)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}E++}}function z7(n,t,e){var o=e;return p_(n,function(s,l,p,h,g){l===0&&e===void 0?o=s:o=t(o,s,l,p,h,g)}),o}function ug(n,t){p_(n,function(e,o,s,l,p){var h=e===null?null:e.type;switch(h){case null:case"Point":case"LineString":case"Polygon":return t(co.feature(e,s,{bbox:l,id:p}),o,0)===!1?!1:void 0}var g;switch(h){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var m=0;m<e.coordinates.length;m++){var v=e.coordinates[m],x={type:g,coordinates:v};if(t(co.feature(x,s),o,m)===!1)return!1}})}function G7(n,t,e){var o=e;return ug(n,function(s,l,p){l===0&&p===0&&e===void 0?o=s:o=t(o,s,l,p)}),o}function dP(n,t){ug(n,function(e,o,s){var l=0;if(e.geometry){var p=e.geometry.type;if(!(p==="Point"||p==="MultiPoint")){var h,g=0,m=0,v=0;if(_h(e,function(x,E,b,T,I){if(h===void 0||o>g||T>m||I>v){h=x,g=o,m=T,v=I,l=0;return}var S=co.lineString([h,x],e.properties);if(t(S,o,s,I,l)===!1)return!1;l++,h=x})===!1)return!1}}})}function k7(n,t,e){var o=e,s=!1;return dP(n,function(l,p,h,g,m){s===!1&&e===void 0?o=l:o=t(o,l,p,h,g,m),s=!0}),o}function gP(n,t){if(!n)throw new Error("geojson is required");ug(n,function(e,o,s){if(e.geometry!==null){var l=e.geometry.type,p=e.geometry.coordinates;switch(l){case"LineString":if(t(e,o,s,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h<p.length;h++)if(t(co.lineString(p[h],e.properties),o,s,h)===!1)return!1;break}}})}function q7(n,t,e){var o=e;return gP(n,function(s,l,p,h){l===0&&e===void 0?o=s:o=t(o,s,l,p,h)}),o}function H7(n,t){if(t=t||{},!co.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,l=t.segmentIndex||0,p=t.properties,h;switch(n.type){case"FeatureCollection":e<0&&(e=n.features.length+e),p=p||n.features[e].properties,h=n.features[e].geometry;break;case"Feature":p=p||n.properties,h=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":h=n;break;default:throw new Error("geojson is invalid")}if(h===null)return null;var g=h.coordinates;switch(h.type){case"Point":case"MultiPoint":return null;case"LineString":return l<0&&(l=g.length+l-1),co.lineString([g[l],g[l+1]],p,t);case"Polygon":return s<0&&(s=g.length+s),l<0&&(l=g[s].length+l-1),co.lineString([g[s][l],g[s][l+1]],p,t);case"MultiLineString":return o<0&&(o=g.length+o),l<0&&(l=g[o].length+l-1),co.lineString([g[o][l],g[o][l+1]],p,t);case"MultiPolygon":return o<0&&(o=g.length+o),s<0&&(s=g[o].length+s),l<0&&(l=g[o][s].length-l-1),co.lineString([g[o][s][l],g[o][s][l+1]],p,t)}throw new Error("geojson is invalid")}function V7(n,t){if(t=t||{},!co.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,l=t.coordIndex||0,p=t.properties,h;switch(n.type){case"FeatureCollection":e<0&&(e=n.features.length+e),p=p||n.features[e].properties,h=n.features[e].geometry;break;case"Feature":p=p||n.properties,h=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":h=n;break;default:throw new Error("geojson is invalid")}if(h===null)return null;var g=h.coordinates;switch(h.type){case"Point":return co.point(g,p,t);case"MultiPoint":return o<0&&(o=g.length+o),co.point(g[o],p,t);case"LineString":return l<0&&(l=g.length+l),co.point(g[l],p,t);case"Polygon":return s<0&&(s=g.length+s),l<0&&(l=g[s].length+l),co.point(g[s][l],p,t);case"MultiLineString":return o<0&&(o=g.length+o),l<0&&(l=g[o].length+l),co.point(g[o][l],p,t);case"MultiPolygon":return o<0&&(o=g.length+o),s<0&&(s=g[o].length+s),l<0&&(l=g[o][s].length-l),co.point(g[o][s][l],p,t)}throw new Error("geojson is invalid")}Si.coordAll=B7;Si.coordEach=_h;Si.coordReduce=D7;Si.featureEach=pP;Si.featureReduce=U7;Si.findPoint=V7;Si.findSegment=H7;Si.flattenEach=ug;Si.flattenReduce=G7;Si.geomEach=p_;Si.geomReduce=z7;Si.lineEach=gP;Si.lineReduce=q7;Si.propEach=hP;Si.propReduce=F7;Si.segmentEach=dP;Si.segmentReduce=k7});var mP=st(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var W7=d_();function g_(n){var t=[1/0,1/0,-1/0,-1/0];return W7.coordEach(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}g_.default=g_;m_.default=g_});var lg=st((dot,y_)=>{var La=qv(),vP=h_(),_P=d_(),nf=mP().default,X7=_P.featureEach,hot=_P.coordEach,pot=vP.polygon,yP=vP.featureCollection;function xP(n){var t=new La(n);return t.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:nf(e),La.prototype.insert.call(this,e)},t.load=function(e){var o=[];return Array.isArray(e)?e.forEach(function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:nf(s),o.push(s)}):X7(e,function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:nf(s),o.push(s)}),La.prototype.load.call(this,o)},t.remove=function(e,o){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:nf(e),La.prototype.remove.call(this,e,o)},t.clear=function(){return La.prototype.clear.call(this)},t.search=function(e){var o=La.prototype.search.call(this,this.toBBox(e));return yP(o)},t.collides=function(e){return La.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=La.prototype.all.call(this);return yP(e)},t.toJSON=function(){return La.prototype.toJSON.call(this)},t.fromJSON=function(e){return La.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var o;if(e.bbox)o=e.bbox;else if(Array.isArray(e)&&e.length===4)o=e;else if(Array.isArray(e)&&e.length===6)o=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")o=nf(e);else if(e.type==="FeatureCollection")o=nf(e);else throw new Error("invalid geojson");return{minX:o[0],minY:o[1],maxX:o[2],maxY:o[3]}},t}y_.exports=xP;y_.exports.default=xP});var S_=st((Sat,IP)=>{"use strict";var PP=Object.prototype.toString;IP.exports=function(t){var e=PP.call(t),o=e==="[object Arguments]";return o||(o=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&PP.call(t.callee)==="[object Function]"),o}});var zP=st((Mat,BP)=>{"use strict";var UP;Object.keys||(wh=Object.prototype.hasOwnProperty,M_=Object.prototype.toString,RP=S_(),b_=Object.prototype.propertyIsEnumerable,LP=!b_.call({toString:null},"toString"),NP=b_.call(function(){},"prototype"),Sh=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dg=function(n){var t=n.constructor;return t&&t.prototype===n},OP={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},DP=function(){if(typeof window=="undefined")return!1;for(var n in window)try{if(!OP["$"+n]&&wh.call(window,n)&&window[n]!==null&&typeof window[n]=="object")try{dg(window[n])}catch(t){return!0}}catch(t){return!0}return!1}(),FP=function(n){if(typeof window=="undefined"||!DP)return dg(n);try{return dg(n)}catch(t){return!1}},UP=function(t){var e=t!==null&&typeof t=="object",o=M_.call(t)==="[object Function]",s=RP(t),l=e&&M_.call(t)==="[object String]",p=[];if(!e&&!o&&!s)throw new TypeError("Object.keys called on a non-object");var h=NP&&o;if(l&&t.length>0&&!wh.call(t,0))for(var g=0;g<t.length;++g)p.push(String(g));if(s&&t.length>0)for(var m=0;m<t.length;++m)p.push(String(m));else for(var v in t)!(h&&v==="prototype")&&wh.call(t,v)&&p.push(String(v));if(LP)for(var x=FP(t),E=0;E<Sh.length;++E)!(x&&Sh[E]==="constructor")&&wh.call(t,Sh[E])&&p.push(Sh[E]);return p});var wh,M_,RP,b_,LP,NP,Sh,dg,OP,DP,FP;BP.exports=UP});var A_=st((bat,qP)=>{"use strict";var nY=Array.prototype.slice,rY=S_(),GP=Object.keys,gg=GP?function(t){return GP(t)}:zP(),kP=Object.keys;gg.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(o){return rY(o)?kP(nY.call(o)):kP(o)})}else Object.keys=gg;return Object.keys||gg};qP.exports=gg});var T_=st((Aat,HP)=>{"use strict";HP.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),o=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;t[e]=s;for(var l in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var p=Object.getOwnPropertySymbols(t);if(p.length!==1||p[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(t,e);if(h.value!==s||h.enumerable!==!0)return!1}return!0}});var mg=st((Tat,VP)=>{"use strict";var iY=T_();VP.exports=function(){return iY()&&!!Symbol.toStringTag}});var C_=st((Cat,WP)=>{"use strict";WP.exports=Object});var P_=st((Pat,XP)=>{"use strict";XP.exports=Error});var $P=st((Iat,YP)=>{"use strict";YP.exports=EvalError});var JP=st((Rat,ZP)=>{"use strict";ZP.exports=RangeError});var jP=st((Lat,KP)=>{"use strict";KP.exports=ReferenceError});var I_=st((Nat,QP)=>{"use strict";QP.exports=SyntaxError});var ql=st((Oat,tI)=>{"use strict";tI.exports=TypeError});var nI=st((Dat,eI)=>{"use strict";eI.exports=URIError});var iI=st((Fat,rI)=>{"use strict";rI.exports=Math.abs});var sI=st((Uat,oI)=>{"use strict";oI.exports=Math.floor});var uI=st((Bat,aI)=>{"use strict";aI.exports=Math.max});var cI=st((zat,lI)=>{"use strict";lI.exports=Math.min});var hI=st((Gat,fI)=>{"use strict";fI.exports=Math.pow});var dI=st((kat,pI)=>{"use strict";pI.exports=Math.round});var mI=st((qat,gI)=>{"use strict";gI.exports=Number.isNaN||function(t){return t!==t}});var vI=st((Hat,yI)=>{"use strict";var oY=mI();yI.exports=function(t){return oY(t)||t===0?t:t<0?-1:1}});var xI=st((Vat,_I)=>{"use strict";_I.exports=Object.getOwnPropertyDescriptor});var Hl=st((Wat,EI)=>{"use strict";var yg=xI();if(yg)try{yg([],"length")}catch(n){yg=null}EI.exports=yg});var Mh=st((Xat,wI)=>{"use strict";var vg=Object.defineProperty||!1;if(vg)try{vg({},"a",{value:1})}catch(n){vg=!1}wI.exports=vg});var bI=st((Yat,MI)=>{"use strict";var SI=typeof Symbol!="undefined"&&Symbol,sY=T_();MI.exports=function(){return typeof SI!="function"||typeof Symbol!="function"||typeof SI("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:sY()}});var R_=st(($at,AI)=>{"use strict";AI.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var L_=st((Zat,TI)=>{"use strict";var aY=C_();TI.exports=aY.getPrototypeOf||null});var II=st((Jat,PI)=>{"use strict";var uY="Function.prototype.bind called on incompatible ",lY=Object.prototype.toString,cY=Math.max,fY="[object Function]",CI=function(t,e){for(var o=[],s=0;s<t.length;s+=1)o[s]=t[s];for(var l=0;l<e.length;l+=1)o[l+t.length]=e[l];return o},hY=function(t,e){for(var o=[],s=e||0,l=0;s<t.length;s+=1,l+=1)o[l]=t[s];return o},pY=function(n,t){for(var e="",o=0;o<n.length;o+=1)e+=n[o],o+1<n.length&&(e+=t);return e};PI.exports=function(t){var e=this;if(typeof e!="function"||lY.apply(e)!==fY)throw new TypeError(uY+e);for(var o=hY(arguments,1),s,l=function(){if(this instanceof s){var v=e.apply(this,CI(o,arguments));return Object(v)===v?v:this}return e.apply(t,CI(o,arguments))},p=cY(0,e.length-o.length),h=[],g=0;g<p;g++)h[g]="$"+g;if(s=Function("binder","return function ("+pY(h,",")+"){ return binder.apply(this,arguments); }")(l),e.prototype){var m=function(){};m.prototype=e.prototype,s.prototype=new m,m.prototype=null}return s}});var rf=st((Kat,RI)=>{"use strict";var dY=II();RI.exports=Function.prototype.bind||dY});var _g=st((jat,LI)=>{"use strict";LI.exports=Function.prototype.call});var xg=st((Qat,NI)=>{"use strict";NI.exports=Function.prototype.apply});var DI=st((tut,OI)=>{"use strict";OI.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var N_=st((eut,FI)=>{"use strict";var gY=rf(),mY=xg(),yY=_g(),vY=DI();FI.exports=vY||gY.call(yY,mY)});var Eg=st((nut,UI)=>{"use strict";var _Y=rf(),xY=ql(),EY=_g(),wY=N_();UI.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new xY("a function is required");return wY(_Y,EY,t)}});var HI=st((rut,qI)=>{"use strict";var SY=Eg(),BI=Hl(),GI;try{GI=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var O_=!!GI&&BI&&BI(Object.prototype,"__proto__"),kI=Object,zI=kI.getPrototypeOf;qI.exports=O_&&typeof O_.get=="function"?SY([O_.get]):typeof zI=="function"?function(t){return zI(t==null?t:kI(t))}:!1});var D_=st((iut,YI)=>{"use strict";var VI=R_(),WI=L_(),XI=HI();YI.exports=VI?function(t){return VI(t)}:WI?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return WI(t)}:XI?function(t){return XI(t)}:null});var F_=st((out,$I)=>{"use strict";var MY=Function.prototype.call,bY=Object.prototype.hasOwnProperty,AY=rf();$I.exports=AY.call(MY,bY)});var z_=st((sut,tR)=>{"use strict";var Fn,TY=C_(),CY=P_(),PY=$P(),IY=JP(),RY=jP(),uf=I_(),af=ql(),LY=nI(),NY=iI(),OY=sI(),DY=uI(),FY=cI(),UY=hI(),BY=dI(),zY=vI(),jI=Function,U_=function(n){try{return jI('"use strict"; return ('+n+").constructor;")()}catch(t){}},bh=Hl(),GY=Mh(),B_=function(){throw new af},kY=bh?function(){try{return arguments.callee,B_}catch(n){try{return bh(arguments,"callee").get}catch(t){return B_}}}():B_,of=bI()(),qi=D_(),qY=L_(),HY=R_(),QI=xg(),Ah=_g(),sf={},VY=typeof Uint8Array=="undefined"||!qi?Fn:qi(Uint8Array),Vl={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Fn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Fn:ArrayBuffer,"%ArrayIteratorPrototype%":of&&qi?qi([][Symbol.iterator]()):Fn,"%AsyncFromSyncIteratorPrototype%":Fn,"%AsyncFunction%":sf,"%AsyncGenerator%":sf,"%AsyncGeneratorFunction%":sf,"%AsyncIteratorPrototype%":sf,"%Atomics%":typeof Atomics=="undefined"?Fn:Atomics,"%BigInt%":typeof BigInt=="undefined"?Fn:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Fn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Fn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Fn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":CY,"%eval%":eval,"%EvalError%":PY,"%Float16Array%":typeof Float16Array=="undefined"?Fn:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Fn:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Fn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Fn:FinalizationRegistry,"%Function%":jI,"%GeneratorFunction%":sf,"%Int8Array%":typeof Int8Array=="undefined"?Fn:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Fn:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Fn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":of&&qi?qi(qi([][Symbol.iterator]())):Fn,"%JSON%":typeof JSON=="object"?JSON:Fn,"%Map%":typeof Map=="undefined"?Fn:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!of||!qi?Fn:qi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":TY,"%Object.getOwnPropertyDescriptor%":bh,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Fn:Promise,"%Proxy%":typeof Proxy=="undefined"?Fn:Proxy,"%RangeError%":IY,"%ReferenceError%":RY,"%Reflect%":typeof Reflect=="undefined"?Fn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Fn:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!of||!qi?Fn:qi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Fn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":of&&qi?qi(""[Symbol.iterator]()):Fn,"%Symbol%":of?Symbol:Fn,"%SyntaxError%":uf,"%ThrowTypeError%":kY,"%TypedArray%":VY,"%TypeError%":af,"%Uint8Array%":typeof Uint8Array=="undefined"?Fn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Fn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Fn:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Fn:Uint32Array,"%URIError%":LY,"%WeakMap%":typeof WeakMap=="undefined"?Fn:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Fn:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Fn:WeakSet,"%Function.prototype.call%":Ah,"%Function.prototype.apply%":QI,"%Object.defineProperty%":GY,"%Object.getPrototypeOf%":qY,"%Math.abs%":NY,"%Math.floor%":OY,"%Math.max%":DY,"%Math.min%":FY,"%Math.pow%":UY,"%Math.round%":BY,"%Math.sign%":zY,"%Reflect.getPrototypeOf%":HY};if(qi)try{null.error}catch(n){ZI=qi(qi(n)),Vl["%Error.prototype%"]=ZI}var ZI,WY=function n(t){var e;if(t==="%AsyncFunction%")e=U_("async function () {}");else if(t==="%GeneratorFunction%")e=U_("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=U_("async function* () {}");else if(t==="%AsyncGenerator%"){var o=n("%AsyncGeneratorFunction%");o&&(e=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&qi&&(e=qi(s.prototype))}return Vl[t]=e,e},JI={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Th=rf(),wg=F_(),XY=Th.call(Ah,Array.prototype.concat),YY=Th.call(QI,Array.prototype.splice),KI=Th.call(Ah,String.prototype.replace),Sg=Th.call(Ah,String.prototype.slice),$Y=Th.call(Ah,RegExp.prototype.exec),ZY=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,JY=/\\\\(\\\\)?/g,KY=function(t){var e=Sg(t,0,1),o=Sg(t,-1);if(e==="%"&&o!=="%")throw new uf("invalid intrinsic syntax, expected closing \`%\`");if(o==="%"&&e!=="%")throw new uf("invalid intrinsic syntax, expected opening \`%\`");var s=[];return KI(t,ZY,function(l,p,h,g){s[s.length]=h?KI(g,JY,"$1"):p||l}),s},jY=function(t,e){var o=t,s;if(wg(JI,o)&&(s=JI[o],o="%"+s[0]+"%"),wg(Vl,o)){var l=Vl[o];if(l===sf&&(l=WY(o)),typeof l=="undefined"&&!e)throw new af("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:o,value:l}}throw new uf("intrinsic "+t+" does not exist!")};tR.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new af("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new af('"allowMissing" argument must be a boolean');if($Y(/^%?[^%]*%?$/,t)===null)throw new uf("\`%\` may not be present anywhere but at the beginning and end of the intrinsic name");var o=KY(t),s=o.length>0?o[0]:"",l=jY("%"+s+"%",e),p=l.name,h=l.value,g=!1,m=l.alias;m&&(s=m[0],YY(o,XY([0,1],m)));for(var v=1,x=!0;v<o.length;v+=1){var E=o[v],b=Sg(E,0,1),T=Sg(E,-1);if((b==='"'||b==="'"||b==="\`"||T==='"'||T==="'"||T==="\`")&&b!==T)throw new uf("property names with quotes must have matching quotes");if((E==="constructor"||!x)&&(g=!0),s+="."+E,p="%"+s+"%",wg(Vl,p))h=Vl[p];else if(h!=null){if(!(E in h)){if(!e)throw new af("base intrinsic for "+t+" exists, but the property is not available.");return}if(bh&&v+1>=o.length){var I=bh(h,E);x=!!I,x&&"get"in I&&!("originalValue"in I.get)?h=I.get:h=h[E]}else x=wg(h,E),h=h[E];x&&!g&&(Vl[p]=h)}}return h}});var Mg=st((aut,rR)=>{"use strict";var eR=z_(),nR=Eg(),QY=nR([eR("%String.prototype.indexOf%")]);rR.exports=function(t,e){var o=eR(t,!!e);return typeof o=="function"&&QY(t,".prototype.")>-1?nR([o]):o}});var sR=st((uut,oR)=>{"use strict";var t$=mg()(),e$=Mg(),G_=e$("Object.prototype.toString"),bg=function(t){return t$&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:G_(t)==="[object Arguments]"},iR=function(t){return bg(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&G_(t)!=="[object Array]"&&"callee"in t&&G_(t.callee)==="[object Function]"},n$=function(){return bg(arguments)}();bg.isLegacyArguments=iR;oR.exports=n$?bg:iR});var Ag=st((lut,lR)=>{"use strict";var aR=Mh(),r$=I_(),lf=ql(),uR=Hl();lR.exports=function(t,e,o){if(!t||typeof t!="object"&&typeof t!="function")throw new lf("\`obj\` must be an object or a function\`");if(typeof e!="string"&&typeof e!="symbol")throw new lf("\`property\` must be a string or a symbol\`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new lf("\`nonEnumerable\`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new lf("\`nonWritable\`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new lf("\`nonConfigurable\`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new lf("\`loose\`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,g=!!uR&&uR(t,e);if(aR)aR(t,e,{configurable:p===null&&g?g.configurable:!p,enumerable:s===null&&g?g.enumerable:!s,value:o,writable:l===null&&g?g.writable:!l});else if(h||!s&&!l&&!p)t[e]=o;else throw new r$("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Tg=st((cut,fR)=>{"use strict";var k_=Mh(),cR=function(){return!!k_};cR.hasArrayLengthDefineBug=function(){if(!k_)return null;try{return k_([],"length",{value:1}).length!==1}catch(t){return!0}};fR.exports=cR});var cf=st((fut,gR)=>{"use strict";var i$=A_(),o$=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",s$=Object.prototype.toString,a$=Array.prototype.concat,hR=Ag(),u$=function(n){return typeof n=="function"&&s$.call(n)==="[object Function]"},pR=Tg()(),l$=function(n,t,e,o){if(t in n){if(o===!0){if(n[t]===e)return}else if(!u$(o)||!o())return}pR?hR(n,t,e,!0):hR(n,t,e)},dR=function(n,t){var e=arguments.length>2?arguments[2]:{},o=i$(t);o$&&(o=a$.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)l$(n,o[s],t[o[s]],e[o[s]])};dR.supportsDescriptors=!!pR;gR.exports=dR});var xR=st((hut,_R)=>{"use strict";var c$=z_(),mR=Ag(),f$=Tg()(),yR=Hl(),vR=ql(),h$=c$("%Math.floor%");_R.exports=function(t,e){if(typeof t!="function")throw new vR("\`fn\` is not a function");if(typeof e!="number"||e<0||e>4294967295||h$(e)!==e)throw new vR("\`length\` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],s=!0,l=!0;if("length"in t&&yR){var p=yR(t,"length");p&&!p.configurable&&(s=!1),p&&!p.writable&&(l=!1)}return(s||l||!o)&&(f$?mR(t,"length",e,!0,!0):mR(t,"length",e)),t}});var wR=st((put,ER)=>{"use strict";var p$=rf(),d$=xg(),g$=N_();ER.exports=function(){return g$(p$,d$,arguments)}});var q_=st((dut,Cg)=>{"use strict";var m$=xR(),SR=Mh(),y$=Eg(),MR=wR();Cg.exports=function(t){var e=y$(arguments),o=t.length-(arguments.length-1);return m$(e,1+(o>0?o:0),!0)};SR?SR(Cg.exports,"apply",{value:MR}):Cg.exports.apply=MR});var H_=st((gut,AR)=>{"use strict";var bR=function(n){return n!==n};AR.exports=function(t,e){return t===0&&e===0?1/t===1/e:!!(t===e||bR(t)&&bR(e))}});var V_=st((mut,TR)=>{"use strict";var v$=H_();TR.exports=function(){return typeof Object.is=="function"?Object.is:v$}});var PR=st((yut,CR)=>{"use strict";var _$=V_(),x$=cf();CR.exports=function(){var t=_$();return x$(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var NR=st((vut,LR)=>{"use strict";var E$=cf(),w$=q_(),S$=H_(),IR=V_(),M$=PR(),RR=w$(IR(),Object);E$(RR,{getPolyfill:IR,implementation:S$,shim:M$});LR.exports=RR});var zR=st((_ut,BR)=>{"use strict";var OR=Mg(),b$=mg()(),A$=F_(),T$=Hl(),Y_;b$?(DR=OR("RegExp.prototype.exec"),W_={},Pg=function(){throw W_},X_={toString:Pg,valueOf:Pg},typeof Symbol.toPrimitive=="symbol"&&(X_[Symbol.toPrimitive]=Pg),Y_=function(t){if(!t||typeof t!="object")return!1;var e=T$(t,"lastIndex"),o=e&&A$(e,"value");if(!o)return!1;try{DR(t,X_)}catch(s){return s===W_}}):(FR=OR("Object.prototype.toString"),UR="[object RegExp]",Y_=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:FR(t)===UR});var DR,W_,Pg,X_,FR,UR;BR.exports=Y_});var kR=st((xut,GR)=>{"use strict";var Ph=function(){return typeof function(){}.name=="string"},Ch=Object.getOwnPropertyDescriptor;if(Ch)try{Ch([],"length")}catch(n){Ch=null}Ph.functionsHaveConfigurableNames=function(){if(!Ph()||!Ch)return!1;var t=Ch(function(){},"name");return!!t&&!!t.configurable};var C$=Function.prototype.bind;Ph.boundFunctionsHaveNames=function(){return Ph()&&typeof C$=="function"&&function(){}.bind().name!==""};GR.exports=Ph});var VR=st((Eut,HR)=>{"use strict";var qR=Ag(),P$=Tg()(),I$=kR().functionsHaveConfigurableNames(),R$=ql();HR.exports=function(t,e){if(typeof t!="function")throw new R$("\`fn\` is not a function");var o=arguments.length>2&&!!arguments[2];return(!o||I$)&&(P$?qR(t,"name",e,!0,!0):qR(t,"name",e)),t}});var $_=st((wut,WR)=>{"use strict";var L$=VR(),N$=ql(),O$=Object;WR.exports=L$(function(){if(this==null||this!==O$(this))throw new N$("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var Z_=st((Sut,XR)=>{"use strict";var D$=$_(),F$=cf().supportsDescriptors,U$=Object.getOwnPropertyDescriptor;XR.exports=function(){if(F$&&/a/mig.flags==="gim"){var t=U$(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var e="",o={};if(Object.defineProperty(o,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(o,"sticky",{get:function(){e+="y"}}),t.get.call(o),e==="dy")return t.get}}return D$}});var ZR=st((Mut,$R)=>{"use strict";var B$=cf().supportsDescriptors,z$=Z_(),G$=Hl(),k$=Object.defineProperty,q$=P_(),YR=D_(),H$=/a/;$R.exports=function(){if(!B$||!YR)throw new q$("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=z$(),e=YR(H$),o=G$(e,"flags");return(!o||o.get!==t)&&k$(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var QR=st((but,jR)=>{"use strict";var V$=cf(),W$=q_(),X$=$_(),JR=Z_(),Y$=ZR(),KR=W$(JR());V$(KR,{getPolyfill:JR,implementation:X$,shim:Y$});jR.exports=KR});var nL=st((Aut,eL)=>{"use strict";var tL=Mg(),$$=tL("Date.prototype.getDay"),Z$=function(t){try{return $$(t),!0}catch(e){return!1}},J$=tL("Object.prototype.toString"),K$="[object Date]",j$=mg()();eL.exports=function(t){return typeof t!="object"||t===null?!1:j$?Z$(t):J$(t)===K$}});var J_=st((Tut,pL)=>{var rL=A_(),iL=sR(),oL=NR(),sL=zR(),aL=QR(),uL=nL(),lL=Date.prototype.getTime;function hL(n,t,e){var o=e||{};return(o.strict?oL(n,t):n===t)?!0:!n||!t||typeof n!="object"&&typeof t!="object"?o.strict?oL(n,t):n==t:Q$(n,t,o)}function cL(n){return n==null}function fL(n){return!(!n||typeof n!="object"||typeof n.length!="number"||typeof n.copy!="function"||typeof n.slice!="function"||n.length>0&&typeof n[0]!="number")}function Q$(n,t,e){var o,s;if(typeof n!=typeof t||cL(n)||cL(t)||n.prototype!==t.prototype||iL(n)!==iL(t))return!1;var l=sL(n),p=sL(t);if(l!==p)return!1;if(l||p)return n.source===t.source&&aL(n)===aL(t);if(uL(n)&&uL(t))return lL.call(n)===lL.call(t);var h=fL(n),g=fL(t);if(h!==g)return!1;if(h||g){if(n.length!==t.length)return!1;for(o=0;o<n.length;o++)if(n[o]!==t[o])return!1;return!0}if(typeof n!=typeof t)return!1;try{var m=rL(n),v=rL(t)}catch(x){return!1}if(m.length!==v.length)return!1;for(m.sort(),v.sort(),o=m.length-1;o>=0;o--)if(m[o]!=v[o])return!1;for(o=m.length-1;o>=0;o--)if(s=m[o],!hL(n[s],t[s],e))return!1;return!0}pL.exports=hL});var u1=st((Nct,xL)=>{var HZ=J_(),Na=function(n){this.precision=n&&n.precision?n.precision:17,this.direction=n&&n.direction?n.direction:!1,this.pseudoNode=n&&n.pseudoNode?n.pseudoNode:!1,this.objectComparator=n&&n.objectComparator?n.objectComparator:VZ};Na.prototype.compare=function(n,t){if(n.type!==t.type||!_L(n,t))return!1;switch(n.type){case"Point":return this.compareCoord(n.coordinates,t.coordinates);case"LineString":return this.compareLine(n.coordinates,t.coordinates,0,!1);case"Polygon":return this.comparePolygon(n,t);case"Feature":return this.compareFeature(n,t);default:if(n.type.indexOf("Multi")===0){var e=this,o=vL(n),s=vL(t);return o.every(function(l){return this.some(function(p){return e.compare(l,p)})},s)}}return!1};function vL(n){return n.coordinates.map(function(t){return{type:n.type.replace("Multi",""),coordinates:t}})}function _L(n,t){return n.hasOwnProperty("coordinates")?n.coordinates.length===t.coordinates.length:n.length===t.length}Na.prototype.compareCoord=function(n,t){if(n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e].toFixed(this.precision)!==t[e].toFixed(this.precision))return!1;return!0};Na.prototype.compareLine=function(n,t,e,o){if(!_L(n,t))return!1;var s=this.pseudoNode?n:this.removePseudo(n),l=this.pseudoNode?t:this.removePseudo(t);if(!(o&&!this.compareCoord(s[0],l[0])&&(l=this.fixStartIndex(l,s),!l))){var p=this.compareCoord(s[e],l[e]);return this.direction||p?this.comparePath(s,l):this.compareCoord(s[e],l[l.length-(1+e)])?this.comparePath(s.slice().reverse(),l):!1}};Na.prototype.fixStartIndex=function(n,t){for(var e,o=-1,s=0;s<n.length;s++)if(this.compareCoord(n[s],t[0])){o=s;break}return o>=0&&(e=[].concat(n.slice(o,n.length),n.slice(1,o+1))),e};Na.prototype.comparePath=function(n,t){var e=this;return n.every(function(o,s){return e.compareCoord(o,this[s])},t)};Na.prototype.comparePolygon=function(n,t){if(this.compareLine(n.coordinates[0],t.coordinates[0],1,!0)){var e=n.coordinates.slice(1,n.coordinates.length),o=t.coordinates.slice(1,t.coordinates.length),s=this;return e.every(function(l){return this.some(function(p){return s.compareLine(l,p,1,!0)})},o)}else return!1};Na.prototype.compareFeature=function(n,t){return n.id!==t.id||!this.objectComparator(n.properties,t.properties)||!this.compareBBox(n,t)?!1:this.compare(n.geometry,t.geometry)};Na.prototype.compareBBox=function(n,t){return!!(!n.bbox&&!t.bbox||n.bbox&&t.bbox&&this.compareCoord(n.bbox,t.bbox))};Na.prototype.removePseudo=function(n){return n};function VZ(n,t){return HZ(n,t,{strict:!0})}xL.exports=Na});var EL=st((Wct,Lg)=>{function il(n,t,e,o){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(n,t,e,o)}il.prototype.run=function(n,t,e,o){this._init(n,t,e,o);for(var s=0;s<this._datasetLength;s++)if(this._visited[s]!==1){this._visited[s]=1;var l=this._regionQuery(s);if(l.length<this.minPts)this.noise.push(s);else{var p=this.clusters.length;this.clusters.push([]),this._addToCluster(s,p),this._expandCluster(p,l)}}return this.clusters};il.prototype._init=function(n,t,e,o){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this.noise=[],this._datasetLength=n.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}t&&(this.epsilon=t),e&&(this.minPts=e),o&&(this.distance=o)};il.prototype._expandCluster=function(n,t){for(var e=0;e<t.length;e++){var o=t[e];if(this._visited[o]!==1){this._visited[o]=1;var s=this._regionQuery(o);s.length>=this.minPts&&(t=this._mergeArrays(t,s))}this._assigned[o]!==1&&this._addToCluster(o,n)}};il.prototype._addToCluster=function(n,t){this.clusters[t].push(n),this._assigned[n]=1};il.prototype._regionQuery=function(n){for(var t=[],e=0;e<this._datasetLength;e++){var o=this.distance(this.dataset[n],this.dataset[e]);o<this.epsilon&&t.push(e)}return t};il.prototype._mergeArrays=function(n,t){for(var e=t.length,o=0;o<e;o++){var s=t[o];n.indexOf(s)<0&&n.push(s)}return n};il.prototype._euclideanDistance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;)e+=(n[o]-t[o])*(n[o]-t[o]);return Math.sqrt(e)};typeof Lg!="undefined"&&Lg.exports&&(Lg.exports=il)});var wL=st((Xct,Ng)=>{function ol(n,t,e){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(n,t,e)}ol.prototype.init=function(n,t,e){this.assignments=[],this.centroids=[],typeof n!="undefined"&&(this.dataset=n),typeof t!="undefined"&&(this.k=t),typeof e!="undefined"&&(this.distance=e)};ol.prototype.run=function(n,t){this.init(n,t);for(var e=this.dataset.length,o=0;o<this.k;o++)this.centroids[o]=this.randomCentroid();for(var s=!0;s;){s=this.assign();for(var l=0;l<this.k;l++){for(var p=new Array(v),h=0,g=0;g<v;g++)p[g]=0;for(var m=0;m<e;m++){var v=this.dataset[m].length;if(l===this.assignments[m]){for(var g=0;g<v;g++)p[g]+=this.dataset[m][g];h++}}if(h>0){for(var g=0;g<v;g++)p[g]/=h;this.centroids[l]=p}else this.centroids[l]=this.randomCentroid(),s=!0}}return this.getClusters()};ol.prototype.randomCentroid=function(){var n=this.dataset.length-1,t,e;do e=Math.round(Math.random()*n),t=this.dataset[e];while(this.centroids.indexOf(t)>=0);return t};ol.prototype.assign=function(){for(var n=!1,t=this.dataset.length,e,o=0;o<t;o++)e=this.argmin(this.dataset[o],this.centroids,this.distance),e!=this.assignments[o]&&(this.assignments[o]=e,n=!0);return n};ol.prototype.getClusters=function(){for(var n=new Array(this.k),t,e=0;e<this.assignments.length;e++)t=this.assignments[e],typeof n[t]=="undefined"&&(n[t]=[]),n[t].push(e);return n};ol.prototype.argmin=function(n,t,e){for(var o=Number.MAX_VALUE,s=0,l=t.length,p,h=0;h<l;h++)p=e(n,t[h]),p<o&&(o=p,s=h);return s};ol.prototype.distance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;){var s=n[o]-t[o];e+=s*s}return Math.sqrt(e)};typeof Ng!="undefined"&&Ng.exports&&(Ng.exports=ol)});var l1=st((Yct,Og)=>{function Oa(n,t,e){this._queue=[],this._priorities=[],this._sorting="desc",this._init(n,t,e)}Oa.prototype.insert=function(n,t){for(var e=this._queue.length,o=e;o--;){var s=this._priorities[o];this._sorting==="desc"?t>s&&(e=o):t<s&&(e=o)}this._insertAt(n,t,e)};Oa.prototype.remove=function(n){for(var t=this._queue.length;t--;){var e=this._queue[t];if(n===e){this._queue.splice(t,1),this._priorities.splice(t,1);break}}};Oa.prototype.forEach=function(n){this._queue.forEach(n)};Oa.prototype.getElements=function(){return this._queue};Oa.prototype.getElementPriority=function(n){return this._priorities[n]};Oa.prototype.getPriorities=function(){return this._priorities};Oa.prototype.getElementsWithPriorities=function(){for(var n=[],t=0,e=this._queue.length;t<e;t++)n.push([this._queue[t],this._priorities[t]]);return n};Oa.prototype._init=function(n,t,e){if(n&&t){if(this._queue=[],this._priorities=[],n.length!==t.length)throw new Error("Arrays must have the same length");for(var o=0;o<n.length;o++)this.insert(n[o],t[o])}e&&(this._sorting=e)};Oa.prototype._insertAt=function(n,t,e){this._queue.length===e?(this._queue.push(n),this._priorities.push(t)):(this._queue.splice(e,0,n),this._priorities.splice(e,0,t))};typeof Og!="undefined"&&Og.exports&&(Og.exports=Oa)});var ML=st(($ct,hf)=>{typeof hf!="undefined"&&hf.exports&&(SL=l1());var SL;function gu(n,t,e,o){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(n,t,e,o)}gu.prototype.run=function(n,t,e,o){this._init(n,t,e,o);for(var s=0,l=this.dataset.length;s<l;s++)if(this._processed[s]!==1){this._processed[s]=1,this.clusters.push([s]);var p=this.clusters.length-1;this._orderedList.push(s);var h=new SL(null,null,"asc"),g=this._regionQuery(s);this._distanceToCore(s)!==void 0&&(this._updateQueue(s,g,h),this._expandCluster(p,h))}return this.clusters};gu.prototype.getReachabilityPlot=function(){for(var n=[],t=0,e=this._orderedList.length;t<e;t++){var o=this._orderedList[t],s=this._reachability[o];n.push([o,s])}return n};gu.prototype._init=function(n,t,e,o){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}t&&(this.epsilon=t),e&&(this.minPts=e),o&&(this.distance=o)};gu.prototype._updateQueue=function(n,t,e){var o=this;this._coreDistance=this._distanceToCore(n),t.forEach(function(s){if(o._processed[s]===void 0){var l=o.distance(o.dataset[n],o.dataset[s]),p=Math.max(o._coreDistance,l);o._reachability[s]===void 0?(o._reachability[s]=p,e.insert(s,p)):p<o._reachability[s]&&(o._reachability[s]=p,e.remove(s),e.insert(s,p))}})};gu.prototype._expandCluster=function(n,t){for(var e=t.getElements(),o=0,s=e.length;o<s;o++){var l=e[o];if(this._processed[l]===void 0){var p=this._regionQuery(l);this._processed[l]=1,this.clusters[n].push(l),this._orderedList.push(l),this._distanceToCore(l)!==void 0&&(this._updateQueue(l,p,t),this._expandCluster(n,t))}}};gu.prototype._distanceToCore=function(n){for(var t=this.epsilon,e=0;e<t;e++){var o=this._regionQuery(n,e);if(o.length>=this.minPts)return e}};gu.prototype._regionQuery=function(n,t){t=t||this.epsilon;for(var e=[],o=0,s=this.dataset.length;o<s;o++)this.distance(this.dataset[n],this.dataset[o])<t&&e.push(o);return e};gu.prototype._euclideanDistance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;)e+=(n[o]-t[o])*(n[o]-t[o]);return Math.sqrt(e)};typeof hf!="undefined"&&hf.exports&&(hf.exports=gu)});var bL=st((Zct,Dg)=>{typeof Dg!="undefined"&&Dg.exports&&(Dg.exports={DBSCAN:EL(),KMEANS:wL(),OPTICS:ML(),PriorityQueue:l1()})});var c1=st((eft,TL)=>{"use strict";TL.exports={eudist:function(t,e,o){for(var s=t.length,l=0,p=0;p<s;p++){var h=(t[p]||0)-(e[p]||0);l+=h*h}return o?Math.sqrt(l):l},mandist:function(t,e,o){for(var s=t.length,l=0,p=0;p<s;p++)l+=Math.abs((t[p]||0)-(e[p]||0));return o?Math.sqrt(l):l},dist:function(t,e,o){var s=Math.abs(t-e);return o?s:s*s}}});var IL=st((nft,PL)=>{"use strict";var CL=c1(),JZ=CL.eudist,KZ=CL.dist;PL.exports={kmrand:function(t,e){for(var o={},s=[],l=e<<2,p=t.length,h=t[0].length>0;s.length<e&&l-- >0;){var g=t[Math.floor(Math.random()*p)],m=h?g.join("_"):""+g;o[m]||(o[m]=!0,s.push(g))}if(s.length<e)throw new Error("Error initializating clusters");return s},kmpp:function(t,e){var o=t[0].length?JZ:KZ,s=[],l=t.length,p=t[0].length>0,h={},g=t[Math.floor(Math.random()*l)],m=p?g.join("_"):""+g;for(s.push(g),h[m]=!0;s.length<e;){for(var v=[],x=s.length,E=0,b=[],T=0;T<l;T++){for(var I=1/0,S=0;S<x;S++){var w=o(t[T],s[S]);w<=I&&(I=w)}v[T]=I}for(var R=0;R<l;R++)E+=v[R];for(var C=0;C<l;C++)b[C]={i:C,v:t[C],pr:v[C]/E,cs:0};b.sort(function(q,D){return q.pr-D.pr}),b[0].cs=b[0].pr;for(var F=1;F<l;F++)b[F].cs=b[F-1].cs+b[F].pr;for(var W=Math.random(),X=0;X<l-1&&b[X++].cs<W;);s.push(b[X-1].v)}return s}}});var DL=st((oft,OL)=>{"use strict";var f1=c1(),NL=IL(),jZ=f1.eudist,rft=f1.mandist,ift=f1.dist,QZ=NL.kmrand,tJ=NL.kmpp,RL=1e4;function LL(n,t,e){e=e||[];for(var o=0;o<n;o++)e[o]=t;return e}function eJ(n,t,e,o){var s=[],l=[],p=[],h=[],g=!1,m=o||RL,v=n.length,x=n[0].length,E=x>0,b=[];if(e)e=="kmrand"?s=QZ(n,t):e=="kmpp"?s=tJ(n,t):s=e;else for(var T={};s.length<t;){var I=Math.floor(Math.random()*v);T[I]||(T[I]=!0,s.push(n[I]))}do{LL(t,0,b);for(var S=0;S<v;S++){for(var w=1/0,R=0,C=0;C<t;C++){var h=E?jZ(n[S],s[C]):Math.abs(n[S]-s[C]);h<=w&&(w=h,R=C)}p[S]=R,b[R]++}for(var F=[],l=[],W=0,X=0;X<t;X++)F[X]=E?LL(x,0,F[X]):0,l[X]=s[X];if(E){for(var q=0;q<t;q++)s[q]=[];for(var D=0;D<v;D++)for(var xt=p[D],B=F[xt],j=n[D],J=0;J<x;J++)B[J]+=j[J];g=!0;for(var Dt=0;Dt<t;Dt++){for(var Q=s[Dt],At=F[Dt],Mt=l[Dt],Lt=b[Dt],pt=0;pt<x;pt++)Q[pt]=At[pt]/Lt||0;if(g){for(var yt=0;yt<x;yt++)if(Mt[yt]!=Q[yt]){g=!1;break}}}}else{for(var K=0;K<v;K++){var Bt=p[K];F[Bt]+=n[K]}for(var Gt=0;Gt<t;Gt++)s[Gt]=F[Gt]/b[Gt]||0;g=!0;for(var ae=0;ae<t;ae++)if(l[ae]!=s[ae]){g=!1;break}}g=g||--m<=0}while(!g);return{it:RL-m,k:t,idxs:p,centroids:s}}OL.exports=eJ});var yf=st((y1,v1)=>{(function(n,t){typeof y1=="object"&&typeof v1!="undefined"?v1.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self,n.polygonClipping=t())})(y1,function(){"use strict";function n(rt,P){var N={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},k,$,V,ht;return ht={next:at(0),throw:at(1),return:at(2)},typeof Symbol=="function"&&(ht[Symbol.iterator]=function(){return this}),ht;function at(Et){return function(G){return wt([Et,G])}}function wt(Et){if(k)throw new TypeError("Generator is already executing.");for(;N;)try{if(k=1,$&&(V=Et[0]&2?$.return:Et[0]?$.throw||((V=$.return)&&V.call($),0):$.next)&&!(V=V.call($,Et[1])).done)return V;switch($=0,V&&(Et=[Et[0]&2,V.value]),Et[0]){case 0:case 1:V=Et;break;case 4:return N.label++,{value:Et[1],done:!1};case 5:N.label++,$=Et[1],Et=[0];continue;case 7:Et=N.ops.pop(),N.trys.pop();continue;default:if(V=N.trys,!(V=V.length>0&&V[V.length-1])&&(Et[0]===6||Et[0]===2)){N=0;continue}if(Et[0]===3&&(!V||Et[1]>V[0]&&Et[1]<V[3])){N.label=Et[1];break}if(Et[0]===6&&N.label<V[1]){N.label=V[1],V=Et;break}if(V&&N.label<V[2]){N.label=V[2],N.ops.push(Et);break}V[2]&&N.ops.pop(),N.trys.pop();continue}Et=P.call(rt,N)}catch(G){Et=[6,G],$=0}finally{k=V=0}if(Et[0]&5)throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}}var t=function(){function rt(P,N){this.next=null,this.key=P,this.data=N,this.left=null,this.right=null}return rt}();function e(rt,P){return rt>P?1:rt<P?-1:0}function o(rt,P,N){for(var k=new t(null,null),$=k,V=k;;){var ht=N(rt,P.key);if(ht<0){if(P.left===null)break;if(N(rt,P.left.key)<0){var at=P.left;if(P.left=at.right,at.right=P,P=at,P.left===null)break}V.left=P,V=P,P=P.left}else if(ht>0){if(P.right===null)break;if(N(rt,P.right.key)>0){var at=P.right;if(P.right=at.left,at.left=P,P=at,P.right===null)break}$.right=P,$=P,P=P.right}else break}return $.right=P.left,V.left=P.right,P.left=k.right,P.right=k.left,P}function s(rt,P,N,k){var $=new t(rt,P);if(N===null)return $.left=$.right=null,$;N=o(rt,N,k);var V=k(rt,N.key);return V<0?($.left=N.left,$.right=N,N.left=null):V>=0&&($.right=N.right,$.left=N,N.right=null),$}function l(rt,P,N){var k=null,$=null;if(P){P=o(rt,P,N);var V=N(P.key,rt);V===0?(k=P.left,$=P.right):V<0?($=P.right,P.right=null,k=P):(k=P.left,P.left=null,$=P)}return{left:k,right:$}}function p(rt,P,N){return P===null?rt:(rt===null||(P=o(rt.key,P,N),P.left=rt),P)}function h(rt,P,N,k,$){if(rt){k(""+P+(N?"\\u2514\\u2500\\u2500 ":"\\u251C\\u2500\\u2500 ")+$(rt)+\`
|
|
19648
19648
|
\`);var V=P+(N?" ":"\\u2502 ");rt.left&&h(rt.left,V,!1,k,$),rt.right&&h(rt.right,V,!0,k,$)}}var g=function(){function rt(P){P===void 0&&(P=e),this._root=null,this._size=0,this._comparator=P}return rt.prototype.insert=function(P,N){return this._size++,this._root=s(P,N,this._root,this._comparator)},rt.prototype.add=function(P,N){var k=new t(P,N);this._root===null&&(k.left=k.right=null,this._size++,this._root=k);var $=this._comparator,V=o(P,this._root,$),ht=$(P,V.key);return ht===0?this._root=V:(ht<0?(k.left=V.left,k.right=V,V.left=null):ht>0&&(k.right=V.right,k.left=V,V.right=null),this._size++,this._root=k),this._root},rt.prototype.remove=function(P){this._root=this._remove(P,this._root,this._comparator)},rt.prototype._remove=function(P,N,k){var $;if(N===null)return null;N=o(P,N,k);var V=k(P,N.key);return V===0?(N.left===null?$=N.right:($=o(P,N.left,k),$.right=N.right),this._size--,$):N},rt.prototype.pop=function(){var P=this._root;if(P){for(;P.left;)P=P.left;return this._root=o(P.key,this._root,this._comparator),this._root=this._remove(P.key,this._root,this._comparator),{key:P.key,data:P.data}}return null},rt.prototype.findStatic=function(P){for(var N=this._root,k=this._comparator;N;){var $=k(P,N.key);if($===0)return N;$<0?N=N.left:N=N.right}return null},rt.prototype.find=function(P){return this._root&&(this._root=o(P,this._root,this._comparator),this._comparator(P,this._root.key)!==0)?null:this._root},rt.prototype.contains=function(P){for(var N=this._root,k=this._comparator;N;){var $=k(P,N.key);if($===0)return!0;$<0?N=N.left:N=N.right}return!1},rt.prototype.forEach=function(P,N){for(var k=this._root,$=[],V=!1;!V;)k!==null?($.push(k),k=k.left):$.length!==0?(k=$.pop(),P.call(N,k),k=k.right):V=!0;return this},rt.prototype.range=function(P,N,k,$){for(var V=[],ht=this._comparator,at=this._root,wt;V.length!==0||at;)if(at)V.push(at),at=at.left;else{if(at=V.pop(),wt=ht(at.key,N),wt>0)break;if(ht(at.key,P)>=0&&k.call($,at))return this;at=at.right}return this},rt.prototype.keys=function(){var P=[];return this.forEach(function(N){var k=N.key;return P.push(k)}),P},rt.prototype.values=function(){var P=[];return this.forEach(function(N){var k=N.data;return P.push(k)}),P},rt.prototype.min=function(){return this._root?this.minNode(this._root).key:null},rt.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},rt.prototype.minNode=function(P){if(P===void 0&&(P=this._root),P)for(;P.left;)P=P.left;return P},rt.prototype.maxNode=function(P){if(P===void 0&&(P=this._root),P)for(;P.right;)P=P.right;return P},rt.prototype.at=function(P){for(var N=this._root,k=!1,$=0,V=[];!k;)if(N)V.push(N),N=N.left;else if(V.length>0){if(N=V.pop(),$===P)return N;$++,N=N.right}else k=!0;return null},rt.prototype.next=function(P){var N=this._root,k=null;if(P.right){for(k=P.right;k.left;)k=k.left;return k}for(var $=this._comparator;N;){var V=$(P.key,N.key);if(V===0)break;V<0?(k=N,N=N.left):N=N.right}return k},rt.prototype.prev=function(P){var N=this._root,k=null;if(P.left!==null){for(k=P.left;k.right;)k=k.right;return k}for(var $=this._comparator;N;){var V=$(P.key,N.key);if(V===0)break;V<0?N=N.left:(k=N,N=N.right)}return k},rt.prototype.clear=function(){return this._root=null,this._size=0,this},rt.prototype.toList=function(){return x(this._root)},rt.prototype.load=function(P,N,k){N===void 0&&(N=[]),k===void 0&&(k=!1);var $=P.length,V=this._comparator;if(k&&T(P,N,0,$-1,V),this._root===null)this._root=m(P,N,0,$),this._size=$;else{var ht=b(this.toList(),v(P,N),V);$=this._size+$,this._root=E({head:ht},0,$)}return this},rt.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(rt.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(rt.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),rt.prototype.toString=function(P){P===void 0&&(P=function(k){return String(k.key)});var N=[];return h(this._root,"",!0,function(k){return N.push(k)},P),N.join("")},rt.prototype.update=function(P,N,k){var $=this._comparator,V=l(P,this._root,$),ht=V.left,at=V.right;$(P,N)<0?at=s(N,k,at,$):ht=s(N,k,ht,$),this._root=p(ht,at,$)},rt.prototype.split=function(P){return l(P,this._root,this._comparator)},rt.prototype[Symbol.iterator]=function(){var P,N,k;return n(this,function($){switch($.label){case 0:P=this._root,N=[],k=!1,$.label=1;case 1:return k?[3,6]:P===null?[3,2]:(N.push(P),P=P.left,[3,5]);case 2:return N.length===0?[3,4]:(P=N.pop(),[4,P]);case 3:return $.sent(),P=P.right,[3,5];case 4:k=!0,$.label=5;case 5:return[3,1];case 6:return[2]}})},rt}();function m(rt,P,N,k){var $=k-N;if($>0){var V=N+Math.floor($/2),ht=rt[V],at=P[V],wt=new t(ht,at);return wt.left=m(rt,P,N,V),wt.right=m(rt,P,V+1,k),wt}return null}function v(rt,P){for(var N=new t(null,null),k=N,$=0;$<rt.length;$++)k=k.next=new t(rt[$],P[$]);return k.next=null,N.next}function x(rt){for(var P=rt,N=[],k=!1,$=new t(null,null),V=$;!k;)P?(N.push(P),P=P.left):N.length>0?(P=V=V.next=N.pop(),P=P.right):k=!0;return V.next=null,$.next}function E(rt,P,N){var k=N-P;if(k>0){var $=P+Math.floor(k/2),V=E(rt,P,$),ht=rt.head;return ht.left=V,rt.head=rt.head.next,ht.right=E(rt,$+1,N),ht}return null}function b(rt,P,N){for(var k=new t(null,null),$=k,V=rt,ht=P;V!==null&&ht!==null;)N(V.key,ht.key)<0?($.next=V,V=V.next):($.next=ht,ht=ht.next),$=$.next;return V!==null?$.next=V:ht!==null&&($.next=ht),k.next}function T(rt,P,N,k,$){if(!(N>=k)){for(var V=rt[N+k>>1],ht=N-1,at=k+1;;){do ht++;while($(rt[ht],V)<0);do at--;while($(rt[at],V)>0);if(ht>=at)break;var wt=rt[ht];rt[ht]=rt[at],rt[at]=wt,wt=P[ht],P[ht]=P[at],P[at]=wt}T(rt,P,N,at,$),T(rt,P,at+1,k,$)}}let I=(rt,P)=>rt.ll.x<=P.x&&P.x<=rt.ur.x&&rt.ll.y<=P.y&&P.y<=rt.ur.y,S=(rt,P)=>{if(P.ur.x<rt.ll.x||rt.ur.x<P.ll.x||P.ur.y<rt.ll.y||rt.ur.y<P.ll.y)return null;let N=rt.ll.x<P.ll.x?P.ll.x:rt.ll.x,k=rt.ur.x<P.ur.x?rt.ur.x:P.ur.x,$=rt.ll.y<P.ll.y?P.ll.y:rt.ll.y,V=rt.ur.y<P.ur.y?rt.ur.y:P.ur.y;return{ll:{x:N,y:$},ur:{x:k,y:V}}},w=Number.EPSILON;w===void 0&&(w=Math.pow(2,-52));let R=w*w,C=(rt,P)=>{if(-w<rt&&rt<w&&-w<P&&P<w)return 0;let N=rt-P;return N*N<R*rt*P?0:rt<P?-1:1};class F{constructor(){this.reset()}reset(){this.xRounder=new W,this.yRounder=new W}round(P,N){return{x:this.xRounder.round(P),y:this.yRounder.round(N)}}}class W{constructor(){this.tree=new g,this.round(0)}round(P){let N=this.tree.add(P),k=this.tree.prev(N);if(k!==null&&C(N.key,k.key)===0)return this.tree.remove(P),k.key;let $=this.tree.next(N);return $!==null&&C(N.key,$.key)===0?(this.tree.remove(P),$.key):P}}let X=new F,q=11102230246251565e-32,D=134217729,xt=(3+8*q)*q;function B(rt,P,N,k,$){let V,ht,at,wt,Et=P[0],G=k[0],ot=0,et=0;G>Et==G>-Et?(V=Et,Et=P[++ot]):(V=G,G=k[++et]);let lt=0;if(ot<rt&&et<N)for(G>Et==G>-Et?(ht=Et+V,at=V-(ht-Et),Et=P[++ot]):(ht=G+V,at=V-(ht-G),G=k[++et]),V=ht,at!==0&&($[lt++]=at);ot<rt&&et<N;)G>Et==G>-Et?(ht=V+Et,wt=ht-V,at=V-(ht-wt)+(Et-wt),Et=P[++ot]):(ht=V+G,wt=ht-V,at=V-(ht-wt)+(G-wt),G=k[++et]),V=ht,at!==0&&($[lt++]=at);for(;ot<rt;)ht=V+Et,wt=ht-V,at=V-(ht-wt)+(Et-wt),Et=P[++ot],V=ht,at!==0&&($[lt++]=at);for(;et<N;)ht=V+G,wt=ht-V,at=V-(ht-wt)+(G-wt),G=k[++et],V=ht,at!==0&&($[lt++]=at);return(V!==0||lt===0)&&($[lt++]=V),lt}function j(rt,P){let N=P[0];for(let k=1;k<rt;k++)N+=P[k];return N}function J(rt){return new Float64Array(rt)}let Dt=(3+16*q)*q,Q=(2+12*q)*q,At=(9+64*q)*q*q,Mt=J(4),Lt=J(8),pt=J(12),yt=J(16),K=J(4);function Bt(rt,P,N,k,$,V,ht){let at,wt,Et,G,ot,et,lt,Ft,Kt,me,ve,qe,Ue,Xe,Je,wr,Jr,nr,Ie=rt-$,rr=N-$,pr=P-V,ur=k-V;Xe=Ie*ur,et=D*Ie,lt=et-(et-Ie),Ft=Ie-lt,et=D*ur,Kt=et-(et-ur),me=ur-Kt,Je=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),wr=pr*rr,et=D*pr,lt=et-(et-pr),Ft=pr-lt,et=D*rr,Kt=et-(et-rr),me=rr-Kt,Jr=Ft*me-(wr-lt*Kt-Ft*Kt-lt*me),ve=Je-Jr,ot=Je-ve,Mt[0]=Je-(ve+ot)+(ot-Jr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-wr,ot=Ue-ve,Mt[1]=Ue-(ve+ot)+(ot-wr),nr=qe+ve,ot=nr-qe,Mt[2]=qe-(nr-ot)+(ve-ot),Mt[3]=nr;let Qn=j(4,Mt),bi=Q*ht;if(Qn>=bi||-Qn>=bi||(ot=rt-Ie,at=rt-(Ie+ot)+(ot-$),ot=N-rr,Et=N-(rr+ot)+(ot-$),ot=P-pr,wt=P-(pr+ot)+(ot-V),ot=k-ur,G=k-(ur+ot)+(ot-V),at===0&&wt===0&&Et===0&&G===0)||(bi=At*ht+xt*Math.abs(Qn),Qn+=Ie*G+ur*at-(pr*Et+rr*wt),Qn>=bi||-Qn>=bi))return Qn;Xe=at*ur,et=D*at,lt=et-(et-at),Ft=at-lt,et=D*ur,Kt=et-(et-ur),me=ur-Kt,Je=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),wr=wt*rr,et=D*wt,lt=et-(et-wt),Ft=wt-lt,et=D*rr,Kt=et-(et-rr),me=rr-Kt,Jr=Ft*me-(wr-lt*Kt-Ft*Kt-lt*me),ve=Je-Jr,ot=Je-ve,K[0]=Je-(ve+ot)+(ot-Jr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-wr,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-wr),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let oi=B(4,Mt,4,K,Lt);Xe=Ie*G,et=D*Ie,lt=et-(et-Ie),Ft=Ie-lt,et=D*G,Kt=et-(et-G),me=G-Kt,Je=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),wr=pr*Et,et=D*pr,lt=et-(et-pr),Ft=pr-lt,et=D*Et,Kt=et-(et-Et),me=Et-Kt,Jr=Ft*me-(wr-lt*Kt-Ft*Kt-lt*me),ve=Je-Jr,ot=Je-ve,K[0]=Je-(ve+ot)+(ot-Jr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-wr,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-wr),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let Z=B(oi,Lt,4,K,pt);Xe=at*G,et=D*at,lt=et-(et-at),Ft=at-lt,et=D*G,Kt=et-(et-G),me=G-Kt,Je=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),wr=wt*Et,et=D*wt,lt=et-(et-wt),Ft=wt-lt,et=D*Et,Kt=et-(et-Et),me=Et-Kt,Jr=Ft*me-(wr-lt*Kt-Ft*Kt-lt*me),ve=Je-Jr,ot=Je-ve,K[0]=Je-(ve+ot)+(ot-Jr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-wr,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-wr),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let mt=B(Z,pt,4,K,yt);return yt[mt-1]}function Gt(rt,P,N,k,$,V){let ht=(P-V)*(N-$),at=(rt-$)*(k-V),wt=ht-at,Et=Math.abs(ht+at);return Math.abs(wt)>=Dt*Et?wt:-Bt(rt,P,N,k,$,V,Et)}let ae=(rt,P)=>rt.x*P.y-rt.y*P.x,ut=(rt,P)=>rt.x*P.x+rt.y*P.y,Ut=(rt,P,N)=>{let k=Gt(rt.x,rt.y,P.x,P.y,N.x,N.y);return k>0?-1:k<0?1:0},jt=rt=>Math.sqrt(ut(rt,rt)),ce=(rt,P,N)=>{let k={x:P.x-rt.x,y:P.y-rt.y},$={x:N.x-rt.x,y:N.y-rt.y};return ae($,k)/jt($)/jt(k)},te=(rt,P,N)=>{let k={x:P.x-rt.x,y:P.y-rt.y},$={x:N.x-rt.x,y:N.y-rt.y};return ut($,k)/jt($)/jt(k)},$t=(rt,P,N)=>P.y===0?null:{x:rt.x+P.x/P.y*(N-rt.y),y:N},qt=(rt,P,N)=>P.x===0?null:{x:N,y:rt.y+P.y/P.x*(N-rt.x)},xe=(rt,P,N,k)=>{if(P.x===0)return qt(N,k,rt.x);if(k.x===0)return qt(rt,P,N.x);if(P.y===0)return $t(N,k,rt.y);if(k.y===0)return $t(rt,P,N.y);let $=ae(P,k);if($==0)return null;let V={x:N.x-rt.x,y:N.y-rt.y},ht=ae(V,P)/$,at=ae(V,k)/$,wt=rt.x+at*P.x,Et=N.x+ht*k.x,G=rt.y+at*P.y,ot=N.y+ht*k.y,et=(wt+Et)/2,lt=(G+ot)/2;return{x:et,y:lt}};class ft{static compare(P,N){let k=ft.comparePoints(P.point,N.point);return k!==0?k:(P.point!==N.point&&P.link(N),P.isLeft!==N.isLeft?P.isLeft?1:-1:ee.compare(P.segment,N.segment))}static comparePoints(P,N){return P.x<N.x?-1:P.x>N.x?1:P.y<N.y?-1:P.y>N.y?1:0}constructor(P,N){P.events===void 0?P.events=[this]:P.events.push(this),this.point=P,this.isLeft=N}link(P){if(P.point===this.point)throw new Error("Tried to link already linked events");let N=P.point.events;for(let k=0,$=N.length;k<$;k++){let V=N[k];this.point.events.push(V),V.point=this.point}this.checkForConsuming()}checkForConsuming(){let P=this.point.events.length;for(let N=0;N<P;N++){let k=this.point.events[N];if(k.segment.consumedBy===void 0)for(let $=N+1;$<P;$++){let V=this.point.events[$];V.consumedBy===void 0&&k.otherSE.point.events===V.otherSE.point.events&&k.segment.consume(V.segment)}}}getAvailableLinkedEvents(){let P=[];for(let N=0,k=this.point.events.length;N<k;N++){let $=this.point.events[N];$!==this&&!$.segment.ringOut&&$.segment.isInResult()&&P.push($)}return P}getLeftmostComparator(P){let N=new Map,k=$=>{let V=$.otherSE;N.set($,{sine:ce(this.point,P.point,V.point),cosine:te(this.point,P.point,V.point)})};return($,V)=>{N.has($)||k($),N.has(V)||k(V);let{sine:ht,cosine:at}=N.get($),{sine:wt,cosine:Et}=N.get(V);return ht>=0&&wt>=0?at<Et?1:at>Et?-1:0:ht<0&&wt<0?at<Et?-1:at>Et?1:0:wt<ht?-1:wt>ht?1:0}}}let We=0;class ee{static compare(P,N){let k=P.leftSE.point.x,$=N.leftSE.point.x,V=P.rightSE.point.x,ht=N.rightSE.point.x;if(ht<k)return 1;if(V<$)return-1;let at=P.leftSE.point.y,wt=N.leftSE.point.y,Et=P.rightSE.point.y,G=N.rightSE.point.y;if(k<$){if(wt<at&&wt<Et)return 1;if(wt>at&&wt>Et)return-1;let ot=P.comparePoint(N.leftSE.point);if(ot<0)return 1;if(ot>0)return-1;let et=N.comparePoint(P.rightSE.point);return et!==0?et:-1}if(k>$){if(at<wt&&at<G)return-1;if(at>wt&&at>G)return 1;let ot=N.comparePoint(P.leftSE.point);if(ot!==0)return ot;let et=P.comparePoint(N.rightSE.point);return et<0?1:et>0?-1:1}if(at<wt)return-1;if(at>wt)return 1;if(V<ht){let ot=N.comparePoint(P.rightSE.point);if(ot!==0)return ot}if(V>ht){let ot=P.comparePoint(N.rightSE.point);if(ot<0)return 1;if(ot>0)return-1}if(V!==ht){let ot=Et-at,et=V-k,lt=G-wt,Ft=ht-$;if(ot>et&<<Ft)return 1;if(ot<et&<>Ft)return-1}return V>ht?1:V<ht||Et<G?-1:Et>G?1:P.id<N.id?-1:P.id>N.id?1:0}constructor(P,N,k,$){this.id=++We,this.leftSE=P,P.segment=this,P.otherSE=N,this.rightSE=N,N.segment=this,N.otherSE=P,this.rings=k,this.windings=$}static fromRing(P,N,k){let $,V,ht,at=ft.comparePoints(P,N);if(at<0)$=P,V=N,ht=1;else if(at>0)$=N,V=P,ht=-1;else throw new Error(\`Tried to create degenerate segment at [\${P.x}, \${P.y}]\`);let wt=new ft($,!0),Et=new ft(V,!1);return new ee(wt,Et,[k],[ht])}replaceRightSE(P){this.rightSE=P,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let P=this.leftSE.point.y,N=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:P<N?P:N},ur:{x:this.rightSE.point.x,y:P>N?P:N}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(P){return P.x===this.leftSE.point.x&&P.y===this.leftSE.point.y||P.x===this.rightSE.point.x&&P.y===this.rightSE.point.y}comparePoint(P){if(this.isAnEndpoint(P))return 0;let N=this.leftSE.point,k=this.rightSE.point,$=this.vector();if(N.x===k.x)return P.x===N.x?0:P.x<N.x?1:-1;let V=(P.y-N.y)/$.y,ht=N.x+V*$.x;if(P.x===ht)return 0;let at=(P.x-N.x)/$.x,wt=N.y+at*$.y;return P.y===wt?0:P.y<wt?-1:1}getIntersection(P){let N=this.bbox(),k=P.bbox(),$=S(N,k);if($===null)return null;let V=this.leftSE.point,ht=this.rightSE.point,at=P.leftSE.point,wt=P.rightSE.point,Et=I(N,at)&&this.comparePoint(at)===0,G=I(k,V)&&P.comparePoint(V)===0,ot=I(N,wt)&&this.comparePoint(wt)===0,et=I(k,ht)&&P.comparePoint(ht)===0;if(G&&Et)return et&&!ot?ht:!et&&ot?wt:null;if(G)return ot&&V.x===wt.x&&V.y===wt.y?null:V;if(Et)return et&&ht.x===at.x&&ht.y===at.y?null:at;if(et&&ot)return null;if(et)return ht;if(ot)return wt;let lt=xe(V,this.vector(),at,P.vector());return lt===null||!I($,lt)?null:X.round(lt.x,lt.y)}split(P){let N=[],k=P.events!==void 0,$=new ft(P,!0),V=new ft(P,!1),ht=this.rightSE;this.replaceRightSE(V),N.push(V),N.push($);let at=new ee($,ht,this.rings.slice(),this.windings.slice());return ft.comparePoints(at.leftSE.point,at.rightSE.point)>0&&at.swapEvents(),ft.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),k&&($.checkForConsuming(),V.checkForConsuming()),N}swapEvents(){let P=this.rightSE;this.rightSE=this.leftSE,this.leftSE=P,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let N=0,k=this.windings.length;N<k;N++)this.windings[N]*=-1}consume(P){let N=this,k=P;for(;N.consumedBy;)N=N.consumedBy;for(;k.consumedBy;)k=k.consumedBy;let $=ee.compare(N,k);if($!==0){if($>0){let V=N;N=k,k=V}if(N.prev===k){let V=N;N=k,k=V}for(let V=0,ht=k.rings.length;V<ht;V++){let at=k.rings[V],wt=k.windings[V],Et=N.rings.indexOf(at);Et===-1?(N.rings.push(at),N.windings.push(wt)):N.windings[Et]+=wt}k.rings=null,k.windings=null,k.consumedBy=N,k.leftSE.consumedBy=N.leftSE,k.rightSE.consumedBy=N.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let P=this.prev.consumedBy||this.prev;this._beforeState=P.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let P=this.beforeState();this._afterState={rings:P.rings.slice(0),windings:P.windings.slice(0),multiPolys:[]};let N=this._afterState.rings,k=this._afterState.windings,$=this._afterState.multiPolys;for(let at=0,wt=this.rings.length;at<wt;at++){let Et=this.rings[at],G=this.windings[at],ot=N.indexOf(Et);ot===-1?(N.push(Et),k.push(G)):k[ot]+=G}let V=[],ht=[];for(let at=0,wt=N.length;at<wt;at++){if(k[at]===0)continue;let Et=N[at],G=Et.poly;if(ht.indexOf(G)===-1)if(Et.isExterior)V.push(G);else{ht.indexOf(G)===-1&&ht.push(G);let ot=V.indexOf(Et.poly);ot!==-1&&V.splice(ot,1)}}for(let at=0,wt=V.length;at<wt;at++){let Et=V[at].multiPoly;$.indexOf(Et)===-1&&$.push(Et)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let P=this.beforeState().multiPolys,N=this.afterState().multiPolys;switch(dt.type){case"union":{let k=P.length===0,$=N.length===0;this._isInResult=k!==$;break}case"intersection":{let k,$;P.length<N.length?(k=P.length,$=N.length):(k=N.length,$=P.length),this._isInResult=$===dt.numMultiPolys&&k<$;break}case"xor":{let k=Math.abs(P.length-N.length);this._isInResult=k%2===1;break}case"difference":{let k=$=>$.length===1&&$[0].isSubject;this._isInResult=k(P)!==k(N);break}default:throw new Error(\`Unrecognized operation type found \${dt.type}\`)}return this._isInResult}}class ge{constructor(P,N,k){if(!Array.isArray(P)||P.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=N,this.isExterior=k,this.segments=[],typeof P[0][0]!="number"||typeof P[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let $=X.round(P[0][0],P[0][1]);this.bbox={ll:{x:$.x,y:$.y},ur:{x:$.x,y:$.y}};let V=$;for(let ht=1,at=P.length;ht<at;ht++){if(typeof P[ht][0]!="number"||typeof P[ht][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let wt=X.round(P[ht][0],P[ht][1]);wt.x===V.x&&wt.y===V.y||(this.segments.push(ee.fromRing(V,wt,this)),wt.x<this.bbox.ll.x&&(this.bbox.ll.x=wt.x),wt.y<this.bbox.ll.y&&(this.bbox.ll.y=wt.y),wt.x>this.bbox.ur.x&&(this.bbox.ur.x=wt.x),wt.y>this.bbox.ur.y&&(this.bbox.ur.y=wt.y),V=wt)}($.x!==V.x||$.y!==V.y)&&this.segments.push(ee.fromRing(V,$,this))}getSweepEvents(){let P=[];for(let N=0,k=this.segments.length;N<k;N++){let $=this.segments[N];P.push($.leftSE),P.push($.rightSE)}return P}}class fe{constructor(P,N){if(!Array.isArray(P))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ge(P[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let k=1,$=P.length;k<$;k++){let V=new ge(P[k],this,!1);V.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=V.bbox.ll.x),V.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=V.bbox.ll.y),V.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=V.bbox.ur.x),V.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=V.bbox.ur.y),this.interiorRings.push(V)}this.multiPoly=N}getSweepEvents(){let P=this.exteriorRing.getSweepEvents();for(let N=0,k=this.interiorRings.length;N<k;N++){let $=this.interiorRings[N].getSweepEvents();for(let V=0,ht=$.length;V<ht;V++)P.push($[V])}return P}}class Te{constructor(P,N){if(!Array.isArray(P))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof P[0][0][0]=="number"&&(P=[P])}catch(k){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let k=0,$=P.length;k<$;k++){let V=new fe(P[k],this);V.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=V.bbox.ll.x),V.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=V.bbox.ll.y),V.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=V.bbox.ur.x),V.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=V.bbox.ur.y),this.polys.push(V)}this.isSubject=N}getSweepEvents(){let P=[];for(let N=0,k=this.polys.length;N<k;N++){let $=this.polys[N].getSweepEvents();for(let V=0,ht=$.length;V<ht;V++)P.push($[V])}return P}}class be{static factory(P){let N=[];for(let k=0,$=P.length;k<$;k++){let V=P[k];if(!V.isInResult()||V.ringOut)continue;let ht=null,at=V.leftSE,wt=V.rightSE,Et=[at],G=at.point,ot=[];for(;ht=at,at=wt,Et.push(at),at.point!==G;)for(;;){let et=at.getAvailableLinkedEvents();if(et.length===0){let Kt=Et[0].point,me=Et[Et.length-1].point;throw new Error(\`Unable to complete output ring starting at [\${Kt.x}, \${Kt.y}]. Last matching segment found ends at [\${me.x}, \${me.y}].\`)}if(et.length===1){wt=et[0].otherSE;break}let lt=null;for(let Kt=0,me=ot.length;Kt<me;Kt++)if(ot[Kt].point===at.point){lt=Kt;break}if(lt!==null){let Kt=ot.splice(lt)[0],me=Et.splice(Kt.index);me.unshift(me[0].otherSE),N.push(new be(me.reverse()));continue}ot.push({index:Et.length,point:at.point});let Ft=at.getLeftmostComparator(ht);wt=et.sort(Ft)[0].otherSE;break}N.push(new be(Et))}return N}constructor(P){this.events=P;for(let N=0,k=P.length;N<k;N++)P[N].segment.ringOut=this;this.poly=null}getGeom(){let P=this.events[0].point,N=[P];for(let Et=1,G=this.events.length-1;Et<G;Et++){let ot=this.events[Et].point,et=this.events[Et+1].point;Ut(ot,P,et)!==0&&(N.push(ot),P=ot)}if(N.length===1)return null;let k=N[0],$=N[1];Ut(k,P,$)===0&&N.shift(),N.push(N[0]);let V=this.isExteriorRing()?1:-1,ht=this.isExteriorRing()?0:N.length-1,at=this.isExteriorRing()?N.length:-1,wt=[];for(let Et=ht;Et!=at;Et+=V)wt.push([N[Et].x,N[Et].y]);return wt}isExteriorRing(){if(this._isExteriorRing===void 0){let P=this.enclosingRing();this._isExteriorRing=P?!P.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let P=this.events[0];for(let $=1,V=this.events.length;$<V;$++){let ht=this.events[$];ft.compare(P,ht)>0&&(P=ht)}let N=P.segment.prevInResult(),k=N?N.prevInResult():null;for(;;){if(!N)return null;if(!k)return N.ringOut;if(k.ringOut!==N.ringOut)return k.ringOut.enclosingRing()!==N.ringOut?N.ringOut:N.ringOut.enclosingRing();N=k.prevInResult(),k=N?N.prevInResult():null}}}class Wt{constructor(P){this.exteriorRing=P,P.poly=this,this.interiorRings=[]}addInterior(P){this.interiorRings.push(P),P.poly=this}getGeom(){let P=[this.exteriorRing.getGeom()];if(P[0]===null)return null;for(let N=0,k=this.interiorRings.length;N<k;N++){let $=this.interiorRings[N].getGeom();$!==null&&P.push($)}return P}}class Me{constructor(P){this.rings=P,this.polys=this._composePolys(P)}getGeom(){let P=[];for(let N=0,k=this.polys.length;N<k;N++){let $=this.polys[N].getGeom();$!==null&&P.push($)}return P}_composePolys(P){let N=[];for(let k=0,$=P.length;k<$;k++){let V=P[k];if(!V.poly)if(V.isExteriorRing())N.push(new Wt(V));else{let ht=V.enclosingRing();ht.poly||N.push(new Wt(ht)),ht.poly.addInterior(V)}}return N}}class tt{constructor(P){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.compare;this.queue=P,this.tree=new g(N),this.segments=[]}process(P){let N=P.segment,k=[];if(P.consumedBy)return P.isLeft?this.queue.remove(P.otherSE):this.tree.remove(N),k;let $=P.isLeft?this.tree.add(N):this.tree.find(N);if(!$)throw new Error(\`Unable to find segment #\${N.id} [\${N.leftSE.point.x}, \${N.leftSE.point.y}] -> [\${N.rightSE.point.x}, \${N.rightSE.point.y}] in SweepLine tree.\`);let V=$,ht=$,at,wt;for(;at===void 0;)V=this.tree.prev(V),V===null?at=null:V.key.consumedBy===void 0&&(at=V.key);for(;wt===void 0;)ht=this.tree.next(ht),ht===null?wt=null:ht.key.consumedBy===void 0&&(wt=ht.key);if(P.isLeft){let Et=null;if(at){let ot=at.getIntersection(N);if(ot!==null&&(N.isAnEndpoint(ot)||(Et=ot),!at.isAnEndpoint(ot))){let et=this._splitSafely(at,ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}}let G=null;if(wt){let ot=wt.getIntersection(N);if(ot!==null&&(N.isAnEndpoint(ot)||(G=ot),!wt.isAnEndpoint(ot))){let et=this._splitSafely(wt,ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}}if(Et!==null||G!==null){let ot=null;Et===null?ot=G:G===null?ot=Et:ot=ft.comparePoints(Et,G)<=0?Et:G,this.queue.remove(N.rightSE),k.push(N.rightSE);let et=N.split(ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}k.length>0?(this.tree.remove(N),k.push(P)):(this.segments.push(N),N.prev=at)}else{if(at&&wt){let Et=at.getIntersection(wt);if(Et!==null){if(!at.isAnEndpoint(Et)){let G=this._splitSafely(at,Et);for(let ot=0,et=G.length;ot<et;ot++)k.push(G[ot])}if(!wt.isAnEndpoint(Et)){let G=this._splitSafely(wt,Et);for(let ot=0,et=G.length;ot<et;ot++)k.push(G[ot])}}}this.tree.remove(N)}return k}_splitSafely(P,N){this.tree.remove(P);let k=P.rightSE;this.queue.remove(k);let $=P.split(N);return $.push(k),P.consumedBy===void 0&&this.tree.add(P),$}}let z=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Pt=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Ot{run(P,N,k){dt.type=P,X.reset();let $=[new Te(N,!0)];for(let ot=0,et=k.length;ot<et;ot++)$.push(new Te(k[ot],!1));if(dt.numMultiPolys=$.length,dt.type==="difference"){let ot=$[0],et=1;for(;et<$.length;)S($[et].bbox,ot.bbox)!==null?et++:$.splice(et,1)}if(dt.type==="intersection")for(let ot=0,et=$.length;ot<et;ot++){let lt=$[ot];for(let Ft=ot+1,Kt=$.length;Ft<Kt;Ft++)if(S(lt.bbox,$[Ft].bbox)===null)return[]}let V=new g(ft.compare);for(let ot=0,et=$.length;ot<et;ot++){let lt=$[ot].getSweepEvents();for(let Ft=0,Kt=lt.length;Ft<Kt;Ft++)if(V.insert(lt[Ft]),V.size>z)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let ht=new tt(V),at=V.size,wt=V.pop();for(;wt;){let ot=wt.key;if(V.size===at){let lt=ot.segment;throw new Error(\`Unable to pop() \${ot.isLeft?"left":"right"} SweepEvent [\${ot.point.x}, \${ot.point.y}] from segment #\${lt.id} [\${lt.leftSE.point.x}, \${lt.leftSE.point.y}] -> [\${lt.rightSE.point.x}, \${lt.rightSE.point.y}] from queue.\`)}if(V.size>z)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(ht.segments.length>Pt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let et=ht.process(ot);for(let lt=0,Ft=et.length;lt<Ft;lt++){let Kt=et[lt];Kt.consumedBy===void 0&&V.insert(Kt)}at=V.size,wt=V.pop()}X.reset();let Et=be.factory(ht.segments);return new Me(Et).getGeom()}}let dt=new Ot;var ne={union:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("union",rt,N)},intersection:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("intersection",rt,N)},xor:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("xor",rt,N)},difference:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("difference",rt,N)}};return ne})});var tN=st((zg,QL)=>{(function(n,t){typeof zg=="object"&&typeof QL!="undefined"?t(zg):typeof define=="function"&&define.amd?define(["exports"],t):t(n.jsts={})})(zg,function(n){"use strict";function t(){}function e(r){this.message=r||""}function o(r){this.message=r||""}function s(r){this.message=r||""}function l(){}function p(r){return r===null?Je:r.color}function h(r){return r===null?null:r.parent}function g(r,i){r!==null&&(r.color=i)}function m(r){return r===null?null:r.left}function v(r){return r===null?null:r.right}function x(){this.root_=null,this.size_=0}function E(){}function b(){this.array_=[],arguments[0]instanceof at&&this.addAll(arguments[0])}function T(){}function I(r){this.message=r||""}function S(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(r){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var i=Object(this),a=Math.max(Math.min(i.length,9007199254740991),0)||0,c=1 in arguments&&parseInt(Number(arguments[1]),10)||0;c=c<0?Math.max(a+c,0):Math.min(c,a);var d=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:a;for(d=d<0?Math.max(a+arguments[2],0):Math.min(d,a);c<d;)i[c]=r,++c;return i},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!=r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var w=function(){};w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w},w.prototype.equalsWithTolerance=function(r,i,a){return Math.abs(r-i)<=a};var R=function(r){function i(a){r.call(this,a),this.name="IllegalArgumentException",this.message=a,this.stack=new r().stack}return r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i,i}(Error),C=function(){},F={MAX_VALUE:{configurable:!0}};C.isNaN=function(r){return Number.isNaN(r)},C.doubleToLongBits=function(r){return r},C.longBitsToDouble=function(r){return r},C.isInfinite=function(r){return!Number.isFinite(r)},F.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(C,F);var W=function(){},X=function(){},q=function(){},D=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var i=arguments[0];this.x=i.x,this.y=i.y,this.z=i.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},xt={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(r,i){switch(r){case D.X:this.x=i;break;case D.Y:this.y=i;break;case D.Z:this.z=i;break;default:throw new R("Invalid ordinate index: "+r)}},D.prototype.equals2D=function(){if(arguments.length===1){var r=arguments[0];return this.x===r.x&&this.y===r.y}if(arguments.length===2){var i=arguments[0],a=arguments[1];return!!w.equalsWithTolerance(this.x,i.x,a)&&!!w.equalsWithTolerance(this.y,i.y,a)}},D.prototype.getOrdinate=function(r){switch(r){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new R("Invalid ordinate index: "+r)},D.prototype.equals3D=function(r){return this.x===r.x&&this.y===r.y&&(this.z===r.z||C.isNaN(this.z))&&C.isNaN(r.z)},D.prototype.equals=function(r){return r instanceof D&&this.equals2D(r)},D.prototype.equalInZ=function(r,i){return w.equalsWithTolerance(this.z,r.z,i)},D.prototype.compareTo=function(r){var i=r;return this.x<i.x?-1:this.x>i.x?1:this.y<i.y?-1:this.y>i.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(r){var i=this.x-r.x,a=this.y-r.y,c=this.z-r.z;return Math.sqrt(i*i+a*a+c*c)},D.prototype.distance=function(r){var i=this.x-r.x,a=this.y-r.y;return Math.sqrt(i*i+a*a)},D.prototype.hashCode=function(){var r=17;return r=37*r+D.hashCode(this.x),r=37*r+D.hashCode(this.y)},D.prototype.setCoordinate=function(r){this.x=r.x,this.y=r.y,this.z=r.z},D.prototype.interfaces_=function(){return[W,X,t]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var r=arguments[0],i=C.doubleToLongBits(r);return Math.trunc((i^i)>>>32)}},xt.DimensionalComparator.get=function(){return B},xt.serialVersionUID.get=function(){return 6683108902428367e3},xt.NULL_ORDINATE.get=function(){return C.NaN},xt.X.get=function(){return 0},xt.Y.get=function(){return 1},xt.Z.get=function(){return 2},Object.defineProperties(D,xt);var B=function(r){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var i=arguments[0];if(i!==2&&i!==3)throw new R("only 2 or 3 dimensions may be specified");this._dimensionsToTest=i}}};B.prototype.compare=function(r,i){var a=r,c=i,d=B.compare(a.x,c.x);if(d!==0)return d;var _=B.compare(a.y,c.y);return _!==0?_:this._dimensionsToTest<=2?0:B.compare(a.z,c.z)},B.prototype.interfaces_=function(){return[q]},B.prototype.getClass=function(){return B},B.compare=function(r,i){return r<i?-1:r>i?1:C.isNaN(r)?C.isNaN(i)?0:-1:C.isNaN(i)?1:0};var j=function(){};j.prototype.create=function(){},j.prototype.interfaces_=function(){return[]},j.prototype.getClass=function(){return j};var J=function(){},Dt={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};J.prototype.interfaces_=function(){return[]},J.prototype.getClass=function(){return J},J.toLocationSymbol=function(r){switch(r){case J.EXTERIOR:return"e";case J.BOUNDARY:return"b";case J.INTERIOR:return"i";case J.NONE:return"-"}throw new R("Unknown location value: "+r)},Dt.INTERIOR.get=function(){return 0},Dt.BOUNDARY.get=function(){return 1},Dt.EXTERIOR.get=function(){return 2},Dt.NONE.get=function(){return-1},Object.defineProperties(J,Dt);var Q=function(r,i){return r.interfaces_&&r.interfaces_().indexOf(i)>-1},At=function(){},Mt={LOG_10:{configurable:!0}};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.log10=function(r){var i=Math.log(r);return C.isInfinite(i)||C.isNaN(i)?i:i/At.LOG_10},At.min=function(r,i,a,c){var d=r;return i<d&&(d=i),a<d&&(d=a),c<d&&(d=c),d},At.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1],a=arguments[2];return r<i?i:r>a?a:r}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var c=arguments[0],d=arguments[1],_=arguments[2];return c<d?d:c>_?_:c}},At.wrap=function(r,i){return r<0?i- -r%i:r%i},At.max=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2],c=r;return i>c&&(c=i),a>c&&(c=a),c}if(arguments.length===4){var d=arguments[0],_=arguments[1],M=arguments[2],L=arguments[3],H=d;return _>H&&(H=_),M>H&&(H=M),L>H&&(H=L),H}},At.average=function(r,i){return(r+i)/2},Mt.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(At,Mt);var Lt=function(r){this.str=r};Lt.prototype.append=function(r){this.str+=r},Lt.prototype.setCharAt=function(r,i){this.str=this.str.substr(0,r)+i+this.str.substr(r+1)},Lt.prototype.toString=function(r){return this.str};var pt=function(r){this.value=r};pt.prototype.intValue=function(){return this.value},pt.prototype.compareTo=function(r){return this.value<r?-1:this.value>r?1:0},pt.isNaN=function(r){return Number.isNaN(r)};var yt=function(){};yt.isWhitespace=function(r){return r<=32&&r>=0||r===127},yt.toUpperCase=function(r){return r.toUpperCase()};var K=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var i=arguments[0];this.init(i)}else if(arguments[0]instanceof r){var a=arguments[0];this.init(a)}else if(typeof arguments[0]=="string"){var c=arguments[0];r.call(this,r.parse(c))}}else if(arguments.length===2){var d=arguments[0],_=arguments[1];this.init(d,_)}},Bt={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};K.prototype.le=function(r){return(this._hi<r._hi||this._hi===r._hi)&&this._lo<=r._lo},K.prototype.extractSignificantDigits=function(r,i){var a=this.abs(),c=K.magnitude(a._hi),d=K.TEN.pow(c);(a=a.divide(d)).gt(K.TEN)?(a=a.divide(K.TEN),c+=1):a.lt(K.ONE)&&(a=a.multiply(K.TEN),c-=1);for(var _=c+1,M=new Lt,L=K.MAX_PRINT_DIGITS-1,H=0;H<=L;H++){r&&H===_&&M.append(".");var it=Math.trunc(a._hi);if(it<0)break;var bt=!1,Tt=0;it>9?(bt=!0,Tt="9"):Tt="0"+it,M.append(Tt),a=a.subtract(K.valueOf(it)).multiply(K.TEN),bt&&a.selfAdd(K.TEN);var Jt=!0,Qt=K.magnitude(a._hi);if(Qt<0&&Math.abs(Qt)>=L-H&&(Jt=!1),!Jt)break}return i[0]=c,M.toString()},K.prototype.sqr=function(){return this.multiply(this)},K.prototype.doubleValue=function(){return this._hi+this._lo},K.prototype.subtract=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.add(r.negate())}if(typeof arguments[0]=="number"){var i=arguments[0];return this.add(-i)}},K.prototype.equals=function(){if(arguments.length===1){var r=arguments[0];return this._hi===r._hi&&this._lo===r._lo}},K.prototype.isZero=function(){return this._hi===0&&this._lo===0},K.prototype.selfSubtract=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.isNaN()?this:this.selfAdd(-r._hi,-r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.isNaN()?this:this.selfAdd(-i,0)}},K.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},K.prototype.min=function(r){return this.le(r)?this:r},K.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfDivide(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.selfDivide(i,0)}}else if(arguments.length===2){var a=arguments[0],c=arguments[1],d=null,_=null,M=null,L=null,H=null,it=null,bt=null,Tt=null;return H=this._hi/a,it=K.SPLIT*H,d=it-H,Tt=K.SPLIT*a,d=it-d,_=H-d,M=Tt-a,bt=H*a,M=Tt-M,L=a-M,Tt=d*M-bt+d*L+_*M+_*L,it=(this._hi-bt-Tt+this._lo-H*c)/a,Tt=H+it,this._hi=Tt,this._lo=H-Tt+it,this}},K.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},K.prototype.divide=function(){if(arguments[0]instanceof K){var r=arguments[0],i=null,a=null,c=null,d=null,_=null,M=null,L=null,H=null;return a=(_=this._hi/r._hi)-(i=(M=K.SPLIT*_)-(i=M-_)),H=i*(c=(H=K.SPLIT*r._hi)-(c=H-r._hi))-(L=_*r._hi)+i*(d=r._hi-c)+a*c+a*d,M=(this._hi-L-H+this._lo-_*r._lo)/r._hi,new K(H=_+M,_-H+M)}if(typeof arguments[0]=="number"){var it=arguments[0];return C.isNaN(it)?K.createNaN():K.copy(this).selfDivide(it,0)}},K.prototype.ge=function(r){return(this._hi>r._hi||this._hi===r._hi)&&this._lo>=r._lo},K.prototype.pow=function(r){if(r===0)return K.valueOf(1);var i=new K(this),a=K.valueOf(1),c=Math.abs(r);if(c>1)for(;c>0;)c%2==1&&a.selfMultiply(i),(c/=2)>0&&(i=i.sqr());else a=i;return r<0?a.reciprocal():a},K.prototype.ceil=function(){if(this.isNaN())return K.NaN;var r=Math.ceil(this._hi),i=0;return r===this._hi&&(i=Math.ceil(this._lo)),new K(r,i)},K.prototype.compareTo=function(r){var i=r;return this._hi<i._hi?-1:this._hi>i._hi?1:this._lo<i._lo?-1:this._lo>i._lo?1:0},K.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},K.prototype.setValue=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.init(r),this}if(typeof arguments[0]=="number"){var i=arguments[0];return this.init(i),this}},K.prototype.max=function(r){return this.ge(r)?this:r},K.prototype.sqrt=function(){if(this.isZero())return K.valueOf(0);if(this.isNegative())return K.NaN;var r=1/Math.sqrt(this._hi),i=this._hi*r,a=K.valueOf(i),c=this.subtract(a.sqr())._hi*(.5*r);return a.add(c)},K.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfAdd(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0],a=null,c=null,d=null,_=null,M=null,L=null;return d=this._hi+i,M=d-this._hi,_=d-M,_=i-M+(this._hi-_),L=_+this._lo,a=d+L,c=L+(d-a),this._hi=a+c,this._lo=c+(a-this._hi),this}}else if(arguments.length===2){var H=arguments[0],it=arguments[1],bt=null,Tt=null,Jt=null,Qt=null,le=null,Ee=null,On=null;Qt=this._hi+H,Tt=this._lo+it,le=Qt-(Ee=Qt-this._hi),Jt=Tt-(On=Tt-this._lo);var Kn=(bt=Qt+(Ee=(le=H-Ee+(this._hi-le))+Tt))+(Ee=(Jt=it-On+(this._lo-Jt))+(Ee+(Qt-bt))),fi=Ee+(bt-Kn);return this._hi=Kn,this._lo=fi,this}},K.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfMultiply(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.selfMultiply(i,0)}}else if(arguments.length===2){var a=arguments[0],c=arguments[1],d=null,_=null,M=null,L=null,H=null,it=null;d=(H=K.SPLIT*this._hi)-this._hi,it=K.SPLIT*a,d=H-d,_=this._hi-d,M=it-a;var bt=(H=this._hi*a)+(it=d*(M=it-M)-H+d*(L=a-M)+_*M+_*L+(this._hi*c+this._lo*a)),Tt=it+(d=H-bt);return this._hi=bt,this._lo=Tt,this}},K.prototype.selfSqr=function(){return this.selfMultiply(this)},K.prototype.floor=function(){if(this.isNaN())return K.NaN;var r=Math.floor(this._hi),i=0;return r===this._hi&&(i=Math.floor(this._lo)),new K(r,i)},K.prototype.negate=function(){return this.isNaN()?this:new K(-this._hi,-this._lo)},K.prototype.clone=function(){},K.prototype.multiply=function(){if(arguments[0]instanceof K){var r=arguments[0];return r.isNaN()?K.createNaN():K.copy(this).selfMultiply(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return C.isNaN(i)?K.createNaN():K.copy(this).selfMultiply(i,0)}},K.prototype.isNaN=function(){return C.isNaN(this._hi)},K.prototype.intValue=function(){return Math.trunc(this._hi)},K.prototype.toString=function(){var r=K.magnitude(this._hi);return r>=-3&&r<=20?this.toStandardNotation():this.toSciNotation()},K.prototype.toStandardNotation=function(){var r=this.getSpecialNumberString();if(r!==null)return r;var i=new Array(1).fill(null),a=this.extractSignificantDigits(!0,i),c=i[0]+1,d=a;if(a.charAt(0)===".")d="0"+a;else if(c<0)d="0."+K.stringOfChar("0",-c)+a;else if(a.indexOf(".")===-1){var _=c-a.length;d=a+K.stringOfChar("0",_)+".0"}return this.isNegative()?"-"+d:d},K.prototype.reciprocal=function(){var r=null,i=null,a=null,c=null,d=null,_=null,M=null,L=null;i=(d=1/this._hi)-(r=(_=K.SPLIT*d)-(r=_-d)),a=(L=K.SPLIT*this._hi)-this._hi;var H=d+(_=(1-(M=d*this._hi)-(L=r*(a=L-a)-M+r*(c=this._hi-a)+i*a+i*c)-d*this._lo)/this._hi);return new K(H,d-H+_)},K.prototype.toSciNotation=function(){if(this.isZero())return K.SCI_NOT_ZERO;var r=this.getSpecialNumberString();if(r!==null)return r;var i=new Array(1).fill(null),a=this.extractSignificantDigits(!1,i),c=K.SCI_NOT_EXPONENT_CHAR+i[0];if(a.charAt(0)==="0")throw new Error("Found leading zero: "+a);var d="";a.length>1&&(d=a.substring(1));var _=a.charAt(0)+"."+d;return this.isNegative()?"-"+_+c:_+c},K.prototype.abs=function(){return this.isNaN()?K.NaN:this.isNegative()?this.negate():new K(this)},K.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},K.prototype.lt=function(r){return(this._hi<r._hi||this._hi===r._hi)&&this._lo<r._lo},K.prototype.add=function(){if(arguments[0]instanceof K){var r=arguments[0];return K.copy(this).selfAdd(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return K.copy(this).selfAdd(i)}},K.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var r=arguments[0];this._hi=r,this._lo=0}else if(arguments[0]instanceof K){var i=arguments[0];this._hi=i._hi,this._lo=i._lo}}else if(arguments.length===2){var a=arguments[0],c=arguments[1];this._hi=a,this._lo=c}},K.prototype.gt=function(r){return(this._hi>r._hi||this._hi===r._hi)&&this._lo>r._lo},K.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},K.prototype.trunc=function(){return this.isNaN()?K.NaN:this.isPositive()?this.floor():this.ceil()},K.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},K.prototype.interfaces_=function(){return[t,W,X]},K.prototype.getClass=function(){return K},K.sqr=function(r){return K.valueOf(r).selfMultiply(r)},K.valueOf=function(){if(typeof arguments[0]=="string"){var r=arguments[0];return K.parse(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return new K(i)}},K.sqrt=function(r){return K.valueOf(r).sqrt()},K.parse=function(r){for(var i=0,a=r.length;yt.isWhitespace(r.charAt(i));)i++;var c=!1;if(i<a){var d=r.charAt(i);d!=="-"&&d!=="+"||(i++,d==="-"&&(c=!0))}for(var _=new K,M=0,L=0,H=0;!(i>=a);){var it=r.charAt(i);if(i++,yt.isDigit(it)){var bt=it-"0";_.selfMultiply(K.TEN),_.selfAdd(bt),M++}else{if(it!=="."){if(it==="e"||it==="E"){var Tt=r.substring(i);try{H=pt.parseInt(Tt)}catch(On){throw On instanceof Error?new Error("Invalid exponent "+Tt+" in string "+r):On}break}throw new Error("Unexpected character '"+it+"' at position "+i+" in string "+r)}L=M}}var Jt=_,Qt=M-L-H;if(Qt===0)Jt=_;else if(Qt>0){var le=K.TEN.pow(Qt);Jt=_.divide(le)}else if(Qt<0){var Ee=K.TEN.pow(-Qt);Jt=_.multiply(Ee)}return c?Jt.negate():Jt},K.createNaN=function(){return new K(C.NaN,C.NaN)},K.copy=function(r){return new K(r)},K.magnitude=function(r){var i=Math.abs(r),a=Math.log(i)/Math.log(10),c=Math.trunc(Math.floor(a));return 10*Math.pow(10,c)<=i&&(c+=1),c},K.stringOfChar=function(r,i){for(var a=new Lt,c=0;c<i;c++)a.append(r);return a.toString()},Bt.PI.get=function(){return new K(3.141592653589793,12246467991473532e-32)},Bt.TWO_PI.get=function(){return new K(6.283185307179586,24492935982947064e-32)},Bt.PI_2.get=function(){return new K(1.5707963267948966,6123233995736766e-32)},Bt.E.get=function(){return new K(2.718281828459045,14456468917292502e-32)},Bt.NaN.get=function(){return new K(C.NaN,C.NaN)},Bt.EPS.get=function(){return 123259516440783e-46},Bt.SPLIT.get=function(){return 134217729},Bt.MAX_PRINT_DIGITS.get=function(){return 32},Bt.TEN.get=function(){return K.valueOf(10)},Bt.ONE.get=function(){return K.valueOf(1)},Bt.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Bt.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(K,Bt);var Gt=function(){},ae={DP_SAFE_EPSILON:{configurable:!0}};Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.orientationIndex=function(r,i,a){var c=Gt.orientationIndexFilter(r,i,a);if(c<=1)return c;var d=K.valueOf(i.x).selfAdd(-r.x),_=K.valueOf(i.y).selfAdd(-r.y),M=K.valueOf(a.x).selfAdd(-i.x),L=K.valueOf(a.y).selfAdd(-i.y);return d.selfMultiply(L).selfSubtract(_.selfMultiply(M)).signum()},Gt.signOfDet2x2=function(r,i,a,c){return r.multiply(c).selfSubtract(i.multiply(a)).signum()},Gt.intersection=function(r,i,a,c){var d=K.valueOf(c.y).selfSubtract(a.y).selfMultiply(K.valueOf(i.x).selfSubtract(r.x)),_=K.valueOf(c.x).selfSubtract(a.x).selfMultiply(K.valueOf(i.y).selfSubtract(r.y)),M=d.subtract(_),L=K.valueOf(c.x).selfSubtract(a.x).selfMultiply(K.valueOf(r.y).selfSubtract(a.y)),H=K.valueOf(c.y).selfSubtract(a.y).selfMultiply(K.valueOf(r.x).selfSubtract(a.x)),it=L.subtract(H).selfDivide(M).doubleValue(),bt=K.valueOf(r.x).selfAdd(K.valueOf(i.x).selfSubtract(r.x).selfMultiply(it)).doubleValue(),Tt=K.valueOf(i.x).selfSubtract(r.x).selfMultiply(K.valueOf(r.y).selfSubtract(a.y)),Jt=K.valueOf(i.y).selfSubtract(r.y).selfMultiply(K.valueOf(r.x).selfSubtract(a.x)),Qt=Tt.subtract(Jt).selfDivide(M).doubleValue(),le=K.valueOf(a.y).selfAdd(K.valueOf(c.y).selfSubtract(a.y).selfMultiply(Qt)).doubleValue();return new D(bt,le)},Gt.orientationIndexFilter=function(r,i,a){var c=null,d=(r.x-a.x)*(i.y-a.y),_=(r.y-a.y)*(i.x-a.x),M=d-_;if(d>0){if(_<=0)return Gt.signum(M);c=d+_}else{if(!(d<0)||_>=0)return Gt.signum(M);c=-d-_}var L=Gt.DP_SAFE_EPSILON*c;return M>=L||-M>=L?Gt.signum(M):2},Gt.signum=function(r){return r>0?1:r<0?-1:0},ae.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Gt,ae);var ut=function(){},Ut={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ut.X.get=function(){return 0},Ut.Y.get=function(){return 1},Ut.Z.get=function(){return 2},Ut.M.get=function(){return 3},ut.prototype.setOrdinate=function(r,i,a){},ut.prototype.size=function(){},ut.prototype.getOrdinate=function(r,i){},ut.prototype.getCoordinate=function(){},ut.prototype.getCoordinateCopy=function(r){},ut.prototype.getDimension=function(){},ut.prototype.getX=function(r){},ut.prototype.clone=function(){},ut.prototype.expandEnvelope=function(r){},ut.prototype.copy=function(){},ut.prototype.getY=function(r){},ut.prototype.toCoordinateArray=function(){},ut.prototype.interfaces_=function(){return[X]},ut.prototype.getClass=function(){return ut},Object.defineProperties(ut,Ut);var jt=function(){},ce=function(r){function i(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i,i.prototype.interfaces_=function(){return[]},i.prototype.getClass=function(){return i},i}(jt),te=function(){};te.arraycopy=function(r,i,a,c,d){for(var _=0,M=i;M<i+d;M++)a[c+_]=r[M],_++},te.getProperty=function(r){return{"line.separator":\`
|